@shopify/cli 3.84.0 → 3.84.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-75NBQMXN.js → chunk-2HA6WHOK.js} +2 -2
- package/dist/{chunk-WGLEUSG3.js → chunk-2M63OZ6L.js} +3 -3
- package/dist/{chunk-XGZDNZUX.js → chunk-42TDSAFO.js} +3 -3
- package/dist/{chunk-CW4CYMWP.js → chunk-4JIM2QT7.js} +4 -4
- package/dist/{chunk-TA4C3I5Z.js → chunk-57KJCVB5.js} +2 -2
- package/dist/{chunk-TP3H2NVV.js → chunk-5G56F2K6.js} +6 -6
- package/dist/{chunk-UMDZGSHP.js → chunk-77NCO4UD.js} +3 -3
- package/dist/{chunk-LV6TZ6RO.js → chunk-7AEOEVGT.js} +3 -3
- package/dist/{chunk-JTM64JML.js → chunk-DNXNKHZO.js} +2 -2
- package/dist/{chunk-KV6ENNDU.js → chunk-DSKW7GLZ.js} +5 -5
- package/dist/{chunk-M5CMNHPW.js → chunk-DVZ22YSP.js} +3 -3
- package/dist/{chunk-K4PSDTA7.js → chunk-ES5N6OQW.js} +4 -4
- package/dist/{chunk-HNKVF23P.js → chunk-FUWTEDP2.js} +9 -9
- package/dist/{chunk-B26QDYDN.js → chunk-FYGQPHYH.js} +2 -2
- package/dist/{chunk-YXCYRXKK.js → chunk-GWETXJR2.js} +6 -6
- package/dist/{chunk-4R4BTRMH.js → chunk-IM2PF4V5.js} +2 -2
- package/dist/{chunk-HVPPS5EU.js → chunk-IRF44N7J.js} +2 -2
- package/dist/{chunk-XMFLKI5L.js → chunk-JB4IBM6F.js} +2 -2
- package/dist/{chunk-3R34SLHS.js → chunk-JJH27HLJ.js} +3 -3
- package/dist/{chunk-3R5F566Q.js → chunk-JNDSQA4U.js} +3 -3
- package/dist/{chunk-7KO7T466.js → chunk-K5XXB73S.js} +6 -6
- package/dist/{chunk-6JDW32IQ.js → chunk-KS7CKFXX.js} +5 -5
- package/dist/{chunk-V5KWQR65.js → chunk-MCEP4L5M.js} +3 -3
- package/dist/{chunk-5YF6CRHK.js → chunk-MQQ5ZTSK.js} +4 -4
- package/dist/{chunk-ESWT7BGC.js → chunk-N2463ZYG.js} +2 -2
- package/dist/{chunk-VM6ZV5T3.js → chunk-NBOUUR2C.js} +3 -3
- package/dist/{chunk-WHQB5G4I.js → chunk-PQCWFPSI.js} +7 -7
- package/dist/{chunk-L3FIMPVS.js → chunk-QO4ILPU2.js} +3 -3
- package/dist/{chunk-B6R3QPZT.js → chunk-R3FZ7BFA.js} +3 -3
- package/dist/{chunk-F7CACVY7.js → chunk-SKEV2KRG.js} +3 -3
- package/dist/{chunk-SGRODM6N.js → chunk-T4K4LRMO.js} +4 -4
- package/dist/{chunk-PJ7QP3SS.js → chunk-TW3OHW6H.js} +6 -6
- package/dist/{chunk-N3EU6FVY.js → chunk-Y4JV2C2F.js} +3 -3
- package/dist/{chunk-N367MT6A.js → chunk-YQVYH3XF.js} +4 -4
- 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 +10 -10
- package/dist/cli/commands/debug/command-flags.js +10 -10
- package/dist/cli/commands/docs/generate.js +10 -10
- package/dist/cli/commands/docs/generate.test.js +10 -10
- package/dist/cli/commands/help.js +10 -10
- package/dist/cli/commands/kitchen-sink/async.js +11 -11
- package/dist/cli/commands/kitchen-sink/async.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/index.js +13 -13
- package/dist/cli/commands/kitchen-sink/index.test.js +13 -13
- package/dist/cli/commands/kitchen-sink/prompts.js +11 -11
- package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.test.js +11 -11
- package/dist/cli/commands/notifications/generate.js +11 -11
- package/dist/cli/commands/notifications/list.js +11 -11
- package/dist/cli/commands/search.js +11 -11
- package/dist/cli/commands/upgrade.js +11 -11
- package/dist/cli/commands/version.js +11 -11
- package/dist/cli/commands/version.test.js +11 -11
- package/dist/cli/services/commands/notifications.js +6 -6
- package/dist/cli/services/commands/search.js +2 -2
- package/dist/cli/services/commands/search.test.js +2 -2
- package/dist/cli/services/commands/version.js +3 -3
- package/dist/cli/services/commands/version.test.js +4 -4
- package/dist/cli/services/kitchen-sink/async.js +2 -2
- package/dist/cli/services/kitchen-sink/prompts.js +2 -2
- package/dist/cli/services/kitchen-sink/static.js +2 -2
- package/dist/cli/services/upgrade.js +3 -3
- package/dist/cli/services/upgrade.test.js +4 -4
- package/dist/{custom-oclif-loader-FOUJADV6.js → custom-oclif-loader-LOMFS5PB.js} +2 -2
- package/dist/{error-handler-65LUJ2S2.js → error-handler-TQKQ3EAE.js} +8 -8
- package/dist/hooks/postrun.js +6 -6
- package/dist/hooks/prerun.js +7 -7
- package/dist/index.js +116 -89
- package/dist/{local-L7K7ZZ6L.js → local-76WZCPFM.js} +2 -2
- package/dist/{node-package-manager-TSNDPDHE.js → node-package-manager-OCGFQDFC.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-ZDWJULQO.js → ui-A52PK2HZ.js} +2 -2
- package/dist/{workerd-Y6MJ3FZI.js → workerd-PHNPZMMV.js} +12 -12
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
supressNodeExperimentalWarnings,
|
|
130
130
|
unsetStorefront,
|
|
131
131
|
waitForJob
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-FUWTEDP2.js";
|
|
133
133
|
import {
|
|
134
134
|
require_fs,
|
|
135
135
|
require_glob,
|
|
@@ -144,37 +144,37 @@ import {
|
|
|
144
144
|
} from "./chunk-3GXB4ZRP.js";
|
|
145
145
|
import {
|
|
146
146
|
List
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-ES5N6OQW.js";
|
|
148
148
|
import {
|
|
149
149
|
Search
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-QO4ILPU2.js";
|
|
151
151
|
import {
|
|
152
152
|
Upgrade
|
|
153
|
-
} from "./chunk-
|
|
154
|
-
import "./chunk-
|
|
153
|
+
} from "./chunk-4JIM2QT7.js";
|
|
154
|
+
import "./chunk-7AEOEVGT.js";
|
|
155
155
|
import {
|
|
156
156
|
Version
|
|
157
|
-
} from "./chunk-
|
|
158
|
-
import "./chunk-
|
|
159
|
-
import "./chunk-
|
|
157
|
+
} from "./chunk-Y4JV2C2F.js";
|
|
158
|
+
import "./chunk-R3FZ7BFA.js";
|
|
159
|
+
import "./chunk-JB4IBM6F.js";
|
|
160
160
|
import {
|
|
161
161
|
KitchenSinkAll
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-KS7CKFXX.js";
|
|
163
163
|
import {
|
|
164
164
|
KitchenSinkPrompts
|
|
165
|
-
} from "./chunk-
|
|
166
|
-
import "./chunk-
|
|
165
|
+
} from "./chunk-2M63OZ6L.js";
|
|
166
|
+
import "./chunk-DNXNKHZO.js";
|
|
167
167
|
import {
|
|
168
168
|
KitchenSinkStatic
|
|
169
|
-
} from "./chunk-
|
|
170
|
-
import "./chunk-
|
|
169
|
+
} from "./chunk-NBOUUR2C.js";
|
|
170
|
+
import "./chunk-IM2PF4V5.js";
|
|
171
171
|
import {
|
|
172
172
|
Generate
|
|
173
|
-
} from "./chunk-
|
|
174
|
-
import "./chunk-
|
|
173
|
+
} from "./chunk-JNDSQA4U.js";
|
|
174
|
+
import "./chunk-DSKW7GLZ.js";
|
|
175
175
|
import {
|
|
176
176
|
Logout
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-MQQ5ZTSK.js";
|
|
178
178
|
import {
|
|
179
179
|
ensureAuthenticatedAdmin,
|
|
180
180
|
ensureAuthenticatedAppManagementAndBusinessPlatform,
|
|
@@ -182,32 +182,32 @@ import {
|
|
|
182
182
|
ensureAuthenticatedPartners,
|
|
183
183
|
ensureAuthenticatedStorefront,
|
|
184
184
|
ensureAuthenticatedThemes
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-YQVYH3XF.js";
|
|
186
186
|
import {
|
|
187
187
|
ClearCache,
|
|
188
188
|
globalFlags,
|
|
189
189
|
jsonFlag,
|
|
190
190
|
runCLI
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-PQCWFPSI.js";
|
|
192
192
|
import {
|
|
193
193
|
CommandFlags
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-42TDSAFO.js";
|
|
195
195
|
import {
|
|
196
196
|
DocsGenerate
|
|
197
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-MCEP4L5M.js";
|
|
198
198
|
import {
|
|
199
199
|
HelpCommand
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-N2463ZYG.js";
|
|
201
201
|
import {
|
|
202
202
|
KitchenSinkAsync
|
|
203
|
-
} from "./chunk-
|
|
204
|
-
import "./chunk-
|
|
203
|
+
} from "./chunk-77NCO4UD.js";
|
|
204
|
+
import "./chunk-57KJCVB5.js";
|
|
205
205
|
import {
|
|
206
206
|
base_command_default,
|
|
207
207
|
decodeToml,
|
|
208
208
|
encodeToml,
|
|
209
209
|
loadEnvironment
|
|
210
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-TW3OHW6H.js";
|
|
211
211
|
import {
|
|
212
212
|
require_byline,
|
|
213
213
|
require_end_of_stream,
|
|
@@ -215,7 +215,7 @@ import {
|
|
|
215
215
|
require_iserror,
|
|
216
216
|
require_pump,
|
|
217
217
|
require_stack_generator
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-5G56F2K6.js";
|
|
219
219
|
import {
|
|
220
220
|
require_once
|
|
221
221
|
} from "./chunk-SHWOPMLQ.js";
|
|
@@ -223,7 +223,7 @@ import {
|
|
|
223
223
|
fanoutHooks,
|
|
224
224
|
getListOfTunnelPlugins,
|
|
225
225
|
reportAnalyticsEvent
|
|
226
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-K5XXB73S.js";
|
|
227
227
|
import {
|
|
228
228
|
DevServerCore,
|
|
229
229
|
adminFqdn,
|
|
@@ -236,10 +236,10 @@ import {
|
|
|
236
236
|
normalizeStoreFqdn,
|
|
237
237
|
ok,
|
|
238
238
|
partnersFqdn
|
|
239
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-T4K4LRMO.js";
|
|
240
240
|
import {
|
|
241
241
|
showNotificationsIfNeeded
|
|
242
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-GWETXJR2.js";
|
|
243
243
|
import {
|
|
244
244
|
ClientError,
|
|
245
245
|
FetchError,
|
|
@@ -267,11 +267,11 @@ import {
|
|
|
267
267
|
require_type,
|
|
268
268
|
shopifyFetch,
|
|
269
269
|
z
|
|
270
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-DVZ22YSP.js";
|
|
271
271
|
import "./chunk-25IMI7TH.js";
|
|
272
272
|
import {
|
|
273
273
|
CLI_KIT_VERSION
|
|
274
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-FYGQPHYH.js";
|
|
275
275
|
import {
|
|
276
276
|
LocalStorage,
|
|
277
277
|
UnknownPackageManagerError,
|
|
@@ -295,7 +295,7 @@ import {
|
|
|
295
295
|
usesWorkspaces,
|
|
296
296
|
versionSatisfies,
|
|
297
297
|
writePackageJSON
|
|
298
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-IRF44N7J.js";
|
|
299
299
|
import {
|
|
300
300
|
AbortController as AbortController2,
|
|
301
301
|
AbortError,
|
|
@@ -513,7 +513,7 @@ import {
|
|
|
513
513
|
username,
|
|
514
514
|
writeFile,
|
|
515
515
|
writeFileSync
|
|
516
|
-
} from "./chunk-
|
|
516
|
+
} from "./chunk-SKEV2KRG.js";
|
|
517
517
|
import {
|
|
518
518
|
require_graceful_fs
|
|
519
519
|
} from "./chunk-75LV6AQS.js";
|
|
@@ -191449,12 +191449,7 @@ var themeFlags = {
|
|
|
191449
191449
|
}),
|
|
191450
191450
|
password: import_core.Flags.string({
|
|
191451
191451
|
description: "Password generated from the Theme Access app.",
|
|
191452
|
-
env: "SHOPIFY_CLI_THEME_TOKEN"
|
|
191453
|
-
parse: async (input) => {
|
|
191454
|
-
if (input.startsWith("shptka_"))
|
|
191455
|
-
return input;
|
|
191456
|
-
throw new AbortError("Invalid password. Please generate a new password from the Theme Access app.");
|
|
191457
|
-
}
|
|
191452
|
+
env: "SHOPIFY_CLI_THEME_TOKEN"
|
|
191458
191453
|
}),
|
|
191459
191454
|
store: import_core.Flags.string({
|
|
191460
191455
|
char: "s",
|
|
@@ -195291,10 +195286,19 @@ async function initializeRepl(adminSession, themeId, url, themeAccessPassword, s
|
|
|
195291
195286
|
return replLoop(session, themeId, url);
|
|
195292
195287
|
}
|
|
195293
195288
|
|
|
195289
|
+
// ../theme/dist/cli/services/flags-validation.js
|
|
195290
|
+
init_cjs_shims();
|
|
195291
|
+
function validateThemePassword(password) {
|
|
195292
|
+
if (password && !password.startsWith("shptka_"))
|
|
195293
|
+
throw new AbortError("Invalid password. Please generate a new password from the Theme Access app.");
|
|
195294
|
+
}
|
|
195295
|
+
|
|
195294
195296
|
// ../theme/dist/cli/commands/theme/console.js
|
|
195295
195297
|
var import_core3 = __toESM(require_lib(), 1), _a2, Console = class extends ThemeCommand {
|
|
195296
195298
|
async run() {
|
|
195297
|
-
let { flags } = await this.parse(_a2)
|
|
195299
|
+
let { flags } = await this.parse(_a2);
|
|
195300
|
+
validateThemePassword(flags.password);
|
|
195301
|
+
let store = ensureThemeStore(flags), { url, password: themeAccessPassword } = flags, adminSession = await ensureAuthenticatedThemes(store, themeAccessPassword), { themeId, storePassword } = await ensureReplEnv(adminSession, flags["store-password"]);
|
|
195298
195302
|
await initializeRepl(adminSession, themeId, url, themeAccessPassword, storePassword);
|
|
195299
195303
|
}
|
|
195300
195304
|
};
|
|
@@ -198177,7 +198181,9 @@ async function writeMetafieldDefinitionsToFile(path4, content) {
|
|
|
198177
198181
|
var import_core5 = __toESM(require_lib(), 1);
|
|
198178
198182
|
var _a4, Dev = class extends ThemeCommand {
|
|
198179
198183
|
async run() {
|
|
198180
|
-
let flags = (await this.parse(_a4)).flags, { ignore: ignore3 = [], only = [] } = flags
|
|
198184
|
+
let flags = (await this.parse(_a4)).flags, { ignore: ignore3 = [], only = [] } = flags;
|
|
198185
|
+
validateThemePassword(flags.password);
|
|
198186
|
+
let store = ensureThemeStore(flags), adminSession = await ensureAuthenticatedThemes(store, flags.password), theme;
|
|
198181
198187
|
if (flags.theme) {
|
|
198182
198188
|
let filter = { filter: { theme: flags.theme } };
|
|
198183
198189
|
theme = await findOrSelectTheme(adminSession, filter), flags = { ...flags, theme: theme.id.toString() };
|
|
@@ -199106,7 +199112,9 @@ async function openProfile(profileJson) {
|
|
|
199106
199112
|
var import_core11 = __toESM(require_lib(), 1);
|
|
199107
199113
|
var _a11, Profile = class extends ThemeCommand {
|
|
199108
199114
|
async run() {
|
|
199109
|
-
let { flags } = await this.parse(_a11)
|
|
199115
|
+
let { flags } = await this.parse(_a11);
|
|
199116
|
+
validateThemePassword(flags.password);
|
|
199117
|
+
let store = ensureThemeStore(flags), { password: themeAccessPassword } = flags, adminSession = await ensureAuthenticatedThemes(store, themeAccessPassword), filter;
|
|
199110
199118
|
flags.theme ? filter = { filter: { theme: flags.theme } } : filter = { filter: { live: !0 } };
|
|
199111
199119
|
let theme = await findOrSelectTheme(adminSession, filter), tasks = [
|
|
199112
199120
|
{
|
|
@@ -206546,7 +206554,7 @@ var import_core29 = __toESM(require_lib(), 1);
|
|
|
206546
206554
|
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.3_@graphql-codegen+cli@5.0.4_@parcel+watcher@2.5.1_@types+no_571e6f0170478bea3c59260825bed3cb/node_modules/@shopify/cli-hydrogen/dist/lib/mini-oxygen/index.js
|
|
206547
206555
|
init_cjs_shims();
|
|
206548
206556
|
async function startMiniOxygen(options) {
|
|
206549
|
-
let { startWorkerdServer } = await import("./workerd-
|
|
206557
|
+
let { startWorkerdServer } = await import("./workerd-PHNPZMMV.js");
|
|
206550
206558
|
return startWorkerdServer(options);
|
|
206551
206559
|
}
|
|
206552
206560
|
|
|
@@ -216069,7 +216077,8 @@ function numberFromGid(gid) {
|
|
|
216069
216077
|
return gid.startsWith("gid://") ? Number(gid.match(/^gid.*\/(\d+)$/)[1]) : Number(gid);
|
|
216070
216078
|
}
|
|
216071
216079
|
async function appDeepLink({ id, organizationId }) {
|
|
216072
|
-
|
|
216080
|
+
let orgId = numberFromGid(organizationId).toString();
|
|
216081
|
+
return `https://${await developerDashboardFqdn()}/dashboard/${orgId}/apps/${numberFromGid(id)}`;
|
|
216073
216082
|
}
|
|
216074
216083
|
async function versionDeepLink(organizationId, appId, versionId) {
|
|
216075
216084
|
return `${await appDeepLink({ organizationId, id: appId })}/versions/${numberFromGid(versionId)}`;
|
|
@@ -216318,7 +216327,7 @@ function partition(collection, callback) {
|
|
|
216318
216327
|
}
|
|
216319
216328
|
|
|
216320
216329
|
// ../app/dist/cli/services/context/id-matching.js
|
|
216321
|
-
var sameTypeAndName = (local, remote) => remote.type.toLowerCase() === local.graphQLType.toLowerCase() && slugify(remote.title) === slugify(local.handle);
|
|
216330
|
+
var sameTypeAndName = (local, remote) => (remote.type.toLowerCase() === local.graphQLType.toLowerCase() || remote.type.toLowerCase() === local.externalType.toLowerCase() || remote.type.toLowerCase() === local.type.toLowerCase()) && slugify(remote.title) === slugify(local.handle);
|
|
216322
216331
|
function matchByNameAndType(local, remote) {
|
|
216323
216332
|
let uniqueLocal = uniqBy(local, (elem) => [elem.graphQLType, elem.handle]), uniqueRemote = uniqBy(remote, (elem) => [elem.type, elem.title]), matched = {};
|
|
216324
216333
|
uniqueLocal.forEach((localSource) => {
|
|
@@ -218605,32 +218614,6 @@ async function bundleAndBuildExtensions(options) {
|
|
|
218605
218614
|
// ../app/dist/cli/services/import-extensions.js
|
|
218606
218615
|
init_cjs_shims();
|
|
218607
218616
|
|
|
218608
|
-
// ../app/dist/cli/services/extensions/common.js
|
|
218609
|
-
init_cjs_shims();
|
|
218610
|
-
async function ensureDownloadedExtensionFlavorExists(extensionFlavor, templateDownloadDir) {
|
|
218611
|
-
let templatePath = extensionFlavor?.path || "", origin = joinPath(templateDownloadDir, templatePath);
|
|
218612
|
-
if (!await fileExists(origin))
|
|
218613
|
-
throw new AbortError(`
|
|
218614
|
-
The extension is not available for ${extensionFlavor?.value}`);
|
|
218615
|
-
return origin;
|
|
218616
|
-
}
|
|
218617
|
-
async function ensureExtensionDirectoryExists({ name, app }) {
|
|
218618
|
-
let hyphenizedName = hyphenate(name), extensionDirectory = joinPath(app.directory, blocks.extensions.directoryName, hyphenizedName);
|
|
218619
|
-
if (await fileExists(extensionDirectory))
|
|
218620
|
-
throw new AbortError(`
|
|
218621
|
-
A directory with this name (${hyphenizedName}) already exists.
|
|
218622
|
-
Choose a new name for your extension.`);
|
|
218623
|
-
return await mkdir(extensionDirectory), await touchFile(joinPath(extensionDirectory, configurationFileNames.lockFile)), extensionDirectory;
|
|
218624
|
-
}
|
|
218625
|
-
async function canEnablePreviewMode({ localApp, developerPlatformClient, apiKey, organizationId }) {
|
|
218626
|
-
let { dashboardManagedExtensionRegistrations } = (await developerPlatformClient.appExtensionRegistrations({
|
|
218627
|
-
id: apiKey,
|
|
218628
|
-
apiKey,
|
|
218629
|
-
organizationId
|
|
218630
|
-
})).app;
|
|
218631
|
-
return dashboardManagedExtensionRegistrations.length > 0 || localApp.allExtensions.filter((ext) => ext.isThemeExtension).length > 0 || localApp.allExtensions.length > 0;
|
|
218632
|
-
}
|
|
218633
|
-
|
|
218634
218617
|
// ../app/dist/cli/prompts/import-extensions.js
|
|
218635
218618
|
init_cjs_shims();
|
|
218636
218619
|
|
|
@@ -218958,7 +218941,27 @@ async function selectMigrationChoice(migrationChoices) {
|
|
|
218958
218941
|
}
|
|
218959
218942
|
|
|
218960
218943
|
// ../app/dist/cli/services/import-extensions.js
|
|
218961
|
-
var allExtensionTypes = allMigrationChoices.flatMap((choice) => choice.extensionTypes);
|
|
218944
|
+
var allExtensionTypes = allMigrationChoices.flatMap((choice) => choice.extensionTypes), DirectoryAction;
|
|
218945
|
+
(function(DirectoryAction2) {
|
|
218946
|
+
DirectoryAction2.Write = "write", DirectoryAction2.Skip = "skip", DirectoryAction2.Cancel = "cancel";
|
|
218947
|
+
})(DirectoryAction || (DirectoryAction = {}));
|
|
218948
|
+
async function handleExtensionDirectory({ name, app }) {
|
|
218949
|
+
let hyphenizedName = hyphenate(name), extensionDirectory = joinPath(app.directory, blocks.extensions.directoryName, hyphenizedName);
|
|
218950
|
+
if (await fileExists(extensionDirectory)) {
|
|
218951
|
+
let choices = [
|
|
218952
|
+
{ label: "Overwrite local TOML with remote configuration", value: DirectoryAction.Write },
|
|
218953
|
+
{ label: "Keep local TOML", value: DirectoryAction.Skip },
|
|
218954
|
+
{ label: "Cancel", value: DirectoryAction.Cancel }
|
|
218955
|
+
], action = await renderSelectPrompt({
|
|
218956
|
+
message: `Directory "${hyphenizedName}" already exists. What would you like to do?`,
|
|
218957
|
+
choices
|
|
218958
|
+
});
|
|
218959
|
+
if (action === DirectoryAction.Cancel)
|
|
218960
|
+
throw new AbortSilentError();
|
|
218961
|
+
return { directory: extensionDirectory, action };
|
|
218962
|
+
}
|
|
218963
|
+
return await mkdir(extensionDirectory), await touchFile(joinPath(extensionDirectory, configurationFileNames.lockFile)), { directory: extensionDirectory, action: DirectoryAction.Write };
|
|
218964
|
+
}
|
|
218962
218965
|
async function importExtensions(options) {
|
|
218963
218966
|
let { app, remoteApp, developerPlatformClient, extensionTypes, extensions, buildTomlObject: buildTomlObject6, all } = options, extensionsToMigrate = extensions.filter((ext) => extensionTypes.includes(ext.type.toLowerCase()));
|
|
218964
218967
|
if (extensionsToMigrate = filterOutImportedExtensions(app, extensionsToMigrate), extensionsToMigrate.length === 0)
|
|
@@ -218970,12 +218973,14 @@ async function importExtensions(options) {
|
|
|
218970
218973
|
promptAnswer !== "All" && (extensionsToMigrate = [extensionsToMigrate.find((ext) => ext?.uuid === promptAnswer)]);
|
|
218971
218974
|
}
|
|
218972
218975
|
let extensionUuids = {}, importPromises = extensionsToMigrate.map(async (ext) => {
|
|
218973
|
-
let directory = await
|
|
218974
|
-
|
|
218975
|
-
|
|
218976
|
-
|
|
218977
|
-
|
|
218978
|
-
|
|
218976
|
+
let { directory, action } = await handleExtensionDirectory({ app, name: ext.title }), handle = slugify(ext.title.substring(0, MAX_EXTENSION_HANDLE_LENGTH));
|
|
218977
|
+
if (extensionUuids[handle] = ext.uuid, action === DirectoryAction.Write) {
|
|
218978
|
+
let tomlObject = buildTomlObject6(ext, extensions, app.configuration), path4 = joinPath(directory, "shopify.extension.toml");
|
|
218979
|
+
await writeFile(path4, tomlObject);
|
|
218980
|
+
let lockFilePath = joinPath(directory, configurationFileNames.lockFile);
|
|
218981
|
+
await removeFile(lockFilePath);
|
|
218982
|
+
}
|
|
218983
|
+
return { extension: ext, directory: joinPath("extensions", basename(directory)) };
|
|
218979
218984
|
}), generatedExtensions = await Promise.all(importPromises);
|
|
218980
218985
|
renderSuccessMessages(generatedExtensions), await updateAppIdentifiers({
|
|
218981
218986
|
app,
|
|
@@ -219146,7 +219151,7 @@ async function deploy(options) {
|
|
|
219146
219151
|
}), await updateAppIdentifiers({ app, identifiers, command: "deploy", developerPlatformClient });
|
|
219147
219152
|
}
|
|
219148
219153
|
}
|
|
219149
|
-
]),
|
|
219154
|
+
]), await outputCompletionMessage({
|
|
219150
219155
|
app,
|
|
219151
219156
|
release: release2,
|
|
219152
219157
|
uploadExtensionsBundleResult,
|
|
@@ -219157,9 +219162,6 @@ async function deploy(options) {
|
|
|
219157
219162
|
}
|
|
219158
219163
|
return { app };
|
|
219159
219164
|
}
|
|
219160
|
-
async function deleteEnvFile(app) {
|
|
219161
|
-
app.dotenv && fileExistsSync(app.dotenv.path) && await removeFile(app.dotenv.path);
|
|
219162
|
-
}
|
|
219163
219165
|
async function outputCompletionMessage({ app, release: release2, uploadExtensionsBundleResult, didMigrateExtensionsToDevDash }) {
|
|
219164
219166
|
let linkAndMessage = [
|
|
219165
219167
|
{ link: { label: uploadExtensionsBundleResult.versionTag ?? "version", url: uploadExtensionsBundleResult.location } },
|
|
@@ -223228,6 +223230,32 @@ function isEditionWeek() {
|
|
|
223228
223230
|
return now >= editionStart && now <= editionWeekEnd;
|
|
223229
223231
|
}
|
|
223230
223232
|
|
|
223233
|
+
// ../app/dist/cli/services/extensions/common.js
|
|
223234
|
+
init_cjs_shims();
|
|
223235
|
+
async function ensureDownloadedExtensionFlavorExists(extensionFlavor, templateDownloadDir) {
|
|
223236
|
+
let templatePath = extensionFlavor?.path || "", origin = joinPath(templateDownloadDir, templatePath);
|
|
223237
|
+
if (!await fileExists(origin))
|
|
223238
|
+
throw new AbortError(`
|
|
223239
|
+
The extension is not available for ${extensionFlavor?.value}`);
|
|
223240
|
+
return origin;
|
|
223241
|
+
}
|
|
223242
|
+
async function ensureExtensionDirectoryExists({ name, app }) {
|
|
223243
|
+
let hyphenizedName = hyphenate(name), extensionDirectory = joinPath(app.directory, blocks.extensions.directoryName, hyphenizedName);
|
|
223244
|
+
if (await fileExists(extensionDirectory))
|
|
223245
|
+
throw new AbortError(`
|
|
223246
|
+
A directory with this name (${hyphenizedName}) already exists.
|
|
223247
|
+
Choose a new name for your extension.`);
|
|
223248
|
+
return await mkdir(extensionDirectory), await touchFile(joinPath(extensionDirectory, configurationFileNames.lockFile)), extensionDirectory;
|
|
223249
|
+
}
|
|
223250
|
+
async function canEnablePreviewMode({ localApp, developerPlatformClient, apiKey, organizationId }) {
|
|
223251
|
+
let { dashboardManagedExtensionRegistrations } = (await developerPlatformClient.appExtensionRegistrations({
|
|
223252
|
+
id: apiKey,
|
|
223253
|
+
apiKey,
|
|
223254
|
+
organizationId
|
|
223255
|
+
})).app;
|
|
223256
|
+
return dashboardManagedExtensionRegistrations.length > 0 || localApp.allExtensions.filter((ext) => ext.isThemeExtension).length > 0 || localApp.allExtensions.length > 0;
|
|
223257
|
+
}
|
|
223258
|
+
|
|
223231
223259
|
// ../app/dist/cli/services/dev/port-warnings.js
|
|
223232
223260
|
init_cjs_shims();
|
|
223233
223261
|
function renderPortWarnings(portDetails) {
|
|
@@ -225278,14 +225306,13 @@ function getTemplateLanguage(flavor) {
|
|
|
225278
225306
|
}
|
|
225279
225307
|
}
|
|
225280
225308
|
async function generateExtensionTemplate(options) {
|
|
225281
|
-
let extensionName = options.extensionChoices.name, extensionFlavorValue = options.extensionChoices.flavor, extensionFlavor = options.extensionTemplate.supportedFlavors.find((flavor) => flavor.value === extensionFlavorValue), directory = await ensureExtensionDirectoryExists({ app: options.app, name: extensionName }), url = options.cloneUrl ?? options.extensionTemplate.url,
|
|
225309
|
+
let extensionName = options.extensionChoices.name, extensionFlavorValue = options.extensionChoices.flavor, extensionFlavor = options.extensionTemplate.supportedFlavors.find((flavor) => flavor.value === extensionFlavorValue), directory = await ensureExtensionDirectoryExists({ app: options.app, name: extensionName }), url = options.cloneUrl ?? options.extensionTemplate.url, initOptions = {
|
|
225282
225310
|
directory,
|
|
225283
225311
|
url,
|
|
225284
225312
|
app: options.app,
|
|
225285
225313
|
type: options.extensionTemplate.type,
|
|
225286
225314
|
name: extensionName,
|
|
225287
225315
|
extensionFlavor,
|
|
225288
|
-
uid,
|
|
225289
225316
|
onGetTemplateRepository: options.onGetTemplateRepository ?? (async (url2, destination) => {
|
|
225290
225317
|
await downloadGitRepository({ repoUrl: url2, destination, shallow: !0 });
|
|
225291
225318
|
})
|
|
@@ -225311,13 +225338,13 @@ async function extensionInit(options) {
|
|
|
225311
225338
|
throw await removeFile(options.directory), error;
|
|
225312
225339
|
}
|
|
225313
225340
|
}
|
|
225314
|
-
async function themeExtensionInit({ directory, url, type, name, extensionFlavor,
|
|
225341
|
+
async function themeExtensionInit({ directory, url, type, name, extensionFlavor, onGetTemplateRepository }) {
|
|
225315
225342
|
return inTemporaryDirectory(async (tmpDir) => {
|
|
225316
225343
|
let templateDirectory = await downloadOrFindTemplateDirectory(url, extensionFlavor, tmpDir, onGetTemplateRepository);
|
|
225317
|
-
await recursiveLiquidTemplateCopy(templateDirectory, directory, { name, type, uid });
|
|
225344
|
+
await recursiveLiquidTemplateCopy(templateDirectory, directory, { name, type, uid: nonRandomUUID(slugify(name)) });
|
|
225318
225345
|
});
|
|
225319
225346
|
}
|
|
225320
|
-
async function functionExtensionInit({ directory, url, app, name, extensionFlavor,
|
|
225347
|
+
async function functionExtensionInit({ directory, url, app, name, extensionFlavor, onGetTemplateRepository }) {
|
|
225321
225348
|
let templateLanguage = getTemplateLanguage(extensionFlavor?.value), taskList = [];
|
|
225322
225349
|
taskList.push({
|
|
225323
225350
|
title: "Generating function extension",
|
|
@@ -225328,7 +225355,7 @@ async function functionExtensionInit({ directory, url, app, name, extensionFlavo
|
|
|
225328
225355
|
name,
|
|
225329
225356
|
handle: slugify(name),
|
|
225330
225357
|
flavor: extensionFlavor?.value,
|
|
225331
|
-
uid
|
|
225358
|
+
uid: nonRandomUUID(slugify(name))
|
|
225332
225359
|
});
|
|
225333
225360
|
}), templateLanguage === "javascript") {
|
|
225334
225361
|
let srcFileExtension = getSrcFileExtension(extensionFlavor?.value ?? "rust");
|
|
@@ -225353,7 +225380,7 @@ async function functionExtensionInit({ directory, url, app, name, extensionFlavo
|
|
|
225353
225380
|
}
|
|
225354
225381
|
}), await renderTasks(taskList);
|
|
225355
225382
|
}
|
|
225356
|
-
async function uiExtensionInit({ directory, url, app, name, extensionFlavor,
|
|
225383
|
+
async function uiExtensionInit({ directory, url, app, name, extensionFlavor, onGetTemplateRepository }) {
|
|
225357
225384
|
let templateLanguage = getTemplateLanguage(extensionFlavor?.value), tasks = [
|
|
225358
225385
|
{
|
|
225359
225386
|
title: "Generating extension",
|
|
@@ -225366,7 +225393,7 @@ async function uiExtensionInit({ directory, url, app, name, extensionFlavor, uid
|
|
|
225366
225393
|
name,
|
|
225367
225394
|
handle: slugify(name),
|
|
225368
225395
|
flavor: extensionFlavor?.value ?? "",
|
|
225369
|
-
uid
|
|
225396
|
+
uid: nonRandomUUID(slugify(name))
|
|
225370
225397
|
});
|
|
225371
225398
|
}), templateLanguage === "javascript" && (await changeIndexFileExtension(directory, srcFileExtension), await removeUnwantedTemplateFilesPerFlavor(directory, extensionFlavor.value));
|
|
225372
225399
|
}
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
macAddress,
|
|
21
21
|
opentelemetryDomain,
|
|
22
22
|
themeToken
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SKEV2KRG.js";
|
|
24
24
|
import "./chunk-75LV6AQS.js";
|
|
25
25
|
import "./chunk-EG6MBBEN.js";
|
|
26
26
|
import "./chunk-3FBDJEGD.js";
|
|
@@ -55,4 +55,4 @@ export {
|
|
|
55
55
|
opentelemetryDomain,
|
|
56
56
|
themeToken
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=local-
|
|
58
|
+
//# sourceMappingURL=local-76WZCPFM.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-IRF44N7J.js";
|
|
33
|
+
import "./chunk-SKEV2KRG.js";
|
|
34
34
|
import "./chunk-75LV6AQS.js";
|
|
35
35
|
import "./chunk-EG6MBBEN.js";
|
|
36
36
|
import "./chunk-3FBDJEGD.js";
|
|
@@ -74,4 +74,4 @@ export {
|
|
|
74
74
|
writePackageJSON,
|
|
75
75
|
yarnLockfile
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=node-package-manager-
|
|
77
|
+
//# sourceMappingURL=node-package-manager-OCGFQDFC.js.map
|