@shopify/cli 3.70.0 → 3.71.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/{chunk-DVTWERMH.js → chunk-24P2IYB3.js} +5 -5
- package/dist/{lib-CPSRXLFM.js → chunk-2HGYYNE5.js} +5 -2
- package/dist/{chunk-5OP2SA7G.js → chunk-2S2TOSUR.js} +214 -56
- package/dist/{chunk-I3IIDOBX.js → chunk-2ULUZCOJ.js} +3 -3
- package/dist/{chunk-PNN7RS7Y.js → chunk-3NSN5Z4N.js} +100 -11
- package/dist/{chunk-AT4IG4GJ.js → chunk-4BWP64T3.js} +9 -11
- package/dist/{chunk-SYRHCENA.js → chunk-4FXGYSQK.js} +2 -2
- package/dist/{chunk-PKE54TAY.js → chunk-5EH323MO.js} +7 -7
- package/dist/{chunk-JLK5OMFF.js → chunk-5RITYBXF.js} +2 -2
- package/dist/{chunk-47OJGAFT.js → chunk-6XIQQAII.js} +3 -3
- package/dist/{chunk-VFQMUAHB.js → chunk-DGICBICS.js} +4 -4
- package/dist/{chunk-335KXO4I.js → chunk-DN4PETPW.js} +7 -7
- package/dist/{chunk-MRDDDATQ.js → chunk-EIYEVKVE.js} +3 -3
- package/dist/{chunk-N2DEYZD6.js → chunk-EKRPU77H.js} +3 -3
- package/dist/{chunk-ZGHNMRBX.js → chunk-HSTSRNLJ.js} +121 -66
- package/dist/{chunk-MMQOVZDR.js → chunk-JJUWGFVJ.js} +5 -5
- package/dist/{chunk-MX4RJDBM.js → chunk-KYB6A4PE.js} +1 -2
- package/dist/{chunk-X6F3DHKX.js → chunk-L2JRQYNX.js} +2 -2
- package/dist/{chunk-GDYKHT64.js → chunk-L5QY66M5.js} +2805 -33
- package/dist/{chunk-XSMWYZDC.js → chunk-LFQTQLLB.js} +10 -10
- package/dist/{chunk-NH4U4X67.js → chunk-LVCMJDAE.js} +4 -4
- package/dist/{chunk-5QQTRGJ7.js → chunk-MU52LLEY.js} +4 -4
- package/dist/{chunk-43YGIE7Y.js → chunk-NGHX3OJ3.js} +2 -2
- package/dist/{chunk-NYFXBTWK.js → chunk-NZRMJMX6.js} +4 -4
- package/dist/{chunk-TCTXUAZT.js → chunk-O53RG2PS.js} +3 -3
- package/dist/{chunk-CBD6UXLA.js → chunk-OJOHMVV7.js} +5 -5
- package/dist/chunk-OSIMKPXN.js +104 -0
- package/dist/{chunk-N4X7XQWN.js → chunk-PGVLZNNX.js} +7 -3
- package/dist/{chunk-VHAXHYTL.js → chunk-PPETSPYI.js} +3 -3
- package/dist/{chunk-UOZCMFCN.js → chunk-RJ26EKJZ.js} +18 -13
- package/dist/{chunk-WN3FKMKB.js → chunk-RWUKHJPN.js} +14 -19
- package/dist/{chunk-ND6AGPC6.js → chunk-RYLVSBYA.js} +3 -3
- package/dist/{chunk-MH5JSAVK.js → chunk-SBXDGZUV.js} +3 -3
- package/dist/{chunk-BMNDAI5O.js → chunk-SQN45NED.js} +4 -4
- package/dist/{chunk-WI6MEN7U.js → chunk-TFYGB36T.js} +2 -2
- package/dist/{chunk-PJKCWDDX.js → chunk-TM56R4RM.js} +548 -550
- package/dist/{chunk-KYBCPKPL.js → chunk-V2IQ2QWA.js} +3 -3
- package/dist/{chunk-NEOIQ6PN.js → chunk-WNDN5FAY.js} +2 -2
- package/dist/{chunk-FDJVVEGH.js → chunk-WQY4NQRT.js} +4 -6
- package/dist/{chunk-LN444KRM.js → chunk-ZINX4YDI.js} +2 -2
- package/dist/{chunk-MQXHFQM3.js → chunk-ZPWQCUYD.js} +4 -4
- package/dist/cli/commands/auth/logout.js +18 -20
- package/dist/cli/commands/auth/logout.test.js +24 -26
- package/dist/cli/commands/cache/clear.js +17 -19
- package/dist/cli/commands/debug/command-flags.js +17 -19
- package/dist/cli/commands/docs/generate.js +17 -19
- package/dist/cli/commands/docs/generate.test.js +18 -20
- package/dist/cli/commands/help.js +17 -19
- package/dist/cli/commands/kitchen-sink/async.js +18 -20
- package/dist/cli/commands/kitchen-sink/async.test.js +19 -21
- package/dist/cli/commands/kitchen-sink/index.js +20 -22
- package/dist/cli/commands/kitchen-sink/index.test.js +23 -25
- package/dist/cli/commands/kitchen-sink/prompts.js +18 -20
- package/dist/cli/commands/kitchen-sink/prompts.test.js +19 -21
- package/dist/cli/commands/kitchen-sink/static.js +18 -20
- package/dist/cli/commands/kitchen-sink/static.test.js +19 -21
- package/dist/cli/commands/notifications/generate.js +18 -20
- package/dist/cli/commands/notifications/list.js +18 -20
- package/dist/cli/commands/search.js +18 -20
- package/dist/cli/commands/upgrade.js +18 -20
- package/dist/cli/commands/upgrade.test.js +1 -2
- package/dist/cli/commands/version.js +18 -20
- package/dist/cli/commands/version.test.js +19 -21
- package/dist/cli/services/commands/notifications.js +12 -14
- package/dist/cli/services/commands/search.js +8 -9
- package/dist/cli/services/commands/search.test.js +9 -10
- package/dist/cli/services/commands/version.js +9 -10
- package/dist/cli/services/commands/version.test.js +11 -12
- package/dist/cli/services/kitchen-sink/async.js +8 -9
- package/dist/cli/services/kitchen-sink/prompts.js +8 -9
- package/dist/cli/services/kitchen-sink/static.js +8 -9
- package/dist/cli/services/upgrade.js +9 -10
- package/dist/cli/services/upgrade.test.js +12 -13
- package/dist/configs/all.yml +15 -0
- package/dist/configs/recommended.yml +9 -0
- package/dist/{custom-oclif-loader-IZLFCRGJ.js → custom-oclif-loader-4ILBNUIN.js} +8 -9
- package/dist/data/filters.json +98 -3
- package/dist/data/latest.json +1 -1
- package/dist/data/manifest_theme.json +1 -0
- package/dist/data/objects.json +39 -1619
- package/dist/data/preset_blocks.json +78 -0
- package/dist/data/section.json +1 -42
- package/dist/data/shopify_system_translations.json +34 -7
- package/dist/data/tags.json +10 -0
- package/dist/data/theme_block.json +1 -19
- package/dist/{del-FEQWOMIX.js → del-K5ZJEWTD.js} +3 -3
- package/dist/{error-handler-DAI5HMQW.js → error-handler-VW3Z4CSO.js} +15 -17
- package/dist/hooks/postrun.js +13 -15
- package/dist/hooks/prerun.js +15 -19
- package/dist/index.js +19504 -17453
- package/dist/lib-PPXZBVZX.js +6 -0
- package/dist/{lib-JJXX7GH6.js → lib-XYCLX35G.js} +5 -5
- package/dist/{local-QD6GDUUE.js → local-42CRL4YR.js} +10 -9
- package/dist/{morph-FN23MJ2S.js → morph-SEECJQ2W.js} +2 -2
- package/dist/{node-4XKDIIJ7.js → node-RJUK5KNM.js} +19 -21
- package/dist/{node-package-manager-IEZ6F5VN.js → node-package-manager-6PHP23VI.js} +9 -10
- package/dist/{out-ZDSLKX4N.js → out-MHEKZJWS.js} +2 -2
- package/dist/{path-T2RCZTRE.js → path-5SZGULBR.js} +2 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-BUB4OWO7.js → ui-OIACULNZ.js} +8 -9
- package/dist/{workerd-DIIGDIHZ.js → workerd-MTYSNN63.js} +19 -21
- package/oclif.manifest.json +334 -131
- package/package.json +7 -8
- package/assets/demo-catalog.json +0 -655
- package/dist/assets/demo-catalog.json +0 -655
- package/dist/chunk-2PUMVRDO.js +0 -131
- package/dist/chunk-7GNQ7YY4.js +0 -116
- package/dist/chunk-E2SYFYJU.js +0 -58
- package/dist/chunk-NLUGD7PZ.js +0 -2731
- package/dist/chunk-P6ABWRKD.js +0 -59
- package/dist/chunk-QSUS3GJF.js +0 -3838
- package/dist/chunk-RUK73IAH.js +0 -312
- package/dist/chunk-T2GATXSP.js +0 -112
- package/dist/chunk-VT3VJHZ7.js +0 -45
- package/dist/chunk-XEDHKQZA.js +0 -116
- package/dist/cli/commands/demo/catalog.d.ts +0 -6
- package/dist/cli/commands/demo/catalog.js +0 -36
- package/dist/cli/commands/demo/generate-file.d.ts +0 -11
- package/dist/cli/commands/demo/generate-file.js +0 -37
- package/dist/cli/commands/demo/index.d.ts +0 -10
- package/dist/cli/commands/demo/index.js +0 -36
- package/dist/cli/commands/demo/print-ai-prompt.d.ts +0 -6
- package/dist/cli/commands/demo/print-ai-prompt.js +0 -37
- package/dist/cli/services/demo.d.ts +0 -26440
- package/dist/cli/services/demo.js +0 -25
- package/dist/cli/services/demo.test.js +0 -42
- package/dist/constants-QFFDI47A.js +0 -26
- package/dist/system-KSIGUX64.js +0 -29
package/dist/chunk-2PUMVRDO.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
base_command_default
|
|
3
|
-
} from "./chunk-335KXO4I.js";
|
|
4
|
-
import {
|
|
5
|
-
cacheClear
|
|
6
|
-
} from "./chunk-FDJVVEGH.js";
|
|
7
|
-
import {
|
|
8
|
-
isTruthy,
|
|
9
|
-
printEventsJson
|
|
10
|
-
} from "./chunk-PJKCWDDX.js";
|
|
11
|
-
import {
|
|
12
|
-
require_lib
|
|
13
|
-
} from "./chunk-CBD6UXLA.js";
|
|
14
|
-
import {
|
|
15
|
-
__toESM,
|
|
16
|
-
init_cjs_shims
|
|
17
|
-
} from "./chunk-POZ5MGPT.js";
|
|
18
|
-
|
|
19
|
-
// src/cli/commands/cache/clear.ts
|
|
20
|
-
init_cjs_shims();
|
|
21
|
-
|
|
22
|
-
// ../cli-kit/dist/public/node/cli.js
|
|
23
|
-
init_cjs_shims();
|
|
24
|
-
var import_core = __toESM(require_lib());
|
|
25
|
-
import { fileURLToPath } from "url";
|
|
26
|
-
async function warnIfOldNodeVersion() {
|
|
27
|
-
let nodeVersion = process.versions.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
|
|
28
|
-
if (nodeMajorVersion < 18) {
|
|
29
|
-
let { renderWarning } = await import("./ui-BUB4OWO7.js");
|
|
30
|
-
renderWarning({
|
|
31
|
-
headline: "Upgrade to a supported Node version now.",
|
|
32
|
-
body: [
|
|
33
|
-
`Node ${nodeMajorVersion} has reached end-of-life and poses security risks. When you upgrade to a`,
|
|
34
|
-
{
|
|
35
|
-
link: {
|
|
36
|
-
url: "https://nodejs.dev/en/about/previous-releases",
|
|
37
|
-
label: "supported version"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
{ char: "," },
|
|
41
|
-
"you'll be able to use Shopify CLI without interruption."
|
|
42
|
-
]
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function setupEnvironmentVariables(options) {
|
|
47
|
-
process.argv.includes("--verbose") && (process.env.DEBUG = process.env.DEBUG ?? "*"), options.development && (process.env.SHOPIFY_CLI_ENV = process.env.SHOPIFY_CLI_ENV ?? "development");
|
|
48
|
-
}
|
|
49
|
-
function forceNoColor() {
|
|
50
|
-
(process.argv.includes("--no-color") || isTruthy(process.env.NO_COLOR) || isTruthy(process.env.SHOPIFY_FLAG_NO_COLOR) || process.env.TERM === "dumb") && (process.env.FORCE_COLOR = "0");
|
|
51
|
-
}
|
|
52
|
-
async function runCLI(options) {
|
|
53
|
-
setupEnvironmentVariables(options), forceNoColor(), await warnIfOldNodeVersion();
|
|
54
|
-
let { errorHandler } = await import("./error-handler-DAI5HMQW.js"), { isDevelopment } = await import("./local-QD6GDUUE.js"), oclif = await import("./lib-JJXX7GH6.js"), { ShopifyConfig } = await import("./custom-oclif-loader-IZLFCRGJ.js");
|
|
55
|
-
isDevelopment() && (oclif.default.settings.debug = !0);
|
|
56
|
-
try {
|
|
57
|
-
let config = new ShopifyConfig({ root: fileURLToPath(options.moduleURL) });
|
|
58
|
-
await config.load(), await oclif.default.run(void 0, config), await oclif.default.flush(), printEventsJson();
|
|
59
|
-
} catch (error) {
|
|
60
|
-
return await errorHandler(error), oclif.default.Errors.handle(error);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
async function useLocalCLIIfDetected(filepath) {
|
|
64
|
-
let { environmentVariables } = await import("./constants-QFFDI47A.js"), { joinPath: join } = await import("./path-T2RCZTRE.js"), { exec } = await import("./system-KSIGUX64.js");
|
|
65
|
-
if (!isTruthy(process.env[environmentVariables.enableCliRedirect]) || isTruthy(process.env[environmentVariables.skipCliRedirect]) || process.env.npm_config_user_agent)
|
|
66
|
-
return !1;
|
|
67
|
-
let cliPackage = await localCliPackage();
|
|
68
|
-
if (!cliPackage)
|
|
69
|
-
return !1;
|
|
70
|
-
let correctExecutablePath = join(cliPackage.path, cliPackage.bin.shopify);
|
|
71
|
-
if (correctExecutablePath === filepath)
|
|
72
|
-
return !1;
|
|
73
|
-
try {
|
|
74
|
-
await exec(correctExecutablePath, process.argv.slice(2, process.argv.length), {
|
|
75
|
-
stdio: "inherit",
|
|
76
|
-
env: { [environmentVariables.skipCliRedirect]: "1" }
|
|
77
|
-
});
|
|
78
|
-
} catch (processError) {
|
|
79
|
-
process.exit(processError.exitCode);
|
|
80
|
-
}
|
|
81
|
-
return !0;
|
|
82
|
-
}
|
|
83
|
-
async function localCliPackage() {
|
|
84
|
-
let { captureOutput } = await import("./system-KSIGUX64.js"), npmListOutput = "", localShopifyCLI = {};
|
|
85
|
-
try {
|
|
86
|
-
npmListOutput = await captureOutput("npm", ["list", "@shopify/cli", "--json", "-l"]), localShopifyCLI = JSON.parse(npmListOutput);
|
|
87
|
-
} catch {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
...localShopifyCLI.peerDependencies,
|
|
92
|
-
...localShopifyCLI.devDependencies,
|
|
93
|
-
...localShopifyCLI.dependencies
|
|
94
|
-
}["@shopify/cli"];
|
|
95
|
-
}
|
|
96
|
-
var globalFlags = {
|
|
97
|
-
"no-color": import_core.Flags.boolean({
|
|
98
|
-
hidden: !1,
|
|
99
|
-
description: "Disable color output.",
|
|
100
|
-
env: "SHOPIFY_FLAG_NO_COLOR"
|
|
101
|
-
}),
|
|
102
|
-
verbose: import_core.Flags.boolean({
|
|
103
|
-
hidden: !1,
|
|
104
|
-
description: "Increase the verbosity of the output.",
|
|
105
|
-
env: "SHOPIFY_FLAG_VERBOSE"
|
|
106
|
-
})
|
|
107
|
-
};
|
|
108
|
-
function clearCache() {
|
|
109
|
-
cacheClear();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// src/cli/commands/cache/clear.ts
|
|
113
|
-
var ClearCache = class extends base_command_default {
|
|
114
|
-
static {
|
|
115
|
-
this.description = "Clear the CLI cache, used to store some API responses and handle notifications status";
|
|
116
|
-
}
|
|
117
|
-
static {
|
|
118
|
-
this.hidden = !0;
|
|
119
|
-
}
|
|
120
|
-
async run() {
|
|
121
|
-
clearCache();
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export {
|
|
126
|
-
runCLI,
|
|
127
|
-
useLocalCLIIfDetected,
|
|
128
|
-
globalFlags,
|
|
129
|
-
ClearCache
|
|
130
|
-
};
|
|
131
|
-
//# sourceMappingURL=chunk-2PUMVRDO.js.map
|
package/dist/chunk-7GNQ7YY4.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
require_zod_to_json_schema
|
|
3
|
-
} from "./chunk-QSUS3GJF.js";
|
|
4
|
-
import {
|
|
5
|
-
demoStepsSchema
|
|
6
|
-
} from "./chunk-RUK73IAH.js";
|
|
7
|
-
import {
|
|
8
|
-
base_command_default
|
|
9
|
-
} from "./chunk-335KXO4I.js";
|
|
10
|
-
import {
|
|
11
|
-
AbortError,
|
|
12
|
-
fileExists,
|
|
13
|
-
mkdir,
|
|
14
|
-
outputContent,
|
|
15
|
-
outputSuccess,
|
|
16
|
-
outputToken,
|
|
17
|
-
readFile,
|
|
18
|
-
renderAutocompletePrompt,
|
|
19
|
-
writeFile
|
|
20
|
-
} from "./chunk-PJKCWDDX.js";
|
|
21
|
-
import {
|
|
22
|
-
cwd,
|
|
23
|
-
joinPath,
|
|
24
|
-
resolvePath
|
|
25
|
-
} from "./chunk-T2GATXSP.js";
|
|
26
|
-
import {
|
|
27
|
-
require_lib
|
|
28
|
-
} from "./chunk-CBD6UXLA.js";
|
|
29
|
-
import {
|
|
30
|
-
__toESM,
|
|
31
|
-
init_cjs_shims
|
|
32
|
-
} from "./chunk-POZ5MGPT.js";
|
|
33
|
-
|
|
34
|
-
// src/cli/commands/demo/generate-file.ts
|
|
35
|
-
init_cjs_shims();
|
|
36
|
-
var import_zod_to_json_schema = __toESM(require_zod_to_json_schema(), 1), import_core = __toESM(require_lib(), 1);
|
|
37
|
-
import { createRequire } from "module";
|
|
38
|
-
var schemaFilename = "demo-schema.json", GenerateFile = class _GenerateFile extends base_command_default {
|
|
39
|
-
static {
|
|
40
|
-
this.description = "Create a command design file";
|
|
41
|
-
}
|
|
42
|
-
static {
|
|
43
|
-
this.summary = "Creates a JSON file alongside a JSON schema that will validate it";
|
|
44
|
-
}
|
|
45
|
-
static {
|
|
46
|
-
this.hidden = !0;
|
|
47
|
-
}
|
|
48
|
-
static {
|
|
49
|
-
this.flags = {
|
|
50
|
-
path: import_core.Flags.string({
|
|
51
|
-
hidden: !1,
|
|
52
|
-
description: "The directory for generating the demo file.",
|
|
53
|
-
env: "SHOPIFY_FLAG_PATH",
|
|
54
|
-
parse: async (input) => resolvePath(input),
|
|
55
|
-
default: async () => cwd()
|
|
56
|
-
}),
|
|
57
|
-
file: import_core.Flags.string({
|
|
58
|
-
hidden: !1,
|
|
59
|
-
description: "The name of the demo file.",
|
|
60
|
-
env: "SHOPIFY_FLAG_FILENAME",
|
|
61
|
-
required: !0,
|
|
62
|
-
validate: (input) => input === schemaFilename ? `The demo file can't be named ${schemaFilename}, as this is used for the schema file.` : !0
|
|
63
|
-
})
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
async run() {
|
|
67
|
-
let { flags } = await this.parse(_GenerateFile);
|
|
68
|
-
await mkdir(flags.path);
|
|
69
|
-
let demoFilePath = joinPath(flags.path, flags.file);
|
|
70
|
-
if (await fileExists(demoFilePath))
|
|
71
|
-
throw new AbortError(`The file ${demoFilePath} already exists.`);
|
|
72
|
-
let demoSchemaPath = joinPath(flags.path, schemaFilename), jsonSchema = import_zod_to_json_schema.default.default(demoStepsSchema, "demo-steps");
|
|
73
|
-
await Promise.all([
|
|
74
|
-
writeFile(demoSchemaPath, JSON.stringify(jsonSchema, null, 2)),
|
|
75
|
-
writeFile(
|
|
76
|
-
demoFilePath,
|
|
77
|
-
JSON.stringify(
|
|
78
|
-
{
|
|
79
|
-
$schema: `./${schemaFilename}`,
|
|
80
|
-
steps: await selectSteps()
|
|
81
|
-
},
|
|
82
|
-
null,
|
|
83
|
-
2
|
|
84
|
-
)
|
|
85
|
-
)
|
|
86
|
-
]), outputSuccess(outputContent`Created ${outputToken.path(demoFilePath)} and ${outputToken.path(demoSchemaPath)}`);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
async function selectSteps() {
|
|
90
|
-
let catalogFile = createRequire(import.meta.url).resolve("@shopify/cli/assets/demo-catalog.json"), { steps } = JSON.parse(await readFile(catalogFile)), selectedSteps = [];
|
|
91
|
-
for (; ; ) {
|
|
92
|
-
let stepSelection = await renderAutocompletePrompt({
|
|
93
|
-
message: "Add a step to the demo file",
|
|
94
|
-
choices: [
|
|
95
|
-
{
|
|
96
|
-
label: "I'm done",
|
|
97
|
-
value: "done"
|
|
98
|
-
},
|
|
99
|
-
...steps.map(({ title, type }) => ({
|
|
100
|
-
label: title,
|
|
101
|
-
value: title,
|
|
102
|
-
group: type
|
|
103
|
-
}))
|
|
104
|
-
]
|
|
105
|
-
});
|
|
106
|
-
if (stepSelection === "done")
|
|
107
|
-
break;
|
|
108
|
-
selectedSteps.push(steps.find(({ title }) => title === stepSelection));
|
|
109
|
-
}
|
|
110
|
-
return selectedSteps;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export {
|
|
114
|
-
GenerateFile
|
|
115
|
-
};
|
|
116
|
-
//# sourceMappingURL=chunk-7GNQ7YY4.js.map
|
package/dist/chunk-E2SYFYJU.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
require_zod_to_json_schema
|
|
3
|
-
} from "./chunk-QSUS3GJF.js";
|
|
4
|
-
import {
|
|
5
|
-
demoStepsSchema
|
|
6
|
-
} from "./chunk-RUK73IAH.js";
|
|
7
|
-
import {
|
|
8
|
-
base_command_default
|
|
9
|
-
} from "./chunk-335KXO4I.js";
|
|
10
|
-
import {
|
|
11
|
-
outputInfo,
|
|
12
|
-
renderInfo
|
|
13
|
-
} from "./chunk-PJKCWDDX.js";
|
|
14
|
-
import {
|
|
15
|
-
__toESM,
|
|
16
|
-
init_cjs_shims
|
|
17
|
-
} from "./chunk-POZ5MGPT.js";
|
|
18
|
-
|
|
19
|
-
// src/cli/commands/demo/print-ai-prompt.ts
|
|
20
|
-
init_cjs_shims();
|
|
21
|
-
var import_zod_to_json_schema = __toESM(require_zod_to_json_schema(), 1);
|
|
22
|
-
var PrintAIPrompt = class extends base_command_default {
|
|
23
|
-
static {
|
|
24
|
-
this.description = "Prints the prompts for a chat-enabled LLM to generate a demo";
|
|
25
|
-
}
|
|
26
|
-
static {
|
|
27
|
-
this.hidden = !0;
|
|
28
|
-
}
|
|
29
|
-
async run() {
|
|
30
|
-
let jsonSchema = import_zod_to_json_schema.default.default(demoStepsSchema, "demo-steps"), printable = JSON.stringify(jsonSchema);
|
|
31
|
-
renderInfo({ body: "Copy and paste the following into the system prompt." }), outputInfo(`You are creating a demo for a Shopify CLI command, using a strictly typed JSON file.
|
|
32
|
-
The file defines the steps that will be executed during the demo.
|
|
33
|
-
|
|
34
|
-
The JSON schema for this file is:
|
|
35
|
-
\`\`\`json
|
|
36
|
-
${printable}
|
|
37
|
-
\`\`\`
|
|
38
|
-
`), renderInfo({ body: "Then, fill out the following and paste it into the chat box." }), outputInfo(`Generate a human-readable JSON file which will be used to create the demo. The JSON file must be typed according to the JSON schema.
|
|
39
|
-
|
|
40
|
-
The purpose of the command is: {A short description of the command.}
|
|
41
|
-
|
|
42
|
-
The demo should perform the following steps:
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
List the steps for the command, like:
|
|
46
|
-
1. Prompt for this
|
|
47
|
-
2. Autocomplete that
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
============================================================
|
|
51
|
-
`);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export {
|
|
56
|
-
PrintAIPrompt
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=chunk-E2SYFYJU.js.map
|