@shopify/cli 3.84.0 → 3.84.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-LV6TZ6RO.js → chunk-2TBGVDDK.js} +3 -3
- package/dist/{chunk-XMFLKI5L.js → chunk-46YOOMEM.js} +2 -2
- package/dist/{chunk-CW4CYMWP.js → chunk-6A27UWO7.js} +4 -4
- package/dist/{chunk-HNKVF23P.js → chunk-6JFZSZKE.js} +10 -10
- package/dist/{chunk-JTM64JML.js → chunk-7UHRC35E.js} +2 -2
- package/dist/{chunk-TA4C3I5Z.js → chunk-7YVG6N4O.js} +2 -2
- package/dist/{chunk-75NBQMXN.js → chunk-AQVXNWM2.js} +2 -2
- package/dist/{chunk-3R5F566Q.js → chunk-BSKQ4RKV.js} +3 -3
- package/dist/{chunk-4R4BTRMH.js → chunk-BX2C6EVM.js} +2 -2
- package/dist/{chunk-ESWT7BGC.js → chunk-DCU33ZNP.js} +2 -2
- package/dist/{chunk-WHQB5G4I.js → chunk-DZCCH5OM.js} +7 -7
- package/dist/{chunk-VM6ZV5T3.js → chunk-G74IQQ6M.js} +3 -3
- package/dist/{chunk-5YF6CRHK.js → chunk-JHLYV5K7.js} +4 -4
- package/dist/{chunk-HVPPS5EU.js → chunk-KHBZ52PT.js} +3 -3
- package/dist/{chunk-6JDW32IQ.js → chunk-L5OKA4W4.js} +5 -5
- package/dist/{chunk-V5KWQR65.js → chunk-M6EH6UKK.js} +3 -3
- package/dist/{chunk-UMDZGSHP.js → chunk-MRQXBTNU.js} +3 -3
- package/dist/{chunk-KV6ENNDU.js → chunk-MXDBI4PG.js} +5 -5
- package/dist/{chunk-M5CMNHPW.js → chunk-OCEWRJZI.js} +3 -3
- package/dist/{chunk-PJ7QP3SS.js → chunk-QS5WPZTS.js} +5 -5
- package/dist/{chunk-L3FIMPVS.js → chunk-RTTTZZGY.js} +3 -3
- package/dist/{chunk-N367MT6A.js → chunk-SJMHVGQ5.js} +4 -4
- package/dist/{chunk-SGRODM6N.js → chunk-SM7O6ZFJ.js} +4 -4
- package/dist/{chunk-B6R3QPZT.js → chunk-T2Z26YN7.js} +3 -3
- package/dist/{chunk-F7CACVY7.js → chunk-TAA5HGRT.js} +3 -3
- package/dist/{chunk-TP3H2NVV.js → chunk-TFVMB62A.js} +6 -6
- package/dist/{chunk-N3EU6FVY.js → chunk-UOLT7THS.js} +3 -3
- package/dist/{chunk-K4PSDTA7.js → chunk-XD5EFQE2.js} +4 -4
- package/dist/{chunk-3R34SLHS.js → chunk-YNNUWX3I.js} +3 -3
- package/dist/{chunk-7KO7T466.js → chunk-YPRC4TK6.js} +6 -6
- package/dist/{chunk-B26QDYDN.js → chunk-YUI23PKV.js} +2 -2
- package/dist/{chunk-WGLEUSG3.js → chunk-Z6MEYGAG.js} +3 -3
- package/dist/{chunk-YXCYRXKK.js → chunk-ZBPY6YL5.js} +6 -6
- package/dist/{chunk-XGZDNZUX.js → chunk-ZRU5CKDG.js} +3 -3
- 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-BBMEEF2H.js} +2 -2
- package/dist/{error-handler-65LUJ2S2.js → error-handler-734CUCMD.js} +8 -8
- package/dist/hooks/postrun.js +6 -6
- package/dist/hooks/prerun.js +7 -7
- package/dist/index.js +120 -92
- package/dist/{local-L7K7ZZ6L.js → local-5AKZWHSS.js} +2 -2
- package/dist/{node-package-manager-TSNDPDHE.js → node-package-manager-DMOU4DTB.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-ZDWJULQO.js → ui-JQXGLHMO.js} +2 -2
- package/dist/{workerd-Y6MJ3FZI.js → workerd-FTKMK3NR.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-6JFZSZKE.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-XD5EFQE2.js";
|
|
148
148
|
import {
|
|
149
149
|
Search
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-RTTTZZGY.js";
|
|
151
151
|
import {
|
|
152
152
|
Upgrade
|
|
153
|
-
} from "./chunk-
|
|
154
|
-
import "./chunk-
|
|
153
|
+
} from "./chunk-6A27UWO7.js";
|
|
154
|
+
import "./chunk-2TBGVDDK.js";
|
|
155
155
|
import {
|
|
156
156
|
Version
|
|
157
|
-
} from "./chunk-
|
|
158
|
-
import "./chunk-
|
|
159
|
-
import "./chunk-
|
|
157
|
+
} from "./chunk-UOLT7THS.js";
|
|
158
|
+
import "./chunk-T2Z26YN7.js";
|
|
159
|
+
import "./chunk-46YOOMEM.js";
|
|
160
160
|
import {
|
|
161
161
|
KitchenSinkAll
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-L5OKA4W4.js";
|
|
163
163
|
import {
|
|
164
164
|
KitchenSinkPrompts
|
|
165
|
-
} from "./chunk-
|
|
166
|
-
import "./chunk-
|
|
165
|
+
} from "./chunk-Z6MEYGAG.js";
|
|
166
|
+
import "./chunk-7UHRC35E.js";
|
|
167
167
|
import {
|
|
168
168
|
KitchenSinkStatic
|
|
169
|
-
} from "./chunk-
|
|
170
|
-
import "./chunk-
|
|
169
|
+
} from "./chunk-G74IQQ6M.js";
|
|
170
|
+
import "./chunk-BX2C6EVM.js";
|
|
171
171
|
import {
|
|
172
172
|
Generate
|
|
173
|
-
} from "./chunk-
|
|
174
|
-
import "./chunk-
|
|
173
|
+
} from "./chunk-BSKQ4RKV.js";
|
|
174
|
+
import "./chunk-MXDBI4PG.js";
|
|
175
175
|
import {
|
|
176
176
|
Logout
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-JHLYV5K7.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-SJMHVGQ5.js";
|
|
186
186
|
import {
|
|
187
187
|
ClearCache,
|
|
188
188
|
globalFlags,
|
|
189
189
|
jsonFlag,
|
|
190
190
|
runCLI
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-DZCCH5OM.js";
|
|
192
192
|
import {
|
|
193
193
|
CommandFlags
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-ZRU5CKDG.js";
|
|
195
195
|
import {
|
|
196
196
|
DocsGenerate
|
|
197
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-M6EH6UKK.js";
|
|
198
198
|
import {
|
|
199
199
|
HelpCommand
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-DCU33ZNP.js";
|
|
201
201
|
import {
|
|
202
202
|
KitchenSinkAsync
|
|
203
|
-
} from "./chunk-
|
|
204
|
-
import "./chunk-
|
|
203
|
+
} from "./chunk-MRQXBTNU.js";
|
|
204
|
+
import "./chunk-7YVG6N4O.js";
|
|
205
205
|
import {
|
|
206
206
|
base_command_default,
|
|
207
207
|
decodeToml,
|
|
208
208
|
encodeToml,
|
|
209
209
|
loadEnvironment
|
|
210
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-QS5WPZTS.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-TFVMB62A.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-YPRC4TK6.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-SM7O6ZFJ.js";
|
|
240
240
|
import {
|
|
241
241
|
showNotificationsIfNeeded
|
|
242
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-ZBPY6YL5.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-OCEWRJZI.js";
|
|
271
271
|
import "./chunk-25IMI7TH.js";
|
|
272
272
|
import {
|
|
273
273
|
CLI_KIT_VERSION
|
|
274
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-YUI23PKV.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-KHBZ52PT.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-TAA5HGRT.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-FTKMK3NR.js");
|
|
206550
206558
|
return startWorkerdServer(options);
|
|
206551
206559
|
}
|
|
206552
206560
|
|
|
@@ -213883,7 +213891,8 @@ var ActiveAppReleaseFromApiKey = {
|
|
|
213883
213891
|
}
|
|
213884
213892
|
]
|
|
213885
213893
|
}
|
|
213886
|
-
}
|
|
213894
|
+
},
|
|
213895
|
+
{ kind: "Field", name: { kind: "Name", value: "grantedShopifyApprovalScopes" } }
|
|
213887
213896
|
]
|
|
213888
213897
|
}
|
|
213889
213898
|
},
|
|
@@ -215485,14 +215494,14 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
|
|
|
215485
215494
|
return (await this.session()).accountInfo;
|
|
215486
215495
|
}
|
|
215487
215496
|
async appFromIdentifiers(apiKey) {
|
|
215488
|
-
let { app } = await this.activeAppVersionRawResult(apiKey), { name, appModules } = app.activeRelease.version,
|
|
215497
|
+
let { app } = await this.activeAppVersionRawResult(apiKey), { name, appModules } = app.activeRelease.version, appHomeModule = appModules.find((mod) => mod.specification.externalIdentifier === "app_home"), apiSecretKeys = app.activeRoot.clientCredentials.secrets.map((secret) => ({ secret: secret.key }));
|
|
215489
215498
|
return {
|
|
215490
215499
|
id: app.id,
|
|
215491
215500
|
title: name,
|
|
215492
215501
|
apiKey: app.key,
|
|
215493
215502
|
apiSecretKeys,
|
|
215494
215503
|
organizationId: String(numberFromGid(app.organizationId)),
|
|
215495
|
-
grantedScopes:
|
|
215504
|
+
grantedScopes: app.activeRoot.grantedShopifyApprovalScopes,
|
|
215496
215505
|
applicationUrl: appHomeModule?.config?.app_url,
|
|
215497
215506
|
flags: [],
|
|
215498
215507
|
developerPlatformClient: this
|
|
@@ -216069,7 +216078,8 @@ function numberFromGid(gid) {
|
|
|
216069
216078
|
return gid.startsWith("gid://") ? Number(gid.match(/^gid.*\/(\d+)$/)[1]) : Number(gid);
|
|
216070
216079
|
}
|
|
216071
216080
|
async function appDeepLink({ id, organizationId }) {
|
|
216072
|
-
|
|
216081
|
+
let orgId = numberFromGid(organizationId).toString();
|
|
216082
|
+
return `https://${await developerDashboardFqdn()}/dashboard/${orgId}/apps/${numberFromGid(id)}`;
|
|
216073
216083
|
}
|
|
216074
216084
|
async function versionDeepLink(organizationId, appId, versionId) {
|
|
216075
216085
|
return `${await appDeepLink({ organizationId, id: appId })}/versions/${numberFromGid(versionId)}`;
|
|
@@ -216318,7 +216328,7 @@ function partition(collection, callback) {
|
|
|
216318
216328
|
}
|
|
216319
216329
|
|
|
216320
216330
|
// ../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);
|
|
216331
|
+
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
216332
|
function matchByNameAndType(local, remote) {
|
|
216323
216333
|
let uniqueLocal = uniqBy(local, (elem) => [elem.graphQLType, elem.handle]), uniqueRemote = uniqBy(remote, (elem) => [elem.type, elem.title]), matched = {};
|
|
216324
216334
|
uniqueLocal.forEach((localSource) => {
|
|
@@ -218605,32 +218615,6 @@ async function bundleAndBuildExtensions(options) {
|
|
|
218605
218615
|
// ../app/dist/cli/services/import-extensions.js
|
|
218606
218616
|
init_cjs_shims();
|
|
218607
218617
|
|
|
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
218618
|
// ../app/dist/cli/prompts/import-extensions.js
|
|
218635
218619
|
init_cjs_shims();
|
|
218636
218620
|
|
|
@@ -218958,7 +218942,27 @@ async function selectMigrationChoice(migrationChoices) {
|
|
|
218958
218942
|
}
|
|
218959
218943
|
|
|
218960
218944
|
// ../app/dist/cli/services/import-extensions.js
|
|
218961
|
-
var allExtensionTypes = allMigrationChoices.flatMap((choice) => choice.extensionTypes);
|
|
218945
|
+
var allExtensionTypes = allMigrationChoices.flatMap((choice) => choice.extensionTypes), DirectoryAction;
|
|
218946
|
+
(function(DirectoryAction2) {
|
|
218947
|
+
DirectoryAction2.Write = "write", DirectoryAction2.Skip = "skip", DirectoryAction2.Cancel = "cancel";
|
|
218948
|
+
})(DirectoryAction || (DirectoryAction = {}));
|
|
218949
|
+
async function handleExtensionDirectory({ name, app }) {
|
|
218950
|
+
let hyphenizedName = hyphenate(name), extensionDirectory = joinPath(app.directory, blocks.extensions.directoryName, hyphenizedName);
|
|
218951
|
+
if (await fileExists(extensionDirectory)) {
|
|
218952
|
+
let choices = [
|
|
218953
|
+
{ label: "Overwrite local TOML with remote configuration", value: DirectoryAction.Write },
|
|
218954
|
+
{ label: "Keep local TOML", value: DirectoryAction.Skip },
|
|
218955
|
+
{ label: "Cancel", value: DirectoryAction.Cancel }
|
|
218956
|
+
], action = await renderSelectPrompt({
|
|
218957
|
+
message: `Directory "${hyphenizedName}" already exists. What would you like to do?`,
|
|
218958
|
+
choices
|
|
218959
|
+
});
|
|
218960
|
+
if (action === DirectoryAction.Cancel)
|
|
218961
|
+
throw new AbortSilentError();
|
|
218962
|
+
return { directory: extensionDirectory, action };
|
|
218963
|
+
}
|
|
218964
|
+
return await mkdir(extensionDirectory), await touchFile(joinPath(extensionDirectory, configurationFileNames.lockFile)), { directory: extensionDirectory, action: DirectoryAction.Write };
|
|
218965
|
+
}
|
|
218962
218966
|
async function importExtensions(options) {
|
|
218963
218967
|
let { app, remoteApp, developerPlatformClient, extensionTypes, extensions, buildTomlObject: buildTomlObject6, all } = options, extensionsToMigrate = extensions.filter((ext) => extensionTypes.includes(ext.type.toLowerCase()));
|
|
218964
218968
|
if (extensionsToMigrate = filterOutImportedExtensions(app, extensionsToMigrate), extensionsToMigrate.length === 0)
|
|
@@ -218970,12 +218974,14 @@ async function importExtensions(options) {
|
|
|
218970
218974
|
promptAnswer !== "All" && (extensionsToMigrate = [extensionsToMigrate.find((ext) => ext?.uuid === promptAnswer)]);
|
|
218971
218975
|
}
|
|
218972
218976
|
let extensionUuids = {}, importPromises = extensionsToMigrate.map(async (ext) => {
|
|
218973
|
-
let directory = await
|
|
218974
|
-
|
|
218975
|
-
|
|
218976
|
-
|
|
218977
|
-
|
|
218978
|
-
|
|
218977
|
+
let { directory, action } = await handleExtensionDirectory({ app, name: ext.title }), handle = slugify(ext.title.substring(0, MAX_EXTENSION_HANDLE_LENGTH));
|
|
218978
|
+
if (extensionUuids[handle] = ext.uuid, action === DirectoryAction.Write) {
|
|
218979
|
+
let tomlObject = buildTomlObject6(ext, extensions, app.configuration), path4 = joinPath(directory, "shopify.extension.toml");
|
|
218980
|
+
await writeFile(path4, tomlObject);
|
|
218981
|
+
let lockFilePath = joinPath(directory, configurationFileNames.lockFile);
|
|
218982
|
+
await removeFile(lockFilePath);
|
|
218983
|
+
}
|
|
218984
|
+
return { extension: ext, directory: joinPath("extensions", basename(directory)) };
|
|
218979
218985
|
}), generatedExtensions = await Promise.all(importPromises);
|
|
218980
218986
|
renderSuccessMessages(generatedExtensions), await updateAppIdentifiers({
|
|
218981
218987
|
app,
|
|
@@ -219146,7 +219152,7 @@ async function deploy(options) {
|
|
|
219146
219152
|
}), await updateAppIdentifiers({ app, identifiers, command: "deploy", developerPlatformClient });
|
|
219147
219153
|
}
|
|
219148
219154
|
}
|
|
219149
|
-
]),
|
|
219155
|
+
]), await outputCompletionMessage({
|
|
219150
219156
|
app,
|
|
219151
219157
|
release: release2,
|
|
219152
219158
|
uploadExtensionsBundleResult,
|
|
@@ -219157,9 +219163,6 @@ async function deploy(options) {
|
|
|
219157
219163
|
}
|
|
219158
219164
|
return { app };
|
|
219159
219165
|
}
|
|
219160
|
-
async function deleteEnvFile(app) {
|
|
219161
|
-
app.dotenv && fileExistsSync(app.dotenv.path) && await removeFile(app.dotenv.path);
|
|
219162
|
-
}
|
|
219163
219166
|
async function outputCompletionMessage({ app, release: release2, uploadExtensionsBundleResult, didMigrateExtensionsToDevDash }) {
|
|
219164
219167
|
let linkAndMessage = [
|
|
219165
219168
|
{ link: { label: uploadExtensionsBundleResult.versionTag ?? "version", url: uploadExtensionsBundleResult.location } },
|
|
@@ -223228,6 +223231,32 @@ function isEditionWeek() {
|
|
|
223228
223231
|
return now >= editionStart && now <= editionWeekEnd;
|
|
223229
223232
|
}
|
|
223230
223233
|
|
|
223234
|
+
// ../app/dist/cli/services/extensions/common.js
|
|
223235
|
+
init_cjs_shims();
|
|
223236
|
+
async function ensureDownloadedExtensionFlavorExists(extensionFlavor, templateDownloadDir) {
|
|
223237
|
+
let templatePath = extensionFlavor?.path || "", origin = joinPath(templateDownloadDir, templatePath);
|
|
223238
|
+
if (!await fileExists(origin))
|
|
223239
|
+
throw new AbortError(`
|
|
223240
|
+
The extension is not available for ${extensionFlavor?.value}`);
|
|
223241
|
+
return origin;
|
|
223242
|
+
}
|
|
223243
|
+
async function ensureExtensionDirectoryExists({ name, app }) {
|
|
223244
|
+
let hyphenizedName = hyphenate(name), extensionDirectory = joinPath(app.directory, blocks.extensions.directoryName, hyphenizedName);
|
|
223245
|
+
if (await fileExists(extensionDirectory))
|
|
223246
|
+
throw new AbortError(`
|
|
223247
|
+
A directory with this name (${hyphenizedName}) already exists.
|
|
223248
|
+
Choose a new name for your extension.`);
|
|
223249
|
+
return await mkdir(extensionDirectory), await touchFile(joinPath(extensionDirectory, configurationFileNames.lockFile)), extensionDirectory;
|
|
223250
|
+
}
|
|
223251
|
+
async function canEnablePreviewMode({ localApp, developerPlatformClient, apiKey, organizationId }) {
|
|
223252
|
+
let { dashboardManagedExtensionRegistrations } = (await developerPlatformClient.appExtensionRegistrations({
|
|
223253
|
+
id: apiKey,
|
|
223254
|
+
apiKey,
|
|
223255
|
+
organizationId
|
|
223256
|
+
})).app;
|
|
223257
|
+
return dashboardManagedExtensionRegistrations.length > 0 || localApp.allExtensions.filter((ext) => ext.isThemeExtension).length > 0 || localApp.allExtensions.length > 0;
|
|
223258
|
+
}
|
|
223259
|
+
|
|
223231
223260
|
// ../app/dist/cli/services/dev/port-warnings.js
|
|
223232
223261
|
init_cjs_shims();
|
|
223233
223262
|
function renderPortWarnings(portDetails) {
|
|
@@ -225278,14 +225307,13 @@ function getTemplateLanguage(flavor) {
|
|
|
225278
225307
|
}
|
|
225279
225308
|
}
|
|
225280
225309
|
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,
|
|
225310
|
+
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
225311
|
directory,
|
|
225283
225312
|
url,
|
|
225284
225313
|
app: options.app,
|
|
225285
225314
|
type: options.extensionTemplate.type,
|
|
225286
225315
|
name: extensionName,
|
|
225287
225316
|
extensionFlavor,
|
|
225288
|
-
uid,
|
|
225289
225317
|
onGetTemplateRepository: options.onGetTemplateRepository ?? (async (url2, destination) => {
|
|
225290
225318
|
await downloadGitRepository({ repoUrl: url2, destination, shallow: !0 });
|
|
225291
225319
|
})
|
|
@@ -225311,13 +225339,13 @@ async function extensionInit(options) {
|
|
|
225311
225339
|
throw await removeFile(options.directory), error;
|
|
225312
225340
|
}
|
|
225313
225341
|
}
|
|
225314
|
-
async function themeExtensionInit({ directory, url, type, name, extensionFlavor,
|
|
225342
|
+
async function themeExtensionInit({ directory, url, type, name, extensionFlavor, onGetTemplateRepository }) {
|
|
225315
225343
|
return inTemporaryDirectory(async (tmpDir) => {
|
|
225316
225344
|
let templateDirectory = await downloadOrFindTemplateDirectory(url, extensionFlavor, tmpDir, onGetTemplateRepository);
|
|
225317
|
-
await recursiveLiquidTemplateCopy(templateDirectory, directory, { name, type, uid });
|
|
225345
|
+
await recursiveLiquidTemplateCopy(templateDirectory, directory, { name, type, uid: nonRandomUUID(slugify(name)) });
|
|
225318
225346
|
});
|
|
225319
225347
|
}
|
|
225320
|
-
async function functionExtensionInit({ directory, url, app, name, extensionFlavor,
|
|
225348
|
+
async function functionExtensionInit({ directory, url, app, name, extensionFlavor, onGetTemplateRepository }) {
|
|
225321
225349
|
let templateLanguage = getTemplateLanguage(extensionFlavor?.value), taskList = [];
|
|
225322
225350
|
taskList.push({
|
|
225323
225351
|
title: "Generating function extension",
|
|
@@ -225328,7 +225356,7 @@ async function functionExtensionInit({ directory, url, app, name, extensionFlavo
|
|
|
225328
225356
|
name,
|
|
225329
225357
|
handle: slugify(name),
|
|
225330
225358
|
flavor: extensionFlavor?.value,
|
|
225331
|
-
uid
|
|
225359
|
+
uid: nonRandomUUID(slugify(name))
|
|
225332
225360
|
});
|
|
225333
225361
|
}), templateLanguage === "javascript") {
|
|
225334
225362
|
let srcFileExtension = getSrcFileExtension(extensionFlavor?.value ?? "rust");
|
|
@@ -225353,7 +225381,7 @@ async function functionExtensionInit({ directory, url, app, name, extensionFlavo
|
|
|
225353
225381
|
}
|
|
225354
225382
|
}), await renderTasks(taskList);
|
|
225355
225383
|
}
|
|
225356
|
-
async function uiExtensionInit({ directory, url, app, name, extensionFlavor,
|
|
225384
|
+
async function uiExtensionInit({ directory, url, app, name, extensionFlavor, onGetTemplateRepository }) {
|
|
225357
225385
|
let templateLanguage = getTemplateLanguage(extensionFlavor?.value), tasks = [
|
|
225358
225386
|
{
|
|
225359
225387
|
title: "Generating extension",
|
|
@@ -225366,7 +225394,7 @@ async function uiExtensionInit({ directory, url, app, name, extensionFlavor, uid
|
|
|
225366
225394
|
name,
|
|
225367
225395
|
handle: slugify(name),
|
|
225368
225396
|
flavor: extensionFlavor?.value ?? "",
|
|
225369
|
-
uid
|
|
225397
|
+
uid: nonRandomUUID(slugify(name))
|
|
225370
225398
|
});
|
|
225371
225399
|
}), templateLanguage === "javascript" && (await changeIndexFileExtension(directory, srcFileExtension), await removeUnwantedTemplateFilesPerFlavor(directory, extensionFlavor.value));
|
|
225372
225400
|
}
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
macAddress,
|
|
21
21
|
opentelemetryDomain,
|
|
22
22
|
themeToken
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TAA5HGRT.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-5AKZWHSS.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-KHBZ52PT.js";
|
|
33
|
+
import "./chunk-TAA5HGRT.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-DMOU4DTB.js.map
|