From 6e0d87220fdc0690ade60be8e845087dfd2de931 Mon Sep 17 00:00:00 2001 From: Gonzalo Riestra Date: Mon, 10 Jul 2023 13:26:24 +0200 Subject: [PATCH] Remove ngrok plugin and references --- .changeset/config.json | 1 - .changeset/nervous-gorillas-jam.md | 8 + docs/README.md | 8 - docs/cli/plugins.md | 16 - docs/plugins/ngrok.md | 43 -- packages/app/oclif.manifest.json | 16 - packages/app/package.json | 2 - .../app/src/cli/api/graphql/find_org_basic.ts | 6 - packages/app/src/cli/commands/app/dev.ts | 9 - .../specifications/ui_extension.test.ts | 2 +- packages/app/src/cli/models/organization.ts | 3 - packages/app/src/cli/prompts/dev.test.ts | 2 - packages/app/src/cli/services/context.test.ts | 28 - packages/app/src/cli/services/context.ts | 6 +- packages/app/src/cli/services/dev.ts | 10 +- .../app/src/cli/services/dev/fetch.test.ts | 2 - .../app/src/cli/services/dev/output.test.ts | 4 +- .../src/cli/services/dev/select-app.test.ts | 2 - .../src/cli/services/dev/select-store.test.ts | 1 - packages/cli/src/index.ts | 4 +- packages/create-app/src/utils/template/npm.ts | 2 - packages/plugin-cloudflare/src/tunnel.ts | 1 - packages/plugin-ngrok/CHANGELOG.md | 684 ------------------ packages/plugin-ngrok/oclif.manifest.json | 22 - packages/plugin-ngrok/package.json | 67 -- packages/plugin-ngrok/project.json | 70 -- .../plugin-ngrok/src/commands/ngrok/auth.ts | 17 - packages/plugin-ngrok/src/ngrok.d.ts | 1 - packages/plugin-ngrok/src/provider.ts | 4 - packages/plugin-ngrok/src/tunnel.test.ts | 150 ---- packages/plugin-ngrok/src/tunnel.ts | 92 --- packages/plugin-ngrok/tsconfig.build.json | 7 - packages/plugin-ngrok/tsconfig.json | 13 - packages/plugin-ngrok/vite.config.ts | 3 - pnpm-lock.yaml | 113 +-- tsconfig.json | 1 - vitest.workspace.json | 1 - 37 files changed, 35 insertions(+), 1386 deletions(-) create mode 100644 .changeset/nervous-gorillas-jam.md delete mode 100644 docs/cli/plugins.md delete mode 100644 docs/plugins/ngrok.md delete mode 100644 packages/plugin-ngrok/CHANGELOG.md delete mode 100644 packages/plugin-ngrok/oclif.manifest.json delete mode 100644 packages/plugin-ngrok/package.json delete mode 100644 packages/plugin-ngrok/project.json delete mode 100644 packages/plugin-ngrok/src/commands/ngrok/auth.ts delete mode 100644 packages/plugin-ngrok/src/ngrok.d.ts delete mode 100644 packages/plugin-ngrok/src/provider.ts delete mode 100644 packages/plugin-ngrok/src/tunnel.test.ts delete mode 100644 packages/plugin-ngrok/src/tunnel.ts delete mode 100644 packages/plugin-ngrok/tsconfig.build.json delete mode 100644 packages/plugin-ngrok/tsconfig.json delete mode 100644 packages/plugin-ngrok/vite.config.ts diff --git a/.changeset/config.json b/.changeset/config.json index ba6957cbfee..b7767ea2657 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -10,7 +10,6 @@ "@shopify/cli-kit", "@shopify/theme", "@shopify/ui-extensions-dev-console-app", - "@shopify/plugin-ngrok", "@shopify/plugin-cloudflare", "@shopify/plugin-did-you-mean" ]], diff --git a/.changeset/nervous-gorillas-jam.md b/.changeset/nervous-gorillas-jam.md new file mode 100644 index 00000000000..9ee15142511 --- /dev/null +++ b/.changeset/nervous-gorillas-jam.md @@ -0,0 +1,8 @@ +--- +'@shopify/plugin-cloudflare': minor +'@shopify/create-app': minor +'@shopify/app': minor +'@shopify/cli': minor +--- + +Remove ngrok plugin diff --git a/docs/README.md b/docs/README.md index 79ece2970f7..690660cb08b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -32,14 +32,6 @@ The [`@shopify/cli-kit`](https://www.npmjs.com/package/@shopify/cli-kit) NPM pac - [Using UI Kit](cli-kit/ui-kit/readme.md) - [Contributing to UI Kit](cli-kit/ui-kit/contributing.md) -## Plugins - -[Plugins](./cli/plugins.md) are NPM packages that extend, customize, and augment core CLI functionality. Some plugins are developed by Shopify (included in the list below), and we refer to them as official plugins, while external developers develop others. If you want to develop a plugin, we recommend checking out the resources in the development section below. - -### List of official plugins - -* [Ngrok tunnel](./plugins/ngrok.md) - ## Decision Record The following pages document the rationale behind some decisions that we made: diff --git a/docs/cli/plugins.md b/docs/cli/plugins.md deleted file mode 100644 index 041b0042261..00000000000 --- a/docs/cli/plugins.md +++ /dev/null @@ -1,16 +0,0 @@ -# Plugins - -The Shopify CLI supports plugins as a way to extend its feature set, both adding new commands or implementing some defined hooks. - - -## Official Plugins - -* [Ngrok tunnel](./plugins/ngrok.md) - - -## Installation - -To install a plugin simply run: -```bash -pnpm shopify plugins install {plugin_name} -``` diff --git a/docs/plugins/ngrok.md b/docs/plugins/ngrok.md deleted file mode 100644 index c78ec903d57..00000000000 --- a/docs/plugins/ngrok.md +++ /dev/null @@ -1,43 +0,0 @@ -This package contains a Shopify CLI plugin that enables the creation of ngrok tunnels from `shopify app dev`, -allowing previews from any device. - -## Requirements - -- Shopify CLI -- [ngrok](https://dashboard.ngrok.com/signup) account - -## Installation - -Right now, it's installed by default with the Shopify CLI. But it could be manually installed with: - -```bash -shopify plugins install ngrok -``` - -## Usage - -When you serve your app, it will automatically create an ngrok tunnel and update your app configuration -in the Partners dashboard to point to the new URL: - -```bash -shopify app dev -``` - -If you don't have an ngrok account configured, the first time it will ask for the token. -You can get it from the [ngrok dashboard](https://dashboard.ngrok.com/get-started/your-authtoken). -Also, you can use this command to manually update it: -```bash -shopify tunnel auth -``` - -## Run tests - -```bash -pnpm test -``` - -or - -```bash -npm test -``` diff --git a/packages/app/oclif.manifest.json b/packages/app/oclif.manifest.json index fe48c88744e..01f7d52b462 100644 --- a/packages/app/oclif.manifest.json +++ b/packages/app/oclif.manifest.json @@ -285,22 +285,6 @@ "tunnel" ] }, - "tunnel": { - "name": "tunnel", - "type": "option", - "description": "Select the tunnel provider", - "hidden": false, - "multiple": false, - "options": [ - "cloudflare", - "ngrok" - ], - "exclusive": [ - "tunnel-url", - "no-tunnel" - ], - "default": "cloudflare" - }, "theme": { "name": "theme", "type": "option", diff --git a/packages/app/package.json b/packages/app/package.json index 250a842761b..bff44c3bd8e 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -46,7 +46,6 @@ "@shopify/cli-kit": "3.47.0", "@shopify/function-runner": "4.1.0", "@shopify/plugin-cloudflare": "3.47.0", - "@shopify/plugin-ngrok": "3.47.0", "abort-controller": "3.0.0", "chokidar": "3.5.3", "diff": "5.1.0", @@ -91,7 +90,6 @@ "sensitive_command_metadata": "./dist/cli/hooks/sensitive_metadata" }, "plugins": [ - "@shopify/plugin-ngrok", "@shopify/plugin-cloudflare" ] } diff --git a/packages/app/src/cli/api/graphql/find_org_basic.ts b/packages/app/src/cli/api/graphql/find_org_basic.ts index 5912066dfdf..02609efd4cd 100644 --- a/packages/app/src/cli/api/graphql/find_org_basic.ts +++ b/packages/app/src/cli/api/graphql/find_org_basic.ts @@ -7,9 +7,6 @@ export const FindOrganizationBasicQuery = gql` id businessName website - betas { - cliTunnelAlternative - } } } } @@ -21,9 +18,6 @@ export interface FindOrganizationBasicQuerySchema { id: string businessName: string website: string - betas: { - cliTunnelAlternative?: boolean - } }[] } } diff --git a/packages/app/src/cli/commands/app/dev.ts b/packages/app/src/cli/commands/app/dev.ts index 9548c18443f..1a4fbeeee23 100644 --- a/packages/app/src/cli/commands/app/dev.ts +++ b/packages/app/src/cli/commands/app/dev.ts @@ -77,14 +77,6 @@ export default class Dev extends Command { default: false, exclusive: ['tunnel-url', 'tunnel'], }), - tunnel: Flags.string({ - hidden: false, - description: 'Select the tunnel provider', - env: 'SHOPIFY_FLAG_TUNNEL', - default: 'cloudflare', - options: ['cloudflare', 'ngrok'], - exclusive: ['tunnel-url', 'no-tunnel'], - }), theme: Flags.string({ hidden: false, char: 't', @@ -128,7 +120,6 @@ export default class Dev extends Command { subscriptionProductUrl: flags['subscription-product-url'], checkoutCartUrl: flags['checkout-cart-url'], tunnelUrl: flags['tunnel-url'], - tunnelProvider: flags.tunnel, noTunnel: flags['no-tunnel'], theme: flags.theme, themeExtensionPort: flags['theme-app-extension-port'], diff --git a/packages/app/src/cli/models/extensions/specifications/ui_extension.test.ts b/packages/app/src/cli/models/extensions/specifications/ui_extension.test.ts index 82a757eca58..f9d3e59876f 100644 --- a/packages/app/src/cli/models/extensions/specifications/ui_extension.test.ts +++ b/packages/app/src/cli/models/extensions/specifications/ui_extension.test.ts @@ -149,7 +149,7 @@ Please check the configuration in ${tomlPath}`), }) // When - const host = 'http://1234.ngrok.io' + const host = 'http://1234.cloudflare.io' const previewMessage = await uiExtension.previewMessage(host, 'not_used') // Then diff --git a/packages/app/src/cli/models/organization.ts b/packages/app/src/cli/models/organization.ts index ea867c5ed9c..d1ccc0d8e9f 100644 --- a/packages/app/src/cli/models/organization.ts +++ b/packages/app/src/cli/models/organization.ts @@ -2,9 +2,6 @@ export interface Organization { id: string businessName: string website?: string - betas?: { - cliTunnelAlternative?: boolean - } } export interface MinimalOrganizationApp { diff --git a/packages/app/src/cli/prompts/dev.test.ts b/packages/app/src/cli/prompts/dev.test.ts index bff4cb8afb3..f6a604dab9b 100644 --- a/packages/app/src/cli/prompts/dev.test.ts +++ b/packages/app/src/cli/prompts/dev.test.ts @@ -24,12 +24,10 @@ vi.mock('@shopify/cli-kit/node/ui') const ORG1: Organization = { id: '1', businessName: 'org1', - betas: {}, } const ORG2: Organization = { id: '2', businessName: 'org2', - betas: {}, } const APP1 = testOrganizationApp({apiKey: 'key1'}) const APP2 = testOrganizationApp({ diff --git a/packages/app/src/cli/services/context.test.ts b/packages/app/src/cli/services/context.test.ts index 900997e3afc..98c2a6845d9 100644 --- a/packages/app/src/cli/services/context.test.ts +++ b/packages/app/src/cli/services/context.test.ts @@ -100,13 +100,11 @@ const APP_WITH_UNIFIED_APP_DEPLOYMENTS_BETA: OrganizationApp = { const ORG1: Organization = { id: '1', businessName: 'org1', - betas: {cliTunnelAlternative: false}, website: '', } const ORG2: Organization = { id: '2', businessName: 'org2', - betas: {cliTunnelAlternative: true}, website: '', } @@ -307,7 +305,6 @@ describe('ensureDevContext', async () => { remoteApp: {...APP2, apiSecret: 'secret2'}, storeFqdn: STORE1.shopDomain, remoteAppUpdated: true, - useCloudflareTunnels: true, updateURLs: true, config: CACHED1_WITH_CONFIG.configFile, deploymentMode: 'legacy', @@ -485,7 +482,6 @@ dev_store_url = "domain1" remoteApp: {...APP1, apiSecret: 'secret1'}, storeFqdn: STORE1.shopDomain, remoteAppUpdated: true, - useCloudflareTunnels: true, updateURLs: undefined, deploymentMode: 'legacy', }) @@ -518,32 +514,12 @@ dev_store_url = "domain1" remoteApp: {...APP1, apiSecret: 'secret1'}, storeFqdn: STORE1.shopDomain, remoteAppUpdated: true, - useCloudflareTunnels: true, updateURLs: undefined, deploymentMode: 'legacy', config: CACHED1_WITH_CONFIG.configFile, }) }) - test('returns useCloudflareTunnels false if the beta is enabled in partners', async () => { - // Given - vi.mocked(getAppInfo).mockReturnValue(undefined) - vi.mocked(fetchOrgFromId).mockResolvedValueOnce(ORG2) - - // When - const got = await ensureDevContext(INPUT, 'token') - - // Then - expect(got).toEqual({ - remoteApp: {...APP1, apiSecret: 'secret1'}, - storeFqdn: STORE1.shopDomain, - remoteAppUpdated: true, - useCloudflareTunnels: false, - updateURLs: undefined, - deploymentMode: 'legacy', - }) - }) - test('returns selected data and updates internal state, with cached state', async () => { // Given vi.mocked(getAppInfo).mockReturnValue({...CACHED1, previousAppId: APP1.apiKey}) @@ -558,7 +534,6 @@ dev_store_url = "domain1" remoteApp: {...APP1, apiSecret: 'secret1'}, storeFqdn: STORE1.shopDomain, remoteAppUpdated: false, - useCloudflareTunnels: true, updateURLs: undefined, deploymentMode: 'legacy', }) @@ -608,7 +583,6 @@ dev_store_url = "domain1" remoteApp: {...APP2, apiSecret: 'secret2'}, storeFqdn: STORE1.shopDomain, remoteAppUpdated: true, - useCloudflareTunnels: true, updateURLs: undefined, deploymentMode: 'legacy', }) @@ -666,7 +640,6 @@ dev_store_url = "domain1" remoteApp: {...APP_WITH_UNIFIED_APP_DEPLOYMENTS_BETA, apiSecret: 'secret2'}, storeFqdn: STORE1.shopDomain, remoteAppUpdated: true, - useCloudflareTunnels: false, updateURLs: undefined, deploymentMode: 'unified', }) @@ -692,7 +665,6 @@ dev_store_url = "domain1" remoteApp: {...APP_WITH_UNIFIED_APP_DEPLOYMENTS_BETA, apiSecret: 'secret2'}, storeFqdn: STORE1.shopDomain, remoteAppUpdated: true, - useCloudflareTunnels: false, updateURLs: undefined, deploymentMode: 'unified', }) diff --git a/packages/app/src/cli/services/context.ts b/packages/app/src/cli/services/context.ts index 2eb23edd2a7..77d8c891c08 100644 --- a/packages/app/src/cli/services/context.ts +++ b/packages/app/src/cli/services/context.ts @@ -68,7 +68,6 @@ interface DevContextOutput { remoteAppUpdated: boolean storeFqdn: string updateURLs: boolean | undefined - useCloudflareTunnels: boolean config?: string deploymentMode: DeploymentMode } @@ -160,7 +159,6 @@ export async function ensureDevContext(options: DevContextOptions, token: string let {app: selectedApp, store: selectedStore} = await fetchDevDataFromOptions(options, orgId, token) const organization = await fetchOrgFromId(orgId, token) - const useCloudflareTunnels = organization.betas?.cliTunnelAlternative !== true if (!selectedApp || !selectedStore) { // if we have selected an app or a dev store from a command flag, we keep them @@ -217,7 +215,7 @@ export async function ensureDevContext(options: DevContextOptions, token: string await enableDeveloperPreview(selectedApp, token) const deploymentMode = selectedApp.betas?.unifiedAppDeployment ? 'unified' : 'legacy' - const result = buildOutput(selectedApp, selectedStore, useCloudflareTunnels, deploymentMode, cachedInfo) + const result = buildOutput(selectedApp, selectedStore, deploymentMode, cachedInfo) await logMetadataForLoadedDevContext(result) return result } @@ -243,7 +241,6 @@ const storeFromFqdn = async (storeFqdn: string, orgId: string, token: string): P function buildOutput( app: OrganizationApp, store: OrganizationStore, - useCloudflareTunnels: boolean, deploymentMode: DeploymentMode, cachedInfo?: CachedAppInfo, ): DevContextOutput { @@ -255,7 +252,6 @@ function buildOutput( remoteAppUpdated: app.apiKey !== cachedInfo?.previousAppId, storeFqdn: store.shopDomain, updateURLs: cachedInfo?.updateURLs, - useCloudflareTunnels, config: cachedInfo?.configFile, deploymentMode, } diff --git a/packages/app/src/cli/services/dev.ts b/packages/app/src/cli/services/dev.ts index a67aa005bf4..219f2f71bc7 100644 --- a/packages/app/src/cli/services/dev.ts +++ b/packages/app/src/cli/services/dev.ts @@ -68,7 +68,6 @@ export interface DevOptions { subscriptionProductUrl?: string checkoutCartUrl?: string tunnelUrl?: string - tunnelProvider: string noTunnel: boolean theme?: string themeExtensionPort?: number @@ -81,7 +80,7 @@ async function dev(options: DevOptions) { let tunnelClient: TunnelClient | undefined if (!options.tunnelUrl && !options.noTunnel) { - tunnelClient = await startTunnelPlugin(options.commandConfig, tunnelPort, options.tunnelProvider) + tunnelClient = await startTunnelPlugin(options.commandConfig, tunnelPort, 'cloudflare') } const token = await ensureAuthenticatedPartners() @@ -90,17 +89,10 @@ async function dev(options: DevOptions) { remoteApp, remoteAppUpdated, updateURLs: cachedUpdateURLs, - useCloudflareTunnels, config, deploymentMode, } = await ensureDevContext(options, token) - if (!options.tunnelUrl && !options.noTunnel && !useCloudflareTunnels && options.tunnelProvider === 'cloudflare') { - // If we can't use cloudflare, stop the previous optimistic tunnel and start a new one - tunnelClient?.stopTunnel() - tunnelClient = await startTunnelPlugin(options.commandConfig, tunnelPort, 'ngrok') - } - const apiKey = remoteApp.apiKey const specifications = await fetchSpecifications({token, apiKey, config: options.commandConfig}) diff --git a/packages/app/src/cli/services/dev/fetch.test.ts b/packages/app/src/cli/services/dev/fetch.test.ts index b1681a5b016..4da383b379c 100644 --- a/packages/app/src/cli/services/dev/fetch.test.ts +++ b/packages/app/src/cli/services/dev/fetch.test.ts @@ -47,7 +47,6 @@ const FETCH_ORG_RESPONSE_VALUE = { { id: ORG1.id, businessName: ORG1.businessName, - betas: ORG1.betas, apps: {nodes: [APP1, APP2], pageInfo: {hasNextPage: false}}, stores: {nodes: [STORE1]}, }, @@ -60,7 +59,6 @@ const FETCH_STORE_RESPONSE_VALUE = { { id: ORG1.id, businessName: ORG1.businessName, - betas: ORG1.betas, website: ORG1.website, stores: {nodes: [STORE1]}, }, diff --git a/packages/app/src/cli/services/dev/output.test.ts b/packages/app/src/cli/services/dev/output.test.ts index 7bc9a2ec58b..8a97be910bd 100644 --- a/packages/app/src/cli/services/dev/output.test.ts +++ b/packages/app/src/cli/services/dev/output.test.ts @@ -18,8 +18,8 @@ afterEach(() => { describe('output', () => { describe('outputUpdateURLsResult', () => { const urls = { - applicationUrl: 'https://lala.ngrok.io/', - redirectUrlWhitelist: ['https://lala.ngrok.io/auth/callback'], + applicationUrl: 'https://lala.cloudflare.io/', + redirectUrlWhitelist: ['https://lala.cloudflare.io/auth/callback'], } test('shows info about tunnel URL and links to Partners Dashboard when app is brand new', async () => { diff --git a/packages/app/src/cli/services/dev/select-app.test.ts b/packages/app/src/cli/services/dev/select-app.test.ts index aa86582386b..1bc2289e90f 100644 --- a/packages/app/src/cli/services/dev/select-app.test.ts +++ b/packages/app/src/cli/services/dev/select-app.test.ts @@ -31,12 +31,10 @@ const LOCAL_APP: AppInterface = testApp({ const ORG1: Organization = { id: '1', businessName: 'org1', - betas: {}, } const ORG2: Organization = { id: '2', businessName: 'org2', - betas: {}, } const APP1 = testOrganizationApp({apiKey: 'key1'}) const APP2 = testOrganizationApp({ diff --git a/packages/app/src/cli/services/dev/select-store.test.ts b/packages/app/src/cli/services/dev/select-store.test.ts index f2c155de3c3..110a82112db 100644 --- a/packages/app/src/cli/services/dev/select-store.test.ts +++ b/packages/app/src/cli/services/dev/select-store.test.ts @@ -19,7 +19,6 @@ vi.mock('@shopify/cli-kit/node/context/spin') const ORG1: Organization = { id: '1', businessName: 'org1', - betas: {}, } const STORE1: OrganizationStore = { shopId: '1', diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 8e1de2d154d..3c590897e9d 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -5,9 +5,9 @@ import fs from 'fs' // In some cases (for example when we boot the proxy server), when an exception is // thrown, no 'exit' signal is sent to the process. We don't understand this fully. // This means that any cleanup code that depends on "process.on('exit', ...)" will -// not be called. The ngrok plugin is an example of that. Here we make sure to print +// not be called. The tunnel plugin is an example of that. Here we make sure to print // the error stack and manually call exit so that the cleanup code is called. This -// makes sure that there are no lingering ngrok processes. +// makes sure that there are no lingering tunnel processes. process.on('uncaughtException', (err) => { fs.writeSync(process.stderr.fd, `${err.stack}\n`) process.exit(1) diff --git a/packages/create-app/src/utils/template/npm.ts b/packages/create-app/src/utils/template/npm.ts index 38a516a870e..45bbb6786be 100644 --- a/packages/create-app/src/utils/template/npm.ts +++ b/packages/create-app/src/utils/template/npm.ts @@ -19,7 +19,6 @@ export async function updateCLIDependencies({packageJSON, local}: UpdateCLIDepen const cliPath = await packagePath('cli') const appPath = await packagePath('app') const cliKitPath = await packagePath('cli-kit') - const pluginNgrokPath = await packagePath('plugin-ngrok') const pluginCloudflarePath = await packagePath('plugin-cloudflare') const didYouMeanPath = await packagePath('plugin-did-you-mean') @@ -32,7 +31,6 @@ export async function updateCLIDependencies({packageJSON, local}: UpdateCLIDepen '@shopify/cli': cliPath, '@shopify/app': appPath, '@shopify/cli-kit': cliKitPath, - '@shopify/plugin-ngrok': pluginNgrokPath, '@shopify/plugin-did-you-mean': didYouMeanPath, '@shopify/plugin-cloudflare': pluginCloudflarePath, } diff --git a/packages/plugin-cloudflare/src/tunnel.ts b/packages/plugin-cloudflare/src/tunnel.ts index a47c9e949c9..04ecea90f26 100644 --- a/packages/plugin-cloudflare/src/tunnel.ts +++ b/packages/plugin-cloudflare/src/tunnel.ts @@ -150,7 +150,6 @@ function whatToTry() { items: [ ['Run the command again'], ['Add the flag', {command: '--tunnel-url {URL}'}, 'to use a custom tunnel URL'], - ['Add the flag', {command: '--tunnel ngrok'}, 'to use Ngrok as the tunnel provider'], ], }, }, diff --git a/packages/plugin-ngrok/CHANGELOG.md b/packages/plugin-ngrok/CHANGELOG.md deleted file mode 100644 index 07755decf4b..00000000000 --- a/packages/plugin-ngrok/CHANGELOG.md +++ /dev/null @@ -1,684 +0,0 @@ -# @shopify/plugin-ngrok - -## 3.47.0 - -### Patch Changes - -- Updated dependencies [ad3894aea] -- Updated dependencies [99df79caf] -- Updated dependencies [9bb98c029] -- Updated dependencies [ca2461e94] -- Updated dependencies [4ded88051] -- Updated dependencies [99fc03fbc] -- Updated dependencies [e217b34eb] - - @shopify/cli-kit@3.47.0 - -## 3.47.0-pre.0 - -### Patch Changes - -- Updated dependencies [ad3894aea] -- Updated dependencies [ca2461e94] -- Updated dependencies [4ded88051] - - @shopify/cli-kit@3.47.0-pre.0 - -## 3.46.0 - -### Patch Changes - -- Updated dependencies [d9ef6c3f6] -- Updated dependencies [33881af95] -- Updated dependencies [2729e3784] -- Updated dependencies [3b1da7747] -- Updated dependencies [a7c1eabeb] -- Updated dependencies [cc37858fb] -- Updated dependencies [1707ef75a] -- Updated dependencies [94d197f63] -- Updated dependencies [162504891] -- Updated dependencies [9e4c97b52] -- Updated dependencies [9de04da4d] -- Updated dependencies [f95e3a1d5] -- Updated dependencies [1c8afb7f4] -- Updated dependencies [151684a25] -- Updated dependencies [37b53a5be] -- Updated dependencies [01988114d] -- Updated dependencies [beda7c241] -- Updated dependencies [07d0be690] -- Updated dependencies [6663b3a8f] -- Updated dependencies [3169c1e44] -- Updated dependencies [069e38ecf] - - @shopify/cli-kit@3.46.0 - -## 3.46.0-pre.3 - -### Patch Changes - -- Updated dependencies [d9ef6c3f6] -- Updated dependencies [cc37858fb] -- Updated dependencies [1c8afb7f4] -- Updated dependencies [6663b3a8f] -- Updated dependencies [069e38ecf] - - @shopify/cli-kit@3.46.0-pre.3 - -## 3.46.0-pre.2 - -### Patch Changes - -- Updated dependencies [a7c1eabeb] -- Updated dependencies [162504891] -- Updated dependencies [151684a25] -- Updated dependencies [01988114d] - - @shopify/cli-kit@3.46.0-pre.2 - -## 3.46.0-pre.1 - -### Patch Changes - -- Updated dependencies [beda7c241] -- Updated dependencies [3169c1e44] - - @shopify/cli-kit@3.46.0-pre.1 - -## 3.46.0-pre.0 - -### Patch Changes - -- Updated dependencies [f95e3a1d5] - - @shopify/cli-kit@3.46.0-pre.0 - -## 3.45.0 - -### Patch Changes - -- Updated dependencies [da01d3595] -- Updated dependencies [1dd35b0b2] -- Updated dependencies [db5981a1e] -- Updated dependencies [7f8a9436d] -- Updated dependencies [d2a352442] -- Updated dependencies [25fc42ae2] -- Updated dependencies [fe32fb789] -- Updated dependencies [4d5cff225] -- Updated dependencies [a4b0953d9] -- Updated dependencies [6735253e6] -- Updated dependencies [d6f278863] -- Updated dependencies [ddb967914] -- Updated dependencies [c3d5ce5e6] -- Updated dependencies [e85f718cd] -- Updated dependencies [4bb549840] -- Updated dependencies [b2e066fc0] -- Updated dependencies [9c253511e] -- Updated dependencies [e6753f4ed] -- Updated dependencies [657593b1a] -- Updated dependencies [ce1457036] -- Updated dependencies [163df5e9a] -- Updated dependencies [b3ea29a21] -- Updated dependencies [2ca5b35d8] -- Updated dependencies [067199cf6] -- Updated dependencies [645b085b8] -- Updated dependencies [7153dff92] - - @shopify/cli-kit@3.45.0 - -## 3.45.0-pre.5 - -### Patch Changes - -- Updated dependencies [da01d3595] -- Updated dependencies [6735253e6] -- Updated dependencies [e85f718cd] -- Updated dependencies [e6753f4ed] -- Updated dependencies [645b085b8] - - @shopify/cli-kit@3.45.0-pre.5 - -## 3.45.0-pre.4 - -### Patch Changes - -- Updated dependencies [ce1457036] -- Updated dependencies [2ca5b35d8] - - @shopify/cli-kit@3.45.0-pre.4 - -## 3.45.0-pre.3 - -### Patch Changes - -- Updated dependencies [ddb967914] -- Updated dependencies [7153dff92] - - @shopify/cli-kit@3.45.0-pre.3 - -## 3.45.0-pre.2 - -### Patch Changes - -- Updated dependencies [9c253511e] - - @shopify/cli-kit@3.45.0-pre.2 - -## 3.45.0-pre.1 - -### Patch Changes - -- Updated dependencies [1dd35b0b2] -- Updated dependencies [db5981a1e] -- Updated dependencies [7f8a9436d] -- Updated dependencies [fe32fb789] -- Updated dependencies [4d5cff225] -- Updated dependencies [a4b0953d9] -- Updated dependencies [d6f278863] -- Updated dependencies [c3d5ce5e6] -- Updated dependencies [b3ea29a21] -- Updated dependencies [067199cf6] - - @shopify/cli-kit@3.45.0-pre.1 - -## 3.44.1-pre.0 - -### Patch Changes - -- Updated dependencies [25fc42ae2] -- Updated dependencies [b2e066fc0] -- Updated dependencies [657593b1a] - - @shopify/cli-kit@3.44.1-pre.0 - -## 3.44.0 - -### Patch Changes - -- Updated dependencies [999a2fc79] -- Updated dependencies [b61c5972c] -- Updated dependencies [d44250676] -- Updated dependencies [c8e75ac24] -- Updated dependencies [fb22cb013] -- Updated dependencies [159df5d07] -- Updated dependencies [2def6f113] -- Updated dependencies [ef3846d91] -- Updated dependencies [3a75ed0a7] -- Updated dependencies [d2adeb5ec] - - @shopify/cli-kit@3.44.0 - -## 3.43.0 - -### Patch Changes - -- Updated dependencies [f732207fa] -- Updated dependencies [4b0cc57ce] -- Updated dependencies [b6f93cfa7] - - @shopify/cli-kit@3.43.0 - -## 3.42.0 - -### Patch Changes - -- Updated dependencies [2203d4e6f] - - @shopify/cli-kit@3.42.0 - -## 3.41.2 - -### Patch Changes - -- @shopify/cli-kit@3.41.2 - -## 3.41.1 - -### Patch Changes - -- @shopify/cli-kit@3.41.1 - -## 3.41.0 - -### Patch Changes - -- Updated dependencies [9d9480341] - - @shopify/cli-kit@3.41.0 - -## 3.40.3 - -### Patch Changes - -- @shopify/cli-kit@3.40.3 - -## 3.40.2 - -### Patch Changes - -- Updated dependencies [7c0b13944] -- Updated dependencies [7ca9a667d] - - @shopify/cli-kit@3.40.2 - -## 3.40.1 - -### Patch Changes - -- @shopify/cli-kit@3.40.1 - -## 3.40.0 - -### Patch Changes - -- 228328a6d: Remove old `ui` module from cli-kit exports -- Updated dependencies [91e15fed4] -- Updated dependencies [cfb4b7f68] -- Updated dependencies [9e74a9fc0] -- Updated dependencies [1661f80a2] -- Updated dependencies [ae22dfbaf] -- Updated dependencies [7734a7ed3] -- Updated dependencies [5ba869fb2] -- Updated dependencies [228328a6d] -- Updated dependencies [c30eb6978] - - @shopify/cli-kit@3.40.0 - -## 3.39.0 - -### Patch Changes - -- Updated dependencies [afe541577] -- Updated dependencies [f4d5fb1a8] -- Updated dependencies [91a44020b] - - @shopify/cli-kit@3.39.0 - -## 3.38.0 - -### Patch Changes - -- @shopify/cli-kit@3.38.0 - -## 3.37.0 - -### Patch Changes - -- Updated dependencies [a5224543b] - - @shopify/cli-kit@3.37.0 - -## 3.36.2 - -### Patch Changes - -- Updated dependencies [3ddd21dba] - - @shopify/cli-kit@3.36.2 - -## 3.36.1 - -### Patch Changes - -- Updated dependencies [d81271abd] - - @shopify/cli-kit@3.36.1 - -## 3.36.0 - -### Patch Changes - -- Updated dependencies [c2a7c17e0] - - @shopify/cli-kit@3.36.0 - -## 3.35.0 - -### Patch Changes - -- Updated dependencies [50c0b2cd3] -- Updated dependencies [2aa5c07aa] -- Updated dependencies [1a482191a] -- Updated dependencies [a4f78e95f] - - @shopify/cli-kit@3.35.0 - -## 3.34.0 - -### Patch Changes - -- @shopify/cli-kit@3.34.0 - -## 3.33.0 - -### Patch Changes - -- Updated dependencies [eee1293ef] -- Updated dependencies [5e7474fab] -- Updated dependencies [9eb807bf7] - - @shopify/cli-kit@3.33.0 - -## 3.32.1 - -### Patch Changes - -- Updated dependencies [39315c3d0] - - @shopify/cli-kit@3.32.1 - -## 3.32.0 - -### Patch Changes - -- Updated dependencies [a8489366] -- Updated dependencies [00de42e8] - - @shopify/cli-kit@3.32.0 - -## 3.31.1 - -### Patch Changes - -- @shopify/cli-kit@3.31.1 - -## 3.31.0 - -### Patch Changes - -- Updated dependencies [80c6638c] -- Updated dependencies [dcf53ece] - - @shopify/cli-kit@3.31.0 - -## 3.30.2 - -### Patch Changes - -- Updated dependencies [ba91a2da] -- Updated dependencies [23b1cc84] - - @shopify/cli-kit@3.30.2 - -## 3.30.1 - -### Patch Changes - -- Updated dependencies [2ac83ce6] - - @shopify/cli-kit@3.30.1 - -## 3.30.0 - -### Patch Changes - -- Updated dependencies [737ca469] - - @shopify/cli-kit@3.30.0 - -## 3.29.0 - -### Minor Changes - -- b549291a: Update @oclif/core to 1.21.0 - -### Patch Changes - -- Updated dependencies [eaf98706] -- Updated dependencies [d12ece22] -- Updated dependencies [aeca53c6] -- Updated dependencies [3b37c679] -- Updated dependencies [b549291a] -- Updated dependencies [06b6b00d] - - @shopify/cli-kit@3.29.0 - -## 3.28.0 - -### Patch Changes - -- @shopify/cli-kit@3.28.0 - -## 3.27.0 - -### Patch Changes - -- Updated dependencies [32bbe23d] - - @shopify/cli-kit@3.27.0 - -## 3.26.0 - -### Patch Changes - -- Updated dependencies [0d8ac8c9] -- Updated dependencies [ab76be51] -- Updated dependencies [a6a3f2b4] -- Updated dependencies [ca8141bc] - - @shopify/cli-kit@3.26.0 - -## 3.25.0 - -### Patch Changes - -- Updated dependencies [78196a78] - - @shopify/cli-kit@3.25.0 - -## 3.24.1 - -### Patch Changes - -- Updated dependencies [7e5c492a] - - @shopify/cli-kit@3.24.1 - -## 3.24.0 - -### Patch Changes - -- Updated dependencies [d47a6e80] -- Updated dependencies [a9d4be9e] -- Updated dependencies [aca90638] -- Updated dependencies [cb0990df] - - @shopify/cli-kit@3.24.0 - -## 3.23.0 - -### Patch Changes - -- Updated dependencies [c15ad5df] -- Updated dependencies [1ee1cfd1] - - @shopify/cli-kit@3.23.0 - -## 3.22.1 - -### Patch Changes - -- @shopify/cli-kit@3.22.1 - -## 3.22.0 - -### Patch Changes - -- Updated dependencies [e0b5c20b] -- Updated dependencies [6de19ebd] -- Updated dependencies [6c0cd13d] -- Updated dependencies [7035d36b] - - @shopify/cli-kit@3.22.0 - -## 3.21.0 - -### Patch Changes - -- e4352f2e: Do not report handled tunnel plugin errors to Bugsnag -- Updated dependencies [e4352f2e] -- Updated dependencies [c906187f] -- Updated dependencies [5cda6300] - - @shopify/cli-kit@3.21.0 - -## 3.20.1 - -### Patch Changes - -- Updated dependencies [3f285ff9] - - @shopify/cli-kit@3.20.1 - -## 3.20.0 - -### Patch Changes - -- Updated dependencies [96d5b175] -- Updated dependencies [0a8ee2a3] -- Updated dependencies [efa5b071] -- Updated dependencies [4bd05555] - - @shopify/cli-kit@3.20.0 - -## 3.19.0 - -### Patch Changes - -- Updated dependencies [7bb5c23f] - - @shopify/cli-kit@3.19.0 - -## 3.18.0 - -### Patch Changes - -- ef42fda6: Improve error outputs by using the new Banner component -- Updated dependencies [ef42fda6] -- Updated dependencies [514f2cb5] -- Updated dependencies [1455ee44] -- Updated dependencies [b4dafa4f] -- Updated dependencies [65625f47] -- Updated dependencies [0d674d64] - - @shopify/cli-kit@3.18.0 - -## 3.17.0 - -### Patch Changes - -- Updated dependencies [dac186b2] -- Updated dependencies [5617050a] -- Updated dependencies [5703ce9b] -- Updated dependencies [483318aa] - - @shopify/cli-kit@3.17.0 - -## 3.16.3 - -### Patch Changes - -- Updated dependencies [fc4d6c58] - - @shopify/cli-kit@3.16.3 - -## 3.16.2 - -### Patch Changes - -- Updated dependencies [ca6c7295] - - @shopify/cli-kit@3.16.2 - -## 3.16.1 - -### Patch Changes - -- @shopify/cli-kit@3.16.1 - -## 3.16.0 - -### Patch Changes - -- Updated dependencies [d460e738] - - @shopify/cli-kit@3.16.0 - -## 3.15.0 - -### Patch Changes - -- Updated dependencies [9f7d90d9] - - @shopify/cli-kit@3.15.0 - -## 3.14.0 - -### Patch Changes - -- Updated dependencies [1dba11ec] - - @shopify/cli-kit@3.14.0 - -## 3.13.1 - -### Patch Changes - -- Updated dependencies [81d3ca50] - - @shopify/cli-kit@3.13.1 - -## 3.13.0 - -### Patch Changes - -- Updated dependencies [a979c0de] -- Updated dependencies [afa808cb] -- Updated dependencies [a225e415] -- Updated dependencies [5336b01f] -- Updated dependencies [2239cad9] - - @shopify/cli-kit@3.13.0 - -## 3.12.0 - -### Patch Changes - -- Updated dependencies [454641be] - - @shopify/cli-kit@3.12.0 - -## 3.11.0 - -### Patch Changes - -- Updated dependencies [38dedc05] -- Updated dependencies [79508f56] -- Updated dependencies [922c204e] -- Updated dependencies [ddbf7ee4] - - @shopify/cli-kit@3.11.0 - -## 3.10.1 - -### Patch Changes - -- Updated dependencies [f04ec835] -- Updated dependencies [b23e0461] - - @shopify/cli-kit@3.10.1 - -## 3.10.0 - -### Minor Changes - -- fcbcfcfa: Add ngrok plugin to the CLI repo - -### Patch Changes - -- Updated dependencies [4c8853f1] - - @shopify/cli-kit@3.10.0 - -## 0.2.9 - -### Patch Changes - -- db58402: Turn peerDependencies into dependencies - -## 0.2.8 - -### Patch Changes - -- 8935a29: Install ngrok library from npm instead of github - -## 0.2.7 - -### Patch Changes - -- 9935bcc: Actionable help for common Ngrok errors - -## 0.2.6 - -### Patch Changes - -- cc3da41: Switch to a library fork with some error improvements - -## 0.2.5 - -### Patch Changes - -- 12edbf3: Hide token input -- 12edbf3: Remove start command -- 12edbf3: Ask for the token when not provided as parameter with `ngrok auth` - -## 0.2.4 - -### Patch Changes - -- 6873fac: Improve Ngrok errors - -## 0.2.3 - -### Patch Changes - -- Upgrade cli-kit version to 2.0.1 - -## 0.2.2 - -### Patch Changes - -- Add support for Node 18 - -## 0.2.1 - -### Patch Changes - -- Fix wrong package - -## 0.2.0 - -### Minor Changes - -- d2cea50: Rename the plugin diff --git a/packages/plugin-ngrok/oclif.manifest.json b/packages/plugin-ngrok/oclif.manifest.json deleted file mode 100644 index 9d76766f9b4..00000000000 --- a/packages/plugin-ngrok/oclif.manifest.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "version": "3.47.0", - "commands": { - "ngrok:auth": { - "id": "ngrok:auth", - "description": "Saves a token to authenticate against ngrok. Visit https://dashboard.ngrok.com/signup to create an account.", - "strict": true, - "pluginName": "@shopify/plugin-ngrok", - "pluginAlias": "@shopify/plugin-ngrok", - "pluginType": "core", - "hidden": true, - "aliases": [], - "flags": {}, - "args": { - "token": { - "name": "token", - "required": true - } - } - } - } -} \ No newline at end of file diff --git a/packages/plugin-ngrok/package.json b/packages/plugin-ngrok/package.json deleted file mode 100644 index 93c2188f73c..00000000000 --- a/packages/plugin-ngrok/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "@shopify/plugin-ngrok", - "version": "3.47.0", - "description": "Enables the creation of ngrok tunnels from `shopify app dev`, allowing previews from any device", - "keywords": [ - "shopify", - "shopify-cli", - "shopify-partners" - ], - "bugs": { - "url": "https://github.com/Shopify/cli/issues" - }, - "license": "MIT", - "author": "Shopify", - "type": "module", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "files": [ - "/dist", - "/oclif.manifest.json" - ], - "scripts": { - "build": "nx build", - "clean": "nx clean", - "lint": "nx lint", - "lint:fix": "nx lint:fix", - "prepack": "cross-env NODE_ENV=production pnpm nx build && cp ../../README.md README.md", - "test": "nx run plugin-ngrok:test", - "test:watch": "nx test:watch", - "type-check": "nx type-check" - }, - "eslintConfig": { - "extends": [ - "../../.eslintrc.cjs" - ] - }, - "dependencies": { - "@oclif/core": "2.8.11", - "@shopify/cli-kit": "3.47.0", - "@shopify/ngrok": "4.3.2" - }, - "devDependencies": { - "@types/node": "14.18.53", - "vite": "^4.3.9", - "vitest": "^0.32.2" - }, - "engines": { - "node": ">=14.17.0" - }, - "os": [ - "darwin", - "linux", - "win32" - ], - "publishConfig": { - "@shopify:registry": "https://registry.npmjs.org", - "access": "public" - }, - "engine-strict": true, - "oclif": { - "commands": "dist/commands", - "hooks": { - "tunnel_start": "dist/tunnel", - "tunnel_provider": "dist/provider" - } - } -} diff --git a/packages/plugin-ngrok/project.json b/packages/plugin-ngrok/project.json deleted file mode 100644 index 42af57cbc0f..00000000000 --- a/packages/plugin-ngrok/project.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "plugin-ngrok", - "root": "packages/plugin-ngrok", - "sourceRoot": "packages/plugin-ngrok/src", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "library", - "tags": ["scope:plugin"], - "targets": { - "clean": { - "executor": "nx:run-commands", - "options": { - "command": "pnpm rimraf dist/", - "cwd": "packages/plugin-ngrok" - } - }, - "build": { - "executor": "nx:run-commands", - "outputs": ["dist"], - "inputs": ["{projectRoot}/src/**/*", "{projectRoot}/package.json"], - "options": { - "command": "pnpm tsc -b ./tsconfig.build.json", - "cwd": "packages/plugin-ngrok" - } - }, - "lint": { - "executor": "nx:run-commands", - "options": { - "command": "pnpm eslint \"src/**/*.ts\"", - "cwd": "packages/plugin-ngrok" - } - }, - "lint:fix": { - "executor": "nx:run-commands", - "options": { - "command": "pnpm eslint 'src/**/*.ts' --fix", - "cwd": "packages/plugin-ngrok" - } - }, - "test": { - "executor": "nx:run-commands", - "dependsOn": ["^build"], - "options": { - "command": "pnpm vitest run", - "cwd": "packages/plugin-ngrok" - } - }, - "test:watch": { - "executor": "nx:run-commands", - "dependsOn": ["^build"], - "options": { - "command": "pnpm vitest watch", - "cwd": "packages/plugin-ngrok" - } - }, - "type-check": { - "executor": "nx:run-commands", - "options": { - "command": "pnpm tsc --noEmit", - "cwd": "packages/plugin-ngrok" - } - }, - "refresh-manifests": { - "executor": "nx:run-commands", - "options": { - "command": "pnpm oclif manifest", - "cwd": "packages/plugin-ngrok" - } - } - } -} diff --git a/packages/plugin-ngrok/src/commands/ngrok/auth.ts b/packages/plugin-ngrok/src/commands/ngrok/auth.ts deleted file mode 100644 index c1f4fa1b59e..00000000000 --- a/packages/plugin-ngrok/src/commands/ngrok/auth.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {authenticate} from '../../tunnel.js' -import {Args, Command} from '@oclif/core' -import {outputSuccess} from '@shopify/cli-kit/node/output' - -export default class NgrokAuth extends Command { - static description = - 'Saves a token to authenticate against ngrok. Visit https://dashboard.ngrok.com/signup to create an account.' - - static hidden = true - static args = {token: Args.string({required: true})} - - async run() { - const {args} = await this.parse(NgrokAuth) - await authenticate(args.token) - outputSuccess('Auth token saved') - } -} diff --git a/packages/plugin-ngrok/src/ngrok.d.ts b/packages/plugin-ngrok/src/ngrok.d.ts deleted file mode 100644 index 298706aebc6..00000000000 --- a/packages/plugin-ngrok/src/ngrok.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module '@shopify/ngrok' diff --git a/packages/plugin-ngrok/src/provider.ts b/packages/plugin-ngrok/src/provider.ts deleted file mode 100644 index 0698f0d43f0..00000000000 --- a/packages/plugin-ngrok/src/provider.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {defineProvider} from '@shopify/cli-kit/node/plugins/tunnel' - -export const TUNNEL_PROVIDER = 'ngrok' -export default defineProvider({name: TUNNEL_PROVIDER}) diff --git a/packages/plugin-ngrok/src/tunnel.test.ts b/packages/plugin-ngrok/src/tunnel.test.ts deleted file mode 100644 index f8f0a223a7e..00000000000 --- a/packages/plugin-ngrok/src/tunnel.test.ts +++ /dev/null @@ -1,150 +0,0 @@ -import {authenticate, hookStart} from './tunnel.js' -import {beforeEach, describe, expect, vi, test} from 'vitest' -import {platformAndArch} from '@shopify/cli-kit/node/os' -import ngrok from '@shopify/ngrok' -import {renderFatalError, renderTextPrompt} from '@shopify/cli-kit/node/ui' -import {AbortError} from '@shopify/cli-kit/node/error' - -const port = 1234 - -vi.mock('@shopify/ngrok') -vi.mock('@shopify/cli-kit/node/ui') - -vi.mock('@shopify/cli-kit/node/error', async () => { - const error: any = await vi.importActual('@shopify/cli-kit/node/error') - return { - ...error, - AbortError: vi.fn(), - } -}) -vi.mock('@shopify/cli-kit/node/os', async () => { - return { - platformAndArch: vi.fn(), - } -}) - -beforeEach(async () => { - vi.mocked(ngrok.connect).mockResolvedValue('https://fake.ngrok.io') - vi.mocked(ngrok.authtoken).mockResolvedValue(undefined) - vi.mocked(ngrok.validConfig).mockResolvedValue(true) - vi.mocked(ngrok.upgradeConfig).mockResolvedValue(undefined) -}) - -describe('start', () => { - test('creates a new tunnel on the given port', async () => { - // When - const got = await hookStart(port) - const status = got.valueOrBug().getTunnelStatus() - - // Then - expect(ngrok.connect).toHaveBeenCalledWith({proto: 'http', addr: 1234}) - expect(status).toEqual({status: 'connected', url: 'https://fake.ngrok.io'}) - }) - - test('asks for the token and authenticates if the configuration file is wrong', async () => { - // Given - vi.mocked(ngrok.validConfig).mockResolvedValue(false) - vi.mocked(renderTextPrompt).mockResolvedValue('123') - const authtokenSpy = vi.spyOn(ngrok, 'authtoken') - - // When - await hookStart(port) - - // Then - expect(authtokenSpy).toHaveBeenCalledWith('123') - }) - - test('outputs an error if the ngrok tunnel fails to start with a specific message', async () => { - // Given - vi.mocked(ngrok.connect).mockRejectedValue(new Error('Your account has been suspended')) - - // When - const got = await hookStart(port) - - // Then - expect(AbortError).toHaveBeenCalledWith( - 'The ngrok tunnel could not be started.\n\nYour account has been suspended', - undefined, - ) - expect(renderFatalError).toHaveBeenCalledWith(expect.any(AbortError)) - expect(got.isErr() && got.error.type).toEqual('unknown') - expect(got.isErr() && got.error.message).toEqual('Your account has been suspended') - }) - - test('outputs an error if the ngrok tunnel fails to start because of another tunnel is already running in a non windows platform', async () => { - // Given - vi.mocked(ngrok.connect).mockRejectedValue(new Error('error message contains code err_ngrok_108')) - vi.mocked(platformAndArch).mockReturnValue({platform: 'darwin', arch: 'arch'}) - - // When - const got = await hookStart(port) - - // Then - expect(AbortError).toHaveBeenCalledWith( - 'The ngrok tunnel could not be started.\n\nerror message contains code err_ngrok_108', - expect.stringContaining('Kill all the ngrok processes with \u001b[1m\u001b[33mkillall ngrok\u001b[39m\u001b[22m'), - ) - expect(renderFatalError).toHaveBeenCalledWith(expect.any(AbortError)) - expect(got.isErr() && got.error.type).toEqual('tunnel-already-running') - expect(got.isErr() && got.error.message).toEqual('error message contains code err_ngrok_108') - }) - - test('outputs an error if the ngrok tunnel fails to start because of another tunnel is already running in windows platform', async () => { - // Given - vi.mocked(ngrok.connect).mockRejectedValue(new Error('error message contains code err_ngrok_108')) - vi.mocked(platformAndArch).mockReturnValue({platform: 'windows', arch: 'arch'}) - - // When - const got = await hookStart(port) - - // Then - expect(AbortError).toHaveBeenCalledWith( - 'The ngrok tunnel could not be started.\n\nerror message contains code err_ngrok_108', - expect.stringContaining( - 'Kill all the ngrok processes with \u001b[1m\u001b[33mtaskkill /f /im ngrok.exe\u001b[39m\u001b[22m', - ), - ) - expect(renderFatalError).toHaveBeenCalledWith(expect.any(AbortError)) - expect(got.isErr() && got.error.type).toEqual('tunnel-already-running') - expect(got.isErr() && got.error.message).toEqual('error message contains code err_ngrok_108') - }) - - test.each(['err_ngrok_105', 'err_ngrok_106', 'err_ngrok_107'])( - 'outputs an error if the ngrok tunnel fails to start because of a %p token problem', - async (ngrokError: string) => { - // Given - vi.mocked(ngrok.connect).mockRejectedValue(new Error(`error message contains code ${ngrokError}`)) - - // When - const got = await hookStart(port) - - expect(AbortError).toHaveBeenCalledWith( - `The ngrok tunnel could not be started.\n\nerror message contains code ${ngrokError}`, - expect.stringContaining( - 'Update your ngrok token with \u001b[1m\u001b[33mshopify ngrok auth\u001b[39m\u001b[22m', - ), - ) - expect(renderFatalError).toHaveBeenCalledWith(expect.any(AbortError)) - expect(got.isErr() && got.error.type).toEqual('wrong-credentials') - expect(got.isErr() && got.error.message).not.toBeUndefined() - }, - ) -}) - -describe('authenticate', () => { - test('calls the authenticate method from tunnel with the expected token', async () => { - // When - await authenticate('token') - - // Then - expect(ngrok.authtoken).toHaveBeenCalledWith('token') - }) - - test('calls the upgradeConfig method from tunnel', async () => { - // When - await authenticate('token') - - // Then - expect(ngrok.upgradeConfig).toHaveBeenCalled() - }) -}) diff --git a/packages/plugin-ngrok/src/tunnel.ts b/packages/plugin-ngrok/src/tunnel.ts deleted file mode 100644 index c90e9226c88..00000000000 --- a/packages/plugin-ngrok/src/tunnel.ts +++ /dev/null @@ -1,92 +0,0 @@ -import {TUNNEL_PROVIDER} from './provider.js' -import {platformAndArch} from '@shopify/cli-kit/node/os' -import {startTunnel, TunnelError, TunnelErrorType, TunnelStartReturn} from '@shopify/cli-kit/node/plugins/tunnel' -import ngrok from '@shopify/ngrok' -import {renderFatalError, renderTextPrompt} from '@shopify/cli-kit/node/ui' -import {err, ok} from '@shopify/cli-kit/node/result' -import {AbortError} from '@shopify/cli-kit/node/error' -import {outputToken, outputInfo, outputContent} from '@shopify/cli-kit/node/output' - -export default startTunnel({provider: TUNNEL_PROVIDER, action: hookStart}) - -// New entry point for hooks -export async function hookStart(port: number): Promise { - try { - const url = await start({port}) - return ok({ - getTunnelStatus: () => { - return {status: 'connected', url} - }, - stopTunnel: () => ngrok.kill(), - provider: TUNNEL_PROVIDER, - port, - }) - // eslint-disable-next-line no-catch-all/no-catch-all, @typescript-eslint/no-explicit-any - } catch (error: any) { - const errorType = getErrorType(error.message) - renderFatalError( - new AbortError(`The ngrok tunnel could not be started.\n\n${error.message}`, buildTryMessage(errorType)), - ) - const tunnelError = new TunnelError(errorType, error.message) - return err(tunnelError) - } -} - -// Old entry point, backwards compatible with old CLI versions -export async function start(options: {port: number}): Promise { - if (!(await ngrok.validConfig())) { - const token = await tokenPrompt() - await authenticate(token) - } - return ngrok.connect({proto: 'http', addr: options.port}) -} - -export async function authenticate(token: string): Promise { - const validToken = token ?? (await tokenPrompt(false)) - await ngrok.authtoken(validToken) - await ngrok.upgradeConfig() -} - -async function tokenPrompt(showExplanation = true): Promise { - const explanation = showExplanation - ? '\nTo make your local code accessible to your dev store, you need to use a ' + - 'Shopify-trusted tunneling service called ngrok. ' - : '' - const ngrokURL = 'https://dashboard.ngrok.com/get-started/your-authtoken' - const link = outputToken.link(ngrokURL, ngrokURL) - outputInfo(outputContent`${explanation}To sign up and get an auth token: ${link}\n`) - - return renderTextPrompt({ - password: true, - message: 'Enter your ngrok token', - validate: (value) => { - if (value.length === 0) { - return "Token can't be empty" - } - }, - }) -} - -function buildTryMessage(errorType: TunnelErrorType): string | undefined { - if (errorType === 'tunnel-already-running') { - const {platform} = platformAndArch() - const tryMessage = 'Kill all the ngrok processes with ' - if (platform === 'windows') { - return tryMessage.concat(outputContent`${outputToken.genericShellCommand('taskkill /f /im ngrok.exe')}`.value) - } else { - return tryMessage.concat(outputContent`${outputToken.genericShellCommand('killall ngrok')}`.value) - } - } else if (errorType === 'wrong-credentials') { - return outputContent`Update your ngrok token with ${outputToken.genericShellCommand('shopify ngrok auth')}`.value - } - return undefined -} - -function getErrorType(nrokErrorMessage: string): TunnelErrorType { - if (/err_ngrok_108/.test(nrokErrorMessage)) { - return 'tunnel-already-running' - } else if (/err_ngrok_105|err_ngrok_106|err_ngrok_107/.test(nrokErrorMessage)) { - return 'wrong-credentials' - } - return 'unknown' -} diff --git a/packages/plugin-ngrok/tsconfig.build.json b/packages/plugin-ngrok/tsconfig.build.json deleted file mode 100644 index 16506ad61a2..00000000000 --- a/packages/plugin-ngrok/tsconfig.build.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["**/*.test.ts"], - "references": [ - {"path": "../cli-kit"} - ] -} diff --git a/packages/plugin-ngrok/tsconfig.json b/packages/plugin-ngrok/tsconfig.json deleted file mode 100644 index ea7490fa22f..00000000000 --- a/packages/plugin-ngrok/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../configurations/tsconfig.json", - "include": ["./src/**/*.ts"], - "exclude": ["./dist"], - "compilerOptions": { - "outDir": "dist", - "rootDir": "src", - "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" - }, - "references": [ - {"path": "../cli-kit"} - ] -} diff --git a/packages/plugin-ngrok/vite.config.ts b/packages/plugin-ngrok/vite.config.ts deleted file mode 100644 index 9536586ca45..00000000000 --- a/packages/plugin-ngrok/vite.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import config from '../../configurations/vite.config' - -export default config(__dirname) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3cd99418f96..bb432164334 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -166,9 +166,6 @@ importers: '@shopify/plugin-cloudflare': specifier: 3.47.0 version: link:../plugin-cloudflare - '@shopify/plugin-ngrok': - specifier: 3.47.0 - version: link:../plugin-ngrok abort-controller: specifier: 3.0.0 version: 3.0.0 @@ -669,28 +666,6 @@ importers: specifier: ^0.32.2 version: 0.32.2(jsdom@20.0.3) - packages/plugin-ngrok: - dependencies: - '@oclif/core': - specifier: 2.1.4 - version: 2.1.4 - '@shopify/cli-kit': - specifier: 3.47.0 - version: link:../cli-kit - '@shopify/ngrok': - specifier: 4.3.2 - version: 4.3.2 - devDependencies: - '@types/node': - specifier: 14.18.53 - version: 14.18.53 - vite: - specifier: 4.3.6 - version: 4.3.6(@types/node@14.18.53)(sass@1.63.6) - vitest: - specifier: ^0.32.2 - version: 0.32.2(jsdom@20.0.3) - packages/theme: dependencies: '@oclif/core': @@ -4268,24 +4243,6 @@ packages: engines: {node: '>=12.14.0'} dev: false - /@shopify/ngrok@4.3.2: - resolution: {integrity: sha512-Kz+tg6PavJGTKVOVd1AExm1MH1zVyE3lHWwnRBWIR/+uMxPmob9kp4bRlo4/270qWfGLNiY96TJgByVEm4Q9/g==} - engines: {node: '>=10.19.0 <14 || >=14.2'} - hasBin: true - requiresBuild: true - dependencies: - '@types/node': 8.10.66 - extract-zip: 2.0.1 - got: 11.8.6 - lodash.clonedeep: 4.5.0 - uuid: 8.3.2 - yaml: 1.10.2 - optionalDependencies: - hpagent: 0.1.2 - transitivePeerDependencies: - - supports-color - dev: false - /@shopify/polaris-icons@4.23.0: resolution: {integrity: sha512-70iT2GNXVASA7jPtuKTsPKoq82Ws/x9Nu1sGuTnvchQpeltFG9oJEu/1r9AuTS05dQoM6fivnOCxZGy5XnCFqw==} dev: false @@ -4375,6 +4332,7 @@ packages: /@sindresorhus/is@4.6.0: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} + dev: true /@sindresorhus/is@5.3.0: resolution: {integrity: sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==} @@ -4386,6 +4344,7 @@ packages: engines: {node: '>=10'} dependencies: defer-to-connect: 2.0.1 + dev: true /@szmarczak/http-timer@5.0.1: resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} @@ -4460,6 +4419,7 @@ packages: '@types/keyv': 3.1.4 '@types/node': 14.18.53 '@types/responselike': 1.0.0 + dev: true /@types/chai-subset@1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} @@ -4574,6 +4534,7 @@ packages: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: '@types/node': 14.18.53 + dev: true /@types/lodash-es@4.17.7: resolution: {integrity: sha512-z0ptr6UI10VlU6l5MYhGwS4mC8DZyYer2mCoyysZtSF7p26zOX8UpbrV0YpNYLGS8K4PUFIyEr62IMFFjveSiQ==} @@ -4616,10 +4577,6 @@ packages: resolution: {integrity: sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==} dev: true - /@types/node@8.10.66: - resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} - dev: false - /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true @@ -4659,6 +4616,7 @@ packages: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: '@types/node': 14.18.53 + dev: true /@types/rimraf@3.0.2: resolution: {integrity: sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==} @@ -4712,14 +4670,6 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@types/yauzl@2.10.0: - resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} - requiresBuild: true - dependencies: - '@types/node': 14.18.53 - dev: false - optional: true - /@typescript-eslint/eslint-plugin@5.60.1(@typescript-eslint/parser@5.60.1)(eslint@8.44.0)(typescript@4.9.5): resolution: {integrity: sha512-KSWsVvsJsLJv3c4e73y/Bzt7OpqMCADUO846bHcuWYSYM19bldbAeDv7dYyV0jwkbMfJ2XdlzwjhXtuD7OY6bw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6020,6 +5970,7 @@ packages: /cacheable-lookup@5.0.4: resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} engines: {node: '>=10.6.0'} + dev: true /cacheable-lookup@7.0.0: resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==} @@ -6050,6 +6001,7 @@ packages: lowercase-keys: 2.0.0 normalize-url: 6.1.0 responselike: 2.0.1 + dev: true /cachedir@2.3.0: resolution: {integrity: sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==} @@ -6315,6 +6267,7 @@ packages: resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} dependencies: mimic-response: 1.0.1 + dev: true /clone-stats@1.0.0: resolution: {integrity: sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==} @@ -7833,20 +7786,6 @@ packages: engines: {node: ^10.17.0 || ^12.0.0 || >= 13.7.0} dev: false - /extract-zip@2.0.1: - resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} - engines: {node: '>= 10.17.0'} - hasBin: true - dependencies: - debug: 4.3.4(supports-color@8.1.1) - get-stream: 5.2.0 - yauzl: 2.10.0 - optionalDependencies: - '@types/yauzl': 2.10.0 - transitivePeerDependencies: - - supports-color - dev: false - /extsprintf@1.4.1: resolution: {integrity: sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==} engines: {'0': node >=0.6.0} @@ -7909,12 +7848,6 @@ packages: dependencies: reusify: 1.0.4 - /fd-slicer@1.1.0: - resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} - dependencies: - pend: 1.2.0 - dev: false - /fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -8265,6 +8198,7 @@ packages: engines: {node: '>=8'} dependencies: pump: 3.0.0 + dev: true /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} @@ -8433,6 +8367,7 @@ packages: lowercase-keys: 2.0.0 p-cancelable: 2.1.1 responselike: 2.0.1 + dev: true /got@12.6.0: resolution: {integrity: sha512-WTcaQ963xV97MN3x0/CbAriXFZcXCfgxVp91I+Ze6pawQOa7SgzwSx2zIJJsX+kTajMnVs0xcFD1TxZKFqhdnQ==} @@ -8616,12 +8551,6 @@ packages: lru-cache: 7.18.3 dev: true - /hpagent@0.1.2: - resolution: {integrity: sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ==} - requiresBuild: true - dev: false - optional: true - /html-encoding-sniffer@3.0.0: resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} engines: {node: '>=12'} @@ -8699,6 +8628,7 @@ packages: dependencies: quick-lru: 5.1.1 resolve-alpn: 1.2.1 + dev: true /http2-wrapper@2.2.0: resolution: {integrity: sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==} @@ -9727,6 +9657,7 @@ packages: /lowercase-keys@2.0.0: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} + dev: true /lowercase-keys@3.0.0: resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} @@ -9984,6 +9915,7 @@ packages: /mimic-response@1.0.1: resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} engines: {node: '>=4'} + dev: true /mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} @@ -10375,6 +10307,7 @@ packages: /normalize-url@6.1.0: resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} engines: {node: '>=10'} + dev: true /normalize-url@8.0.0: resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==} @@ -10804,6 +10737,7 @@ packages: /p-cancelable@2.1.1: resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} engines: {node: '>=8'} + dev: true /p-cancelable@3.0.0: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} @@ -11100,10 +11034,6 @@ packages: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true - /pend@1.2.0: - resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} - dev: false - /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -11837,6 +11767,7 @@ packages: resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} dependencies: lowercase-keys: 2.0.0 + dev: true /responselike@3.0.0: resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==} @@ -13297,6 +13228,7 @@ packages: /uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true + dev: true /uuid@9.0.0: resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==} @@ -13856,6 +13788,7 @@ packages: /yaml@1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} + dev: true /yaml@2.3.0: resolution: {integrity: sha512-8/1wgzdKc7bc9E6my5wZjmdavHLvO/QOmLG1FBugblEvY4IXrLjlViIOmL24HthU042lWTDRO90Fz1Yp66UnMw==} @@ -13912,13 +13845,6 @@ packages: requiresBuild: true dev: false - /yauzl@2.10.0: - resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} - dependencies: - buffer-crc32: 0.2.13 - fd-slicer: 1.1.0 - dev: false - /yeoman-environment@3.18.3: resolution: {integrity: sha512-OF5C87D7QUDOe4Lo2QucPnqFz0V3dNvC7D5Up6kVxUZKrY3LtNM7JIFAb/rhfEp/lKlZ28Olrb/BYFTDHcJ2og==} engines: {node: '>=12.10.0'} @@ -14078,6 +14004,7 @@ packages: resolution: {directory: packages/eslint-plugin-cli, type: directory} id: file:packages/eslint-plugin-cli name: '@shopify/eslint-plugin-cli' + version: 3.45.0 peerDependencies: eslint: ^8.44.0 dependencies: diff --git a/tsconfig.json b/tsconfig.json index 3ddb1b69f5b..c5e53d07277 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,6 @@ {"path": "./packages/create-app"}, {"path": "./packages/ui-extensions-server-kit"}, {"path": "./packages/ui-extensions-test-utils"}, - {"path": "./packages/plugin-ngrok"}, {"path": "./packages/plugin-cloudflare"}, {"path": "./packages/plugin-did-you-mean"} ] diff --git a/vitest.workspace.json b/vitest.workspace.json index feed09c16ee..a34f6c8699d 100644 --- a/vitest.workspace.json +++ b/vitest.workspace.json @@ -4,7 +4,6 @@ "packages/cli-kit", "packages/plugin-cloudflare", "packages/plugin-did-you-mean", - "packages/plugin-ngrok", "packages/theme", "packages/ui-extensions-dev-console", "packages/ui-extensions-server-kit",