@shopify/create-app 3.85.5 → 3.86.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/{brotli-EDFLSXX4.js → brotli-2OKV26Y6.js} +3 -3
  2. package/dist/{chunk-75LV6AQS.js → chunk-6ONJEX7Y.js} +8 -8
  3. package/dist/{chunk-LG53DXOY.js → chunk-ASZTU5FY.js} +41 -32
  4. package/dist/{chunk-Z46NFQ33.js → chunk-D3N5EZME.js} +24 -24
  5. package/dist/{chunk-2VQSCETZ.js → chunk-JXJ33RQ2.js} +57 -59
  6. package/dist/{chunk-O4KAJGU5.js → chunk-MGT4QKYB.js} +3 -3
  7. package/dist/{chunk-RN5F2ZF4.js → chunk-SB7IE2QN.js} +6 -6
  8. package/dist/{chunk-I3ZBATYA.js → chunk-T3CH4FSA.js} +203 -181
  9. package/dist/{chunk-4WG5JQHA.js → chunk-U5F5ZHHV.js} +108 -87
  10. package/dist/{chunk-25IMI7TH.js → chunk-XD3LXUGW.js} +5 -5
  11. package/dist/{chunk-MRFYNZ7Q.js → chunk-ZPIPJKU4.js} +81 -30
  12. package/dist/{custom-oclif-loader-DO3K4WDC.js → custom-oclif-loader-BWUSWZN5.js} +4 -4
  13. package/dist/{del-4XMQNWFE.js → del-M36IQP37.js} +3 -3
  14. package/dist/{error-handler-W76H7JBB.js → error-handler-3FRDLG2Y.js} +9 -9
  15. package/dist/hooks/postrun.js +7 -7
  16. package/dist/hooks/prerun.js +7 -7
  17. package/dist/{http-proxy-node16-T623PGD4.js → http-proxy-node16-K5X7BUK5.js} +3 -3
  18. package/dist/index.js +457 -415
  19. package/dist/index.test.js +15 -15
  20. package/dist/{lib-XDPPS4KW.js → lib-JIKIO4JO.js} +2 -2
  21. package/dist/{local-QITTSRL5.js → local-SYOM7NMW.js} +4 -4
  22. package/dist/{multipart-parser-WSNBP656.js → multipart-parser-IYYNISJK.js} +2 -2
  23. package/dist/{node-package-manager-YJ2PSFI3.js → node-package-manager-Q4WSQVPY.js} +5 -5
  24. package/dist/tsconfig.tsbuildinfo +1 -1
  25. package/dist/{ui-C6NNSWI4.js → ui-7G4EJJ66.js} +4 -4
  26. package/oclif.manifest.json +1 -1
  27. package/package.json +4 -4
@@ -126532,7 +126532,7 @@ var require_encode = __commonJS({
126532
126532
  ABORT: F,
126533
126533
  cttz_i8: Sa
126534
126534
  };
126535
- var Y = function(global, env, buffer2) {
126535
+ var Y = (function(global, env, buffer2) {
126536
126536
  var a = new global.Int8Array(buffer2), b2 = new global.Int16Array(buffer2), c = new global.Int32Array(buffer2), d = new global.Uint8Array(buffer2), e = new global.Uint16Array(buffer2), f = new global.Uint32Array(buffer2), g2 = new global.Float32Array(buffer2), h = new global.Float64Array(buffer2), i = env.STACKTOP | 0, j = env.STACK_MAX | 0, k = env.tempDoublePtr | 0, l = env.ABORT | 0, m2 = env.cttz_i8 | 0, n = 0, o = 0, p = 0, q = 0, r = global.NaN, s = global.Infinity, t2 = 0, u2 = 0, v2 = 0, w = 0, x2 = 0, y2 = 0, z2 = 0, A2 = 0, B2 = 0, C2 = 0, D2 = 0, E2 = 0, F2 = 0, G2 = 0, H2 = 0, I2 = 0, J2 = 0, K2 = 0, L2 = 0, M = global.Math.floor, N2 = global.Math.abs, O2 = global.Math.sqrt, P2 = global.Math.pow, Q2 = global.Math.cos, R2 = global.Math.sin, S2 = global.Math.tan, T2 = global.Math.acos, U2 = global.Math.asin, V2 = global.Math.atan, W2 = global.Math.atan2, X2 = global.Math.exp, Y2 = global.Math.log, Z2 = global.Math.ceil, _ = global.Math.imul, $ = global.Math.min, aa2 = global.Math.clz32, ba2 = env.abort, ca2 = env.assert, da2 = env.invoke_vii, ea2 = env.invoke_iii, fa2 = env.__exit, ga2 = env._pthread_self, ha2 = env._abort, ia2 = env.___setErrNo, ja2 = env._sysconf, ka2 = env._sbrk, la2 = env._time, ma2 = env._emscripten_memcpy_big, na = env._llvm_trap, oa2 = env._exit, pa2 = env.___assert_fail, qa2 = 0;
126537
126537
  function $a2(e2, f2, g3, h2, j2, k2, l2, m3) {
126538
126538
  e2 = e2 | 0, f2 = f2 | 0, g3 = g3 | 0, h2 = h2 | 0, j2 = j2 | 0, k2 = k2 | 0, l2 = l2 | 0, m3 = m3 | 0;
@@ -136686,7 +136686,7 @@ var require_encode = __commonJS({
136686
136686
  }
136687
136687
  var ra2 = [rc, Mb], sa2 = [sc, Lb];
136688
136688
  return { _i64Subtract: $b, _free: Zb, _i64Add: ec, _memmove: fc, _memset: ac, _malloc: Yb, _encode: Ca2, _memcpy: dc, _bitshift64Lshr: bc, _bitshift64Shl: cc, runPostSets: _b, stackAlloc: ta2, stackSave: ua2, stackRestore: va2, establishStackSpace: wa2, setThrew: xa2, setTempRet0: Aa2, getTempRet0: Ba2, dynCall_vii: pc, dynCall_iii: qc };
136689
- }(b.I, b.J, buffer), Ja = b._i64Subtract = Y._i64Subtract, pa = b._free = Y._free;
136689
+ })(b.I, b.J, buffer), Ja = b._i64Subtract = Y._i64Subtract, pa = b._free = Y._free;
136690
136690
  b.runPostSets = Y.runPostSets;
136691
136691
  var Pa = b._i64Add = Y._i64Add, Qa = b._memmove = Y._memmove, La = b._memset = Y._memset, ia = b._malloc = Y._malloc;
136692
136692
  b._encode = Y._encode;
@@ -136806,4 +136806,4 @@ var require_brotli = __commonJS({
136806
136806
  }
136807
136807
  });
136808
136808
  export default require_brotli();
136809
- //# sourceMappingURL=brotli-EDFLSXX4.js.map
136809
+ //# sourceMappingURL=brotli-2OKV26Y6.js.map
@@ -28,7 +28,7 @@ var require_polyfills = __commonJS({
28
28
  }), fs.chown && !fs.lchown && (fs.lchown = function(path, uid, gid, cb) {
29
29
  cb && process.nextTick(cb);
30
30
  }, fs.lchownSync = function() {
31
- }), platform === "win32" && (fs.rename = typeof fs.rename != "function" ? fs.rename : function(fs$rename) {
31
+ }), platform === "win32" && (fs.rename = typeof fs.rename != "function" ? fs.rename : (function(fs$rename) {
32
32
  function rename(from, to, cb) {
33
33
  var start = Date.now(), backoff = 0;
34
34
  fs$rename(from, to, function CB(er) {
@@ -44,7 +44,7 @@ var require_polyfills = __commonJS({
44
44
  });
45
45
  }
46
46
  return Object.setPrototypeOf && Object.setPrototypeOf(rename, fs$rename), rename;
47
- }(fs.rename)), fs.read = typeof fs.read != "function" ? fs.read : function(fs$read) {
47
+ })(fs.rename)), fs.read = typeof fs.read != "function" ? fs.read : (function(fs$read) {
48
48
  function read(fd, buffer, offset, length, position, callback_) {
49
49
  var callback;
50
50
  if (callback_ && typeof callback_ == "function") {
@@ -58,7 +58,7 @@ var require_polyfills = __commonJS({
58
58
  return fs$read.call(fs, fd, buffer, offset, length, position, callback);
59
59
  }
60
60
  return Object.setPrototypeOf && Object.setPrototypeOf(read, fs$read), read;
61
- }(fs.read), fs.readSync = typeof fs.readSync != "function" ? fs.readSync : /* @__PURE__ */ function(fs$readSync) {
61
+ })(fs.read), fs.readSync = typeof fs.readSync != "function" ? fs.readSync : /* @__PURE__ */ (function(fs$readSync) {
62
62
  return function(fd, buffer, offset, length, position) {
63
63
  for (var eagCounter = 0; ; )
64
64
  try {
@@ -71,7 +71,7 @@ var require_polyfills = __commonJS({
71
71
  throw er;
72
72
  }
73
73
  };
74
- }(fs.readSync);
74
+ })(fs.readSync);
75
75
  function patchLchmod(fs2) {
76
76
  fs2.lchmod = function(path, mode, callback) {
77
77
  fs2.open(
@@ -304,7 +304,7 @@ var require_graceful_fs = __commonJS({
304
304
  m = "GFS4: " + m.split(/\n/).join(`
305
305
  GFS4: `), console.error(m);
306
306
  });
307
- fs[gracefulQueue] || (queue = global[gracefulQueue] || [], publishQueue(fs, queue), fs.close = function(fs$close) {
307
+ fs[gracefulQueue] || (queue = global[gracefulQueue] || [], publishQueue(fs, queue), fs.close = (function(fs$close) {
308
308
  function close(fd, cb) {
309
309
  return fs$close.call(fs, fd, function(err) {
310
310
  err || resetQueue(), typeof cb == "function" && cb.apply(this, arguments);
@@ -313,14 +313,14 @@ GFS4: `), console.error(m);
313
313
  return Object.defineProperty(close, previousSymbol, {
314
314
  value: fs$close
315
315
  }), close;
316
- }(fs.close), fs.closeSync = function(fs$closeSync) {
316
+ })(fs.close), fs.closeSync = (function(fs$closeSync) {
317
317
  function closeSync(fd) {
318
318
  fs$closeSync.apply(fs, arguments), resetQueue();
319
319
  }
320
320
  return Object.defineProperty(closeSync, previousSymbol, {
321
321
  value: fs$closeSync
322
322
  }), closeSync;
323
- }(fs.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
323
+ })(fs.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
324
324
  debug(fs[gracefulQueue]), __require("assert").equal(fs[gracefulQueue].length, 0);
325
325
  }));
326
326
  var queue;
@@ -517,4 +517,4 @@ GFS4: `), console.error(m);
517
517
  export {
518
518
  require_graceful_fs
519
519
  };
520
- //# sourceMappingURL=chunk-75LV6AQS.js.map
520
+ //# sourceMappingURL=chunk-6ONJEX7Y.js.map
@@ -2,7 +2,7 @@ import {
2
2
  FormData,
3
3
  fetch_blob_default,
4
4
  formDataToBlob
5
- } from "./chunk-25IMI7TH.js";
5
+ } from "./chunk-XD3LXUGW.js";
6
6
  import {
7
7
  cacheRetrieveOrRepopulate,
8
8
  getCurrentSessionId,
@@ -14,7 +14,7 @@ import {
14
14
  setCurrentSessionId,
15
15
  setSessions,
16
16
  timeIntervalToMilliseconds
17
- } from "./chunk-MRFYNZ7Q.js";
17
+ } from "./chunk-ZPIPJKU4.js";
18
18
  import {
19
19
  AbortError,
20
20
  BugError,
@@ -80,7 +80,7 @@ import {
80
80
  stringifyMessage,
81
81
  systemEnvironmentVariables,
82
82
  themeToken
83
- } from "./chunk-4WG5JQHA.js";
83
+ } from "./chunk-U5F5ZHHV.js";
84
84
  import {
85
85
  cwd,
86
86
  sniffForJson
@@ -14985,7 +14985,7 @@ var require_punycode = __commonJS({
14985
14985
  "../../node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.js"(exports2, module2) {
14986
14986
  "use strict";
14987
14987
  init_cjs_shims();
14988
- var delimiter = "-", regexPunycode = /^xn--/, regexNonASCII = /[^\0-\x7F]/, regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, errors = {
14988
+ var regexPunycode = /^xn--/, regexNonASCII = /[^\0-\x7F]/, regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, errors = {
14989
14989
  overflow: "Overflow: input needs wider integers to process",
14990
14990
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
14991
14991
  "invalid-input": "Invalid input"
@@ -15027,7 +15027,7 @@ var require_punycode = __commonJS({
15027
15027
  delta = floor(delta / baseMinusTMin);
15028
15028
  return floor(k + (baseMinusTMin + 1) * delta / (delta + 38));
15029
15029
  }, decode3 = function(input) {
15030
- let output = [], inputLength = input.length, i = 0, n = 128, bias = 72, basic = input.lastIndexOf(delimiter);
15030
+ let output = [], inputLength = input.length, i = 0, n = 128, bias = 72, basic = input.lastIndexOf("-");
15031
15031
  basic < 0 && (basic = 0);
15032
15032
  for (let j = 0; j < basic; ++j)
15033
15033
  input.charCodeAt(j) >= 128 && error("not-basic"), output.push(input.charCodeAt(j));
@@ -15054,7 +15054,7 @@ var require_punycode = __commonJS({
15054
15054
  for (let currentValue of input)
15055
15055
  currentValue < 128 && output.push(stringFromCharCode(currentValue));
15056
15056
  let basicLength = output.length, handledCPCount = basicLength;
15057
- for (basicLength && output.push(delimiter); handledCPCount < inputLength; ) {
15057
+ for (basicLength && output.push("-"); handledCPCount < inputLength; ) {
15058
15058
  let m = 2147483647;
15059
15059
  for (let currentValue of input)
15060
15060
  currentValue >= n && currentValue < m && (m = currentValue);
@@ -27249,7 +27249,7 @@ var require_get_intrinsic = __commonJS({
27249
27249
  }
27250
27250
  }, $gOPD = require_gopd(), $defineProperty = require_es_define_property(), throwTypeError = function() {
27251
27251
  throw new $TypeError();
27252
- }, ThrowTypeError = $gOPD ? function() {
27252
+ }, ThrowTypeError = $gOPD ? (function() {
27253
27253
  try {
27254
27254
  return arguments.callee, throwTypeError;
27255
27255
  } catch {
@@ -27259,7 +27259,7 @@ var require_get_intrinsic = __commonJS({
27259
27259
  return throwTypeError;
27260
27260
  }
27261
27261
  }
27262
- }() : throwTypeError, hasSymbols = require_has_symbols()(), getProto = require_get_proto(), $ObjectGPO = require_Object_getPrototypeOf(), $ReflectGPO = require_Reflect_getPrototypeOf(), $apply = require_functionApply(), $call = require_functionCall(), needsEval = {}, TypedArray = typeof Uint8Array > "u" || !getProto ? undefined2 : getProto(Uint8Array), INTRINSICS = {
27262
+ })() : throwTypeError, hasSymbols = require_has_symbols()(), getProto = require_get_proto(), $ObjectGPO = require_Object_getPrototypeOf(), $ReflectGPO = require_Reflect_getPrototypeOf(), $apply = require_functionApply(), $call = require_functionCall(), needsEval = {}, TypedArray = typeof Uint8Array > "u" || !getProto ? undefined2 : getProto(Uint8Array), INTRINSICS = {
27263
27263
  __proto__: null,
27264
27264
  "%AggregateError%": typeof AggregateError > "u" ? undefined2 : AggregateError,
27265
27265
  "%Array%": Array,
@@ -28259,7 +28259,7 @@ var require_Events = __commonJS({
28259
28259
  return name !== "debug" && _this.trigger("debug", `Event triggered: ${name}`, args), _this._events[name] == null ? void 0 : (_this._events[name] = _this._events[name].filter(function(listener) {
28260
28260
  return listener.status !== "none";
28261
28261
  }), promises = _this._events[name].map(
28262
- /* @__PURE__ */ function() {
28262
+ /* @__PURE__ */ (function() {
28263
28263
  var _ref = _asyncToGenerator2(function* (listener) {
28264
28264
  var e2, returned;
28265
28265
  if (listener.status !== "none") {
@@ -28274,7 +28274,7 @@ var require_Events = __commonJS({
28274
28274
  return function(_x) {
28275
28275
  return _ref.apply(this, arguments);
28276
28276
  };
28277
- }()
28277
+ })()
28278
28278
  ), (yield Promise.all(promises)).find(function(x) {
28279
28279
  return x != null;
28280
28280
  }));
@@ -29479,7 +29479,7 @@ var require_RedisConnection = __commonJS({
29479
29479
  __removeLimiter__(instance) {
29480
29480
  var _this2 = this;
29481
29481
  return this.Promise.all([instance.channel(), instance.channel_client()].map(
29482
- /* @__PURE__ */ function() {
29482
+ /* @__PURE__ */ (function() {
29483
29483
  var _ref = _asyncToGenerator(function* (channel) {
29484
29484
  return _this2.terminated || (yield new _this2.Promise((resolve, reject) => _this2.subscriber.unsubscribe(channel, function(err2, chan) {
29485
29485
  if (err2 != null)
@@ -29491,7 +29491,7 @@ var require_RedisConnection = __commonJS({
29491
29491
  return function(_x) {
29492
29492
  return _ref.apply(this, arguments);
29493
29493
  };
29494
- }()
29494
+ })()
29495
29495
  ));
29496
29496
  }
29497
29497
  __scriptArgs__(name, id, args, cb) {
@@ -29612,14 +29612,14 @@ var require_IORedisConnection = __commonJS({
29612
29612
  __removeLimiter__(instance) {
29613
29613
  var _this2 = this;
29614
29614
  return [instance.channel(), instance.channel_client()].forEach(
29615
- /* @__PURE__ */ function() {
29615
+ /* @__PURE__ */ (function() {
29616
29616
  var _ref3 = _asyncToGenerator(function* (channel) {
29617
29617
  return _this2.terminated || (yield _this2.subscriber.unsubscribe(channel)), delete _this2.limiters[channel];
29618
29618
  });
29619
29619
  return function(_x) {
29620
29620
  return _ref3.apply(this, arguments);
29621
29621
  };
29622
- }()
29622
+ })()
29623
29623
  );
29624
29624
  }
29625
29625
  __scriptArgs__(name, id, args, cb) {
@@ -30580,7 +30580,7 @@ var require_lib3 = __commonJS({
30580
30580
 
30581
30581
  // ../cli-kit/dist/public/common/version.js
30582
30582
  init_cjs_shims();
30583
- var CLI_KIT_VERSION = "3.85.5";
30583
+ var CLI_KIT_VERSION = "3.86.1";
30584
30584
 
30585
30585
  // ../cli-kit/dist/private/node/context/service.js
30586
30586
  init_cjs_shims();
@@ -33451,14 +33451,14 @@ var late = {
33451
33451
  var instanceOfType = (cls, params = {
33452
33452
  message: `Input not instance of ${cls.name}`
33453
33453
  }) => custom((data) => data instanceof cls, params), stringType = ZodString.create, numberType = ZodNumber.create, nanType = ZodNaN.create, bigIntType = ZodBigInt.create, booleanType = ZodBoolean.create, dateType = ZodDate.create, symbolType = ZodSymbol.create, undefinedType = ZodUndefined.create, nullType = ZodNull.create, anyType = ZodAny.create, unknownType = ZodUnknown.create, neverType = ZodNever.create, voidType = ZodVoid.create, arrayType = ZodArray.create, objectType = ZodObject.create, strictObjectType = ZodObject.strictCreate, unionType = ZodUnion.create, discriminatedUnionType = ZodDiscriminatedUnion.create, intersectionType = ZodIntersection.create, tupleType = ZodTuple.create, recordType = ZodRecord.create, mapType = ZodMap.create, setType = ZodSet.create, functionType = ZodFunction.create, lazyType = ZodLazy.create, literalType = ZodLiteral.create, enumType = ZodEnum.create, nativeEnumType = ZodNativeEnum.create, promiseType = ZodPromise.create, effectsType = ZodEffects.create, optionalType = ZodOptional.create, nullableType = ZodNullable.create, preprocessType = ZodEffects.createWithPreprocess, pipelineType = ZodPipeline.create, ostring = () => stringType().optional(), onumber = () => numberType().optional(), oboolean = () => booleanType().optional(), coerce = {
33454
- string: (arg) => ZodString.create({ ...arg, coerce: !0 }),
33455
- number: (arg) => ZodNumber.create({ ...arg, coerce: !0 }),
33456
- boolean: (arg) => ZodBoolean.create({
33454
+ string: ((arg) => ZodString.create({ ...arg, coerce: !0 })),
33455
+ number: ((arg) => ZodNumber.create({ ...arg, coerce: !0 })),
33456
+ boolean: ((arg) => ZodBoolean.create({
33457
33457
  ...arg,
33458
33458
  coerce: !0
33459
- }),
33460
- bigint: (arg) => ZodBigInt.create({ ...arg, coerce: !0 }),
33461
- date: (arg) => ZodDate.create({ ...arg, coerce: !0 })
33459
+ })),
33460
+ bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: !0 })),
33461
+ date: ((arg) => ZodDate.create({ ...arg, coerce: !0 }))
33462
33462
  }, NEVER = INVALID, z = /* @__PURE__ */ Object.freeze({
33463
33463
  __proto__: null,
33464
33464
  defaultErrorMap: errorMap,
@@ -34626,8 +34626,8 @@ async function identityFqdn() {
34626
34626
  return productionFqdn;
34627
34627
  }
34628
34628
  }
34629
- async function normalizeStoreFqdn(store2) {
34630
- let storeFqdn = store2.replace(/^https?:\/\//, "").replace(/\/$/, ""), addDomain = async (storeFqdn2) => {
34629
+ function normalizeStoreFqdn(store2) {
34630
+ let storeFqdn = store2.replace(/^https?:\/\//, "").replace(/\/$/, "").replace(/\/admin$/, ""), addDomain = (storeFqdn2) => {
34631
34631
  switch (serviceEnvironment()) {
34632
34632
  case "local":
34633
34633
  return new DevServerCore().host(storeFqdn2);
@@ -34755,7 +34755,7 @@ var pipeline = promisify(Stream.pipeline), INTERNALS = Symbol("Body internals"),
34755
34755
  formData2.append(name, value);
34756
34756
  return formData2;
34757
34757
  }
34758
- let { toFormData } = await import("./multipart-parser-WSNBP656.js");
34758
+ let { toFormData } = await import("./multipart-parser-IYYNISJK.js");
34759
34759
  return toFormData(this.body, ct);
34760
34760
  }
34761
34761
  /**
@@ -35797,7 +35797,7 @@ async function refreshAccessToken(currentToken) {
35797
35797
  refresh_token: currentToken.refreshToken,
35798
35798
  client_id: clientId2
35799
35799
  }, value = (await tokenRequest(params)).mapError(tokenRequestErrorHandler).valueOrBug();
35800
- return buildIdentityToken(value, currentToken.userId);
35800
+ return buildIdentityToken(value, currentToken.userId, currentToken.alias);
35801
35801
  }
35802
35802
  async function exchangeCliTokenForAccessToken(apiName, token, scopes) {
35803
35803
  let appId = applicationId(apiName);
@@ -35858,7 +35858,7 @@ async function tokenRequest(params) {
35858
35858
  let res = await shopifyFetch(url3.href, { method: "POST" }), payload = await res.json();
35859
35859
  return res.ok ? ok(payload) : err({ error: payload.error, store: params.store });
35860
35860
  }
35861
- function buildIdentityToken(result, existingUserId) {
35861
+ function buildIdentityToken(result, existingUserId, existingAlias) {
35862
35862
  let userId2 = existingUserId ?? (result.id_token ? decodeJwt(result.id_token).sub : void 0);
35863
35863
  if (!userId2)
35864
35864
  throw new BugError("Error setting userId for session. No id_token or pre-existing user ID provided.");
@@ -35867,7 +35867,8 @@ function buildIdentityToken(result, existingUserId) {
35867
35867
  refreshToken: result.refresh_token,
35868
35868
  expiresAt: new Date(Date.now() + result.expires_in * 1e3),
35869
35869
  scopes: result.scope.split(" "),
35870
- userId: userId2
35870
+ userId: userId2,
35871
+ alias: existingAlias
35871
35872
  };
35872
35873
  }
35873
35874
  function buildApplicationToken(result) {
@@ -35982,6 +35983,12 @@ var UserEmailQueryString = `
35982
35983
 
35983
35984
  // ../cli-kit/dist/public/node/session.js
35984
35985
  init_cjs_shims();
35986
+ function isUserAccount(account) {
35987
+ return account.type === "UserAccount";
35988
+ }
35989
+ function isServiceAccount(account) {
35990
+ return account.type === "ServiceAccount";
35991
+ }
35985
35992
  async function ensureAuthenticatedPartners(scopes = [], env = process.env, options2 = {}) {
35986
35993
  outputDebug(outputContent`Ensuring that the user is authenticated with the Partners API with the following scopes:
35987
35994
  ${outputToken.json(scopes)}
@@ -36065,7 +36072,7 @@ function unionArrayStrategy(destinationArray, sourceArray) {
36065
36072
  }
36066
36073
 
36067
36074
  // ../cli-kit/dist/public/common/object.js
36068
- var import_deepmerge = __toESM(require_cjs()), import_pickBy = __toESM(require_pickBy()), import_mapValues = __toESM(require_mapValues()), import_isEqual = __toESM(require_isEqual()), import_differenceWith = __toESM(require_differenceWith()), import_fromPairs = __toESM(require_fromPairs()), import_toPairs = __toESM(require_toPairs()), import_get = __toESM(require_get()), import_set = __toESM(require_set()), import_unset = __toESM(require_unset()), import_isEmpty = __toESM(require_isEmpty());
36075
+ var import_deepmerge = __toESM(require_cjs(), 1), import_pickBy = __toESM(require_pickBy(), 1), import_mapValues = __toESM(require_mapValues(), 1), import_isEqual = __toESM(require_isEqual(), 1), import_differenceWith = __toESM(require_differenceWith(), 1), import_fromPairs = __toESM(require_fromPairs(), 1), import_toPairs = __toESM(require_toPairs(), 1), import_get = __toESM(require_get(), 1), import_set = __toESM(require_set(), 1), import_unset = __toESM(require_unset(), 1), import_isEmpty = __toESM(require_isEmpty(), 1);
36069
36076
  function deepMergeObjects(lhs, rhs, arrayMergeStrategy = unionArrayStrategy) {
36070
36077
  return (0, import_deepmerge.default)(lhs, rhs, { arrayMerge: arrayMergeStrategy });
36071
36078
  }
@@ -36300,7 +36307,7 @@ function earliestDateTimeAfter(afterTime, dates) {
36300
36307
  }
36301
36308
 
36302
36309
  // ../cli-kit/dist/public/node/api/partners.js
36303
- var import_bottleneck = __toESM(require_lib3()), limiter = new import_bottleneck.default({
36310
+ var import_bottleneck = __toESM(require_lib3(), 1), limiter = new import_bottleneck.default({
36304
36311
  minTime: 150,
36305
36312
  maxConcurrent: 10
36306
36313
  });
@@ -36449,7 +36456,7 @@ function setLastSeenAuthMethod(method) {
36449
36456
  async function ensureAuthenticated(applications, _env, { forceRefresh = !1, noPrompt = !1, forceNewSession = !1 } = {}) {
36450
36457
  let fqdn = await identityFqdn(), previousStoreFqdn = applications.adminApi?.storeFqdn;
36451
36458
  if (previousStoreFqdn) {
36452
- let normalizedStoreName = await normalizeStoreFqdn(previousStoreFqdn);
36459
+ let normalizedStoreName = normalizeStoreFqdn(previousStoreFqdn);
36453
36460
  previousStoreFqdn === applications.adminApi?.storeFqdn && (applications.adminApi.storeFqdn = normalizedStoreName);
36454
36461
  }
36455
36462
  let sessions = await fetch3() ?? {}, currentSessionId = getCurrentSessionId();
@@ -36562,7 +36569,7 @@ function getExchangeScopes(apps) {
36562
36569
  function buildIdentityTokenFromEnv(scopes, identityTokenInformation) {
36563
36570
  return {
36564
36571
  ...identityTokenInformation,
36565
- expiresAt: new Date(Date.now() + 30 * 24 * 60 * 60 * 1e3),
36572
+ expiresAt: new Date(Date.now() + 720 * 60 * 60 * 1e3),
36566
36573
  scopes,
36567
36574
  alias: identityTokenInformation.userId
36568
36575
  };
@@ -36661,6 +36668,8 @@ export {
36661
36668
  ok,
36662
36669
  err,
36663
36670
  isThemeAccessSession,
36671
+ isUserAccount,
36672
+ isServiceAccount,
36664
36673
  ensureAuthenticatedPartners,
36665
36674
  ensureAuthenticatedAppManagementAndBusinessPlatform,
36666
36675
  ensureAuthenticatedStorefront,
@@ -36715,4 +36724,4 @@ mime-types/index.js:
36715
36724
  * MIT Licensed
36716
36725
  *)
36717
36726
  */
36718
- //# sourceMappingURL=chunk-LG53DXOY.js.map
36727
+ //# sourceMappingURL=chunk-ASZTU5FY.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  fanoutHooks,
3
3
  reportAnalyticsEvent
4
- } from "./chunk-I3ZBATYA.js";
4
+ } from "./chunk-T3CH4FSA.js";
5
5
  import {
6
6
  CLI_KIT_VERSION,
7
7
  getEnvironmentData,
8
8
  getLastSeenUserIdAfterAuth,
9
9
  isLocalEnvironment
10
- } from "./chunk-LG53DXOY.js";
10
+ } from "./chunk-ASZTU5FY.js";
11
11
  import {
12
12
  runWithRateLimit
13
- } from "./chunk-MRFYNZ7Q.js";
13
+ } from "./chunk-ZPIPJKU4.js";
14
14
  import {
15
15
  AbortSilentError,
16
16
  CancelExecution,
@@ -25,10 +25,10 @@ import {
25
25
  reportingRateLimit,
26
26
  require_stacktracey,
27
27
  shouldReportErrorAsUnexpected
28
- } from "./chunk-4WG5JQHA.js";
28
+ } from "./chunk-U5F5ZHHV.js";
29
29
  import {
30
30
  require_lib
31
- } from "./chunk-2VQSCETZ.js";
31
+ } from "./chunk-JXJ33RQ2.js";
32
32
  import {
33
33
  cwd,
34
34
  isAbsolutePath,
@@ -109,25 +109,25 @@ var require_stackframe = __commonJS({
109
109
  });
110
110
  };
111
111
  for (var i = 0; i < booleanProps.length; i++)
112
- StackFrame.prototype["get" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]), StackFrame.prototype["set" + _capitalize(booleanProps[i])] = /* @__PURE__ */ function(p) {
112
+ StackFrame.prototype["get" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]), StackFrame.prototype["set" + _capitalize(booleanProps[i])] = /* @__PURE__ */ (function(p) {
113
113
  return function(v) {
114
114
  this[p] = !!v;
115
115
  };
116
- }(booleanProps[i]);
116
+ })(booleanProps[i]);
117
117
  for (var j = 0; j < numericProps.length; j++)
118
- StackFrame.prototype["get" + _capitalize(numericProps[j])] = _getter(numericProps[j]), StackFrame.prototype["set" + _capitalize(numericProps[j])] = /* @__PURE__ */ function(p) {
118
+ StackFrame.prototype["get" + _capitalize(numericProps[j])] = _getter(numericProps[j]), StackFrame.prototype["set" + _capitalize(numericProps[j])] = /* @__PURE__ */ (function(p) {
119
119
  return function(v) {
120
120
  if (!_isNumber(v))
121
121
  throw new TypeError(p + " must be a Number");
122
122
  this[p] = Number(v);
123
123
  };
124
- }(numericProps[j]);
124
+ })(numericProps[j]);
125
125
  for (var k = 0; k < stringProps.length; k++)
126
- StackFrame.prototype["get" + _capitalize(stringProps[k])] = _getter(stringProps[k]), StackFrame.prototype["set" + _capitalize(stringProps[k])] = /* @__PURE__ */ function(p) {
126
+ StackFrame.prototype["get" + _capitalize(stringProps[k])] = _getter(stringProps[k]), StackFrame.prototype["set" + _capitalize(stringProps[k])] = /* @__PURE__ */ (function(p) {
127
127
  return function(v) {
128
128
  this[p] = String(v);
129
129
  };
130
- }(stringProps[k]);
130
+ })(stringProps[k]);
131
131
  return StackFrame;
132
132
  });
133
133
  }
@@ -478,7 +478,7 @@ var require_bugsnag = __commonJS({
478
478
  typeof window < "u" ? g = window : typeof global < "u" ? g = global : typeof self < "u" ? g = self : g = this, g.bugsnag = f();
479
479
  }
480
480
  })(function() {
481
- var define2, module2, exports2, Breadcrumb = /* @__PURE__ */ function() {
481
+ var define2, module2, exports2, Breadcrumb = /* @__PURE__ */ (function() {
482
482
  function Breadcrumb2(message, metadata, type, timestamp) {
483
483
  timestamp === void 0 && (timestamp = /* @__PURE__ */ new Date()), this.type = type, this.message = message, this.metadata = metadata, this.timestamp = timestamp;
484
484
  }
@@ -491,7 +491,7 @@ var require_bugsnag = __commonJS({
491
491
  metaData: this.metadata
492
492
  };
493
493
  }, Breadcrumb2;
494
- }(), _$Breadcrumb_7 = Breadcrumb, _$breadcrumbTypes_12 = ["navigation", "request", "process", "log", "user", "state", "error", "manual"], _$reduce_22 = function(arr, fn, accum) {
494
+ })(), _$Breadcrumb_7 = Breadcrumb, _$breadcrumbTypes_12 = ["navigation", "request", "process", "log", "user", "state", "error", "manual"], _$reduce_22 = function(arr, fn, accum) {
495
495
  for (var val = accum, i = 0, len = arr.length; i < len; i++) val = fn(val, arr[i], i, arr);
496
496
  return val;
497
497
  }, _$filter_17 = function(arr, fn) {
@@ -944,7 +944,7 @@ var require_bugsnag = __commonJS({
944
944
  return n;
945
945
  }, _extends.apply(null, arguments);
946
946
  }
947
- var StackGenerator = require_stack_generator(), Event = /* @__PURE__ */ function() {
947
+ var StackGenerator = require_stack_generator(), Event = /* @__PURE__ */ (function() {
948
948
  function Event2(errorClass, errorMessage, stacktrace, handledState, originalError) {
949
949
  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._groupingDiscriminator = void 0, this.errors = [createBugsnagError(errorClass, errorMessage, Event2.__type, stacktrace)];
950
950
  }
@@ -1009,7 +1009,7 @@ var require_bugsnag = __commonJS({
1009
1009
  correlation: this._correlation
1010
1010
  };
1011
1011
  }, Event2;
1012
- }(), formatStackframe = function(frame) {
1012
+ })(), formatStackframe = function(frame) {
1013
1013
  var f = {
1014
1014
  file: frame.fileName,
1015
1015
  method: normaliseFunctionName(frame.functionName),
@@ -1203,7 +1203,7 @@ var require_bugsnag = __commonJS({
1203
1203
  return letter + timestamp + counter + print + random;
1204
1204
  }
1205
1205
  cuid.fingerprint = _$fingerprint_2, cuid.isCuid = _$isCuid_3;
1206
- var _$cuid_1 = cuid, Session = /* @__PURE__ */ function() {
1206
+ var _$cuid_1 = cuid, Session = /* @__PURE__ */ (function() {
1207
1207
  function Session2() {
1208
1208
  this.id = _$cuid_1(), this.startedAt = /* @__PURE__ */ new Date(), this._handled = 0, this._unhandled = 0, this._user = {}, this.app = {}, this.device = {};
1209
1209
  }
@@ -1228,8 +1228,8 @@ var require_bugsnag = __commonJS({
1228
1228
  }, _proto._track = function(event) {
1229
1229
  this[event._handledState.unhandled ? "_unhandled" : "_handled"] += 1;
1230
1230
  }, Session2;
1231
- }(), _$Session_34 = Session, __add_8 = _$featureFlagDelegate_23.add, __clear_8 = _$featureFlagDelegate_23.clear, __merge_8 = _$featureFlagDelegate_23.merge, HUB_PREFIX = "00000", HUB_NOTIFY = "https://notify.insighthub.smartbear.com", HUB_SESSION = "https://sessions.insighthub.smartbear.com", noop = function() {
1232
- }, Client = /* @__PURE__ */ function() {
1231
+ })(), _$Session_34 = Session, __add_8 = _$featureFlagDelegate_23.add, __clear_8 = _$featureFlagDelegate_23.clear, __merge_8 = _$featureFlagDelegate_23.merge, HUB_PREFIX = "00000", HUB_NOTIFY = "https://notify.insighthub.smartbear.com", HUB_SESSION = "https://sessions.insighthub.smartbear.com", noop = function() {
1232
+ }, Client = /* @__PURE__ */ (function() {
1233
1233
  function Client2(configuration, schema2, internalPlugins2, notifier) {
1234
1234
  var _this = this;
1235
1235
  schema2 === void 0 && (schema2 = _$config_9.schema), internalPlugins2 === void 0 && (internalPlugins2 = []), this._notifier = notifier, this._config = {}, this._schema = schema2, this._delivery = {
@@ -1391,7 +1391,7 @@ var require_bugsnag = __commonJS({
1391
1391
  });
1392
1392
  });
1393
1393
  }, Client2;
1394
- }(), generateConfigErrorMessage = function(errors, rawInput) {
1394
+ })(), generateConfigErrorMessage = function(errors, rawInput) {
1395
1395
  var er = new Error(`Invalid configuration
1396
1396
  ` + _$map_21(_$keys_20(errors), function(key) {
1397
1397
  return " - " + key + " " + errors[key] + ", got " + stringify(rawInput[key]);
@@ -1833,7 +1833,7 @@ metadata was removed`
1833
1833
  if (err && err.message !== "premature close") return cb(err);
1834
1834
  cb(null, slicer.getCode());
1835
1835
  });
1836
- }, CodeRange = /* @__PURE__ */ function(_Writable) {
1836
+ }, CodeRange = /* @__PURE__ */ (function(_Writable) {
1837
1837
  function CodeRange2(opts) {
1838
1838
  var _this;
1839
1839
  return _this = _Writable.call(this, ___extends_45({}, opts, {
@@ -1847,7 +1847,7 @@ metadata was removed`
1847
1847
  }, _proto.getCode = function() {
1848
1848
  return this._code;
1849
1849
  }, CodeRange2;
1850
- }(Writable), pMapSeries = function(ps) {
1850
+ })(Writable), pMapSeries = function(ps) {
1851
1851
  return new Promise(function(resolve2, reject) {
1852
1852
  var res = [];
1853
1853
  ps.reduce(function(accum, p) {
@@ -1926,7 +1926,7 @@ metadata was removed`
1926
1926
  return t2.__proto__ = e2, t2;
1927
1927
  }, ___setPrototypeOf_49(t, e);
1928
1928
  }
1929
- var DEFAULT_SUMMARY_INTERVAL = 10 * 1e3, Emitter = __require("events").EventEmitter, _$tracker_49 = /* @__PURE__ */ function(_Emitter) {
1929
+ var DEFAULT_SUMMARY_INTERVAL = 10 * 1e3, Emitter = __require("events").EventEmitter, _$tracker_49 = /* @__PURE__ */ (function(_Emitter) {
1930
1930
  function SessionTracker(intervalLength) {
1931
1931
  var _this;
1932
1932
  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(_this), _this;
@@ -1949,7 +1949,7 @@ metadata was removed`
1949
1949
  }), _this2._sessions.delete(key);
1950
1950
  }), summary.length && this.emit("summary", summary);
1951
1951
  }, SessionTracker;
1952
- }(Emitter), dateToMsKey = function(d) {
1952
+ })(Emitter), dateToMsKey = function(d) {
1953
1953
  var dk = new Date(d);
1954
1954
  return dk.setSeconds(0), dk.setMilliseconds(0), dk.toISOString();
1955
1955
  }, _$session_48 = {
@@ -2233,4 +2233,4 @@ export {
2233
2233
  registerCleanBugsnagErrorsFromWithinPlugins,
2234
2234
  addBugsnagMetadata
2235
2235
  };
2236
- //# sourceMappingURL=chunk-Z46NFQ33.js.map
2236
+ //# sourceMappingURL=chunk-D3N5EZME.js.map