@shopify/create-app 3.69.4 → 3.71.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-Q3BCFN7X.js → chunk-33RXIX54.js} +15 -20
- package/dist/{chunk-4XZVKK5N.js → chunk-4ZKJC2JB.js} +3 -3
- package/dist/{chunk-L7M22NDW.js → chunk-6WYZ3SZB.js} +2 -2
- package/dist/{chunk-2A7GNM7F.js → chunk-7F4XFNYI.js} +2 -2
- package/dist/{chunk-AZIUHI45.js → chunk-CQGOPQQH.js} +5 -5
- package/dist/{chunk-CZRFEKLZ.js → chunk-JPPYUT6M.js} +23535 -23336
- package/dist/{chunk-MX4RJDBM.js → chunk-KYB6A4PE.js} +1 -2
- package/dist/{chunk-A7RFWXE2.js → chunk-PATNPZAL.js} +14 -11
- package/dist/{chunk-BB4M6AYQ.js → chunk-PGUENKZG.js} +28 -212
- package/dist/{chunk-ZYFGLOXH.js → chunk-PUMOQDXS.js} +258 -57
- package/dist/{chunk-PNN7RS7Y.js → chunk-X36SPRUS.js} +100 -11
- package/dist/{custom-oclif-loader-53O4TZIJ.js → custom-oclif-loader-OP5VH4KR.js} +9 -11
- package/dist/{del-42HQA7PR.js → del-2FOJ63S7.js} +4 -4
- package/dist/{error-handler-WHWFBH7O.js → error-handler-WKRKCPUQ.js} +11 -13
- package/dist/hooks/postrun.js +9 -11
- package/dist/hooks/prerun.js +9 -13
- package/dist/index.js +149240 -145769
- package/dist/index.test.js +120 -65
- package/dist/{lib-H5ZGVBFQ.js → lib-EGJUAXU5.js} +5 -5
- package/dist/{local-RKKDDHC7.js → local-IPRKH7YW.js} +9 -9
- package/dist/{node-package-manager-MZVZACMV.js → node-package-manager-CPX2FDHZ.js} +8 -10
- package/dist/{out-ZDSLKX4N.js → out-MHEKZJWS.js} +2 -2
- package/dist/{path-G6AAF6UV.js → path-EGU2FCFY.js} +2 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-5ZHMFGW7.js → ui-AAFX7Q72.js} +7 -9
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
- package/dist/chunk-BB6N2XSA.js +0 -112
- package/dist/chunk-G6AY2JW5.js +0 -115
- package/dist/constants-GVJLI6RE.js +0 -24
- package/dist/system-HEFPAS7V.js +0 -27
|
@@ -2579,7 +2579,6 @@ var require_out4 = __commonJS({
|
|
|
2579
2579
|
|
|
2580
2580
|
export {
|
|
2581
2581
|
require_merge2,
|
|
2582
|
-
require_micromatch,
|
|
2583
2582
|
require_out4 as require_out
|
|
2584
2583
|
};
|
|
2585
2584
|
/*! Bundled license information:
|
|
@@ -2598,4 +2597,4 @@ queue-microtask/index.js:
|
|
|
2598
2597
|
run-parallel/index.js:
|
|
2599
2598
|
(*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
2600
2599
|
*/
|
|
2601
|
-
//# sourceMappingURL=chunk-
|
|
2600
|
+
//# sourceMappingURL=chunk-KYB6A4PE.js.map
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
AbortError,
|
|
4
4
|
BugError,
|
|
5
5
|
captureOutput,
|
|
6
|
+
envPaths,
|
|
6
7
|
exec,
|
|
7
8
|
fileExists,
|
|
8
9
|
findPathUp,
|
|
@@ -17,14 +18,11 @@ import {
|
|
|
17
18
|
require_get_stream,
|
|
18
19
|
runWithTimer,
|
|
19
20
|
writeFile
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import {
|
|
22
|
-
envPaths
|
|
23
|
-
} from "./chunk-G6AY2JW5.js";
|
|
21
|
+
} from "./chunk-JPPYUT6M.js";
|
|
24
22
|
import {
|
|
25
23
|
dirname,
|
|
26
24
|
joinPath
|
|
27
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-X36SPRUS.js";
|
|
28
26
|
import {
|
|
29
27
|
__commonJS,
|
|
30
28
|
__require,
|
|
@@ -11303,14 +11301,18 @@ function removeSession(config = cliKitStore()) {
|
|
|
11303
11301
|
outputDebug(outputContent`Removing session store...`), config.delete("sessionStore");
|
|
11304
11302
|
}
|
|
11305
11303
|
async function cacheRetrieveOrRepopulate(key, fn, timeout, config = cliKitStore()) {
|
|
11306
|
-
let
|
|
11304
|
+
let cached = cacheRetrieve(key, config);
|
|
11307
11305
|
if (cached?.value !== void 0 && (timeout === void 0 || Date.now() - cached.timestamp < timeout))
|
|
11308
11306
|
return cached.value;
|
|
11309
11307
|
let value = await fn();
|
|
11310
|
-
return
|
|
11308
|
+
return cacheStore(key, value, config), value;
|
|
11309
|
+
}
|
|
11310
|
+
function cacheStore(key, value, config = cliKitStore()) {
|
|
11311
|
+
let cache = config.get("cache") || {};
|
|
11312
|
+
cache[key] = { value, timestamp: Date.now() }, config.set("cache", cache);
|
|
11311
11313
|
}
|
|
11312
11314
|
function cacheRetrieve(key, config = cliKitStore()) {
|
|
11313
|
-
return (config.get("cache") || {})[key]
|
|
11315
|
+
return (config.get("cache") || {})[key];
|
|
11314
11316
|
}
|
|
11315
11317
|
function timeIntervalToMilliseconds({ days = 0, hours = 0, minutes = 0, seconds = 0 }) {
|
|
11316
11318
|
return (days * 24 * 60 * 60 + hours * 60 * 60 + minutes * 60 + seconds) * 1e3;
|
|
@@ -15168,7 +15170,7 @@ async function checkForNewVersion(dependency, currentVersion, { cacheExpiryInHou
|
|
|
15168
15170
|
return lastVersion;
|
|
15169
15171
|
}
|
|
15170
15172
|
function checkForCachedNewVersion(dependency, currentVersion) {
|
|
15171
|
-
let cacheKey = `npm-package-${dependency}`, lastVersion = cacheRetrieve(cacheKey);
|
|
15173
|
+
let cacheKey = `npm-package-${dependency}`, lastVersion = cacheRetrieve(cacheKey)?.value;
|
|
15172
15174
|
if (lastVersion && new import_semver3.SemVer(currentVersion).compare(lastVersion) < 0)
|
|
15173
15175
|
return lastVersion;
|
|
15174
15176
|
}
|
|
@@ -15313,13 +15315,14 @@ function inferPackageManager(optionsPackageManager, env = process.env) {
|
|
|
15313
15315
|
}
|
|
15314
15316
|
|
|
15315
15317
|
export {
|
|
15316
|
-
require_semver2 as require_semver,
|
|
15317
15318
|
require_ajv,
|
|
15318
15319
|
LocalStorage,
|
|
15319
15320
|
getSession,
|
|
15320
15321
|
setSession,
|
|
15321
15322
|
removeSession,
|
|
15322
15323
|
cacheRetrieveOrRepopulate,
|
|
15324
|
+
cacheStore,
|
|
15325
|
+
cacheRetrieve,
|
|
15323
15326
|
runAtMinimumInterval,
|
|
15324
15327
|
runWithRateLimit,
|
|
15325
15328
|
getCachedPartnerAccountStatus,
|
|
@@ -15387,4 +15390,4 @@ deep-extend/lib/deep-extend.js:
|
|
|
15387
15390
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
15388
15391
|
*)
|
|
15389
15392
|
*/
|
|
15390
|
-
//# sourceMappingURL=chunk-
|
|
15393
|
+
//# sourceMappingURL=chunk-PATNPZAL.js.map
|
|
@@ -2,56 +2,29 @@ import {
|
|
|
2
2
|
CLI_KIT_VERSION,
|
|
3
3
|
fetch,
|
|
4
4
|
getEnvironmentData,
|
|
5
|
-
getEnvironmentVariables,
|
|
6
5
|
getLastSeenUserIdAfterAuth,
|
|
7
|
-
getSensitiveEnvironmentData
|
|
8
|
-
|
|
9
|
-
} from "./chunk-ZYFGLOXH.js";
|
|
6
|
+
getSensitiveEnvironmentData
|
|
7
|
+
} from "./chunk-PUMOQDXS.js";
|
|
10
8
|
import {
|
|
11
|
-
require_semver,
|
|
12
9
|
runWithRateLimit
|
|
13
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PATNPZAL.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
25
|
outputToken,
|
|
39
|
-
readFile,
|
|
40
|
-
runWithTimer,
|
|
41
|
-
spinFqdn,
|
|
42
|
-
touchFile,
|
|
43
|
-
useEmbeddedThemeCLI
|
|
44
|
-
} from "./chunk-CZRFEKLZ.js";
|
|
45
|
-
import {
|
|
46
|
-
envPaths,
|
|
47
|
-
pathConstants,
|
|
48
26
|
reportingRateLimit
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import {
|
|
51
|
-
cwd,
|
|
52
|
-
dirname,
|
|
53
|
-
joinPath
|
|
54
|
-
} from "./chunk-BB6N2XSA.js";
|
|
27
|
+
} from "./chunk-JPPYUT6M.js";
|
|
55
28
|
import {
|
|
56
29
|
__commonJS,
|
|
57
30
|
__require,
|
|
@@ -150,7 +123,7 @@ var require_version = __commonJS({
|
|
|
150
123
|
});
|
|
151
124
|
|
|
152
125
|
// ../../node_modules/.pnpm/@opentelemetry+api@1.6.0/node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
153
|
-
var
|
|
126
|
+
var require_semver = __commonJS({
|
|
154
127
|
"../../node_modules/.pnpm/@opentelemetry+api@1.6.0/node_modules/@opentelemetry/api/build/src/internal/semver.js"(exports) {
|
|
155
128
|
"use strict";
|
|
156
129
|
init_cjs_shims();
|
|
@@ -206,7 +179,7 @@ var require_global_utils = __commonJS({
|
|
|
206
179
|
init_cjs_shims();
|
|
207
180
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
208
181
|
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0;
|
|
209
|
-
var platform_1 = require_platform(), version_1 = require_version(), semver_1 =
|
|
182
|
+
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
183
|
function registerGlobal(type, instance, diag4, allowOverride = !1) {
|
|
211
184
|
var _a;
|
|
212
185
|
let api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
|
|
@@ -922,8 +895,8 @@ var require_ProxyTracer = __commonJS({
|
|
|
922
895
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
923
896
|
exports.ProxyTracer = void 0;
|
|
924
897
|
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 =
|
|
898
|
+
constructor(_provider, name, version, options) {
|
|
899
|
+
this._provider = _provider, this.name = name, this.version = version, this.options = options;
|
|
927
900
|
}
|
|
928
901
|
startSpan(name, options, context) {
|
|
929
902
|
return this._getTracer().startSpan(name, options, context);
|
|
@@ -974,9 +947,9 @@ var require_ProxyTracerProvider = __commonJS({
|
|
|
974
947
|
/**
|
|
975
948
|
* Get a {@link ProxyTracer}
|
|
976
949
|
*/
|
|
977
|
-
getTracer(name,
|
|
950
|
+
getTracer(name, version, options) {
|
|
978
951
|
var _a;
|
|
979
|
-
return (_a = this.getDelegateTracer(name,
|
|
952
|
+
return (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options);
|
|
980
953
|
}
|
|
981
954
|
getDelegate() {
|
|
982
955
|
var _a;
|
|
@@ -988,9 +961,9 @@ var require_ProxyTracerProvider = __commonJS({
|
|
|
988
961
|
setDelegate(delegate) {
|
|
989
962
|
this._delegate = delegate;
|
|
990
963
|
}
|
|
991
|
-
getDelegateTracer(name,
|
|
964
|
+
getDelegateTracer(name, version, options) {
|
|
992
965
|
var _a;
|
|
993
|
-
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name,
|
|
966
|
+
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
|
|
994
967
|
}
|
|
995
968
|
};
|
|
996
969
|
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
@@ -1192,8 +1165,8 @@ var require_metrics = __commonJS({
|
|
|
1192
1165
|
/**
|
|
1193
1166
|
* Returns a meter from the global meter provider.
|
|
1194
1167
|
*/
|
|
1195
|
-
getMeter(name,
|
|
1196
|
-
return this.getMeterProvider().getMeter(name,
|
|
1168
|
+
getMeter(name, version, options) {
|
|
1169
|
+
return this.getMeterProvider().getMeter(name, version, options);
|
|
1197
1170
|
}
|
|
1198
1171
|
/** Remove the global meter provider */
|
|
1199
1172
|
disable() {
|
|
@@ -1374,8 +1347,8 @@ var require_trace = __commonJS({
|
|
|
1374
1347
|
/**
|
|
1375
1348
|
* Returns a tracer from the global tracer provider.
|
|
1376
1349
|
*/
|
|
1377
|
-
getTracer(name,
|
|
1378
|
-
return this.getTracerProvider().getTracer(name,
|
|
1350
|
+
getTracer(name, version) {
|
|
1351
|
+
return this.getTracerProvider().getTracer(name, version);
|
|
1379
1352
|
}
|
|
1380
1353
|
/** Remove the global tracer provider */
|
|
1381
1354
|
disable() {
|
|
@@ -7561,10 +7534,10 @@ var require_MeterProvider = __commonJS({
|
|
|
7561
7534
|
/**
|
|
7562
7535
|
* Get a meter with the configuration of the MeterProvider.
|
|
7563
7536
|
*/
|
|
7564
|
-
getMeter(name,
|
|
7537
|
+
getMeter(name, version = "", options = {}) {
|
|
7565
7538
|
return this._shutdown ? (api_1.diag.warn("A shutdown MeterProvider cannot provide a Meter"), (0, api_1.createNoopMeter)()) : this._sharedState.getMeterSharedState({
|
|
7566
7539
|
name,
|
|
7567
|
-
version
|
|
7540
|
+
version,
|
|
7568
7541
|
schemaUrl: options.schemaUrl
|
|
7569
7542
|
}).meter;
|
|
7570
7543
|
}
|
|
@@ -13916,10 +13889,10 @@ var require_MeterProvider2 = __commonJS({
|
|
|
13916
13889
|
/**
|
|
13917
13890
|
* Get a meter with the configuration of the MeterProvider.
|
|
13918
13891
|
*/
|
|
13919
|
-
getMeter(name,
|
|
13892
|
+
getMeter(name, version = "", options = {}) {
|
|
13920
13893
|
return this._shutdown ? (api_1.diag.warn("A shutdown MeterProvider cannot provide a Meter"), (0, api_1.createNoopMeter)()) : this._sharedState.getMeterSharedState({
|
|
13921
13894
|
name,
|
|
13922
|
-
version
|
|
13895
|
+
version,
|
|
13923
13896
|
schemaUrl: options.schemaUrl
|
|
13924
13897
|
}).meter;
|
|
13925
13898
|
}
|
|
@@ -14980,9 +14953,9 @@ var require_trace4 = __commonJS({
|
|
|
14980
14953
|
for (; !ilmEntry.done; ) {
|
|
14981
14954
|
let scopeSpans = ilmEntry.value;
|
|
14982
14955
|
if (scopeSpans.length > 0) {
|
|
14983
|
-
let { name, version
|
|
14956
|
+
let { name, version, schemaUrl } = scopeSpans[0].instrumentationLibrary, spans = scopeSpans.map((readableSpan) => (0, internal_2.sdkSpanToOtlpSpan)(readableSpan, useHex));
|
|
14984
14957
|
scopeResourceSpans.push({
|
|
14985
|
-
scope: { name, version
|
|
14958
|
+
scope: { name, version },
|
|
14986
14959
|
spans,
|
|
14987
14960
|
schemaUrl
|
|
14988
14961
|
});
|
|
@@ -15173,9 +15146,9 @@ var require_logs = __commonJS({
|
|
|
15173
15146
|
function createResourceMap(logRecords) {
|
|
15174
15147
|
let resourceMap = /* @__PURE__ */ new Map();
|
|
15175
15148
|
for (let record of logRecords) {
|
|
15176
|
-
let { resource, instrumentationScope: { name, version
|
|
15149
|
+
let { resource, instrumentationScope: { name, version = "", schemaUrl = "" } } = record, ismMap = resourceMap.get(resource);
|
|
15177
15150
|
ismMap || (ismMap = /* @__PURE__ */ new Map(), resourceMap.set(resource, ismMap));
|
|
15178
|
-
let ismKey = `${name}@${
|
|
15151
|
+
let ismKey = `${name}@${version}:${schemaUrl}`, records = ismMap.get(ismKey);
|
|
15179
15152
|
records || (records = [], ismMap.set(ismKey, records)), records.push(record);
|
|
15180
15153
|
}
|
|
15181
15154
|
return resourceMap;
|
|
@@ -15188,9 +15161,9 @@ var require_logs = __commonJS({
|
|
|
15188
15161
|
droppedAttributesCount: 0
|
|
15189
15162
|
},
|
|
15190
15163
|
scopeLogs: Array.from(ismMap, ([, scopeLogs]) => {
|
|
15191
|
-
let { instrumentationScope: { name, version
|
|
15164
|
+
let { instrumentationScope: { name, version, schemaUrl } } = scopeLogs[0];
|
|
15192
15165
|
return {
|
|
15193
|
-
scope: { name, version
|
|
15166
|
+
scope: { name, version },
|
|
15194
15167
|
logRecords: scopeLogs.map((log) => toLogRecord(log, useHex)),
|
|
15195
15168
|
schemaUrl
|
|
15196
15169
|
};
|
|
@@ -15376,161 +15349,6 @@ async function getListOfTunnelPlugins(config) {
|
|
|
15376
15349
|
// ../cli-kit/dist/public/node/analytics.js
|
|
15377
15350
|
init_cjs_shims();
|
|
15378
15351
|
|
|
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
15352
|
// ../cli-kit/dist/public/node/monorail.js
|
|
15535
15353
|
init_cjs_shims();
|
|
15536
15354
|
var url = "https://monorail-edge.shopifysvc.com/v1/produce", MONORAIL_COMMAND_TOPIC = "app_cli3_command/1.15", publishedCommandNames = /* @__PURE__ */ new Set();
|
|
@@ -15908,7 +15726,7 @@ async function buildPayload({ config, errorMessage, exitMode }) {
|
|
|
15908
15726
|
total_time: wallClockElapsed,
|
|
15909
15727
|
success: exitMode === "ok" && errorMessage === void 0,
|
|
15910
15728
|
cli_version: CLI_KIT_VERSION,
|
|
15911
|
-
ruby_version:
|
|
15729
|
+
ruby_version: "",
|
|
15912
15730
|
node_version: process.version.replace("v", ""),
|
|
15913
15731
|
is_employee: await isShopify(),
|
|
15914
15732
|
...environmentData,
|
|
@@ -15944,10 +15762,8 @@ function sanitizePayload2(payload) {
|
|
|
15944
15762
|
}
|
|
15945
15763
|
|
|
15946
15764
|
export {
|
|
15947
|
-
execCLI2,
|
|
15948
|
-
version,
|
|
15949
15765
|
fanoutHooks,
|
|
15950
15766
|
getListOfTunnelPlugins,
|
|
15951
15767
|
reportAnalyticsEvent
|
|
15952
15768
|
};
|
|
15953
|
-
//# sourceMappingURL=chunk-
|
|
15769
|
+
//# sourceMappingURL=chunk-PGUENKZG.js.map
|