@shopify/cli 3.25.0 → 3.26.0
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/LICENSE +8 -0
- package/dist/cli/commands/editions.js +2 -1
- package/dist/cli/commands/editions.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/oclif.manifest.json +1 -0
- package/package.json +20 -15
- package/CHANGELOG.md +0 -980
package/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Copyright 2019-present, Shopify Inc.
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -79,12 +79,13 @@ export default class Editions extends Command {
|
|
|
79
79
|
}
|
|
80
80
|
Editions.description = 'Shopify editions';
|
|
81
81
|
Editions.hidden = true;
|
|
82
|
+
/* istanbul ignore next -- @preserve */
|
|
82
83
|
function unindent(value) {
|
|
83
84
|
const lines = value.split('\n');
|
|
84
85
|
// Remove empty lines at start and end
|
|
85
86
|
if (lines[0]?.trim() === '')
|
|
86
87
|
lines.shift();
|
|
87
|
-
if (lines.
|
|
88
|
+
if (lines[lines.length - 1]?.trim() === '')
|
|
88
89
|
lines.pop();
|
|
89
90
|
const nonEmptyLines = lines.filter((line) => line.trim().length > 0);
|
|
90
91
|
const numSpacesToCut = Math.min(...nonEmptyLines.map((line) => (/^[\s]*[^\s]/.exec(line)?.[0]?.length || 1) - 1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editions.js","sourceRoot":"","sources":["../../../src/cli/commands/editions.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,oCAAoC,CAAA;AACxD,OAAO,EAAC,MAAM,EAAE,EAAE,EAAC,MAAM,kBAAkB,CAAA;AAI3C,MAAM,WAAW,GAAkD;IACjE,GAAG,EAAE,GAAG,EAAE;QACR,MAAM,CAAC,IAAI,CACT,QAAQ,CAAC;;;;OAIR,CAAC,CACH,CAAA;QACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAA,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,4DAA4D,CAAC,EAAE,CAAC,CAAA;IACnH,CAAC;IACD,QAAQ,EAAE,GAAG,EAAE;QACb,MAAM,CAAC,IAAI,CACT,QAAQ,CAAC;;;;OAIR,CAAC,CACH,CAAA;QACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAA,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,4DAA4D,CAAC,EAAE,CAAC,CAAA;IACnH,CAAC;IACD,QAAQ,EAAE,GAAG,EAAE;QACb,MAAM,CAAC,IAAI,CACT,QAAQ,CAAC;;;;OAIR,CAAC,CACH,CAAA;QACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnB,MAAM,CAAC,IAAI,CAAC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IACpE,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACjH,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACnE,CAAC","sourcesContent":["import Command from '@shopify/cli-kit/node/base-command'\nimport {output, ui} from '@shopify/cli-kit'\n\ntype Choice = 'bfs' | 'hydrogen' | 'devtools'\n\nconst subcommands: {[key in Choice]: () => void | Promise<void>} = {\n bfs: () => {\n output.info(\n unindent(`\n - Built for Shopify: Build great commerce apps that look and perform like they’re part of Shopify\n - Shopify Functions: New ways to extend Shopify: Build custom discounts, shipping, and payments\n - Checkout Extensibility: Apps for checkout are here: Powerful customizations that work with Shop Pay\n `),\n )\n output.info(`\\n\\n`)\n output.info(output.content`${output.token.yellow('Read more here: https://shopify.com/editions/dev#chapter-1')}`)\n },\n devtools: () => {\n output.info(\n unindent(`\n - Developer Experience: Simplified updates to write and distribute an app\n - Embedded App Improvements: Offer a truly seamless app experience\n - Data Protection: Future-proof the apps you build\n `),\n )\n output.info(`\\n\\n`)\n output.info(output.content`${output.token.yellow('Read more here: https://shopify.com/editions/dev#chapter-2')}`)\n },\n hydrogen: () => {\n output.info(\n unindent(`\n - Hydrogen + Oxygen: The Shopify stack for headless commerce\n - Pixels: Intelligent interactions—powered by secure data\n - Marketplace Kit: Add commerce to any platform\n `),\n )\n output.info(`\\n\\n`)\n output.info(output.content`${output.token.yellow('Read more here: https://shopify.com/editions/dev#chapter-3')}`)\n },\n}\nexport default class Editions extends Command {\n static description = 'Shopify editions'\n static hidden = true\n\n async run(): Promise<void> {\n output.info(\n output.content`${output.token.green(\n unindent(`\n _____ __ _ ____ ______ ___ __ _\n / ___// /_ ____ ____ (_) __/_ __ / ____/___/ (_) /_(_)___ ____ _____\n \\\\__ \\\\/ __ \\\\/ __ \\\\/ __ \\\\/ / /_/ / / / / __/ / __ / / __/ / __ \\\\/ __ \\\\/ ___/\n ___/ / / / / /_/ / /_/ / / __/ /_/ / / /___/ /_/ / / /_/ / /_/ / / / (__ )\n /____/_/ /_/\\\\____/ .___/_/_/ \\\\__, / /_____/\\\\__,_/_/\\\\__/_/\\\\____/_/ /_/____/\n /_/ /____/\n ____ __ ___ __\n / __ \\\\___ _ __ / |/ /___ ____/ /__\n / / / / _ \\\\ | / / / /|_/ / __ \\\\/ __ / _ \\\\\n / /_/ / __/ |/ / / / / / /_/ / /_/ / __/\n /_____/\\\\___/|___/ /_/ /_/\\\\____/\\\\__,_/\\\\___/\n `),\n )}`,\n )\n\n output.info(\n unindent(`\n\n\n Welcome to Dev Mode for the Summer 2022 Edition\n https://shopify.com/editions/dev\n\n\n `),\n )\n\n const answer: {editionschoice: Choice} = await ui.prompt([\n {\n name: 'editionschoice',\n type: 'select',\n message: 'What are you looking to solve?',\n choices: [\n {\n value: 'bfs',\n name: 'NEW WAYS TO BUILD GREAT APPS',\n },\n {\n value: 'devtools',\n name: 'IMPROVED DEV TOOLS',\n },\n {\n value: 'hydrogen',\n name: 'NEXT LEVEL STOREFRONT BUILDING',\n },\n ],\n },\n ])\n\n await subcommands[answer.editionschoice]?.()\n output.info(`\\n\\n\\n`)\n }\n}\n\n/* istanbul ignore next -- @preserve */\nfunction unindent(value: string): string {\n const lines = value.split('\\n')\n // Remove empty lines at start and end\n if (lines[0]?.trim() === '') lines.shift()\n if (lines[lines.length - 1]?.trim() === '') lines.pop()\n const nonEmptyLines = lines.filter((line) => line.trim().length > 0)\n const numSpacesToCut = Math.min(...nonEmptyLines.map((line) => (/^[\\s]*[^\\s]/.exec(line)?.[0]?.length || 1) - 1))\n return lines.map((line) => line.slice(numSpacesToCut)).join('\\n')\n}\n"]}
|