@shopify/cli 3.35.0 → 3.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/kitchen-sink/async.d.ts +10 -0
- package/dist/cli/commands/kitchen-sink/async.js +14 -0
- package/dist/cli/commands/kitchen-sink/async.js.map +1 -0
- package/dist/cli/commands/kitchen-sink/banners.d.ts +10 -0
- package/dist/cli/commands/kitchen-sink/banners.js +14 -0
- package/dist/cli/commands/kitchen-sink/banners.js.map +1 -0
- package/dist/cli/commands/{kitchen-sink.d.ts → kitchen-sink/index.d.ts} +2 -1
- package/dist/cli/commands/kitchen-sink/index.js +20 -0
- package/dist/cli/commands/kitchen-sink/index.js.map +1 -0
- package/dist/cli/commands/kitchen-sink/prompts.d.ts +10 -0
- package/dist/cli/commands/kitchen-sink/prompts.js +14 -0
- package/dist/cli/commands/kitchen-sink/prompts.js.map +1 -0
- package/dist/cli/commands/upgrade.js +3 -3
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/services/kitchen-sink/async.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/async.js +49 -0
- package/dist/cli/services/kitchen-sink/async.js.map +1 -0
- package/dist/cli/services/kitchen-sink/banners.d.ts +1 -0
- package/dist/cli/services/{kitchen-sink.js → kitchen-sink/banners.js} +22 -68
- package/dist/cli/services/kitchen-sink/banners.js.map +1 -0
- package/dist/cli/services/kitchen-sink/prompts.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/prompts.js +90 -0
- package/dist/cli/services/kitchen-sink/prompts.js.map +1 -0
- package/dist/cli/services/upgrade.js +6 -4
- package/dist/cli/services/upgrade.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +9 -5
- package/dist/cli/commands/kitchen-sink.js +0 -15
- package/dist/cli/commands/kitchen-sink.js.map +0 -1
- package/dist/cli/services/kitchen-sink.d.ts +0 -1
- package/dist/cli/services/kitchen-sink.js.map +0 -1
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"3.
|
|
1
|
+
{"version":"3.36.1","commands":{"editions":{"id":"editions","description":"Shopify editions","strict":true,"pluginName":"@shopify/cli","pluginAlias":"@shopify/cli","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[]},"upgrade":{"id":"upgrade","description":"Upgrade the Shopify CLI.","strict":true,"pluginName":"@shopify/cli","pluginAlias":"@shopify/cli","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to your project directory.","hidden":false,"multiple":false}},"args":[]},"version":{"id":"version","description":"Shopify CLI version.","strict":true,"pluginName":"@shopify/cli","pluginAlias":"@shopify/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"auth:logout":{"id":"auth:logout","description":"Logout from Shopify.","strict":true,"pluginName":"@shopify/cli","pluginAlias":"@shopify/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"kitchen-sink:async":{"id":"kitchen-sink:async","description":"View the UI kit components that process async tasks","strict":true,"pluginName":"@shopify/cli","pluginAlias":"@shopify/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"kitchen-sink:banners":{"id":"kitchen-sink:banners","description":"View the UI kit components that display banners","strict":true,"pluginName":"@shopify/cli","pluginAlias":"@shopify/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"kitchen-sink":{"id":"kitchen-sink","description":"View all the available UI kit components","strict":true,"pluginName":"@shopify/cli","pluginAlias":"@shopify/cli","pluginType":"core","hidden":true,"aliases":["kitchen-sink all"],"flags":{},"args":[]},"kitchen-sink:prompts":{"id":"kitchen-sink:prompts","description":"View the UI kit components prompts","strict":true,"pluginName":"@shopify/cli","pluginAlias":"@shopify/cli","pluginType":"core","aliases":[],"flags":{},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.36.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A CLI tool to build for the Shopify platform",
|
|
6
6
|
"keywords": [
|
|
@@ -86,12 +86,12 @@
|
|
|
86
86
|
"@oclif/plugin-commands": "2.2.0",
|
|
87
87
|
"@oclif/plugin-help": "5.1.12",
|
|
88
88
|
"@oclif/plugin-plugins": "2.1.0",
|
|
89
|
-
"@shopify/cli-kit": "3.
|
|
89
|
+
"@shopify/cli-kit": "3.36.1"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@shopify/app": "3.
|
|
93
|
-
"@shopify/cli-hydrogen": "3.
|
|
94
|
-
"@shopify/theme": "3.
|
|
92
|
+
"@shopify/app": "3.36.1",
|
|
93
|
+
"@shopify/cli-hydrogen": "3.36.1",
|
|
94
|
+
"@shopify/theme": "3.36.1",
|
|
95
95
|
"@types/node": "14.17.0",
|
|
96
96
|
"@vitest/coverage-istanbul": "^0.26.3",
|
|
97
97
|
"vite": "^2.9.13",
|
|
@@ -138,6 +138,10 @@
|
|
|
138
138
|
},
|
|
139
139
|
"auth": {
|
|
140
140
|
"description": "Auth operations."
|
|
141
|
+
},
|
|
142
|
+
"kitchen-sink": {
|
|
143
|
+
"description": "View the available UI kit components.",
|
|
144
|
+
"hidden": true
|
|
141
145
|
}
|
|
142
146
|
},
|
|
143
147
|
"additionalHelpFlags": [
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { kitchenSink } from '../services/kitchen-sink.js';
|
|
2
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
3
|
-
/**
|
|
4
|
-
* This command is used to output all the UI components of the CLI.
|
|
5
|
-
* It's useful to test how they behave under different terminal sizes
|
|
6
|
-
* and to help update the documentation when they change.
|
|
7
|
-
*/
|
|
8
|
-
export default class KitchenSink extends Command {
|
|
9
|
-
async run() {
|
|
10
|
-
await kitchenSink();
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
KitchenSink.description = 'View all the available UI kit components';
|
|
14
|
-
KitchenSink.hidden = true;
|
|
15
|
-
//# sourceMappingURL=kitchen-sink.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kitchen-sink.js","sourceRoot":"","sources":["../../../src/cli/commands/kitchen-sink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAA;AACvD,OAAO,OAAO,MAAM,oCAAoC,CAAA;AAExD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAI9C,KAAK,CAAC,GAAG;QACP,MAAM,WAAW,EAAE,CAAA;IACrB,CAAC;;AALM,uBAAW,GAAG,0CAA0C,CAAA;AACxD,kBAAM,GAAG,IAAI,CAAA","sourcesContent":["import {kitchenSink} from '../services/kitchen-sink.js'\nimport Command from '@shopify/cli-kit/node/base-command'\n\n/**\n * This command is used to output all the UI components of the CLI.\n * It's useful to test how they behave under different terminal sizes\n * and to help update the documentation when they change.\n */\nexport default class KitchenSink extends Command {\n static description = 'View all the available UI kit components'\n static hidden = true\n\n async run(): Promise<void> {\n await kitchenSink()\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function kitchenSink(): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kitchen-sink.js","sourceRoot":"","sources":["../../../src/cli/services/kitchen-sink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAA;AACtC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,aAAa,GACd,MAAM,0BAA0B,CAAA;AAIjC,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,UAAU,CAAC;QACT,QAAQ,EAAE,sBAAsB;QAChC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAC,OAAO,EAAE,yBAAyB,EAAC,EA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EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;YAC3D,CAAC;SACF;KACF,CAAA;IAED,MAAM,WAAW,CAAC,KAAK,CAAC,CAAA;AAC1B,CAAC","sourcesContent":["import {error} from '@shopify/cli-kit'\nimport {\n renderConcurrent,\n renderFatalError,\n renderInfo,\n renderSelectPrompt,\n renderSuccess,\n renderTasks,\n renderTextPrompt,\n renderWarning,\n} from '@shopify/cli-kit/node/ui'\nimport {AbortSignal} from '@shopify/cli-kit/node/abort'\nimport {Writable} from 'stream'\n\nexport async function kitchenSink() {\n renderInfo({\n headline: 'CLI update available',\n body: ['Run', {command: 'npm run shopify upgrade'}, {char: '.'}],\n })\n\n renderInfo({\n headline: [\n \"To connect this project to your shopify store's inventory:\",\n {filePath: '/my-store/hydrogen.config.js'},\n 'with your store ID and Storefront API key.',\n ],\n body: [\n 'You can also try the following steps:',\n {\n list: {\n items: [\n ['Run', {command: 'shopify project connect'}],\n ['Run', {command: 'hydrogen start'}],\n ],\n },\n },\n ],\n })\n\n renderInfo({\n headline: [{userInput: 'my-app'}, 'initialized and ready to build.'],\n nextSteps: [\n [\n 'Run',\n {\n command: 'cd verification-app',\n },\n ],\n [\n 'To preview your project, run',\n {\n command: 'npm app dev',\n },\n ],\n [\n 'To add extensions, run',\n {\n command: 'npm generate extension',\n },\n ],\n ],\n reference: [\n [\n 'Run',\n {\n command: 'npm shopify help',\n },\n ],\n {\n link: {\n label: 'Dev docs',\n url: 'https://shopify.dev',\n },\n },\n ],\n })\n\n renderSuccess({\n headline: 'CLI updated.',\n body: 'You are now running version 3.47.',\n })\n\n renderSuccess({\n headline: 'Deployment successful.',\n body: 'Your extensions have been uploaded to your Shopify Partners Dashboard.',\n nextSteps: [\n {\n link: {\n label: 'See your deployment and set it live',\n url: 'https://partners.shopify.com/1797046/apps/4523695/deployments',\n },\n },\n ],\n })\n\n renderWarning({\n headline: 'You have reached your limit of checkout extensions for this app.',\n body: 'You can free up space for a new one by deleting an existing one.',\n })\n\n renderWarning({\n headline: 'Required access scope update.',\n body: 'The deadline for re-selecting your app scopes is May 1, 2022.',\n reference: [\n {\n link: {\n label: 'Dev docs',\n url: 'https://shopify.dev/app/scopes',\n },\n },\n ],\n })\n\n // Stack trace\n const somethingWentWrong = new error.Bug('Something went wrong.')\n\n somethingWentWrong.stack = `\n Error: Unexpected error\n at Module._compile (internal/modules/cjs/loader.js:1137:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)\n at Module.load (internal/modules/cjs/loader.js:985:32)\n at Function.Module._load (internal/modules/cjs/loader.js:878:14)\n`\n\n renderFatalError(somethingWentWrong)\n\n // Next Steps\n const nextSteps = [\n [\n 'Have you',\n {\n link: {\n label: 'created a Shopify Partners organization',\n url: 'https://partners.shopify.com/signup',\n },\n },\n {\n char: '?',\n },\n ],\n 'Have you confirmed your accounts from the emails you received?',\n [\n 'Need to connect to a different App or organization? Run the command again with',\n {\n command: '--reset',\n },\n ],\n ]\n\n renderFatalError(new error.Abort('No Organization found', undefined, nextSteps))\n\n await renderSelectPrompt({\n message: 'Associate your project with the org Castile Ventures?',\n choices: [\n {label: 'first', value: 'first', key: 'f'},\n {label: 'second', value: 'second', key: 's'},\n {label: 'third', value: 'third'},\n {label: 'fourth', value: 'fourth'},\n {label: 'fifth', value: 'fifth', group: 'Automations', key: 'a'},\n {label: 'sixth', value: 'sixth', group: 'Automations'},\n {label: 'seventh', value: 'seventh'},\n {label: 'eighth', value: 'eighth', group: 'Merchant Admin'},\n {label: 'ninth', value: 'ninth', group: 'Merchant Admin'},\n {label: 'tenth', value: 'tenth'},\n ],\n infoTable: {add: ['new-ext'], remove: ['integrated-demand-ext', 'order-discount']},\n })\n\n await renderTextPrompt({\n message: 'App project name (can be changed later)',\n placeholder: 'expansive commerce app',\n })\n\n // renderConcurrent at the end\n let backendPromiseResolve: () => void\n\n const backendPromise = new Promise<void>(function (resolve, _reject) {\n backendPromiseResolve = resolve\n })\n\n const backendProcess = {\n prefix: 'backend',\n action: async (stdout: Writable, _stderr: Writable, _signal: AbortSignal) => {\n stdout.write('first backend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('second backend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('third backend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n\n backendPromiseResolve()\n },\n }\n\n const frontendProcess = {\n prefix: 'frontend',\n action: async (stdout: Writable, _stderr: Writable, _signal: AbortSignal) => {\n await backendPromise\n\n stdout.write('first frontend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('second frontend message')\n await new Promise((resolve) => setTimeout(resolve, 1000))\n stdout.write('third frontend message')\n },\n }\n\n await renderConcurrent({processes: [backendProcess, frontendProcess]})\n\n // renderTasks\n const tasks = [\n {\n title: 'Installing dependencies',\n task: async () => {\n await new Promise((resolve) => setTimeout(resolve, 2000))\n },\n },\n {\n title: 'Downloading assets',\n task: async () => {\n await new Promise((resolve) => setTimeout(resolve, 2000))\n },\n },\n ]\n\n await renderTasks(tasks)\n}\n"]}
|