@shopify/create-app 4.8.5 → 4.9.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/analytics-D5P7IMRA.js +48 -0
- package/dist/analytics-TXXYVQN7.js +40 -0
- package/dist/{chunk-ODCXYGJ2.js → chunk-23UTCSPZ.js} +14 -4
- package/dist/{chunk-5JYB62AT.js → chunk-2UPX6QLJ.js} +7 -7
- package/dist/{chunk-YGBCHL4K.js → chunk-3IJICKWH.js} +2 -2
- package/dist/chunk-5OAATCQX.js +218 -0
- package/dist/{chunk-BEUNBVME.js → chunk-A33KVF5C.js} +1 -1
- package/dist/{chunk-ZTNEDTAC.js → chunk-AJLJXEKT.js} +3093 -23
- package/dist/chunk-BBGOL4JF.js +86 -0
- package/dist/chunk-CK3T27VW.js +119 -0
- package/dist/{chunk-E43EDJOG.js → chunk-EJEHENXO.js} +3 -2
- package/dist/chunk-FKZ3NFHZ.js +7 -0
- package/dist/{chunk-TS6YLIAL.js → chunk-KZZE6H5Q.js} +51 -26
- package/dist/chunk-MHLFPQ3W.js +50 -0
- package/dist/{chunk-JEMOMVLA.js → chunk-MOB6XVGL.js} +2 -2
- package/dist/{chunk-GU2TODXD.js → chunk-NB6X7ZFE.js} +3 -3
- package/dist/{chunk-SGIGETET.js → chunk-NHN6SUTT.js} +202 -55
- package/dist/chunk-NLC4T4YS.js +1092 -0
- package/dist/{chunk-PERCCMZB.js → chunk-NW3CCDI2.js} +320 -3213
- package/dist/{chunk-4SGOGIHQ.js → chunk-OG3KDO3M.js} +16 -16
- package/dist/{chunk-ZKLW7LMH.js → chunk-PSP4NDSB.js} +16 -14
- package/dist/{chunk-67ZHQJFJ.js → chunk-QNTXEHZO.js} +5 -5
- package/dist/{chunk-B4MEUQZW.js → chunk-RYTPHY47.js} +10 -10
- package/dist/{chunk-CPI6XVRV.js → chunk-SFVOZJMO.js} +32 -10
- package/dist/chunk-SHCNJ47P.js +89 -0
- package/dist/{chunk-F2LFNR26.js → chunk-SYVHC634.js} +2 -2
- package/dist/{chunk-C3J4HVUN.js → chunk-VDUAROBQ.js} +3 -2
- package/dist/command-json-schema-S3W3UW3A.js +65 -0
- package/dist/{conf-store-I2EVFNHO.js → conf-store-GW5MF5EC.js} +11 -11
- package/dist/custom-oclif-loader-MYKFWED2.js +85 -0
- package/dist/{deprecations-ASHE6RU7.js → deprecations-TJKLSMEC.js} +18 -15
- package/dist/environment-OJNKZ7ML.js +25 -0
- package/dist/environments-FLXCXEQY.js +32 -0
- package/dist/error-handler-KSSGLWAL.js +44 -0
- package/dist/{fs-AOTVAHUT.js → fs-54TFRUFV.js} +10 -5
- package/dist/hooks/postrun.js +11 -6
- package/dist/hooks/prerun.js +6 -6
- package/dist/{http-proxy-node16-5LMQ6YXS.js → http-proxy-node16-FD2WN6JB.js} +2 -3
- package/dist/index.js +6688 -3623
- package/dist/{is-global-2XE72BX5.js → is-global-ABT2AQMZ.js} +10 -5
- package/dist/json-error-N7MI3KIX.js +104 -0
- package/dist/{lib-XCYUJYSO.js → lib-NYDMHWZM.js} +3 -4
- package/dist/{local-VTOHZRT2.js → local-BAVJFTPY.js} +11 -3
- package/dist/{metadata-PNCC4F25.js → metadata-JDWMZLO3.js} +10 -4
- package/dist/{node-package-manager-WUKOPNFK.js → node-package-manager-LZQDH5RV.js} +20 -17
- package/dist/notifications-system-C4VANR5T.js +47 -0
- package/dist/os-UYRG46VD.js +24 -0
- package/dist/{output-Y2INREX2.js → output-WTBNQLZY.js} +12 -5
- package/dist/{path-2WA5R6GG.js → path-2KZ7FSGN.js} +2 -2
- package/dist/{prettier-SS3RRDXK.js → prettier-BNZDRHR4.js} +2 -2
- package/dist/{system-KPC4GYYQ.js → system-VYWFQ656.js} +18 -15
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-WQOJ2UKT.js → ui-EW2MACA7.js} +18 -15
- package/dist/{upgrade-KCKPO4QT.js → upgrade-TCM7RY33.js} +47 -29
- package/dist/{version-ODXTDVIB.js → version-6BXGHP54.js} +2 -2
- package/dist/version-ANERG2ID.js +36 -0
- package/oclif.manifest.json +15 -1
- package/package.json +3 -3
- package/dist/analytics-I6PGSH5K.js +0 -44
- package/dist/analytics-QHQHZXCP.js +0 -36
- package/dist/chunk-2Z5L5TZI.js +0 -301
- package/dist/chunk-7OHJH7BF.js +0 -21
- package/dist/custom-oclif-loader-HTLL62HO.js +0 -54
- package/dist/environments-JM7VKVKQ.js +0 -29
- package/dist/error-handler-TUY64CIU.js +0 -40
- package/dist/notifications-system-GBBRT4B6.js +0 -43
- package/dist/os-J6JGAAOY.js +0 -19
- package/dist/version-5242JBZK.js +0 -33
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
jsonOutputEnabled
|
|
3
|
+
} from "./chunk-SHCNJ47P.js";
|
|
4
|
+
import {
|
|
5
|
+
defineJsonOutputSchema
|
|
6
|
+
} from "./chunk-NLC4T4YS.js";
|
|
7
|
+
import {
|
|
8
|
+
collectLog,
|
|
9
|
+
commandDiagnosticEventSchema,
|
|
10
|
+
commandEventOutputMode,
|
|
11
|
+
commandEventSchema,
|
|
12
|
+
commandProgressEventSchema,
|
|
13
|
+
consoleWarn,
|
|
14
|
+
output,
|
|
15
|
+
outputDebug,
|
|
16
|
+
outputInfo,
|
|
17
|
+
outputWarn,
|
|
18
|
+
outputWhereAppropriate,
|
|
19
|
+
runWithCommandEvents
|
|
20
|
+
} from "./chunk-AJLJXEKT.js";
|
|
21
|
+
import {
|
|
22
|
+
isUnitTest
|
|
23
|
+
} from "./chunk-5OAATCQX.js";
|
|
24
|
+
import {
|
|
25
|
+
init_cjs_shims
|
|
26
|
+
} from "./chunk-3XNI6LP4.js";
|
|
27
|
+
|
|
28
|
+
// ../cli-kit/dist/public/node/command-events.js
|
|
29
|
+
init_cjs_shims();
|
|
30
|
+
|
|
31
|
+
// ../cli-kit/dist/private/node/command-event-output.js
|
|
32
|
+
init_cjs_shims();
|
|
33
|
+
function outputCommandEventAsJson(event) {
|
|
34
|
+
let message = JSON.stringify(commandEventSchema.parse(event));
|
|
35
|
+
isUnitTest() && collectLog("info", message), outputWhereAppropriate("info", consoleWarn, message);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// ../cli-kit/dist/public/node/command-events.js
|
|
39
|
+
function runWithCommandEventsForCommand(argv, execute) {
|
|
40
|
+
if (commandEventOutputMode() !== void 0)
|
|
41
|
+
return execute();
|
|
42
|
+
let outputMode = jsonOutputEnabled(process.env, argv) ? "json" : "text";
|
|
43
|
+
return runWithCommandEvents({
|
|
44
|
+
outputMode,
|
|
45
|
+
sink: outputMode === "json" ? renderCommandEventAsJson : (event, options) => {
|
|
46
|
+
options?.alreadyRendered || renderCommandEvent(event);
|
|
47
|
+
}
|
|
48
|
+
}, execute);
|
|
49
|
+
}
|
|
50
|
+
var commandEventOutputSchema = defineJsonOutputSchema({
|
|
51
|
+
name: "CommandEvent",
|
|
52
|
+
schema: commandEventSchema,
|
|
53
|
+
definitions: {
|
|
54
|
+
CommandDiagnosticEvent: commandDiagnosticEventSchema,
|
|
55
|
+
CommandProgressEvent: commandProgressEventSchema
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
function renderCommandEvent(event) {
|
|
59
|
+
if (event.type === "progress") {
|
|
60
|
+
outputInfo(event.message ?? event.operation);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
switch (event.level) {
|
|
64
|
+
case "debug":
|
|
65
|
+
outputDebug(event.message);
|
|
66
|
+
break;
|
|
67
|
+
case "info":
|
|
68
|
+
outputInfo(event.message);
|
|
69
|
+
break;
|
|
70
|
+
case "warning":
|
|
71
|
+
outputWarn(event.message);
|
|
72
|
+
break;
|
|
73
|
+
case "error":
|
|
74
|
+
output(event.message, "error");
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function renderCommandEventAsJson(event) {
|
|
79
|
+
outputCommandEventAsJson(event);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
runWithCommandEventsForCommand,
|
|
84
|
+
commandEventOutputSchema
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=chunk-BBGOL4JF.js.map
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {
|
|
2
|
+
joinPath
|
|
3
|
+
} from "./chunk-VDUAROBQ.js";
|
|
4
|
+
import {
|
|
5
|
+
init_cjs_shims
|
|
6
|
+
} from "./chunk-3XNI6LP4.js";
|
|
7
|
+
|
|
8
|
+
// ../cli-kit/dist/private/node/constants.js
|
|
9
|
+
init_cjs_shims();
|
|
10
|
+
|
|
11
|
+
// ../../node_modules/.pnpm/env-paths@3.0.0/node_modules/env-paths/index.js
|
|
12
|
+
init_cjs_shims();
|
|
13
|
+
import path from "node:path";
|
|
14
|
+
import os from "node:os";
|
|
15
|
+
import process2 from "node:process";
|
|
16
|
+
var homedir = os.homedir(), tmpdir = os.tmpdir(), { env } = process2, macos = (name) => {
|
|
17
|
+
let library = path.join(homedir, "Library");
|
|
18
|
+
return {
|
|
19
|
+
data: path.join(library, "Application Support", name),
|
|
20
|
+
config: path.join(library, "Preferences", name),
|
|
21
|
+
cache: path.join(library, "Caches", name),
|
|
22
|
+
log: path.join(library, "Logs", name),
|
|
23
|
+
temp: path.join(tmpdir, name)
|
|
24
|
+
};
|
|
25
|
+
}, windows = (name) => {
|
|
26
|
+
let appData = env.APPDATA || path.join(homedir, "AppData", "Roaming"), localAppData = env.LOCALAPPDATA || path.join(homedir, "AppData", "Local");
|
|
27
|
+
return {
|
|
28
|
+
// Data/config/cache/log are invented by me as Windows isn't opinionated about this
|
|
29
|
+
data: path.join(localAppData, name, "Data"),
|
|
30
|
+
config: path.join(appData, name, "Config"),
|
|
31
|
+
cache: path.join(localAppData, name, "Cache"),
|
|
32
|
+
log: path.join(localAppData, name, "Log"),
|
|
33
|
+
temp: path.join(tmpdir, name)
|
|
34
|
+
};
|
|
35
|
+
}, linux = (name) => {
|
|
36
|
+
let username = path.basename(homedir);
|
|
37
|
+
return {
|
|
38
|
+
data: path.join(env.XDG_DATA_HOME || path.join(homedir, ".local", "share"), name),
|
|
39
|
+
config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, ".config"), name),
|
|
40
|
+
cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, ".cache"), name),
|
|
41
|
+
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
42
|
+
log: path.join(env.XDG_STATE_HOME || path.join(homedir, ".local", "state"), name),
|
|
43
|
+
temp: path.join(tmpdir, username, name)
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
function envPaths(name, { suffix = "nodejs" } = {}) {
|
|
47
|
+
if (typeof name != "string")
|
|
48
|
+
throw new TypeError(`Expected a string, got ${typeof name}`);
|
|
49
|
+
return suffix && (name += `-${suffix}`), process2.platform === "darwin" ? macos(name) : process2.platform === "win32" ? windows(name) : linux(name);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ../cli-kit/dist/private/node/constants.js
|
|
53
|
+
var identifier = "shopify-cli", cacheFolder = () => process.env.XDG_CACHE_HOME ? process.env.XDG_CACHE_HOME : envPaths(identifier).cache;
|
|
54
|
+
var environmentVariables = {
|
|
55
|
+
alwaysLogAnalytics: "SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",
|
|
56
|
+
alwaysLogMetrics: "SHOPIFY_CLI_ALWAYS_LOG_METRICS",
|
|
57
|
+
deviceAuth: "SHOPIFY_CLI_DEVICE_AUTH",
|
|
58
|
+
doctor: "SHOPIFY_CLI_DOCTOR",
|
|
59
|
+
enableCliRedirect: "SHOPIFY_CLI_ENABLE_CLI_REDIRECT",
|
|
60
|
+
env: "SHOPIFY_CLI_ENV",
|
|
61
|
+
noAnalytics: "SHOPIFY_CLI_NO_ANALYTICS",
|
|
62
|
+
optOutInstrumentation: "OPT_OUT_INSTRUMENTATION",
|
|
63
|
+
appAutomationToken: "SHOPIFY_APP_AUTOMATION_TOKEN",
|
|
64
|
+
partnersToken: "SHOPIFY_CLI_PARTNERS_TOKEN",
|
|
65
|
+
runAsUser: "SHOPIFY_RUN_AS_USER",
|
|
66
|
+
serviceEnv: "SHOPIFY_SERVICE_ENV",
|
|
67
|
+
skipCliRedirect: "SHOPIFY_CLI_SKIP_CLI_REDIRECT",
|
|
68
|
+
spinInstance: "SPIN_INSTANCE",
|
|
69
|
+
themeToken: "SHOPIFY_CLI_THEME_TOKEN",
|
|
70
|
+
unitTest: "SHOPIFY_UNIT_TEST",
|
|
71
|
+
verbose: "SHOPIFY_FLAG_VERBOSE",
|
|
72
|
+
// Variables to detect if the CLI is running in a cloud environment
|
|
73
|
+
codespaces: "CODESPACES",
|
|
74
|
+
codespaceName: "CODESPACE_NAME",
|
|
75
|
+
codespacePortForwardingDomain: "GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",
|
|
76
|
+
gitpod: "GITPOD_WORKSPACE_URL",
|
|
77
|
+
cloudShell: "CLOUD_SHELL",
|
|
78
|
+
spinAppPort: "SERVER_PORT",
|
|
79
|
+
spinAppHost: "SPIN_APP_HOST",
|
|
80
|
+
organization: "SHOPIFY_CLI_ORGANIZATION",
|
|
81
|
+
identityToken: "SHOPIFY_CLI_IDENTITY_TOKEN",
|
|
82
|
+
refreshToken: "SHOPIFY_CLI_REFRESH_TOKEN",
|
|
83
|
+
otelURL: "SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",
|
|
84
|
+
themeKitAccessDomain: "SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",
|
|
85
|
+
json: "SHOPIFY_FLAG_JSON",
|
|
86
|
+
skipNetworkLevelRetry: "SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",
|
|
87
|
+
maxRequestTimeForNetworkCalls: "SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS",
|
|
88
|
+
disableImportScanning: "SHOPIFY_CLI_DISABLE_IMPORT_SCANNING"
|
|
89
|
+
}, defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com", systemEnvironmentVariables = {
|
|
90
|
+
backendPort: "BACKEND_PORT"
|
|
91
|
+
}, pathConstants = {
|
|
92
|
+
executables: {
|
|
93
|
+
dev: "/opt/dev/bin/dev"
|
|
94
|
+
},
|
|
95
|
+
directories: {
|
|
96
|
+
cache: {
|
|
97
|
+
path: () => cacheFolder(),
|
|
98
|
+
vendor: {
|
|
99
|
+
path: () => joinPath(cacheFolder(), "vendor"),
|
|
100
|
+
binaries: () => joinPath(cacheFolder(), "vendor", "binaries")
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}, sessionConstants = {
|
|
105
|
+
expirationTimeMarginInMinutes: 4
|
|
106
|
+
}, bugsnagApiKey = "9e1e6889176fd0c795d5c659225e0fae", reportingRateLimit = { limit: 300, timeout: { days: 1 } }, themeKitAccessDomain = process.env[environmentVariables.themeKitAccessDomain] ?? defaultThemeKitAccessDomain;
|
|
107
|
+
|
|
108
|
+
export {
|
|
109
|
+
envPaths,
|
|
110
|
+
environmentVariables,
|
|
111
|
+
defaultThemeKitAccessDomain,
|
|
112
|
+
systemEnvironmentVariables,
|
|
113
|
+
pathConstants,
|
|
114
|
+
sessionConstants,
|
|
115
|
+
bugsnagApiKey,
|
|
116
|
+
reportingRateLimit,
|
|
117
|
+
themeKitAccessDomain
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=chunk-CK3T27VW.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_src,
|
|
3
3
|
require_supports_color
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-23UTCSPZ.js";
|
|
5
5
|
import {
|
|
6
6
|
require_is_wsl
|
|
7
7
|
} from "./chunk-LBXDGVFS.js";
|
|
@@ -11788,6 +11788,7 @@ var require_lib = __commonJS({
|
|
|
11788
11788
|
|
|
11789
11789
|
export {
|
|
11790
11790
|
require_ansi_styles,
|
|
11791
|
+
require_help,
|
|
11791
11792
|
require_commonjs3 as require_commonjs,
|
|
11792
11793
|
require_lib
|
|
11793
11794
|
};
|
|
@@ -11802,4 +11803,4 @@ ejs/lib/ejs.js:
|
|
|
11802
11803
|
* @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
|
|
11803
11804
|
*)
|
|
11804
11805
|
*/
|
|
11805
|
-
//# sourceMappingURL=chunk-
|
|
11806
|
+
//# sourceMappingURL=chunk-EJEHENXO.js.map
|
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AbortError,
|
|
3
|
-
BugError
|
|
4
|
-
} from "./chunk-CPI6XVRV.js";
|
|
5
1
|
import {
|
|
6
2
|
mimicFunction
|
|
7
3
|
} from "./chunk-CM6ALOD7.js";
|
|
8
4
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
AbortError,
|
|
6
|
+
BugError
|
|
7
|
+
} from "./chunk-SFVOZJMO.js";
|
|
11
8
|
import {
|
|
9
|
+
fileExistsSync,
|
|
12
10
|
fileHasWritePermissions,
|
|
11
|
+
findPathUpSync,
|
|
13
12
|
outputContent,
|
|
14
13
|
outputDebug,
|
|
15
14
|
unixFileIsOwnedByCurrentUser
|
|
16
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AJLJXEKT.js";
|
|
17
16
|
import {
|
|
18
|
-
envPaths,
|
|
19
|
-
environmentVariables,
|
|
20
17
|
isUnitTest
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5OAATCQX.js";
|
|
19
|
+
import {
|
|
20
|
+
envPaths,
|
|
21
|
+
environmentVariables
|
|
22
|
+
} from "./chunk-CK3T27VW.js";
|
|
23
|
+
import {
|
|
24
|
+
require_semver
|
|
25
|
+
} from "./chunk-OQ3KXXGH.js";
|
|
22
26
|
import {
|
|
23
|
-
dirname
|
|
24
|
-
|
|
27
|
+
dirname,
|
|
28
|
+
resolvePath
|
|
29
|
+
} from "./chunk-VDUAROBQ.js";
|
|
25
30
|
import {
|
|
26
31
|
__commonJS,
|
|
27
32
|
__toESM,
|
|
@@ -5912,6 +5917,18 @@ var import_semver = __toESM(require_semver(), 1), __classPrivateFieldSet = funct
|
|
|
5912
5917
|
};
|
|
5913
5918
|
|
|
5914
5919
|
// ../cli-kit/dist/public/node/local-storage.js
|
|
5920
|
+
function isFileSystemPermissionError(error) {
|
|
5921
|
+
if (!(error instanceof Error))
|
|
5922
|
+
return !1;
|
|
5923
|
+
let errorCode = error.code;
|
|
5924
|
+
return errorCode === "EACCES" || errorCode === "EPERM";
|
|
5925
|
+
}
|
|
5926
|
+
function configPathFromInitializationError(options, error) {
|
|
5927
|
+
if (typeof error.path == "string")
|
|
5928
|
+
return error.syscall === "mkdir" ? resolvePath(error.path, "config.json") : resolvePath(error.path);
|
|
5929
|
+
let configDirectory = options.cwd ?? (options.projectName ? envPaths(options.projectName, { suffix: "nodejs" }).config : void 0);
|
|
5930
|
+
return configDirectory ? resolvePath(configDirectory, "config.json") : void 0;
|
|
5931
|
+
}
|
|
5915
5932
|
function deserializeJson(value) {
|
|
5916
5933
|
let valueWithoutByteOrderMark = value.replace(/^\uFEFF/, "");
|
|
5917
5934
|
return JSON.parse(valueWithoutByteOrderMark);
|
|
@@ -5919,11 +5936,18 @@ function deserializeJson(value) {
|
|
|
5919
5936
|
var LocalStorage = class {
|
|
5920
5937
|
config;
|
|
5921
5938
|
constructor(options) {
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5939
|
+
try {
|
|
5940
|
+
this.config = new Conf({
|
|
5941
|
+
...options,
|
|
5942
|
+
clearInvalidConfig: !0,
|
|
5943
|
+
deserialize: deserializeJson
|
|
5944
|
+
});
|
|
5945
|
+
} catch (error) {
|
|
5946
|
+
if (!isFileSystemPermissionError(error))
|
|
5947
|
+
throw error;
|
|
5948
|
+
let configPath = configPathFromInitializationError(options, error);
|
|
5949
|
+
throw configPath && this.handleError(error, "initialize", configPath), new AbortError(`Failed to access local storage (initialize): ${error}`);
|
|
5950
|
+
}
|
|
5927
5951
|
}
|
|
5928
5952
|
/**
|
|
5929
5953
|
* Get a value from the local storage.
|
|
@@ -5989,21 +6013,22 @@ var LocalStorage = class {
|
|
|
5989
6013
|
*
|
|
5990
6014
|
* @param error - The error that occurred.
|
|
5991
6015
|
* @param operation - The operation that failed.
|
|
6016
|
+
* @param configPath - The local storage configuration file path.
|
|
5992
6017
|
* @throws AbortError if the error is permission-related.
|
|
5993
6018
|
* @throws BugError if the error is not permission-related.
|
|
5994
6019
|
*/
|
|
5995
|
-
handleError(error, operation) {
|
|
5996
|
-
throw this.isPermissionError() ? new AbortError(`Failed to access local storage (${operation}): ${error}`, this.tryMessage()) : new BugError(`Unexpected error while accessing local storage at ${
|
|
6020
|
+
handleError(error, operation, configPath = this.config.path) {
|
|
6021
|
+
throw isFileSystemPermissionError(error) || this.isPermissionError(configPath) ? new AbortError(`Failed to access local storage (${operation}): ${error}`, this.tryMessage(configPath)) : new BugError(`Unexpected error while accessing local storage at ${configPath} (${operation}): ${error}`);
|
|
5997
6022
|
}
|
|
5998
|
-
isPermissionError() {
|
|
5999
|
-
let canAccessFile = fileHasWritePermissions(
|
|
6023
|
+
isPermissionError(configPath) {
|
|
6024
|
+
let canAccessFile = fileHasWritePermissions(configPath), canAccessFolder = fileHasWritePermissions(dirname(configPath)), ownsFile = unixFileIsOwnedByCurrentUser(configPath);
|
|
6000
6025
|
return !canAccessFile || !canAccessFolder || ownsFile === !1;
|
|
6001
6026
|
}
|
|
6002
|
-
tryMessage() {
|
|
6003
|
-
let ownsFile = unixFileIsOwnedByCurrentUser(
|
|
6004
|
-
return (ownsFile === !1 || ownsFolder === !1) && message.push("- The file is owned by a different user. This typically happens when Shopify CLI was previously run with elevated permissions (e.g., sudo)."), message.push(`
|
|
6027
|
+
tryMessage(configPath) {
|
|
6028
|
+
let configDirectory = dirname(configPath), configDirectoryExists = fileExistsSync(configDirectory), permissionsPath = configDirectoryExists ? configPath : findPathUpSync(".", { cwd: configDirectory, type: "directory" }) ?? configDirectory, ownsFile = fileExistsSync(configPath) ? unixFileIsOwnedByCurrentUser(configPath) : void 0, ownsFolder = unixFileIsOwnedByCurrentUser(configDirectoryExists ? configDirectory : permissionsPath), message = ["Check that you have write permissions for", { filePath: permissionsPath }];
|
|
6029
|
+
return (ownsFile === !1 || ownsFolder === !1) && message.push("- The file is owned by a different user. This typically happens when Shopify CLI was previously run with elevated permissions (e.g., sudo)."), configDirectoryExists && (message.push(`
|
|
6005
6030
|
|
|
6006
|
-
To resolve this, remove the Shopify CLI preferences folder:`), message.push({
|
|
6031
|
+
To resolve this, remove the Shopify CLI preferences folder:`), message.push({ filePath: configDirectory })), message;
|
|
6007
6032
|
}
|
|
6008
6033
|
};
|
|
6009
6034
|
|
|
@@ -6114,4 +6139,4 @@ export {
|
|
|
6114
6139
|
getCachedPartnerAccountStatus,
|
|
6115
6140
|
setCachedPartnerAccountStatus
|
|
6116
6141
|
};
|
|
6117
|
-
//# sourceMappingURL=chunk-
|
|
6142
|
+
//# sourceMappingURL=chunk-KZZE6H5Q.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineJsonOutputSchema
|
|
3
|
+
} from "./chunk-NLC4T4YS.js";
|
|
4
|
+
import {
|
|
5
|
+
external_exports
|
|
6
|
+
} from "./chunk-AJLJXEKT.js";
|
|
7
|
+
import {
|
|
8
|
+
init_cjs_shims
|
|
9
|
+
} from "./chunk-3XNI6LP4.js";
|
|
10
|
+
|
|
11
|
+
// ../cli-kit/dist/public/node/error/schema.js
|
|
12
|
+
init_cjs_shims();
|
|
13
|
+
var JsonErrorCustomSectionSchema = external_exports.object({
|
|
14
|
+
title: external_exports.string().optional(),
|
|
15
|
+
body: external_exports.union([external_exports.string(), external_exports.array(external_exports.array(external_exports.string()))])
|
|
16
|
+
}).strict(), commonJsonErrorShape = {
|
|
17
|
+
message: external_exports.string(),
|
|
18
|
+
code: external_exports.string().min(1).optional().describe("A stable error code, included only when known."),
|
|
19
|
+
tryMessage: external_exports.string().optional(),
|
|
20
|
+
nextSteps: external_exports.array(external_exports.string()).optional(),
|
|
21
|
+
customSections: external_exports.array(JsonErrorCustomSectionSchema).optional(),
|
|
22
|
+
details: external_exports.unknown().optional().describe("Selected domain details, preserving native API payloads such as GraphQL errors, extensions, and data.")
|
|
23
|
+
}, JsonAbortErrorSchema = external_exports.object({
|
|
24
|
+
type: external_exports.literal("abort"),
|
|
25
|
+
...commonJsonErrorShape
|
|
26
|
+
}).strict(), JsonBugErrorSchema = external_exports.object({
|
|
27
|
+
type: external_exports.literal("bug"),
|
|
28
|
+
...commonJsonErrorShape,
|
|
29
|
+
stack: external_exports.string().optional()
|
|
30
|
+
}).strict(), JsonExternalErrorSchema = external_exports.object({
|
|
31
|
+
type: external_exports.literal("external"),
|
|
32
|
+
...commonJsonErrorShape,
|
|
33
|
+
command: external_exports.string(),
|
|
34
|
+
args: external_exports.array(external_exports.string())
|
|
35
|
+
}).strict(), JsonErrorSchema = external_exports.union([JsonAbortErrorSchema, JsonBugErrorSchema, JsonExternalErrorSchema]), JsonErrorDocumentSchema = external_exports.object({ error: JsonErrorSchema }).strict(), jsonErrorOutputSchema = defineJsonOutputSchema({
|
|
36
|
+
name: "JsonErrorDocument",
|
|
37
|
+
schema: JsonErrorDocumentSchema,
|
|
38
|
+
definitions: {
|
|
39
|
+
JsonError: JsonErrorSchema,
|
|
40
|
+
JsonErrorCustomSection: JsonErrorCustomSectionSchema,
|
|
41
|
+
JsonAbortError: JsonAbortErrorSchema,
|
|
42
|
+
JsonBugError: JsonBugErrorSchema,
|
|
43
|
+
JsonExternalError: JsonExternalErrorSchema
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
jsonErrorOutputSchema
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=chunk-MHLFPQ3W.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
captureOutput,
|
|
3
3
|
require_lib
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NHN6SUTT.js";
|
|
5
5
|
import {
|
|
6
6
|
require_semver
|
|
7
7
|
} from "./chunk-OQ3KXXGH.js";
|
|
@@ -52,4 +52,4 @@ export {
|
|
|
52
52
|
isPreReleaseVersion,
|
|
53
53
|
isMajorVersionChange
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-MOB6XVGL.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isUnitTest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5OAATCQX.js";
|
|
4
4
|
import {
|
|
5
5
|
init_cjs_shims
|
|
6
6
|
} from "./chunk-3XNI6LP4.js";
|
|
@@ -32,7 +32,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
|
|
|
32
32
|
try {
|
|
33
33
|
await getAndSet();
|
|
34
34
|
} catch (error) {
|
|
35
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
35
|
+
let { sendErrorToBugsnag } = await import("./error-handler-KSSGLWAL.js");
|
|
36
36
|
await sendErrorToBugsnag(error, "unexpected_error");
|
|
37
37
|
}
|
|
38
38
|
}, durationStack = [];
|
|
@@ -75,4 +75,4 @@ export {
|
|
|
75
75
|
addSensitiveMetadata,
|
|
76
76
|
runWithTimer
|
|
77
77
|
};
|
|
78
|
-
//# sourceMappingURL=chunk-
|
|
78
|
+
//# sourceMappingURL=chunk-NB6X7ZFE.js.map
|