@shopify/create-app 3.58.2 → 3.59.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-3JLUTHGR.js +114 -0
- package/dist/chunk-3JNB3A7C.js +14080 -0
- package/dist/chunk-6IZ3YCE6.js +144 -0
- package/dist/chunk-7XQTD3L4.js +213522 -0
- package/dist/chunk-DJYDRQPG.js +30996 -0
- package/dist/chunk-DY2DAXN2.js +104 -0
- package/dist/chunk-F6KQQF76.js +7817 -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-HCBGYFVF.js +99 -0
- package/dist/chunk-IL6UMTVA.js +62 -0
- package/dist/chunk-LKGDG6WW.js +87 -0
- package/dist/chunk-M63RTPGR.js +63 -0
- package/dist/chunk-OFS45IA7.js +2468 -0
- package/dist/chunk-P4TVG45N.js +900 -0
- package/dist/chunk-SSNXQGVF.js +11 -0
- package/dist/chunk-TDBGZYDD.js +45349 -0
- package/dist/chunk-TMGCRPEZ.js +4283 -0
- package/dist/chunk-UVY6LL5H.js +145 -0
- package/dist/chunk-VJ2TN2CW.js +72 -0
- package/dist/chunk-WCNR75S2.js +73 -0
- package/dist/chunk-WETZUTXU.js +18914 -0
- package/dist/chunk-WK5TEOA2.js +37 -0
- package/dist/chunk-X4SHWSZZ.js +3179 -0
- package/dist/chunk-YJIQMGQH.js +13764 -0
- package/dist/chunk-YLEF4RUH.js +144 -0
- package/dist/chunk-ZPB26OWQ.js +5605 -0
- package/dist/commands/init.js +31 -123
- package/dist/commands/init.test.js +123 -0
- package/dist/constants-K3R4N3N3.js +19 -0
- package/dist/custom-oclif-loader-2S5LB2FS.js +83 -0
- package/dist/del-A5YM6R3Y.js +2846 -0
- package/dist/devtools-KQM4GF6J.js +3685 -0
- package/dist/error-handler-N3GIE2DS.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-NYXQXMB7.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-3J3VEQCR.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.js +23 -118
- package/dist/prompts/init.test.js +115 -0
- package/dist/services/init.js +25 -139
- package/dist/services/init.test.js +18 -0
- package/dist/system-5VPAJEUM.js +25 -0
- package/dist/ui-D34IKHO6.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.js +22 -58
- 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/commands/init.d.ts +0 -20
- package/dist/commands/init.js.map +0 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.js +0 -2
- package/dist/constants.js.map +0 -1
- package/dist/hooks/postrun.d.ts +0 -1
- package/dist/hooks/postrun.js.map +0 -1
- package/dist/hooks/prerun.d.ts +0 -1
- package/dist/hooks/prerun.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js.map +0 -1
- package/dist/prompts/init.d.ts +0 -39
- package/dist/prompts/init.js.map +0 -1
- package/dist/services/init.d.ts +0 -9
- package/dist/services/init.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/utils/template/cleanup.d.ts +0 -1
- package/dist/utils/template/cleanup.js.map +0 -1
- package/dist/utils/template/npm.d.ts +0 -12
- package/dist/utils/template/npm.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,145 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_cjs_shims
|
|
3
|
+
} from "./chunk-M63RTPGR.js";
|
|
4
|
+
|
|
5
|
+
// ../cli-kit/src/public/node/context/utilities.ts
|
|
6
|
+
init_cjs_shims();
|
|
7
|
+
function isTruthy(variable) {
|
|
8
|
+
if (!variable) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return ["1", "true", "TRUE", "yes", "YES"].includes(variable);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// ../cli-kit/src/private/node/demo-recorder.ts
|
|
15
|
+
init_cjs_shims();
|
|
16
|
+
var DemoRecorder = class {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.recorded = [];
|
|
19
|
+
this.sleepStart = Date.now();
|
|
20
|
+
this.command = ["shopify", ...process.argv.slice(2)].join(" ");
|
|
21
|
+
}
|
|
22
|
+
addEvent({ type, properties }) {
|
|
23
|
+
if (type === "taskbar") {
|
|
24
|
+
this.resetSleep();
|
|
25
|
+
} else {
|
|
26
|
+
this.addSleep();
|
|
27
|
+
}
|
|
28
|
+
this.recorded.push({ type, properties: JSON.parse(JSON.stringify(properties)) });
|
|
29
|
+
this.sleepStart = Date.now();
|
|
30
|
+
}
|
|
31
|
+
recordedEventsJson() {
|
|
32
|
+
return JSON.stringify(
|
|
33
|
+
{
|
|
34
|
+
command: this.command,
|
|
35
|
+
steps: this.withFormattedConcurrent(this.recorded)
|
|
36
|
+
},
|
|
37
|
+
null,
|
|
38
|
+
2
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
addSleep() {
|
|
42
|
+
const duration = (Date.now() - this.sleepStart) / 1e3;
|
|
43
|
+
this.sleepStart = Date.now();
|
|
44
|
+
if (duration > 0.1) {
|
|
45
|
+
this.recorded.push({ type: "sleep", properties: { duration } });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
resetSleep() {
|
|
49
|
+
this.sleepStart = Date.now();
|
|
50
|
+
}
|
|
51
|
+
addOrUpdateConcurrentOutput({ prefix, index, output }) {
|
|
52
|
+
let last = this.recorded[this.recorded.length - 1];
|
|
53
|
+
if (last?.type === "concurrent") {
|
|
54
|
+
this.resetSleep();
|
|
55
|
+
} else {
|
|
56
|
+
const eventProperties = {
|
|
57
|
+
type: "concurrent",
|
|
58
|
+
properties: { processes: [], concurrencyStart: Date.now() }
|
|
59
|
+
};
|
|
60
|
+
this.addEvent(eventProperties);
|
|
61
|
+
last = this.recorded[this.recorded.length - 1];
|
|
62
|
+
}
|
|
63
|
+
const { processes } = last.properties;
|
|
64
|
+
while (processes.length <= index) {
|
|
65
|
+
processes.push({ prefix: "", steps: [] });
|
|
66
|
+
}
|
|
67
|
+
processes[index].prefix = prefix;
|
|
68
|
+
processes[index].steps.push({ timestamp: Date.now(), endMessage: output });
|
|
69
|
+
}
|
|
70
|
+
withFormattedConcurrent(recorded) {
|
|
71
|
+
return recorded.map((event) => {
|
|
72
|
+
if (event.type === "concurrent") {
|
|
73
|
+
const { processes, footer, concurrencyStart } = event.properties;
|
|
74
|
+
const formatted = processes.map(({ prefix, steps }) => {
|
|
75
|
+
let mostRecentTimestamp = concurrencyStart;
|
|
76
|
+
const formattedSteps = steps.map(({ timestamp, endMessage }) => {
|
|
77
|
+
const duration = (timestamp - mostRecentTimestamp) / 1e3;
|
|
78
|
+
mostRecentTimestamp = timestamp;
|
|
79
|
+
return { duration, endMessage };
|
|
80
|
+
});
|
|
81
|
+
return { prefix, steps: formattedSteps };
|
|
82
|
+
});
|
|
83
|
+
return { type: "concurrent", properties: { footer, processes: formatted } };
|
|
84
|
+
}
|
|
85
|
+
return event;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
var NoopDemoRecorder = class {
|
|
90
|
+
addEvent(_event) {
|
|
91
|
+
}
|
|
92
|
+
recordedEventsJson() {
|
|
93
|
+
return JSON.stringify({ steps: [] }, null, 2);
|
|
94
|
+
}
|
|
95
|
+
addSleep() {
|
|
96
|
+
}
|
|
97
|
+
resetSleep() {
|
|
98
|
+
}
|
|
99
|
+
addOrUpdateConcurrentOutput(..._args) {
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var _instance;
|
|
103
|
+
function ensureInstance() {
|
|
104
|
+
if (!_instance) {
|
|
105
|
+
if (isRecording()) {
|
|
106
|
+
_instance = new DemoRecorder();
|
|
107
|
+
} else {
|
|
108
|
+
_instance = new NoopDemoRecorder();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function initDemoRecorder() {
|
|
113
|
+
ensureInstance();
|
|
114
|
+
}
|
|
115
|
+
function recordUIEvent(event) {
|
|
116
|
+
ensureInstance();
|
|
117
|
+
_instance.addEvent(event);
|
|
118
|
+
}
|
|
119
|
+
function resetRecordedSleep() {
|
|
120
|
+
ensureInstance();
|
|
121
|
+
_instance.resetSleep();
|
|
122
|
+
}
|
|
123
|
+
function printEventsJson() {
|
|
124
|
+
if (isRecording()) {
|
|
125
|
+
ensureInstance();
|
|
126
|
+
_instance.addSleep();
|
|
127
|
+
console.log(_instance.recordedEventsJson());
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function addOrUpdateConcurrentUIEventOutput(data) {
|
|
131
|
+
ensureInstance();
|
|
132
|
+
_instance.addOrUpdateConcurrentOutput(data);
|
|
133
|
+
}
|
|
134
|
+
function isRecording() {
|
|
135
|
+
return isTruthy(process.env.RECORD_DEMO);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export {
|
|
139
|
+
isTruthy,
|
|
140
|
+
initDemoRecorder,
|
|
141
|
+
recordUIEvent,
|
|
142
|
+
resetRecordedSleep,
|
|
143
|
+
printEventsJson,
|
|
144
|
+
addOrUpdateConcurrentUIEventOutput
|
|
145
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
execa,
|
|
3
|
+
outputContent,
|
|
4
|
+
outputDebug
|
|
5
|
+
} from "./chunk-TDBGZYDD.js";
|
|
6
|
+
import {
|
|
7
|
+
init_cjs_shims
|
|
8
|
+
} from "./chunk-M63RTPGR.js";
|
|
9
|
+
|
|
10
|
+
// ../cli-kit/src/public/node/os.ts
|
|
11
|
+
init_cjs_shims();
|
|
12
|
+
import { userInfo as osUserInfo } from "os";
|
|
13
|
+
async function username(platform = process.platform) {
|
|
14
|
+
outputDebug(outputContent`Obtaining user name...`);
|
|
15
|
+
const environmentVariable = getEnvironmentVariable();
|
|
16
|
+
if (environmentVariable) {
|
|
17
|
+
return environmentVariable;
|
|
18
|
+
}
|
|
19
|
+
const userInfoUsername = getUsernameFromOsUserInfo();
|
|
20
|
+
if (userInfoUsername) {
|
|
21
|
+
return userInfoUsername;
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
if (platform === "win32") {
|
|
25
|
+
const { stdout } = await execa("whoami");
|
|
26
|
+
return cleanWindowsCommand(stdout);
|
|
27
|
+
}
|
|
28
|
+
const { stdout: userId } = await execa("id", ["-u"]);
|
|
29
|
+
try {
|
|
30
|
+
const { stdout } = await execa("id", ["-un", userId]);
|
|
31
|
+
return stdout;
|
|
32
|
+
} catch {
|
|
33
|
+
}
|
|
34
|
+
return makeUsernameFromId(userId);
|
|
35
|
+
} catch {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function platformAndArch(platform = process.platform, arch = process.arch) {
|
|
40
|
+
let archString;
|
|
41
|
+
if (arch === "x64") {
|
|
42
|
+
archString = "amd64";
|
|
43
|
+
} else if (arch === "ia32") {
|
|
44
|
+
archString = "386";
|
|
45
|
+
} else {
|
|
46
|
+
archString = arch;
|
|
47
|
+
}
|
|
48
|
+
const platformString = platform.match(/^win.+/) ? "windows" : platform;
|
|
49
|
+
return { platform: platformString, arch: archString };
|
|
50
|
+
}
|
|
51
|
+
function getEnvironmentVariable() {
|
|
52
|
+
const { env } = process;
|
|
53
|
+
return env.SUDO_USER || env.C9_USER || env.LOGNAME || env.USER || env.LNAME || env.USERNAME;
|
|
54
|
+
}
|
|
55
|
+
function getUsernameFromOsUserInfo() {
|
|
56
|
+
try {
|
|
57
|
+
return osUserInfo().username;
|
|
58
|
+
} catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function cleanWindowsCommand(value) {
|
|
63
|
+
return value.replace(/^.*\\/, "");
|
|
64
|
+
}
|
|
65
|
+
function makeUsernameFromId(userId) {
|
|
66
|
+
return `no-username-${userId}`;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
username,
|
|
71
|
+
platformAndArch
|
|
72
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__commonJS,
|
|
3
|
+
__require,
|
|
4
|
+
init_cjs_shims
|
|
5
|
+
} from "./chunk-M63RTPGR.js";
|
|
6
|
+
|
|
7
|
+
// ../../node_modules/.pnpm/is-docker@2.2.1/node_modules/is-docker/index.js
|
|
8
|
+
var require_is_docker = __commonJS({
|
|
9
|
+
"../../node_modules/.pnpm/is-docker@2.2.1/node_modules/is-docker/index.js"(exports, module) {
|
|
10
|
+
"use strict";
|
|
11
|
+
init_cjs_shims();
|
|
12
|
+
var fs = __require("fs");
|
|
13
|
+
var isDocker;
|
|
14
|
+
function hasDockerEnv() {
|
|
15
|
+
try {
|
|
16
|
+
fs.statSync("/.dockerenv");
|
|
17
|
+
return true;
|
|
18
|
+
} catch (_) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function hasDockerCGroup() {
|
|
23
|
+
try {
|
|
24
|
+
return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
25
|
+
} catch (_) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
module.exports = () => {
|
|
30
|
+
if (isDocker === void 0) {
|
|
31
|
+
isDocker = hasDockerEnv() || hasDockerCGroup();
|
|
32
|
+
}
|
|
33
|
+
return isDocker;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// ../../node_modules/.pnpm/is-wsl@2.2.0/node_modules/is-wsl/index.js
|
|
39
|
+
var require_is_wsl = __commonJS({
|
|
40
|
+
"../../node_modules/.pnpm/is-wsl@2.2.0/node_modules/is-wsl/index.js"(exports, module) {
|
|
41
|
+
"use strict";
|
|
42
|
+
init_cjs_shims();
|
|
43
|
+
var os = __require("os");
|
|
44
|
+
var fs = __require("fs");
|
|
45
|
+
var isDocker = require_is_docker();
|
|
46
|
+
var isWsl = () => {
|
|
47
|
+
if (process.platform !== "linux") {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
if (os.release().toLowerCase().includes("microsoft")) {
|
|
51
|
+
if (isDocker()) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isDocker() : false;
|
|
58
|
+
} catch (_) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
if (process.env.__IS_WSL_TEST__) {
|
|
63
|
+
module.exports = isWsl;
|
|
64
|
+
} else {
|
|
65
|
+
module.exports = isWsl();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export {
|
|
71
|
+
require_is_docker,
|
|
72
|
+
require_is_wsl
|
|
73
|
+
};
|