@shopify/cli 3.87.0 → 3.87.2
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-NKJY5K45.js → chunk-3X2NQOUY.js} +3 -3
- package/dist/{chunk-LVH6EINO.js → chunk-6GZJKVFC.js} +4 -4
- package/dist/{chunk-DX2IC6MA.js → chunk-6IX6IYQH.js} +6 -6
- package/dist/{chunk-KW37WO42.js → chunk-6QRCKVTD.js} +4 -4
- package/dist/{chunk-UQLUAYP7.js → chunk-7BBD6ZTN.js} +2 -2
- package/dist/{chunk-ZWG6Y7VK.js → chunk-7PWZ7VL5.js} +3 -3
- package/dist/{chunk-MJ2CC5UF.js → chunk-7ZOKHUQY.js} +4 -4
- package/dist/{chunk-VQVENW26.js → chunk-BGUBRG66.js} +5 -5
- package/dist/{chunk-H3HXI5FI.js → chunk-DEFTB3XS.js} +5 -5
- package/dist/{chunk-XB6A45UN.js → chunk-DYW3K5NY.js} +4 -4
- package/dist/{chunk-PU7263L3.js → chunk-EEVWBUQY.js} +4 -4
- package/dist/{chunk-Y2JP6WFP.js → chunk-EG6MBBEN.js} +2 -2
- package/dist/{chunk-43MAAODZ.js → chunk-HA7O3IAH.js} +6 -6
- package/dist/{chunk-VRRM2VMH.js → chunk-I4KY5H2S.js} +6 -6
- package/dist/{chunk-GK3L6WCO.js → chunk-JL2S5ZZ4.js} +7 -7
- package/dist/{chunk-TVAQLJIT.js → chunk-LF4OJ7O7.js} +2 -2
- package/dist/{chunk-U6SKVYZN.js → chunk-MHJTX7JL.js} +3 -3
- package/dist/{chunk-VDMWZFUE.js → chunk-PUPPME4P.js} +3 -3
- package/dist/{chunk-LWFYEQVC.js → chunk-PY5RE4NA.js} +4 -4
- package/dist/{chunk-JJ3N36EZ.js → chunk-QCXMPXO5.js} +3 -3
- package/dist/{chunk-TY4JIQTU.js → chunk-QSAMQTXD.js} +3 -3
- package/dist/{chunk-PE3YDRXC.js → chunk-QYXO37S2.js} +2 -2
- package/dist/{chunk-U4EHUN6F.js → chunk-R2LM4CMI.js} +5 -5
- package/dist/{chunk-ILCR5V7H.js → chunk-RIAIM6M6.js} +2 -2
- package/dist/{chunk-QIIIG73M.js → chunk-S63ZS7TF.js} +4 -4
- package/dist/{chunk-77FBLQSY.js → chunk-SDP77MJ5.js} +3 -3
- package/dist/{chunk-4X3OSIUW.js → chunk-SOQUEM6G.js} +4 -4
- package/dist/{chunk-PW5V2LBK.js → chunk-TKUG7ZD3.js} +3 -3
- package/dist/{chunk-H5JSK6HV.js → chunk-TM3V7EUI.js} +2 -2
- package/dist/{chunk-HMJUSDS7.js → chunk-TTSPIE52.js} +2 -2
- package/dist/{chunk-R7GPNRH3.js → chunk-TZQN73C5.js} +2 -2
- package/dist/{chunk-LMVYXPIS.js → chunk-UBQK47OB.js} +4 -4
- package/dist/{chunk-FBDL6M34.js → chunk-VQU73LUP.js} +3 -3
- package/dist/{chunk-4RMT22ZG.js → chunk-WS4MBZDH.js} +7 -7
- package/dist/{chunk-GV3VXLHN.js → chunk-XJJVGUMU.js} +6 -6
- package/dist/{chunk-6CKI4ZVA.js → chunk-YVRCZOTP.js} +8 -8
- package/dist/cli/commands/auth/login.js +11 -11
- package/dist/cli/commands/auth/login.test.js +12 -12
- package/dist/cli/commands/auth/logout.js +11 -11
- package/dist/cli/commands/auth/logout.test.js +12 -12
- package/dist/cli/commands/cache/clear.js +11 -11
- package/dist/cli/commands/debug/command-flags.js +11 -11
- package/dist/cli/commands/docs/generate.js +11 -11
- package/dist/cli/commands/docs/generate.test.js +11 -11
- package/dist/cli/commands/help.js +11 -11
- package/dist/cli/commands/kitchen-sink/async.js +12 -12
- package/dist/cli/commands/kitchen-sink/async.test.js +12 -12
- package/dist/cli/commands/kitchen-sink/index.js +14 -14
- package/dist/cli/commands/kitchen-sink/index.test.js +14 -14
- package/dist/cli/commands/kitchen-sink/prompts.js +12 -12
- package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -12
- package/dist/cli/commands/kitchen-sink/static.js +12 -12
- package/dist/cli/commands/kitchen-sink/static.test.js +12 -12
- package/dist/cli/commands/notifications/generate.js +12 -12
- package/dist/cli/commands/notifications/list.js +12 -12
- package/dist/cli/commands/search.js +12 -12
- package/dist/cli/commands/upgrade.js +12 -12
- package/dist/cli/commands/version.js +12 -12
- package/dist/cli/commands/version.test.js +12 -12
- package/dist/cli/services/commands/notifications.js +7 -7
- package/dist/cli/services/commands/search.js +3 -3
- package/dist/cli/services/commands/search.test.js +3 -3
- package/dist/cli/services/commands/version.js +4 -4
- package/dist/cli/services/commands/version.test.js +5 -5
- package/dist/cli/services/kitchen-sink/async.js +3 -3
- package/dist/cli/services/kitchen-sink/prompts.js +3 -3
- package/dist/cli/services/kitchen-sink/static.js +3 -3
- package/dist/cli/services/upgrade.js +4 -4
- package/dist/cli/services/upgrade.test.js +5 -5
- package/dist/{custom-oclif-loader-QBK7WNIL.js → custom-oclif-loader-QZEUMDYU.js} +3 -3
- package/dist/{error-handler-YWRJD3ZX.js → error-handler-LFWLQZLR.js} +9 -9
- package/dist/hooks/postrun.js +8 -8
- package/dist/hooks/prerun.js +8 -8
- package/dist/index.js +105 -164
- package/dist/{local-DU2CZ6Z3.js → local-OXFZVPNR.js} +3 -3
- package/dist/{node-package-manager-W22PEMMM.js → node-package-manager-2DJFEKWF.js} +4 -4
- package/dist/{path-COZT77T2.js → path-GB4VIEM6.js} +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-GTBNK773.js → ui-EPPIUTAR.js} +3 -3
- package/dist/{workerd-CT4T6SDW.js → workerd-LEE5WATY.js} +12 -12
- package/oclif.manifest.json +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
supressNodeExperimentalWarnings,
|
|
113
113
|
unsetStorefront,
|
|
114
114
|
waitForJob
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-WS4MBZDH.js";
|
|
116
116
|
import {
|
|
117
117
|
require_lib as require_lib6
|
|
118
118
|
} from "./chunk-EZQWZ57B.js";
|
|
@@ -128,77 +128,77 @@ import {
|
|
|
128
128
|
import "./chunk-EFOOQV72.js";
|
|
129
129
|
import {
|
|
130
130
|
postRunHookHasCompleted
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-DYW3K5NY.js";
|
|
132
132
|
import {
|
|
133
133
|
import_websocket_server
|
|
134
134
|
} from "./chunk-3GXB4ZRP.js";
|
|
135
135
|
import {
|
|
136
136
|
Generate
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-TKUG7ZD3.js";
|
|
138
138
|
import {
|
|
139
139
|
List
|
|
140
|
-
} from "./chunk-
|
|
141
|
-
import "./chunk-
|
|
140
|
+
} from "./chunk-6GZJKVFC.js";
|
|
141
|
+
import "./chunk-R2LM4CMI.js";
|
|
142
142
|
import {
|
|
143
143
|
Search
|
|
144
|
-
} from "./chunk-
|
|
145
|
-
import "./chunk-
|
|
144
|
+
} from "./chunk-3X2NQOUY.js";
|
|
145
|
+
import "./chunk-RIAIM6M6.js";
|
|
146
146
|
import {
|
|
147
147
|
Upgrade
|
|
148
|
-
} from "./chunk-
|
|
149
|
-
import "./chunk-
|
|
148
|
+
} from "./chunk-EEVWBUQY.js";
|
|
149
|
+
import "./chunk-PUPPME4P.js";
|
|
150
150
|
import {
|
|
151
151
|
Version
|
|
152
|
-
} from "./chunk-
|
|
153
|
-
import "./chunk-
|
|
152
|
+
} from "./chunk-SDP77MJ5.js";
|
|
153
|
+
import "./chunk-MHJTX7JL.js";
|
|
154
154
|
import {
|
|
155
155
|
HelpCommand
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-LF4OJ7O7.js";
|
|
157
157
|
import {
|
|
158
158
|
KitchenSinkAsync
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-QSAMQTXD.js";
|
|
160
160
|
import {
|
|
161
161
|
KitchenSinkAll
|
|
162
|
-
} from "./chunk-
|
|
163
|
-
import "./chunk-
|
|
162
|
+
} from "./chunk-DEFTB3XS.js";
|
|
163
|
+
import "./chunk-TM3V7EUI.js";
|
|
164
164
|
import {
|
|
165
165
|
KitchenSinkPrompts
|
|
166
|
-
} from "./chunk-
|
|
167
|
-
import "./chunk-
|
|
166
|
+
} from "./chunk-QCXMPXO5.js";
|
|
167
|
+
import "./chunk-TTSPIE52.js";
|
|
168
168
|
import {
|
|
169
169
|
KitchenSinkStatic
|
|
170
|
-
} from "./chunk-
|
|
171
|
-
import "./chunk-
|
|
170
|
+
} from "./chunk-7PWZ7VL5.js";
|
|
171
|
+
import "./chunk-QYXO37S2.js";
|
|
172
172
|
import {
|
|
173
173
|
Login
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-BGUBRG66.js";
|
|
175
175
|
import {
|
|
176
176
|
Logout
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-6QRCKVTD.js";
|
|
178
178
|
import {
|
|
179
179
|
ClearCache,
|
|
180
180
|
globalFlags,
|
|
181
181
|
jsonFlag,
|
|
182
182
|
runCLI
|
|
183
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-JL2S5ZZ4.js";
|
|
184
184
|
import {
|
|
185
185
|
CommandFlags
|
|
186
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-VQU73LUP.js";
|
|
187
187
|
import {
|
|
188
188
|
DocsGenerate
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-PY5RE4NA.js";
|
|
190
190
|
import {
|
|
191
191
|
base_command_default,
|
|
192
192
|
decodeToml,
|
|
193
193
|
encodeToml,
|
|
194
194
|
loadEnvironment,
|
|
195
195
|
noDefaultsOptions
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-6IX6IYQH.js";
|
|
197
197
|
import {
|
|
198
198
|
require_bugsnag,
|
|
199
199
|
require_end_of_stream,
|
|
200
200
|
require_pump
|
|
201
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-YVRCZOTP.js";
|
|
202
202
|
import {
|
|
203
203
|
require_once
|
|
204
204
|
} from "./chunk-SHWOPMLQ.js";
|
|
@@ -210,7 +210,7 @@ import {
|
|
|
210
210
|
recordEvent,
|
|
211
211
|
recordTiming,
|
|
212
212
|
reportAnalyticsEvent
|
|
213
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-XJJVGUMU.js";
|
|
214
214
|
import {
|
|
215
215
|
DevServerCore,
|
|
216
216
|
addCursorAndFiltersToAppLogsUrl,
|
|
@@ -256,10 +256,10 @@ import {
|
|
|
256
256
|
serviceEnvironment,
|
|
257
257
|
setNextDeprecationDate,
|
|
258
258
|
setPathValue
|
|
259
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-HA7O3IAH.js";
|
|
260
260
|
import {
|
|
261
261
|
showNotificationsIfNeeded
|
|
262
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-I4KY5H2S.js";
|
|
263
263
|
import {
|
|
264
264
|
ClientError,
|
|
265
265
|
FetchError,
|
|
@@ -288,7 +288,7 @@ import {
|
|
|
288
288
|
require_type,
|
|
289
289
|
shopifyFetch,
|
|
290
290
|
z
|
|
291
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-UBQK47OB.js";
|
|
292
292
|
import "./chunk-XD3LXUGW.js";
|
|
293
293
|
import {
|
|
294
294
|
LocalStorage,
|
|
@@ -312,10 +312,10 @@ import {
|
|
|
312
312
|
usesWorkspaces,
|
|
313
313
|
versionSatisfies,
|
|
314
314
|
writePackageJSON
|
|
315
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-SOQUEM6G.js";
|
|
316
316
|
import {
|
|
317
317
|
CLI_KIT_VERSION
|
|
318
|
-
} from "./chunk-
|
|
318
|
+
} from "./chunk-TZQN73C5.js";
|
|
319
319
|
import {
|
|
320
320
|
AbortController as AbortController2,
|
|
321
321
|
AbortError,
|
|
@@ -503,7 +503,7 @@ import {
|
|
|
503
503
|
username,
|
|
504
504
|
writeFile,
|
|
505
505
|
writeFileSync
|
|
506
|
-
} from "./chunk-
|
|
506
|
+
} from "./chunk-S63ZS7TF.js";
|
|
507
507
|
import {
|
|
508
508
|
require_ansis,
|
|
509
509
|
require_commonjs,
|
|
@@ -545,7 +545,7 @@ import {
|
|
|
545
545
|
relativizePath,
|
|
546
546
|
resolvePath,
|
|
547
547
|
sniffForJson
|
|
548
|
-
} from "./chunk-
|
|
548
|
+
} from "./chunk-EG6MBBEN.js";
|
|
549
549
|
import {
|
|
550
550
|
__commonJS,
|
|
551
551
|
__esm,
|
|
@@ -194461,7 +194461,6 @@ var ThemeFilesUpsert = {
|
|
|
194461
194461
|
kind: "SelectionSet",
|
|
194462
194462
|
selections: [
|
|
194463
194463
|
{ kind: "Field", name: { kind: "Name", value: "filename" } },
|
|
194464
|
-
{ kind: "Field", name: { kind: "Name", value: "checksumMd5" } },
|
|
194465
194464
|
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
194466
194465
|
]
|
|
194467
194466
|
}
|
|
@@ -195066,11 +195065,7 @@ function processUploadResults(uploadResults) {
|
|
|
195066
195065
|
results.push({
|
|
195067
195066
|
key: file.filename,
|
|
195068
195067
|
success: !0,
|
|
195069
|
-
operation: Operation.Upload
|
|
195070
|
-
asset: {
|
|
195071
|
-
key: file.filename,
|
|
195072
|
-
checksum: file.checksumMd5 ?? ""
|
|
195073
|
-
}
|
|
195068
|
+
operation: Operation.Upload
|
|
195074
195069
|
});
|
|
195075
195070
|
}), userErrors.forEach((error) => {
|
|
195076
195071
|
error.filename || unexpectedGraphQLError(`Error uploading theme files: ${error.message}`), recordError(`Asset upload failed for ${error.filename}: ${error.message}`), results.push({
|
|
@@ -198644,14 +198639,7 @@ function mountThemeFileSystem(root, options) {
|
|
|
198644
198639
|
function notifyFileChange(fileKey) {
|
|
198645
198640
|
return notifier?.notify(fileKey) ?? Promise.resolve();
|
|
198646
198641
|
}
|
|
198647
|
-
let
|
|
198648
|
-
files.set(asset.key, buildThemeAsset({
|
|
198649
|
-
key: asset.key,
|
|
198650
|
-
checksum: asset.checksum,
|
|
198651
|
-
value: asset.value ?? "",
|
|
198652
|
-
attachment: asset.attachment ?? ""
|
|
198653
|
-
})), await writeThemeFile(root, asset);
|
|
198654
|
-
}, handleFileUpdate = (eventName, themeId, adminSession, fileKey) => {
|
|
198642
|
+
let handleFileUpdate = (eventName, themeId, adminSession, fileKey) => {
|
|
198655
198643
|
if (isFileIgnored(fileKey))
|
|
198656
198644
|
return;
|
|
198657
198645
|
let previousChecksum = files.get(fileKey)?.checksum, contentPromise = read(fileKey).then(async () => {
|
|
@@ -198661,12 +198649,11 @@ function mountThemeFileSystem(root, options) {
|
|
|
198661
198649
|
// file.value has a fallback value of '', so we want to ignore this eslint rule
|
|
198662
198650
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
198663
198651
|
value: file.value || void 0,
|
|
198664
|
-
attachment: file.attachment
|
|
198665
|
-
checksum: file.checksum
|
|
198652
|
+
attachment: file.attachment
|
|
198666
198653
|
};
|
|
198667
198654
|
}), syncPromise = contentPromise.then((content) => {
|
|
198668
198655
|
if (content)
|
|
198669
|
-
return handleSyncUpdate(unsyncedFileKeys, uploadErrors, fileKey, themeId, adminSession
|
|
198656
|
+
return handleSyncUpdate(unsyncedFileKeys, uploadErrors, fileKey, themeId, adminSession)(content);
|
|
198670
198657
|
}).catch(createSyncingCatchError(fileKey, "upload"));
|
|
198671
198658
|
emitEvent(eventName, {
|
|
198672
198659
|
fileKey,
|
|
@@ -198711,7 +198698,14 @@ function mountThemeFileSystem(root, options) {
|
|
|
198711
198698
|
delete: async (fileKey) => {
|
|
198712
198699
|
files.delete(fileKey), await removeThemeFile(root, fileKey);
|
|
198713
198700
|
},
|
|
198714
|
-
write
|
|
198701
|
+
write: async (asset) => {
|
|
198702
|
+
files.set(asset.key, buildThemeAsset({
|
|
198703
|
+
key: asset.key,
|
|
198704
|
+
checksum: asset.checksum,
|
|
198705
|
+
value: asset.value ?? "",
|
|
198706
|
+
attachment: asset.attachment ?? ""
|
|
198707
|
+
})), await writeThemeFile(root, asset);
|
|
198708
|
+
},
|
|
198715
198709
|
read,
|
|
198716
198710
|
applyIgnoreFilters: (files2) => applyIgnoreFilters(files2, filterPatterns),
|
|
198717
198711
|
addEventListener: (eventName, cb) => {
|
|
@@ -198727,7 +198721,7 @@ function mountThemeFileSystem(root, options) {
|
|
|
198727
198721
|
}
|
|
198728
198722
|
};
|
|
198729
198723
|
}
|
|
198730
|
-
function handleSyncUpdate(unsyncedFileKeys, uploadErrors, fileKey, themeId, adminSession
|
|
198724
|
+
function handleSyncUpdate(unsyncedFileKeys, uploadErrors, fileKey, themeId, adminSession) {
|
|
198731
198725
|
return async (content) => {
|
|
198732
198726
|
if (!unsyncedFileKeys.has(fileKey))
|
|
198733
198727
|
return !1;
|
|
@@ -198737,11 +198731,7 @@ function handleSyncUpdate(unsyncedFileKeys, uploadErrors, fileKey, themeId, admi
|
|
|
198737
198731
|
throw uploadErrors.set(fileKey, errors), triggerBrowserFullReload(themeId, fileKey), new Error(errors.join(`
|
|
198738
198732
|
`));
|
|
198739
198733
|
}
|
|
198740
|
-
|
|
198741
|
-
let [remoteAsset] = await fetchThemeAssets(Number(themeId), [fileKey], adminSession);
|
|
198742
|
-
remoteAsset && (await write(remoteAsset), outputSyncResult("rewrite", fileKey));
|
|
198743
|
-
}
|
|
198744
|
-
return !0;
|
|
198734
|
+
return uploadErrors.delete(fileKey) && triggerBrowserFullReload(themeId, fileKey), unsyncedFileKeys.delete(fileKey), outputSyncResult("update", fileKey), !0;
|
|
198745
198735
|
};
|
|
198746
198736
|
}
|
|
198747
198737
|
async function writeThemeFile(root, { key, attachment, value }) {
|
|
@@ -198818,8 +198808,7 @@ function dirPath(filePath) {
|
|
|
198818
198808
|
return filePath.substring(0, fileNameIndex);
|
|
198819
198809
|
}
|
|
198820
198810
|
function outputSyncResult(action, fileKey) {
|
|
198821
|
-
|
|
198822
|
-
action === "rewrite" ? content = outputContent`• ${timestampDateFormat.format(/* @__PURE__ */ new Date())} Overwritten ${fileKey}` : content = outputContent`• ${timestampDateFormat.format(/* @__PURE__ */ new Date())} Synced ${outputToken.raw("\xBB")} ${action} ${fileKey}`, outputInfo(content);
|
|
198811
|
+
outputInfo(outputContent`• ${timestampDateFormat.format(/* @__PURE__ */ new Date())} Synced ${outputToken.raw("\xBB")} ${action} ${fileKey}`);
|
|
198823
198812
|
}
|
|
198824
198813
|
function inferLocalHotReloadScriptPath() {
|
|
198825
198814
|
let envVar = process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;
|
|
@@ -199030,101 +199019,16 @@ async function reconcileAndPollThemeEditorChanges(targetTheme, session, remoteCh
|
|
|
199030
199019
|
|
|
199031
199020
|
// ../theme/dist/cli/utilities/theme-uploader.js
|
|
199032
199021
|
init_cjs_shims();
|
|
199033
|
-
|
|
199034
|
-
// ../theme/dist/cli/utilities/theme-downloader.js
|
|
199035
|
-
init_cjs_shims();
|
|
199036
|
-
async function downloadTheme(theme, session, remoteChecksums, themeFileSystem, options, context) {
|
|
199037
|
-
let deleteTasks = buildDeleteTasks(remoteChecksums, themeFileSystem, options), downloadTasks = buildDownloadTasks(remoteChecksums, theme, themeFileSystem, session), tasks = [...deleteTasks, ...downloadTasks, { title: "Theme download complete", task: async () => {
|
|
199038
|
-
} }];
|
|
199039
|
-
tasks.length > 0 && await renderTasks(tasks, {
|
|
199040
|
-
renderOptions: { stdout: context?.stdout ?? process.stdout },
|
|
199041
|
-
noProgressBar: options.multiEnvironment
|
|
199042
|
-
});
|
|
199043
|
-
}
|
|
199044
|
-
function buildDeleteTasks(remoteChecksums, themeFileSystem, options) {
|
|
199045
|
-
if (options.nodelete)
|
|
199046
|
-
return [];
|
|
199047
|
-
let remoteKeys = new Set(remoteChecksums.map((checksum) => checksum.key));
|
|
199048
|
-
return themeFileSystem.applyIgnoreFilters([...themeFileSystem.files.values()]).map(({ key }) => key).filter((key) => !remoteKeys.has(key)).map((key) => ({
|
|
199049
|
-
title: `Cleaning your local directory (removing ${key})`,
|
|
199050
|
-
task: async () => themeFileSystem.delete(key)
|
|
199051
|
-
}));
|
|
199052
|
-
}
|
|
199053
|
-
function buildDownloadTasks(remoteChecksums, theme, themeFileSystem, session) {
|
|
199054
|
-
let checksums = themeFileSystem.applyIgnoreFilters(remoteChecksums);
|
|
199055
|
-
checksums = checksums.filter((checksum) => {
|
|
199056
|
-
let remoteChecksumValue = checksum.checksum;
|
|
199057
|
-
return themeFileSystem.files.get(checksum.key)?.checksum !== remoteChecksumValue;
|
|
199058
|
-
});
|
|
199059
|
-
let filenames = checksums.map((checksum) => checksum.key), getProgress = (params) => params.total === 0 ? "[100%]" : `[${Math.round(params.current / params.total * 100)}%]`;
|
|
199060
|
-
return batchedTasks(filenames, MAX_GRAPHQL_THEME_FILES, (batchedFilenames, i) => ({
|
|
199061
|
-
title: `Downloading files from remote theme ${getProgress({
|
|
199062
|
-
current: i,
|
|
199063
|
-
total: filenames.length
|
|
199064
|
-
})}`,
|
|
199065
|
-
task: async () => downloadFiles(theme, themeFileSystem, batchedFilenames, session)
|
|
199066
|
-
}));
|
|
199067
|
-
}
|
|
199068
|
-
async function downloadFiles(theme, fileSystem, filenames, session) {
|
|
199069
|
-
let assets = await fetchThemeAssets(theme.id, filenames, session);
|
|
199070
|
-
assets && assets.forEach(async (asset) => {
|
|
199071
|
-
await fileSystem.write(asset);
|
|
199072
|
-
});
|
|
199073
|
-
}
|
|
199074
|
-
|
|
199075
|
-
// ../theme/dist/cli/utilities/theme-uploader.js
|
|
199076
199022
|
var MAX_BATCH_FILE_COUNT = 20, MAX_BATCH_BYTESIZE = 1024 * 1024, MAX_UPLOAD_RETRY_COUNT = 2;
|
|
199077
199023
|
function uploadTheme(theme, session, checksums, themeFileSystem, options = {}, context) {
|
|
199078
|
-
let remoteChecksums = rejectGeneratedStaticAssets(checksums), uploadResults = /* @__PURE__ */ new Map(), getProgress = (params) => params.total === 0 ? "[100%]" : `[${Math.round(params.current / params.total * 100)}%]`, themeCreationPromise = ensureThemeCreation(theme, session, remoteChecksums), uploadJobPromise = Promise.all([themeFileSystem.ready(), themeCreationPromise]).then(() => buildUploadJob(remoteChecksums, themeFileSystem, theme, session, uploadResults)), deleteJobPromise = uploadJobPromise.then((result) => result.promise).then(() => buildDeleteJob(remoteChecksums, themeFileSystem, theme, session, options, uploadResults)), workPromise = options?.deferPartialWork ? themeCreationPromise.then(() =>
|
|
199079
|
-
|
|
199080
|
-
options?.backgroundWorkCatch && Promise.all([
|
|
199024
|
+
let remoteChecksums = rejectGeneratedStaticAssets(checksums), uploadResults = /* @__PURE__ */ new Map(), getProgress = (params) => params.total === 0 ? "[100%]" : `[${Math.round(params.current / params.total * 100)}%]`, themeCreationPromise = ensureThemeCreation(theme, session, remoteChecksums), uploadJobPromise = Promise.all([themeFileSystem.ready(), themeCreationPromise]).then(() => buildUploadJob(remoteChecksums, themeFileSystem, theme, session, uploadResults)), deleteJobPromise = uploadJobPromise.then((result) => result.promise).then(() => buildDeleteJob(remoteChecksums, themeFileSystem, theme, session, options, uploadResults)), workPromise = options?.deferPartialWork ? themeCreationPromise : deleteJobPromise.then((result) => result.promise);
|
|
199025
|
+
return options?.backgroundWorkCatch && Promise.all([
|
|
199081
199026
|
themeCreationPromise,
|
|
199082
199027
|
uploadJobPromise.then((result) => result.promise),
|
|
199083
199028
|
deleteJobPromise.then((result) => result.promise)
|
|
199084
|
-
]).catch(options.backgroundWorkCatch)
|
|
199085
|
-
let syncRewrittenFilesPromise = options?.handleRewrittenFiles ? Promise.all([themeFileSystem.ready(), themeCreationPromise, uploadJobPromise, deleteJobPromise]).then(async () => {
|
|
199086
|
-
let filesDifferentFromRemote = [];
|
|
199087
|
-
for (let uploadResult of uploadResults.values()) {
|
|
199088
|
-
if (!uploadResult.key.endsWith(".liquid"))
|
|
199089
|
-
continue;
|
|
199090
|
-
let localFile = themeFileSystem.files.get(uploadResult.key);
|
|
199091
|
-
localFile?.value && uploadResult.success && uploadResult.asset?.checksum && uploadResult.asset.checksum !== localFile.checksum && filesDifferentFromRemote.push(uploadResult.key);
|
|
199092
|
-
}
|
|
199093
|
-
filesDifferentFromRemote.length > 0 && (options.handleRewrittenFiles === "fix" ? (renderInfo({
|
|
199094
|
-
headline: "Updated Liquid files to conform to latest Liquid standards.",
|
|
199095
|
-
body: [
|
|
199096
|
-
"The following Liquid files were updated locally and remotely:",
|
|
199097
|
-
{
|
|
199098
|
-
list: {
|
|
199099
|
-
items: filesDifferentFromRemote
|
|
199100
|
-
}
|
|
199101
|
-
}
|
|
199102
|
-
]
|
|
199103
|
-
}), await downloadFiles(theme, themeFileSystem, filesDifferentFromRemote, session)) : options.handleRewrittenFiles === "warn" && renderInfo({
|
|
199104
|
-
headline: "Liquid files were updated remotely to conform to latest Liquid standards.",
|
|
199105
|
-
body: [
|
|
199106
|
-
"The following Liquid files were updated remotely:",
|
|
199107
|
-
{
|
|
199108
|
-
list: {
|
|
199109
|
-
items: filesDifferentFromRemote
|
|
199110
|
-
}
|
|
199111
|
-
}
|
|
199112
|
-
],
|
|
199113
|
-
nextSteps: [
|
|
199114
|
-
[
|
|
199115
|
-
"Fetch the latest files using",
|
|
199116
|
-
{
|
|
199117
|
-
command: "shopify theme pull"
|
|
199118
|
-
},
|
|
199119
|
-
"to sync them locally."
|
|
199120
|
-
]
|
|
199121
|
-
]
|
|
199122
|
-
}));
|
|
199123
|
-
}) : Promise.resolve();
|
|
199124
|
-
return {
|
|
199029
|
+
]).catch(options.backgroundWorkCatch), {
|
|
199125
199030
|
uploadResults,
|
|
199126
199031
|
workPromise,
|
|
199127
|
-
syncRewrittenFilesPromise,
|
|
199128
199032
|
renderThemeSyncProgress: async () => {
|
|
199129
199033
|
if (options?.deferPartialWork)
|
|
199130
199034
|
return;
|
|
@@ -199216,7 +199120,7 @@ var MINIMUM_THEME_ASSETS = [
|
|
|
199216
199120
|
];
|
|
199217
199121
|
async function ensureThemeCreation(theme, session, remoteChecksums) {
|
|
199218
199122
|
let remoteAssetKeys = new Set(remoteChecksums.map((checksum) => checksum.key)), missingAssets = MINIMUM_THEME_ASSETS.filter(({ key }) => !remoteAssetKeys.has(key));
|
|
199219
|
-
|
|
199123
|
+
missingAssets.length > 0 && await bulkUploadThemeAssets(theme.id, missingAssets, session);
|
|
199220
199124
|
}
|
|
199221
199125
|
function buildUploadJob(remoteChecksums, themeFileSystem, theme, session, uploadResults) {
|
|
199222
199126
|
let filesToUpload = selectUploadableFiles(themeFileSystem, remoteChecksums);
|
|
@@ -199341,8 +199245,7 @@ function setupDevServer(theme, ctx) {
|
|
|
199341
199245
|
workPromise,
|
|
199342
199246
|
serverStart: server.start,
|
|
199343
199247
|
dispatchEvent: server.dispatch,
|
|
199344
|
-
renderDevSetupProgress: envSetup.renderProgress
|
|
199345
|
-
syncRewrittenFilesPromise: () => envSetup.syncRewrittenFilesPromise
|
|
199248
|
+
renderDevSetupProgress: envSetup.renderProgress
|
|
199346
199249
|
};
|
|
199347
199250
|
}
|
|
199348
199251
|
function ensureThemeEnvironmentSetup(theme, ctx) {
|
|
@@ -199351,8 +199254,7 @@ function ensureThemeEnvironmentSetup(theme, ctx) {
|
|
|
199351
199254
|
return uploadTheme(theme, ctx.session, updatedRemoteChecksums, ctx.localThemeFileSystem, {
|
|
199352
199255
|
nodelete: ctx.options.noDelete,
|
|
199353
199256
|
deferPartialWork: !0,
|
|
199354
|
-
backgroundWorkCatch: abort2
|
|
199355
|
-
handleRewrittenFiles: "fix"
|
|
199257
|
+
backgroundWorkCatch: abort2
|
|
199356
199258
|
});
|
|
199357
199259
|
}).catch(abort2);
|
|
199358
199260
|
return {
|
|
@@ -199371,8 +199273,7 @@ function ensureThemeEnvironmentSetup(theme, ctx) {
|
|
|
199371
199273
|
}
|
|
199372
199274
|
let { renderThemeSyncProgress } = await uploadPromise;
|
|
199373
199275
|
await renderThemeSyncProgress();
|
|
199374
|
-
}
|
|
199375
|
-
syncRewrittenFilesPromise: uploadPromise.then((result) => result.syncRewrittenFilesPromise).catch(abort2)
|
|
199276
|
+
}
|
|
199376
199277
|
};
|
|
199377
199278
|
}
|
|
199378
199279
|
function handleThemeEditorSync(theme, ctx, remoteChecksums) {
|
|
@@ -199706,8 +199607,8 @@ async function dev(options) {
|
|
|
199706
199607
|
}
|
|
199707
199608
|
};
|
|
199708
199609
|
options["theme-editor-sync"] && (session.storefrontPassword = await storefrontPasswordPromise);
|
|
199709
|
-
let { serverStart, renderDevSetupProgress
|
|
199710
|
-
options["theme-editor-sync"] || (session.storefrontPassword = await storefrontPasswordPromise), await renderDevSetupProgress(), await serverStart(),
|
|
199610
|
+
let { serverStart, renderDevSetupProgress } = setupDevServer(options.theme, ctx);
|
|
199611
|
+
options["theme-editor-sync"] || (session.storefrontPassword = await storefrontPasswordPromise), await renderDevSetupProgress(), await serverStart(), renderLinks(urls), options.open && openURLSafely(urls.local, "development server"), readline.emitKeypressEvents(process.stdin), process.stdin.isTTY && process.stdin.setRawMode(!0), process.stdin.on("keypress", (_str, key) => {
|
|
199711
199612
|
switch (key.ctrl && key.name === "c" && process.exit(), key.name) {
|
|
199712
199613
|
case "t":
|
|
199713
199614
|
openURLSafely(urls.local, "localhost");
|
|
@@ -200968,6 +200869,49 @@ init_cjs_shims();
|
|
|
200968
200869
|
|
|
200969
200870
|
// ../theme/dist/cli/services/pull.js
|
|
200970
200871
|
init_cjs_shims();
|
|
200872
|
+
|
|
200873
|
+
// ../theme/dist/cli/utilities/theme-downloader.js
|
|
200874
|
+
init_cjs_shims();
|
|
200875
|
+
async function downloadTheme(theme, session, remoteChecksums, themeFileSystem, options, context) {
|
|
200876
|
+
let deleteTasks = buildDeleteTasks(remoteChecksums, themeFileSystem, options), downloadTasks = buildDownloadTasks(remoteChecksums, theme, themeFileSystem, session), tasks = [...deleteTasks, ...downloadTasks, { title: "Theme download complete", task: async () => {
|
|
200877
|
+
} }];
|
|
200878
|
+
tasks.length > 0 && await renderTasks(tasks, {
|
|
200879
|
+
renderOptions: { stdout: context?.stdout ?? process.stdout },
|
|
200880
|
+
noProgressBar: options.multiEnvironment
|
|
200881
|
+
});
|
|
200882
|
+
}
|
|
200883
|
+
function buildDeleteTasks(remoteChecksums, themeFileSystem, options) {
|
|
200884
|
+
if (options.nodelete)
|
|
200885
|
+
return [];
|
|
200886
|
+
let remoteKeys = new Set(remoteChecksums.map((checksum) => checksum.key));
|
|
200887
|
+
return themeFileSystem.applyIgnoreFilters([...themeFileSystem.files.values()]).map(({ key }) => key).filter((key) => !remoteKeys.has(key)).map((key) => ({
|
|
200888
|
+
title: `Cleaning your local directory (removing ${key})`,
|
|
200889
|
+
task: async () => themeFileSystem.delete(key)
|
|
200890
|
+
}));
|
|
200891
|
+
}
|
|
200892
|
+
function buildDownloadTasks(remoteChecksums, theme, themeFileSystem, session) {
|
|
200893
|
+
let checksums = themeFileSystem.applyIgnoreFilters(remoteChecksums);
|
|
200894
|
+
checksums = checksums.filter((checksum) => {
|
|
200895
|
+
let remoteChecksumValue = checksum.checksum;
|
|
200896
|
+
return themeFileSystem.files.get(checksum.key)?.checksum !== remoteChecksumValue;
|
|
200897
|
+
});
|
|
200898
|
+
let filenames = checksums.map((checksum) => checksum.key), getProgress = (params) => params.total === 0 ? "[100%]" : `[${Math.round(params.current / params.total * 100)}%]`;
|
|
200899
|
+
return batchedTasks(filenames, MAX_GRAPHQL_THEME_FILES, (batchedFilenames, i) => ({
|
|
200900
|
+
title: `Downloading files from remote theme ${getProgress({
|
|
200901
|
+
current: i,
|
|
200902
|
+
total: filenames.length
|
|
200903
|
+
})}`,
|
|
200904
|
+
task: async () => downloadFiles(theme, themeFileSystem, batchedFilenames, session)
|
|
200905
|
+
}));
|
|
200906
|
+
}
|
|
200907
|
+
async function downloadFiles(theme, fileSystem, filenames, session) {
|
|
200908
|
+
let assets = await fetchThemeAssets(theme.id, filenames, session);
|
|
200909
|
+
assets && assets.forEach(async (asset) => {
|
|
200910
|
+
await fileSystem.write(asset);
|
|
200911
|
+
});
|
|
200912
|
+
}
|
|
200913
|
+
|
|
200914
|
+
// ../theme/dist/cli/services/pull.js
|
|
200971
200915
|
async function pull(flags, session, multiEnvironment, context) {
|
|
200972
200916
|
recordTiming("theme-service:pull:setup"), configureCLIEnvironment({ verbose: flags.verbose, noColor: flags.noColor });
|
|
200973
200917
|
let adminSession = session ?? await ensureAuthenticatedThemes(ensureThemeStore({ store: flags.store }), flags.password), developmentThemeManager = new DevelopmentThemeManager(adminSession), developmentTheme = await (flags.development ? developmentThemeManager.find() : developmentThemeManager.fetch()), { path: path3, nodelete, live, development, only, ignore: ignore3, force, environment } = flags;
|
|
@@ -201116,11 +201060,8 @@ async function executePush(theme, session, options, context) {
|
|
|
201116
201060
|
recordTiming("theme-service:push:file-system");
|
|
201117
201061
|
let themeChecksums = await fetchChecksums(theme.id, session), themeFileSystem = mountThemeFileSystem(options.path, { filters: options });
|
|
201118
201062
|
recordTiming("theme-service:push:file-system");
|
|
201119
|
-
let { uploadResults, renderThemeSyncProgress
|
|
201120
|
-
|
|
201121
|
-
handleRewrittenFiles: "warn"
|
|
201122
|
-
}, context);
|
|
201123
|
-
await renderThemeSyncProgress(), await syncRewrittenFilesPromise, options.publish && await themePublish(theme.id, session), await handlePushOutput(uploadResults, theme, session, options);
|
|
201063
|
+
let { uploadResults, renderThemeSyncProgress } = uploadTheme(theme, session, themeChecksums, themeFileSystem, options, context);
|
|
201064
|
+
await renderThemeSyncProgress(), options.publish && await themePublish(theme.id, session), await handlePushOutput(uploadResults, theme, session, options);
|
|
201124
201065
|
}
|
|
201125
201066
|
function hasUploadErrors(results) {
|
|
201126
201067
|
for (let [_key, result] of results.entries())
|
|
@@ -206834,7 +206775,7 @@ var import_core27 = __toESM(require_lib5(), 1);
|
|
|
206834
206775
|
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.5_@graphql-codegen+cli@5.0.4_@parcel+watcher@2.5.1_@types+no_1dab9937c446c9bfba7229e66e4ca808/node_modules/@shopify/cli-hydrogen/dist/lib/mini-oxygen/index.js
|
|
206835
206776
|
init_cjs_shims();
|
|
206836
206777
|
async function startMiniOxygen(options) {
|
|
206837
|
-
let { startWorkerdServer } = await import("./workerd-
|
|
206778
|
+
let { startWorkerdServer } = await import("./workerd-LEE5WATY.js");
|
|
206838
206779
|
return startWorkerdServer(options);
|
|
206839
206780
|
}
|
|
206840
206781
|
|
|
@@ -211974,7 +211915,7 @@ var AppLoader = class {
|
|
|
211974
211915
|
let specConfiguration = parseConfigurationObjectAgainstSpecification(specification, appConfiguration.path, appConfiguration, this.abortOrReport.bind(this));
|
|
211975
211916
|
return Object.keys(specConfiguration).length === 0 ? [null, Object.keys(specConfiguration)] : [await this.createExtensionInstance(specification.identifier, specConfiguration, appConfiguration.path, directory).then((extensionInstance) => this.validateConfigurationExtensionInstance(appConfiguration.client_id, appConfiguration, extensionInstance)), Object.keys(specConfiguration)];
|
|
211976
211917
|
})), unusedKeys = Object.keys(appConfiguration).filter((key) => !extensionInstancesWithKeys.some(([_3, keys]) => keys.includes(key))).filter((key) => ![...Object.keys(AppSchema.shape), "path", "organization_id"].includes(key));
|
|
211977
|
-
return unusedKeys.length > 0 && this.abortOrReport(outputContent`Unsupported section(s) in app configuration: ${unusedKeys.sort().join(", ")}`, void 0, appConfiguration.path), extensionInstancesWithKeys.filter(([instance]) => instance).map(([instance]) => instance);
|
|
211918
|
+
return unusedKeys.length > 0 && this.mode !== "local" && this.abortOrReport(outputContent`Unsupported section(s) in app configuration: ${unusedKeys.sort().join(", ")}`, void 0, appConfiguration.path), extensionInstancesWithKeys.filter(([instance]) => instance).map(([instance]) => instance);
|
|
211978
211919
|
}
|
|
211979
211920
|
async validateConfigurationExtensionInstance(apiKey, appConfiguration, extensionInstance) {
|
|
211980
211921
|
return extensionInstance && await extensionInstance.deployConfig({ apiKey, appConfiguration }) ? extensionInstance : void 0;
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
macAddress,
|
|
21
21
|
opentelemetryDomain,
|
|
22
22
|
themeToken
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-S63ZS7TF.js";
|
|
24
24
|
import "./chunk-VLBE545G.js";
|
|
25
25
|
import "./chunk-UMUTXITN.js";
|
|
26
26
|
import "./chunk-HMDWNGIV.js";
|
|
@@ -32,7 +32,7 @@ import "./chunk-UV5N2VL7.js";
|
|
|
32
32
|
import "./chunk-XE5EOEBL.js";
|
|
33
33
|
import "./chunk-CTFDRWUN.js";
|
|
34
34
|
import "./chunk-7IK72W75.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-EG6MBBEN.js";
|
|
36
36
|
import "./chunk-PKR7KJ6P.js";
|
|
37
37
|
export {
|
|
38
38
|
alwaysLogAnalytics,
|
|
@@ -57,4 +57,4 @@ export {
|
|
|
57
57
|
opentelemetryDomain,
|
|
58
58
|
themeToken
|
|
59
59
|
};
|
|
60
|
-
//# sourceMappingURL=local-
|
|
60
|
+
//# sourceMappingURL=local-OXFZVPNR.js.map
|
|
@@ -29,8 +29,8 @@ import {
|
|
|
29
29
|
versionSatisfies,
|
|
30
30
|
writePackageJSON,
|
|
31
31
|
yarnLockfile
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-SOQUEM6G.js";
|
|
33
|
+
import "./chunk-S63ZS7TF.js";
|
|
34
34
|
import "./chunk-VLBE545G.js";
|
|
35
35
|
import "./chunk-UMUTXITN.js";
|
|
36
36
|
import "./chunk-HMDWNGIV.js";
|
|
@@ -42,7 +42,7 @@ import "./chunk-UV5N2VL7.js";
|
|
|
42
42
|
import "./chunk-XE5EOEBL.js";
|
|
43
43
|
import "./chunk-CTFDRWUN.js";
|
|
44
44
|
import "./chunk-7IK72W75.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-EG6MBBEN.js";
|
|
46
46
|
import "./chunk-PKR7KJ6P.js";
|
|
47
47
|
export {
|
|
48
48
|
FindUpAndReadPackageJsonNotFoundError,
|
|
@@ -76,4 +76,4 @@ export {
|
|
|
76
76
|
writePackageJSON,
|
|
77
77
|
yarnLockfile
|
|
78
78
|
};
|
|
79
|
-
//# sourceMappingURL=node-package-manager-
|
|
79
|
+
//# sourceMappingURL=node-package-manager-2DJFEKWF.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolvePath,
|
|
14
14
|
sniffForJson,
|
|
15
15
|
sniffForPath
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EG6MBBEN.js";
|
|
17
17
|
import "./chunk-PKR7KJ6P.js";
|
|
18
18
|
export {
|
|
19
19
|
basename,
|
|
@@ -31,4 +31,4 @@ export {
|
|
|
31
31
|
sniffForJson,
|
|
32
32
|
sniffForPath
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=path-
|
|
34
|
+
//# sourceMappingURL=path-GB4VIEM6.js.map
|