@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,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
platformAndArch
|
|
3
|
+
} from "./chunk-JP7Y3CTL.js";
|
|
4
|
+
import {
|
|
5
|
+
getPackageManager,
|
|
6
|
+
packageManagerFromUserAgent
|
|
7
|
+
} from "./chunk-ZDCQCTOO.js";
|
|
8
|
+
import {
|
|
9
|
+
addPublicMetadata,
|
|
10
|
+
addSensitiveMetadata,
|
|
11
|
+
ciPlatform,
|
|
12
|
+
cloudEnvironment,
|
|
13
|
+
currentProcessIsGlobal,
|
|
14
|
+
macAddress
|
|
15
|
+
} from "./chunk-WLJ2CNLG.js";
|
|
16
|
+
import {
|
|
17
|
+
cwd
|
|
18
|
+
} from "./chunk-G6FN5VUE.js";
|
|
19
|
+
import {
|
|
20
|
+
init_cjs_shims
|
|
21
|
+
} from "./chunk-M63RTPGR.js";
|
|
22
|
+
|
|
23
|
+
// ../cli-kit/src/private/node/analytics.ts
|
|
24
|
+
init_cjs_shims();
|
|
25
|
+
|
|
26
|
+
// ../cli-kit/src/public/node/crypto.ts
|
|
27
|
+
init_cjs_shims();
|
|
28
|
+
import crypto from "crypto";
|
|
29
|
+
function hashString(str) {
|
|
30
|
+
return crypto.createHash("sha1").update(str).digest("hex");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// ../cli-kit/src/private/node/analytics.ts
|
|
34
|
+
async function startAnalytics({
|
|
35
|
+
commandContent,
|
|
36
|
+
args,
|
|
37
|
+
currentTime = (/* @__PURE__ */ new Date()).getTime(),
|
|
38
|
+
commandClass
|
|
39
|
+
}) {
|
|
40
|
+
let startCommand = commandContent.command;
|
|
41
|
+
if (commandClass && Object.prototype.hasOwnProperty.call(commandClass, "analyticsNameOverride")) {
|
|
42
|
+
startCommand = commandClass.analyticsNameOverride() ?? commandContent.command;
|
|
43
|
+
}
|
|
44
|
+
await addSensitiveMetadata(() => ({
|
|
45
|
+
commandStartOptions: {
|
|
46
|
+
startTime: currentTime,
|
|
47
|
+
startCommand,
|
|
48
|
+
startArgs: args
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
await addPublicMetadata(() => ({
|
|
52
|
+
cmd_all_launcher: packageManagerFromUserAgent(),
|
|
53
|
+
cmd_all_alias_used: commandContent.alias,
|
|
54
|
+
cmd_all_topic: commandContent.topic,
|
|
55
|
+
cmd_all_plugin: commandClass?.plugin?.name,
|
|
56
|
+
cmd_all_force: flagIncluded("force", commandClass) ? args.includes("--force") : void 0
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
async function getEnvironmentData(config) {
|
|
60
|
+
const ciplatform = ciPlatform();
|
|
61
|
+
const pluginNames = getPluginNames(config);
|
|
62
|
+
const shopifyPlugins = pluginNames.filter((plugin) => plugin.startsWith("@shopify/"));
|
|
63
|
+
const { platform, arch } = platformAndArch();
|
|
64
|
+
return {
|
|
65
|
+
uname: `${platform} ${arch}`,
|
|
66
|
+
env_ci: ciplatform.isCI,
|
|
67
|
+
env_ci_platform: ciplatform.name,
|
|
68
|
+
env_plugin_installed_any_custom: pluginNames.length !== shopifyPlugins.length,
|
|
69
|
+
env_plugin_installed_shopify: JSON.stringify(shopifyPlugins),
|
|
70
|
+
env_shell: config.shell,
|
|
71
|
+
env_web_ide: cloudEnvironment().editor ? cloudEnvironment().platform : void 0,
|
|
72
|
+
env_device_id: hashString(await macAddress()),
|
|
73
|
+
env_cloud: cloudEnvironment().platform,
|
|
74
|
+
env_package_manager: await getPackageManager(cwd()),
|
|
75
|
+
env_is_global: currentProcessIsGlobal()
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
async function getSensitiveEnvironmentData(config) {
|
|
79
|
+
return {
|
|
80
|
+
env_plugin_installed_all: JSON.stringify(getPluginNames(config))
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function getPluginNames(config) {
|
|
84
|
+
const pluginNames = [...config.plugins.keys()];
|
|
85
|
+
return pluginNames.sort().filter((plugin) => !plugin.startsWith("@oclif/"));
|
|
86
|
+
}
|
|
87
|
+
function flagIncluded(flag, commandClass) {
|
|
88
|
+
if (!commandClass)
|
|
89
|
+
return false;
|
|
90
|
+
const commandFlags = commandClass.flags ?? {};
|
|
91
|
+
return Object.keys(commandFlags).includes(flag);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
hashString,
|
|
96
|
+
startAnalytics,
|
|
97
|
+
getEnvironmentData,
|
|
98
|
+
getSensitiveEnvironmentData
|
|
99
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
glob,
|
|
3
|
+
rmdir
|
|
4
|
+
} from "./chunk-WLJ2CNLG.js";
|
|
5
|
+
import {
|
|
6
|
+
joinPath
|
|
7
|
+
} from "./chunk-G6FN5VUE.js";
|
|
8
|
+
import {
|
|
9
|
+
init_cjs_shims
|
|
10
|
+
} from "./chunk-M63RTPGR.js";
|
|
11
|
+
|
|
12
|
+
// src/utils/template/cleanup.ts
|
|
13
|
+
init_cjs_shims();
|
|
14
|
+
async function cleanup(webOutputDirectory) {
|
|
15
|
+
const gitPaths = await glob(
|
|
16
|
+
[
|
|
17
|
+
joinPath(webOutputDirectory, "**", ".git"),
|
|
18
|
+
joinPath(webOutputDirectory, "**", ".github"),
|
|
19
|
+
joinPath(webOutputDirectory, "**", ".gitmodules"),
|
|
20
|
+
joinPath(webOutputDirectory, "LICENSE*"),
|
|
21
|
+
joinPath(webOutputDirectory, "**", "frontend/LICENSE*"),
|
|
22
|
+
joinPath(webOutputDirectory, "package.json.cli2")
|
|
23
|
+
],
|
|
24
|
+
{
|
|
25
|
+
dot: true,
|
|
26
|
+
onlyFiles: false,
|
|
27
|
+
onlyDirectories: false,
|
|
28
|
+
ignore: ["**/node_modules/**"]
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
return Promise.all(gitPaths.map((path) => rmdir(path, { force: true }))).then(() => {
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
cleanup
|
|
37
|
+
};
|