@shopify/cli 3.71.3 → 3.71.5
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-3L3YMNIS.js → chunk-3FPTOHRM.js} +24 -8
- package/dist/{chunk-KP5XPKYC.js → chunk-5ZJJ2KQE.js} +2 -2
- package/dist/{chunk-C6335IDE.js → chunk-64ODKZA6.js} +3 -3
- package/dist/{chunk-XUENOXCR.js → chunk-ACMYNTHV.js} +3 -3
- package/dist/{chunk-2C3DNFVI.js → chunk-BSGG25LC.js} +5 -5
- package/dist/{chunk-SA2FUS7F.js → chunk-BVMNPVVX.js} +3 -3
- package/dist/{chunk-4AYQ2VVA.js → chunk-CIY4FKX6.js} +2 -2
- package/dist/{chunk-KLEYN7DR.js → chunk-DPYZXFHN.js} +4 -4
- package/dist/{chunk-5FHC66QV.js → chunk-DVCWXBVL.js} +5 -5
- package/dist/{chunk-2VSA7XB7.js → chunk-E3WEPNA5.js} +3 -3
- package/dist/{chunk-5BBDQN6X.js → chunk-E73I4F5U.js} +7 -7
- package/dist/{chunk-DBJLGOY2.js → chunk-EP2QFBL2.js} +6 -6
- package/dist/{chunk-IXMASQPW.js → chunk-FNPKGJG5.js} +2 -2
- package/dist/{chunk-EIHV2YKG.js → chunk-FPK3PLLJ.js} +2 -2
- package/dist/{chunk-677QAEGX.js → chunk-I4WHTNMG.js} +3 -3
- package/dist/{chunk-UCMFB56N.js → chunk-IHWTXBTO.js} +4 -4
- package/dist/{chunk-KDHZNA2I.js → chunk-K3IAR2V7.js} +2 -2
- package/dist/{chunk-Y6F5Q2PS.js → chunk-KTJYQJIW.js} +3 -3
- package/dist/{chunk-6F3EVXQI.js → chunk-L34JBA2U.js} +3 -3
- package/dist/{chunk-JYJHRYOY.js → chunk-M4EYUWRX.js} +6 -6
- package/dist/{chunk-ANNC2DRD.js → chunk-MD3VGRL6.js} +5 -5
- package/dist/{chunk-44X35BNB.js → chunk-MQBDFLI4.js} +2 -2
- package/dist/{chunk-SUYFVEJL.js → chunk-NYEWMOXL.js} +3 -3
- package/dist/{chunk-HOV5ASVY.js → chunk-O2XD3S27.js} +3 -3
- package/dist/{chunk-YMBTAXI4.js → chunk-Q6SH2YN6.js} +3 -3
- package/dist/{chunk-EP6JHLLT.js → chunk-RYFQGFLW.js} +3 -3
- package/dist/{chunk-CDEOMLBD.js → chunk-S62XWKOW.js} +2 -2
- package/dist/{chunk-LP2745DV.js → chunk-SCUUFAJG.js} +2 -2
- package/dist/{chunk-HACHBHSU.js → chunk-SM6WFLIN.js} +6 -6
- package/dist/{chunk-ZYO4OZ7J.js → chunk-T2BAUKFV.js} +3 -3
- package/dist/{chunk-XMTTGOZD.js → chunk-TXM2NA7M.js} +4 -4
- package/dist/{chunk-ZGU6M4YD.js → chunk-U2PHK2QU.js} +2 -2
- package/dist/{chunk-CSIGHGXK.js → chunk-XDQJAGJR.js} +3 -3
- package/dist/{chunk-SIP3D6LF.js → chunk-YDGS44FV.js} +5 -5
- package/dist/{chunk-P5TTDXTY.js → chunk-Z7ZXBCGB.js} +2 -2
- package/dist/cli/commands/auth/logout.js +12 -12
- package/dist/cli/commands/auth/logout.test.js +13 -13
- 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 +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 +5 -5
- package/dist/{custom-oclif-loader-4V6TU5BB.js → custom-oclif-loader-NKDGH5JT.js} +2 -2
- package/dist/{error-handler-FY3IUTH3.js → error-handler-VQOV6EZ5.js} +9 -9
- package/dist/hooks/postrun.js +7 -7
- package/dist/hooks/prerun.js +7 -7
- package/dist/index.js +283 -116
- package/dist/{local-TRXHLDGT.js → local-X24HKCT7.js} +2 -2
- package/dist/{node-VC56S7TM.js → node-W2RFI2AB.js} +13 -13
- package/dist/{node-package-manager-NJIF6677.js → node-package-manager-O2PKPYOF.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-WZJ7RWIS.js → ui-ELFXJ5SP.js} +2 -2
- package/dist/{workerd-472F5I7T.js → workerd-VGMCWUQJ.js} +13 -13
- package/oclif.manifest.json +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
supressNodeExperimentalWarnings,
|
|
124
124
|
unsetStorefront,
|
|
125
125
|
waitForJob
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-E73I4F5U.js";
|
|
127
127
|
import {
|
|
128
128
|
require_lib as require_lib4
|
|
129
129
|
} from "./chunk-NUP5TATA.js";
|
|
@@ -138,39 +138,39 @@ import {
|
|
|
138
138
|
} from "./chunk-NCKQIOV4.js";
|
|
139
139
|
import {
|
|
140
140
|
List
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-KTJYQJIW.js";
|
|
142
142
|
import {
|
|
143
143
|
Search
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-I4WHTNMG.js";
|
|
145
145
|
import {
|
|
146
146
|
Upgrade
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-IHWTXBTO.js";
|
|
148
148
|
import {
|
|
149
149
|
getOutputUpdateCLIReminder
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-NYEWMOXL.js";
|
|
151
151
|
import {
|
|
152
152
|
Version
|
|
153
|
-
} from "./chunk-
|
|
154
|
-
import "./chunk-
|
|
155
|
-
import "./chunk-
|
|
153
|
+
} from "./chunk-RYFQGFLW.js";
|
|
154
|
+
import "./chunk-E3WEPNA5.js";
|
|
155
|
+
import "./chunk-FPK3PLLJ.js";
|
|
156
156
|
import {
|
|
157
157
|
KitchenSinkAll
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-DVCWXBVL.js";
|
|
159
159
|
import {
|
|
160
160
|
KitchenSinkPrompts
|
|
161
|
-
} from "./chunk-
|
|
162
|
-
import "./chunk-
|
|
161
|
+
} from "./chunk-L34JBA2U.js";
|
|
162
|
+
import "./chunk-K3IAR2V7.js";
|
|
163
163
|
import {
|
|
164
164
|
KitchenSinkStatic
|
|
165
|
-
} from "./chunk-
|
|
166
|
-
import "./chunk-
|
|
165
|
+
} from "./chunk-BVMNPVVX.js";
|
|
166
|
+
import "./chunk-5ZJJ2KQE.js";
|
|
167
167
|
import {
|
|
168
168
|
Generate
|
|
169
|
-
} from "./chunk-
|
|
170
|
-
import "./chunk-
|
|
169
|
+
} from "./chunk-T2BAUKFV.js";
|
|
170
|
+
import "./chunk-MD3VGRL6.js";
|
|
171
171
|
import {
|
|
172
172
|
Logout
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-DPYZXFHN.js";
|
|
174
174
|
import {
|
|
175
175
|
ensureAuthenticatedAdmin,
|
|
176
176
|
ensureAuthenticatedAppManagement,
|
|
@@ -178,31 +178,31 @@ import {
|
|
|
178
178
|
ensureAuthenticatedPartners,
|
|
179
179
|
ensureAuthenticatedStorefront,
|
|
180
180
|
ensureAuthenticatedThemes
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-TXM2NA7M.js";
|
|
182
182
|
import {
|
|
183
183
|
ClearCache,
|
|
184
184
|
globalFlags,
|
|
185
185
|
jsonFlag,
|
|
186
186
|
runCLI
|
|
187
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-3FPTOHRM.js";
|
|
188
188
|
import {
|
|
189
189
|
CommandFlags
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-ACMYNTHV.js";
|
|
191
191
|
import {
|
|
192
192
|
DocsGenerate
|
|
193
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-64ODKZA6.js";
|
|
194
194
|
import {
|
|
195
195
|
HelpCommand
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-FNPKGJG5.js";
|
|
197
197
|
import {
|
|
198
198
|
KitchenSinkAsync
|
|
199
|
-
} from "./chunk-
|
|
200
|
-
import "./chunk-
|
|
199
|
+
} from "./chunk-O2XD3S27.js";
|
|
200
|
+
import "./chunk-MQBDFLI4.js";
|
|
201
201
|
import {
|
|
202
202
|
base_command_default,
|
|
203
203
|
decodeToml,
|
|
204
204
|
encodeToml
|
|
205
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-BSGG25LC.js";
|
|
206
206
|
import {
|
|
207
207
|
require_byline,
|
|
208
208
|
require_end_of_stream,
|
|
@@ -210,7 +210,7 @@ import {
|
|
|
210
210
|
require_iserror,
|
|
211
211
|
require_pump,
|
|
212
212
|
require_stack_generator
|
|
213
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-EP2QFBL2.js";
|
|
214
214
|
import {
|
|
215
215
|
require_once
|
|
216
216
|
} from "./chunk-O5K4AU7Q.js";
|
|
@@ -218,7 +218,7 @@ import {
|
|
|
218
218
|
fanoutHooks,
|
|
219
219
|
getListOfTunnelPlugins,
|
|
220
220
|
reportAnalyticsEvent
|
|
221
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-SM6WFLIN.js";
|
|
222
222
|
import {
|
|
223
223
|
appManagementFqdn,
|
|
224
224
|
developerDashboardFqdn,
|
|
@@ -236,14 +236,14 @@ import {
|
|
|
236
236
|
restRequestHeaders,
|
|
237
237
|
restRequestUrl,
|
|
238
238
|
setNextDeprecationDate
|
|
239
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-YDGS44FV.js";
|
|
240
240
|
import {
|
|
241
241
|
platformAndArch,
|
|
242
242
|
username
|
|
243
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-Z7ZXBCGB.js";
|
|
244
244
|
import {
|
|
245
245
|
showNotificationsIfNeeded
|
|
246
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-M4EYUWRX.js";
|
|
247
247
|
import {
|
|
248
248
|
ClientError,
|
|
249
249
|
FetchError,
|
|
@@ -261,11 +261,11 @@ import {
|
|
|
261
261
|
require_lib as require_lib2,
|
|
262
262
|
require_mime_types,
|
|
263
263
|
z
|
|
264
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-Q6SH2YN6.js";
|
|
265
265
|
import "./chunk-VSLR7ET4.js";
|
|
266
266
|
import {
|
|
267
267
|
CLI_KIT_VERSION
|
|
268
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-SCUUFAJG.js";
|
|
269
269
|
import {
|
|
270
270
|
LocalStorage,
|
|
271
271
|
UnknownPackageManagerError,
|
|
@@ -287,7 +287,7 @@ import {
|
|
|
287
287
|
usesWorkspaces,
|
|
288
288
|
versionSatisfies,
|
|
289
289
|
writePackageJSON
|
|
290
|
-
} from "./chunk-
|
|
290
|
+
} from "./chunk-U2PHK2QU.js";
|
|
291
291
|
import {
|
|
292
292
|
require_semver
|
|
293
293
|
} from "./chunk-BYPQXSAL.js";
|
|
@@ -471,7 +471,7 @@ import {
|
|
|
471
471
|
use_stdin_default,
|
|
472
472
|
writeFile,
|
|
473
473
|
writeFileSync
|
|
474
|
-
} from "./chunk-
|
|
474
|
+
} from "./chunk-S62XWKOW.js";
|
|
475
475
|
import "./chunk-2HGYYNE5.js";
|
|
476
476
|
import {
|
|
477
477
|
require_graceful_fs
|
|
@@ -149422,24 +149422,18 @@ async function bulkUploadThemeAssets(id, assets, session) {
|
|
|
149422
149422
|
return results;
|
|
149423
149423
|
}
|
|
149424
149424
|
function prepareFilesForUpload(assets) {
|
|
149425
|
-
return assets.map((asset) => {
|
|
149426
|
-
|
|
149427
|
-
|
|
149428
|
-
|
|
149429
|
-
|
|
149430
|
-
|
|
149431
|
-
|
|
149432
|
-
|
|
149433
|
-
|
|
149434
|
-
|
|
149435
|
-
|
|
149436
|
-
|
|
149437
|
-
body: {
|
|
149438
|
-
type: "BASE64",
|
|
149439
|
-
value: asset.attachment
|
|
149440
|
-
}
|
|
149441
|
-
};
|
|
149442
|
-
unexpectedGraphQLError("Asset must have a value or attachment");
|
|
149425
|
+
return assets.map((asset) => asset.attachment ? {
|
|
149426
|
+
filename: asset.key,
|
|
149427
|
+
body: {
|
|
149428
|
+
type: "BASE64",
|
|
149429
|
+
value: asset.attachment
|
|
149430
|
+
}
|
|
149431
|
+
} : {
|
|
149432
|
+
filename: asset.key,
|
|
149433
|
+
body: {
|
|
149434
|
+
type: "TEXT",
|
|
149435
|
+
value: asset.value ?? ""
|
|
149436
|
+
}
|
|
149443
149437
|
});
|
|
149444
149438
|
}
|
|
149445
149439
|
async function uploadFiles(themeId, files, session) {
|
|
@@ -151946,7 +151940,7 @@ var THEME_DIRECTORY_PATTERNS = [
|
|
|
151946
151940
|
"templates/customers/**/*.{liquid,json}"
|
|
151947
151941
|
], THEME_PARTITION_REGEX = {
|
|
151948
151942
|
sectionLiquidRegex: /^sections\/.+\.liquid$/,
|
|
151949
|
-
|
|
151943
|
+
blockLiquidRegex: /^blocks\/.+\.liquid$/,
|
|
151950
151944
|
configRegex: /^config\/(settings_schema|settings_data)\.json$/,
|
|
151951
151945
|
sectionJsonRegex: /^sections\/.+\.json$/,
|
|
151952
151946
|
templateJsonRegex: /^templates\/.+\.json$/,
|
|
@@ -152100,10 +152094,10 @@ async function removeThemeFile(root, path3) {
|
|
|
152100
152094
|
await removeFile(absolutePath);
|
|
152101
152095
|
}
|
|
152102
152096
|
function partitionThemeFiles(files) {
|
|
152103
|
-
let sectionLiquidFiles = [], otherLiquidFiles = [], sectionJsonFiles = [], templateJsonFiles = [], otherJsonFiles = [], contextualizedJsonFiles = [], configFiles = [], staticAssetFiles = [];
|
|
152097
|
+
let sectionLiquidFiles = [], otherLiquidFiles = [], sectionJsonFiles = [], templateJsonFiles = [], otherJsonFiles = [], contextualizedJsonFiles = [], configFiles = [], staticAssetFiles = [], blockLiquidFiles = [];
|
|
152104
152098
|
return files.forEach((file) => {
|
|
152105
152099
|
let fileKey = file.key;
|
|
152106
|
-
fileKey.endsWith(".liquid") ? THEME_PARTITION_REGEX.sectionLiquidRegex.test(fileKey) ? sectionLiquidFiles.push(file) : otherLiquidFiles.push(file) : THEME_PARTITION_REGEX.configRegex.test(fileKey) ? configFiles.push(file) : THEME_PARTITION_REGEX.jsonRegex.test(fileKey) ? THEME_PARTITION_REGEX.contextualizedJsonRegex.test(fileKey) ? contextualizedJsonFiles.push(file) : THEME_PARTITION_REGEX.sectionJsonRegex.test(fileKey) ? sectionJsonFiles.push(file) : THEME_PARTITION_REGEX.templateJsonRegex.test(fileKey) ? templateJsonFiles.push(file) : otherJsonFiles.push(file) : THEME_PARTITION_REGEX.staticAssetRegex.test(fileKey) && staticAssetFiles.push(file);
|
|
152100
|
+
fileKey.endsWith(".liquid") ? THEME_PARTITION_REGEX.sectionLiquidRegex.test(fileKey) ? sectionLiquidFiles.push(file) : THEME_PARTITION_REGEX.blockLiquidRegex.test(fileKey) ? blockLiquidFiles.push(file) : otherLiquidFiles.push(file) : THEME_PARTITION_REGEX.configRegex.test(fileKey) ? configFiles.push(file) : THEME_PARTITION_REGEX.jsonRegex.test(fileKey) ? THEME_PARTITION_REGEX.contextualizedJsonRegex.test(fileKey) ? contextualizedJsonFiles.push(file) : THEME_PARTITION_REGEX.sectionJsonRegex.test(fileKey) ? sectionJsonFiles.push(file) : THEME_PARTITION_REGEX.templateJsonRegex.test(fileKey) ? templateJsonFiles.push(file) : otherJsonFiles.push(file) : THEME_PARTITION_REGEX.staticAssetRegex.test(fileKey) && staticAssetFiles.push(file);
|
|
152107
152101
|
}), {
|
|
152108
152102
|
sectionLiquidFiles,
|
|
152109
152103
|
otherLiquidFiles,
|
|
@@ -152112,7 +152106,8 @@ function partitionThemeFiles(files) {
|
|
|
152112
152106
|
contextualizedJsonFiles,
|
|
152113
152107
|
otherJsonFiles,
|
|
152114
152108
|
configFiles,
|
|
152115
|
-
staticAssetFiles
|
|
152109
|
+
staticAssetFiles,
|
|
152110
|
+
blockLiquidFiles
|
|
152116
152111
|
};
|
|
152117
152112
|
}
|
|
152118
152113
|
function isTextFile(path3) {
|
|
@@ -153081,6 +153076,7 @@ function orderFilesToBeDeleted(files) {
|
|
|
153081
153076
|
...fileSets.sectionJsonFiles,
|
|
153082
153077
|
...fileSets.otherJsonFiles,
|
|
153083
153078
|
...fileSets.sectionLiquidFiles,
|
|
153079
|
+
...fileSets.blockLiquidFiles,
|
|
153084
153080
|
...fileSets.otherLiquidFiles,
|
|
153085
153081
|
...fileSets.configFiles,
|
|
153086
153082
|
...fileSets.staticAssetFiles
|
|
@@ -153129,6 +153125,7 @@ function orderFilesToBeUploaded(files) {
|
|
|
153129
153125
|
independentFiles: [fileSets.otherLiquidFiles, fileSets.otherJsonFiles, fileSets.staticAssetFiles],
|
|
153130
153126
|
// Follow order of dependencies:
|
|
153131
153127
|
dependentFiles: [
|
|
153128
|
+
fileSets.blockLiquidFiles,
|
|
153132
153129
|
fileSets.sectionLiquidFiles,
|
|
153133
153130
|
fileSets.sectionJsonFiles,
|
|
153134
153131
|
fileSets.templateJsonFiles,
|
|
@@ -158413,10 +158410,10 @@ async function buildAssetsUrl(port, root) {
|
|
|
158413
158410
|
async function startMiniOxygen(options, useNodeRuntime = !1) {
|
|
158414
158411
|
if (useNodeRuntime) {
|
|
158415
158412
|
process.env.MINIFLARE_SUBREQUEST_LIMIT = 100;
|
|
158416
|
-
let { startNodeServer } = await import("./node-
|
|
158413
|
+
let { startNodeServer } = await import("./node-W2RFI2AB.js");
|
|
158417
158414
|
return startNodeServer(options);
|
|
158418
158415
|
}
|
|
158419
|
-
let { startWorkerdServer } = await import("./workerd-
|
|
158416
|
+
let { startWorkerdServer } = await import("./workerd-VGMCWUQJ.js");
|
|
158420
158417
|
return startWorkerdServer(options);
|
|
158421
158418
|
}
|
|
158422
158419
|
|
|
@@ -161202,7 +161199,7 @@ async function performActionWithRetryAfterRecovery(performAction, recoveryProced
|
|
|
161202
161199
|
import stream from "node:stream/promises";
|
|
161203
161200
|
import * as gzip from "node:zlib";
|
|
161204
161201
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
161205
|
-
var FUNCTION_RUNNER_VERSION = "v6.
|
|
161202
|
+
var FUNCTION_RUNNER_VERSION = "v6.4.0", JAVY_VERSION = "v4.0.0", JAVY_PLUGIN_VERSION = "v3.2.0", Executable = class {
|
|
161206
161203
|
constructor(name, version, gitHubRepo) {
|
|
161207
161204
|
this.name = name, this.version = version;
|
|
161208
161205
|
let filename = process.platform === "win32" ? `${name}.exe` : name;
|
|
@@ -161456,8 +161453,8 @@ async function runJavy(fun, options, extra = []) {
|
|
|
161456
161453
|
}
|
|
161457
161454
|
async function installJavy(app) {
|
|
161458
161455
|
if (app.allExtensions.some((ext) => ext.features.includes("function") && ext.isJavaScript)) {
|
|
161459
|
-
let javy = javyBinary();
|
|
161460
|
-
await downloadBinary(javy);
|
|
161456
|
+
let javy = javyBinary(), plugin = javyPluginBinary();
|
|
161457
|
+
await Promise.all([downloadBinary(javy), downloadBinary(plugin)]);
|
|
161461
161458
|
}
|
|
161462
161459
|
}
|
|
161463
161460
|
var DefaultJavyBuilder = {
|
|
@@ -166345,11 +166342,19 @@ var PartnersClient = class {
|
|
|
166345
166342
|
async currentAccountInfo() {
|
|
166346
166343
|
return this.request(CurrentAccountInfoQuery);
|
|
166347
166344
|
}
|
|
166348
|
-
async targetSchemaDefinition(input) {
|
|
166349
|
-
|
|
166345
|
+
async targetSchemaDefinition(input, apiKey, _organizationId, _appId) {
|
|
166346
|
+
let transformedInput = {
|
|
166347
|
+
target: input.handle,
|
|
166348
|
+
version: input.version,
|
|
166349
|
+
apiKey
|
|
166350
|
+
};
|
|
166351
|
+
return (await this.request(TargetSchemaDefinitionQuery, transformedInput)).definition;
|
|
166350
166352
|
}
|
|
166351
|
-
async apiSchemaDefinition(input) {
|
|
166352
|
-
return (await this.request(ApiSchemaDefinitionQuery,
|
|
166353
|
+
async apiSchemaDefinition(input, apiKey, _organizationId, _appId) {
|
|
166354
|
+
return (await this.request(ApiSchemaDefinitionQuery, {
|
|
166355
|
+
...input,
|
|
166356
|
+
apiKey
|
|
166357
|
+
})).definition;
|
|
166353
166358
|
}
|
|
166354
166359
|
async migrateToUiExtension(input) {
|
|
166355
166360
|
return this.request(MigrateToUiExtensionQuery, input);
|
|
@@ -167964,6 +167969,146 @@ var PublicApiVersions2 = {
|
|
|
167964
167969
|
]
|
|
167965
167970
|
};
|
|
167966
167971
|
|
|
167972
|
+
// ../app/dist/cli/api/graphql/functions/generated/schema-definition-by-target.js
|
|
167973
|
+
init_cjs_shims();
|
|
167974
|
+
var SchemaDefinitionByTarget = {
|
|
167975
|
+
kind: "Document",
|
|
167976
|
+
definitions: [
|
|
167977
|
+
{
|
|
167978
|
+
kind: "OperationDefinition",
|
|
167979
|
+
operation: "query",
|
|
167980
|
+
name: { kind: "Name", value: "SchemaDefinitionByTarget" },
|
|
167981
|
+
variableDefinitions: [
|
|
167982
|
+
{
|
|
167983
|
+
kind: "VariableDefinition",
|
|
167984
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "handle" } },
|
|
167985
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
167986
|
+
},
|
|
167987
|
+
{
|
|
167988
|
+
kind: "VariableDefinition",
|
|
167989
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "version" } },
|
|
167990
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
167991
|
+
}
|
|
167992
|
+
],
|
|
167993
|
+
selectionSet: {
|
|
167994
|
+
kind: "SelectionSet",
|
|
167995
|
+
selections: [
|
|
167996
|
+
{
|
|
167997
|
+
kind: "Field",
|
|
167998
|
+
name: { kind: "Name", value: "target" },
|
|
167999
|
+
arguments: [
|
|
168000
|
+
{
|
|
168001
|
+
kind: "Argument",
|
|
168002
|
+
name: { kind: "Name", value: "handle" },
|
|
168003
|
+
value: { kind: "Variable", name: { kind: "Name", value: "handle" } }
|
|
168004
|
+
}
|
|
168005
|
+
],
|
|
168006
|
+
selectionSet: {
|
|
168007
|
+
kind: "SelectionSet",
|
|
168008
|
+
selections: [
|
|
168009
|
+
{
|
|
168010
|
+
kind: "Field",
|
|
168011
|
+
name: { kind: "Name", value: "api" },
|
|
168012
|
+
selectionSet: {
|
|
168013
|
+
kind: "SelectionSet",
|
|
168014
|
+
selections: [
|
|
168015
|
+
{
|
|
168016
|
+
kind: "Field",
|
|
168017
|
+
name: { kind: "Name", value: "schema" },
|
|
168018
|
+
arguments: [
|
|
168019
|
+
{
|
|
168020
|
+
kind: "Argument",
|
|
168021
|
+
name: { kind: "Name", value: "version" },
|
|
168022
|
+
value: { kind: "Variable", name: { kind: "Name", value: "version" } }
|
|
168023
|
+
}
|
|
168024
|
+
],
|
|
168025
|
+
selectionSet: {
|
|
168026
|
+
kind: "SelectionSet",
|
|
168027
|
+
selections: [
|
|
168028
|
+
{ kind: "Field", name: { kind: "Name", value: "definition" } },
|
|
168029
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
168030
|
+
]
|
|
168031
|
+
}
|
|
168032
|
+
},
|
|
168033
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
168034
|
+
]
|
|
168035
|
+
}
|
|
168036
|
+
},
|
|
168037
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
168038
|
+
]
|
|
168039
|
+
}
|
|
168040
|
+
}
|
|
168041
|
+
]
|
|
168042
|
+
}
|
|
168043
|
+
}
|
|
168044
|
+
]
|
|
168045
|
+
};
|
|
168046
|
+
|
|
168047
|
+
// ../app/dist/cli/api/graphql/functions/generated/schema-definition-by-api-type.js
|
|
168048
|
+
init_cjs_shims();
|
|
168049
|
+
var SchemaDefinitionByApiType = {
|
|
168050
|
+
kind: "Document",
|
|
168051
|
+
definitions: [
|
|
168052
|
+
{
|
|
168053
|
+
kind: "OperationDefinition",
|
|
168054
|
+
operation: "query",
|
|
168055
|
+
name: { kind: "Name", value: "SchemaDefinitionByApiType" },
|
|
168056
|
+
variableDefinitions: [
|
|
168057
|
+
{
|
|
168058
|
+
kind: "VariableDefinition",
|
|
168059
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "type" } },
|
|
168060
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
168061
|
+
},
|
|
168062
|
+
{
|
|
168063
|
+
kind: "VariableDefinition",
|
|
168064
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "version" } },
|
|
168065
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
168066
|
+
}
|
|
168067
|
+
],
|
|
168068
|
+
selectionSet: {
|
|
168069
|
+
kind: "SelectionSet",
|
|
168070
|
+
selections: [
|
|
168071
|
+
{
|
|
168072
|
+
kind: "Field",
|
|
168073
|
+
name: { kind: "Name", value: "api" },
|
|
168074
|
+
arguments: [
|
|
168075
|
+
{
|
|
168076
|
+
kind: "Argument",
|
|
168077
|
+
name: { kind: "Name", value: "type" },
|
|
168078
|
+
value: { kind: "Variable", name: { kind: "Name", value: "type" } }
|
|
168079
|
+
}
|
|
168080
|
+
],
|
|
168081
|
+
selectionSet: {
|
|
168082
|
+
kind: "SelectionSet",
|
|
168083
|
+
selections: [
|
|
168084
|
+
{
|
|
168085
|
+
kind: "Field",
|
|
168086
|
+
name: { kind: "Name", value: "schema" },
|
|
168087
|
+
arguments: [
|
|
168088
|
+
{
|
|
168089
|
+
kind: "Argument",
|
|
168090
|
+
name: { kind: "Name", value: "version" },
|
|
168091
|
+
value: { kind: "Variable", name: { kind: "Name", value: "version" } }
|
|
168092
|
+
}
|
|
168093
|
+
],
|
|
168094
|
+
selectionSet: {
|
|
168095
|
+
kind: "SelectionSet",
|
|
168096
|
+
selections: [
|
|
168097
|
+
{ kind: "Field", name: { kind: "Name", value: "definition" } },
|
|
168098
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
168099
|
+
]
|
|
168100
|
+
}
|
|
168101
|
+
},
|
|
168102
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
168103
|
+
]
|
|
168104
|
+
}
|
|
168105
|
+
}
|
|
168106
|
+
]
|
|
168107
|
+
}
|
|
168108
|
+
}
|
|
168109
|
+
]
|
|
168110
|
+
};
|
|
168111
|
+
|
|
167967
168112
|
// ../cli-kit/dist/public/node/api/app-management.js
|
|
167968
168113
|
init_cjs_shims();
|
|
167969
168114
|
var import_bottleneck = __toESM(require_lib3()), limiter = new import_bottleneck.default({
|
|
@@ -168029,6 +168174,29 @@ async function webhooksRequest(organizationId, query, token, variables) {
|
|
|
168029
168174
|
}));
|
|
168030
168175
|
}
|
|
168031
168176
|
|
|
168177
|
+
// ../cli-kit/dist/public/node/api/functions.js
|
|
168178
|
+
init_cjs_shims();
|
|
168179
|
+
var import_bottleneck4 = __toESM(require_lib3()), limiter4 = new import_bottleneck4.default({
|
|
168180
|
+
minTime: 150,
|
|
168181
|
+
maxConcurrent: 10
|
|
168182
|
+
});
|
|
168183
|
+
async function setupRequest2(orgId, token, appId) {
|
|
168184
|
+
let api = "Functions", url = `https://${await appManagementFqdn()}/functions/unstable/organizations/${orgId}/${appId}/graphql`;
|
|
168185
|
+
return {
|
|
168186
|
+
token,
|
|
168187
|
+
api,
|
|
168188
|
+
url,
|
|
168189
|
+
responseOptions: { onResponse: handleDeprecations }
|
|
168190
|
+
};
|
|
168191
|
+
}
|
|
168192
|
+
async function functionsRequestDoc(orgId, query, token, appId, variables) {
|
|
168193
|
+
return await limiter4.schedule(async () => graphqlRequestDoc({
|
|
168194
|
+
...await setupRequest2(orgId, token, appId),
|
|
168195
|
+
query,
|
|
168196
|
+
variables
|
|
168197
|
+
}));
|
|
168198
|
+
}
|
|
168199
|
+
|
|
168032
168200
|
// ../app/dist/cli/utilities/developer-platform-client/app-management-client.js
|
|
168033
168201
|
var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates.json", AppManagementClient = class {
|
|
168034
168202
|
constructor(session) {
|
|
@@ -168435,11 +168603,24 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
|
|
|
168435
168603
|
async currentAccountInfo() {
|
|
168436
168604
|
throw new BugError("Not implemented: currentAccountInfo");
|
|
168437
168605
|
}
|
|
168438
|
-
async targetSchemaDefinition(
|
|
168439
|
-
|
|
168606
|
+
async targetSchemaDefinition(input, _apiKey, organizationId, appId) {
|
|
168607
|
+
try {
|
|
168608
|
+
let appIdNumber = String(numberFromGid(appId)), token = await this.token();
|
|
168609
|
+
return (await functionsRequestDoc(organizationId, SchemaDefinitionByTarget, token, appIdNumber, {
|
|
168610
|
+
handle: input.handle,
|
|
168611
|
+
version: input.version
|
|
168612
|
+
}))?.target?.api?.schema?.definition ?? null;
|
|
168613
|
+
} catch (error) {
|
|
168614
|
+
throw new AbortError(`Failed to fetch schema definition: ${error}`);
|
|
168615
|
+
}
|
|
168440
168616
|
}
|
|
168441
|
-
async apiSchemaDefinition(
|
|
168442
|
-
|
|
168617
|
+
async apiSchemaDefinition(input, _apiKey, organizationId, appId) {
|
|
168618
|
+
try {
|
|
168619
|
+
let appIdNumber = String(numberFromGid(appId)), token = await this.token();
|
|
168620
|
+
return (await functionsRequestDoc(organizationId, SchemaDefinitionByApiType, token, appIdNumber, input))?.api?.schema?.definition ?? null;
|
|
168621
|
+
} catch (error) {
|
|
168622
|
+
throw new AbortError(`Failed to fetch schema definition: ${error}`);
|
|
168623
|
+
}
|
|
168443
168624
|
}
|
|
168444
168625
|
async migrateToUiExtension(_input) {
|
|
168445
168626
|
throw new BugError("Not implemented: migrateToUiExtension");
|
|
@@ -175621,43 +175802,45 @@ init_cjs_shims();
|
|
|
175621
175802
|
// ../app/dist/cli/services/generate-schema.js
|
|
175622
175803
|
init_cjs_shims();
|
|
175623
175804
|
async function generateSchemaService(options) {
|
|
175624
|
-
let { extension, stdout, developerPlatformClient, app } = options, apiKey = app.configuration.client_id, { api_version: version, type, targeting } = extension.configuration, definition = await (!!targeting?.length ? generateSchemaFromTarget({
|
|
175805
|
+
let { extension, stdout, developerPlatformClient, app, orgId } = options, apiKey = app.configuration.client_id, appId = app.configuration.app_id, { api_version: version, type, targeting } = extension.configuration, definition = await (!!targeting?.length ? generateSchemaFromTarget({
|
|
175625
175806
|
localIdentifier: extension.localIdentifier,
|
|
175626
175807
|
developerPlatformClient,
|
|
175627
175808
|
apiKey,
|
|
175809
|
+
appId,
|
|
175628
175810
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
175629
175811
|
target: targeting[0].target,
|
|
175630
|
-
version
|
|
175631
|
-
|
|
175812
|
+
version,
|
|
175813
|
+
orgId
|
|
175814
|
+
}) : generateSchemaFromApiType({
|
|
175632
175815
|
localIdentifier: extension.localIdentifier,
|
|
175633
175816
|
developerPlatformClient,
|
|
175634
175817
|
apiKey,
|
|
175818
|
+
appId,
|
|
175635
175819
|
type,
|
|
175636
|
-
version
|
|
175820
|
+
version,
|
|
175821
|
+
orgId
|
|
175637
175822
|
}));
|
|
175638
175823
|
if (stdout)
|
|
175639
175824
|
outputInfo(definition);
|
|
175640
175825
|
else {
|
|
175641
|
-
let outputPath = joinPath(
|
|
175826
|
+
let outputPath = joinPath(extension.directory, "schema.graphql");
|
|
175642
175827
|
await writeFile(outputPath, definition), outputInfo(`GraphQL Schema for ${extension.localIdentifier} written to ${outputPath}`);
|
|
175643
175828
|
}
|
|
175644
175829
|
}
|
|
175645
|
-
async function generateSchemaFromTarget({ localIdentifier, developerPlatformClient, apiKey, target, version }) {
|
|
175830
|
+
async function generateSchemaFromTarget({ localIdentifier, developerPlatformClient, appId, apiKey, target, version, orgId }) {
|
|
175646
175831
|
let variables = {
|
|
175647
|
-
|
|
175648
|
-
target,
|
|
175832
|
+
handle: target,
|
|
175649
175833
|
version
|
|
175650
|
-
}, definition = await developerPlatformClient.targetSchemaDefinition(variables);
|
|
175834
|
+
}, definition = await developerPlatformClient.targetSchemaDefinition(variables, apiKey, orgId, appId);
|
|
175651
175835
|
if (!definition)
|
|
175652
175836
|
throw new AbortError(outputContent`A schema could not be generated for ${localIdentifier}`, outputContent`Check that the Function targets and version are valid.`);
|
|
175653
175837
|
return definition;
|
|
175654
175838
|
}
|
|
175655
|
-
async function
|
|
175839
|
+
async function generateSchemaFromApiType({ localIdentifier, developerPlatformClient, apiKey, appId, version, type, orgId }) {
|
|
175656
175840
|
let variables = {
|
|
175657
|
-
apiKey,
|
|
175658
175841
|
version,
|
|
175659
175842
|
type
|
|
175660
|
-
}, definition = await developerPlatformClient.apiSchemaDefinition(variables);
|
|
175843
|
+
}, definition = await developerPlatformClient.apiSchemaDefinition(variables, apiKey, orgId, appId);
|
|
175661
175844
|
if (!definition)
|
|
175662
175845
|
throw new AbortError(outputContent`A schema could not be generated for ${localIdentifier}`, outputContent`Check that the Function API type and version are valid.`);
|
|
175663
175846
|
return definition;
|
|
@@ -175676,31 +175859,32 @@ var functionFlags = {
|
|
|
175676
175859
|
})
|
|
175677
175860
|
};
|
|
175678
175861
|
async function inFunctionContext({ path: path3, userProvidedConfigName, apiKey, callback, reset }) {
|
|
175679
|
-
let { app, developerPlatformClient } = await linkedAppContext({
|
|
175862
|
+
let { app, developerPlatformClient, organization } = await linkedAppContext({
|
|
175680
175863
|
directory: path3,
|
|
175681
175864
|
clientId: apiKey,
|
|
175682
175865
|
forceRelink: reset ?? !1,
|
|
175683
175866
|
userProvidedConfigName
|
|
175684
175867
|
}), allFunctions = app.allExtensions.filter((ext) => ext.isFunctionExtension), ourFunction = allFunctions.find((fun) => fun.directory === path3);
|
|
175685
175868
|
if (ourFunction)
|
|
175686
|
-
return callback(app, developerPlatformClient, ourFunction);
|
|
175869
|
+
return callback(app, developerPlatformClient, ourFunction, organization.id);
|
|
175687
175870
|
if (isTerminalInteractive()) {
|
|
175688
175871
|
let selectedFunction = await renderAutocompletePrompt({
|
|
175689
175872
|
message: "Which function?",
|
|
175690
175873
|
choices: allFunctions.map((shopifyFunction) => ({ label: shopifyFunction.handle, value: shopifyFunction }))
|
|
175691
175874
|
});
|
|
175692
|
-
return callback(app, developerPlatformClient, selectedFunction);
|
|
175875
|
+
return callback(app, developerPlatformClient, selectedFunction, organization.id);
|
|
175693
175876
|
} else
|
|
175694
175877
|
throw new AbortError("Run this command from a function directory or use `--path` to specify a function directory.");
|
|
175695
175878
|
}
|
|
175696
|
-
async function getOrGenerateSchemaPath(extension, app, developerPlatformClient) {
|
|
175879
|
+
async function getOrGenerateSchemaPath(extension, app, developerPlatformClient, orgId) {
|
|
175697
175880
|
let path3 = joinPath(extension.directory, "schema.graphql");
|
|
175698
175881
|
return await fileExists(path3) ? path3 : (await generateSchemaService({
|
|
175699
175882
|
app,
|
|
175700
175883
|
developerPlatformClient,
|
|
175701
175884
|
extension,
|
|
175702
175885
|
stdout: !1,
|
|
175703
|
-
path: extension.directory
|
|
175886
|
+
path: extension.directory,
|
|
175887
|
+
orgId
|
|
175704
175888
|
}), await fileExists(path3) ? path3 : void 0);
|
|
175705
175889
|
}
|
|
175706
175890
|
|
|
@@ -176151,7 +176335,7 @@ var _a25, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppCom
|
|
|
176151
176335
|
userProvidedConfigName: flags.config,
|
|
176152
176336
|
apiKey: flags["client-id"],
|
|
176153
176337
|
reset: flags.reset,
|
|
176154
|
-
callback: async (app2, developerPlatformClient, ourFunction) => {
|
|
176338
|
+
callback: async (app2, developerPlatformClient, ourFunction, orgId) => {
|
|
176155
176339
|
let functionExport = DEFAULT_FUNCTION_EXPORT;
|
|
176156
176340
|
if (flags.export !== void 0)
|
|
176157
176341
|
outputDebug(`Using export ${flags.export} from the --export flag.`), functionExport = flags.export;
|
|
@@ -176170,7 +176354,7 @@ var _a25, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppCom
|
|
|
176170
176354
|
functionExport = targeting?.[0]?.export || DEFAULT_FUNCTION_EXPORT, outputDebug(`Using export '${functionExport}'. Use the --export flag or an interactive terminal to select a different export.`);
|
|
176171
176355
|
} else
|
|
176172
176356
|
outputDebug(`No targeting information found. Using the default export '${functionExport}'. Use the --export flag or an interactive terminal to select a different export.`);
|
|
176173
|
-
let inputQueryPath = ourFunction?.configuration.targeting?.[0]?.input_query, queryPath = inputQueryPath && `${ourFunction?.directory}/${inputQueryPath}`, schemaPath = await getOrGenerateSchemaPath(ourFunction, app2, developerPlatformClient);
|
|
176357
|
+
let inputQueryPath = ourFunction?.configuration.targeting?.[0]?.input_query, queryPath = inputQueryPath && `${ourFunction?.directory}/${inputQueryPath}`, schemaPath = await getOrGenerateSchemaPath(ourFunction, app2, developerPlatformClient, orgId);
|
|
176174
176358
|
return await runFunction({
|
|
176175
176359
|
functionExtension: ourFunction,
|
|
176176
176360
|
json: flags.json,
|
|
@@ -176220,12 +176404,13 @@ var _a26, FetchSchema = class extends AppCommand {
|
|
|
176220
176404
|
apiKey,
|
|
176221
176405
|
reset: flags.reset,
|
|
176222
176406
|
userProvidedConfigName: flags.config,
|
|
176223
|
-
callback: async (app2, developerPlatformClient, ourFunction) => (await generateSchemaService({
|
|
176407
|
+
callback: async (app2, developerPlatformClient, ourFunction, orgId) => (await generateSchemaService({
|
|
176224
176408
|
app: app2,
|
|
176225
176409
|
extension: ourFunction,
|
|
176226
176410
|
developerPlatformClient,
|
|
176227
176411
|
stdout: flags.stdout,
|
|
176228
|
-
path: flags.path
|
|
176412
|
+
path: flags.path,
|
|
176413
|
+
orgId
|
|
176229
176414
|
}), app2)
|
|
176230
176415
|
}) };
|
|
176231
176416
|
}
|
|
@@ -176879,11 +177064,10 @@ function buildTomlObject3(extension, _2, appConfiguration) {
|
|
|
176879
177064
|
extensions: [
|
|
176880
177065
|
{
|
|
176881
177066
|
type: "admin_link",
|
|
176882
|
-
name:
|
|
177067
|
+
name: config2.text,
|
|
176883
177068
|
handle: slugify(extension.title.substring(0, MAX_EXTENSION_HANDLE_LENGTH)),
|
|
176884
177069
|
targeting: [
|
|
176885
177070
|
{
|
|
176886
|
-
text: config2.text,
|
|
176887
177071
|
url: config2.url,
|
|
176888
177072
|
target: contextToTarget(context)
|
|
176889
177073
|
}
|
|
@@ -179408,20 +179592,6 @@ var DidYouMeanCommands = {
|
|
|
179408
179592
|
await shouldRunCommand(result, userCommand) && await this.config.runCommand(result, opts.argv);
|
|
179409
179593
|
};
|
|
179410
179594
|
|
|
179411
|
-
// ../cli-kit/dist/public/node/cli-launcher.js
|
|
179412
|
-
init_cjs_shims();
|
|
179413
|
-
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
179414
|
-
async function launchCLI(options) {
|
|
179415
|
-
let { errorHandler: errorHandler2 } = await import("./error-handler-FY3IUTH3.js"), { isDevelopment } = await import("./local-TRXHLDGT.js"), oclif = await import("./lib-XYCLX35G.js"), { ShopifyConfig } = await import("./custom-oclif-loader-4V6TU5BB.js");
|
|
179416
|
-
isDevelopment() && (oclif.default.settings.debug = !0);
|
|
179417
|
-
try {
|
|
179418
|
-
let config2 = new ShopifyConfig({ root: fileURLToPath7(options.moduleURL) });
|
|
179419
|
-
await config2.load(), await oclif.default.run(options.argv, config2), await oclif.default.flush();
|
|
179420
|
-
} catch (error) {
|
|
179421
|
-
return await errorHandler2(error), oclif.default.Errors.handle(error);
|
|
179422
|
-
}
|
|
179423
|
-
}
|
|
179424
|
-
|
|
179425
179595
|
// src/index.ts
|
|
179426
179596
|
import fs6 from "fs";
|
|
179427
179597
|
|
|
@@ -179444,7 +179614,7 @@ var TUNNEL_PROVIDER = "cloudflare", provider_default = defineProvider({ name: TU
|
|
|
179444
179614
|
|
|
179445
179615
|
// ../plugin-cloudflare/dist/install-cloudflared.js
|
|
179446
179616
|
init_cjs_shims();
|
|
179447
|
-
import { fileURLToPath as
|
|
179617
|
+
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
179448
179618
|
import util from "util";
|
|
179449
179619
|
import { pipeline as pipeline2 } from "stream";
|
|
179450
179620
|
import { execSync, execFileSync } from "child_process";
|
|
@@ -179474,7 +179644,7 @@ function getURL(platform2 = process.platform, arch = process.arch) {
|
|
|
179474
179644
|
return CLOUDFLARE_REPO + fileName;
|
|
179475
179645
|
}
|
|
179476
179646
|
function getBinPathTarget(env = process.env, platform2 = process.platform) {
|
|
179477
|
-
return env.SHOPIFY_CLI_CLOUDFLARED_PATH ? env.SHOPIFY_CLI_CLOUDFLARED_PATH : joinPath(dirname(
|
|
179647
|
+
return env.SHOPIFY_CLI_CLOUDFLARED_PATH ? env.SHOPIFY_CLI_CLOUDFLARED_PATH : joinPath(dirname(fileURLToPath7(import.meta.url)), "..", "bin", platform2 === "win32" ? "cloudflared.exe" : "cloudflared");
|
|
179478
179648
|
}
|
|
179479
179649
|
async function install(env = process.env, platform2 = process.platform, arch = process.arch) {
|
|
179480
179650
|
if (env.SHOPIFY_CLI_IGNORE_CLOUDFLARED) {
|
|
@@ -179527,7 +179697,7 @@ async function downloadFile(url, to) {
|
|
|
179527
179697
|
|
|
179528
179698
|
// ../plugin-cloudflare/dist/tunnel.js
|
|
179529
179699
|
import { Writable as Writable2 } from "stream";
|
|
179530
|
-
import { fileURLToPath as
|
|
179700
|
+
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
179531
179701
|
var tunnel_default = startTunnel({ provider: TUNNEL_PROVIDER, action: hookStart }), TUNNEL_TIMEOUT = isUnitTest() ? 0.2 : 40, MAX_RETRIES = 5;
|
|
179532
179702
|
async function hookStart(port) {
|
|
179533
179703
|
try {
|
|
@@ -179639,7 +179809,7 @@ function findConnection(data) {
|
|
|
179639
179809
|
return match2 && match2[0];
|
|
179640
179810
|
}
|
|
179641
179811
|
function getBinPathTarget2() {
|
|
179642
|
-
return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH ? process.env.SHOPIFY_CLI_CLOUDFLARED_PATH : joinPath(dirname(
|
|
179812
|
+
return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH ? process.env.SHOPIFY_CLI_CLOUDFLARED_PATH : joinPath(dirname(fileURLToPath8(import.meta.url)), "..", "bin", process.platform === "win32" ? "cloudflared.exe" : "cloudflared");
|
|
179643
179813
|
}
|
|
179644
179814
|
function getTunnelDomain() {
|
|
179645
179815
|
return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN ?? "trycloudflare.com";
|
|
@@ -179660,13 +179830,10 @@ signals.forEach((signal) => {
|
|
|
179660
179830
|
var columns2 = Number(process.env.SHOPIFY_CLI_COLUMNS);
|
|
179661
179831
|
isNaN(columns2) || (process.stdout.columns = columns2);
|
|
179662
179832
|
async function runShopifyCLI({ development }) {
|
|
179663
|
-
await runCLI(
|
|
179664
|
-
|
|
179665
|
-
|
|
179666
|
-
|
|
179667
|
-
},
|
|
179668
|
-
launchCLI
|
|
179669
|
-
);
|
|
179833
|
+
await runCLI({
|
|
179834
|
+
moduleURL: import.meta.url,
|
|
179835
|
+
development
|
|
179836
|
+
});
|
|
179670
179837
|
}
|
|
179671
179838
|
commands3.plugins.hidden = !0;
|
|
179672
179839
|
commands3["plugins:install"].description = "";
|