@shopify/create-app 3.58.2 → 3.59.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/dist/chunk-3JLUTHGR.js +114 -0
- package/dist/chunk-3JNB3A7C.js +14080 -0
- package/dist/chunk-4DXNY52K.js +104 -0
- package/dist/chunk-4SXWHRL5.js +62 -0
- package/dist/chunk-5RH4B5Q7.js +30996 -0
- package/dist/chunk-7XQTD3L4.js +213522 -0
- package/dist/chunk-ADG25CKO.js +2468 -0
- package/dist/chunk-ASLSMEKR.js +18914 -0
- package/dist/chunk-BOIUUJSH.js +99 -0
- package/dist/chunk-CKY5L2DS.js +37 -0
- package/dist/chunk-CPDHSAO5.js +3179 -0
- package/dist/chunk-FBB6KUZG.js +821 -0
- package/dist/chunk-G6FN5VUE.js +102 -0
- package/dist/chunk-GXPKATXW.js +194 -0
- package/dist/chunk-H7CRO63U.js +11 -0
- package/dist/chunk-JP7Y3CTL.js +72 -0
- package/dist/chunk-LKGDG6WW.js +87 -0
- package/dist/chunk-M63RTPGR.js +63 -0
- package/dist/chunk-ND5WSAZY.js +7817 -0
- package/dist/chunk-P4TVG45N.js +900 -0
- package/dist/chunk-TMGCRPEZ.js +4283 -0
- package/dist/chunk-UVY6LL5H.js +145 -0
- package/dist/chunk-VMPTLMJN.js +144 -0
- package/dist/chunk-WCNR75S2.js +73 -0
- package/dist/chunk-WLJ2CNLG.js +45349 -0
- package/dist/chunk-YLEF4RUH.js +144 -0
- package/dist/chunk-ZDCQCTOO.js +13764 -0
- package/dist/chunk-ZPB26OWQ.js +5605 -0
- package/dist/commands/init.d.ts +2 -1
- package/dist/commands/init.js +31 -123
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.test.js +123 -0
- package/dist/constants-K3R4N3N3.js +19 -0
- package/dist/custom-oclif-loader-GA6B7DEF.js +83 -0
- package/dist/del-A5YM6R3Y.js +2846 -0
- package/dist/devtools-KQM4GF6J.js +3685 -0
- package/dist/error-handler-U53E7YKG.js +34 -0
- package/dist/hooks/postrun.js +108 -2
- package/dist/hooks/prerun.js +77 -2
- package/dist/index.js +22 -7
- package/dist/lib-76JUGQYQ.js +8 -0
- package/dist/local-XVLEGQFE.js +59 -0
- package/dist/magic-string.es-6WMSFIAX.js +1291 -0
- package/dist/multipart-parser-O2BQODS2.js +359 -0
- package/dist/node-package-manager-76YAD3UB.js +68 -0
- package/dist/open-B7XFJJCK.js +290 -0
- package/dist/out-JZ52TJE3.js +5 -0
- package/dist/path-HO4HBKK5.js +28 -0
- package/dist/prompts/init.d.ts +4 -3
- package/dist/prompts/init.js +23 -118
- package/dist/prompts/init.js.map +1 -1
- package/dist/prompts/init.test.js +115 -0
- package/dist/services/init.d.ts +3 -1
- package/dist/services/init.js +25 -139
- package/dist/services/init.js.map +1 -1
- package/dist/services/init.test.js +18 -0
- package/dist/system-XBDENYNR.js +25 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-ZVCYWXG6.js +49 -0
- package/dist/utils/template/cleanup.js +18 -19
- package/dist/utils/template/cleanup.test.js +74 -0
- package/dist/utils/template/npm.d.ts +2 -1
- package/dist/utils/template/npm.js +22 -58
- package/dist/utils/template/npm.js.map +1 -1
- package/dist/utils/template/npm.test.js +153 -0
- package/dist/yoga.wasm +0 -0
- package/oclif.manifest.json +1 -1
- package/package.json +5 -6
- package/dist/constants.d.ts +0 -1
- package/dist/constants.js +0 -2
- package/dist/constants.js.map +0 -1
- package/dist/utils/versions.d.ts +0 -1
- package/dist/utils/versions.js +0 -21
- package/dist/utils/versions.js.map +0 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isTruthy,
|
|
3
|
+
printEventsJson
|
|
4
|
+
} from "./chunk-UVY6LL5H.js";
|
|
5
|
+
import {
|
|
6
|
+
require_lib
|
|
7
|
+
} from "./chunk-7XQTD3L4.js";
|
|
8
|
+
import {
|
|
9
|
+
__toESM,
|
|
10
|
+
init_cjs_shims
|
|
11
|
+
} from "./chunk-M63RTPGR.js";
|
|
12
|
+
|
|
13
|
+
// ../cli-kit/src/public/node/cli.ts
|
|
14
|
+
init_cjs_shims();
|
|
15
|
+
var import_core = __toESM(require_lib(), 1);
|
|
16
|
+
import { fileURLToPath } from "url";
|
|
17
|
+
async function warnIfOldNodeVersion() {
|
|
18
|
+
const nodeVersion = process.versions.node;
|
|
19
|
+
const nodeMajorVersion = Number(nodeVersion.split(".")[0]);
|
|
20
|
+
const currentSupportedNodeVersion = 18;
|
|
21
|
+
if (nodeMajorVersion < currentSupportedNodeVersion) {
|
|
22
|
+
const { renderWarning } = await import("./ui-ZVCYWXG6.js");
|
|
23
|
+
renderWarning({
|
|
24
|
+
headline: "Upgrade to a supported Node version now.",
|
|
25
|
+
body: [
|
|
26
|
+
`Node ${nodeMajorVersion} has reached end-of-life and poses security risks. When you upgrade to a`,
|
|
27
|
+
{
|
|
28
|
+
link: {
|
|
29
|
+
url: "https://nodejs.dev/en/about/previous-releases",
|
|
30
|
+
label: "supported version"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{ char: "," },
|
|
34
|
+
"you'll be able to use Shopify CLI without interruption."
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function setupEnvironmentVariables(options) {
|
|
40
|
+
if (process.argv.includes("--verbose")) {
|
|
41
|
+
process.env.DEBUG = process.env.DEBUG ?? "*";
|
|
42
|
+
}
|
|
43
|
+
if (options.development) {
|
|
44
|
+
process.env.SHOPIFY_CLI_ENV = process.env.SHOPIFY_CLI_ENV ?? "development";
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function forceNoColor() {
|
|
48
|
+
if (process.argv.includes("--no-color") || isTruthy(process.env.NO_COLOR) || isTruthy(process.env.SHOPIFY_FLAG_NO_COLOR) || process.env.TERM === "dumb") {
|
|
49
|
+
process.env.FORCE_COLOR = "0";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async function runCLI(options) {
|
|
53
|
+
setupEnvironmentVariables(options);
|
|
54
|
+
forceNoColor();
|
|
55
|
+
await warnIfOldNodeVersion();
|
|
56
|
+
const { errorHandler } = await import("./error-handler-U53E7YKG.js");
|
|
57
|
+
const { isDevelopment } = await import("./local-XVLEGQFE.js");
|
|
58
|
+
const oclif = await import("./lib-76JUGQYQ.js");
|
|
59
|
+
const { ShopifyConfig } = await import("./custom-oclif-loader-GA6B7DEF.js");
|
|
60
|
+
if (isDevelopment()) {
|
|
61
|
+
oclif.default.settings.debug = true;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
const config = new ShopifyConfig({ root: fileURLToPath(options.moduleURL) });
|
|
65
|
+
await config.load();
|
|
66
|
+
await oclif.default.run(void 0, config);
|
|
67
|
+
await oclif.default.flush();
|
|
68
|
+
printEventsJson();
|
|
69
|
+
} catch (error) {
|
|
70
|
+
await errorHandler(error);
|
|
71
|
+
return oclif.default.Errors.handle(error);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async function runCreateCLI(options) {
|
|
75
|
+
setupEnvironmentVariables(options);
|
|
76
|
+
const { findUpAndReadPackageJson } = await import("./node-package-manager-76YAD3UB.js");
|
|
77
|
+
const { moduleDirectory } = await import("./path-HO4HBKK5.js");
|
|
78
|
+
const packageJson = await findUpAndReadPackageJson(moduleDirectory(options.moduleURL));
|
|
79
|
+
const packageName = packageJson.content.name;
|
|
80
|
+
const name = packageName.replace("@shopify/create-", "");
|
|
81
|
+
const initIndex = process.argv.findIndex((arg) => arg.includes("init"));
|
|
82
|
+
if (initIndex === -1) {
|
|
83
|
+
const initIndex2 = process.argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
|
|
84
|
+
process.argv.splice(initIndex2, 0, "init");
|
|
85
|
+
}
|
|
86
|
+
await runCLI(options);
|
|
87
|
+
}
|
|
88
|
+
var globalFlags = {
|
|
89
|
+
"no-color": import_core.Flags.boolean({
|
|
90
|
+
hidden: false,
|
|
91
|
+
description: "Disable color output.",
|
|
92
|
+
env: "SHOPIFY_FLAG_NO_COLOR"
|
|
93
|
+
}),
|
|
94
|
+
verbose: import_core.Flags.boolean({
|
|
95
|
+
hidden: false,
|
|
96
|
+
description: "Increase the verbosity of the logs.",
|
|
97
|
+
env: "SHOPIFY_FLAG_VERBOSE"
|
|
98
|
+
})
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export {
|
|
102
|
+
runCreateCLI,
|
|
103
|
+
globalFlags
|
|
104
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CLI_KIT_VERSION
|
|
3
|
+
} from "./chunk-H7CRO63U.js";
|
|
4
|
+
import {
|
|
5
|
+
installNodeModules
|
|
6
|
+
} from "./chunk-ZDCQCTOO.js";
|
|
7
|
+
import {
|
|
8
|
+
findPathUp
|
|
9
|
+
} from "./chunk-WLJ2CNLG.js";
|
|
10
|
+
import {
|
|
11
|
+
moduleDirectory,
|
|
12
|
+
normalizePath
|
|
13
|
+
} from "./chunk-G6FN5VUE.js";
|
|
14
|
+
import {
|
|
15
|
+
init_cjs_shims
|
|
16
|
+
} from "./chunk-M63RTPGR.js";
|
|
17
|
+
|
|
18
|
+
// src/utils/template/npm.ts
|
|
19
|
+
init_cjs_shims();
|
|
20
|
+
import { platform } from "os";
|
|
21
|
+
async function updateCLIDependencies({
|
|
22
|
+
packageJSON,
|
|
23
|
+
local,
|
|
24
|
+
useGlobalCLI
|
|
25
|
+
}) {
|
|
26
|
+
packageJSON.dependencies = packageJSON.dependencies || {};
|
|
27
|
+
if (useGlobalCLI) {
|
|
28
|
+
delete packageJSON.dependencies["@shopify/cli"];
|
|
29
|
+
} else {
|
|
30
|
+
packageJSON.dependencies["@shopify/cli"] = CLI_KIT_VERSION;
|
|
31
|
+
}
|
|
32
|
+
delete packageJSON.dependencies["@shopify/app"];
|
|
33
|
+
if (local) {
|
|
34
|
+
const cliPath = await packagePath("cli");
|
|
35
|
+
packageJSON.dependencies["@shopify/cli"] = cliPath;
|
|
36
|
+
const dependencyOverrides = {
|
|
37
|
+
"@shopify/cli": cliPath
|
|
38
|
+
};
|
|
39
|
+
packageJSON.overrides = packageJSON.overrides ? { ...packageJSON.overrides, ...dependencyOverrides } : dependencyOverrides;
|
|
40
|
+
packageJSON.resolutions = packageJSON.resolutions ? { ...packageJSON.resolutions, ...dependencyOverrides } : dependencyOverrides;
|
|
41
|
+
}
|
|
42
|
+
return packageJSON;
|
|
43
|
+
}
|
|
44
|
+
async function packagePath(packageName) {
|
|
45
|
+
const packageAbsolutePath = await findPathUp(`packages/${packageName}`, {
|
|
46
|
+
type: "directory",
|
|
47
|
+
cwd: moduleDirectory(import.meta.url)
|
|
48
|
+
});
|
|
49
|
+
return `file:${packageAbsolutePath}`;
|
|
50
|
+
}
|
|
51
|
+
async function getDeepInstallNPMTasks({
|
|
52
|
+
from,
|
|
53
|
+
packageManager
|
|
54
|
+
}) {
|
|
55
|
+
const args = platform() === "win32" && packageManager === "yarn" ? ["--network-concurrency", "1"] : [];
|
|
56
|
+
return installNodeModules({ directory: normalizePath(from), packageManager, args });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
updateCLIDependencies,
|
|
61
|
+
getDeepInstallNPMTasks
|
|
62
|
+
};
|