@shopify/cli 3.69.3 → 3.69.4
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/assets/hydrogen/starter/CHANGELOG.md +147 -0
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/root.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/[sitemap.xml].tsx +6 -166
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +2 -1
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +3 -1
- package/dist/assets/hydrogen/starter/app/routes/sitemap.$type.$page[.xml].tsx +24 -0
- package/dist/assets/hydrogen/starter/package.json +10 -10
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +11 -37
- package/dist/{chunk-RTXVY32Y.js → chunk-2JRUKBKX.js} +6 -6
- package/dist/{chunk-B6RI3XO4.js → chunk-2NCWYVM4.js} +2 -2
- package/dist/{chunk-WITDBDKW.js → chunk-334DJQUN.js} +2 -2
- package/dist/{chunk-UL6L7ZS3.js → chunk-6IATSQ3X.js} +3 -3
- package/dist/{chunk-VEEUPLAO.js → chunk-7B5FNNVB.js} +3 -3
- package/dist/{chunk-65CKWSWQ.js → chunk-7NPDPZ22.js} +5 -5
- package/dist/{chunk-T65TTGOS.js → chunk-BMTELIUS.js} +4 -4
- package/dist/{chunk-5O3Y6TSZ.js → chunk-BRO6DC7D.js} +77 -91
- package/dist/{chunk-F2NOZSYG.js → chunk-CPEFXM7T.js} +4 -4
- package/dist/{chunk-NIFSDRC3.js → chunk-EJGKAHVK.js} +2 -2
- package/dist/{chunk-PO7KPJGR.js → chunk-F54UWMGQ.js} +3 -3
- package/dist/{chunk-JGXT3WUR.js → chunk-FVUAIT37.js} +2 -2
- package/dist/{chunk-V5DOEDF4.js → chunk-FWX3KCDM.js} +4 -4
- package/dist/{chunk-KNW6BL2Q.js → chunk-FX2HB3CJ.js} +4 -4
- package/dist/{chunk-Y54K4MPH.js → chunk-GYP4MV72.js} +4 -4
- package/dist/{chunk-MLSNFFTR.js → chunk-HV364V3E.js} +2 -2
- package/dist/{chunk-ZCYPTS6V.js → chunk-ISDSND4L.js} +2 -2
- package/dist/{chunk-7D77RINN.js → chunk-JHVVETTP.js} +2 -2
- package/dist/{chunk-XROTFVTO.js → chunk-K3GASX6Y.js} +3 -3
- package/dist/{chunk-WJCZFW37.js → chunk-KM4TMAQ2.js} +4 -4
- package/dist/{chunk-WHHRKJDE.js → chunk-N3U3EHOE.js} +3 -3
- package/dist/{chunk-I66GPBMO.js → chunk-ORDEDRCZ.js} +3 -3
- package/dist/{chunk-KGLQ4JD4.js → chunk-OWCYMR5Y.js} +3 -3
- package/dist/{chunk-ERVB6ERU.js → chunk-OWLPHMUA.js} +3 -3
- package/dist/{chunk-IUHYP3QG.js → chunk-RYTZQSHH.js} +2 -2
- package/dist/{chunk-AKHBZYBW.js → chunk-S2IXL3EU.js} +2 -2
- package/dist/{chunk-7GWY3FA4.js → chunk-TLZ4ZBH3.js} +3 -3
- package/dist/{chunk-ACM5TZH6.js → chunk-TV5WOUSX.js} +2 -2
- package/dist/{chunk-RHX2I4MG.js → chunk-UQUVQV3X.js} +3 -3
- package/dist/{chunk-2Q5IM74H.js → chunk-VHEJRU4K.js} +5 -5
- package/dist/{chunk-AZKJLRVK.js → chunk-VQ3R5DHS.js} +3 -3
- package/dist/{chunk-OWPU7LGF.js → chunk-WHP4CEBJ.js} +6 -6
- package/dist/{chunk-FRDQIYC3.js → chunk-Y3MSANL5.js} +2 -2
- package/dist/{chunk-BZO3BX6M.js → chunk-YNL4XNMX.js} +4 -4
- package/dist/{chunk-AN5WQN4K.js → chunk-YPWRQ5AU.js} +3 -3
- package/dist/cli/commands/auth/logout.js +10 -10
- package/dist/cli/commands/auth/logout.test.js +11 -11
- package/dist/cli/commands/debug/command-flags.js +9 -9
- package/dist/cli/commands/demo/catalog.js +10 -10
- package/dist/cli/commands/demo/generate-file.js +10 -10
- package/dist/cli/commands/demo/index.js +10 -10
- package/dist/cli/commands/demo/print-ai-prompt.js +10 -10
- package/dist/cli/commands/docs/generate.js +9 -9
- package/dist/cli/commands/docs/generate.test.js +9 -9
- package/dist/cli/commands/help.js +9 -9
- package/dist/cli/commands/kitchen-sink/async.js +10 -10
- package/dist/cli/commands/kitchen-sink/async.test.js +10 -10
- package/dist/cli/commands/kitchen-sink/index.js +12 -12
- package/dist/cli/commands/kitchen-sink/index.test.js +12 -12
- package/dist/cli/commands/kitchen-sink/prompts.js +10 -10
- package/dist/cli/commands/kitchen-sink/prompts.test.js +10 -10
- package/dist/cli/commands/kitchen-sink/static.js +10 -10
- package/dist/cli/commands/kitchen-sink/static.test.js +10 -10
- package/dist/cli/commands/search.js +10 -10
- package/dist/cli/commands/upgrade.js +10 -10
- package/dist/cli/commands/version.js +10 -10
- package/dist/cli/commands/version.test.js +10 -10
- 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/demo.js +2 -2
- package/dist/cli/services/demo.test.js +2 -2
- 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-YBMJNE6U.js → custom-oclif-loader-TBU3GENB.js} +2 -2
- package/dist/{error-handler-A4P3264C.js → error-handler-IL72ACEX.js} +8 -8
- package/dist/hooks/postrun.js +6 -6
- package/dist/hooks/prerun.js +6 -6
- package/dist/index.js +1838 -420
- package/dist/{local-ZKVS3PQJ.js → local-OE2I46PA.js} +2 -2
- package/dist/{morph-QZYXTRWT.js → morph-UIXWG2S7.js} +9 -9
- package/dist/{node-UHHST6UJ.js → node-SDBKEHIV.js} +13 -13
- package/dist/{node-package-manager-EU3ZOEFD.js → node-package-manager-LPDV6HZY.js} +3 -3
- package/dist/{system-L7HP2PAP.js → system-SGABHAU2.js} +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-HXNDVEEG.js → ui-WB42ZV4M.js} +2 -2
- package/dist/{workerd-7CGH4YHE.js → workerd-YWTPL4SF.js} +12 -12
- package/oclif.manifest.json +2 -12
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-PMUQTGZJ.js";
|
|
7
7
|
import {
|
|
8
8
|
findPort
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OWLPHMUA.js";
|
|
10
10
|
import {
|
|
11
11
|
ALIAS_NAME,
|
|
12
12
|
ALL_ROUTE_CHOICES,
|
|
@@ -40,7 +40,6 @@ import {
|
|
|
40
40
|
createPlatformShortcut,
|
|
41
41
|
createRemixLogger,
|
|
42
42
|
createStorefront,
|
|
43
|
-
deprecated,
|
|
44
43
|
downloadGitRepository,
|
|
45
44
|
enhanceAuthLogs,
|
|
46
45
|
enhanceH2Logs,
|
|
@@ -128,7 +127,7 @@ import {
|
|
|
128
127
|
unsetStorefront,
|
|
129
128
|
waitForJob,
|
|
130
129
|
writeDotEnv
|
|
131
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-BRO6DC7D.js";
|
|
132
131
|
import {
|
|
133
132
|
import_websocket_server
|
|
134
133
|
} from "./chunk-NCKQIOV4.js";
|
|
@@ -140,39 +139,39 @@ import {
|
|
|
140
139
|
} from "./chunk-OXKHBIW7.js";
|
|
141
140
|
import {
|
|
142
141
|
KitchenSinkStatic
|
|
143
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-N3U3EHOE.js";
|
|
144
143
|
import {
|
|
145
144
|
Search
|
|
146
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-UQUVQV3X.js";
|
|
147
146
|
import {
|
|
148
147
|
Upgrade
|
|
149
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-YNL4XNMX.js";
|
|
150
149
|
import {
|
|
151
150
|
getOutputUpdateCLIReminder
|
|
152
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-K3GASX6Y.js";
|
|
153
152
|
import {
|
|
154
153
|
Version
|
|
155
|
-
} from "./chunk-
|
|
156
|
-
import "./chunk-
|
|
157
|
-
import "./chunk-
|
|
154
|
+
} from "./chunk-F54UWMGQ.js";
|
|
155
|
+
import "./chunk-YPWRQ5AU.js";
|
|
156
|
+
import "./chunk-Y3MSANL5.js";
|
|
158
157
|
import {
|
|
159
158
|
HelpCommand
|
|
160
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-EJGKAHVK.js";
|
|
161
160
|
import {
|
|
162
161
|
KitchenSinkAsync
|
|
163
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-ORDEDRCZ.js";
|
|
164
163
|
import {
|
|
165
164
|
KitchenSinkAll
|
|
166
|
-
} from "./chunk-
|
|
167
|
-
import "./chunk-
|
|
168
|
-
import "./chunk-
|
|
165
|
+
} from "./chunk-VHEJRU4K.js";
|
|
166
|
+
import "./chunk-334DJQUN.js";
|
|
167
|
+
import "./chunk-S2IXL3EU.js";
|
|
169
168
|
import {
|
|
170
169
|
KitchenSinkPrompts
|
|
171
|
-
} from "./chunk-
|
|
172
|
-
import "./chunk-
|
|
170
|
+
} from "./chunk-6IATSQ3X.js";
|
|
171
|
+
import "./chunk-ISDSND4L.js";
|
|
173
172
|
import {
|
|
174
173
|
Logout
|
|
175
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-BMTELIUS.js";
|
|
176
175
|
import {
|
|
177
176
|
ensureAuthenticatedAdmin,
|
|
178
177
|
ensureAuthenticatedAppManagement,
|
|
@@ -180,32 +179,32 @@ import {
|
|
|
180
179
|
ensureAuthenticatedPartners,
|
|
181
180
|
ensureAuthenticatedStorefront,
|
|
182
181
|
ensureAuthenticatedThemes
|
|
183
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-TLZ4ZBH3.js";
|
|
184
183
|
import {
|
|
185
184
|
CommandFlags
|
|
186
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-7B5FNNVB.js";
|
|
187
186
|
import {
|
|
188
187
|
Catalog
|
|
189
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-CPEFXM7T.js";
|
|
190
189
|
import {
|
|
191
190
|
GenerateFile
|
|
192
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-FWX3KCDM.js";
|
|
193
192
|
import {
|
|
194
193
|
Demo
|
|
195
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-GYP4MV72.js";
|
|
196
195
|
import {
|
|
197
196
|
PrintAIPrompt
|
|
198
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-FX2HB3CJ.js";
|
|
199
198
|
import "./chunk-QSUS3GJF.js";
|
|
200
|
-
import "./chunk-
|
|
199
|
+
import "./chunk-FVUAIT37.js";
|
|
201
200
|
import {
|
|
202
201
|
DocsGenerate
|
|
203
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-VQ3R5DHS.js";
|
|
204
203
|
import {
|
|
205
204
|
base_command_default,
|
|
206
205
|
decodeToml,
|
|
207
206
|
encodeToml
|
|
208
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-KM4TMAQ2.js";
|
|
209
208
|
import {
|
|
210
209
|
require_byline,
|
|
211
210
|
require_end_of_stream,
|
|
@@ -213,14 +212,14 @@ import {
|
|
|
213
212
|
require_iserror,
|
|
214
213
|
require_pump,
|
|
215
214
|
require_stack_generator
|
|
216
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-WHP4CEBJ.js";
|
|
217
216
|
import {
|
|
218
217
|
execCLI2,
|
|
219
218
|
fanoutHooks,
|
|
220
219
|
getListOfTunnelPlugins,
|
|
221
220
|
reportAnalyticsEvent,
|
|
222
221
|
version
|
|
223
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-2JRUKBKX.js";
|
|
224
223
|
import {
|
|
225
224
|
ClientError,
|
|
226
225
|
FetchError,
|
|
@@ -251,12 +250,12 @@ import {
|
|
|
251
250
|
restRequestHeaders,
|
|
252
251
|
restRequestUrl,
|
|
253
252
|
setNextDeprecationDate
|
|
254
|
-
} from "./chunk-
|
|
253
|
+
} from "./chunk-7NPDPZ22.js";
|
|
255
254
|
import "./chunk-VSLR7ET4.js";
|
|
256
255
|
import {
|
|
257
256
|
platformAndArch,
|
|
258
257
|
username
|
|
259
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-RYTZQSHH.js";
|
|
260
259
|
import {
|
|
261
260
|
LocalStorage,
|
|
262
261
|
UnknownPackageManagerError,
|
|
@@ -278,7 +277,7 @@ import {
|
|
|
278
277
|
usesWorkspaces,
|
|
279
278
|
versionSatisfies,
|
|
280
279
|
writePackageJSON
|
|
281
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-JHVVETTP.js";
|
|
282
281
|
import {
|
|
283
282
|
require_semver
|
|
284
283
|
} from "./chunk-BYPQXSAL.js";
|
|
@@ -287,7 +286,7 @@ import {
|
|
|
287
286
|
} from "./chunk-O5K4AU7Q.js";
|
|
288
287
|
import {
|
|
289
288
|
CLI_KIT_VERSION
|
|
290
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-HV364V3E.js";
|
|
291
290
|
import {
|
|
292
291
|
deepStrict,
|
|
293
292
|
errorsToString,
|
|
@@ -469,7 +468,7 @@ import {
|
|
|
469
468
|
use_stdin_default,
|
|
470
469
|
writeFile,
|
|
471
470
|
writeFileSync
|
|
472
|
-
} from "./chunk-
|
|
471
|
+
} from "./chunk-2NCWYVM4.js";
|
|
473
472
|
import {
|
|
474
473
|
logsFolder
|
|
475
474
|
} from "./chunk-P7JUHQKL.js";
|
|
@@ -15436,8 +15435,8 @@ var require_deprecated_filter = __commonJS({
|
|
|
15436
15435
|
if (node.name === "hex_to_rgba")
|
|
15437
15436
|
return (0, fixes_1.fixHexToRgba)(node);
|
|
15438
15437
|
}
|
|
15439
|
-
function deprecatedFilterMessage(
|
|
15440
|
-
return recommended ? `Deprecated filter '${
|
|
15438
|
+
function deprecatedFilterMessage(deprecated, recommended) {
|
|
15439
|
+
return recommended ? `Deprecated filter '${deprecated.name}', consider using '${recommended.name}'.` : `Deprecated filter '${deprecated.name}'.`;
|
|
15441
15440
|
}
|
|
15442
15441
|
function findRecommendedAlternative(deprecatedFilter) {
|
|
15443
15442
|
let reason = deprecatedFilter.deprecation_reason, match2 = reason?.match(/replaced by \[`(.+?)`\]/);
|
|
@@ -52061,9 +52060,9 @@ var require_archiver = __commonJS({
|
|
|
52061
52060
|
}
|
|
52062
52061
|
});
|
|
52063
52062
|
|
|
52064
|
-
// ../../node_modules/.pnpm/@bugsnag+node@
|
|
52063
|
+
// ../../node_modules/.pnpm/@bugsnag+node@8.1.1/node_modules/@bugsnag/node/dist/bugsnag.js
|
|
52065
52064
|
var require_bugsnag = __commonJS({
|
|
52066
|
-
"../../node_modules/.pnpm/@bugsnag+node@
|
|
52065
|
+
"../../node_modules/.pnpm/@bugsnag+node@8.1.1/node_modules/@bugsnag/node/dist/bugsnag.js"(exports, module) {
|
|
52067
52066
|
init_cjs_shims();
|
|
52068
52067
|
(function(f) {
|
|
52069
52068
|
if (typeof exports == "object" && typeof module < "u")
|
|
@@ -52088,23 +52087,23 @@ var require_bugsnag = __commonJS({
|
|
|
52088
52087
|
metaData: this.metadata
|
|
52089
52088
|
};
|
|
52090
52089
|
}, Breadcrumb2;
|
|
52091
|
-
}(), _$
|
|
52090
|
+
}(), _$Breadcrumb_7 = Breadcrumb, _$breadcrumbTypes_12 = ["navigation", "request", "process", "log", "user", "state", "error", "manual"], _$reduce_22 = function(arr, fn, accum) {
|
|
52092
52091
|
for (var val = accum, i = 0, len = arr.length; i < len; i++)
|
|
52093
52092
|
val = fn(val, arr[i], i, arr);
|
|
52094
52093
|
return val;
|
|
52095
|
-
}, _$
|
|
52096
|
-
return _$
|
|
52094
|
+
}, _$filter_17 = function(arr, fn) {
|
|
52095
|
+
return _$reduce_22(arr, function(accum, item, i, arr2) {
|
|
52097
52096
|
return fn(item, i, arr2) ? accum.concat(item) : accum;
|
|
52098
52097
|
}, []);
|
|
52099
|
-
}, _$
|
|
52100
|
-
return _$
|
|
52098
|
+
}, _$includes_18 = function(arr, x) {
|
|
52099
|
+
return _$reduce_22(arr, function(accum, item, i, arr2) {
|
|
52101
52100
|
return accum === !0 || item === x;
|
|
52102
52101
|
}, !1);
|
|
52103
|
-
}, _$
|
|
52102
|
+
}, _$isArray_19 = function(obj) {
|
|
52104
52103
|
return Object.prototype.toString.call(obj) === "[object Array]";
|
|
52105
52104
|
}, _hasDontEnumBug = !{
|
|
52106
52105
|
toString: null
|
|
52107
|
-
}.propertyIsEnumerable("toString"), _dontEnums = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], _$
|
|
52106
|
+
}.propertyIsEnumerable("toString"), _dontEnums = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], _$keys_20 = function(obj) {
|
|
52108
52107
|
var result = [], prop;
|
|
52109
52108
|
for (prop in obj)
|
|
52110
52109
|
Object.prototype.hasOwnProperty.call(obj, prop) && result.push(prop);
|
|
@@ -52113,36 +52112,36 @@ var require_bugsnag = __commonJS({
|
|
|
52113
52112
|
for (var i = 0, len = _dontEnums.length; i < len; i++)
|
|
52114
52113
|
Object.prototype.hasOwnProperty.call(obj, _dontEnums[i]) && result.push(_dontEnums[i]);
|
|
52115
52114
|
return result;
|
|
52116
|
-
}, _$
|
|
52115
|
+
}, _$intRange_31 = function(min, max) {
|
|
52117
52116
|
return min === void 0 && (min = 1), max === void 0 && (max = 1 / 0), function(value) {
|
|
52118
52117
|
return typeof value == "number" && parseInt("" + value, 10) === value && value >= min && value <= max;
|
|
52119
52118
|
};
|
|
52120
|
-
}, _$
|
|
52121
|
-
return typeof value == "function" || _$
|
|
52119
|
+
}, _$listOfFunctions_32 = function(value) {
|
|
52120
|
+
return typeof value == "function" || _$isArray_19(value) && _$filter_17(value, function(f) {
|
|
52122
52121
|
return typeof f == "function";
|
|
52123
52122
|
}).length === value.length;
|
|
52124
|
-
}, _$
|
|
52123
|
+
}, _$stringWithLength_33 = function(value) {
|
|
52125
52124
|
return typeof value == "string" && !!value.length;
|
|
52126
|
-
}, _$
|
|
52125
|
+
}, _$config_9 = {}, defaultErrorTypes = function() {
|
|
52127
52126
|
return {
|
|
52128
52127
|
unhandledExceptions: !0,
|
|
52129
52128
|
unhandledRejections: !0
|
|
52130
52129
|
};
|
|
52131
52130
|
};
|
|
52132
|
-
_$
|
|
52131
|
+
_$config_9.schema = {
|
|
52133
52132
|
apiKey: {
|
|
52134
52133
|
defaultValue: function() {
|
|
52135
52134
|
return null;
|
|
52136
52135
|
},
|
|
52137
52136
|
message: "is required",
|
|
52138
|
-
validate: _$
|
|
52137
|
+
validate: _$stringWithLength_33
|
|
52139
52138
|
},
|
|
52140
52139
|
appVersion: {
|
|
52141
52140
|
defaultValue: function() {
|
|
52142
52141
|
},
|
|
52143
52142
|
message: "should be a string",
|
|
52144
52143
|
validate: function(value) {
|
|
52145
|
-
return value === void 0 || _$
|
|
52144
|
+
return value === void 0 || _$stringWithLength_33(value);
|
|
52146
52145
|
}
|
|
52147
52146
|
},
|
|
52148
52147
|
appType: {
|
|
@@ -52150,7 +52149,7 @@ var require_bugsnag = __commonJS({
|
|
|
52150
52149
|
},
|
|
52151
52150
|
message: "should be a string",
|
|
52152
52151
|
validate: function(value) {
|
|
52153
|
-
return value === void 0 || _$
|
|
52152
|
+
return value === void 0 || _$stringWithLength_33(value);
|
|
52154
52153
|
}
|
|
52155
52154
|
},
|
|
52156
52155
|
autoDetectErrors: {
|
|
@@ -52171,10 +52170,10 @@ var require_bugsnag = __commonJS({
|
|
|
52171
52170
|
validate: function(value) {
|
|
52172
52171
|
if (typeof value != "object" || !value)
|
|
52173
52172
|
return !1;
|
|
52174
|
-
var providedKeys = _$
|
|
52175
|
-
return !(_$
|
|
52176
|
-
return _$
|
|
52177
|
-
}).length < providedKeys.length || _$
|
|
52173
|
+
var providedKeys = _$keys_20(value), defaultKeys = _$keys_20(defaultErrorTypes());
|
|
52174
|
+
return !(_$filter_17(providedKeys, function(k) {
|
|
52175
|
+
return _$includes_18(defaultKeys, k);
|
|
52176
|
+
}).length < providedKeys.length || _$filter_17(_$keys_20(value), function(k) {
|
|
52178
52177
|
return typeof value[k] != "boolean";
|
|
52179
52178
|
}).length > 0);
|
|
52180
52179
|
}
|
|
@@ -52184,27 +52183,30 @@ var require_bugsnag = __commonJS({
|
|
|
52184
52183
|
return [];
|
|
52185
52184
|
},
|
|
52186
52185
|
message: "should be a function or array of functions",
|
|
52187
|
-
validate: _$
|
|
52186
|
+
validate: _$listOfFunctions_32
|
|
52188
52187
|
},
|
|
52189
52188
|
onSession: {
|
|
52190
52189
|
defaultValue: function() {
|
|
52191
52190
|
return [];
|
|
52192
52191
|
},
|
|
52193
52192
|
message: "should be a function or array of functions",
|
|
52194
|
-
validate: _$
|
|
52193
|
+
validate: _$listOfFunctions_32
|
|
52195
52194
|
},
|
|
52196
52195
|
onBreadcrumb: {
|
|
52197
52196
|
defaultValue: function() {
|
|
52198
52197
|
return [];
|
|
52199
52198
|
},
|
|
52200
52199
|
message: "should be a function or array of functions",
|
|
52201
|
-
validate: _$
|
|
52200
|
+
validate: _$listOfFunctions_32
|
|
52202
52201
|
},
|
|
52203
52202
|
endpoints: {
|
|
52204
|
-
defaultValue: function() {
|
|
52205
|
-
return {
|
|
52203
|
+
defaultValue: function(endpoints) {
|
|
52204
|
+
return typeof endpoints > "u" ? {
|
|
52206
52205
|
notify: "https://notify.bugsnag.com",
|
|
52207
52206
|
sessions: "https://sessions.bugsnag.com"
|
|
52207
|
+
} : {
|
|
52208
|
+
notify: null,
|
|
52209
|
+
sessions: null
|
|
52208
52210
|
};
|
|
52209
52211
|
},
|
|
52210
52212
|
message: "should be an object containing endpoint URLs { notify, sessions }",
|
|
@@ -52212,9 +52214,9 @@ var require_bugsnag = __commonJS({
|
|
|
52212
52214
|
return (
|
|
52213
52215
|
// first, ensure it's an object
|
|
52214
52216
|
val && typeof val == "object" && // notify and sessions must always be set
|
|
52215
|
-
_$
|
|
52216
|
-
_$
|
|
52217
|
-
return !_$
|
|
52217
|
+
_$stringWithLength_33(val.notify) && _$stringWithLength_33(val.sessions) && // ensure no keys other than notify/session are set on endpoints object
|
|
52218
|
+
_$filter_17(_$keys_20(val), function(k) {
|
|
52219
|
+
return !_$includes_18(["notify", "sessions"], k);
|
|
52218
52220
|
}).length === 0
|
|
52219
52221
|
);
|
|
52220
52222
|
}
|
|
@@ -52234,7 +52236,7 @@ var require_bugsnag = __commonJS({
|
|
|
52234
52236
|
},
|
|
52235
52237
|
message: "should be an array of strings",
|
|
52236
52238
|
validate: function(value) {
|
|
52237
|
-
return value === null || _$
|
|
52239
|
+
return value === null || _$isArray_19(value) && _$filter_17(value, function(f) {
|
|
52238
52240
|
return typeof f == "string";
|
|
52239
52241
|
}).length === value.length;
|
|
52240
52242
|
}
|
|
@@ -52254,17 +52256,17 @@ var require_bugsnag = __commonJS({
|
|
|
52254
52256
|
},
|
|
52255
52257
|
message: "should be a number \u2264100",
|
|
52256
52258
|
validate: function(value) {
|
|
52257
|
-
return _$
|
|
52259
|
+
return _$intRange_31(0, 100)(value);
|
|
52258
52260
|
}
|
|
52259
52261
|
},
|
|
52260
52262
|
enabledBreadcrumbTypes: {
|
|
52261
52263
|
defaultValue: function() {
|
|
52262
|
-
return _$
|
|
52264
|
+
return _$breadcrumbTypes_12;
|
|
52263
52265
|
},
|
|
52264
|
-
message: "should be null or a list of available breadcrumb types (" + _$
|
|
52266
|
+
message: "should be null or a list of available breadcrumb types (" + _$breadcrumbTypes_12.join(",") + ")",
|
|
52265
52267
|
validate: function(value) {
|
|
52266
|
-
return value === null || _$
|
|
52267
|
-
return accum === !1 ? accum : _$
|
|
52268
|
+
return value === null || _$isArray_19(value) && _$reduce_22(value, function(accum, maybeType) {
|
|
52269
|
+
return accum === !1 ? accum : _$includes_18(_$breadcrumbTypes_12, maybeType);
|
|
52268
52270
|
}, !0);
|
|
52269
52271
|
}
|
|
52270
52272
|
},
|
|
@@ -52282,8 +52284,8 @@ var require_bugsnag = __commonJS({
|
|
|
52282
52284
|
},
|
|
52283
52285
|
message: "should be an object with { id, email, name } properties",
|
|
52284
52286
|
validate: function(value) {
|
|
52285
|
-
return value === null || value && _$
|
|
52286
|
-
return accum && _$
|
|
52287
|
+
return value === null || value && _$reduce_22(_$keys_20(value), function(accum, key) {
|
|
52288
|
+
return accum && _$includes_18(["id", "email", "name"], key);
|
|
52287
52289
|
}, !0);
|
|
52288
52290
|
}
|
|
52289
52291
|
},
|
|
@@ -52301,7 +52303,7 @@ var require_bugsnag = __commonJS({
|
|
|
52301
52303
|
},
|
|
52302
52304
|
message: "should be null or an object with methods { debug, info, warn, error }",
|
|
52303
52305
|
validate: function(value) {
|
|
52304
|
-
return !value || value && _$
|
|
52306
|
+
return !value || value && _$reduce_22(["debug", "info", "warn", "error"], function(accum, method) {
|
|
52305
52307
|
return accum && typeof value[method] == "function";
|
|
52306
52308
|
}, !0);
|
|
52307
52309
|
}
|
|
@@ -52312,7 +52314,7 @@ var require_bugsnag = __commonJS({
|
|
|
52312
52314
|
},
|
|
52313
52315
|
message: "should be an array of strings|regexes",
|
|
52314
52316
|
validate: function(value) {
|
|
52315
|
-
return _$
|
|
52317
|
+
return _$isArray_19(value) && value.length === _$filter_17(value, function(s) {
|
|
52316
52318
|
return typeof s == "string" || s && typeof s.test == "function";
|
|
52317
52319
|
}).length;
|
|
52318
52320
|
}
|
|
@@ -52323,7 +52325,7 @@ var require_bugsnag = __commonJS({
|
|
|
52323
52325
|
},
|
|
52324
52326
|
message: "should be an array of plugin objects",
|
|
52325
52327
|
validate: function(value) {
|
|
52326
|
-
return _$
|
|
52328
|
+
return _$isArray_19(value) && value.length === _$filter_17(value, function(p) {
|
|
52327
52329
|
return p && typeof p == "object" && typeof p.load == "function";
|
|
52328
52330
|
}).length;
|
|
52329
52331
|
}
|
|
@@ -52334,24 +52336,33 @@ var require_bugsnag = __commonJS({
|
|
|
52334
52336
|
},
|
|
52335
52337
|
message: 'should be an array of objects that have a "name" property',
|
|
52336
52338
|
validate: function(value) {
|
|
52337
|
-
return _$
|
|
52339
|
+
return _$isArray_19(value) && value.length === _$filter_17(value, function(feature) {
|
|
52338
52340
|
return feature && typeof feature == "object" && typeof feature.name == "string";
|
|
52339
52341
|
}).length;
|
|
52340
52342
|
}
|
|
52343
|
+
},
|
|
52344
|
+
reportUnhandledPromiseRejectionsAsHandled: {
|
|
52345
|
+
defaultValue: function() {
|
|
52346
|
+
return !1;
|
|
52347
|
+
},
|
|
52348
|
+
message: "should be true|false",
|
|
52349
|
+
validate: function(value) {
|
|
52350
|
+
return value === !0 || value === !1;
|
|
52351
|
+
}
|
|
52341
52352
|
}
|
|
52342
52353
|
};
|
|
52343
|
-
var _$
|
|
52354
|
+
var _$errorStackParser_15 = require_error_stack_parser(), _$assign_16 = function(target) {
|
|
52344
52355
|
for (var i = 1; i < arguments.length; i++) {
|
|
52345
52356
|
var source = arguments[i];
|
|
52346
52357
|
for (var key in source)
|
|
52347
52358
|
Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
|
|
52348
52359
|
}
|
|
52349
52360
|
return target;
|
|
52350
|
-
}, _$
|
|
52351
|
-
return _$
|
|
52361
|
+
}, _$map_21 = function(arr, fn) {
|
|
52362
|
+
return _$reduce_22(arr, function(accum, item, i, arr2) {
|
|
52352
52363
|
return accum.concat(fn(item, i, arr2));
|
|
52353
52364
|
}, []);
|
|
52354
|
-
}, _$
|
|
52365
|
+
}, _$safeJsonStringify_5 = function(data, replacer, space, opts) {
|
|
52355
52366
|
var redactedKeys = opts && opts.redactedKeys ? opts.redactedKeys : [], redactedPaths = opts && opts.redactedPaths ? opts.redactedPaths : [];
|
|
52356
52367
|
return JSON.stringify(prepareObjForSerialization(data, redactedKeys, redactedPaths), replacer, space);
|
|
52357
52368
|
}, MAX_DEPTH = 20, MAX_EDGES = 25e3, MIN_PRESERVED_DEPTH = 8, REPLACEMENT_NODE = "...";
|
|
@@ -52379,7 +52390,7 @@ var require_bugsnag = __commonJS({
|
|
|
52379
52390
|
return !0;
|
|
52380
52391
|
return !1;
|
|
52381
52392
|
}
|
|
52382
|
-
function
|
|
52393
|
+
function __isArray_5(obj) {
|
|
52383
52394
|
return Object.prototype.toString.call(obj) === "[object Array]";
|
|
52384
52395
|
}
|
|
52385
52396
|
function safelyGetProp(obj, prop) {
|
|
@@ -52418,7 +52429,7 @@ var require_bugsnag = __commonJS({
|
|
|
52418
52429
|
}, path4);
|
|
52419
52430
|
return seen.pop(), eResult;
|
|
52420
52431
|
}
|
|
52421
|
-
if (
|
|
52432
|
+
if (__isArray_5(obj2)) {
|
|
52422
52433
|
for (var aResult = [], i = 0, len = obj2.length; i < len; i++) {
|
|
52423
52434
|
if (edgesExceeded()) {
|
|
52424
52435
|
aResult.push(REPLACEMENT_NODE);
|
|
@@ -52450,7 +52461,7 @@ var require_bugsnag = __commonJS({
|
|
|
52450
52461
|
}
|
|
52451
52462
|
function add(existingFeatures, existingFeatureKeys, name2, variant) {
|
|
52452
52463
|
if (typeof name2 == "string") {
|
|
52453
|
-
variant === void 0 ? variant = null : variant !== null && typeof variant != "string" && (variant = _$
|
|
52464
|
+
variant === void 0 ? variant = null : variant !== null && typeof variant != "string" && (variant = _$safeJsonStringify_5(variant));
|
|
52454
52465
|
var existingIndex = existingFeatureKeys[name2];
|
|
52455
52466
|
if (typeof existingIndex == "number") {
|
|
52456
52467
|
existingFeatures[existingIndex] = {
|
|
@@ -52466,7 +52477,7 @@ var require_bugsnag = __commonJS({
|
|
|
52466
52477
|
}
|
|
52467
52478
|
}
|
|
52468
52479
|
function merge(existingFeatures, newFeatures, existingFeatureKeys) {
|
|
52469
|
-
if (_$
|
|
52480
|
+
if (_$isArray_19(newFeatures)) {
|
|
52470
52481
|
for (var i = 0; i < newFeatures.length; ++i) {
|
|
52471
52482
|
var feature = newFeatures[i];
|
|
52472
52483
|
feature === null || typeof feature != "object" || add(existingFeatures, existingFeatureKeys, feature.name, feature.variant);
|
|
@@ -52475,7 +52486,7 @@ var require_bugsnag = __commonJS({
|
|
|
52475
52486
|
}
|
|
52476
52487
|
}
|
|
52477
52488
|
function toEventApi(featureFlags) {
|
|
52478
|
-
return _$
|
|
52489
|
+
return _$map_21(_$filter_17(featureFlags, Boolean), function(_ref) {
|
|
52479
52490
|
var name2 = _ref.name, variant = _ref.variant, flag = {
|
|
52480
52491
|
featureFlag: name2
|
|
52481
52492
|
};
|
|
@@ -52486,20 +52497,20 @@ var require_bugsnag = __commonJS({
|
|
|
52486
52497
|
var existingIndex = featuresIndex[name2];
|
|
52487
52498
|
typeof existingIndex == "number" && (features[existingIndex] = null, delete featuresIndex[name2]);
|
|
52488
52499
|
}
|
|
52489
|
-
var _$
|
|
52500
|
+
var _$featureFlagDelegate_23 = {
|
|
52490
52501
|
add,
|
|
52491
52502
|
clear,
|
|
52492
52503
|
merge,
|
|
52493
52504
|
toEventApi
|
|
52494
|
-
}, _$
|
|
52505
|
+
}, _$hasStack_24 = function(err2) {
|
|
52495
52506
|
return !!err2 && (!!err2.stack || !!err2.stacktrace || !!err2["opera#sourceloc"]) && typeof (err2.stack || err2.stacktrace || err2["opera#sourceloc"]) == "string" && err2.stack !== err2.name + ": " + err2.message;
|
|
52496
|
-
}, _$
|
|
52507
|
+
}, _$iserror_25 = require_iserror(), __add_27 = function(state, section, keyOrObj, maybeVal) {
|
|
52497
52508
|
var _updates;
|
|
52498
52509
|
if (section) {
|
|
52499
52510
|
var updates;
|
|
52500
52511
|
if (keyOrObj === null)
|
|
52501
|
-
return
|
|
52502
|
-
typeof keyOrObj == "object" && (updates = keyOrObj), typeof keyOrObj == "string" && (updates = (_updates = {}, _updates[keyOrObj] = maybeVal, _updates)), updates && (section === "__proto__" || section === "constructor" || section === "prototype" || (state[section] || (state[section] = {}), state[section] = _$
|
|
52512
|
+
return __clear_27(state, section);
|
|
52513
|
+
typeof keyOrObj == "object" && (updates = keyOrObj), typeof keyOrObj == "string" && (updates = (_updates = {}, _updates[keyOrObj] = maybeVal, _updates)), updates && (section === "__proto__" || section === "constructor" || section === "prototype" || (state[section] || (state[section] = {}), state[section] = _$assign_16({}, state[section], updates)));
|
|
52503
52514
|
}
|
|
52504
52515
|
}, get2 = function(state, section, key) {
|
|
52505
52516
|
if (typeof section == "string") {
|
|
@@ -52508,7 +52519,7 @@ var require_bugsnag = __commonJS({
|
|
|
52508
52519
|
if (state[section])
|
|
52509
52520
|
return state[section][key];
|
|
52510
52521
|
}
|
|
52511
|
-
},
|
|
52522
|
+
}, __clear_27 = function(state, section, key) {
|
|
52512
52523
|
if (typeof section == "string") {
|
|
52513
52524
|
if (!key) {
|
|
52514
52525
|
delete state[section];
|
|
@@ -52516,29 +52527,46 @@ var require_bugsnag = __commonJS({
|
|
|
52516
52527
|
}
|
|
52517
52528
|
section === "__proto__" || section === "constructor" || section === "prototype" || state[section] && delete state[section][key];
|
|
52518
52529
|
}
|
|
52519
|
-
}, _$
|
|
52520
|
-
add:
|
|
52530
|
+
}, _$metadataDelegate_27 = {
|
|
52531
|
+
add: __add_27,
|
|
52521
52532
|
get: get2,
|
|
52522
|
-
clear:
|
|
52523
|
-
}
|
|
52533
|
+
clear: __clear_27
|
|
52534
|
+
};
|
|
52535
|
+
function _extends() {
|
|
52536
|
+
return _extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
52537
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
52538
|
+
var source = arguments[i];
|
|
52539
|
+
for (var key in source)
|
|
52540
|
+
Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
|
|
52541
|
+
}
|
|
52542
|
+
return target;
|
|
52543
|
+
}, _extends.apply(this, arguments);
|
|
52544
|
+
}
|
|
52545
|
+
var StackGenerator = require_stack_generator(), Event2 = /* @__PURE__ */ function() {
|
|
52524
52546
|
function Event3(errorClass, errorMessage2, stacktrace, handledState, originalError) {
|
|
52525
|
-
stacktrace === void 0 && (stacktrace = []), handledState === void 0 && (handledState = defaultHandledState()), this.apiKey = void 0, this.context = void 0, this.groupingHash = void 0, this.originalError = originalError, this._handledState = handledState, this.severity = this._handledState.severity, this.unhandled = this._handledState.unhandled, this.app = {}, this.device = {}, this.request = {}, this.breadcrumbs = [], this.threads = [], this._metadata = {}, this._features = [], this._featuresIndex = {}, this._user = {}, this._session = void 0, this.errors = [createBugsnagError(errorClass, errorMessage2, Event3.__type, stacktrace)];
|
|
52547
|
+
stacktrace === void 0 && (stacktrace = []), handledState === void 0 && (handledState = defaultHandledState()), this.apiKey = void 0, this.context = void 0, this.groupingHash = void 0, this.originalError = originalError, this._handledState = handledState, this.severity = this._handledState.severity, this.unhandled = this._handledState.unhandled, this.app = {}, this.device = {}, this.request = {}, this.breadcrumbs = [], this.threads = [], this._metadata = {}, this._features = [], this._featuresIndex = {}, this._user = {}, this._session = void 0, this._correlation = void 0, this.errors = [createBugsnagError(errorClass, errorMessage2, Event3.__type, stacktrace)];
|
|
52526
52548
|
}
|
|
52527
52549
|
var _proto = Event3.prototype;
|
|
52528
52550
|
return _proto.addMetadata = function(section, keyOrObj, maybeVal) {
|
|
52529
|
-
return _$
|
|
52551
|
+
return _$metadataDelegate_27.add(this._metadata, section, keyOrObj, maybeVal);
|
|
52552
|
+
}, _proto.setTraceCorrelation = function(traceId, spanId) {
|
|
52553
|
+
typeof traceId == "string" && (this._correlation = _extends({
|
|
52554
|
+
traceId
|
|
52555
|
+
}, typeof spanId == "string" ? {
|
|
52556
|
+
spanId
|
|
52557
|
+
} : {}));
|
|
52530
52558
|
}, _proto.getMetadata = function(section, key) {
|
|
52531
|
-
return _$
|
|
52559
|
+
return _$metadataDelegate_27.get(this._metadata, section, key);
|
|
52532
52560
|
}, _proto.clearMetadata = function(section, key) {
|
|
52533
|
-
return _$
|
|
52561
|
+
return _$metadataDelegate_27.clear(this._metadata, section, key);
|
|
52534
52562
|
}, _proto.addFeatureFlag = function(name2, variant) {
|
|
52535
|
-
variant === void 0 && (variant = null), _$
|
|
52563
|
+
variant === void 0 && (variant = null), _$featureFlagDelegate_23.add(this._features, this._featuresIndex, name2, variant);
|
|
52536
52564
|
}, _proto.addFeatureFlags = function(featureFlags) {
|
|
52537
|
-
_$
|
|
52565
|
+
_$featureFlagDelegate_23.merge(this._features, featureFlags, this._featuresIndex);
|
|
52538
52566
|
}, _proto.getFeatureFlags = function() {
|
|
52539
|
-
return _$
|
|
52567
|
+
return _$featureFlagDelegate_23.toEventApi(this._features);
|
|
52540
52568
|
}, _proto.clearFeatureFlag = function(name2) {
|
|
52541
|
-
_$
|
|
52569
|
+
_$featureFlagDelegate_23.clear(this._features, this._featuresIndex, name2);
|
|
52542
52570
|
}, _proto.clearFeatureFlags = function() {
|
|
52543
52571
|
this._features = [], this._featuresIndex = {};
|
|
52544
52572
|
}, _proto.getUser = function() {
|
|
@@ -52552,8 +52580,8 @@ var require_bugsnag = __commonJS({
|
|
|
52552
52580
|
}, _proto.toJSON = function() {
|
|
52553
52581
|
return {
|
|
52554
52582
|
payloadVersion: "4",
|
|
52555
|
-
exceptions: _$
|
|
52556
|
-
return _$
|
|
52583
|
+
exceptions: _$map_21(this.errors, function(er) {
|
|
52584
|
+
return _$assign_16({}, er, {
|
|
52557
52585
|
message: er.errorMessage
|
|
52558
52586
|
});
|
|
52559
52587
|
}),
|
|
@@ -52569,7 +52597,8 @@ var require_bugsnag = __commonJS({
|
|
|
52569
52597
|
metaData: this._metadata,
|
|
52570
52598
|
user: this._user,
|
|
52571
52599
|
session: this._session,
|
|
52572
|
-
featureFlags: this.getFeatureFlags()
|
|
52600
|
+
featureFlags: this.getFeatureFlags(),
|
|
52601
|
+
correlation: this._correlation
|
|
52573
52602
|
};
|
|
52574
52603
|
}, Event3;
|
|
52575
52604
|
}(), formatStackframe = function(frame) {
|
|
@@ -52600,7 +52629,7 @@ var require_bugsnag = __commonJS({
|
|
|
52600
52629
|
errorClass: ensureString(errorClass),
|
|
52601
52630
|
errorMessage: ensureString(errorMessage2),
|
|
52602
52631
|
type,
|
|
52603
|
-
stacktrace: _$
|
|
52632
|
+
stacktrace: _$reduce_22(stacktrace, function(accum, frame) {
|
|
52604
52633
|
var f = formatStackframe(frame);
|
|
52605
52634
|
try {
|
|
52606
52635
|
return JSON.stringify(f) === "{}" ? accum : accum.concat(f);
|
|
@@ -52614,10 +52643,10 @@ var require_bugsnag = __commonJS({
|
|
|
52614
52643
|
return error.cause ? [error].concat(getCauseStack(error.cause)) : [error];
|
|
52615
52644
|
}
|
|
52616
52645
|
Event2.getStacktrace = function(error, errorFramesToSkip, backtraceFramesToSkip) {
|
|
52617
|
-
if (_$
|
|
52618
|
-
return _$
|
|
52646
|
+
if (_$hasStack_24(error))
|
|
52647
|
+
return _$errorStackParser_15.parse(error).slice(errorFramesToSkip);
|
|
52619
52648
|
try {
|
|
52620
|
-
return _$
|
|
52649
|
+
return _$filter_17(StackGenerator.backtrace(), function(frame) {
|
|
52621
52650
|
return (frame.functionName || "").indexOf("StackGenerator$$") === -1;
|
|
52622
52651
|
}).slice(1 + backtraceFramesToSkip);
|
|
52623
52652
|
} catch {
|
|
@@ -52643,8 +52672,8 @@ var require_bugsnag = __commonJS({
|
|
|
52643
52672
|
event = new Event2(error.name, error.message, [], handledState, maybeError);
|
|
52644
52673
|
}
|
|
52645
52674
|
if (error.name === "InvalidError" && event.addMetadata("" + component, "non-error parameter", makeSerialisable(maybeError)), error.cause) {
|
|
52646
|
-
var _event$errors, causes = getCauseStack(error).slice(1), normalisedCauses = _$
|
|
52647
|
-
var stacktrace2 = _$
|
|
52675
|
+
var _event$errors, causes = getCauseStack(error).slice(1), normalisedCauses = _$map_21(causes, function(cause) {
|
|
52676
|
+
var stacktrace2 = _$iserror_25(cause) && _$hasStack_24(cause) ? _$errorStackParser_15.parse(cause) : [], _normaliseError2 = normaliseError(cause, !0, "error cause"), error2 = _normaliseError2[0];
|
|
52648
52677
|
return error2.name === "InvalidError" && event.addMetadata("error cause", makeSerialisable(cause)), createBugsnagError(error2.name, error2.message, Event2.__type, stacktrace2);
|
|
52649
52678
|
});
|
|
52650
52679
|
(_event$errors = event.errors).push.apply(_event$errors, normalisedCauses);
|
|
@@ -52661,7 +52690,7 @@ var require_bugsnag = __commonJS({
|
|
|
52661
52690
|
return err2.name = "InvalidError", err2;
|
|
52662
52691
|
};
|
|
52663
52692
|
if (!tolerateNonErrors)
|
|
52664
|
-
_$
|
|
52693
|
+
_$iserror_25(maybeError) ? error = maybeError : (error = createAndLogInputError(typeof maybeError), internalFrames += 2);
|
|
52665
52694
|
else
|
|
52666
52695
|
switch (typeof maybeError) {
|
|
52667
52696
|
case "string":
|
|
@@ -52673,23 +52702,23 @@ var require_bugsnag = __commonJS({
|
|
|
52673
52702
|
error = createAndLogInputError("function"), internalFrames += 2;
|
|
52674
52703
|
break;
|
|
52675
52704
|
case "object":
|
|
52676
|
-
maybeError !== null && _$
|
|
52705
|
+
maybeError !== null && _$iserror_25(maybeError) ? error = maybeError : maybeError !== null && hasNecessaryFields(maybeError) ? (error = new Error(maybeError.message || maybeError.errorMessage), error.name = maybeError.name || maybeError.errorClass, internalFrames += 1) : (error = createAndLogInputError(maybeError === null ? "null" : "unsupported object"), internalFrames += 2);
|
|
52677
52706
|
break;
|
|
52678
52707
|
default:
|
|
52679
52708
|
error = createAndLogInputError("nothing"), internalFrames += 2;
|
|
52680
52709
|
}
|
|
52681
|
-
if (!_$
|
|
52710
|
+
if (!_$hasStack_24(error))
|
|
52682
52711
|
try {
|
|
52683
52712
|
throw error;
|
|
52684
52713
|
} catch (e) {
|
|
52685
|
-
_$
|
|
52714
|
+
_$hasStack_24(e) && (error = e, internalFrames = 1);
|
|
52686
52715
|
}
|
|
52687
52716
|
return [error, internalFrames];
|
|
52688
52717
|
};
|
|
52689
52718
|
Event2.__type = "browserjs";
|
|
52690
52719
|
var hasNecessaryFields = function(error) {
|
|
52691
52720
|
return (typeof error.name == "string" || typeof error.errorClass == "string") && (typeof error.message == "string" || typeof error.errorMessage == "string");
|
|
52692
|
-
}, _$
|
|
52721
|
+
}, _$Event_10 = Event2, _$asyncEvery_11 = function(arr, fn, cb) {
|
|
52693
52722
|
var index = 0, next = function() {
|
|
52694
52723
|
if (index >= arr.length)
|
|
52695
52724
|
return cb(null, !0);
|
|
@@ -52702,7 +52731,7 @@ var require_bugsnag = __commonJS({
|
|
|
52702
52731
|
});
|
|
52703
52732
|
};
|
|
52704
52733
|
next();
|
|
52705
|
-
}, _$
|
|
52734
|
+
}, _$callbackRunner_13 = function(callbacks, event, onCallbackError, cb) {
|
|
52706
52735
|
var runMaybeAsyncCallback = function(fn, cb2) {
|
|
52707
52736
|
if (typeof fn != "function")
|
|
52708
52737
|
return cb2(null);
|
|
@@ -52733,8 +52762,8 @@ var require_bugsnag = __commonJS({
|
|
|
52733
52762
|
onCallbackError(e), cb2(null);
|
|
52734
52763
|
}
|
|
52735
52764
|
};
|
|
52736
|
-
_$
|
|
52737
|
-
}, _$
|
|
52765
|
+
_$asyncEvery_11(callbacks, runMaybeAsyncCallback, cb);
|
|
52766
|
+
}, _$syncCallbackRunner_30 = function(callbacks, callbackArg, callbackType, logger) {
|
|
52738
52767
|
for (var ignore = !1, cbs = callbacks.slice(); !ignore && cbs.length; )
|
|
52739
52768
|
try {
|
|
52740
52769
|
ignore = cbs.pop()(callbackArg) === !1;
|
|
@@ -52742,28 +52771,38 @@ var require_bugsnag = __commonJS({
|
|
|
52742
52771
|
logger.error("Error occurred in " + callbackType + " callback, continuing anyway\u2026"), logger.error(e);
|
|
52743
52772
|
}
|
|
52744
52773
|
return ignore;
|
|
52745
|
-
}, _$
|
|
52774
|
+
}, _$pad_4 = function(num, size) {
|
|
52746
52775
|
var s = "000000000" + num;
|
|
52747
52776
|
return s.substr(s.length - size);
|
|
52748
|
-
}, os = __require("os")
|
|
52777
|
+
}, os = __require("os");
|
|
52778
|
+
function getHostname() {
|
|
52779
|
+
try {
|
|
52780
|
+
return os.hostname();
|
|
52781
|
+
} catch {
|
|
52782
|
+
return process.env._CLUSTER_NETWORK_NAME_ || process.env.COMPUTERNAME || "hostname";
|
|
52783
|
+
}
|
|
52784
|
+
}
|
|
52785
|
+
var padding = 2, pid = _$pad_4(process.pid.toString(36), padding), hostname2 = getHostname(), length = hostname2.length, hostId = _$pad_4(hostname2.split("").reduce(function(prev, char) {
|
|
52749
52786
|
return +prev + char.charCodeAt(0);
|
|
52750
|
-
}, +length + 36).toString(36), padding), _$
|
|
52787
|
+
}, +length + 36).toString(36), padding), _$fingerprint_2 = function() {
|
|
52751
52788
|
return pid + hostId;
|
|
52789
|
+
}, _$isCuid_3 = function(value) {
|
|
52790
|
+
return typeof value == "string" && /^c[a-z0-9]{20,32}$/.test(value);
|
|
52752
52791
|
}, c = 0, blockSize = 4, base = 36, discreteValues = Math.pow(base, blockSize);
|
|
52753
52792
|
function randomBlock() {
|
|
52754
|
-
return _$
|
|
52793
|
+
return _$pad_4((Math.random() * discreteValues << 0).toString(base), blockSize);
|
|
52755
52794
|
}
|
|
52756
52795
|
function safeCounter() {
|
|
52757
52796
|
return c = c < discreteValues ? c : 0, c++, c - 1;
|
|
52758
52797
|
}
|
|
52759
52798
|
function cuid() {
|
|
52760
|
-
var letter = "c", timestamp = (/* @__PURE__ */ new Date()).getTime().toString(base), counter = _$
|
|
52799
|
+
var letter = "c", timestamp = (/* @__PURE__ */ new Date()).getTime().toString(base), counter = _$pad_4(safeCounter().toString(base), blockSize), print = _$fingerprint_2(), random = randomBlock() + randomBlock();
|
|
52761
52800
|
return letter + timestamp + counter + print + random;
|
|
52762
52801
|
}
|
|
52763
|
-
cuid.fingerprint = _$
|
|
52764
|
-
var _$
|
|
52802
|
+
cuid.fingerprint = _$fingerprint_2, cuid.isCuid = _$isCuid_3;
|
|
52803
|
+
var _$cuid_1 = cuid, Session2 = /* @__PURE__ */ function() {
|
|
52765
52804
|
function Session3() {
|
|
52766
|
-
this.id = _$
|
|
52805
|
+
this.id = _$cuid_1(), this.startedAt = /* @__PURE__ */ new Date(), this._handled = 0, this._unhandled = 0, this._user = {}, this.app = {}, this.device = {};
|
|
52767
52806
|
}
|
|
52768
52807
|
var _proto = Session3.prototype;
|
|
52769
52808
|
return _proto.getUser = function() {
|
|
@@ -52786,11 +52825,11 @@ var require_bugsnag = __commonJS({
|
|
|
52786
52825
|
}, _proto._track = function(event) {
|
|
52787
52826
|
this[event._handledState.unhandled ? "_unhandled" : "_handled"] += 1;
|
|
52788
52827
|
}, Session3;
|
|
52789
|
-
}(), _$
|
|
52828
|
+
}(), _$Session_34 = Session2, __add_8 = _$featureFlagDelegate_23.add, __clear_8 = _$featureFlagDelegate_23.clear, __merge_8 = _$featureFlagDelegate_23.merge, noop = function() {
|
|
52790
52829
|
}, Client = /* @__PURE__ */ function() {
|
|
52791
52830
|
function Client2(configuration, schema2, internalPlugins2, notifier) {
|
|
52792
52831
|
var _this = this;
|
|
52793
|
-
schema2 === void 0 && (schema2 = _$
|
|
52832
|
+
schema2 === void 0 && (schema2 = _$config_9.schema), internalPlugins2 === void 0 && (internalPlugins2 = []), this._notifier = notifier, this._config = {}, this._schema = schema2, this._delivery = {
|
|
52794
52833
|
sendSession: noop,
|
|
52795
52834
|
sendEvent: noop
|
|
52796
52835
|
}, this._logger = {
|
|
@@ -52803,7 +52842,7 @@ var require_bugsnag = __commonJS({
|
|
|
52803
52842
|
s: [],
|
|
52804
52843
|
sp: [],
|
|
52805
52844
|
b: []
|
|
52806
|
-
}, this.Client = Client2, this.Event = _$
|
|
52845
|
+
}, this.Client = Client2, this.Event = _$Event_10, this.Breadcrumb = _$Breadcrumb_7, this.Session = _$Session_34, this._config = this._configure(configuration, internalPlugins2), _$map_21(internalPlugins2.concat(this._config.plugins), function(pl) {
|
|
52807
52846
|
pl && _this._loadPlugin(pl);
|
|
52808
52847
|
}), this._depth = 1;
|
|
52809
52848
|
var self2 = this, notify = this.notify;
|
|
@@ -52813,17 +52852,17 @@ var require_bugsnag = __commonJS({
|
|
|
52813
52852
|
}
|
|
52814
52853
|
var _proto = Client2.prototype;
|
|
52815
52854
|
return _proto.addMetadata = function(section, keyOrObj, maybeVal) {
|
|
52816
|
-
return _$
|
|
52855
|
+
return _$metadataDelegate_27.add(this._metadata, section, keyOrObj, maybeVal);
|
|
52817
52856
|
}, _proto.getMetadata = function(section, key) {
|
|
52818
|
-
return _$
|
|
52857
|
+
return _$metadataDelegate_27.get(this._metadata, section, key);
|
|
52819
52858
|
}, _proto.clearMetadata = function(section, key) {
|
|
52820
|
-
return _$
|
|
52859
|
+
return _$metadataDelegate_27.clear(this._metadata, section, key);
|
|
52821
52860
|
}, _proto.addFeatureFlag = function(name2, variant) {
|
|
52822
|
-
variant === void 0 && (variant = null),
|
|
52861
|
+
variant === void 0 && (variant = null), __add_8(this._features, this._featuresIndex, name2, variant);
|
|
52823
52862
|
}, _proto.addFeatureFlags = function(featureFlags) {
|
|
52824
|
-
|
|
52863
|
+
__merge_8(this._features, featureFlags, this._featuresIndex);
|
|
52825
52864
|
}, _proto.clearFeatureFlag = function(name2) {
|
|
52826
|
-
|
|
52865
|
+
__clear_8(this._features, this._featuresIndex, name2);
|
|
52827
52866
|
}, _proto.clearFeatureFlags = function() {
|
|
52828
52867
|
this._features = [], this._featuresIndex = {};
|
|
52829
52868
|
}, _proto.getContext = function() {
|
|
@@ -52831,13 +52870,13 @@ var require_bugsnag = __commonJS({
|
|
|
52831
52870
|
}, _proto.setContext = function(c2) {
|
|
52832
52871
|
this._context = c2;
|
|
52833
52872
|
}, _proto._configure = function(opts, internalPlugins2) {
|
|
52834
|
-
var schema2 = _$
|
|
52835
|
-
return plugin && plugin.configSchema ? _$
|
|
52836
|
-
}, this._schema), _reduce = _$
|
|
52873
|
+
var schema2 = _$reduce_22(internalPlugins2, function(schema3, plugin) {
|
|
52874
|
+
return plugin && plugin.configSchema ? _$assign_16({}, schema3, plugin.configSchema) : schema3;
|
|
52875
|
+
}, this._schema), _reduce = _$reduce_22(_$keys_20(schema2), function(accum, key) {
|
|
52837
52876
|
var defaultValue = schema2[key].defaultValue(opts[key]);
|
|
52838
52877
|
if (opts[key] !== void 0) {
|
|
52839
52878
|
var valid2 = schema2[key].validate(opts[key]);
|
|
52840
|
-
valid2 ? schema2[key].allowPartialObject ? accum.config[key] = _$
|
|
52879
|
+
valid2 ? schema2[key].allowPartialObject ? accum.config[key] = _$assign_16(defaultValue, opts[key]) : accum.config[key] = opts[key] : (accum.errors[key] = schema2[key].message, accum.config[key] = defaultValue);
|
|
52841
52880
|
} else
|
|
52842
52881
|
accum.config[key] = defaultValue;
|
|
52843
52882
|
return accum;
|
|
@@ -52850,7 +52889,7 @@ var require_bugsnag = __commonJS({
|
|
|
52850
52889
|
throw new Error("No Bugsnag API Key set");
|
|
52851
52890
|
/^[0-9a-f]{32}$/i.test(config2.apiKey) || (errors2.apiKey = "should be a string of 32 hexadecimal characters");
|
|
52852
52891
|
}
|
|
52853
|
-
return this._metadata = _$
|
|
52892
|
+
return this._metadata = _$assign_16({}, config2.metadata), __merge_8(this._features, config2.featureFlags, this._featuresIndex), this._user = _$assign_16({}, config2.user), this._context = config2.context, config2.logger && (this._logger = config2.logger), config2.onError && (this._cbs.e = this._cbs.e.concat(config2.onError)), config2.onBreadcrumb && (this._cbs.b = this._cbs.b.concat(config2.onBreadcrumb)), config2.onSession && (this._cbs.s = this._cbs.s.concat(config2.onSession)), _$keys_20(errors2).length && this._logger.warn(generateConfigErrorMessage(errors2, opts)), config2;
|
|
52854
52893
|
}, _proto.getUser = function() {
|
|
52855
52894
|
return this._user;
|
|
52856
52895
|
}, _proto.setUser = function(id, email, name2) {
|
|
@@ -52861,20 +52900,20 @@ var require_bugsnag = __commonJS({
|
|
|
52861
52900
|
};
|
|
52862
52901
|
}, _proto._loadPlugin = function(plugin) {
|
|
52863
52902
|
var result = plugin.load(this);
|
|
52864
|
-
|
|
52903
|
+
plugin.name && (this._plugins["~" + plugin.name + "~"] = result);
|
|
52865
52904
|
}, _proto.getPlugin = function(name2) {
|
|
52866
52905
|
return this._plugins["~" + name2 + "~"];
|
|
52867
52906
|
}, _proto._setDelivery = function(d) {
|
|
52868
52907
|
this._delivery = d(this);
|
|
52869
52908
|
}, _proto.startSession = function() {
|
|
52870
|
-
var session = new _$
|
|
52871
|
-
session.app.releaseStage = this._config.releaseStage, session.app.version = this._config.appVersion, session.app.type = this._config.appType, session._user = _$
|
|
52872
|
-
var ignore = _$
|
|
52909
|
+
var session = new _$Session_34();
|
|
52910
|
+
session.app.releaseStage = this._config.releaseStage, session.app.version = this._config.appVersion, session.app.type = this._config.appType, session._user = _$assign_16({}, this._user);
|
|
52911
|
+
var ignore = _$syncCallbackRunner_30(this._cbs.s, session, "onSession", this._logger);
|
|
52873
52912
|
return ignore ? (this._logger.debug("Session not started due to onSession callback"), this) : this._sessionDelegate.startSession(this, session);
|
|
52874
52913
|
}, _proto.addOnError = function(fn, front) {
|
|
52875
52914
|
front === void 0 && (front = !1), this._cbs.e[front ? "unshift" : "push"](fn);
|
|
52876
52915
|
}, _proto.removeOnError = function(fn) {
|
|
52877
|
-
this._cbs.e = _$
|
|
52916
|
+
this._cbs.e = _$filter_17(this._cbs.e, function(f) {
|
|
52878
52917
|
return f !== fn;
|
|
52879
52918
|
});
|
|
52880
52919
|
}, _proto._addOnSessionPayload = function(fn) {
|
|
@@ -52882,13 +52921,13 @@ var require_bugsnag = __commonJS({
|
|
|
52882
52921
|
}, _proto.addOnSession = function(fn) {
|
|
52883
52922
|
this._cbs.s.push(fn);
|
|
52884
52923
|
}, _proto.removeOnSession = function(fn) {
|
|
52885
|
-
this._cbs.s = _$
|
|
52924
|
+
this._cbs.s = _$filter_17(this._cbs.s, function(f) {
|
|
52886
52925
|
return f !== fn;
|
|
52887
52926
|
});
|
|
52888
52927
|
}, _proto.addOnBreadcrumb = function(fn, front) {
|
|
52889
52928
|
front === void 0 && (front = !1), this._cbs.b[front ? "unshift" : "push"](fn);
|
|
52890
52929
|
}, _proto.removeOnBreadcrumb = function(fn) {
|
|
52891
|
-
this._cbs.b = _$
|
|
52930
|
+
this._cbs.b = _$filter_17(this._cbs.b, function(f) {
|
|
52892
52931
|
return f !== fn;
|
|
52893
52932
|
});
|
|
52894
52933
|
}, _proto.pauseSession = function() {
|
|
@@ -52896,8 +52935,8 @@ var require_bugsnag = __commonJS({
|
|
|
52896
52935
|
}, _proto.resumeSession = function() {
|
|
52897
52936
|
return this._sessionDelegate.resumeSession(this);
|
|
52898
52937
|
}, _proto.leaveBreadcrumb = function(message, metadata2, type) {
|
|
52899
|
-
if (message = typeof message == "string" ? message : "", type = typeof type == "string" && _$
|
|
52900
|
-
var crumb = new _$
|
|
52938
|
+
if (message = typeof message == "string" ? message : "", type = typeof type == "string" && _$includes_18(_$breadcrumbTypes_12, type) ? type : "manual", metadata2 = typeof metadata2 == "object" && metadata2 !== null ? metadata2 : {}, !!message) {
|
|
52939
|
+
var crumb = new _$Breadcrumb_7(message, metadata2, type), ignore = _$syncCallbackRunner_30(this._cbs.b, crumb, "onBreadcrumb", this._logger);
|
|
52901
52940
|
if (ignore) {
|
|
52902
52941
|
this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");
|
|
52903
52942
|
return;
|
|
@@ -52906,23 +52945,23 @@ var require_bugsnag = __commonJS({
|
|
|
52906
52945
|
}
|
|
52907
52946
|
}, _proto._isBreadcrumbTypeEnabled = function(type) {
|
|
52908
52947
|
var types = this._config.enabledBreadcrumbTypes;
|
|
52909
|
-
return types === null || _$
|
|
52948
|
+
return types === null || _$includes_18(types, type);
|
|
52910
52949
|
}, _proto.notify = function(maybeError, onError, postReportCallback) {
|
|
52911
52950
|
postReportCallback === void 0 && (postReportCallback = noop);
|
|
52912
|
-
var event = _$
|
|
52951
|
+
var event = _$Event_10.create(maybeError, !0, void 0, "notify()", this._depth + 1, this._logger);
|
|
52913
52952
|
this._notify(event, onError, postReportCallback);
|
|
52914
52953
|
}, _proto._notify = function(event, onError, postReportCallback) {
|
|
52915
52954
|
var _this2 = this;
|
|
52916
|
-
if (postReportCallback === void 0 && (postReportCallback = noop), event.app = _$
|
|
52955
|
+
if (postReportCallback === void 0 && (postReportCallback = noop), event.app = _$assign_16({}, event.app, {
|
|
52917
52956
|
releaseStage: this._config.releaseStage,
|
|
52918
52957
|
version: this._config.appVersion,
|
|
52919
52958
|
type: this._config.appType
|
|
52920
|
-
}), event.context = event.context || this._context, event._metadata = _$
|
|
52959
|
+
}), event.context = event.context || this._context, event._metadata = _$assign_16({}, event._metadata, this._metadata), event._user = _$assign_16({}, event._user, this._user), event.breadcrumbs = this._breadcrumbs.slice(), __merge_8(event._features, this._features, event._featuresIndex), this._config.enabledReleaseStages !== null && !_$includes_18(this._config.enabledReleaseStages, this._config.releaseStage))
|
|
52921
52960
|
return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"), postReportCallback(null, event);
|
|
52922
52961
|
var originalSeverity = event.severity, onCallbackError = function(err2) {
|
|
52923
52962
|
_this2._logger.error("Error occurred in onError callback, continuing anyway\u2026"), _this2._logger.error(err2);
|
|
52924
52963
|
}, callbacks = [].concat(this._cbs.e).concat(onError);
|
|
52925
|
-
_$
|
|
52964
|
+
_$callbackRunner_13(callbacks, event, onCallbackError, function(err2, shouldSend) {
|
|
52926
52965
|
if (err2 && onCallbackError(err2), !shouldSend)
|
|
52927
52966
|
return _this2._logger.debug("Event not sent due to onError callback"), postReportCallback(null, event);
|
|
52928
52967
|
_this2._isBreadcrumbTypeEnabled("error") && Client2.prototype.leaveBreadcrumb.call(_this2, event.errors[0].errorClass, {
|
|
@@ -52942,7 +52981,7 @@ var require_bugsnag = __commonJS({
|
|
|
52942
52981
|
}, Client2;
|
|
52943
52982
|
}(), generateConfigErrorMessage = function(errors2, rawInput) {
|
|
52944
52983
|
var er = new Error(`Invalid configuration
|
|
52945
|
-
` + _$
|
|
52984
|
+
` + _$map_21(_$keys_20(errors2), function(key) {
|
|
52946
52985
|
return " - " + key + " " + errors2[key] + ", got " + stringify(rawInput[key]);
|
|
52947
52986
|
}).join(`
|
|
52948
52987
|
|
|
@@ -52957,9 +52996,9 @@ var require_bugsnag = __commonJS({
|
|
|
52957
52996
|
default:
|
|
52958
52997
|
return String(val);
|
|
52959
52998
|
}
|
|
52960
|
-
}, _$
|
|
52961
|
-
_$
|
|
52962
|
-
var payload = _$
|
|
52999
|
+
}, _$Client_8 = Client, _$jsonPayload_26 = {}, EVENT_REDACTION_PATHS = ["events.[].metaData", "events.[].breadcrumbs.[].metaData", "events.[].request"];
|
|
53000
|
+
_$jsonPayload_26.event = function(event, redactedKeys) {
|
|
53001
|
+
var payload = _$safeJsonStringify_5(event, null, null, {
|
|
52963
53002
|
redactedPaths: EVENT_REDACTION_PATHS,
|
|
52964
53003
|
redactedKeys
|
|
52965
53004
|
});
|
|
@@ -52967,15 +53006,15 @@ var require_bugsnag = __commonJS({
|
|
|
52967
53006
|
notifier: `WARNING!
|
|
52968
53007
|
Serialized payload was ` + payload.length / 1e6 + `MB (limit = 1MB)
|
|
52969
53008
|
metadata was removed`
|
|
52970
|
-
}, payload = _$
|
|
53009
|
+
}, payload = _$safeJsonStringify_5(event, null, null, {
|
|
52971
53010
|
redactedPaths: EVENT_REDACTION_PATHS,
|
|
52972
53011
|
redactedKeys
|
|
52973
53012
|
})), payload;
|
|
52974
|
-
}, _$
|
|
52975
|
-
var payload = _$
|
|
53013
|
+
}, _$jsonPayload_26.session = function(session, redactedKeys) {
|
|
53014
|
+
var payload = _$safeJsonStringify_5(session, null, null);
|
|
52976
53015
|
return payload;
|
|
52977
53016
|
};
|
|
52978
|
-
var http3 = __require("http"), https = __require("https"),
|
|
53017
|
+
var http3 = __require("http"), https = __require("https"), ___require_36 = __require("url"), parse5 = ___require_36.parse, _$request_36 = function(_ref, cb) {
|
|
52979
53018
|
var url2 = _ref.url, headers = _ref.headers, body = _ref.body, agent = _ref.agent, didError = !1, onError = function(err2) {
|
|
52980
53019
|
didError || (didError = !0, cb(err2));
|
|
52981
53020
|
}, parsedUrl = parse5(url2), secure = parsedUrl.protocol === "https:", transport = secure ? https : http3, req = transport.request({
|
|
@@ -53003,17 +53042,21 @@ metadata was removed`
|
|
|
53003
53042
|
}), stream2.on("end", function() {
|
|
53004
53043
|
return cb(null, data);
|
|
53005
53044
|
});
|
|
53006
|
-
}, _$
|
|
53045
|
+
}, _$delivery_35 = function(client) {
|
|
53007
53046
|
return {
|
|
53008
53047
|
sendEvent: function(event, cb) {
|
|
53009
53048
|
cb === void 0 && (cb = function() {
|
|
53010
53049
|
});
|
|
53011
|
-
var body = _$
|
|
53012
|
-
|
|
53013
|
-
` + (
|
|
53050
|
+
var body = _$jsonPayload_26.event(event, client._config.redactedKeys), _cb = function(err3) {
|
|
53051
|
+
err3 && client._logger.error(`Event failed to send\u2026
|
|
53052
|
+
` + (err3 && err3.stack ? err3.stack : err3), err3), body.length > 1e6 && client._logger.warn("Event oversized (" + (body.length / 1e6).toFixed(2) + " MB)"), cb(err3);
|
|
53014
53053
|
};
|
|
53054
|
+
if (client._config.endpoints.notify === null) {
|
|
53055
|
+
var err2 = new Error("Event not sent due to incomplete endpoint configuration");
|
|
53056
|
+
return _cb(err2);
|
|
53057
|
+
}
|
|
53015
53058
|
try {
|
|
53016
|
-
_$
|
|
53059
|
+
_$request_36({
|
|
53017
53060
|
url: client._config.endpoints.notify,
|
|
53018
53061
|
headers: {
|
|
53019
53062
|
"Content-Type": "application/json",
|
|
@@ -53023,8 +53066,8 @@ metadata was removed`
|
|
|
53023
53066
|
},
|
|
53024
53067
|
body,
|
|
53025
53068
|
agent: client._config.agent
|
|
53026
|
-
}, function(
|
|
53027
|
-
return _cb(
|
|
53069
|
+
}, function(err3, body2) {
|
|
53070
|
+
return _cb(err3);
|
|
53028
53071
|
});
|
|
53029
53072
|
} catch (e) {
|
|
53030
53073
|
_cb(e);
|
|
@@ -53033,12 +53076,16 @@ metadata was removed`
|
|
|
53033
53076
|
sendSession: function(session, cb) {
|
|
53034
53077
|
cb === void 0 && (cb = function() {
|
|
53035
53078
|
});
|
|
53036
|
-
var _cb = function(
|
|
53037
|
-
|
|
53038
|
-
` + (
|
|
53079
|
+
var _cb = function(err3) {
|
|
53080
|
+
err3 && client._logger.error(`Session failed to send\u2026
|
|
53081
|
+
` + (err3 && err3.stack ? err3.stack : err3), err3), cb(err3);
|
|
53039
53082
|
};
|
|
53083
|
+
if (client._config.endpoints.session === null) {
|
|
53084
|
+
var err2 = new Error("Session not sent due to incomplete endpoint configuration");
|
|
53085
|
+
return _cb(err2);
|
|
53086
|
+
}
|
|
53040
53087
|
try {
|
|
53041
|
-
_$
|
|
53088
|
+
_$request_36({
|
|
53042
53089
|
url: client._config.endpoints.sessions,
|
|
53043
53090
|
headers: {
|
|
53044
53091
|
"Content-Type": "application/json",
|
|
@@ -53046,10 +53093,10 @@ metadata was removed`
|
|
|
53046
53093
|
"Bugsnag-Payload-Version": "1",
|
|
53047
53094
|
"Bugsnag-Sent-At": (/* @__PURE__ */ new Date()).toISOString()
|
|
53048
53095
|
},
|
|
53049
|
-
body: _$
|
|
53096
|
+
body: _$jsonPayload_26.session(session, client._config.redactedKeys),
|
|
53050
53097
|
agent: client._config.agent
|
|
53051
|
-
}, function(
|
|
53052
|
-
return _cb(
|
|
53098
|
+
}, function(err3) {
|
|
53099
|
+
return _cb(err3);
|
|
53053
53100
|
});
|
|
53054
53101
|
} catch (e) {
|
|
53055
53102
|
_cb(e);
|
|
@@ -53057,18 +53104,18 @@ metadata was removed`
|
|
|
53057
53104
|
}
|
|
53058
53105
|
};
|
|
53059
53106
|
};
|
|
53060
|
-
function
|
|
53061
|
-
return
|
|
53107
|
+
function ___extends_37() {
|
|
53108
|
+
return ___extends_37 = Object.assign ? Object.assign.bind() : function(target) {
|
|
53062
53109
|
for (var i = 1; i < arguments.length; i++) {
|
|
53063
53110
|
var source = arguments[i];
|
|
53064
53111
|
for (var key in source)
|
|
53065
53112
|
Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
|
|
53066
53113
|
}
|
|
53067
53114
|
return target;
|
|
53068
|
-
},
|
|
53115
|
+
}, ___extends_37.apply(this, arguments);
|
|
53069
53116
|
}
|
|
53070
|
-
var schema = _$
|
|
53071
|
-
appType:
|
|
53117
|
+
var schema = _$config_9.schema, __os_37 = __require("os"), _require2 = __require("util"), inspect = _require2.inspect, _$config_37 = {
|
|
53118
|
+
appType: ___extends_37({}, schema.appType, {
|
|
53072
53119
|
defaultValue: function() {
|
|
53073
53120
|
return "node";
|
|
53074
53121
|
}
|
|
@@ -53078,25 +53125,25 @@ metadata was removed`
|
|
|
53078
53125
|
return process.cwd();
|
|
53079
53126
|
},
|
|
53080
53127
|
validate: function(value) {
|
|
53081
|
-
return value === null || _$
|
|
53128
|
+
return value === null || _$stringWithLength_33(value);
|
|
53082
53129
|
},
|
|
53083
53130
|
message: "should be string"
|
|
53084
53131
|
},
|
|
53085
53132
|
hostname: {
|
|
53086
53133
|
defaultValue: function() {
|
|
53087
|
-
return
|
|
53134
|
+
return __os_37.hostname();
|
|
53088
53135
|
},
|
|
53089
53136
|
message: "should be a string",
|
|
53090
53137
|
validate: function(value) {
|
|
53091
|
-
return value === null || _$
|
|
53138
|
+
return value === null || _$stringWithLength_33(value);
|
|
53092
53139
|
}
|
|
53093
53140
|
},
|
|
53094
|
-
logger:
|
|
53141
|
+
logger: ___extends_37({}, schema.logger, {
|
|
53095
53142
|
defaultValue: function() {
|
|
53096
53143
|
return getPrefixedConsole();
|
|
53097
53144
|
}
|
|
53098
53145
|
}),
|
|
53099
|
-
releaseStage:
|
|
53146
|
+
releaseStage: ___extends_37({}, schema.releaseStage, {
|
|
53100
53147
|
defaultValue: function() {
|
|
53101
53148
|
return process.env.NODE_ENV || "production";
|
|
53102
53149
|
}
|
|
@@ -53146,7 +53193,7 @@ metadata was removed`
|
|
|
53146
53193
|
return typeof value == "object" && value !== null || typeof value == "boolean";
|
|
53147
53194
|
}, appStart = /* @__PURE__ */ new Date(), reset = function() {
|
|
53148
53195
|
appStart = /* @__PURE__ */ new Date();
|
|
53149
|
-
}, _$
|
|
53196
|
+
}, _$app_39 = {
|
|
53150
53197
|
name: "appDuration",
|
|
53151
53198
|
load: function(client) {
|
|
53152
53199
|
return client.addOnError(function(event) {
|
|
@@ -53156,54 +53203,88 @@ metadata was removed`
|
|
|
53156
53203
|
reset
|
|
53157
53204
|
};
|
|
53158
53205
|
}
|
|
53159
|
-
}, _$
|
|
53160
|
-
_$
|
|
53206
|
+
}, _$consoleBreadcrumbs_40 = {};
|
|
53207
|
+
_$consoleBreadcrumbs_40.load = function(client) {
|
|
53208
|
+
var isDev = /^(local-)?dev(elopment)?$/.test(client._config.releaseStage);
|
|
53209
|
+
isDev || !client._isBreadcrumbTypeEnabled("log") || _$map_21(CONSOLE_LOG_METHODS, function(method) {
|
|
53210
|
+
var original = console[method];
|
|
53211
|
+
console[method] = function() {
|
|
53212
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
|
|
53213
|
+
args[_key] = arguments[_key];
|
|
53214
|
+
client.leaveBreadcrumb("Console output", _$reduce_22(args, function(accum, arg, i) {
|
|
53215
|
+
var stringified = "[Unknown value]";
|
|
53216
|
+
try {
|
|
53217
|
+
stringified = String(arg);
|
|
53218
|
+
} catch {
|
|
53219
|
+
}
|
|
53220
|
+
if (stringified === "[object Object]")
|
|
53221
|
+
try {
|
|
53222
|
+
stringified = JSON.stringify(arg);
|
|
53223
|
+
} catch {
|
|
53224
|
+
}
|
|
53225
|
+
return accum["[" + i + "]"] = stringified, accum;
|
|
53226
|
+
}, {
|
|
53227
|
+
severity: method.indexOf("group") === 0 ? "log" : method
|
|
53228
|
+
}), "log"), original.apply(console, args);
|
|
53229
|
+
}, console[method]._restore = function() {
|
|
53230
|
+
console[method] = original;
|
|
53231
|
+
};
|
|
53232
|
+
});
|
|
53233
|
+
}, process.env.NODE_ENV !== "production" && (_$consoleBreadcrumbs_40.destroy = function() {
|
|
53234
|
+
return CONSOLE_LOG_METHODS.forEach(function(method) {
|
|
53235
|
+
typeof console[method]._restore == "function" && console[method]._restore();
|
|
53236
|
+
});
|
|
53237
|
+
});
|
|
53238
|
+
var CONSOLE_LOG_METHODS = _$filter_17(["log", "debug", "info", "warn", "error"], function(method) {
|
|
53239
|
+
return typeof console < "u" && typeof console[method] == "function";
|
|
53240
|
+
}), _$cloneClient_14 = {}, onCloneCallbacks = [];
|
|
53241
|
+
_$cloneClient_14 = function(client) {
|
|
53242
|
+
var clone = new client.Client({}, {}, [], client._notifier);
|
|
53243
|
+
return clone._config = client._config, clone._breadcrumbs = client._breadcrumbs.slice(), clone._metadata = _$assign_16({}, client._metadata), clone._features = [].concat(client._features), clone._featuresIndex = _$assign_16({}, client._featuresIndex), clone._user = _$assign_16({}, client._user), clone._context = client._context, clone._cbs = {
|
|
53244
|
+
e: client._cbs.e.slice(),
|
|
53245
|
+
s: client._cbs.s.slice(),
|
|
53246
|
+
sp: client._cbs.sp.slice(),
|
|
53247
|
+
b: client._cbs.b.slice()
|
|
53248
|
+
}, clone._logger = client._logger, clone._delivery = client._delivery, clone._sessionDelegate = client._sessionDelegate, onCloneCallbacks.forEach(function(callback) {
|
|
53249
|
+
callback(clone);
|
|
53250
|
+
}), clone;
|
|
53251
|
+
}, _$cloneClient_14.registerCallback = function(callback) {
|
|
53252
|
+
onCloneCallbacks.push(callback);
|
|
53253
|
+
};
|
|
53254
|
+
var _$nodeFallbackStack_28 = {};
|
|
53255
|
+
_$nodeFallbackStack_28.getStack = function() {
|
|
53161
53256
|
return new Error().stack.split(`
|
|
53162
53257
|
`).slice(3).join(`
|
|
53163
53258
|
`);
|
|
53164
|
-
}, _$
|
|
53259
|
+
}, _$nodeFallbackStack_28.maybeUseFallbackStack = function(err2, fallbackStack) {
|
|
53165
53260
|
var lines = err2.stack.split(`
|
|
53166
53261
|
`);
|
|
53167
53262
|
return (lines.length === 1 || lines.length === 2 && /at Error \(native\)/.test(lines[1])) && (err2.stack = lines[0] + `
|
|
53168
53263
|
` + fallbackStack), err2;
|
|
53169
53264
|
};
|
|
53170
|
-
var _$
|
|
53171
|
-
_$
|
|
53265
|
+
var _$contextualize_41 = {}, getStack = _$nodeFallbackStack_28.getStack;
|
|
53266
|
+
_$contextualize_41 = {
|
|
53172
53267
|
name: "contextualize",
|
|
53173
53268
|
load: function(client) {
|
|
53174
53269
|
var contextualize = function(fn, onError) {
|
|
53175
|
-
var fallbackStack = getStack(),
|
|
53176
|
-
|
|
53177
|
-
err2.stack && maybeUseFallbackStack(err2, fallbackStack);
|
|
53178
|
-
var event = client.Event.create(err2, !0, {
|
|
53179
|
-
severity: "error",
|
|
53180
|
-
unhandled: !0,
|
|
53181
|
-
severityReason: {
|
|
53182
|
-
type: "unhandledException"
|
|
53183
|
-
}
|
|
53184
|
-
}, "contextualize()", 1);
|
|
53185
|
-
client._notify(event, onError, function(e, event2) {
|
|
53186
|
-
e && client._logger.error("Failed to send event to Bugsnag"), client._config.onUncaughtException(err2, event2, client._logger);
|
|
53187
|
-
});
|
|
53188
|
-
}), process.nextTick(function() {
|
|
53189
|
-
return dom.run(fn);
|
|
53190
|
-
});
|
|
53270
|
+
var fallbackStack = getStack(), clonedClient = _$cloneClient_14(client);
|
|
53271
|
+
clonedClient.fallbackStack = fallbackStack, clonedClient.addOnError(onError), client._clientContext.run(clonedClient, fn);
|
|
53191
53272
|
};
|
|
53192
53273
|
return contextualize;
|
|
53193
53274
|
}
|
|
53194
|
-
}, _$
|
|
53195
|
-
var _$
|
|
53196
|
-
_$
|
|
53275
|
+
}, _$contextualize_41.default = _$contextualize_41;
|
|
53276
|
+
var _$intercept_42 = {}, __getStack_42 = _$nodeFallbackStack_28.getStack, maybeUseFallbackStack = _$nodeFallbackStack_28.maybeUseFallbackStack;
|
|
53277
|
+
_$intercept_42 = {
|
|
53197
53278
|
name: "intercept",
|
|
53198
53279
|
load: function(client) {
|
|
53199
53280
|
var intercept = function(onError, cb) {
|
|
53200
53281
|
onError === void 0 && (onError = function() {
|
|
53201
53282
|
}), typeof cb != "function" && (cb = onError, onError = function() {
|
|
53202
53283
|
});
|
|
53203
|
-
var fallbackStack =
|
|
53284
|
+
var fallbackStack = __getStack_42();
|
|
53204
53285
|
return function(err2) {
|
|
53205
53286
|
if (err2) {
|
|
53206
|
-
err2.stack &&
|
|
53287
|
+
err2.stack && maybeUseFallbackStack(err2, fallbackStack);
|
|
53207
53288
|
var event = client.Event.create(err2, !0, {
|
|
53208
53289
|
severity: "warning",
|
|
53209
53290
|
unhandled: !1,
|
|
@@ -53221,44 +53302,44 @@ metadata was removed`
|
|
|
53221
53302
|
};
|
|
53222
53303
|
return intercept;
|
|
53223
53304
|
}
|
|
53224
|
-
}, _$
|
|
53225
|
-
function
|
|
53226
|
-
return
|
|
53305
|
+
}, _$intercept_42.default = _$intercept_42;
|
|
53306
|
+
function ___extends_43() {
|
|
53307
|
+
return ___extends_43 = Object.assign ? Object.assign.bind() : function(target) {
|
|
53227
53308
|
for (var i = 1; i < arguments.length; i++) {
|
|
53228
53309
|
var source = arguments[i];
|
|
53229
53310
|
for (var key in source)
|
|
53230
53311
|
Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
|
|
53231
53312
|
}
|
|
53232
53313
|
return target;
|
|
53233
|
-
},
|
|
53314
|
+
}, ___extends_43.apply(this, arguments);
|
|
53234
53315
|
}
|
|
53235
|
-
var
|
|
53316
|
+
var __os_43 = __require("os"), _$device_43 = {
|
|
53236
53317
|
load: function(client) {
|
|
53237
53318
|
var device = {
|
|
53238
|
-
osName:
|
|
53239
|
-
osVersion:
|
|
53240
|
-
totalMemory:
|
|
53319
|
+
osName: __os_43.platform() + " (" + __os_43.arch() + ")",
|
|
53320
|
+
osVersion: __os_43.release(),
|
|
53321
|
+
totalMemory: __os_43.totalmem(),
|
|
53241
53322
|
hostname: client._config.hostname,
|
|
53242
53323
|
runtimeVersions: {
|
|
53243
53324
|
node: process.versions.node
|
|
53244
53325
|
}
|
|
53245
53326
|
};
|
|
53246
53327
|
client._addOnSessionPayload(function(sp) {
|
|
53247
|
-
sp.device =
|
|
53328
|
+
sp.device = ___extends_43({}, sp.device, device);
|
|
53248
53329
|
}), client.addOnError(function(event) {
|
|
53249
|
-
event.device =
|
|
53250
|
-
freeMemory:
|
|
53330
|
+
event.device = ___extends_43({}, event.device, device, {
|
|
53331
|
+
freeMemory: __os_43.freemem(),
|
|
53251
53332
|
time: /* @__PURE__ */ new Date()
|
|
53252
53333
|
});
|
|
53253
53334
|
}, !0);
|
|
53254
53335
|
}
|
|
53255
|
-
},
|
|
53336
|
+
}, ___require_29 = __require("path"), join6 = ___require_29.join, resolve2 = ___require_29.resolve, _$pathNormalizer_29 = function(p) {
|
|
53256
53337
|
return join6(resolve2(p), "/");
|
|
53257
|
-
}, _$
|
|
53338
|
+
}, _$inProject_44 = {
|
|
53258
53339
|
load: function(client) {
|
|
53259
53340
|
return client.addOnError(function(event) {
|
|
53260
53341
|
if (client._config.projectRoot) {
|
|
53261
|
-
var projectRoot = _$
|
|
53342
|
+
var projectRoot = _$pathNormalizer_29(client._config.projectRoot), allFrames = event.errors.reduce(function(accum, er) {
|
|
53262
53343
|
return accum.concat(er.stacktrace);
|
|
53263
53344
|
}, []);
|
|
53264
53345
|
allFrames.map(function(stackframe) {
|
|
@@ -53268,15 +53349,15 @@ metadata was removed`
|
|
|
53268
53349
|
});
|
|
53269
53350
|
}
|
|
53270
53351
|
};
|
|
53271
|
-
function
|
|
53272
|
-
return
|
|
53352
|
+
function ___extends_45() {
|
|
53353
|
+
return ___extends_45 = Object.assign ? Object.assign.bind() : function(target) {
|
|
53273
53354
|
for (var i = 1; i < arguments.length; i++) {
|
|
53274
53355
|
var source = arguments[i];
|
|
53275
53356
|
for (var key in source)
|
|
53276
53357
|
Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
|
|
53277
53358
|
}
|
|
53278
53359
|
return target;
|
|
53279
|
-
},
|
|
53360
|
+
}, ___extends_45.apply(this, arguments);
|
|
53280
53361
|
}
|
|
53281
53362
|
function _inheritsLoose(subClass, superClass) {
|
|
53282
53363
|
subClass.prototype = Object.create(superClass.prototype), subClass.prototype.constructor = subClass, _setPrototypeOf(subClass, superClass);
|
|
@@ -53286,7 +53367,7 @@ metadata was removed`
|
|
|
53286
53367
|
return o2.__proto__ = p2, o2;
|
|
53287
53368
|
}, _setPrototypeOf(o, p);
|
|
53288
53369
|
}
|
|
53289
|
-
var SURROUNDING_LINES = 3, MAX_LINE_LENGTH = 200,
|
|
53370
|
+
var SURROUNDING_LINES = 3, MAX_LINE_LENGTH = 200, ___require_45 = __require("fs"), createReadStream = ___require_45.createReadStream, ___require2_45 = __require("stream"), Writable3 = ___require2_45.Writable, pump = require_pump(), byline = require_byline(), path3 = __require("path"), _$surroundingCode_45 = {
|
|
53290
53371
|
load: function(client) {
|
|
53291
53372
|
if (client._config.sendCode) {
|
|
53292
53373
|
var loadSurroundingCode = function(stackframe, cache2) {
|
|
@@ -53350,7 +53431,7 @@ metadata was removed`
|
|
|
53350
53431
|
_inheritsLoose(CodeRange2, _Writable);
|
|
53351
53432
|
function CodeRange2(opts) {
|
|
53352
53433
|
var _this;
|
|
53353
|
-
return _this = _Writable.call(this,
|
|
53434
|
+
return _this = _Writable.call(this, ___extends_45({}, opts, {
|
|
53354
53435
|
decodeStrings: !1
|
|
53355
53436
|
})) || this, _this._start = opts.start, _this._end = opts.end, _this._n = 0, _this._code = {}, _this;
|
|
53356
53437
|
}
|
|
@@ -53373,61 +53454,51 @@ metadata was removed`
|
|
|
53373
53454
|
resolve3(res.slice(1));
|
|
53374
53455
|
});
|
|
53375
53456
|
});
|
|
53376
|
-
}, _handler, _$
|
|
53457
|
+
}, __maybeUseFallbackStack_46 = _$nodeFallbackStack_28.maybeUseFallbackStack, _handler, _$uncaughtException_46 = {
|
|
53377
53458
|
load: function(client) {
|
|
53378
53459
|
client._config.autoDetectErrors && client._config.enabledErrorTypes.unhandledExceptions && (_handler = function(err2) {
|
|
53379
|
-
var
|
|
53460
|
+
var ctx = client._clientContext && client._clientContext.getStore(), c2 = ctx || client;
|
|
53461
|
+
err2.stack && c2.fallbackStack && __maybeUseFallbackStack_46(err2, c2.fallbackStack);
|
|
53462
|
+
var event = c2.Event.create(err2, !1, {
|
|
53380
53463
|
severity: "error",
|
|
53381
53464
|
unhandled: !0,
|
|
53382
53465
|
severityReason: {
|
|
53383
53466
|
type: "unhandledException"
|
|
53384
53467
|
}
|
|
53385
53468
|
}, "uncaughtException handler", 1);
|
|
53386
|
-
|
|
53387
|
-
|
|
53388
|
-
|
|
53469
|
+
return new Promise(function(resolve3) {
|
|
53470
|
+
c2._notify(event, function() {
|
|
53471
|
+
}, function(e, event2) {
|
|
53472
|
+
e && c2._logger.error("Failed to send event to Bugsnag"), c2._config.onUncaughtException(err2, event2, c2._logger), resolve3();
|
|
53473
|
+
});
|
|
53389
53474
|
});
|
|
53390
|
-
}, process.
|
|
53475
|
+
}, process.prependListener("uncaughtException", _handler));
|
|
53391
53476
|
},
|
|
53392
53477
|
destroy: function() {
|
|
53393
53478
|
process.removeListener("uncaughtException", _handler);
|
|
53394
53479
|
}
|
|
53395
|
-
},
|
|
53480
|
+
}, ___handler_47, _$unhandledRejection_47 = {
|
|
53396
53481
|
load: function(client) {
|
|
53397
|
-
!client._config.autoDetectErrors || !client._config.enabledErrorTypes.unhandledRejections || (
|
|
53398
|
-
var
|
|
53482
|
+
!client._config.autoDetectErrors || !client._config.enabledErrorTypes.unhandledRejections || (___handler_47 = function(err2) {
|
|
53483
|
+
var ctx = client._clientContext && client._clientContext.getStore(), c2 = ctx || client, unhandled = !client._config.reportUnhandledPromiseRejectionsAsHandled, event = c2.Event.create(err2, !1, {
|
|
53399
53484
|
severity: "error",
|
|
53400
|
-
unhandled
|
|
53485
|
+
unhandled,
|
|
53401
53486
|
severityReason: {
|
|
53402
53487
|
type: "unhandledPromiseRejection"
|
|
53403
53488
|
}
|
|
53404
53489
|
}, "unhandledRejection handler", 1);
|
|
53405
53490
|
return new Promise(function(resolve3) {
|
|
53406
|
-
|
|
53491
|
+
c2._notify(event, function() {
|
|
53407
53492
|
}, function(e, event2) {
|
|
53408
|
-
e &&
|
|
53493
|
+
e && c2._logger.error("Failed to send event to Bugsnag"), c2._config.onUnhandledRejection(err2, event2, c2._logger), resolve3();
|
|
53409
53494
|
});
|
|
53410
53495
|
});
|
|
53411
|
-
}, process.prependListener ? process.prependListener("unhandledRejection",
|
|
53496
|
+
}, process.prependListener ? process.prependListener("unhandledRejection", ___handler_47) : process.on("unhandledRejection", ___handler_47));
|
|
53412
53497
|
},
|
|
53413
53498
|
destroy: function() {
|
|
53414
|
-
process.removeListener("unhandledRejection",
|
|
53499
|
+
process.removeListener("unhandledRejection", ___handler_47);
|
|
53415
53500
|
}
|
|
53416
|
-
}, _$
|
|
53417
|
-
_$cloneClient_8 = function(client) {
|
|
53418
|
-
var clone = new client.Client({}, {}, [], client._notifier);
|
|
53419
|
-
return clone._config = client._config, clone._breadcrumbs = client._breadcrumbs.slice(), clone._metadata = _$assign_10({}, client._metadata), clone._features = [].concat(client._features), clone._featuresIndex = _$assign_10({}, client._featuresIndex), clone._user = _$assign_10({}, client._user), clone._context = client._context, clone._cbs = {
|
|
53420
|
-
e: client._cbs.e.slice(),
|
|
53421
|
-
s: client._cbs.s.slice(),
|
|
53422
|
-
sp: client._cbs.sp.slice(),
|
|
53423
|
-
b: client._cbs.b.slice()
|
|
53424
|
-
}, clone._logger = client._logger, clone._delivery = client._delivery, clone._sessionDelegate = client._sessionDelegate, onCloneCallbacks.forEach(function(callback) {
|
|
53425
|
-
callback(clone);
|
|
53426
|
-
}), clone;
|
|
53427
|
-
}, _$cloneClient_8.registerCallback = function(callback) {
|
|
53428
|
-
onCloneCallbacks.push(callback);
|
|
53429
|
-
};
|
|
53430
|
-
var _$Backoff_45 = Backoff;
|
|
53501
|
+
}, _$Backoff_6 = Backoff;
|
|
53431
53502
|
function Backoff(opts) {
|
|
53432
53503
|
opts = opts || {}, this.ms = opts.min || 100, this.max = opts.max || 1e4, this.factor = opts.factor || 2, this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0, this.attempts = 0;
|
|
53433
53504
|
}
|
|
@@ -53446,16 +53517,16 @@ metadata was removed`
|
|
|
53446
53517
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
53447
53518
|
return self2;
|
|
53448
53519
|
}
|
|
53449
|
-
function
|
|
53450
|
-
subClass.prototype = Object.create(superClass.prototype), subClass.prototype.constructor = subClass,
|
|
53520
|
+
function ___inheritsLoose_49(subClass, superClass) {
|
|
53521
|
+
subClass.prototype = Object.create(superClass.prototype), subClass.prototype.constructor = subClass, ___setPrototypeOf_49(subClass, superClass);
|
|
53451
53522
|
}
|
|
53452
|
-
function
|
|
53453
|
-
return
|
|
53523
|
+
function ___setPrototypeOf_49(o, p) {
|
|
53524
|
+
return ___setPrototypeOf_49 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o2, p2) {
|
|
53454
53525
|
return o2.__proto__ = p2, o2;
|
|
53455
|
-
},
|
|
53526
|
+
}, ___setPrototypeOf_49(o, p);
|
|
53456
53527
|
}
|
|
53457
|
-
var DEFAULT_SUMMARY_INTERVAL = 10 * 1e3, Emitter = __require("events").EventEmitter, _$
|
|
53458
|
-
|
|
53528
|
+
var DEFAULT_SUMMARY_INTERVAL = 10 * 1e3, Emitter = __require("events").EventEmitter, _$tracker_49 = /* @__PURE__ */ function(_Emitter) {
|
|
53529
|
+
___inheritsLoose_49(SessionTracker, _Emitter);
|
|
53459
53530
|
function SessionTracker(intervalLength) {
|
|
53460
53531
|
var _this;
|
|
53461
53532
|
return _this = _Emitter.call(this) || this, _this._sessions = /* @__PURE__ */ new Map(), _this._interval = null, _this._intervalLength = intervalLength || DEFAULT_SUMMARY_INTERVAL, _this._summarize = _this._summarize.bind(_assertThisInitialized(_this)), _this;
|
|
@@ -53480,13 +53551,12 @@ metadata was removed`
|
|
|
53480
53551
|
}(Emitter), dateToMsKey = function(d) {
|
|
53481
53552
|
var dk = new Date(d);
|
|
53482
53553
|
return dk.setSeconds(0), dk.setMilliseconds(0), dk.toISOString();
|
|
53483
|
-
}, _$
|
|
53554
|
+
}, _$session_48 = {
|
|
53484
53555
|
load: function(client) {
|
|
53485
|
-
var sessionTracker = new _$
|
|
53556
|
+
var sessionTracker = new _$tracker_49(client._config.sessionSummaryInterval);
|
|
53486
53557
|
sessionTracker.on("summary", sendSessionSummary(client)), sessionTracker.start(), client._sessionDelegate = {
|
|
53487
53558
|
startSession: function(client2, session) {
|
|
53488
|
-
|
|
53489
|
-
return sessionClient._session = session, sessionClient._pausedSession = null, sessionTracker.track(sessionClient._session), sessionClient;
|
|
53559
|
+
return client2._session = session, client2._pausedSession = null, sessionTracker.track(client2._session), client2;
|
|
53490
53560
|
},
|
|
53491
53561
|
pauseSession: function(client2) {
|
|
53492
53562
|
client2._pausedSession = client2._session, client2._session = null;
|
|
@@ -53501,7 +53571,7 @@ metadata was removed`
|
|
|
53501
53571
|
defaultValue: function() {
|
|
53502
53572
|
},
|
|
53503
53573
|
validate: function(value) {
|
|
53504
|
-
return value === void 0 || _$
|
|
53574
|
+
return value === void 0 || _$intRange_31()(value);
|
|
53505
53575
|
},
|
|
53506
53576
|
message: "should be a positive integer"
|
|
53507
53577
|
}
|
|
@@ -53514,7 +53584,7 @@ metadata was removed`
|
|
|
53514
53584
|
}
|
|
53515
53585
|
if (!sessionCounts.length)
|
|
53516
53586
|
return;
|
|
53517
|
-
var backoff = new _$
|
|
53587
|
+
var backoff = new _$Backoff_6({
|
|
53518
53588
|
min: 1e3,
|
|
53519
53589
|
max: 1e4
|
|
53520
53590
|
}), maxAttempts = 10;
|
|
@@ -53544,13 +53614,13 @@ metadata was removed`
|
|
|
53544
53614
|
type: client._config.appType
|
|
53545
53615
|
},
|
|
53546
53616
|
sessionCounts
|
|
53547
|
-
}, ignore = _$
|
|
53617
|
+
}, ignore = _$syncCallbackRunner_30(client._cbs.sp, payload, "onSessionPayload", client._logger);
|
|
53548
53618
|
if (ignore)
|
|
53549
53619
|
return client._logger.debug("Session not sent due to onSessionPayload callback"), cb(null);
|
|
53550
53620
|
client._delivery.sendSession(payload, cb);
|
|
53551
53621
|
}
|
|
53552
53622
|
};
|
|
53553
|
-
}, _$
|
|
53623
|
+
}, _$pathNormaliser_50 = {
|
|
53554
53624
|
load: function(client) {
|
|
53555
53625
|
client.addOnError(function(event) {
|
|
53556
53626
|
var allFrames = event.errors.reduce(function(accum, er) {
|
|
@@ -53561,11 +53631,11 @@ metadata was removed`
|
|
|
53561
53631
|
});
|
|
53562
53632
|
});
|
|
53563
53633
|
}
|
|
53564
|
-
}, _$
|
|
53634
|
+
}, _$stripProjectRoot_51 = {
|
|
53565
53635
|
load: function(client) {
|
|
53566
53636
|
return client.addOnError(function(event) {
|
|
53567
53637
|
if (client._config.projectRoot) {
|
|
53568
|
-
var projectRoot = _$
|
|
53638
|
+
var projectRoot = _$pathNormalizer_29(client._config.projectRoot), allFrames = event.errors.reduce(function(accum, er) {
|
|
53569
53639
|
return accum.concat(er.stacktrace);
|
|
53570
53640
|
}, []);
|
|
53571
53641
|
allFrames.map(function(stackframe) {
|
|
@@ -53574,35 +53644,39 @@ metadata was removed`
|
|
|
53574
53644
|
}
|
|
53575
53645
|
});
|
|
53576
53646
|
}
|
|
53577
|
-
}, _$
|
|
53578
|
-
function
|
|
53579
|
-
return
|
|
53647
|
+
}, _$notifier_38 = {};
|
|
53648
|
+
function ___extends_38() {
|
|
53649
|
+
return ___extends_38 = Object.assign ? Object.assign.bind() : function(target) {
|
|
53580
53650
|
for (var i = 1; i < arguments.length; i++) {
|
|
53581
53651
|
var source = arguments[i];
|
|
53582
53652
|
for (var key in source)
|
|
53583
53653
|
Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
|
|
53584
53654
|
}
|
|
53585
53655
|
return target;
|
|
53586
|
-
},
|
|
53656
|
+
}, ___extends_38.apply(this, arguments);
|
|
53587
53657
|
}
|
|
53588
|
-
var name = "Bugsnag Node", version2 = "
|
|
53589
|
-
_$
|
|
53590
|
-
var
|
|
53591
|
-
delete __schema_36.enabledBreadcrumbTypes;
|
|
53592
|
-
var internalPlugins = [_$app_37, _$surroundingCode_42, _$inProject_41, _$stripProjectRoot_49, _$session_46, _$device_40, _$uncaughtException_43, _$unhandledRejection_44, _$intercept_39, _$contextualize_38, _$pathNormaliser_48], Bugsnag2 = {
|
|
53658
|
+
var name = "Bugsnag Node", version2 = "8.1.1", url = "https://github.com/bugsnag/bugsnag-js", ___require_38 = __require("async_hooks"), AsyncLocalStorage = ___require_38.AsyncLocalStorage;
|
|
53659
|
+
_$Event_10.__type = "nodejs";
|
|
53660
|
+
var __schema_38 = ___extends_38({}, _$config_9.schema, _$config_37), internalPlugins = [_$app_39, _$surroundingCode_45, _$inProject_44, _$stripProjectRoot_51, _$session_48, _$device_43, _$uncaughtException_46, _$unhandledRejection_47, _$intercept_42, _$contextualize_41, _$pathNormaliser_50, _$consoleBreadcrumbs_40], Bugsnag2 = {
|
|
53593
53661
|
_client: null,
|
|
53594
53662
|
createClient: function(opts) {
|
|
53595
53663
|
typeof opts == "string" && (opts = {
|
|
53596
53664
|
apiKey: opts
|
|
53597
53665
|
}), opts || (opts = {});
|
|
53598
|
-
var bugsnag = new _$
|
|
53666
|
+
var bugsnag = new _$Client_8(opts, __schema_38, internalPlugins, {
|
|
53599
53667
|
name,
|
|
53600
53668
|
version: version2,
|
|
53601
53669
|
url
|
|
53602
53670
|
});
|
|
53603
|
-
return
|
|
53604
|
-
|
|
53605
|
-
|
|
53671
|
+
return Object.keys(_$Client_8.prototype).forEach(function(m) {
|
|
53672
|
+
var original = bugsnag[m];
|
|
53673
|
+
bugsnag[m] = function() {
|
|
53674
|
+
var contextClient = bugsnag._clientContext && typeof bugsnag._clientContext.getStore == "function" ? bugsnag._clientContext.getStore() : null, client = contextClient || bugsnag, originalMethod = contextClient ? contextClient[m] : original;
|
|
53675
|
+
client._depth += 1;
|
|
53676
|
+
var ret = originalMethod.apply(client, arguments);
|
|
53677
|
+
return client._depth -= 1, ret;
|
|
53678
|
+
};
|
|
53679
|
+
}), bugsnag._clientContext = new AsyncLocalStorage(), bugsnag._setDelivery(_$delivery_35), bugsnag._logger.debug("Loaded!"), bugsnag;
|
|
53606
53680
|
},
|
|
53607
53681
|
start: function(opts) {
|
|
53608
53682
|
return Bugsnag2._client ? (Bugsnag2._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."), Bugsnag2._client) : (Bugsnag2._client = Bugsnag2.createClient(opts), Bugsnag2._client);
|
|
@@ -53611,15 +53685,1339 @@ metadata was removed`
|
|
|
53611
53685
|
return Bugsnag2._client != null;
|
|
53612
53686
|
}
|
|
53613
53687
|
};
|
|
53614
|
-
return Object.keys(_$
|
|
53688
|
+
return Object.keys(_$Client_8.prototype).forEach(function(m) {
|
|
53615
53689
|
/^_/.test(m) || (Bugsnag2[m] = function() {
|
|
53616
|
-
|
|
53690
|
+
var client = Bugsnag2._client, ctx = client && client._clientContext && client._clientContext.getStore();
|
|
53691
|
+
if (ctx && (client = ctx), !client)
|
|
53617
53692
|
return console.error("Bugsnag." + m + "() was called before Bugsnag.start()");
|
|
53618
|
-
|
|
53619
|
-
var ret =
|
|
53620
|
-
return
|
|
53693
|
+
client._depth += 1;
|
|
53694
|
+
var ret = client[m].apply(client, arguments);
|
|
53695
|
+
return client._depth -= 1, ret;
|
|
53621
53696
|
});
|
|
53622
|
-
}), _$
|
|
53697
|
+
}), _$notifier_38 = Bugsnag2, _$notifier_38.Client = _$Client_8, _$notifier_38.Event = _$Event_10, _$notifier_38.Session = _$Session_34, _$notifier_38.Breadcrumb = _$Breadcrumb_7, _$notifier_38.default = Bugsnag2, _$notifier_38;
|
|
53698
|
+
});
|
|
53699
|
+
}
|
|
53700
|
+
});
|
|
53701
|
+
|
|
53702
|
+
// ../../node_modules/.pnpm/async@3.2.6/node_modules/async/dist/async.js
|
|
53703
|
+
var require_async2 = __commonJS({
|
|
53704
|
+
"../../node_modules/.pnpm/async@3.2.6/node_modules/async/dist/async.js"(exports, module) {
|
|
53705
|
+
init_cjs_shims();
|
|
53706
|
+
(function(global2, factory) {
|
|
53707
|
+
typeof exports == "object" && typeof module < "u" ? factory(exports) : typeof define == "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis < "u" ? globalThis : global2 || self, factory(global2.async = {}));
|
|
53708
|
+
})(exports, function(exports2) {
|
|
53709
|
+
"use strict";
|
|
53710
|
+
function apply(fn, ...args) {
|
|
53711
|
+
return (...callArgs) => fn(...args, ...callArgs);
|
|
53712
|
+
}
|
|
53713
|
+
function initialParams(fn) {
|
|
53714
|
+
return function(...args) {
|
|
53715
|
+
var callback = args.pop();
|
|
53716
|
+
return fn.call(this, args, callback);
|
|
53717
|
+
};
|
|
53718
|
+
}
|
|
53719
|
+
var hasQueueMicrotask = typeof queueMicrotask == "function" && queueMicrotask, hasSetImmediate = typeof setImmediate == "function" && setImmediate, hasNextTick = typeof process == "object" && typeof process.nextTick == "function";
|
|
53720
|
+
function fallback(fn) {
|
|
53721
|
+
setTimeout(fn, 0);
|
|
53722
|
+
}
|
|
53723
|
+
function wrap(defer3) {
|
|
53724
|
+
return (fn, ...args) => defer3(() => fn(...args));
|
|
53725
|
+
}
|
|
53726
|
+
var _defer$1;
|
|
53727
|
+
hasQueueMicrotask ? _defer$1 = queueMicrotask : hasSetImmediate ? _defer$1 = setImmediate : hasNextTick ? _defer$1 = process.nextTick : _defer$1 = fallback;
|
|
53728
|
+
var setImmediate$1 = wrap(_defer$1);
|
|
53729
|
+
function asyncify(func) {
|
|
53730
|
+
return isAsync(func) ? function(...args) {
|
|
53731
|
+
let callback = args.pop(), promise = func.apply(this, args);
|
|
53732
|
+
return handlePromise(promise, callback);
|
|
53733
|
+
} : initialParams(function(args, callback) {
|
|
53734
|
+
var result;
|
|
53735
|
+
try {
|
|
53736
|
+
result = func.apply(this, args);
|
|
53737
|
+
} catch (e) {
|
|
53738
|
+
return callback(e);
|
|
53739
|
+
}
|
|
53740
|
+
if (result && typeof result.then == "function")
|
|
53741
|
+
return handlePromise(result, callback);
|
|
53742
|
+
callback(null, result);
|
|
53743
|
+
});
|
|
53744
|
+
}
|
|
53745
|
+
function handlePromise(promise, callback) {
|
|
53746
|
+
return promise.then((value) => {
|
|
53747
|
+
invokeCallback(callback, null, value);
|
|
53748
|
+
}, (err2) => {
|
|
53749
|
+
invokeCallback(callback, err2 && (err2 instanceof Error || err2.message) ? err2 : new Error(err2));
|
|
53750
|
+
});
|
|
53751
|
+
}
|
|
53752
|
+
function invokeCallback(callback, error, value) {
|
|
53753
|
+
try {
|
|
53754
|
+
callback(error, value);
|
|
53755
|
+
} catch (err2) {
|
|
53756
|
+
setImmediate$1((e) => {
|
|
53757
|
+
throw e;
|
|
53758
|
+
}, err2);
|
|
53759
|
+
}
|
|
53760
|
+
}
|
|
53761
|
+
function isAsync(fn) {
|
|
53762
|
+
return fn[Symbol.toStringTag] === "AsyncFunction";
|
|
53763
|
+
}
|
|
53764
|
+
function isAsyncGenerator(fn) {
|
|
53765
|
+
return fn[Symbol.toStringTag] === "AsyncGenerator";
|
|
53766
|
+
}
|
|
53767
|
+
function isAsyncIterable(obj) {
|
|
53768
|
+
return typeof obj[Symbol.asyncIterator] == "function";
|
|
53769
|
+
}
|
|
53770
|
+
function wrapAsync(asyncFn) {
|
|
53771
|
+
if (typeof asyncFn != "function")
|
|
53772
|
+
throw new Error("expected a function");
|
|
53773
|
+
return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;
|
|
53774
|
+
}
|
|
53775
|
+
function awaitify(asyncFn, arity) {
|
|
53776
|
+
if (arity || (arity = asyncFn.length), !arity)
|
|
53777
|
+
throw new Error("arity is undefined");
|
|
53778
|
+
function awaitable(...args) {
|
|
53779
|
+
return typeof args[arity - 1] == "function" ? asyncFn.apply(this, args) : new Promise((resolve2, reject2) => {
|
|
53780
|
+
args[arity - 1] = (err2, ...cbArgs) => {
|
|
53781
|
+
if (err2)
|
|
53782
|
+
return reject2(err2);
|
|
53783
|
+
resolve2(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
|
|
53784
|
+
}, asyncFn.apply(this, args);
|
|
53785
|
+
});
|
|
53786
|
+
}
|
|
53787
|
+
return awaitable;
|
|
53788
|
+
}
|
|
53789
|
+
function applyEach$1(eachfn) {
|
|
53790
|
+
return function(fns, ...callArgs) {
|
|
53791
|
+
return awaitify(function(callback) {
|
|
53792
|
+
var that = this;
|
|
53793
|
+
return eachfn(fns, (fn, cb) => {
|
|
53794
|
+
wrapAsync(fn).apply(that, callArgs.concat(cb));
|
|
53795
|
+
}, callback);
|
|
53796
|
+
});
|
|
53797
|
+
};
|
|
53798
|
+
}
|
|
53799
|
+
function _asyncMap(eachfn, arr, iteratee, callback) {
|
|
53800
|
+
arr = arr || [];
|
|
53801
|
+
var results = [], counter = 0, _iteratee = wrapAsync(iteratee);
|
|
53802
|
+
return eachfn(arr, (value, _2, iterCb) => {
|
|
53803
|
+
var index2 = counter++;
|
|
53804
|
+
_iteratee(value, (err2, v) => {
|
|
53805
|
+
results[index2] = v, iterCb(err2);
|
|
53806
|
+
});
|
|
53807
|
+
}, (err2) => {
|
|
53808
|
+
callback(err2, results);
|
|
53809
|
+
});
|
|
53810
|
+
}
|
|
53811
|
+
function isArrayLike(value) {
|
|
53812
|
+
return value && typeof value.length == "number" && value.length >= 0 && value.length % 1 === 0;
|
|
53813
|
+
}
|
|
53814
|
+
let breakLoop = {};
|
|
53815
|
+
function once(fn) {
|
|
53816
|
+
function wrapper(...args) {
|
|
53817
|
+
if (fn !== null) {
|
|
53818
|
+
var callFn = fn;
|
|
53819
|
+
fn = null, callFn.apply(this, args);
|
|
53820
|
+
}
|
|
53821
|
+
}
|
|
53822
|
+
return Object.assign(wrapper, fn), wrapper;
|
|
53823
|
+
}
|
|
53824
|
+
function getIterator(coll) {
|
|
53825
|
+
return coll[Symbol.iterator] && coll[Symbol.iterator]();
|
|
53826
|
+
}
|
|
53827
|
+
function createArrayIterator(coll) {
|
|
53828
|
+
var i = -1, len = coll.length;
|
|
53829
|
+
return function() {
|
|
53830
|
+
return ++i < len ? { value: coll[i], key: i } : null;
|
|
53831
|
+
};
|
|
53832
|
+
}
|
|
53833
|
+
function createES2015Iterator(iterator) {
|
|
53834
|
+
var i = -1;
|
|
53835
|
+
return function() {
|
|
53836
|
+
var item = iterator.next();
|
|
53837
|
+
return item.done ? null : (i++, { value: item.value, key: i });
|
|
53838
|
+
};
|
|
53839
|
+
}
|
|
53840
|
+
function createObjectIterator(obj) {
|
|
53841
|
+
var okeys = obj ? Object.keys(obj) : [], i = -1, len = okeys.length;
|
|
53842
|
+
return function next() {
|
|
53843
|
+
var key = okeys[++i];
|
|
53844
|
+
return key === "__proto__" ? next() : i < len ? { value: obj[key], key } : null;
|
|
53845
|
+
};
|
|
53846
|
+
}
|
|
53847
|
+
function createIterator(coll) {
|
|
53848
|
+
if (isArrayLike(coll))
|
|
53849
|
+
return createArrayIterator(coll);
|
|
53850
|
+
var iterator = getIterator(coll);
|
|
53851
|
+
return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
|
|
53852
|
+
}
|
|
53853
|
+
function onlyOnce(fn) {
|
|
53854
|
+
return function(...args) {
|
|
53855
|
+
if (fn === null)
|
|
53856
|
+
throw new Error("Callback was already called.");
|
|
53857
|
+
var callFn = fn;
|
|
53858
|
+
fn = null, callFn.apply(this, args);
|
|
53859
|
+
};
|
|
53860
|
+
}
|
|
53861
|
+
function asyncEachOfLimit(generator, limit, iteratee, callback) {
|
|
53862
|
+
let done = !1, canceled = !1, awaiting = !1, running = 0, idx = 0;
|
|
53863
|
+
function replenish() {
|
|
53864
|
+
running >= limit || awaiting || done || (awaiting = !0, generator.next().then(({ value, done: iterDone }) => {
|
|
53865
|
+
if (!(canceled || done)) {
|
|
53866
|
+
if (awaiting = !1, iterDone) {
|
|
53867
|
+
done = !0, running <= 0 && callback(null);
|
|
53868
|
+
return;
|
|
53869
|
+
}
|
|
53870
|
+
running++, iteratee(value, idx, iterateeCallback), idx++, replenish();
|
|
53871
|
+
}
|
|
53872
|
+
}).catch(handleError));
|
|
53873
|
+
}
|
|
53874
|
+
function iterateeCallback(err2, result) {
|
|
53875
|
+
if (running -= 1, !canceled) {
|
|
53876
|
+
if (err2)
|
|
53877
|
+
return handleError(err2);
|
|
53878
|
+
if (err2 === !1) {
|
|
53879
|
+
done = !0, canceled = !0;
|
|
53880
|
+
return;
|
|
53881
|
+
}
|
|
53882
|
+
if (result === breakLoop || done && running <= 0)
|
|
53883
|
+
return done = !0, callback(null);
|
|
53884
|
+
replenish();
|
|
53885
|
+
}
|
|
53886
|
+
}
|
|
53887
|
+
function handleError(err2) {
|
|
53888
|
+
canceled || (awaiting = !1, done = !0, callback(err2));
|
|
53889
|
+
}
|
|
53890
|
+
replenish();
|
|
53891
|
+
}
|
|
53892
|
+
var eachOfLimit$2 = (limit) => (obj, iteratee, callback) => {
|
|
53893
|
+
if (callback = once(callback), limit <= 0)
|
|
53894
|
+
throw new RangeError("concurrency limit cannot be less than 1");
|
|
53895
|
+
if (!obj)
|
|
53896
|
+
return callback(null);
|
|
53897
|
+
if (isAsyncGenerator(obj))
|
|
53898
|
+
return asyncEachOfLimit(obj, limit, iteratee, callback);
|
|
53899
|
+
if (isAsyncIterable(obj))
|
|
53900
|
+
return asyncEachOfLimit(obj[Symbol.asyncIterator](), limit, iteratee, callback);
|
|
53901
|
+
var nextElem = createIterator(obj), done = !1, canceled = !1, running = 0, looping = !1;
|
|
53902
|
+
function iterateeCallback(err2, value) {
|
|
53903
|
+
if (!canceled)
|
|
53904
|
+
if (running -= 1, err2)
|
|
53905
|
+
done = !0, callback(err2);
|
|
53906
|
+
else if (err2 === !1)
|
|
53907
|
+
done = !0, canceled = !0;
|
|
53908
|
+
else {
|
|
53909
|
+
if (value === breakLoop || done && running <= 0)
|
|
53910
|
+
return done = !0, callback(null);
|
|
53911
|
+
looping || replenish();
|
|
53912
|
+
}
|
|
53913
|
+
}
|
|
53914
|
+
function replenish() {
|
|
53915
|
+
for (looping = !0; running < limit && !done; ) {
|
|
53916
|
+
var elem = nextElem();
|
|
53917
|
+
if (elem === null) {
|
|
53918
|
+
done = !0, running <= 0 && callback(null);
|
|
53919
|
+
return;
|
|
53920
|
+
}
|
|
53921
|
+
running += 1, iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));
|
|
53922
|
+
}
|
|
53923
|
+
looping = !1;
|
|
53924
|
+
}
|
|
53925
|
+
replenish();
|
|
53926
|
+
};
|
|
53927
|
+
function eachOfLimit(coll, limit, iteratee, callback) {
|
|
53928
|
+
return eachOfLimit$2(limit)(coll, wrapAsync(iteratee), callback);
|
|
53929
|
+
}
|
|
53930
|
+
var eachOfLimit$1 = awaitify(eachOfLimit, 4);
|
|
53931
|
+
function eachOfArrayLike(coll, iteratee, callback) {
|
|
53932
|
+
callback = once(callback);
|
|
53933
|
+
var index2 = 0, completed = 0, { length } = coll, canceled = !1;
|
|
53934
|
+
length === 0 && callback(null);
|
|
53935
|
+
function iteratorCallback(err2, value) {
|
|
53936
|
+
err2 === !1 && (canceled = !0), canceled !== !0 && (err2 ? callback(err2) : (++completed === length || value === breakLoop) && callback(null));
|
|
53937
|
+
}
|
|
53938
|
+
for (; index2 < length; index2++)
|
|
53939
|
+
iteratee(coll[index2], index2, onlyOnce(iteratorCallback));
|
|
53940
|
+
}
|
|
53941
|
+
function eachOfGeneric(coll, iteratee, callback) {
|
|
53942
|
+
return eachOfLimit$1(coll, 1 / 0, iteratee, callback);
|
|
53943
|
+
}
|
|
53944
|
+
function eachOf(coll, iteratee, callback) {
|
|
53945
|
+
var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;
|
|
53946
|
+
return eachOfImplementation(coll, wrapAsync(iteratee), callback);
|
|
53947
|
+
}
|
|
53948
|
+
var eachOf$1 = awaitify(eachOf, 3);
|
|
53949
|
+
function map(coll, iteratee, callback) {
|
|
53950
|
+
return _asyncMap(eachOf$1, coll, iteratee, callback);
|
|
53951
|
+
}
|
|
53952
|
+
var map$1 = awaitify(map, 3), applyEach = applyEach$1(map$1);
|
|
53953
|
+
function eachOfSeries(coll, iteratee, callback) {
|
|
53954
|
+
return eachOfLimit$1(coll, 1, iteratee, callback);
|
|
53955
|
+
}
|
|
53956
|
+
var eachOfSeries$1 = awaitify(eachOfSeries, 3);
|
|
53957
|
+
function mapSeries(coll, iteratee, callback) {
|
|
53958
|
+
return _asyncMap(eachOfSeries$1, coll, iteratee, callback);
|
|
53959
|
+
}
|
|
53960
|
+
var mapSeries$1 = awaitify(mapSeries, 3), applyEachSeries = applyEach$1(mapSeries$1);
|
|
53961
|
+
let PROMISE_SYMBOL = Symbol("promiseCallback");
|
|
53962
|
+
function promiseCallback() {
|
|
53963
|
+
let resolve2, reject2;
|
|
53964
|
+
function callback(err2, ...args) {
|
|
53965
|
+
if (err2)
|
|
53966
|
+
return reject2(err2);
|
|
53967
|
+
resolve2(args.length > 1 ? args : args[0]);
|
|
53968
|
+
}
|
|
53969
|
+
return callback[PROMISE_SYMBOL] = new Promise((res, rej) => {
|
|
53970
|
+
resolve2 = res, reject2 = rej;
|
|
53971
|
+
}), callback;
|
|
53972
|
+
}
|
|
53973
|
+
function auto(tasks, concurrency, callback) {
|
|
53974
|
+
typeof concurrency != "number" && (callback = concurrency, concurrency = null), callback = once(callback || promiseCallback());
|
|
53975
|
+
var numTasks = Object.keys(tasks).length;
|
|
53976
|
+
if (!numTasks)
|
|
53977
|
+
return callback(null);
|
|
53978
|
+
concurrency || (concurrency = numTasks);
|
|
53979
|
+
var results = {}, runningTasks = 0, canceled = !1, hasError = !1, listeners = /* @__PURE__ */ Object.create(null), readyTasks = [], readyToCheck = [], uncheckedDependencies = {};
|
|
53980
|
+
Object.keys(tasks).forEach((key) => {
|
|
53981
|
+
var task = tasks[key];
|
|
53982
|
+
if (!Array.isArray(task)) {
|
|
53983
|
+
enqueueTask(key, [task]), readyToCheck.push(key);
|
|
53984
|
+
return;
|
|
53985
|
+
}
|
|
53986
|
+
var dependencies = task.slice(0, task.length - 1), remainingDependencies = dependencies.length;
|
|
53987
|
+
if (remainingDependencies === 0) {
|
|
53988
|
+
enqueueTask(key, task), readyToCheck.push(key);
|
|
53989
|
+
return;
|
|
53990
|
+
}
|
|
53991
|
+
uncheckedDependencies[key] = remainingDependencies, dependencies.forEach((dependencyName) => {
|
|
53992
|
+
if (!tasks[dependencyName])
|
|
53993
|
+
throw new Error("async.auto task `" + key + "` has a non-existent dependency `" + dependencyName + "` in " + dependencies.join(", "));
|
|
53994
|
+
addListener(dependencyName, () => {
|
|
53995
|
+
remainingDependencies--, remainingDependencies === 0 && enqueueTask(key, task);
|
|
53996
|
+
});
|
|
53997
|
+
});
|
|
53998
|
+
}), checkForDeadlocks(), processQueue();
|
|
53999
|
+
function enqueueTask(key, task) {
|
|
54000
|
+
readyTasks.push(() => runTask(key, task));
|
|
54001
|
+
}
|
|
54002
|
+
function processQueue() {
|
|
54003
|
+
if (!canceled) {
|
|
54004
|
+
if (readyTasks.length === 0 && runningTasks === 0)
|
|
54005
|
+
return callback(null, results);
|
|
54006
|
+
for (; readyTasks.length && runningTasks < concurrency; ) {
|
|
54007
|
+
var run = readyTasks.shift();
|
|
54008
|
+
run();
|
|
54009
|
+
}
|
|
54010
|
+
}
|
|
54011
|
+
}
|
|
54012
|
+
function addListener(taskName, fn) {
|
|
54013
|
+
var taskListeners = listeners[taskName];
|
|
54014
|
+
taskListeners || (taskListeners = listeners[taskName] = []), taskListeners.push(fn);
|
|
54015
|
+
}
|
|
54016
|
+
function taskComplete(taskName) {
|
|
54017
|
+
var taskListeners = listeners[taskName] || [];
|
|
54018
|
+
taskListeners.forEach((fn) => fn()), processQueue();
|
|
54019
|
+
}
|
|
54020
|
+
function runTask(key, task) {
|
|
54021
|
+
if (!hasError) {
|
|
54022
|
+
var taskCallback = onlyOnce((err2, ...result) => {
|
|
54023
|
+
if (runningTasks--, err2 === !1) {
|
|
54024
|
+
canceled = !0;
|
|
54025
|
+
return;
|
|
54026
|
+
}
|
|
54027
|
+
if (result.length < 2 && ([result] = result), err2) {
|
|
54028
|
+
var safeResults = {};
|
|
54029
|
+
if (Object.keys(results).forEach((rkey) => {
|
|
54030
|
+
safeResults[rkey] = results[rkey];
|
|
54031
|
+
}), safeResults[key] = result, hasError = !0, listeners = /* @__PURE__ */ Object.create(null), canceled)
|
|
54032
|
+
return;
|
|
54033
|
+
callback(err2, safeResults);
|
|
54034
|
+
} else
|
|
54035
|
+
results[key] = result, taskComplete(key);
|
|
54036
|
+
});
|
|
54037
|
+
runningTasks++;
|
|
54038
|
+
var taskFn = wrapAsync(task[task.length - 1]);
|
|
54039
|
+
task.length > 1 ? taskFn(results, taskCallback) : taskFn(taskCallback);
|
|
54040
|
+
}
|
|
54041
|
+
}
|
|
54042
|
+
function checkForDeadlocks() {
|
|
54043
|
+
for (var currentTask, counter = 0; readyToCheck.length; )
|
|
54044
|
+
currentTask = readyToCheck.pop(), counter++, getDependents(currentTask).forEach((dependent) => {
|
|
54045
|
+
--uncheckedDependencies[dependent] === 0 && readyToCheck.push(dependent);
|
|
54046
|
+
});
|
|
54047
|
+
if (counter !== numTasks)
|
|
54048
|
+
throw new Error(
|
|
54049
|
+
"async.auto cannot execute tasks due to a recursive dependency"
|
|
54050
|
+
);
|
|
54051
|
+
}
|
|
54052
|
+
function getDependents(taskName) {
|
|
54053
|
+
var result = [];
|
|
54054
|
+
return Object.keys(tasks).forEach((key) => {
|
|
54055
|
+
let task = tasks[key];
|
|
54056
|
+
Array.isArray(task) && task.indexOf(taskName) >= 0 && result.push(key);
|
|
54057
|
+
}), result;
|
|
54058
|
+
}
|
|
54059
|
+
return callback[PROMISE_SYMBOL];
|
|
54060
|
+
}
|
|
54061
|
+
var FN_ARGS = /^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/, ARROW_FN_ARGS = /^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/, FN_ARG_SPLIT = /,/, FN_ARG = /(=.+)?(\s*)$/;
|
|
54062
|
+
function stripComments3(string) {
|
|
54063
|
+
let stripped = "", index2 = 0, endBlockComment = string.indexOf("*/");
|
|
54064
|
+
for (; index2 < string.length; )
|
|
54065
|
+
if (string[index2] === "/" && string[index2 + 1] === "/") {
|
|
54066
|
+
let endIndex = string.indexOf(`
|
|
54067
|
+
`, index2);
|
|
54068
|
+
index2 = endIndex === -1 ? string.length : endIndex;
|
|
54069
|
+
} else if (endBlockComment !== -1 && string[index2] === "/" && string[index2 + 1] === "*") {
|
|
54070
|
+
let endIndex = string.indexOf("*/", index2);
|
|
54071
|
+
endIndex !== -1 ? (index2 = endIndex + 2, endBlockComment = string.indexOf("*/", index2)) : (stripped += string[index2], index2++);
|
|
54072
|
+
} else
|
|
54073
|
+
stripped += string[index2], index2++;
|
|
54074
|
+
return stripped;
|
|
54075
|
+
}
|
|
54076
|
+
function parseParams(func) {
|
|
54077
|
+
let src = stripComments3(func.toString()), match2 = src.match(FN_ARGS);
|
|
54078
|
+
if (match2 || (match2 = src.match(ARROW_FN_ARGS)), !match2)
|
|
54079
|
+
throw new Error(`could not parse args in autoInject
|
|
54080
|
+
Source:
|
|
54081
|
+
` + src);
|
|
54082
|
+
let [, args] = match2;
|
|
54083
|
+
return args.replace(/\s/g, "").split(FN_ARG_SPLIT).map((arg) => arg.replace(FN_ARG, "").trim());
|
|
54084
|
+
}
|
|
54085
|
+
function autoInject(tasks, callback) {
|
|
54086
|
+
var newTasks = {};
|
|
54087
|
+
return Object.keys(tasks).forEach((key) => {
|
|
54088
|
+
var taskFn = tasks[key], params, fnIsAsync = isAsync(taskFn), hasNoDeps = !fnIsAsync && taskFn.length === 1 || fnIsAsync && taskFn.length === 0;
|
|
54089
|
+
if (Array.isArray(taskFn))
|
|
54090
|
+
params = [...taskFn], taskFn = params.pop(), newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
|
|
54091
|
+
else if (hasNoDeps)
|
|
54092
|
+
newTasks[key] = taskFn;
|
|
54093
|
+
else {
|
|
54094
|
+
if (params = parseParams(taskFn), taskFn.length === 0 && !fnIsAsync && params.length === 0)
|
|
54095
|
+
throw new Error("autoInject task functions require explicit parameters.");
|
|
54096
|
+
fnIsAsync || params.pop(), newTasks[key] = params.concat(newTask);
|
|
54097
|
+
}
|
|
54098
|
+
function newTask(results, taskCb) {
|
|
54099
|
+
var newArgs = params.map((name) => results[name]);
|
|
54100
|
+
newArgs.push(taskCb), wrapAsync(taskFn)(...newArgs);
|
|
54101
|
+
}
|
|
54102
|
+
}), auto(newTasks, callback);
|
|
54103
|
+
}
|
|
54104
|
+
class DLL {
|
|
54105
|
+
constructor() {
|
|
54106
|
+
this.head = this.tail = null, this.length = 0;
|
|
54107
|
+
}
|
|
54108
|
+
removeLink(node) {
|
|
54109
|
+
return node.prev ? node.prev.next = node.next : this.head = node.next, node.next ? node.next.prev = node.prev : this.tail = node.prev, node.prev = node.next = null, this.length -= 1, node;
|
|
54110
|
+
}
|
|
54111
|
+
empty() {
|
|
54112
|
+
for (; this.head; )
|
|
54113
|
+
this.shift();
|
|
54114
|
+
return this;
|
|
54115
|
+
}
|
|
54116
|
+
insertAfter(node, newNode) {
|
|
54117
|
+
newNode.prev = node, newNode.next = node.next, node.next ? node.next.prev = newNode : this.tail = newNode, node.next = newNode, this.length += 1;
|
|
54118
|
+
}
|
|
54119
|
+
insertBefore(node, newNode) {
|
|
54120
|
+
newNode.prev = node.prev, newNode.next = node, node.prev ? node.prev.next = newNode : this.head = newNode, node.prev = newNode, this.length += 1;
|
|
54121
|
+
}
|
|
54122
|
+
unshift(node) {
|
|
54123
|
+
this.head ? this.insertBefore(this.head, node) : setInitial(this, node);
|
|
54124
|
+
}
|
|
54125
|
+
push(node) {
|
|
54126
|
+
this.tail ? this.insertAfter(this.tail, node) : setInitial(this, node);
|
|
54127
|
+
}
|
|
54128
|
+
shift() {
|
|
54129
|
+
return this.head && this.removeLink(this.head);
|
|
54130
|
+
}
|
|
54131
|
+
pop() {
|
|
54132
|
+
return this.tail && this.removeLink(this.tail);
|
|
54133
|
+
}
|
|
54134
|
+
toArray() {
|
|
54135
|
+
return [...this];
|
|
54136
|
+
}
|
|
54137
|
+
*[Symbol.iterator]() {
|
|
54138
|
+
for (var cur = this.head; cur; )
|
|
54139
|
+
yield cur.data, cur = cur.next;
|
|
54140
|
+
}
|
|
54141
|
+
remove(testFn) {
|
|
54142
|
+
for (var curr = this.head; curr; ) {
|
|
54143
|
+
var { next } = curr;
|
|
54144
|
+
testFn(curr) && this.removeLink(curr), curr = next;
|
|
54145
|
+
}
|
|
54146
|
+
return this;
|
|
54147
|
+
}
|
|
54148
|
+
}
|
|
54149
|
+
function setInitial(dll, node) {
|
|
54150
|
+
dll.length = 1, dll.head = dll.tail = node;
|
|
54151
|
+
}
|
|
54152
|
+
function queue$1(worker, concurrency, payload) {
|
|
54153
|
+
if (concurrency == null)
|
|
54154
|
+
concurrency = 1;
|
|
54155
|
+
else if (concurrency === 0)
|
|
54156
|
+
throw new RangeError("Concurrency must not be zero");
|
|
54157
|
+
var _worker = wrapAsync(worker), numRunning = 0, workersList = [];
|
|
54158
|
+
let events = {
|
|
54159
|
+
error: [],
|
|
54160
|
+
drain: [],
|
|
54161
|
+
saturated: [],
|
|
54162
|
+
unsaturated: [],
|
|
54163
|
+
empty: []
|
|
54164
|
+
};
|
|
54165
|
+
function on(event, handler) {
|
|
54166
|
+
events[event].push(handler);
|
|
54167
|
+
}
|
|
54168
|
+
function once2(event, handler) {
|
|
54169
|
+
let handleAndRemove = (...args) => {
|
|
54170
|
+
off(event, handleAndRemove), handler(...args);
|
|
54171
|
+
};
|
|
54172
|
+
events[event].push(handleAndRemove);
|
|
54173
|
+
}
|
|
54174
|
+
function off(event, handler) {
|
|
54175
|
+
if (!event)
|
|
54176
|
+
return Object.keys(events).forEach((ev) => events[ev] = []);
|
|
54177
|
+
if (!handler)
|
|
54178
|
+
return events[event] = [];
|
|
54179
|
+
events[event] = events[event].filter((ev) => ev !== handler);
|
|
54180
|
+
}
|
|
54181
|
+
function trigger(event, ...args) {
|
|
54182
|
+
events[event].forEach((handler) => handler(...args));
|
|
54183
|
+
}
|
|
54184
|
+
var processingScheduled = !1;
|
|
54185
|
+
function _insert(data, insertAtFront, rejectOnError, callback) {
|
|
54186
|
+
if (callback != null && typeof callback != "function")
|
|
54187
|
+
throw new Error("task callback must be a function");
|
|
54188
|
+
q.started = !0;
|
|
54189
|
+
var res, rej;
|
|
54190
|
+
function promiseCallback2(err2, ...args) {
|
|
54191
|
+
if (err2)
|
|
54192
|
+
return rejectOnError ? rej(err2) : res();
|
|
54193
|
+
if (args.length <= 1)
|
|
54194
|
+
return res(args[0]);
|
|
54195
|
+
res(args);
|
|
54196
|
+
}
|
|
54197
|
+
var item = q._createTaskItem(
|
|
54198
|
+
data,
|
|
54199
|
+
rejectOnError ? promiseCallback2 : callback || promiseCallback2
|
|
54200
|
+
);
|
|
54201
|
+
if (insertAtFront ? q._tasks.unshift(item) : q._tasks.push(item), processingScheduled || (processingScheduled = !0, setImmediate$1(() => {
|
|
54202
|
+
processingScheduled = !1, q.process();
|
|
54203
|
+
})), rejectOnError || !callback)
|
|
54204
|
+
return new Promise((resolve2, reject2) => {
|
|
54205
|
+
res = resolve2, rej = reject2;
|
|
54206
|
+
});
|
|
54207
|
+
}
|
|
54208
|
+
function _createCB(tasks) {
|
|
54209
|
+
return function(err2, ...args) {
|
|
54210
|
+
numRunning -= 1;
|
|
54211
|
+
for (var i = 0, l = tasks.length; i < l; i++) {
|
|
54212
|
+
var task = tasks[i], index2 = workersList.indexOf(task);
|
|
54213
|
+
index2 === 0 ? workersList.shift() : index2 > 0 && workersList.splice(index2, 1), task.callback(err2, ...args), err2 != null && trigger("error", err2, task.data);
|
|
54214
|
+
}
|
|
54215
|
+
numRunning <= q.concurrency - q.buffer && trigger("unsaturated"), q.idle() && trigger("drain"), q.process();
|
|
54216
|
+
};
|
|
54217
|
+
}
|
|
54218
|
+
function _maybeDrain(data) {
|
|
54219
|
+
return data.length === 0 && q.idle() ? (setImmediate$1(() => trigger("drain")), !0) : !1;
|
|
54220
|
+
}
|
|
54221
|
+
let eventMethod = (name) => (handler) => {
|
|
54222
|
+
if (!handler)
|
|
54223
|
+
return new Promise((resolve2, reject2) => {
|
|
54224
|
+
once2(name, (err2, data) => {
|
|
54225
|
+
if (err2)
|
|
54226
|
+
return reject2(err2);
|
|
54227
|
+
resolve2(data);
|
|
54228
|
+
});
|
|
54229
|
+
});
|
|
54230
|
+
off(name), on(name, handler);
|
|
54231
|
+
};
|
|
54232
|
+
var isProcessing = !1, q = {
|
|
54233
|
+
_tasks: new DLL(),
|
|
54234
|
+
_createTaskItem(data, callback) {
|
|
54235
|
+
return {
|
|
54236
|
+
data,
|
|
54237
|
+
callback
|
|
54238
|
+
};
|
|
54239
|
+
},
|
|
54240
|
+
*[Symbol.iterator]() {
|
|
54241
|
+
yield* q._tasks[Symbol.iterator]();
|
|
54242
|
+
},
|
|
54243
|
+
concurrency,
|
|
54244
|
+
payload,
|
|
54245
|
+
buffer: concurrency / 4,
|
|
54246
|
+
started: !1,
|
|
54247
|
+
paused: !1,
|
|
54248
|
+
push(data, callback) {
|
|
54249
|
+
return Array.isArray(data) ? _maybeDrain(data) ? void 0 : data.map((datum) => _insert(datum, !1, !1, callback)) : _insert(data, !1, !1, callback);
|
|
54250
|
+
},
|
|
54251
|
+
pushAsync(data, callback) {
|
|
54252
|
+
return Array.isArray(data) ? _maybeDrain(data) ? void 0 : data.map((datum) => _insert(datum, !1, !0, callback)) : _insert(data, !1, !0, callback);
|
|
54253
|
+
},
|
|
54254
|
+
kill() {
|
|
54255
|
+
off(), q._tasks.empty();
|
|
54256
|
+
},
|
|
54257
|
+
unshift(data, callback) {
|
|
54258
|
+
return Array.isArray(data) ? _maybeDrain(data) ? void 0 : data.map((datum) => _insert(datum, !0, !1, callback)) : _insert(data, !0, !1, callback);
|
|
54259
|
+
},
|
|
54260
|
+
unshiftAsync(data, callback) {
|
|
54261
|
+
return Array.isArray(data) ? _maybeDrain(data) ? void 0 : data.map((datum) => _insert(datum, !0, !0, callback)) : _insert(data, !0, !0, callback);
|
|
54262
|
+
},
|
|
54263
|
+
remove(testFn) {
|
|
54264
|
+
q._tasks.remove(testFn);
|
|
54265
|
+
},
|
|
54266
|
+
process() {
|
|
54267
|
+
if (!isProcessing) {
|
|
54268
|
+
for (isProcessing = !0; !q.paused && numRunning < q.concurrency && q._tasks.length; ) {
|
|
54269
|
+
var tasks = [], data = [], l = q._tasks.length;
|
|
54270
|
+
q.payload && (l = Math.min(l, q.payload));
|
|
54271
|
+
for (var i = 0; i < l; i++) {
|
|
54272
|
+
var node = q._tasks.shift();
|
|
54273
|
+
tasks.push(node), workersList.push(node), data.push(node.data);
|
|
54274
|
+
}
|
|
54275
|
+
numRunning += 1, q._tasks.length === 0 && trigger("empty"), numRunning === q.concurrency && trigger("saturated");
|
|
54276
|
+
var cb = onlyOnce(_createCB(tasks));
|
|
54277
|
+
_worker(data, cb);
|
|
54278
|
+
}
|
|
54279
|
+
isProcessing = !1;
|
|
54280
|
+
}
|
|
54281
|
+
},
|
|
54282
|
+
length() {
|
|
54283
|
+
return q._tasks.length;
|
|
54284
|
+
},
|
|
54285
|
+
running() {
|
|
54286
|
+
return numRunning;
|
|
54287
|
+
},
|
|
54288
|
+
workersList() {
|
|
54289
|
+
return workersList;
|
|
54290
|
+
},
|
|
54291
|
+
idle() {
|
|
54292
|
+
return q._tasks.length + numRunning === 0;
|
|
54293
|
+
},
|
|
54294
|
+
pause() {
|
|
54295
|
+
q.paused = !0;
|
|
54296
|
+
},
|
|
54297
|
+
resume() {
|
|
54298
|
+
q.paused !== !1 && (q.paused = !1, setImmediate$1(q.process));
|
|
54299
|
+
}
|
|
54300
|
+
};
|
|
54301
|
+
return Object.defineProperties(q, {
|
|
54302
|
+
saturated: {
|
|
54303
|
+
writable: !1,
|
|
54304
|
+
value: eventMethod("saturated")
|
|
54305
|
+
},
|
|
54306
|
+
unsaturated: {
|
|
54307
|
+
writable: !1,
|
|
54308
|
+
value: eventMethod("unsaturated")
|
|
54309
|
+
},
|
|
54310
|
+
empty: {
|
|
54311
|
+
writable: !1,
|
|
54312
|
+
value: eventMethod("empty")
|
|
54313
|
+
},
|
|
54314
|
+
drain: {
|
|
54315
|
+
writable: !1,
|
|
54316
|
+
value: eventMethod("drain")
|
|
54317
|
+
},
|
|
54318
|
+
error: {
|
|
54319
|
+
writable: !1,
|
|
54320
|
+
value: eventMethod("error")
|
|
54321
|
+
}
|
|
54322
|
+
}), q;
|
|
54323
|
+
}
|
|
54324
|
+
function cargo$1(worker, payload) {
|
|
54325
|
+
return queue$1(worker, 1, payload);
|
|
54326
|
+
}
|
|
54327
|
+
function cargo(worker, concurrency, payload) {
|
|
54328
|
+
return queue$1(worker, concurrency, payload);
|
|
54329
|
+
}
|
|
54330
|
+
function reduce(coll, memo, iteratee, callback) {
|
|
54331
|
+
callback = once(callback);
|
|
54332
|
+
var _iteratee = wrapAsync(iteratee);
|
|
54333
|
+
return eachOfSeries$1(coll, (x, i, iterCb) => {
|
|
54334
|
+
_iteratee(memo, x, (err2, v) => {
|
|
54335
|
+
memo = v, iterCb(err2);
|
|
54336
|
+
});
|
|
54337
|
+
}, (err2) => callback(err2, memo));
|
|
54338
|
+
}
|
|
54339
|
+
var reduce$1 = awaitify(reduce, 4);
|
|
54340
|
+
function seq(...functions) {
|
|
54341
|
+
var _functions = functions.map(wrapAsync);
|
|
54342
|
+
return function(...args) {
|
|
54343
|
+
var that = this, cb = args[args.length - 1];
|
|
54344
|
+
return typeof cb == "function" ? args.pop() : cb = promiseCallback(), reduce$1(
|
|
54345
|
+
_functions,
|
|
54346
|
+
args,
|
|
54347
|
+
(newargs, fn, iterCb) => {
|
|
54348
|
+
fn.apply(that, newargs.concat((err2, ...nextargs) => {
|
|
54349
|
+
iterCb(err2, nextargs);
|
|
54350
|
+
}));
|
|
54351
|
+
},
|
|
54352
|
+
(err2, results) => cb(err2, ...results)
|
|
54353
|
+
), cb[PROMISE_SYMBOL];
|
|
54354
|
+
};
|
|
54355
|
+
}
|
|
54356
|
+
function compose(...args) {
|
|
54357
|
+
return seq(...args.reverse());
|
|
54358
|
+
}
|
|
54359
|
+
function mapLimit2(coll, limit, iteratee, callback) {
|
|
54360
|
+
return _asyncMap(eachOfLimit$2(limit), coll, iteratee, callback);
|
|
54361
|
+
}
|
|
54362
|
+
var mapLimit$1 = awaitify(mapLimit2, 4);
|
|
54363
|
+
function concatLimit(coll, limit, iteratee, callback) {
|
|
54364
|
+
var _iteratee = wrapAsync(iteratee);
|
|
54365
|
+
return mapLimit$1(coll, limit, (val, iterCb) => {
|
|
54366
|
+
_iteratee(val, (err2, ...args) => err2 ? iterCb(err2) : iterCb(err2, args));
|
|
54367
|
+
}, (err2, mapResults) => {
|
|
54368
|
+
for (var result = [], i = 0; i < mapResults.length; i++)
|
|
54369
|
+
mapResults[i] && (result = result.concat(...mapResults[i]));
|
|
54370
|
+
return callback(err2, result);
|
|
54371
|
+
});
|
|
54372
|
+
}
|
|
54373
|
+
var concatLimit$1 = awaitify(concatLimit, 4);
|
|
54374
|
+
function concat(coll, iteratee, callback) {
|
|
54375
|
+
return concatLimit$1(coll, 1 / 0, iteratee, callback);
|
|
54376
|
+
}
|
|
54377
|
+
var concat$1 = awaitify(concat, 3);
|
|
54378
|
+
function concatSeries(coll, iteratee, callback) {
|
|
54379
|
+
return concatLimit$1(coll, 1, iteratee, callback);
|
|
54380
|
+
}
|
|
54381
|
+
var concatSeries$1 = awaitify(concatSeries, 3);
|
|
54382
|
+
function constant$1(...args) {
|
|
54383
|
+
return function(...ignoredArgs) {
|
|
54384
|
+
var callback = ignoredArgs.pop();
|
|
54385
|
+
return callback(null, ...args);
|
|
54386
|
+
};
|
|
54387
|
+
}
|
|
54388
|
+
function _createTester(check2, getResult) {
|
|
54389
|
+
return (eachfn, arr, _iteratee, cb) => {
|
|
54390
|
+
var testPassed = !1, testResult;
|
|
54391
|
+
let iteratee = wrapAsync(_iteratee);
|
|
54392
|
+
eachfn(arr, (value, _2, callback) => {
|
|
54393
|
+
iteratee(value, (err2, result) => {
|
|
54394
|
+
if (err2 || err2 === !1)
|
|
54395
|
+
return callback(err2);
|
|
54396
|
+
if (check2(result) && !testResult)
|
|
54397
|
+
return testPassed = !0, testResult = getResult(!0, value), callback(null, breakLoop);
|
|
54398
|
+
callback();
|
|
54399
|
+
});
|
|
54400
|
+
}, (err2) => {
|
|
54401
|
+
if (err2)
|
|
54402
|
+
return cb(err2);
|
|
54403
|
+
cb(null, testPassed ? testResult : getResult(!1));
|
|
54404
|
+
});
|
|
54405
|
+
};
|
|
54406
|
+
}
|
|
54407
|
+
function detect(coll, iteratee, callback) {
|
|
54408
|
+
return _createTester((bool) => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback);
|
|
54409
|
+
}
|
|
54410
|
+
var detect$1 = awaitify(detect, 3);
|
|
54411
|
+
function detectLimit(coll, limit, iteratee, callback) {
|
|
54412
|
+
return _createTester((bool) => bool, (res, item) => item)(eachOfLimit$2(limit), coll, iteratee, callback);
|
|
54413
|
+
}
|
|
54414
|
+
var detectLimit$1 = awaitify(detectLimit, 4);
|
|
54415
|
+
function detectSeries(coll, iteratee, callback) {
|
|
54416
|
+
return _createTester((bool) => bool, (res, item) => item)(eachOfLimit$2(1), coll, iteratee, callback);
|
|
54417
|
+
}
|
|
54418
|
+
var detectSeries$1 = awaitify(detectSeries, 3);
|
|
54419
|
+
function consoleFunc(name) {
|
|
54420
|
+
return (fn, ...args) => wrapAsync(fn)(...args, (err2, ...resultArgs) => {
|
|
54421
|
+
typeof console == "object" && (err2 ? console.error && console.error(err2) : console[name] && resultArgs.forEach((x) => console[name](x)));
|
|
54422
|
+
});
|
|
54423
|
+
}
|
|
54424
|
+
var dir = consoleFunc("dir");
|
|
54425
|
+
function doWhilst(iteratee, test, callback) {
|
|
54426
|
+
callback = onlyOnce(callback);
|
|
54427
|
+
var _fn = wrapAsync(iteratee), _test = wrapAsync(test), results;
|
|
54428
|
+
function next(err2, ...args) {
|
|
54429
|
+
if (err2)
|
|
54430
|
+
return callback(err2);
|
|
54431
|
+
err2 !== !1 && (results = args, _test(...args, check2));
|
|
54432
|
+
}
|
|
54433
|
+
function check2(err2, truth) {
|
|
54434
|
+
if (err2)
|
|
54435
|
+
return callback(err2);
|
|
54436
|
+
if (err2 !== !1) {
|
|
54437
|
+
if (!truth)
|
|
54438
|
+
return callback(null, ...results);
|
|
54439
|
+
_fn(next);
|
|
54440
|
+
}
|
|
54441
|
+
}
|
|
54442
|
+
return check2(null, !0);
|
|
54443
|
+
}
|
|
54444
|
+
var doWhilst$1 = awaitify(doWhilst, 3);
|
|
54445
|
+
function doUntil(iteratee, test, callback) {
|
|
54446
|
+
let _test = wrapAsync(test);
|
|
54447
|
+
return doWhilst$1(iteratee, (...args) => {
|
|
54448
|
+
let cb = args.pop();
|
|
54449
|
+
_test(...args, (err2, truth) => cb(err2, !truth));
|
|
54450
|
+
}, callback);
|
|
54451
|
+
}
|
|
54452
|
+
function _withoutIndex(iteratee) {
|
|
54453
|
+
return (value, index2, callback) => iteratee(value, callback);
|
|
54454
|
+
}
|
|
54455
|
+
function eachLimit$2(coll, iteratee, callback) {
|
|
54456
|
+
return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback);
|
|
54457
|
+
}
|
|
54458
|
+
var each = awaitify(eachLimit$2, 3);
|
|
54459
|
+
function eachLimit(coll, limit, iteratee, callback) {
|
|
54460
|
+
return eachOfLimit$2(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback);
|
|
54461
|
+
}
|
|
54462
|
+
var eachLimit$1 = awaitify(eachLimit, 4);
|
|
54463
|
+
function eachSeries(coll, iteratee, callback) {
|
|
54464
|
+
return eachLimit$1(coll, 1, iteratee, callback);
|
|
54465
|
+
}
|
|
54466
|
+
var eachSeries$1 = awaitify(eachSeries, 3);
|
|
54467
|
+
function ensureAsync(fn) {
|
|
54468
|
+
return isAsync(fn) ? fn : function(...args) {
|
|
54469
|
+
var callback = args.pop(), sync = !0;
|
|
54470
|
+
args.push((...innerArgs) => {
|
|
54471
|
+
sync ? setImmediate$1(() => callback(...innerArgs)) : callback(...innerArgs);
|
|
54472
|
+
}), fn.apply(this, args), sync = !1;
|
|
54473
|
+
};
|
|
54474
|
+
}
|
|
54475
|
+
function every(coll, iteratee, callback) {
|
|
54476
|
+
return _createTester((bool) => !bool, (res) => !res)(eachOf$1, coll, iteratee, callback);
|
|
54477
|
+
}
|
|
54478
|
+
var every$1 = awaitify(every, 3);
|
|
54479
|
+
function everyLimit(coll, limit, iteratee, callback) {
|
|
54480
|
+
return _createTester((bool) => !bool, (res) => !res)(eachOfLimit$2(limit), coll, iteratee, callback);
|
|
54481
|
+
}
|
|
54482
|
+
var everyLimit$1 = awaitify(everyLimit, 4);
|
|
54483
|
+
function everySeries(coll, iteratee, callback) {
|
|
54484
|
+
return _createTester((bool) => !bool, (res) => !res)(eachOfSeries$1, coll, iteratee, callback);
|
|
54485
|
+
}
|
|
54486
|
+
var everySeries$1 = awaitify(everySeries, 3);
|
|
54487
|
+
function filterArray2(eachfn, arr, iteratee, callback) {
|
|
54488
|
+
var truthValues = new Array(arr.length);
|
|
54489
|
+
eachfn(arr, (x, index2, iterCb) => {
|
|
54490
|
+
iteratee(x, (err2, v) => {
|
|
54491
|
+
truthValues[index2] = !!v, iterCb(err2);
|
|
54492
|
+
});
|
|
54493
|
+
}, (err2) => {
|
|
54494
|
+
if (err2)
|
|
54495
|
+
return callback(err2);
|
|
54496
|
+
for (var results = [], i = 0; i < arr.length; i++)
|
|
54497
|
+
truthValues[i] && results.push(arr[i]);
|
|
54498
|
+
callback(null, results);
|
|
54499
|
+
});
|
|
54500
|
+
}
|
|
54501
|
+
function filterGeneric(eachfn, coll, iteratee, callback) {
|
|
54502
|
+
var results = [];
|
|
54503
|
+
eachfn(coll, (x, index2, iterCb) => {
|
|
54504
|
+
iteratee(x, (err2, v) => {
|
|
54505
|
+
if (err2)
|
|
54506
|
+
return iterCb(err2);
|
|
54507
|
+
v && results.push({ index: index2, value: x }), iterCb(err2);
|
|
54508
|
+
});
|
|
54509
|
+
}, (err2) => {
|
|
54510
|
+
if (err2)
|
|
54511
|
+
return callback(err2);
|
|
54512
|
+
callback(null, results.sort((a, b) => a.index - b.index).map((v) => v.value));
|
|
54513
|
+
});
|
|
54514
|
+
}
|
|
54515
|
+
function _filter(eachfn, coll, iteratee, callback) {
|
|
54516
|
+
var filter2 = isArrayLike(coll) ? filterArray2 : filterGeneric;
|
|
54517
|
+
return filter2(eachfn, coll, wrapAsync(iteratee), callback);
|
|
54518
|
+
}
|
|
54519
|
+
function filter(coll, iteratee, callback) {
|
|
54520
|
+
return _filter(eachOf$1, coll, iteratee, callback);
|
|
54521
|
+
}
|
|
54522
|
+
var filter$1 = awaitify(filter, 3);
|
|
54523
|
+
function filterLimit(coll, limit, iteratee, callback) {
|
|
54524
|
+
return _filter(eachOfLimit$2(limit), coll, iteratee, callback);
|
|
54525
|
+
}
|
|
54526
|
+
var filterLimit$1 = awaitify(filterLimit, 4);
|
|
54527
|
+
function filterSeries(coll, iteratee, callback) {
|
|
54528
|
+
return _filter(eachOfSeries$1, coll, iteratee, callback);
|
|
54529
|
+
}
|
|
54530
|
+
var filterSeries$1 = awaitify(filterSeries, 3);
|
|
54531
|
+
function forever(fn, errback) {
|
|
54532
|
+
var done = onlyOnce(errback), task = wrapAsync(ensureAsync(fn));
|
|
54533
|
+
function next(err2) {
|
|
54534
|
+
if (err2)
|
|
54535
|
+
return done(err2);
|
|
54536
|
+
err2 !== !1 && task(next);
|
|
54537
|
+
}
|
|
54538
|
+
return next();
|
|
54539
|
+
}
|
|
54540
|
+
var forever$1 = awaitify(forever, 2);
|
|
54541
|
+
function groupByLimit(coll, limit, iteratee, callback) {
|
|
54542
|
+
var _iteratee = wrapAsync(iteratee);
|
|
54543
|
+
return mapLimit$1(coll, limit, (val, iterCb) => {
|
|
54544
|
+
_iteratee(val, (err2, key) => err2 ? iterCb(err2) : iterCb(err2, { key, val }));
|
|
54545
|
+
}, (err2, mapResults) => {
|
|
54546
|
+
for (var result = {}, { hasOwnProperty } = Object.prototype, i = 0; i < mapResults.length; i++)
|
|
54547
|
+
if (mapResults[i]) {
|
|
54548
|
+
var { key } = mapResults[i], { val } = mapResults[i];
|
|
54549
|
+
hasOwnProperty.call(result, key) ? result[key].push(val) : result[key] = [val];
|
|
54550
|
+
}
|
|
54551
|
+
return callback(err2, result);
|
|
54552
|
+
});
|
|
54553
|
+
}
|
|
54554
|
+
var groupByLimit$1 = awaitify(groupByLimit, 4);
|
|
54555
|
+
function groupBy2(coll, iteratee, callback) {
|
|
54556
|
+
return groupByLimit$1(coll, 1 / 0, iteratee, callback);
|
|
54557
|
+
}
|
|
54558
|
+
function groupBySeries(coll, iteratee, callback) {
|
|
54559
|
+
return groupByLimit$1(coll, 1, iteratee, callback);
|
|
54560
|
+
}
|
|
54561
|
+
var log2 = consoleFunc("log");
|
|
54562
|
+
function mapValuesLimit(obj, limit, iteratee, callback) {
|
|
54563
|
+
callback = once(callback);
|
|
54564
|
+
var newObj = {}, _iteratee = wrapAsync(iteratee);
|
|
54565
|
+
return eachOfLimit$2(limit)(obj, (val, key, next) => {
|
|
54566
|
+
_iteratee(val, key, (err2, result) => {
|
|
54567
|
+
if (err2)
|
|
54568
|
+
return next(err2);
|
|
54569
|
+
newObj[key] = result, next(err2);
|
|
54570
|
+
});
|
|
54571
|
+
}, (err2) => callback(err2, newObj));
|
|
54572
|
+
}
|
|
54573
|
+
var mapValuesLimit$1 = awaitify(mapValuesLimit, 4);
|
|
54574
|
+
function mapValues(obj, iteratee, callback) {
|
|
54575
|
+
return mapValuesLimit$1(obj, 1 / 0, iteratee, callback);
|
|
54576
|
+
}
|
|
54577
|
+
function mapValuesSeries(obj, iteratee, callback) {
|
|
54578
|
+
return mapValuesLimit$1(obj, 1, iteratee, callback);
|
|
54579
|
+
}
|
|
54580
|
+
function memoize(fn, hasher = (v) => v) {
|
|
54581
|
+
var memo = /* @__PURE__ */ Object.create(null), queues = /* @__PURE__ */ Object.create(null), _fn = wrapAsync(fn), memoized = initialParams((args, callback) => {
|
|
54582
|
+
var key = hasher(...args);
|
|
54583
|
+
key in memo ? setImmediate$1(() => callback(null, ...memo[key])) : key in queues ? queues[key].push(callback) : (queues[key] = [callback], _fn(...args, (err2, ...resultArgs) => {
|
|
54584
|
+
err2 || (memo[key] = resultArgs);
|
|
54585
|
+
var q = queues[key];
|
|
54586
|
+
delete queues[key];
|
|
54587
|
+
for (var i = 0, l = q.length; i < l; i++)
|
|
54588
|
+
q[i](err2, ...resultArgs);
|
|
54589
|
+
}));
|
|
54590
|
+
});
|
|
54591
|
+
return memoized.memo = memo, memoized.unmemoized = fn, memoized;
|
|
54592
|
+
}
|
|
54593
|
+
var _defer;
|
|
54594
|
+
hasNextTick ? _defer = process.nextTick : hasSetImmediate ? _defer = setImmediate : _defer = fallback;
|
|
54595
|
+
var nextTick = wrap(_defer), _parallel = awaitify((eachfn, tasks, callback) => {
|
|
54596
|
+
var results = isArrayLike(tasks) ? [] : {};
|
|
54597
|
+
eachfn(tasks, (task, key, taskCb) => {
|
|
54598
|
+
wrapAsync(task)((err2, ...result) => {
|
|
54599
|
+
result.length < 2 && ([result] = result), results[key] = result, taskCb(err2);
|
|
54600
|
+
});
|
|
54601
|
+
}, (err2) => callback(err2, results));
|
|
54602
|
+
}, 3);
|
|
54603
|
+
function parallel(tasks, callback) {
|
|
54604
|
+
return _parallel(eachOf$1, tasks, callback);
|
|
54605
|
+
}
|
|
54606
|
+
function parallelLimit(tasks, limit, callback) {
|
|
54607
|
+
return _parallel(eachOfLimit$2(limit), tasks, callback);
|
|
54608
|
+
}
|
|
54609
|
+
function queue(worker, concurrency) {
|
|
54610
|
+
var _worker = wrapAsync(worker);
|
|
54611
|
+
return queue$1((items, cb) => {
|
|
54612
|
+
_worker(items[0], cb);
|
|
54613
|
+
}, concurrency, 1);
|
|
54614
|
+
}
|
|
54615
|
+
class Heap {
|
|
54616
|
+
constructor() {
|
|
54617
|
+
this.heap = [], this.pushCount = Number.MIN_SAFE_INTEGER;
|
|
54618
|
+
}
|
|
54619
|
+
get length() {
|
|
54620
|
+
return this.heap.length;
|
|
54621
|
+
}
|
|
54622
|
+
empty() {
|
|
54623
|
+
return this.heap = [], this;
|
|
54624
|
+
}
|
|
54625
|
+
percUp(index2) {
|
|
54626
|
+
let p;
|
|
54627
|
+
for (; index2 > 0 && smaller(this.heap[index2], this.heap[p = parent(index2)]); ) {
|
|
54628
|
+
let t7 = this.heap[index2];
|
|
54629
|
+
this.heap[index2] = this.heap[p], this.heap[p] = t7, index2 = p;
|
|
54630
|
+
}
|
|
54631
|
+
}
|
|
54632
|
+
percDown(index2) {
|
|
54633
|
+
let l;
|
|
54634
|
+
for (; (l = leftChi(index2)) < this.heap.length && (l + 1 < this.heap.length && smaller(this.heap[l + 1], this.heap[l]) && (l = l + 1), !smaller(this.heap[index2], this.heap[l])); ) {
|
|
54635
|
+
let t7 = this.heap[index2];
|
|
54636
|
+
this.heap[index2] = this.heap[l], this.heap[l] = t7, index2 = l;
|
|
54637
|
+
}
|
|
54638
|
+
}
|
|
54639
|
+
push(node) {
|
|
54640
|
+
node.pushCount = ++this.pushCount, this.heap.push(node), this.percUp(this.heap.length - 1);
|
|
54641
|
+
}
|
|
54642
|
+
unshift(node) {
|
|
54643
|
+
return this.heap.push(node);
|
|
54644
|
+
}
|
|
54645
|
+
shift() {
|
|
54646
|
+
let [top] = this.heap;
|
|
54647
|
+
return this.heap[0] = this.heap[this.heap.length - 1], this.heap.pop(), this.percDown(0), top;
|
|
54648
|
+
}
|
|
54649
|
+
toArray() {
|
|
54650
|
+
return [...this];
|
|
54651
|
+
}
|
|
54652
|
+
*[Symbol.iterator]() {
|
|
54653
|
+
for (let i = 0; i < this.heap.length; i++)
|
|
54654
|
+
yield this.heap[i].data;
|
|
54655
|
+
}
|
|
54656
|
+
remove(testFn) {
|
|
54657
|
+
let j = 0;
|
|
54658
|
+
for (let i = 0; i < this.heap.length; i++)
|
|
54659
|
+
testFn(this.heap[i]) || (this.heap[j] = this.heap[i], j++);
|
|
54660
|
+
this.heap.splice(j);
|
|
54661
|
+
for (let i = parent(this.heap.length - 1); i >= 0; i--)
|
|
54662
|
+
this.percDown(i);
|
|
54663
|
+
return this;
|
|
54664
|
+
}
|
|
54665
|
+
}
|
|
54666
|
+
function leftChi(i) {
|
|
54667
|
+
return (i << 1) + 1;
|
|
54668
|
+
}
|
|
54669
|
+
function parent(i) {
|
|
54670
|
+
return (i + 1 >> 1) - 1;
|
|
54671
|
+
}
|
|
54672
|
+
function smaller(x, y) {
|
|
54673
|
+
return x.priority !== y.priority ? x.priority < y.priority : x.pushCount < y.pushCount;
|
|
54674
|
+
}
|
|
54675
|
+
function priorityQueue(worker, concurrency) {
|
|
54676
|
+
var q = queue(worker, concurrency), {
|
|
54677
|
+
push: push2,
|
|
54678
|
+
pushAsync
|
|
54679
|
+
} = q;
|
|
54680
|
+
q._tasks = new Heap(), q._createTaskItem = ({ data, priority }, callback) => ({
|
|
54681
|
+
data,
|
|
54682
|
+
priority,
|
|
54683
|
+
callback
|
|
54684
|
+
});
|
|
54685
|
+
function createDataItems(tasks, priority) {
|
|
54686
|
+
return Array.isArray(tasks) ? tasks.map((data) => ({ data, priority })) : { data: tasks, priority };
|
|
54687
|
+
}
|
|
54688
|
+
return q.push = function(data, priority = 0, callback) {
|
|
54689
|
+
return push2(createDataItems(data, priority), callback);
|
|
54690
|
+
}, q.pushAsync = function(data, priority = 0, callback) {
|
|
54691
|
+
return pushAsync(createDataItems(data, priority), callback);
|
|
54692
|
+
}, delete q.unshift, delete q.unshiftAsync, q;
|
|
54693
|
+
}
|
|
54694
|
+
function race(tasks, callback) {
|
|
54695
|
+
if (callback = once(callback), !Array.isArray(tasks))
|
|
54696
|
+
return callback(new TypeError("First argument to race must be an array of functions"));
|
|
54697
|
+
if (!tasks.length)
|
|
54698
|
+
return callback();
|
|
54699
|
+
for (var i = 0, l = tasks.length; i < l; i++)
|
|
54700
|
+
wrapAsync(tasks[i])(callback);
|
|
54701
|
+
}
|
|
54702
|
+
var race$1 = awaitify(race, 2);
|
|
54703
|
+
function reduceRight(array, memo, iteratee, callback) {
|
|
54704
|
+
var reversed = [...array].reverse();
|
|
54705
|
+
return reduce$1(reversed, memo, iteratee, callback);
|
|
54706
|
+
}
|
|
54707
|
+
function reflect(fn) {
|
|
54708
|
+
var _fn = wrapAsync(fn);
|
|
54709
|
+
return initialParams(function(args, reflectCallback) {
|
|
54710
|
+
return args.push((error, ...cbArgs) => {
|
|
54711
|
+
let retVal = {};
|
|
54712
|
+
if (error && (retVal.error = error), cbArgs.length > 0) {
|
|
54713
|
+
var value = cbArgs;
|
|
54714
|
+
cbArgs.length <= 1 && ([value] = cbArgs), retVal.value = value;
|
|
54715
|
+
}
|
|
54716
|
+
reflectCallback(null, retVal);
|
|
54717
|
+
}), _fn.apply(this, args);
|
|
54718
|
+
});
|
|
54719
|
+
}
|
|
54720
|
+
function reflectAll(tasks) {
|
|
54721
|
+
var results;
|
|
54722
|
+
return Array.isArray(tasks) ? results = tasks.map(reflect) : (results = {}, Object.keys(tasks).forEach((key) => {
|
|
54723
|
+
results[key] = reflect.call(this, tasks[key]);
|
|
54724
|
+
})), results;
|
|
54725
|
+
}
|
|
54726
|
+
function reject$2(eachfn, arr, _iteratee, callback) {
|
|
54727
|
+
let iteratee = wrapAsync(_iteratee);
|
|
54728
|
+
return _filter(eachfn, arr, (value, cb) => {
|
|
54729
|
+
iteratee(value, (err2, v) => {
|
|
54730
|
+
cb(err2, !v);
|
|
54731
|
+
});
|
|
54732
|
+
}, callback);
|
|
54733
|
+
}
|
|
54734
|
+
function reject(coll, iteratee, callback) {
|
|
54735
|
+
return reject$2(eachOf$1, coll, iteratee, callback);
|
|
54736
|
+
}
|
|
54737
|
+
var reject$1 = awaitify(reject, 3);
|
|
54738
|
+
function rejectLimit(coll, limit, iteratee, callback) {
|
|
54739
|
+
return reject$2(eachOfLimit$2(limit), coll, iteratee, callback);
|
|
54740
|
+
}
|
|
54741
|
+
var rejectLimit$1 = awaitify(rejectLimit, 4);
|
|
54742
|
+
function rejectSeries(coll, iteratee, callback) {
|
|
54743
|
+
return reject$2(eachOfSeries$1, coll, iteratee, callback);
|
|
54744
|
+
}
|
|
54745
|
+
var rejectSeries$1 = awaitify(rejectSeries, 3);
|
|
54746
|
+
function constant(value) {
|
|
54747
|
+
return function() {
|
|
54748
|
+
return value;
|
|
54749
|
+
};
|
|
54750
|
+
}
|
|
54751
|
+
let DEFAULT_TIMES = 5, DEFAULT_INTERVAL = 0;
|
|
54752
|
+
function retry(opts, task, callback) {
|
|
54753
|
+
var options = {
|
|
54754
|
+
times: DEFAULT_TIMES,
|
|
54755
|
+
intervalFunc: constant(DEFAULT_INTERVAL)
|
|
54756
|
+
};
|
|
54757
|
+
if (arguments.length < 3 && typeof opts == "function" ? (callback = task || promiseCallback(), task = opts) : (parseTimes(options, opts), callback = callback || promiseCallback()), typeof task != "function")
|
|
54758
|
+
throw new Error("Invalid arguments for async.retry");
|
|
54759
|
+
var _task = wrapAsync(task), attempt = 1;
|
|
54760
|
+
function retryAttempt() {
|
|
54761
|
+
_task((err2, ...args) => {
|
|
54762
|
+
err2 !== !1 && (err2 && attempt++ < options.times && (typeof options.errorFilter != "function" || options.errorFilter(err2)) ? setTimeout(retryAttempt, options.intervalFunc(attempt - 1)) : callback(err2, ...args));
|
|
54763
|
+
});
|
|
54764
|
+
}
|
|
54765
|
+
return retryAttempt(), callback[PROMISE_SYMBOL];
|
|
54766
|
+
}
|
|
54767
|
+
function parseTimes(acc, t7) {
|
|
54768
|
+
if (typeof t7 == "object")
|
|
54769
|
+
acc.times = +t7.times || DEFAULT_TIMES, acc.intervalFunc = typeof t7.interval == "function" ? t7.interval : constant(+t7.interval || DEFAULT_INTERVAL), acc.errorFilter = t7.errorFilter;
|
|
54770
|
+
else if (typeof t7 == "number" || typeof t7 == "string")
|
|
54771
|
+
acc.times = +t7 || DEFAULT_TIMES;
|
|
54772
|
+
else
|
|
54773
|
+
throw new Error("Invalid arguments for async.retry");
|
|
54774
|
+
}
|
|
54775
|
+
function retryable(opts, task) {
|
|
54776
|
+
task || (task = opts, opts = null);
|
|
54777
|
+
let arity = opts && opts.arity || task.length;
|
|
54778
|
+
isAsync(task) && (arity += 1);
|
|
54779
|
+
var _task = wrapAsync(task);
|
|
54780
|
+
return initialParams((args, callback) => {
|
|
54781
|
+
(args.length < arity - 1 || callback == null) && (args.push(callback), callback = promiseCallback());
|
|
54782
|
+
function taskFn(cb) {
|
|
54783
|
+
_task(...args, cb);
|
|
54784
|
+
}
|
|
54785
|
+
return opts ? retry(opts, taskFn, callback) : retry(taskFn, callback), callback[PROMISE_SYMBOL];
|
|
54786
|
+
});
|
|
54787
|
+
}
|
|
54788
|
+
function series(tasks, callback) {
|
|
54789
|
+
return _parallel(eachOfSeries$1, tasks, callback);
|
|
54790
|
+
}
|
|
54791
|
+
function some(coll, iteratee, callback) {
|
|
54792
|
+
return _createTester(Boolean, (res) => res)(eachOf$1, coll, iteratee, callback);
|
|
54793
|
+
}
|
|
54794
|
+
var some$1 = awaitify(some, 3);
|
|
54795
|
+
function someLimit(coll, limit, iteratee, callback) {
|
|
54796
|
+
return _createTester(Boolean, (res) => res)(eachOfLimit$2(limit), coll, iteratee, callback);
|
|
54797
|
+
}
|
|
54798
|
+
var someLimit$1 = awaitify(someLimit, 4);
|
|
54799
|
+
function someSeries(coll, iteratee, callback) {
|
|
54800
|
+
return _createTester(Boolean, (res) => res)(eachOfSeries$1, coll, iteratee, callback);
|
|
54801
|
+
}
|
|
54802
|
+
var someSeries$1 = awaitify(someSeries, 3);
|
|
54803
|
+
function sortBy3(coll, iteratee, callback) {
|
|
54804
|
+
var _iteratee = wrapAsync(iteratee);
|
|
54805
|
+
return map$1(coll, (x, iterCb) => {
|
|
54806
|
+
_iteratee(x, (err2, criteria) => {
|
|
54807
|
+
if (err2)
|
|
54808
|
+
return iterCb(err2);
|
|
54809
|
+
iterCb(err2, { value: x, criteria });
|
|
54810
|
+
});
|
|
54811
|
+
}, (err2, results) => {
|
|
54812
|
+
if (err2)
|
|
54813
|
+
return callback(err2);
|
|
54814
|
+
callback(null, results.sort(comparator).map((v) => v.value));
|
|
54815
|
+
});
|
|
54816
|
+
function comparator(left, right) {
|
|
54817
|
+
var a = left.criteria, b = right.criteria;
|
|
54818
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
54819
|
+
}
|
|
54820
|
+
}
|
|
54821
|
+
var sortBy$1 = awaitify(sortBy3, 3);
|
|
54822
|
+
function timeout(asyncFn, milliseconds, info2) {
|
|
54823
|
+
var fn = wrapAsync(asyncFn);
|
|
54824
|
+
return initialParams((args, callback) => {
|
|
54825
|
+
var timedOut = !1, timer;
|
|
54826
|
+
function timeoutCallback() {
|
|
54827
|
+
var name = asyncFn.name || "anonymous", error = new Error('Callback function "' + name + '" timed out.');
|
|
54828
|
+
error.code = "ETIMEDOUT", info2 && (error.info = info2), timedOut = !0, callback(error);
|
|
54829
|
+
}
|
|
54830
|
+
args.push((...cbArgs) => {
|
|
54831
|
+
timedOut || (callback(...cbArgs), clearTimeout(timer));
|
|
54832
|
+
}), timer = setTimeout(timeoutCallback, milliseconds), fn(...args);
|
|
54833
|
+
});
|
|
54834
|
+
}
|
|
54835
|
+
function range(size) {
|
|
54836
|
+
for (var result = Array(size); size--; )
|
|
54837
|
+
result[size] = size;
|
|
54838
|
+
return result;
|
|
54839
|
+
}
|
|
54840
|
+
function timesLimit(count, limit, iteratee, callback) {
|
|
54841
|
+
var _iteratee = wrapAsync(iteratee);
|
|
54842
|
+
return mapLimit$1(range(count), limit, _iteratee, callback);
|
|
54843
|
+
}
|
|
54844
|
+
function times(n, iteratee, callback) {
|
|
54845
|
+
return timesLimit(n, 1 / 0, iteratee, callback);
|
|
54846
|
+
}
|
|
54847
|
+
function timesSeries(n, iteratee, callback) {
|
|
54848
|
+
return timesLimit(n, 1, iteratee, callback);
|
|
54849
|
+
}
|
|
54850
|
+
function transform2(coll, accumulator, iteratee, callback) {
|
|
54851
|
+
arguments.length <= 3 && typeof accumulator == "function" && (callback = iteratee, iteratee = accumulator, accumulator = Array.isArray(coll) ? [] : {}), callback = once(callback || promiseCallback());
|
|
54852
|
+
var _iteratee = wrapAsync(iteratee);
|
|
54853
|
+
return eachOf$1(coll, (v, k, cb) => {
|
|
54854
|
+
_iteratee(accumulator, v, k, cb);
|
|
54855
|
+
}, (err2) => callback(err2, accumulator)), callback[PROMISE_SYMBOL];
|
|
54856
|
+
}
|
|
54857
|
+
function tryEach(tasks, callback) {
|
|
54858
|
+
var error = null, result;
|
|
54859
|
+
return eachSeries$1(tasks, (task, taskCb) => {
|
|
54860
|
+
wrapAsync(task)((err2, ...args) => {
|
|
54861
|
+
if (err2 === !1)
|
|
54862
|
+
return taskCb(err2);
|
|
54863
|
+
args.length < 2 ? [result] = args : result = args, error = err2, taskCb(err2 ? null : {});
|
|
54864
|
+
});
|
|
54865
|
+
}, () => callback(error, result));
|
|
54866
|
+
}
|
|
54867
|
+
var tryEach$1 = awaitify(tryEach);
|
|
54868
|
+
function unmemoize(fn) {
|
|
54869
|
+
return (...args) => (fn.unmemoized || fn)(...args);
|
|
54870
|
+
}
|
|
54871
|
+
function whilst(test, iteratee, callback) {
|
|
54872
|
+
callback = onlyOnce(callback);
|
|
54873
|
+
var _fn = wrapAsync(iteratee), _test = wrapAsync(test), results = [];
|
|
54874
|
+
function next(err2, ...rest) {
|
|
54875
|
+
if (err2)
|
|
54876
|
+
return callback(err2);
|
|
54877
|
+
results = rest, err2 !== !1 && _test(check2);
|
|
54878
|
+
}
|
|
54879
|
+
function check2(err2, truth) {
|
|
54880
|
+
if (err2)
|
|
54881
|
+
return callback(err2);
|
|
54882
|
+
if (err2 !== !1) {
|
|
54883
|
+
if (!truth)
|
|
54884
|
+
return callback(null, ...results);
|
|
54885
|
+
_fn(next);
|
|
54886
|
+
}
|
|
54887
|
+
}
|
|
54888
|
+
return _test(check2);
|
|
54889
|
+
}
|
|
54890
|
+
var whilst$1 = awaitify(whilst, 3);
|
|
54891
|
+
function until(test, iteratee, callback) {
|
|
54892
|
+
let _test = wrapAsync(test);
|
|
54893
|
+
return whilst$1((cb) => _test((err2, truth) => cb(err2, !truth)), iteratee, callback);
|
|
54894
|
+
}
|
|
54895
|
+
function waterfall(tasks, callback) {
|
|
54896
|
+
if (callback = once(callback), !Array.isArray(tasks))
|
|
54897
|
+
return callback(new Error("First argument to waterfall must be an array of functions"));
|
|
54898
|
+
if (!tasks.length)
|
|
54899
|
+
return callback();
|
|
54900
|
+
var taskIndex = 0;
|
|
54901
|
+
function nextTask(args) {
|
|
54902
|
+
var task = wrapAsync(tasks[taskIndex++]);
|
|
54903
|
+
task(...args, onlyOnce(next));
|
|
54904
|
+
}
|
|
54905
|
+
function next(err2, ...args) {
|
|
54906
|
+
if (err2 !== !1) {
|
|
54907
|
+
if (err2 || taskIndex === tasks.length)
|
|
54908
|
+
return callback(err2, ...args);
|
|
54909
|
+
nextTask(args);
|
|
54910
|
+
}
|
|
54911
|
+
}
|
|
54912
|
+
nextTask([]);
|
|
54913
|
+
}
|
|
54914
|
+
var waterfall$1 = awaitify(waterfall), index = {
|
|
54915
|
+
apply,
|
|
54916
|
+
applyEach,
|
|
54917
|
+
applyEachSeries,
|
|
54918
|
+
asyncify,
|
|
54919
|
+
auto,
|
|
54920
|
+
autoInject,
|
|
54921
|
+
cargo: cargo$1,
|
|
54922
|
+
cargoQueue: cargo,
|
|
54923
|
+
compose,
|
|
54924
|
+
concat: concat$1,
|
|
54925
|
+
concatLimit: concatLimit$1,
|
|
54926
|
+
concatSeries: concatSeries$1,
|
|
54927
|
+
constant: constant$1,
|
|
54928
|
+
detect: detect$1,
|
|
54929
|
+
detectLimit: detectLimit$1,
|
|
54930
|
+
detectSeries: detectSeries$1,
|
|
54931
|
+
dir,
|
|
54932
|
+
doUntil,
|
|
54933
|
+
doWhilst: doWhilst$1,
|
|
54934
|
+
each,
|
|
54935
|
+
eachLimit: eachLimit$1,
|
|
54936
|
+
eachOf: eachOf$1,
|
|
54937
|
+
eachOfLimit: eachOfLimit$1,
|
|
54938
|
+
eachOfSeries: eachOfSeries$1,
|
|
54939
|
+
eachSeries: eachSeries$1,
|
|
54940
|
+
ensureAsync,
|
|
54941
|
+
every: every$1,
|
|
54942
|
+
everyLimit: everyLimit$1,
|
|
54943
|
+
everySeries: everySeries$1,
|
|
54944
|
+
filter: filter$1,
|
|
54945
|
+
filterLimit: filterLimit$1,
|
|
54946
|
+
filterSeries: filterSeries$1,
|
|
54947
|
+
forever: forever$1,
|
|
54948
|
+
groupBy: groupBy2,
|
|
54949
|
+
groupByLimit: groupByLimit$1,
|
|
54950
|
+
groupBySeries,
|
|
54951
|
+
log: log2,
|
|
54952
|
+
map: map$1,
|
|
54953
|
+
mapLimit: mapLimit$1,
|
|
54954
|
+
mapSeries: mapSeries$1,
|
|
54955
|
+
mapValues,
|
|
54956
|
+
mapValuesLimit: mapValuesLimit$1,
|
|
54957
|
+
mapValuesSeries,
|
|
54958
|
+
memoize,
|
|
54959
|
+
nextTick,
|
|
54960
|
+
parallel,
|
|
54961
|
+
parallelLimit,
|
|
54962
|
+
priorityQueue,
|
|
54963
|
+
queue,
|
|
54964
|
+
race: race$1,
|
|
54965
|
+
reduce: reduce$1,
|
|
54966
|
+
reduceRight,
|
|
54967
|
+
reflect,
|
|
54968
|
+
reflectAll,
|
|
54969
|
+
reject: reject$1,
|
|
54970
|
+
rejectLimit: rejectLimit$1,
|
|
54971
|
+
rejectSeries: rejectSeries$1,
|
|
54972
|
+
retry,
|
|
54973
|
+
retryable,
|
|
54974
|
+
seq,
|
|
54975
|
+
series,
|
|
54976
|
+
setImmediate: setImmediate$1,
|
|
54977
|
+
some: some$1,
|
|
54978
|
+
someLimit: someLimit$1,
|
|
54979
|
+
someSeries: someSeries$1,
|
|
54980
|
+
sortBy: sortBy$1,
|
|
54981
|
+
timeout,
|
|
54982
|
+
times,
|
|
54983
|
+
timesLimit,
|
|
54984
|
+
timesSeries,
|
|
54985
|
+
transform: transform2,
|
|
54986
|
+
tryEach: tryEach$1,
|
|
54987
|
+
unmemoize,
|
|
54988
|
+
until,
|
|
54989
|
+
waterfall: waterfall$1,
|
|
54990
|
+
whilst: whilst$1,
|
|
54991
|
+
// aliases
|
|
54992
|
+
all: every$1,
|
|
54993
|
+
allLimit: everyLimit$1,
|
|
54994
|
+
allSeries: everySeries$1,
|
|
54995
|
+
any: some$1,
|
|
54996
|
+
anyLimit: someLimit$1,
|
|
54997
|
+
anySeries: someSeries$1,
|
|
54998
|
+
find: detect$1,
|
|
54999
|
+
findLimit: detectLimit$1,
|
|
55000
|
+
findSeries: detectSeries$1,
|
|
55001
|
+
flatMap: concat$1,
|
|
55002
|
+
flatMapLimit: concatLimit$1,
|
|
55003
|
+
flatMapSeries: concatSeries$1,
|
|
55004
|
+
forEach: each,
|
|
55005
|
+
forEachSeries: eachSeries$1,
|
|
55006
|
+
forEachLimit: eachLimit$1,
|
|
55007
|
+
forEachOf: eachOf$1,
|
|
55008
|
+
forEachOfSeries: eachOfSeries$1,
|
|
55009
|
+
forEachOfLimit: eachOfLimit$1,
|
|
55010
|
+
inject: reduce$1,
|
|
55011
|
+
foldl: reduce$1,
|
|
55012
|
+
foldr: reduceRight,
|
|
55013
|
+
select: filter$1,
|
|
55014
|
+
selectLimit: filterLimit$1,
|
|
55015
|
+
selectSeries: filterSeries$1,
|
|
55016
|
+
wrapSync: asyncify,
|
|
55017
|
+
during: whilst$1,
|
|
55018
|
+
doDuring: doWhilst$1
|
|
55019
|
+
};
|
|
55020
|
+
exports2.all = every$1, exports2.allLimit = everyLimit$1, exports2.allSeries = everySeries$1, exports2.any = some$1, exports2.anyLimit = someLimit$1, exports2.anySeries = someSeries$1, exports2.apply = apply, exports2.applyEach = applyEach, exports2.applyEachSeries = applyEachSeries, exports2.asyncify = asyncify, exports2.auto = auto, exports2.autoInject = autoInject, exports2.cargo = cargo$1, exports2.cargoQueue = cargo, exports2.compose = compose, exports2.concat = concat$1, exports2.concatLimit = concatLimit$1, exports2.concatSeries = concatSeries$1, exports2.constant = constant$1, exports2.default = index, exports2.detect = detect$1, exports2.detectLimit = detectLimit$1, exports2.detectSeries = detectSeries$1, exports2.dir = dir, exports2.doDuring = doWhilst$1, exports2.doUntil = doUntil, exports2.doWhilst = doWhilst$1, exports2.during = whilst$1, exports2.each = each, exports2.eachLimit = eachLimit$1, exports2.eachOf = eachOf$1, exports2.eachOfLimit = eachOfLimit$1, exports2.eachOfSeries = eachOfSeries$1, exports2.eachSeries = eachSeries$1, exports2.ensureAsync = ensureAsync, exports2.every = every$1, exports2.everyLimit = everyLimit$1, exports2.everySeries = everySeries$1, exports2.filter = filter$1, exports2.filterLimit = filterLimit$1, exports2.filterSeries = filterSeries$1, exports2.find = detect$1, exports2.findLimit = detectLimit$1, exports2.findSeries = detectSeries$1, exports2.flatMap = concat$1, exports2.flatMapLimit = concatLimit$1, exports2.flatMapSeries = concatSeries$1, exports2.foldl = reduce$1, exports2.foldr = reduceRight, exports2.forEach = each, exports2.forEachLimit = eachLimit$1, exports2.forEachOf = eachOf$1, exports2.forEachOfLimit = eachOfLimit$1, exports2.forEachOfSeries = eachOfSeries$1, exports2.forEachSeries = eachSeries$1, exports2.forever = forever$1, exports2.groupBy = groupBy2, exports2.groupByLimit = groupByLimit$1, exports2.groupBySeries = groupBySeries, exports2.inject = reduce$1, exports2.log = log2, exports2.map = map$1, exports2.mapLimit = mapLimit$1, exports2.mapSeries = mapSeries$1, exports2.mapValues = mapValues, exports2.mapValuesLimit = mapValuesLimit$1, exports2.mapValuesSeries = mapValuesSeries, exports2.memoize = memoize, exports2.nextTick = nextTick, exports2.parallel = parallel, exports2.parallelLimit = parallelLimit, exports2.priorityQueue = priorityQueue, exports2.queue = queue, exports2.race = race$1, exports2.reduce = reduce$1, exports2.reduceRight = reduceRight, exports2.reflect = reflect, exports2.reflectAll = reflectAll, exports2.reject = reject$1, exports2.rejectLimit = rejectLimit$1, exports2.rejectSeries = rejectSeries$1, exports2.retry = retry, exports2.retryable = retryable, exports2.select = filter$1, exports2.selectLimit = filterLimit$1, exports2.selectSeries = filterSeries$1, exports2.seq = seq, exports2.series = series, exports2.setImmediate = setImmediate$1, exports2.some = some$1, exports2.someLimit = someLimit$1, exports2.someSeries = someSeries$1, exports2.sortBy = sortBy$1, exports2.timeout = timeout, exports2.times = times, exports2.timesLimit = timesLimit, exports2.timesSeries = timesSeries, exports2.transform = transform2, exports2.tryEach = tryEach$1, exports2.unmemoize = unmemoize, exports2.until = until, exports2.waterfall = waterfall$1, exports2.whilst = whilst$1, exports2.wrapSync = asyncify, Object.defineProperty(exports2, "__esModule", { value: !0 });
|
|
53623
55021
|
});
|
|
53624
55022
|
}
|
|
53625
55023
|
});
|
|
@@ -144597,7 +145995,7 @@ import { fileURLToPath } from "url";
|
|
|
144597
145995
|
async function warnIfOldNodeVersion() {
|
|
144598
145996
|
let nodeVersion = process.versions.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
|
|
144599
145997
|
if (nodeMajorVersion < 18) {
|
|
144600
|
-
let { renderWarning: renderWarning2 } = await import("./ui-
|
|
145998
|
+
let { renderWarning: renderWarning2 } = await import("./ui-WB42ZV4M.js");
|
|
144601
145999
|
renderWarning2({
|
|
144602
146000
|
headline: "Upgrade to a supported Node version now.",
|
|
144603
146001
|
body: [
|
|
@@ -144622,7 +146020,7 @@ function forceNoColor() {
|
|
|
144622
146020
|
}
|
|
144623
146021
|
async function runCLI(options) {
|
|
144624
146022
|
setupEnvironmentVariables(options), forceNoColor(), await warnIfOldNodeVersion();
|
|
144625
|
-
let { errorHandler: errorHandler2 } = await import("./error-handler-
|
|
146023
|
+
let { errorHandler: errorHandler2 } = await import("./error-handler-IL72ACEX.js"), { isDevelopment } = await import("./local-OE2I46PA.js"), oclif = await import("./lib-JHUCJTHS.js"), { ShopifyConfig } = await import("./custom-oclif-loader-TBU3GENB.js");
|
|
144626
146024
|
isDevelopment() && (oclif.default.settings.debug = !0);
|
|
144627
146025
|
try {
|
|
144628
146026
|
let config2 = new ShopifyConfig({ root: fileURLToPath(options.moduleURL) });
|
|
@@ -144632,7 +146030,7 @@ async function runCLI(options) {
|
|
|
144632
146030
|
}
|
|
144633
146031
|
}
|
|
144634
146032
|
async function useLocalCLIIfDetected(filepath) {
|
|
144635
|
-
let { environmentVariables } = await import("./constants-T7JXE5K7.js"), { joinPath: join6 } = await import("./path-T2RCZTRE.js"), { exec: exec2 } = await import("./system-
|
|
146033
|
+
let { environmentVariables } = await import("./constants-T7JXE5K7.js"), { joinPath: join6 } = await import("./path-T2RCZTRE.js"), { exec: exec2 } = await import("./system-SGABHAU2.js");
|
|
144636
146034
|
if (!isTruthy(process.env[environmentVariables.enableCliRedirect]) || isTruthy(process.env[environmentVariables.skipCliRedirect]) || process.env.npm_config_user_agent)
|
|
144637
146035
|
return !1;
|
|
144638
146036
|
let cliPackage = await localCliPackage();
|
|
@@ -144652,7 +146050,7 @@ async function useLocalCLIIfDetected(filepath) {
|
|
|
144652
146050
|
return !0;
|
|
144653
146051
|
}
|
|
144654
146052
|
async function localCliPackage() {
|
|
144655
|
-
let { captureOutput } = await import("./system-
|
|
146053
|
+
let { captureOutput } = await import("./system-SGABHAU2.js"), npmListOutput = "", localShopifyCLI = {};
|
|
144656
146054
|
try {
|
|
144657
146055
|
npmListOutput = await captureOutput("npm", ["list", "@shopify/cli", "--json", "-l"]), localShopifyCLI = JSON.parse(npmListOutput);
|
|
144658
146056
|
} catch {
|
|
@@ -150554,14 +151952,14 @@ var COMMANDS = {
|
|
|
150554
151952
|
"theme:share": share_default
|
|
150555
151953
|
}, dist_default = COMMANDS;
|
|
150556
151954
|
|
|
150557
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
151955
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/index.js
|
|
150558
151956
|
init_cjs_shims();
|
|
150559
151957
|
|
|
150560
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
151958
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/build.js
|
|
150561
151959
|
init_cjs_shims();
|
|
150562
151960
|
var import_core16 = __toESM(require_lib(), 1);
|
|
150563
151961
|
|
|
150564
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
151962
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/template-diff.js
|
|
150565
151963
|
init_cjs_shims();
|
|
150566
151964
|
import { symlink, cp } from "node:fs/promises";
|
|
150567
151965
|
async function prepareDiffDirectory(diffDirectory, watch) {
|
|
@@ -150737,10 +152135,10 @@ async function applyTemplateDiff(targetDirectory, diffDirectory, templateDir) {
|
|
|
150737
152135
|
}), await mergeTsConfig(diffDirectory, targetDirectory);
|
|
150738
152136
|
}
|
|
150739
152137
|
|
|
150740
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152138
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/check-lockfile.js
|
|
150741
152139
|
init_cjs_shims();
|
|
150742
152140
|
|
|
150743
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152141
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/package-managers.js
|
|
150744
152142
|
init_cjs_shims();
|
|
150745
152143
|
var packageManagers = [
|
|
150746
152144
|
{
|
|
@@ -150765,7 +152163,7 @@ var packageManagers = [
|
|
|
150765
152163
|
}
|
|
150766
152164
|
];
|
|
150767
152165
|
|
|
150768
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152166
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/check-lockfile.js
|
|
150769
152167
|
function missingLockfileWarning(shouldExit) {
|
|
150770
152168
|
let headline = "No lockfile found", body = "If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.", nextSteps = [
|
|
150771
152169
|
[
|
|
@@ -150816,8 +152214,19 @@ async function checkLockfileStatus(directory, shouldExit = !1) {
|
|
|
150816
152214
|
]).catch(() => [])).length > 0 && lockfileIgnoredWarning(lockfile2);
|
|
150817
152215
|
}
|
|
150818
152216
|
|
|
150819
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152217
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/route-validator.js
|
|
150820
152218
|
init_cjs_shims();
|
|
152219
|
+
var RESERVED_ROUTES = ["^api/[^/]+/graphql.json", "^cdn/", "^_t/"];
|
|
152220
|
+
function findReservedRoutes(config2) {
|
|
152221
|
+
let routes = /* @__PURE__ */ new Set();
|
|
152222
|
+
return Object.values(config2.routes).filter(
|
|
152223
|
+
(route) => RESERVED_ROUTES.some(
|
|
152224
|
+
(pattern) => new RegExp(pattern).test(route.path ?? "")
|
|
152225
|
+
)
|
|
152226
|
+
).forEach((route) => {
|
|
152227
|
+
route.path && routes.add(route.path);
|
|
152228
|
+
}), [...routes];
|
|
152229
|
+
}
|
|
150821
152230
|
var REQUIRED_ROUTES = [
|
|
150822
152231
|
"",
|
|
150823
152232
|
"cart",
|
|
@@ -150893,11 +152302,22 @@ Including these routes improves compatibility with Shopify\u2019s platform:
|
|
|
150893
152302
|
headline: "All standard Shopify routes present"
|
|
150894
152303
|
});
|
|
150895
152304
|
}
|
|
152305
|
+
function warnReservedRoutes(routes) {
|
|
152306
|
+
routes.length && renderWarning({
|
|
152307
|
+
headline: "Reserved routes present",
|
|
152308
|
+
body: `Your Hydrogen project is using ${routes.length} reserved route${routes.length > 1 ? "s" : ""}.
|
|
152309
|
+
These routes are reserved by Shopify and may cause issues with your storefront:
|
|
152310
|
+
|
|
152311
|
+
` + routes.slice(0, LINE_LIMIT - (routes.length <= LINE_LIMIT ? 0 : 1)).map((route) => `\u2022 /${route}`).join(`
|
|
152312
|
+
`) + (routes.length > LINE_LIMIT ? `
|
|
152313
|
+
\u2022 ...and ${routes.length - LINE_LIMIT + 1} more` : "")
|
|
152314
|
+
});
|
|
152315
|
+
}
|
|
150896
152316
|
|
|
150897
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152317
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/classic-compiler/build.js
|
|
150898
152318
|
init_cjs_shims();
|
|
150899
152319
|
|
|
150900
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152320
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/codegen.js
|
|
150901
152321
|
init_cjs_shims();
|
|
150902
152322
|
import { spawn } from "node:child_process";
|
|
150903
152323
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
@@ -151130,7 +152550,7 @@ async function addHooksToHydrogenOptions(codegenConfig, { rootDirectory }) {
|
|
|
151130
152550
|
}
|
|
151131
152551
|
}
|
|
151132
152552
|
|
|
151133
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152553
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/bundle/analyzer.js
|
|
151134
152554
|
init_cjs_shims();
|
|
151135
152555
|
var BUNDLE_ANALYZER_JSON_FILE = "metafile.server.json", BUNDLE_ANALYZER_HTML_FILE = "server-bundle-analyzer.html";
|
|
151136
152556
|
async function classicBuildBundleAnalysis(buildPath) {
|
|
@@ -151205,14 +152625,14 @@ function classicGetBundleAnalysisSummary(bundlePath) {
|
|
|
151205
152625
|
return getBundleAnalysisSummary(dirname(bundlePath));
|
|
151206
152626
|
}
|
|
151207
152627
|
|
|
151208
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152628
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/is-ci.js
|
|
151209
152629
|
init_cjs_shims();
|
|
151210
152630
|
function isCI() {
|
|
151211
152631
|
let { env } = process;
|
|
151212
152632
|
return env.CI === "false" ? !1 : !!(env.CI || env.CI_NAME || env.BUILD_NUMBER || env.TF_BUILD);
|
|
151213
152633
|
}
|
|
151214
152634
|
|
|
151215
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152635
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/classic-compiler/build.js
|
|
151216
152636
|
var LOG_WORKER_BUILT = "\u{1F4E6} Worker built", WORKER_BUILD_SIZE_LIMIT = 5;
|
|
151217
152637
|
async function runClassicCompilerBuild({
|
|
151218
152638
|
directory,
|
|
@@ -151309,7 +152729,7 @@ async function copyPublicFiles(publicPath, buildPathClient) {
|
|
|
151309
152729
|
return copyFile(publicPath, buildPathClient);
|
|
151310
152730
|
}
|
|
151311
152731
|
|
|
151312
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152732
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/bundle/vite-plugin.js
|
|
151313
152733
|
init_cjs_shims();
|
|
151314
152734
|
function hydrogenBundleAnalyzer(pluginOptions) {
|
|
151315
152735
|
let config2;
|
|
@@ -151437,7 +152857,7 @@ function createImportsMeta(ids, kind, root, resolveImportString, code) {
|
|
|
151437
152857
|
}));
|
|
151438
152858
|
}
|
|
151439
152859
|
|
|
151440
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152860
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/defer.js
|
|
151441
152861
|
init_cjs_shims();
|
|
151442
152862
|
function deferPromise() {
|
|
151443
152863
|
let deferred = { state: "pending" };
|
|
@@ -151446,7 +152866,7 @@ function deferPromise() {
|
|
|
151446
152866
|
}), deferred;
|
|
151447
152867
|
}
|
|
151448
152868
|
|
|
151449
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152869
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/resource-cleanup.js
|
|
151450
152870
|
init_cjs_shims();
|
|
151451
152871
|
function setupResourceCleanup(cleanup2) {
|
|
151452
152872
|
let closingPromise, processExit = process.exit;
|
|
@@ -151457,7 +152877,7 @@ function setupResourceCleanup(cleanup2) {
|
|
|
151457
152877
|
};
|
|
151458
152878
|
}
|
|
151459
152879
|
|
|
151460
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
152880
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/build.js
|
|
151461
152881
|
var Build = class _Build extends base_command_default {
|
|
151462
152882
|
static descriptionWithMarkdown = "Builds a Hydrogen storefront for production. The client and app worker files are compiled to a `/dist` folder in your Hydrogen project directory.";
|
|
151463
152883
|
static description = "Builds a Hydrogen storefront for production.";
|
|
@@ -151635,7 +153055,7 @@ This build is missing ${missingRoutes.length} route${missingRoutes.length > 1 ?
|
|
|
151635
153055
|
);
|
|
151636
153056
|
}
|
|
151637
153057
|
}
|
|
151638
|
-
return {
|
|
153058
|
+
return !watch && !disableRouteWarning && warnReservedRoutes(findReservedRoutes(remixConfig)), {
|
|
151639
153059
|
async close() {
|
|
151640
153060
|
codegenProcess?.removeAllListeners("close"), codegenProcess?.kill("SIGINT");
|
|
151641
153061
|
let promises = [];
|
|
@@ -151646,7 +153066,7 @@ This build is missing ${missingRoutes.length} route${missingRoutes.length > 1 ?
|
|
|
151646
153066
|
};
|
|
151647
153067
|
}
|
|
151648
153068
|
|
|
151649
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
153069
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/check.js
|
|
151650
153070
|
init_cjs_shims();
|
|
151651
153071
|
var import_core17 = __toESM(require_lib(), 1), GenerateRoute = class _GenerateRoute extends base_command_default {
|
|
151652
153072
|
static descriptionWithMarkdown = "Checks whether your Hydrogen app includes a set of standard Shopify routes.";
|
|
@@ -151672,10 +153092,10 @@ var import_core17 = __toESM(require_lib(), 1), GenerateRoute = class _GenerateRo
|
|
|
151672
153092
|
};
|
|
151673
153093
|
async function runCheckRoutes({ directory }) {
|
|
151674
153094
|
let remixConfig = await getRemixConfig(directory);
|
|
151675
|
-
logMissingRoutes(findMissingRoutes(remixConfig));
|
|
153095
|
+
logMissingRoutes(findMissingRoutes(remixConfig)), warnReservedRoutes(findReservedRoutes(remixConfig));
|
|
151676
153096
|
}
|
|
151677
153097
|
|
|
151678
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
153098
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/codegen.js
|
|
151679
153099
|
init_cjs_shims();
|
|
151680
153100
|
var import_core18 = __toESM(require_lib(), 1);
|
|
151681
153101
|
var Codegen = class _Codegen extends base_command_default {
|
|
@@ -151734,11 +153154,11 @@ async function runCodegen({
|
|
|
151734
153154
|
});
|
|
151735
153155
|
}
|
|
151736
153156
|
|
|
151737
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
153157
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/debug/cpu.js
|
|
151738
153158
|
init_cjs_shims();
|
|
151739
153159
|
var import_core19 = __toESM(require_lib(), 1);
|
|
151740
153160
|
|
|
151741
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
153161
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/classic-compiler/debug-cpu.js
|
|
151742
153162
|
init_cjs_shims();
|
|
151743
153163
|
async function runClassicCompilerDebugCpu({
|
|
151744
153164
|
directory,
|
|
@@ -151781,7 +153201,7 @@ Build failed, waiting for changes to restart...`);
|
|
|
151781
153201
|
};
|
|
151782
153202
|
}
|
|
151783
153203
|
|
|
151784
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
153204
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/cpu-profiler.js
|
|
151785
153205
|
init_cjs_shims();
|
|
151786
153206
|
import { Session } from "node:inspector";
|
|
151787
153207
|
async function createCpuStartupProfiler(root) {
|
|
@@ -151859,7 +153279,7 @@ function silenceNode(node) {
|
|
|
151859
153279
|
});
|
|
151860
153280
|
}
|
|
151861
153281
|
|
|
151862
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
153282
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/debug/cpu.js
|
|
151863
153283
|
var DEFAULT_OUTPUT_PATH = "startup.cpuprofile", DebugCpu = class _DebugCpu extends base_command_default {
|
|
151864
153284
|
static descriptionWithMarkdown = "Builds the app and runs the resulting code to profile the server startup time, watching for changes. This command can be used to [debug slow app startup times](https://shopify.dev/docs/custom-storefronts/hydrogen/debugging/cpu-startup) that cause failed deployments in Oxygen.\n\n The profiling results are written to a `.cpuprofile` file that can be viewed with certain tools such as [Flame Chart Visualizer for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-js-profile-flame).";
|
|
151865
153285
|
static description = "Builds and profiles the server startup time the app.";
|
|
@@ -151937,14 +153357,14 @@ Waiting for changes...`);
|
|
|
151937
153357
|
};
|
|
151938
153358
|
}
|
|
151939
153359
|
|
|
151940
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
153360
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/deploy.js
|
|
151941
153361
|
init_cjs_shims();
|
|
151942
153362
|
var import_core20 = __toESM(require_lib(), 1);
|
|
151943
153363
|
|
|
151944
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153364
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/index.js
|
|
151945
153365
|
init_cjs_shims();
|
|
151946
153366
|
|
|
151947
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153367
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/utils/utils.js
|
|
151948
153368
|
init_cjs_shims();
|
|
151949
153369
|
import fs2 from "fs";
|
|
151950
153370
|
import path, { dirname as dirname2 } from "path";
|
|
@@ -152051,7 +153471,7 @@ function convertKeysToCamelCase(obj) {
|
|
|
152051
153471
|
}, {}) : obj;
|
|
152052
153472
|
}
|
|
152053
153473
|
|
|
152054
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153474
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/utils/bugsnag.js
|
|
152055
153475
|
init_cjs_shims();
|
|
152056
153476
|
var import_node = __toESM(require_bugsnag(), 1);
|
|
152057
153477
|
var BugsnagClient;
|
|
@@ -152088,7 +153508,7 @@ function sanitizeError(error, rootPath) {
|
|
|
152088
153508
|
return replaceRootPath(error);
|
|
152089
153509
|
}
|
|
152090
153510
|
|
|
152091
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153511
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/utils/metrics-exporter.js
|
|
152092
153512
|
init_cjs_shims();
|
|
152093
153513
|
var MetricName = /* @__PURE__ */ ((MetricName2) => (MetricName2.BuildTime = "build_time", MetricName2.NumFilesRequested = "num_files_requested", MetricName2.NumFilesUploaded = "num_files_uploaded", MetricName2.TotalSizeUploaded = "total_size_uploaded", MetricName2.TotalSizeRequested = "total_size_requested", MetricName2.TotalTime = "total_time", MetricName2.UploadTime = "upload_time", MetricName2.DeploymentCompletedTime = "deployment_completed_time", MetricName2.DeploymentRoutableTime = "deployment_routable_time", MetricName2))(MetricName || {}), MetricsExporter = class {
|
|
152094
153514
|
metrics = {};
|
|
@@ -152137,10 +153557,10 @@ var MetricName = /* @__PURE__ */ ((MetricName2) => (MetricName2.BuildTime = "bui
|
|
|
152137
153557
|
}
|
|
152138
153558
|
};
|
|
152139
153559
|
|
|
152140
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153560
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/build-initiate.js
|
|
152141
153561
|
init_cjs_shims();
|
|
152142
153562
|
|
|
152143
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153563
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/graphql/build-initiate.js
|
|
152144
153564
|
init_cjs_shims();
|
|
152145
153565
|
var BuildInitiateQuery = `
|
|
152146
153566
|
mutation BuildInitiate($environment: EnvironmentSelectorInput, $labels: [String!]) {
|
|
@@ -152156,7 +153576,7 @@ var BuildInitiateQuery = `
|
|
|
152156
153576
|
}
|
|
152157
153577
|
`;
|
|
152158
153578
|
|
|
152159
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153579
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/build-initiate.js
|
|
152160
153580
|
async function buildInitiate(options) {
|
|
152161
153581
|
let { config: config2, logger, environment, labels = [] } = options, variables = {
|
|
152162
153582
|
environment,
|
|
@@ -152186,10 +153606,10 @@ async function buildInitiate(options) {
|
|
|
152186
153606
|
}
|
|
152187
153607
|
}
|
|
152188
153608
|
|
|
152189
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153609
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/build-cancel.js
|
|
152190
153610
|
init_cjs_shims();
|
|
152191
153611
|
|
|
152192
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153612
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/graphql/build-cancel.js
|
|
152193
153613
|
init_cjs_shims();
|
|
152194
153614
|
var BuildCancelQuery = `
|
|
152195
153615
|
mutation BuildCancel($buildId: ID!, $reason: String!) {
|
|
@@ -152204,7 +153624,7 @@ var BuildCancelQuery = `
|
|
|
152204
153624
|
}
|
|
152205
153625
|
`;
|
|
152206
153626
|
|
|
152207
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153627
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/build-cancel.js
|
|
152208
153628
|
async function buildCancel(options) {
|
|
152209
153629
|
let { config: config2, buildId, reason, logger } = options, variables = {
|
|
152210
153630
|
buildId,
|
|
@@ -152231,16 +153651,16 @@ async function buildCancel(options) {
|
|
|
152231
153651
|
}
|
|
152232
153652
|
}
|
|
152233
153653
|
|
|
152234
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153654
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/get-upload-files.js
|
|
152235
153655
|
init_cjs_shims();
|
|
152236
153656
|
|
|
152237
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153657
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/types.js
|
|
152238
153658
|
init_cjs_shims();
|
|
152239
153659
|
var FileType = /* @__PURE__ */ ((FileType2) => (FileType2.Worker = "WORKER", FileType2.Asset = "ASSET", FileType2))(FileType || {}), VerificationError = class extends Error {
|
|
152240
153660
|
}, DeploymentCompletedVerificationError = class extends Error {
|
|
152241
153661
|
};
|
|
152242
153662
|
|
|
152243
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153663
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/get-upload-files.js
|
|
152244
153664
|
async function getUploadFiles(config2, metricsExporter) {
|
|
152245
153665
|
let workerPath = joinPath(config2.rootPath, config2.workerDir), workerFiles = await glob(`${workerPath}/**`), manifest = createManifestEntries({
|
|
152246
153666
|
files: workerFiles,
|
|
@@ -152282,20 +153702,20 @@ function createManifestEntries(params) {
|
|
|
152282
153702
|
}), manifest;
|
|
152283
153703
|
}
|
|
152284
153704
|
function workerFileFilter(fileName) {
|
|
152285
|
-
let allowedExtensions = [".js.map", ".mjs.map", ".map", ".js", ".mjs"], regexString = `^(${["index"].join(
|
|
153705
|
+
let allowedWorkerAssets = ["oxygen.json"], allowedExtensions = [".js.map", ".mjs.map", ".map", ".js", ".mjs"], regexString = `^(${["index"].join(
|
|
152286
153706
|
"|"
|
|
152287
153707
|
)})(${allowedExtensions.join("|")})$`;
|
|
152288
|
-
return new RegExp(regexString).test(fileName.toLowerCase());
|
|
153708
|
+
return new RegExp(regexString).test(fileName.toLowerCase()) || allowedWorkerAssets.includes(fileName);
|
|
152289
153709
|
}
|
|
152290
153710
|
function assetFileFilter(fileName) {
|
|
152291
153711
|
let regexString = `(${[".map"].join("|")})$`;
|
|
152292
153712
|
return !new RegExp(regexString).test(fileName.toLowerCase());
|
|
152293
153713
|
}
|
|
152294
153714
|
|
|
152295
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153715
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/deployment-initiate.js
|
|
152296
153716
|
init_cjs_shims();
|
|
152297
153717
|
|
|
152298
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153718
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/graphql/deployment-initiate.js
|
|
152299
153719
|
init_cjs_shims();
|
|
152300
153720
|
var DeploymentInitiateQuery = `
|
|
152301
153721
|
mutation DeploymentInitiate($buildId: ID, $environment: EnvironmentSelectorInput, $labels: [String!], $files: [FileInput!]!) {
|
|
@@ -152323,7 +153743,7 @@ var DeploymentInitiateQuery = `
|
|
|
152323
153743
|
}
|
|
152324
153744
|
`;
|
|
152325
153745
|
|
|
152326
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153746
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/deployment-initiate.js
|
|
152327
153747
|
async function deploymentInitiate(options) {
|
|
152328
153748
|
let { config: config2, input, logger } = options, variables = {
|
|
152329
153749
|
buildId: input.buildId,
|
|
@@ -152355,10 +153775,10 @@ async function deploymentInitiate(options) {
|
|
|
152355
153775
|
}
|
|
152356
153776
|
}
|
|
152357
153777
|
|
|
152358
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153778
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/deployment-complete.js
|
|
152359
153779
|
init_cjs_shims();
|
|
152360
153780
|
|
|
152361
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153781
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/graphql/deployment-complete.js
|
|
152362
153782
|
init_cjs_shims();
|
|
152363
153783
|
var DeploymentCompleteQuery = `
|
|
152364
153784
|
mutation DeploymentComplete($deploymentId: ID!, $generateAuthBypassToken: Boolean, $authBypassTokenDuration: Int, $environmentVariables: [EnvironmentVariableInput!]) {
|
|
@@ -152375,7 +153795,7 @@ var DeploymentCompleteQuery = `
|
|
|
152375
153795
|
}
|
|
152376
153796
|
`;
|
|
152377
153797
|
|
|
152378
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153798
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/deployment-complete.js
|
|
152379
153799
|
async function deploymentComplete(config2, deploymentId) {
|
|
152380
153800
|
let variables = {
|
|
152381
153801
|
deploymentId,
|
|
@@ -152411,7 +153831,7 @@ async function deploymentComplete(config2, deploymentId) {
|
|
|
152411
153831
|
}
|
|
152412
153832
|
}
|
|
152413
153833
|
|
|
152414
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153834
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/verify-deployment.js
|
|
152415
153835
|
init_cjs_shims();
|
|
152416
153836
|
async function verifyDeployment(options) {
|
|
152417
153837
|
let { config: config2, url, logger, hooks: hooks2 } = options;
|
|
@@ -152438,10 +153858,10 @@ async function verifyDeployment(options) {
|
|
|
152438
153858
|
await check2();
|
|
152439
153859
|
}
|
|
152440
153860
|
|
|
152441
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153861
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/deployment-cancel.js
|
|
152442
153862
|
init_cjs_shims();
|
|
152443
153863
|
|
|
152444
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153864
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/graphql/deployment-cancel.js
|
|
152445
153865
|
init_cjs_shims();
|
|
152446
153866
|
var DeploymentCancelQuery = `
|
|
152447
153867
|
mutation DeploymentCancel($deploymentId: ID!, $reason: String!) {
|
|
@@ -152456,7 +153876,7 @@ mutation DeploymentCancel($deploymentId: ID!, $reason: String!) {
|
|
|
152456
153876
|
}
|
|
152457
153877
|
`;
|
|
152458
153878
|
|
|
152459
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153879
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/deployment-cancel.js
|
|
152460
153880
|
async function deploymentCancel(options) {
|
|
152461
153881
|
let { config: config2, deploymentId, reason, logger } = options, variables = {
|
|
152462
153882
|
deploymentId,
|
|
@@ -152483,10 +153903,10 @@ async function deploymentCancel(options) {
|
|
|
152483
153903
|
}
|
|
152484
153904
|
}
|
|
152485
153905
|
|
|
152486
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
153906
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/upload-files.js
|
|
152487
153907
|
init_cjs_shims();
|
|
152488
153908
|
import { Agent } from "https";
|
|
152489
|
-
var import_async = __toESM(
|
|
153909
|
+
var import_async = __toESM(require_async2(), 1);
|
|
152490
153910
|
async function uploadFiles(options) {
|
|
152491
153911
|
let { config: config2, logger, targets, hooks: hooks2 } = options;
|
|
152492
153912
|
outputInfo(`Uploading ${targets.length} files...`, logger);
|
|
@@ -152632,10 +154052,10 @@ function isErrorCode(err2, code) {
|
|
|
152632
154052
|
return err2 instanceof Error && "code" in err2 && err2.code === code;
|
|
152633
154053
|
}
|
|
152634
154054
|
|
|
152635
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
154055
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/verify-deployment-completed.js
|
|
152636
154056
|
init_cjs_shims();
|
|
152637
154057
|
|
|
152638
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
154058
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/graphql/deployment-verification-details.js
|
|
152639
154059
|
init_cjs_shims();
|
|
152640
154060
|
var DeploymentVerificationDetailsQuery = `
|
|
152641
154061
|
query DeploymentVerificationDetails($deploymentId: ID!) {
|
|
@@ -152647,7 +154067,7 @@ var DeploymentVerificationDetailsQuery = `
|
|
|
152647
154067
|
}
|
|
152648
154068
|
`, Status = /* @__PURE__ */ ((Status2) => (Status2.Pending = "PENDING", Status2.Deployed = "DEPLOYED", Status2.Failed = "FAILED", Status2.Cancelled = "CANCELLED", Status2))(Status || {});
|
|
152649
154069
|
|
|
152650
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
154070
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/verify-deployment-completed.js
|
|
152651
154071
|
async function verifyDeploymentCompleted(options, deploymentId) {
|
|
152652
154072
|
let { config: config2, logger, timeoutInSeconds, hooks: hooks2 } = options, variables = {
|
|
152653
154073
|
deploymentId
|
|
@@ -152683,7 +154103,7 @@ async function verifyDeploymentCompleted(options, deploymentId) {
|
|
|
152683
154103
|
return check2();
|
|
152684
154104
|
}
|
|
152685
154105
|
|
|
152686
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
154106
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/build-project.js
|
|
152687
154107
|
init_cjs_shims();
|
|
152688
154108
|
import { spawn as spawn2 } from "child_process";
|
|
152689
154109
|
import { PassThrough } from "stream";
|
|
@@ -152737,7 +154157,7 @@ async function buildProject(options) {
|
|
|
152737
154157
|
}
|
|
152738
154158
|
}
|
|
152739
154159
|
|
|
152740
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
154160
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/metadata.js
|
|
152741
154161
|
init_cjs_shims();
|
|
152742
154162
|
async function getMetadata(config2, logger) {
|
|
152743
154163
|
let ciInfo = ciPlatform(), metadata2 = ciInfo.metadata ?? {};
|
|
@@ -152831,7 +154251,7 @@ function createLabels(metadata2) {
|
|
|
152831
154251
|
return labels;
|
|
152832
154252
|
}
|
|
152833
154253
|
|
|
152834
|
-
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.
|
|
154254
|
+
// ../../node_modules/.pnpm/@shopify+oxygen-cli@4.5.3_@oclif+core@3.26.5_@shopify+cli-kit@packages+cli-kit/node_modules/@shopify/oxygen-cli/dist/deploy/index.js
|
|
152835
154255
|
async function createDeploy(options) {
|
|
152836
154256
|
let cliStartTime = performance.now();
|
|
152837
154257
|
initializeBugsnag(!options.config.bugsnag);
|
|
@@ -152936,13 +154356,13 @@ The deployment can be reached at the ${completedDeployment.url} preview URL`;
|
|
|
152936
154356
|
}
|
|
152937
154357
|
}
|
|
152938
154358
|
|
|
152939
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
154359
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/get-oxygen-deployment-data.js
|
|
152940
154360
|
init_cjs_shims();
|
|
152941
154361
|
|
|
152942
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
154362
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/render-errors.js
|
|
152943
154363
|
init_cjs_shims();
|
|
152944
154364
|
|
|
152945
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
154365
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/admin-urls.js
|
|
152946
154366
|
init_cjs_shims();
|
|
152947
154367
|
function newHydrogenStorefrontUrl(session) {
|
|
152948
154368
|
let { storeFqdn } = session;
|
|
@@ -152953,7 +154373,7 @@ function hydrogenStorefrontsUrl(session) {
|
|
|
152953
154373
|
return `https://${storeFqdn}/admin/custom_storefronts`;
|
|
152954
154374
|
}
|
|
152955
154375
|
|
|
152956
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
154376
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/render-errors.js
|
|
152957
154377
|
function renderMissingStorefront({
|
|
152958
154378
|
session,
|
|
152959
154379
|
storefront,
|
|
@@ -152995,7 +154415,7 @@ function renderMissingLink({ noStorefronts = !1 }) {
|
|
|
152995
154415
|
});
|
|
152996
154416
|
}
|
|
152997
154417
|
|
|
152998
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
154418
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/graphql/admin/get-oxygen-data.js
|
|
152999
154419
|
init_cjs_shims();
|
|
153000
154420
|
var GetDeploymentDataQuery = `#graphql
|
|
153001
154421
|
query GetDeploymentToken($id: ID!) {
|
|
@@ -153021,7 +154441,7 @@ async function getOxygenData(adminSession, storefrontId) {
|
|
|
153021
154441
|
return { storefront: hydrogenStorefront };
|
|
153022
154442
|
}
|
|
153023
154443
|
|
|
153024
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
154444
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/verify-linked-storefront.js
|
|
153025
154445
|
init_cjs_shims();
|
|
153026
154446
|
async function verifyLinkedStorefront({
|
|
153027
154447
|
root,
|
|
@@ -153037,7 +154457,7 @@ async function verifyLinkedStorefront({
|
|
|
153037
154457
|
}));
|
|
153038
154458
|
}
|
|
153039
154459
|
|
|
153040
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
154460
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/get-oxygen-deployment-data.js
|
|
153041
154461
|
async function getOxygenDeploymentData({
|
|
153042
154462
|
root
|
|
153043
154463
|
}) {
|
|
@@ -153069,7 +154489,7 @@ async function getOxygenDeploymentData({
|
|
|
153069
154489
|
return storefront;
|
|
153070
154490
|
}
|
|
153071
154491
|
|
|
153072
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
154492
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/deploy.js
|
|
153073
154493
|
var DEPLOY_OUTPUT_FILE_HANDLE = "h2_deploy_log.json", deploymentLogger = (message, level = "info") => {
|
|
153074
154494
|
(level === "error" || level === "warn") && outputWarn(message);
|
|
153075
154495
|
}, Deploy = class _Deploy extends base_command_default {
|
|
@@ -153086,7 +154506,7 @@ var DEPLOY_OUTPUT_FILE_HANDLE = "h2_deploy_log.json", deploymentLogger = (messag
|
|
|
153086
154506
|
}
|
|
153087
154507
|
}),
|
|
153088
154508
|
preview: import_core20.Flags.boolean({
|
|
153089
|
-
description: "Deploys to the Preview environment.
|
|
154509
|
+
description: "Deploys to the Preview environment.",
|
|
153090
154510
|
required: !1,
|
|
153091
154511
|
default: !1
|
|
153092
154512
|
}),
|
|
@@ -153463,11 +154883,11 @@ Continue?`.value
|
|
|
153463
154883
|
}), deployPromise;
|
|
153464
154884
|
}
|
|
153465
154885
|
|
|
153466
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
154886
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/dev.js
|
|
153467
154887
|
init_cjs_shims();
|
|
153468
154888
|
var import_core22 = __toESM(require_lib(), 1);
|
|
153469
154889
|
|
|
153470
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
154890
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/upgrade.js
|
|
153471
154891
|
init_cjs_shims();
|
|
153472
154892
|
var import_semver = __toESM(require_semver(), 1);
|
|
153473
154893
|
import { createRequire } from "node:module";
|
|
@@ -153582,7 +155002,7 @@ function cliTruncate(text, columns3, options = {}) {
|
|
|
153582
155002
|
throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
|
|
153583
155003
|
}
|
|
153584
155004
|
|
|
153585
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
155005
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/upgrade.js
|
|
153586
155006
|
var import_core21 = __toESM(require_lib(), 1);
|
|
153587
155007
|
var INSTRUCTIONS_FOLDER = ".hydrogen", Upgrade2 = class _Upgrade extends base_command_default {
|
|
153588
155008
|
static descriptionWithMarkdown = "Upgrade Hydrogen project dependencies, preview features, fixes and breaking changes. The command also generates an instruction file for each upgrade.";
|
|
@@ -154145,11 +155565,11 @@ async function displayDevUpgradeNotice({
|
|
|
154145
155565
|
}
|
|
154146
155566
|
}
|
|
154147
155567
|
|
|
154148
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
155568
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/classic-compiler/dev.js
|
|
154149
155569
|
init_cjs_shims();
|
|
154150
155570
|
import fs3 from "node:fs/promises";
|
|
154151
155571
|
|
|
154152
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
155572
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/mini-oxygen/index.js
|
|
154153
155573
|
init_cjs_shims();
|
|
154154
155574
|
async function buildAssetsUrl(port, root) {
|
|
154155
155575
|
let { buildAssetsUrl: _buildAssetsUrl } = await importLocal(
|
|
@@ -154161,14 +155581,14 @@ async function buildAssetsUrl(port, root) {
|
|
|
154161
155581
|
async function startMiniOxygen(options, useNodeRuntime = !1) {
|
|
154162
155582
|
if (useNodeRuntime) {
|
|
154163
155583
|
process.env.MINIFLARE_SUBREQUEST_LIMIT = 100;
|
|
154164
|
-
let { startNodeServer } = await import("./node-
|
|
155584
|
+
let { startNodeServer } = await import("./node-SDBKEHIV.js");
|
|
154165
155585
|
return startNodeServer(options);
|
|
154166
155586
|
}
|
|
154167
|
-
let { startWorkerdServer } = await import("./workerd-
|
|
155587
|
+
let { startWorkerdServer } = await import("./workerd-YWTPL4SF.js");
|
|
154168
155588
|
return startWorkerdServer(options);
|
|
154169
155589
|
}
|
|
154170
155590
|
|
|
154171
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
155591
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/virtual-routes.js
|
|
154172
155592
|
init_cjs_shims();
|
|
154173
155593
|
var VIRTUAL_ROUTES_DIR = "virtual-routes/routes", VIRTUAL_ROOT = "virtual-routes/virtual-root";
|
|
154174
155594
|
async function addVirtualRoutes(config2) {
|
|
@@ -154204,7 +155624,7 @@ async function addVirtualRoutes(config2) {
|
|
|
154204
155624
|
return config2;
|
|
154205
155625
|
}
|
|
154206
155626
|
|
|
154207
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
155627
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/live-reload.js
|
|
154208
155628
|
init_cjs_shims();
|
|
154209
155629
|
import http from "node:http";
|
|
154210
155630
|
async function setupLiveReload(devServerPort, root) {
|
|
@@ -154263,7 +155683,7 @@ async function setupLiveReload(devServerPort, root) {
|
|
|
154263
155683
|
}
|
|
154264
155684
|
}
|
|
154265
155685
|
|
|
154266
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
155686
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/classic-compiler/dev.js
|
|
154267
155687
|
var LOG_REBUILDING = "\u{1F9F1} Rebuilding...", LOG_REBUILT = "\u{1F680} Rebuilt";
|
|
154268
155688
|
async function runClassicCompilerDev({
|
|
154269
155689
|
port: appPort2,
|
|
@@ -154438,7 +155858,7 @@ async function runClassicCompilerDev({
|
|
|
154438
155858
|
};
|
|
154439
155859
|
}
|
|
154440
155860
|
|
|
154441
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
155861
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/deps-optimizer.js
|
|
154442
155862
|
init_cjs_shims();
|
|
154443
155863
|
var throttledOptimizableDeps = /* @__PURE__ */ new Set(), debouncedBannerTimeout;
|
|
154444
155864
|
function createEntryPointErrorHandler({
|
|
@@ -154567,7 +155987,7 @@ ${source_default.dim(
|
|
|
154567
155987
|
});
|
|
154568
155988
|
}
|
|
154569
155989
|
|
|
154570
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
155990
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/dev.js
|
|
154571
155991
|
var Dev2 = class _Dev extends base_command_default {
|
|
154572
155992
|
static descriptionWithMarkdown = `Runs a Hydrogen storefront in a local runtime that emulates an Oxygen worker for development.
|
|
154573
155993
|
|
|
@@ -154609,7 +156029,6 @@ var Dev2 = class _Dev extends base_command_default {
|
|
|
154609
156029
|
default: !1
|
|
154610
156030
|
}),
|
|
154611
156031
|
// For the classic compiler:
|
|
154612
|
-
worker: deprecated("--worker", { isBoolean: !0 }),
|
|
154613
156032
|
...overrideFlag(commonFlags.legacyRuntime, {
|
|
154614
156033
|
"legacy-runtime": {
|
|
154615
156034
|
description: "[Classic Remix Compiler] " + commonFlags.legacyRuntime["legacy-runtime"].description
|
|
@@ -154807,7 +156226,7 @@ function setupMonorepoReload(viteServer, monorepoPackagesPath, setupCodegen) {
|
|
|
154807
156226
|
});
|
|
154808
156227
|
}
|
|
154809
156228
|
|
|
154810
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156229
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/env/list.js
|
|
154811
156230
|
init_cjs_shims();
|
|
154812
156231
|
var EnvList = class _EnvList extends base_command_default {
|
|
154813
156232
|
static descriptionWithMarkdown = "Lists all environments available on the linked Hydrogen storefront.";
|
|
@@ -154874,7 +156293,7 @@ var pluralizedEnvironments = ({
|
|
|
154874
156293
|
() => `There are no environments for the Hydrogen storefront ${storefrontTitle}`
|
|
154875
156294
|
);
|
|
154876
156295
|
|
|
154877
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156296
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/env/pull.js
|
|
154878
156297
|
init_cjs_shims();
|
|
154879
156298
|
|
|
154880
156299
|
// ../../node_modules/.pnpm/diff@5.1.0/node_modules/diff/lib/index.mjs
|
|
@@ -155082,7 +156501,7 @@ arrayDiff.join = arrayDiff.removeEmpty = function(value) {
|
|
|
155082
156501
|
return value;
|
|
155083
156502
|
};
|
|
155084
156503
|
|
|
155085
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156504
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/env/pull.js
|
|
155086
156505
|
var EnvPull = class _EnvPull extends base_command_default {
|
|
155087
156506
|
static descriptionWithMarkdown = "Pulls environment variables from the linked Hydrogen storefront and writes them to an `.env` file.";
|
|
155088
156507
|
static description = "Populate your .env with variables from your Hydrogen storefront.";
|
|
@@ -155176,10 +156595,10 @@ Continue?`.value
|
|
|
155176
156595
|
});
|
|
155177
156596
|
}
|
|
155178
156597
|
|
|
155179
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156598
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/env/push.js
|
|
155180
156599
|
init_cjs_shims();
|
|
155181
156600
|
|
|
155182
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156601
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/graphql/admin/push-variables.js
|
|
155183
156602
|
init_cjs_shims();
|
|
155184
156603
|
var PushVariablesMutation = `#graphql
|
|
155185
156604
|
mutation PushVariables(
|
|
@@ -155212,7 +156631,7 @@ async function pushStorefrontEnvVariables(adminSession, storefrontId, environmen
|
|
|
155212
156631
|
return { userErrors };
|
|
155213
156632
|
}
|
|
155214
156633
|
|
|
155215
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156634
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/env/push.js
|
|
155216
156635
|
var EnvPush = class _EnvPush extends base_command_default {
|
|
155217
156636
|
static description = "Push environment variables from the local .env file to your linked Hydrogen storefront.";
|
|
155218
156637
|
static flags = {
|
|
@@ -155331,10 +156750,10 @@ Continue?`.value
|
|
|
155331
156750
|
});
|
|
155332
156751
|
}
|
|
155333
156752
|
|
|
155334
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156753
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/g.js
|
|
155335
156754
|
init_cjs_shims();
|
|
155336
156755
|
|
|
155337
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156756
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/generate/route.js
|
|
155338
156757
|
init_cjs_shims();
|
|
155339
156758
|
var import_core23 = __toESM(require_lib(), 1);
|
|
155340
156759
|
var GenerateRoute2 = class _GenerateRoute extends base_command_default {
|
|
@@ -155401,7 +156820,7 @@ async function runGenerate(options) {
|
|
|
155401
156820
|
});
|
|
155402
156821
|
}
|
|
155403
156822
|
|
|
155404
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156823
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/g.js
|
|
155405
156824
|
var GenerateRouteShortcut = class extends base_command_default {
|
|
155406
156825
|
static description = "Shortcut for `hydrogen generate`. See `hydrogen generate --help` for more information.";
|
|
155407
156826
|
static strict = !1;
|
|
@@ -155414,7 +156833,7 @@ var GenerateRouteShortcut = class extends base_command_default {
|
|
|
155414
156833
|
}
|
|
155415
156834
|
};
|
|
155416
156835
|
|
|
155417
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156836
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/generate/routes.js
|
|
155418
156837
|
init_cjs_shims();
|
|
155419
156838
|
var GenerateRoutes = class _GenerateRoutes extends base_command_default {
|
|
155420
156839
|
static description = "Generates all supported standard shopify routes.";
|
|
@@ -155429,11 +156848,11 @@ var GenerateRoutes = class _GenerateRoutes extends base_command_default {
|
|
|
155429
156848
|
}
|
|
155430
156849
|
};
|
|
155431
156850
|
|
|
155432
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156851
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/init.js
|
|
155433
156852
|
init_cjs_shims();
|
|
155434
156853
|
var import_core24 = __toESM(require_lib(), 1);
|
|
155435
156854
|
|
|
155436
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156855
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/check-cli-version.js
|
|
155437
156856
|
init_cjs_shims();
|
|
155438
156857
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
155439
156858
|
var UPGRADABLE_CLI_NAMES = {
|
|
@@ -155479,10 +156898,10 @@ You are currently running v${currentVersion}.
|
|
|
155479
156898
|
};
|
|
155480
156899
|
}
|
|
155481
156900
|
|
|
155482
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156901
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/onboarding/index.js
|
|
155483
156902
|
init_cjs_shims();
|
|
155484
156903
|
|
|
155485
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
156904
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/onboarding/local.js
|
|
155486
156905
|
init_cjs_shims();
|
|
155487
156906
|
import { cp as cp2 } from "node:fs/promises";
|
|
155488
156907
|
async function setupLocalStarterTemplate(options, controller) {
|
|
@@ -155700,11 +157119,11 @@ function maybeInjectCliHydrogen(pkgJsonContent) {
|
|
|
155700
157119
|
return pkgJsonContent;
|
|
155701
157120
|
}
|
|
155702
157121
|
|
|
155703
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157122
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/onboarding/remote.js
|
|
155704
157123
|
init_cjs_shims();
|
|
155705
157124
|
import { readdir } from "node:fs/promises";
|
|
155706
157125
|
|
|
155707
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157126
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/template-downloader.js
|
|
155708
157127
|
init_cjs_shims();
|
|
155709
157128
|
var import_gunzip_maybe = __toESM(require_gunzip_maybe(), 1), import_tar_fs = __toESM(require_tar_fs(), 1);
|
|
155710
157129
|
import path2 from "node:path";
|
|
@@ -155736,7 +157155,7 @@ function parseGitHubRepositoryReference(reference) {
|
|
|
155736
157155
|
};
|
|
155737
157156
|
}
|
|
155738
157157
|
|
|
155739
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157158
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/template-downloader.js
|
|
155740
157159
|
var REPO_RELEASES_URL = "https://api.github.com/repos/shopify/hydrogen/releases/latest", getTryMessage = (status) => status === 403 ? "If you are using a VPN, WARP, or similar service, consider disabling it momentarily." : void 0;
|
|
155741
157160
|
async function getLatestReleaseDownloadUrl(signal) {
|
|
155742
157161
|
let response = await fetch2(REPO_RELEASES_URL, { signal });
|
|
@@ -155819,7 +157238,7 @@ async function downloadExternalRepo(appTemplate, signal) {
|
|
|
155819
157238
|
}), await rmdir(joinPath(templateDir, ".git"), { force: !0 }), { templateDir };
|
|
155820
157239
|
}
|
|
155821
157240
|
|
|
155822
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157241
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/onboarding/remote.js
|
|
155823
157242
|
var DEMO_STORE_REPO = "shopify/hydrogen-demo-store";
|
|
155824
157243
|
async function setupRemoteTemplate(options, controller) {
|
|
155825
157244
|
let appTemplate = options.template === "demo-store" ? DEMO_STORE_REPO : options.template, abort2 = createAbortHandler(controller), backgroundDownloadPromise = appTemplate.includes("/") ? getExternalTemplate(appTemplate, controller.signal).catch(abort2) : getMonorepoTemplate(appTemplate, controller.signal).catch(abort2), project = await handleProjectLocation({ ...options, controller });
|
|
@@ -155908,7 +157327,7 @@ Skip the flag or provide the name of a template or example in the Hydrogen repos
|
|
|
155908
157327
|
);
|
|
155909
157328
|
}
|
|
155910
157329
|
|
|
155911
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157330
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/onboarding/index.js
|
|
155912
157331
|
async function setupTemplate(options) {
|
|
155913
157332
|
let controller = new AbortController2();
|
|
155914
157333
|
try {
|
|
@@ -155919,7 +157338,7 @@ async function setupTemplate(options) {
|
|
|
155919
157338
|
}
|
|
155920
157339
|
}
|
|
155921
157340
|
|
|
155922
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157341
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/init.js
|
|
155923
157342
|
var FLAG_MAP = { f: "force" }, Init2 = class _Init extends base_command_default {
|
|
155924
157343
|
static descriptionWithMarkdown = "Creates a new Hydrogen storefront.";
|
|
155925
157344
|
static description = "Creates a new Hydrogen storefront.";
|
|
@@ -155993,10 +157412,10 @@ async function runInit({
|
|
|
155993
157412
|
return showUpgrade && showUpgrade(options.packageManager), setupTemplate(options);
|
|
155994
157413
|
}
|
|
155995
157414
|
|
|
155996
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157415
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/list.js
|
|
155997
157416
|
init_cjs_shims();
|
|
155998
157417
|
|
|
155999
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157418
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/graphql/admin/list-storefronts.js
|
|
156000
157419
|
init_cjs_shims();
|
|
156001
157420
|
var ListStorefrontsQuery = `#graphql
|
|
156002
157421
|
query ListStorefronts {
|
|
@@ -156023,7 +157442,7 @@ async function getStorefrontsWithDeployment(adminSession) {
|
|
|
156023
157442
|
}));
|
|
156024
157443
|
}
|
|
156025
157444
|
|
|
156026
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157445
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/list.js
|
|
156027
157446
|
var List2 = class _List extends base_command_default {
|
|
156028
157447
|
static descriptionWithMarkdown = "Lists all remote Hydrogen storefronts available to link to your local development environment.";
|
|
156029
157448
|
static description = "Returns a list of Hydrogen storefronts available on a given shop.";
|
|
@@ -156091,7 +157510,7 @@ var pluralizedStorefronts = ({
|
|
|
156091
157510
|
(_storefront) => `Showing 1 Hydrogen storefront for the store ${shop}`
|
|
156092
157511
|
);
|
|
156093
157512
|
|
|
156094
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157513
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/login.js
|
|
156095
157514
|
init_cjs_shims();
|
|
156096
157515
|
var Login = class _Login extends base_command_default {
|
|
156097
157516
|
static descriptionWithMarkdown = "Logs in to the specified shop and saves the shop domain to the project.";
|
|
@@ -156114,7 +157533,7 @@ async function runLogin({
|
|
|
156114
157533
|
renderLoginSuccess(config2);
|
|
156115
157534
|
}
|
|
156116
157535
|
|
|
156117
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157536
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/logout.js
|
|
156118
157537
|
init_cjs_shims();
|
|
156119
157538
|
var Logout2 = class _Logout extends base_command_default {
|
|
156120
157539
|
static descriptionWithMarkdown = "Log out from the current shop.";
|
|
@@ -156131,7 +157550,7 @@ async function runLogout({ path: root = process.cwd() }) {
|
|
|
156131
157550
|
outputNewline(), await logout(root), renderSuccess({ body: "You are logged out from Shopify." });
|
|
156132
157551
|
}
|
|
156133
157552
|
|
|
156134
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157553
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/preview.js
|
|
156135
157554
|
init_cjs_shims();
|
|
156136
157555
|
var import_core25 = __toESM(require_lib(), 1);
|
|
156137
157556
|
var Preview = class _Preview extends base_command_default {
|
|
@@ -156140,7 +157559,6 @@ var Preview = class _Preview extends base_command_default {
|
|
|
156140
157559
|
static flags = {
|
|
156141
157560
|
...commonFlags.path,
|
|
156142
157561
|
...commonFlags.port,
|
|
156143
|
-
worker: deprecated("--worker", { isBoolean: !0 }),
|
|
156144
157562
|
...commonFlags.legacyRuntime,
|
|
156145
157563
|
...commonFlags.env,
|
|
156146
157564
|
...commonFlags.envBranch,
|
|
@@ -156256,7 +157674,7 @@ async function runPreview({
|
|
|
156256
157674
|
};
|
|
156257
157675
|
}
|
|
156258
157676
|
|
|
156259
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157677
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/setup.js
|
|
156260
157678
|
init_cjs_shims();
|
|
156261
157679
|
var Setup = class _Setup extends base_command_default {
|
|
156262
157680
|
static description = "Scaffold routes and core functionality.";
|
|
@@ -156347,7 +157765,7 @@ async function runSetup(options) {
|
|
|
156347
157765
|
));
|
|
156348
157766
|
}
|
|
156349
157767
|
|
|
156350
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157768
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/setup/css.js
|
|
156351
157769
|
init_cjs_shims();
|
|
156352
157770
|
var import_core26 = __toESM(require_lib(), 1);
|
|
156353
157771
|
var SetupCSS = class _SetupCSS extends base_command_default {
|
|
@@ -156437,7 +157855,7 @@ Run`,
|
|
|
156437
157855
|
});
|
|
156438
157856
|
}
|
|
156439
157857
|
|
|
156440
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157858
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/setup/markets.js
|
|
156441
157859
|
init_cjs_shims();
|
|
156442
157860
|
var import_core27 = __toESM(require_lib(), 1);
|
|
156443
157861
|
var SetupMarkets = class _SetupMarkets extends base_command_default {
|
|
@@ -156481,7 +157899,7 @@ async function runSetupMarkets({
|
|
|
156481
157899
|
});
|
|
156482
157900
|
}
|
|
156483
157901
|
|
|
156484
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
157902
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/setup/vite.js
|
|
156485
157903
|
init_cjs_shims();
|
|
156486
157904
|
var SetupVite = class _SetupVite extends base_command_default {
|
|
156487
157905
|
static description = "EXPERIMENTAL: Upgrades the project to use Vite.";
|
|
@@ -156724,7 +158142,7 @@ Please use Git to review the changes.`,
|
|
|
156724
158142
|
});
|
|
156725
158143
|
}
|
|
156726
158144
|
|
|
156727
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
158145
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/shortcut.js
|
|
156728
158146
|
init_cjs_shims();
|
|
156729
158147
|
var Shortcut = class extends base_command_default {
|
|
156730
158148
|
static descriptionWithMarkdown = "Creates a global h2 shortcut for Shopify CLI using shell aliases.\n\n The following shells are supported:\n\n - Bash (using `~/.bashrc`)\n - ZSH (using `~/.zshrc`)\n - Fish (using `~/.config/fish/functions`)\n - PowerShell (added to `$PROFILE`)\n\n After the alias is created, you can call Shopify CLI from anywhere in your project using `h2 <command>`.";
|
|
@@ -156749,7 +158167,7 @@ Restart your terminal session and run \`${ALIAS_NAME}\` from your local project.
|
|
|
156749
158167
|
});
|
|
156750
158168
|
}
|
|
156751
158169
|
|
|
156752
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
158170
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/unlink.js
|
|
156753
158171
|
init_cjs_shims();
|
|
156754
158172
|
var Unlink = class _Unlink extends base_command_default {
|
|
156755
158173
|
static descriptionWithMarkdown = "Unlinks your local development environment from a remote Hydrogen storefront.";
|
|
@@ -156774,7 +158192,7 @@ async function unlinkStorefront({ path: path3 }) {
|
|
|
156774
158192
|
});
|
|
156775
158193
|
}
|
|
156776
158194
|
|
|
156777
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
158195
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/hooks/init.js
|
|
156778
158196
|
init_cjs_shims();
|
|
156779
158197
|
import { createRequire as createRequire2 } from "node:module";
|
|
156780
158198
|
import { spawnSync } from "node:child_process";
|
|
@@ -156829,7 +158247,7 @@ function isHydrogenProject(projectPath) {
|
|
|
156829
158247
|
}
|
|
156830
158248
|
var init_default2 = hook;
|
|
156831
158249
|
|
|
156832
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
158250
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.2_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/index.js
|
|
156833
158251
|
var COMMANDS2 = {
|
|
156834
158252
|
"hydrogen:dev": Dev2,
|
|
156835
158253
|
"hydrogen:build": Build,
|