@shopify/create-app 3.69.3 → 3.70.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-DKV56LWK.js → chunk-2IJ2KQU2.js} +19 -19
- package/dist/{chunk-K7AD63F5.js → chunk-4NI5A7A4.js} +30 -212
- package/dist/{chunk-453VRHIZ.js → chunk-64XEMSHA.js} +3 -3
- package/dist/{chunk-RYPZ4D5J.js → chunk-CWXZ7XAM.js} +27 -28
- package/dist/{chunk-G6AY2JW5.js → chunk-IDT7CLPE.js} +4 -3
- package/dist/{chunk-7UZ7B64G.js → chunk-MCWNOYSH.js} +7 -7
- package/dist/{chunk-GNXYMDBU.js → chunk-YQS36GWM.js} +13 -8
- package/dist/{constants-GVJLI6RE.js → constants-JHPIMZ2O.js} +6 -4
- package/dist/{custom-oclif-loader-W3LGQFJO.js → custom-oclif-loader-BSDHBJI5.js} +3 -3
- package/dist/{error-handler-7F5N2SUW.js → error-handler-JYEQI7TL.js} +7 -7
- package/dist/hooks/postrun.js +5 -5
- package/dist/hooks/prerun.js +5 -5
- package/dist/index.js +12407 -11009
- package/dist/{local-BP3ZVR74.js → local-TH3U2SLS.js} +3 -3
- package/dist/{node-package-manager-W6EO76MO.js → node-package-manager-BPA6G6YC.js} +4 -4
- package/dist/{system-KDFUHSBQ.js → system-B7E6HTDC.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-OAQKV3G5.js → ui-RPO3BY7Q.js} +3 -3
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
environmentVariables,
|
|
17
17
|
pathConstants
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IDT7CLPE.js";
|
|
19
19
|
import {
|
|
20
20
|
cwd,
|
|
21
21
|
joinPath,
|
|
@@ -24432,7 +24432,12 @@ function ciPlatform(env2 = process.env) {
|
|
|
24432
24432
|
name,
|
|
24433
24433
|
metadata: getCIMetadata(name, env2)
|
|
24434
24434
|
};
|
|
24435
|
-
}
|
|
24435
|
+
} else if (isTruthy(env2.TF_BUILD))
|
|
24436
|
+
return {
|
|
24437
|
+
isCI: !0,
|
|
24438
|
+
name: "azure",
|
|
24439
|
+
metadata: getCIMetadata("azure", env2)
|
|
24440
|
+
};
|
|
24436
24441
|
return {
|
|
24437
24442
|
isCI: !1
|
|
24438
24443
|
};
|
|
@@ -25296,7 +25301,8 @@ function currentProcessIsGlobal(argv = process.argv) {
|
|
|
25296
25301
|
}
|
|
25297
25302
|
async function isGlobalCLIInstalled() {
|
|
25298
25303
|
try {
|
|
25299
|
-
|
|
25304
|
+
let env2 = { ...process.env, SHOPIFY_CLI_NO_ANALYTICS: "1" };
|
|
25305
|
+
return (await captureOutput("shopify", ["app"], { env: env2 })).includes("app dev");
|
|
25300
25306
|
} catch {
|
|
25301
25307
|
return !1;
|
|
25302
25308
|
}
|
|
@@ -29668,7 +29674,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
|
|
|
29668
29674
|
try {
|
|
29669
29675
|
await getAndSet();
|
|
29670
29676
|
} catch (error) {
|
|
29671
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
29677
|
+
let { sendErrorToBugsnag } = await import("./error-handler-JYEQI7TL.js");
|
|
29672
29678
|
await sendErrorToBugsnag(error, "unexpected_error");
|
|
29673
29679
|
}
|
|
29674
29680
|
}, durationStack = [];
|
|
@@ -30013,8 +30019,8 @@ var outputContextStore = new AsyncLocalStorage();
|
|
|
30013
30019
|
function useConcurrentOutputContext(context, callback) {
|
|
30014
30020
|
return outputContextStore.run(context, callback);
|
|
30015
30021
|
}
|
|
30016
|
-
var ConcurrentOutput = ({ processes, prefixColumnSize, abortSignal, showTimestamps = !0, keepRunningAfterProcessesResolve = !1 }) => {
|
|
30017
|
-
let [processOutput, setProcessOutput] = (0, import_react30.useState)([]), { exit: unmountInk } = use_app_default(), concurrentColors = (0, import_react30.useMemo)(() => ["yellow", "cyan", "magenta", "green", "blue"], []), calculatedPrefixColumnSize = (0, import_react30.useMemo)(() => {
|
|
30022
|
+
var ConcurrentOutput = ({ processes, prefixColumnSize, abortSignal, showTimestamps = !0, keepRunningAfterProcessesResolve = !1, useAlternativeColorPalette = !1 }) => {
|
|
30023
|
+
let [processOutput, setProcessOutput] = (0, import_react30.useState)([]), { exit: unmountInk } = use_app_default(), concurrentColors = (0, import_react30.useMemo)(() => useAlternativeColorPalette ? ["#b994c3", "#e69e19", "#d17a73", "cyan", "magenta", "blue"] : ["yellow", "cyan", "magenta", "green", "blue"], [useAlternativeColorPalette]), calculatedPrefixColumnSize = (0, import_react30.useMemo)(() => {
|
|
30018
30024
|
let columnSize = prefixColumnSize ?? processes.reduce((maxPrefixLength, process20) => Math.max(maxPrefixLength, process20.prefix.length), 0);
|
|
30019
30025
|
return Math.min(columnSize, 25);
|
|
30020
30026
|
}, [processes, prefixColumnSize]), addPrefix = (prefix, prefixes) => {
|
|
@@ -31495,7 +31501,7 @@ function shouldReportErrorAsUnexpected(error) {
|
|
|
31495
31501
|
if (!isFatal(error)) {
|
|
31496
31502
|
if (error instanceof Error) {
|
|
31497
31503
|
let message = error.message;
|
|
31498
|
-
return !errorMessageImpliesEnvironmentIssue(message
|
|
31504
|
+
return !errorMessageImpliesEnvironmentIssue(message);
|
|
31499
31505
|
}
|
|
31500
31506
|
return !0;
|
|
31501
31507
|
}
|
|
@@ -31504,25 +31510,18 @@ function shouldReportErrorAsUnexpected(error) {
|
|
|
31504
31510
|
function cleanSingleStackTracePath(filePath) {
|
|
31505
31511
|
return normalizePath(filePath).replace("file:/", "/").replace(/^\/?[A-Z]:/, "");
|
|
31506
31512
|
}
|
|
31507
|
-
function errorMessageImpliesEnvironmentIssue(message
|
|
31513
|
+
function errorMessageImpliesEnvironmentIssue(message) {
|
|
31508
31514
|
return [
|
|
31509
31515
|
"EPERM: operation not permitted, scandir",
|
|
31510
31516
|
"EACCES: permission denied",
|
|
31511
31517
|
"EPERM: operation not permitted, symlink",
|
|
31512
31518
|
"This version of npm supports the following node versions",
|
|
31513
|
-
"EBUSY: resource busy or locked",
|
|
31519
|
+
"EBUSY: resource busy or locked, rmdir",
|
|
31514
31520
|
"getaddrinfo ENOTFOUND",
|
|
31515
31521
|
"Client network socket disconnected before secure TLS connection was established",
|
|
31516
31522
|
"spawn EPERM",
|
|
31517
|
-
"socket hang up"
|
|
31518
|
-
|
|
31519
|
-
["Maximum call stack size exceeded", /stubborn-fs.*retryify/]
|
|
31520
|
-
].some((issueMessage) => {
|
|
31521
|
-
if (typeof issueMessage == "string")
|
|
31522
|
-
return message.includes(issueMessage);
|
|
31523
|
-
let [messageCheck, stackCheck] = issueMessage;
|
|
31524
|
-
return message.includes(messageCheck) && stackCheck.test(stack);
|
|
31525
|
-
});
|
|
31523
|
+
"socket hang up"
|
|
31524
|
+
].some((issueMessage) => message.includes(issueMessage));
|
|
31526
31525
|
}
|
|
31527
31526
|
|
|
31528
31527
|
// ../cli-kit/dist/public/node/system.js
|
|
@@ -31765,6 +31764,7 @@ export {
|
|
|
31765
31764
|
useAbortSignal,
|
|
31766
31765
|
require_baseForOwn,
|
|
31767
31766
|
require_baseEach,
|
|
31767
|
+
debounce,
|
|
31768
31768
|
renderConcurrent,
|
|
31769
31769
|
renderInfo,
|
|
31770
31770
|
renderSuccess,
|
|
@@ -31872,4 +31872,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
|
|
|
31872
31872
|
* LICENSE file in the root directory of this source tree.
|
|
31873
31873
|
*)
|
|
31874
31874
|
*/
|
|
31875
|
-
//# sourceMappingURL=chunk-
|
|
31875
|
+
//# sourceMappingURL=chunk-2IJ2KQU2.js.map
|
|
@@ -2,56 +2,31 @@ import {
|
|
|
2
2
|
CLI_KIT_VERSION,
|
|
3
3
|
fetch,
|
|
4
4
|
getEnvironmentData,
|
|
5
|
-
getEnvironmentVariables,
|
|
6
5
|
getLastSeenUserIdAfterAuth,
|
|
7
|
-
getSensitiveEnvironmentData
|
|
8
|
-
|
|
9
|
-
} from "./chunk-RYPZ4D5J.js";
|
|
6
|
+
getSensitiveEnvironmentData
|
|
7
|
+
} from "./chunk-CWXZ7XAM.js";
|
|
10
8
|
import {
|
|
11
|
-
require_semver,
|
|
12
9
|
runWithRateLimit
|
|
13
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YQS36GWM.js";
|
|
14
11
|
import {
|
|
15
|
-
AbortError,
|
|
16
|
-
AbortSilentError,
|
|
17
12
|
alwaysLogAnalytics,
|
|
18
13
|
alwaysLogMetrics,
|
|
19
14
|
analyticsDisabled,
|
|
20
|
-
appendFile,
|
|
21
|
-
captureOutput,
|
|
22
|
-
exec,
|
|
23
|
-
fileExists,
|
|
24
|
-
findPathUp,
|
|
25
|
-
firstPartyDev,
|
|
26
15
|
getAllPublicMetadata,
|
|
27
16
|
getAllSensitiveMetadata,
|
|
28
17
|
getArrayContainsDuplicates,
|
|
29
18
|
getArrayRejectingUndefined,
|
|
30
19
|
isShopify,
|
|
31
20
|
isSpinEnvironment,
|
|
32
|
-
isTruthy,
|
|
33
21
|
isUnitTest,
|
|
34
|
-
mkdir,
|
|
35
22
|
opentelemetryDomain,
|
|
36
23
|
outputContent,
|
|
37
24
|
outputDebug,
|
|
38
|
-
outputToken
|
|
39
|
-
|
|
40
|
-
runWithTimer,
|
|
41
|
-
spinFqdn,
|
|
42
|
-
touchFile,
|
|
43
|
-
useEmbeddedThemeCLI
|
|
44
|
-
} from "./chunk-DKV56LWK.js";
|
|
25
|
+
outputToken
|
|
26
|
+
} from "./chunk-2IJ2KQU2.js";
|
|
45
27
|
import {
|
|
46
|
-
envPaths,
|
|
47
|
-
pathConstants,
|
|
48
28
|
reportingRateLimit
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import {
|
|
51
|
-
cwd,
|
|
52
|
-
dirname,
|
|
53
|
-
joinPath
|
|
54
|
-
} from "./chunk-BB6N2XSA.js";
|
|
29
|
+
} from "./chunk-IDT7CLPE.js";
|
|
55
30
|
import {
|
|
56
31
|
__commonJS,
|
|
57
32
|
__require,
|
|
@@ -150,7 +125,7 @@ var require_version = __commonJS({
|
|
|
150
125
|
});
|
|
151
126
|
|
|
152
127
|
// ../../node_modules/.pnpm/@opentelemetry+api@1.6.0/node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
153
|
-
var
|
|
128
|
+
var require_semver = __commonJS({
|
|
154
129
|
"../../node_modules/.pnpm/@opentelemetry+api@1.6.0/node_modules/@opentelemetry/api/build/src/internal/semver.js"(exports) {
|
|
155
130
|
"use strict";
|
|
156
131
|
init_cjs_shims();
|
|
@@ -206,7 +181,7 @@ var require_global_utils = __commonJS({
|
|
|
206
181
|
init_cjs_shims();
|
|
207
182
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
208
183
|
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0;
|
|
209
|
-
var platform_1 = require_platform(), version_1 = require_version(), semver_1 =
|
|
184
|
+
var platform_1 = require_platform(), version_1 = require_version(), semver_1 = require_semver(), major = version_1.VERSION.split(".")[0], GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`), _global = platform_1._globalThis;
|
|
210
185
|
function registerGlobal(type, instance, diag4, allowOverride = !1) {
|
|
211
186
|
var _a;
|
|
212
187
|
let api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
|
|
@@ -922,8 +897,8 @@ var require_ProxyTracer = __commonJS({
|
|
|
922
897
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
923
898
|
exports.ProxyTracer = void 0;
|
|
924
899
|
var NoopTracer_1 = require_NoopTracer(), NOOP_TRACER = new NoopTracer_1.NoopTracer(), ProxyTracer = class {
|
|
925
|
-
constructor(_provider, name,
|
|
926
|
-
this._provider = _provider, this.name = name, this.version =
|
|
900
|
+
constructor(_provider, name, version, options) {
|
|
901
|
+
this._provider = _provider, this.name = name, this.version = version, this.options = options;
|
|
927
902
|
}
|
|
928
903
|
startSpan(name, options, context) {
|
|
929
904
|
return this._getTracer().startSpan(name, options, context);
|
|
@@ -974,9 +949,9 @@ var require_ProxyTracerProvider = __commonJS({
|
|
|
974
949
|
/**
|
|
975
950
|
* Get a {@link ProxyTracer}
|
|
976
951
|
*/
|
|
977
|
-
getTracer(name,
|
|
952
|
+
getTracer(name, version, options) {
|
|
978
953
|
var _a;
|
|
979
|
-
return (_a = this.getDelegateTracer(name,
|
|
954
|
+
return (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options);
|
|
980
955
|
}
|
|
981
956
|
getDelegate() {
|
|
982
957
|
var _a;
|
|
@@ -988,9 +963,9 @@ var require_ProxyTracerProvider = __commonJS({
|
|
|
988
963
|
setDelegate(delegate) {
|
|
989
964
|
this._delegate = delegate;
|
|
990
965
|
}
|
|
991
|
-
getDelegateTracer(name,
|
|
966
|
+
getDelegateTracer(name, version, options) {
|
|
992
967
|
var _a;
|
|
993
|
-
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name,
|
|
968
|
+
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
|
|
994
969
|
}
|
|
995
970
|
};
|
|
996
971
|
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
@@ -1192,8 +1167,8 @@ var require_metrics = __commonJS({
|
|
|
1192
1167
|
/**
|
|
1193
1168
|
* Returns a meter from the global meter provider.
|
|
1194
1169
|
*/
|
|
1195
|
-
getMeter(name,
|
|
1196
|
-
return this.getMeterProvider().getMeter(name,
|
|
1170
|
+
getMeter(name, version, options) {
|
|
1171
|
+
return this.getMeterProvider().getMeter(name, version, options);
|
|
1197
1172
|
}
|
|
1198
1173
|
/** Remove the global meter provider */
|
|
1199
1174
|
disable() {
|
|
@@ -1374,8 +1349,8 @@ var require_trace = __commonJS({
|
|
|
1374
1349
|
/**
|
|
1375
1350
|
* Returns a tracer from the global tracer provider.
|
|
1376
1351
|
*/
|
|
1377
|
-
getTracer(name,
|
|
1378
|
-
return this.getTracerProvider().getTracer(name,
|
|
1352
|
+
getTracer(name, version) {
|
|
1353
|
+
return this.getTracerProvider().getTracer(name, version);
|
|
1379
1354
|
}
|
|
1380
1355
|
/** Remove the global tracer provider */
|
|
1381
1356
|
disable() {
|
|
@@ -7561,10 +7536,10 @@ var require_MeterProvider = __commonJS({
|
|
|
7561
7536
|
/**
|
|
7562
7537
|
* Get a meter with the configuration of the MeterProvider.
|
|
7563
7538
|
*/
|
|
7564
|
-
getMeter(name,
|
|
7539
|
+
getMeter(name, version = "", options = {}) {
|
|
7565
7540
|
return this._shutdown ? (api_1.diag.warn("A shutdown MeterProvider cannot provide a Meter"), (0, api_1.createNoopMeter)()) : this._sharedState.getMeterSharedState({
|
|
7566
7541
|
name,
|
|
7567
|
-
version
|
|
7542
|
+
version,
|
|
7568
7543
|
schemaUrl: options.schemaUrl
|
|
7569
7544
|
}).meter;
|
|
7570
7545
|
}
|
|
@@ -13916,10 +13891,10 @@ var require_MeterProvider2 = __commonJS({
|
|
|
13916
13891
|
/**
|
|
13917
13892
|
* Get a meter with the configuration of the MeterProvider.
|
|
13918
13893
|
*/
|
|
13919
|
-
getMeter(name,
|
|
13894
|
+
getMeter(name, version = "", options = {}) {
|
|
13920
13895
|
return this._shutdown ? (api_1.diag.warn("A shutdown MeterProvider cannot provide a Meter"), (0, api_1.createNoopMeter)()) : this._sharedState.getMeterSharedState({
|
|
13921
13896
|
name,
|
|
13922
|
-
version
|
|
13897
|
+
version,
|
|
13923
13898
|
schemaUrl: options.schemaUrl
|
|
13924
13899
|
}).meter;
|
|
13925
13900
|
}
|
|
@@ -14980,9 +14955,9 @@ var require_trace4 = __commonJS({
|
|
|
14980
14955
|
for (; !ilmEntry.done; ) {
|
|
14981
14956
|
let scopeSpans = ilmEntry.value;
|
|
14982
14957
|
if (scopeSpans.length > 0) {
|
|
14983
|
-
let { name, version
|
|
14958
|
+
let { name, version, schemaUrl } = scopeSpans[0].instrumentationLibrary, spans = scopeSpans.map((readableSpan) => (0, internal_2.sdkSpanToOtlpSpan)(readableSpan, useHex));
|
|
14984
14959
|
scopeResourceSpans.push({
|
|
14985
|
-
scope: { name, version
|
|
14960
|
+
scope: { name, version },
|
|
14986
14961
|
spans,
|
|
14987
14962
|
schemaUrl
|
|
14988
14963
|
});
|
|
@@ -15173,9 +15148,9 @@ var require_logs = __commonJS({
|
|
|
15173
15148
|
function createResourceMap(logRecords) {
|
|
15174
15149
|
let resourceMap = /* @__PURE__ */ new Map();
|
|
15175
15150
|
for (let record of logRecords) {
|
|
15176
|
-
let { resource, instrumentationScope: { name, version
|
|
15151
|
+
let { resource, instrumentationScope: { name, version = "", schemaUrl = "" } } = record, ismMap = resourceMap.get(resource);
|
|
15177
15152
|
ismMap || (ismMap = /* @__PURE__ */ new Map(), resourceMap.set(resource, ismMap));
|
|
15178
|
-
let ismKey = `${name}@${
|
|
15153
|
+
let ismKey = `${name}@${version}:${schemaUrl}`, records = ismMap.get(ismKey);
|
|
15179
15154
|
records || (records = [], ismMap.set(ismKey, records)), records.push(record);
|
|
15180
15155
|
}
|
|
15181
15156
|
return resourceMap;
|
|
@@ -15188,9 +15163,9 @@ var require_logs = __commonJS({
|
|
|
15188
15163
|
droppedAttributesCount: 0
|
|
15189
15164
|
},
|
|
15190
15165
|
scopeLogs: Array.from(ismMap, ([, scopeLogs]) => {
|
|
15191
|
-
let { instrumentationScope: { name, version
|
|
15166
|
+
let { instrumentationScope: { name, version, schemaUrl } } = scopeLogs[0];
|
|
15192
15167
|
return {
|
|
15193
|
-
scope: { name, version
|
|
15168
|
+
scope: { name, version },
|
|
15194
15169
|
logRecords: scopeLogs.map((log) => toLogRecord(log, useHex)),
|
|
15195
15170
|
schemaUrl
|
|
15196
15171
|
};
|
|
@@ -15376,161 +15351,6 @@ async function getListOfTunnelPlugins(config) {
|
|
|
15376
15351
|
// ../cli-kit/dist/public/node/analytics.js
|
|
15377
15352
|
init_cjs_shims();
|
|
15378
15353
|
|
|
15379
|
-
// ../cli-kit/dist/public/node/ruby.js
|
|
15380
|
-
init_cjs_shims();
|
|
15381
|
-
var import_semver = __toESM(require_semver(), 1);
|
|
15382
|
-
import { fileURLToPath } from "url";
|
|
15383
|
-
var RubyCLIVersion = "2.35.0", MinBundlerVersion = "2.3.11", MinRubyVersion = "2.7.5", MinWdmWindowsVersion = "0.1.0";
|
|
15384
|
-
async function execCLI2(args, options = {}) {
|
|
15385
|
-
let currentEnv = getEnvironmentVariables(), embedded = useEmbeddedThemeCLI(currentEnv) && !currentEnv.SHOPIFY_CLI_2_0_DIRECTORY;
|
|
15386
|
-
await installCLIDependencies(options.stdout ?? process.stdout, embedded);
|
|
15387
|
-
let env = {
|
|
15388
|
-
...currentEnv,
|
|
15389
|
-
SHOPIFY_CLI_STOREFRONT_RENDERER_AUTH_TOKEN: options.storefrontToken,
|
|
15390
|
-
SHOPIFY_CLI_ADMIN_AUTH_TOKEN: options.adminToken,
|
|
15391
|
-
SHOPIFY_SHOP: options.store,
|
|
15392
|
-
SHOPIFY_CLI_AUTH_TOKEN: options.token,
|
|
15393
|
-
SHOPIFY_CLI_RUN_AS_SUBPROCESS: "true",
|
|
15394
|
-
SHOPIFY_CLI_RUBY_BIN: rubyExecutable(),
|
|
15395
|
-
// Bundler uses this Gemfile to understand which gems are available in the
|
|
15396
|
-
// environment. We use this to specify our own Gemfile for CLI2, which exists
|
|
15397
|
-
// outside the user's project directory.
|
|
15398
|
-
BUNDLE_GEMFILE: joinPath(await shopifyCLIDirectory(embedded), "Gemfile"),
|
|
15399
|
-
...await getSpinEnvironmentVariables(),
|
|
15400
|
-
SHOPIFY_CLI_1P_DEV: firstPartyDev() ? "1" : "0",
|
|
15401
|
-
SHOPIFY_CLI_VERSION: CLI_KIT_VERSION
|
|
15402
|
-
};
|
|
15403
|
-
try {
|
|
15404
|
-
let shopifyExecutable = embedded ? [rubyExecutable(), await embeddedCLIExecutable()] : ["shopify"];
|
|
15405
|
-
await runBundler(["exec", ...shopifyExecutable, ...args], {
|
|
15406
|
-
...options.stdout === void 0 && { stdio: "inherit" },
|
|
15407
|
-
cwd: options.directory ?? cwd(),
|
|
15408
|
-
env,
|
|
15409
|
-
...options.stdout !== void 0 && { stdout: options.stdout, stderr: options.stderr },
|
|
15410
|
-
signal: options.signal
|
|
15411
|
-
});
|
|
15412
|
-
} catch {
|
|
15413
|
-
throw new AbortSilentError();
|
|
15414
|
-
}
|
|
15415
|
-
}
|
|
15416
|
-
async function installCLIDependencies(stdout, embedded = !1) {
|
|
15417
|
-
let localCLI = await shopifyCLIDirectory(embedded), exists = await fileExists(localCLI);
|
|
15418
|
-
exists || stdout.write("Installing theme dependencies...");
|
|
15419
|
-
let usingLocalCLI2 = embedded || isTruthy(getEnvironmentVariables().SHOPIFY_CLI_2_0_DIRECTORY);
|
|
15420
|
-
await validateRubyEnv(), usingLocalCLI2 ? await bundleInstallLocalShopifyCLI(localCLI) : (await createShopifyCLIWorkingDirectory(), await createShopifyCLIGemfile(), await bundleInstallShopifyCLI()), exists || stdout.write("Installed theme dependencies!");
|
|
15421
|
-
}
|
|
15422
|
-
async function validateRubyEnv() {
|
|
15423
|
-
await validateRuby(), await validateBundler();
|
|
15424
|
-
}
|
|
15425
|
-
async function validateRuby() {
|
|
15426
|
-
let version2;
|
|
15427
|
-
try {
|
|
15428
|
-
let stdout = await captureOutput(rubyExecutable(), ["-v"]);
|
|
15429
|
-
version2 = (0, import_semver.coerce)(stdout);
|
|
15430
|
-
} catch {
|
|
15431
|
-
throw new AbortError("Ruby environment not found", `Make sure you have Ruby installed on your system. ${outputContent`${outputToken.link("Documentation.", "https://www.ruby-lang.org/en/documentation/installation/")}`.value}`);
|
|
15432
|
-
}
|
|
15433
|
-
let isValid = version2?.compare(MinRubyVersion);
|
|
15434
|
-
if (isValid === -1 || isValid === void 0)
|
|
15435
|
-
throw new AbortError(`Ruby version ${outputContent`${outputToken.yellow(version2?.raw ?? "unknown")}`.value} is not supported`, `Make sure you have at least Ruby ${outputContent`${outputToken.yellow(MinRubyVersion)}`.value} installed on your system. ${outputContent`${outputToken.link("Documentation.", "https://www.ruby-lang.org/en/documentation/installation/")}`.value}`);
|
|
15436
|
-
}
|
|
15437
|
-
async function validateBundler() {
|
|
15438
|
-
let version2;
|
|
15439
|
-
try {
|
|
15440
|
-
let stdout = await captureOutput(bundleExecutable(), ["-v"], { env: { BUNDLE_USER_HOME: bundleUserHome() } });
|
|
15441
|
-
version2 = (0, import_semver.coerce)(stdout);
|
|
15442
|
-
} catch {
|
|
15443
|
-
throw new AbortError("Bundler not found", `To install the latest version of Bundler, run ${outputContent`${outputToken.genericShellCommand(`${gemExecutable()} install bundler`)}`.value}`);
|
|
15444
|
-
}
|
|
15445
|
-
let isValid = version2?.compare(MinBundlerVersion);
|
|
15446
|
-
if (isValid === -1 || isValid === void 0)
|
|
15447
|
-
throw new AbortError(`Bundler version ${outputContent`${outputToken.yellow(version2?.raw ?? "unknown")}`.value} is not supported`, `To update to the latest version of Bundler, run ${outputContent`${outputToken.genericShellCommand(`${gemExecutable()} install bundler`)}`.value}`);
|
|
15448
|
-
}
|
|
15449
|
-
async function createShopifyCLIWorkingDirectory() {
|
|
15450
|
-
return mkdir(await shopifyCLIDirectory());
|
|
15451
|
-
}
|
|
15452
|
-
async function createShopifyCLIGemfile() {
|
|
15453
|
-
let directory = await shopifyCLIDirectory(), gemfileContent = getBaseGemfileContent().concat(getWindowsDependencies());
|
|
15454
|
-
await addContentToGemfile(directory, gemfileContent);
|
|
15455
|
-
}
|
|
15456
|
-
async function bundleInstallLocalShopifyCLI(directory) {
|
|
15457
|
-
await addContentToGemfile(directory, getWindowsDependencies()), await shopifyBundleInstall(directory);
|
|
15458
|
-
}
|
|
15459
|
-
function getBaseGemfileContent() {
|
|
15460
|
-
return ["source 'https://rubygems.org'", `gem 'shopify-cli', '${RubyCLIVersion}'`];
|
|
15461
|
-
}
|
|
15462
|
-
function getWindowsDependencies() {
|
|
15463
|
-
return platformAndArch().platform === "windows" ? [`gem 'wdm', '>= ${MinWdmWindowsVersion}'`] : [];
|
|
15464
|
-
}
|
|
15465
|
-
async function addContentToGemfile(gemfileDirectory, content) {
|
|
15466
|
-
let gemfilePath = joinPath(gemfileDirectory, "Gemfile");
|
|
15467
|
-
await fileExists(gemfilePath) || await touchFile(gemfilePath);
|
|
15468
|
-
let gemContent = await readFile(gemfilePath, { encoding: "utf8" }), contentNoExisting = content.filter((line) => !gemContent.includes(line)).join(`
|
|
15469
|
-
`);
|
|
15470
|
-
contentNoExisting && await appendFile(gemfilePath, contentNoExisting.concat(`
|
|
15471
|
-
`));
|
|
15472
|
-
}
|
|
15473
|
-
async function bundleInstallShopifyCLI() {
|
|
15474
|
-
await shopifyBundleInstall(await shopifyCLIDirectory());
|
|
15475
|
-
}
|
|
15476
|
-
async function shopifyCLIDirectory(embedded = !1) {
|
|
15477
|
-
let embeddedDirectory = await findPathUp("assets/cli-ruby", {
|
|
15478
|
-
type: "directory",
|
|
15479
|
-
cwd: dirname(fileURLToPath(import.meta.url))
|
|
15480
|
-
}), bundledDirectory = joinPath(pathConstants.directories.cache.vendor.path(), "ruby-cli", RubyCLIVersion);
|
|
15481
|
-
return embedded ? embeddedDirectory : getEnvironmentVariables().SHOPIFY_CLI_2_0_DIRECTORY ?? bundledDirectory;
|
|
15482
|
-
}
|
|
15483
|
-
async function version() {
|
|
15484
|
-
let parseOutput = (version2) => version2.match(/ruby (\d+\.\d+\.\d+)/)?.[1];
|
|
15485
|
-
return captureOutput(rubyExecutable(), ["-v"]).then(parseOutput).catch(() => {
|
|
15486
|
-
});
|
|
15487
|
-
}
|
|
15488
|
-
function getRubyBinDir() {
|
|
15489
|
-
return getEnvironmentVariables().SHOPIFY_RUBY_BINDIR;
|
|
15490
|
-
}
|
|
15491
|
-
function rubyExecutable() {
|
|
15492
|
-
let rubyBinDir = getRubyBinDir();
|
|
15493
|
-
return rubyBinDir ? joinPath(rubyBinDir, "ruby") : "ruby";
|
|
15494
|
-
}
|
|
15495
|
-
function bundleExecutable() {
|
|
15496
|
-
let rubyBinDir = getRubyBinDir();
|
|
15497
|
-
return rubyBinDir ? joinPath(rubyBinDir, "bundle") : "bundle";
|
|
15498
|
-
}
|
|
15499
|
-
function gemExecutable() {
|
|
15500
|
-
let rubyBinDir = getRubyBinDir();
|
|
15501
|
-
return rubyBinDir ? joinPath(rubyBinDir, "gem") : "gem";
|
|
15502
|
-
}
|
|
15503
|
-
async function embeddedCLIExecutable() {
|
|
15504
|
-
let cliDirectory = await shopifyCLIDirectory(!0);
|
|
15505
|
-
return joinPath(cliDirectory, "bin", "shopify");
|
|
15506
|
-
}
|
|
15507
|
-
async function getSpinEnvironmentVariables() {
|
|
15508
|
-
return isSpinEnvironment() ? {
|
|
15509
|
-
SPIN_FQDN: await spinFqdn(),
|
|
15510
|
-
SPIN: "1"
|
|
15511
|
-
} : {};
|
|
15512
|
-
}
|
|
15513
|
-
async function shopifyBundleInstall(directory) {
|
|
15514
|
-
return runWithTimer("cmd_all_timing_network_ms")(async () => {
|
|
15515
|
-
await runBundler(["install"], { cwd: directory });
|
|
15516
|
-
});
|
|
15517
|
-
}
|
|
15518
|
-
function bundleUserHome() {
|
|
15519
|
-
if (platformAndArch().platform === "windows" && process.env.PUBLIC)
|
|
15520
|
-
return joinPath(process.env.PUBLIC, "AppData", "Local", "shopify-bundler-nodejs", "Cache");
|
|
15521
|
-
}
|
|
15522
|
-
async function runBundler(args, options) {
|
|
15523
|
-
return exec(bundleExecutable(), args, {
|
|
15524
|
-
...options,
|
|
15525
|
-
env: {
|
|
15526
|
-
...options.env,
|
|
15527
|
-
BUNDLE_USER_HOME: bundleUserHome(),
|
|
15528
|
-
BUNDLE_WITHOUT: "development:test",
|
|
15529
|
-
BUNDLE_PATH: envPaths("shopify-gems").cache
|
|
15530
|
-
}
|
|
15531
|
-
});
|
|
15532
|
-
}
|
|
15533
|
-
|
|
15534
15354
|
// ../cli-kit/dist/public/node/monorail.js
|
|
15535
15355
|
init_cjs_shims();
|
|
15536
15356
|
var url = "https://monorail-edge.shopifysvc.com/v1/produce", MONORAIL_COMMAND_TOPIC = "app_cli3_command/1.15", publishedCommandNames = /* @__PURE__ */ new Set();
|
|
@@ -15908,7 +15728,7 @@ async function buildPayload({ config, errorMessage, exitMode }) {
|
|
|
15908
15728
|
total_time: wallClockElapsed,
|
|
15909
15729
|
success: exitMode === "ok" && errorMessage === void 0,
|
|
15910
15730
|
cli_version: CLI_KIT_VERSION,
|
|
15911
|
-
ruby_version:
|
|
15731
|
+
ruby_version: "",
|
|
15912
15732
|
node_version: process.version.replace("v", ""),
|
|
15913
15733
|
is_employee: await isShopify(),
|
|
15914
15734
|
...environmentData,
|
|
@@ -15944,10 +15764,8 @@ function sanitizePayload2(payload) {
|
|
|
15944
15764
|
}
|
|
15945
15765
|
|
|
15946
15766
|
export {
|
|
15947
|
-
execCLI2,
|
|
15948
|
-
version,
|
|
15949
15767
|
fanoutHooks,
|
|
15950
15768
|
getListOfTunnelPlugins,
|
|
15951
15769
|
reportAnalyticsEvent
|
|
15952
15770
|
};
|
|
15953
|
-
//# sourceMappingURL=chunk-
|
|
15771
|
+
//# sourceMappingURL=chunk-4NI5A7A4.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
packageManagerFromUserAgent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YQS36GWM.js";
|
|
4
4
|
import {
|
|
5
5
|
currentProcessIsGlobal,
|
|
6
6
|
inferPackageManagerForGlobalCLI,
|
|
7
7
|
outputContent,
|
|
8
8
|
outputToken
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2IJ2KQU2.js";
|
|
10
10
|
import {
|
|
11
11
|
init_cjs_shims
|
|
12
12
|
} from "./chunk-POZ5MGPT.js";
|
|
@@ -24,4 +24,4 @@ function getOutputUpdateCLIReminder(version) {
|
|
|
24
24
|
export {
|
|
25
25
|
getOutputUpdateCLIReminder
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-64XEMSHA.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
removeSession,
|
|
13
13
|
setCachedPartnerAccountStatus,
|
|
14
14
|
setSession
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YQS36GWM.js";
|
|
16
16
|
import {
|
|
17
17
|
AbortError,
|
|
18
18
|
BugError,
|
|
@@ -44,13 +44,13 @@ import {
|
|
|
44
44
|
spinFqdn,
|
|
45
45
|
stringifyMessage,
|
|
46
46
|
themeToken
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-2IJ2KQU2.js";
|
|
48
48
|
import {
|
|
49
|
-
defaultThemeKitAccessDomain,
|
|
50
49
|
environmentVariables,
|
|
51
50
|
sessionConstants,
|
|
52
|
-
systemEnvironmentVariables
|
|
53
|
-
|
|
51
|
+
systemEnvironmentVariables,
|
|
52
|
+
themeKitAccessDomain
|
|
53
|
+
} from "./chunk-IDT7CLPE.js";
|
|
54
54
|
import {
|
|
55
55
|
cwd
|
|
56
56
|
} from "./chunk-BB6N2XSA.js";
|
|
@@ -29291,7 +29291,7 @@ var require_lib3 = __commonJS({
|
|
|
29291
29291
|
|
|
29292
29292
|
// ../cli-kit/dist/public/common/version.js
|
|
29293
29293
|
init_cjs_shims();
|
|
29294
|
-
var CLI_KIT_VERSION = "3.
|
|
29294
|
+
var CLI_KIT_VERSION = "3.70.0";
|
|
29295
29295
|
|
|
29296
29296
|
// ../cli-kit/dist/private/node/analytics.js
|
|
29297
29297
|
init_cjs_shims();
|
|
@@ -32195,7 +32195,7 @@ function buildHeaders(token) {
|
|
|
32195
32195
|
...firstPartyDev() && { "X-Shopify-Cli-Employee": "1" }
|
|
32196
32196
|
};
|
|
32197
32197
|
if (token) {
|
|
32198
|
-
let authString = token.match(/^shp(at|ua|ca)/) ? token : `Bearer ${token}`;
|
|
32198
|
+
let authString = token.match(/^shp(at|ua|ca|tka)/) ? token : `Bearer ${token}`;
|
|
32199
32199
|
headers.authorization = authString, headers["X-Shopify-Access-Token"] = authString;
|
|
32200
32200
|
}
|
|
32201
32201
|
return headers;
|
|
@@ -32627,7 +32627,7 @@ async function makeVerboseRequest({ request, url }) {
|
|
|
32627
32627
|
for (let [key, value] of err2.response.headers)
|
|
32628
32628
|
responseHeaderIsInteresting(key) && (responseHeaders[key] = value);
|
|
32629
32629
|
let sanitizedHeaders = sanitizedHeadersOutput(responseHeaders);
|
|
32630
|
-
if (err2
|
|
32630
|
+
if (errorsIncludeStatus429(err2)) {
|
|
32631
32631
|
let delayMs;
|
|
32632
32632
|
try {
|
|
32633
32633
|
delayMs = responseHeaders["retry-after"] ? Number.parseInt(responseHeaders["retry-after"], 10) : void 0;
|
|
@@ -32671,6 +32671,9 @@ async function makeVerboseRequest({ request, url }) {
|
|
|
32671
32671
|
requestId: responseHeaders["x-request-id"]
|
|
32672
32672
|
};
|
|
32673
32673
|
}
|
|
32674
|
+
function errorsIncludeStatus429(error) {
|
|
32675
|
+
return error.response.status === 429 ? !0 : typeof error.response.errors == "string" ? !1 : error.response.errors?.some((error2) => error2.extensions?.code === "429") ?? !1;
|
|
32676
|
+
}
|
|
32674
32677
|
async function simpleRequestWithDebugLog({ request, url }, errorHandler2) {
|
|
32675
32678
|
let result = await makeVerboseRequest({ request, url });
|
|
32676
32679
|
switch (outputDebug(`Request to ${result.sanitizedUrl} completed in ${result.duration} ms
|
|
@@ -34140,8 +34143,8 @@ function restRequestBody(requestBody) {
|
|
|
34140
34143
|
if (requestBody)
|
|
34141
34144
|
return JSON.stringify(requestBody);
|
|
34142
34145
|
}
|
|
34143
|
-
function restRequestUrl(session, apiVersion, path, searchParams = {}
|
|
34144
|
-
let
|
|
34146
|
+
function restRequestUrl(session, apiVersion, path, searchParams = {}) {
|
|
34147
|
+
let url = new URL(isThemeAccessSession(session) ? `https://${themeKitAccessDomain}/cli/admin/api/${apiVersion}${path}.json` : `https://${session.storeFqdn}/admin/api/${apiVersion}${path}.json`);
|
|
34145
34148
|
return Object.entries(searchParams).forEach(([name, value]) => {
|
|
34146
34149
|
url.searchParams.set(name, value);
|
|
34147
34150
|
}), url.toString();
|
|
@@ -34162,7 +34165,7 @@ init_cjs_shims();
|
|
|
34162
34165
|
|
|
34163
34166
|
// ../cli-kit/dist/private/node/api/graphql.js
|
|
34164
34167
|
init_cjs_shims();
|
|
34165
|
-
function debugLogRequestInfo(api, query, variables, headers = {}) {
|
|
34168
|
+
function debugLogRequestInfo(api, query, url, variables, headers = {}) {
|
|
34166
34169
|
outputDebug(outputContent`Sending ${outputToken.json(api)} GraphQL request:
|
|
34167
34170
|
${outputToken.raw(query.toString().trim())}
|
|
34168
34171
|
${variables ? `
|
|
@@ -34170,8 +34173,8 @@ With variables:
|
|
|
34170
34173
|
${sanitizeVariables(variables)}
|
|
34171
34174
|
` : ""}
|
|
34172
34175
|
With request headers:
|
|
34173
|
-
${sanitizedHeadersOutput(headers)}
|
|
34174
|
-
`);
|
|
34176
|
+
${sanitizedHeadersOutput(headers)}\n
|
|
34177
|
+
to ${sanitizeURL(url)}`);
|
|
34175
34178
|
}
|
|
34176
34179
|
function sanitizeVariables(variables) {
|
|
34177
34180
|
let result = { ...variables };
|
|
@@ -34201,7 +34204,7 @@ async function performGraphQLRequest(options2) {
|
|
|
34201
34204
|
...addedHeaders,
|
|
34202
34205
|
...buildHeaders(token)
|
|
34203
34206
|
};
|
|
34204
|
-
debugLogRequestInfo(api, queryAsString, variables, headers);
|
|
34207
|
+
debugLogRequestInfo(api, queryAsString, url, variables, headers);
|
|
34205
34208
|
let clientOptions = { agent: await httpsAgent(), headers }, client = new GraphQLClient(url, clientOptions);
|
|
34206
34209
|
return runWithTimer("cmd_all_timing_network_ms")(async () => {
|
|
34207
34210
|
let response = await retryAwareRequest({ request: () => client.rawRequest(queryAsString, variables), url }, responseOptions?.handleErrors === !1 ? void 0 : errorHandler(api));
|
|
@@ -34300,9 +34303,6 @@ function getEnvironmentVariables() {
|
|
|
34300
34303
|
function getPartnersToken() {
|
|
34301
34304
|
return getEnvironmentVariables()[environmentVariables.partnersToken];
|
|
34302
34305
|
}
|
|
34303
|
-
function getOrganization() {
|
|
34304
|
-
return getEnvironmentVariables()[environmentVariables.organization];
|
|
34305
|
-
}
|
|
34306
34306
|
function getBackendPort() {
|
|
34307
34307
|
let backendPort = getEnvironmentVariables()[systemEnvironmentVariables.backendPort];
|
|
34308
34308
|
if (backendPort && !isNaN(Number(backendPort)))
|
|
@@ -34591,16 +34591,6 @@ function flagIncluded(flag, commandClass) {
|
|
|
34591
34591
|
export {
|
|
34592
34592
|
getNextDeprecationDate,
|
|
34593
34593
|
setNextDeprecationDate,
|
|
34594
|
-
username,
|
|
34595
|
-
platformAndArch,
|
|
34596
|
-
hashString,
|
|
34597
|
-
fileHash,
|
|
34598
|
-
randomUUID,
|
|
34599
|
-
nonRandomUUID,
|
|
34600
|
-
getEnvironmentVariables,
|
|
34601
|
-
getPartnersToken,
|
|
34602
|
-
getOrganization,
|
|
34603
|
-
getBackendPort,
|
|
34604
34594
|
CLI_KIT_VERSION,
|
|
34605
34595
|
require_mime_types,
|
|
34606
34596
|
require_graphql2 as require_graphql,
|
|
@@ -34620,6 +34610,10 @@ export {
|
|
|
34620
34610
|
normalizeStoreFqdn,
|
|
34621
34611
|
ok,
|
|
34622
34612
|
err,
|
|
34613
|
+
hashString,
|
|
34614
|
+
fileHash,
|
|
34615
|
+
randomUUID,
|
|
34616
|
+
nonRandomUUID,
|
|
34623
34617
|
exchangeCustomPartnerToken,
|
|
34624
34618
|
restRequestBody,
|
|
34625
34619
|
restRequestUrl,
|
|
@@ -34631,10 +34625,15 @@ export {
|
|
|
34631
34625
|
partnersRequest,
|
|
34632
34626
|
partnersRequestDoc,
|
|
34633
34627
|
handleDeprecations,
|
|
34628
|
+
getEnvironmentVariables,
|
|
34629
|
+
getPartnersToken,
|
|
34630
|
+
getBackendPort,
|
|
34634
34631
|
getLastSeenUserIdAfterAuth,
|
|
34635
34632
|
setLastSeenUserIdAfterAuth,
|
|
34636
34633
|
setLastSeenAuthMethod,
|
|
34637
34634
|
ensureAuthenticated,
|
|
34635
|
+
username,
|
|
34636
|
+
platformAndArch,
|
|
34638
34637
|
startAnalytics,
|
|
34639
34638
|
getEnvironmentData,
|
|
34640
34639
|
getSensitiveEnvironmentData
|
|
@@ -34657,4 +34656,4 @@ mime-types/index.js:
|
|
|
34657
34656
|
* MIT Licensed
|
|
34658
34657
|
*)
|
|
34659
34658
|
*/
|
|
34660
|
-
//# sourceMappingURL=chunk-
|
|
34659
|
+
//# sourceMappingURL=chunk-CWXZ7XAM.js.map
|