@hot-updater/aws 0.18.1 → 0.18.3

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.
@@ -308,7 +308,7 @@ Object.keys(r.modifier);
308
308
  const tD = Object.keys(r.color), eD = Object.keys(r.bgColor);
309
309
  [...tD, ...eD];
310
310
  function sD() {
311
- const t = new Map();
311
+ const t = /* @__PURE__ */ new Map();
312
312
  for (const [u$2, F$1] of Object.entries(r)) {
313
313
  for (const [e$1, s] of Object.entries(F$1)) r[e$1] = {
314
314
  open: `\x1B[${s[0]}m`,
@@ -523,7 +523,7 @@ var AD = Object.defineProperty, pD = (t, u$2, F$1) => u$2 in t ? AD(t, u$2, {
523
523
  }) : t[u$2] = F$1, h$1 = (t, u$2, F$1) => (pD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
524
524
  var x = class {
525
525
  constructor(u$2, F$1 = !0) {
526
- h$1(this, "input"), h$1(this, "output"), h$1(this, "_abortSignal"), h$1(this, "rl"), h$1(this, "opts"), h$1(this, "_render"), h$1(this, "_track", !1), h$1(this, "_prevFrame", ""), h$1(this, "_subscribers", new Map()), h$1(this, "_cursor", 0), h$1(this, "state", "initial"), h$1(this, "error", ""), h$1(this, "value");
526
+ h$1(this, "input"), h$1(this, "output"), h$1(this, "_abortSignal"), h$1(this, "rl"), h$1(this, "opts"), h$1(this, "_render"), h$1(this, "_track", !1), h$1(this, "_prevFrame", ""), h$1(this, "_subscribers", /* @__PURE__ */ new Map()), h$1(this, "_cursor", 0), h$1(this, "state", "initial"), h$1(this, "error", ""), h$1(this, "value");
527
527
  const { input: e$1 = node_process.stdin, output: s = node_process.stdout, render: i$1, signal: D$1,...C$1 } = u$2;
528
528
  this.opts = C$1, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i$1.bind(this), this._track = F$1, this._abortSignal = D$1, this.input = e$1, this.output = s;
529
529
  }
@@ -1941,7 +1941,7 @@ const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, command
1941
1941
  type,
1942
1942
  escapedCommand,
1943
1943
  commandId: `${commandId}`,
1944
- timestamp: new Date(),
1944
+ timestamp: /* @__PURE__ */ new Date(),
1945
1945
  piped,
1946
1946
  result,
1947
1947
  options
@@ -3062,7 +3062,7 @@ const getFromStream = (source, from = "stdout") => {
3062
3062
  if (sourceStream === null || sourceStream === void 0) throw new TypeError(getInvalidStdioOptionMessage(fdNumber, from, options, isWritable));
3063
3063
  return sourceStream;
3064
3064
  };
3065
- const SUBPROCESS_OPTIONS = new WeakMap();
3065
+ const SUBPROCESS_OPTIONS = /* @__PURE__ */ new WeakMap();
3066
3066
  const getFdNumber = (fileDescriptors, fdName, isWritable) => {
3067
3067
  const fdNumber = parseFdNumber(fdName, isWritable);
3068
3068
  validateFdNumber(fdNumber, fdName, isWritable, fileDescriptors);
@@ -3191,7 +3191,7 @@ const onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, bou
3191
3191
  ipcEmitter.connected = false;
3192
3192
  ipcEmitter.emit("disconnect");
3193
3193
  };
3194
- const INCOMING_MESSAGES = new WeakMap();
3194
+ const INCOMING_MESSAGES = /* @__PURE__ */ new WeakMap();
3195
3195
 
3196
3196
  //#endregion
3197
3197
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/forward.js
@@ -3208,7 +3208,7 @@ const getIpcEmitter = (anyProcess, channel, isSubprocess) => {
3208
3208
  });
3209
3209
  return ipcEmitter;
3210
3210
  };
3211
- const IPC_EMITTERS = new WeakMap();
3211
+ const IPC_EMITTERS = /* @__PURE__ */ new WeakMap();
3212
3212
  const forwardEvents = ({ ipcEmitter, anyProcess, channel, isSubprocess }) => {
3213
3213
  const boundOnMessage = onMessage.bind(void 0, {
3214
3214
  anyProcess,
@@ -3307,7 +3307,7 @@ const RESPONSE_TYPE = "execa:ipc:response";
3307
3307
  //#endregion
3308
3308
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/outgoing.js
3309
3309
  const startSendMessage = (anyProcess, wrappedMessage, strict) => {
3310
- if (!OUTGOING_MESSAGES.has(anyProcess)) OUTGOING_MESSAGES.set(anyProcess, new Set());
3310
+ if (!OUTGOING_MESSAGES.has(anyProcess)) OUTGOING_MESSAGES.set(anyProcess, /* @__PURE__ */ new Set());
3311
3311
  const outgoingMessages = OUTGOING_MESSAGES.get(anyProcess);
3312
3312
  const onMessageSent = createDeferred();
3313
3313
  const id = strict ? wrappedMessage.id : void 0;
@@ -3332,7 +3332,7 @@ const waitForOutgoingMessages = async (anyProcess, ipcEmitter, wrappedMessage) =
3332
3332
  await Promise.all(outgoingMessages.map(({ onMessageSent }) => onMessageSent));
3333
3333
  }
3334
3334
  };
3335
- const OUTGOING_MESSAGES = new WeakMap();
3335
+ const OUTGOING_MESSAGES = /* @__PURE__ */ new WeakMap();
3336
3336
  const hasMessageListeners = (anyProcess, ipcEmitter) => ipcEmitter.listenerCount("message") > getMinListenerCount(anyProcess);
3337
3337
  const getMinListenerCount = (anyProcess) => SUBPROCESS_OPTIONS.has(anyProcess) && !getFdSpecificValue(SUBPROCESS_OPTIONS.get(anyProcess).options.buffer, "ipc") ? 1 : 0;
3338
3338
 
@@ -3404,7 +3404,7 @@ const getSendMethod = (anyProcess) => {
3404
3404
  PROCESS_SEND_METHODS.set(anyProcess, sendMethod);
3405
3405
  return sendMethod;
3406
3406
  };
3407
- const PROCESS_SEND_METHODS = new WeakMap();
3407
+ const PROCESS_SEND_METHODS = /* @__PURE__ */ new WeakMap();
3408
3408
 
3409
3409
  //#endregion
3410
3410
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/graceful.js
@@ -3721,14 +3721,14 @@ const CR_BINARY = CR.codePointAt(0);
3721
3721
  function isStream(stream, { checkOpen = true } = {}) {
3722
3722
  return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === void 0 && stream.readable === void 0) && typeof stream.pipe === "function";
3723
3723
  }
3724
- function isWritableStream$1(stream, { checkOpen = true } = {}) {
3724
+ function isWritableStream(stream, { checkOpen = true } = {}) {
3725
3725
  return isStream(stream, { checkOpen }) && (stream.writable || !checkOpen) && typeof stream.write === "function" && typeof stream.end === "function" && typeof stream.writable === "boolean" && typeof stream.writableObjectMode === "boolean" && typeof stream.destroy === "function" && typeof stream.destroyed === "boolean";
3726
3726
  }
3727
- function isReadableStream$1(stream, { checkOpen = true } = {}) {
3727
+ function isReadableStream(stream, { checkOpen = true } = {}) {
3728
3728
  return isStream(stream, { checkOpen }) && (stream.readable || !checkOpen) && typeof stream.read === "function" && typeof stream.readable === "boolean" && typeof stream.readableObjectMode === "boolean" && typeof stream.destroy === "function" && typeof stream.destroyed === "boolean";
3729
3729
  }
3730
3730
  function isDuplexStream(stream, options) {
3731
- return isWritableStream$1(stream, options) && isReadableStream$1(stream, options);
3731
+ return isWritableStream(stream, options) && isReadableStream(stream, options);
3732
3732
  }
3733
3733
 
3734
3734
  //#endregion
@@ -3815,7 +3815,7 @@ function h({ preventCancel: r$1 = !1 } = {}) {
3815
3815
  //#endregion
3816
3816
  //#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
3817
3817
  const getAsyncIterable = (stream) => {
3818
- if (isReadableStream$1(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
3818
+ if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
3819
3819
  if (typeof stream?.[Symbol.asyncIterator] === "function") return stream;
3820
3820
  if (toString.call(stream) === "[object ReadableStream]") return h.call(stream);
3821
3821
  throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.");
@@ -4514,10 +4514,10 @@ const KNOWN_STDIO_STRINGS = new Set([
4514
4514
  "overlapped",
4515
4515
  "pipe"
4516
4516
  ]);
4517
- const isReadableStream = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
4518
- const isWritableStream = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
4519
- const isWebStream = (value) => isReadableStream(value) || isWritableStream(value);
4520
- const isTransformStream = (value) => isReadableStream(value?.readable) && isWritableStream(value?.writable);
4517
+ const isReadableStream$1 = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
4518
+ const isWritableStream$1 = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
4519
+ const isWebStream = (value) => isReadableStream$1(value) || isWritableStream$1(value);
4520
+ const isTransformStream = (value) => isReadableStream$1(value?.readable) && isWritableStream$1(value?.writable);
4521
4521
  const isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
4522
4522
  const isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
4523
4523
  const isObject = (value) => typeof value === "object" && value !== null;
@@ -4681,10 +4681,10 @@ const guessStreamDirection = {
4681
4681
  iterable: alwaysInput,
4682
4682
  asyncIterable: alwaysInput,
4683
4683
  uint8Array: alwaysInput,
4684
- webStream: (value) => isWritableStream(value) ? "output" : "input",
4684
+ webStream: (value) => isWritableStream$1(value) ? "output" : "input",
4685
4685
  nodeStream(value) {
4686
- if (!isReadableStream$1(value, { checkOpen: false })) return "output";
4687
- return isWritableStream$1(value, { checkOpen: false }) ? void 0 : "input";
4686
+ if (!isReadableStream(value, { checkOpen: false })) return "output";
4687
+ return isWritableStream(value, { checkOpen: false }) ? void 0 : "input";
4688
4688
  },
4689
4689
  webTransform: anyDirection,
4690
4690
  duplex: anyDirection,
@@ -4814,7 +4814,7 @@ const handleInputOption = (input) => input === void 0 ? [] : [{
4814
4814
  optionName: "input"
4815
4815
  }];
4816
4816
  const getInputType = (input) => {
4817
- if (isReadableStream$1(input, { checkOpen: false })) return "nodeStream";
4817
+ if (isReadableStream(input, { checkOpen: false })) return "nodeStream";
4818
4818
  if (typeof input === "string") return "string";
4819
4819
  if (isUint8Array(input)) return "uint8Array";
4820
4820
  throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.");
@@ -5952,7 +5952,7 @@ var MergedStream = class extends node_stream.PassThrough {
5952
5952
  #aborted = new Set([]);
5953
5953
  #onFinished;
5954
5954
  #unpipeEvent = Symbol("unpipe");
5955
- #streamPromises = new WeakMap();
5955
+ #streamPromises = /* @__PURE__ */ new WeakMap();
5956
5956
  add(stream) {
5957
5957
  validateStream(stream);
5958
5958
  if (this.#streams.has(stream)) return;
@@ -6132,7 +6132,7 @@ const abortSourceStream = (source) => {
6132
6132
  //#endregion
6133
6133
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-async.js
6134
6134
  const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
6135
- const pipeGroups = new Map();
6135
+ const pipeGroups = /* @__PURE__ */ new Map();
6136
6136
  for (const [fdNumber, { stdioItems, direction }] of Object.entries(fileDescriptors)) {
6137
6137
  for (const { stream } of stdioItems.filter(({ type }) => TRANSFORM_TYPES.has(type))) pipeTransform(subprocess, stream, direction, fdNumber);
6138
6138
  for (const { stream } of stdioItems.filter(({ type }) => !TRANSFORM_TYPES.has(type))) pipeStdioItem({
@@ -6538,7 +6538,7 @@ const cleanupMergedStreamsMap = async (destinationStream) => {
6538
6538
  } catch {}
6539
6539
  MERGED_STREAMS.delete(destinationStream);
6540
6540
  };
6541
- const MERGED_STREAMS = new WeakMap();
6541
+ const MERGED_STREAMS = /* @__PURE__ */ new WeakMap();
6542
6542
  const SOURCE_LISTENERS_PER_PIPE = 2;
6543
6543
  const DESTINATION_LISTENERS_PER_PIPE = 1;
6544
6544
 
@@ -7024,9 +7024,9 @@ const throwOnSubprocessError = async (subprocess, { signal }) => {
7024
7024
  //#endregion
7025
7025
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/concurrent.js
7026
7026
  const initializeConcurrentStreams = () => ({
7027
- readableDestroy: new WeakMap(),
7028
- writableFinal: new WeakMap(),
7029
- writableDestroy: new WeakMap()
7027
+ readableDestroy: /* @__PURE__ */ new WeakMap(),
7028
+ writableFinal: /* @__PURE__ */ new WeakMap(),
7029
+ writableDestroy: /* @__PURE__ */ new WeakMap()
7030
7030
  });
7031
7031
  const addConcurrentStream = (concurrentStreams, stream, waitName) => {
7032
7032
  const weakMap = concurrentStreams[waitName];
@@ -7940,7 +7940,7 @@ var CloudFrontManager = class {
7940
7940
  await cloudfrontClient.createInvalidation({
7941
7941
  DistributionId: selectedDistribution.Id,
7942
7942
  InvalidationBatch: {
7943
- CallerReference: new Date().toISOString(),
7943
+ CallerReference: (/* @__PURE__ */ new Date()).toISOString(),
7944
7944
  Paths: {
7945
7945
  Quantity: 1,
7946
7946
  Items: ["/*"]
@@ -7958,7 +7958,7 @@ var CloudFrontManager = class {
7958
7958
  }
7959
7959
  }
7960
7960
  const finalDistributionConfig = {
7961
- CallerReference: new Date().toISOString(),
7961
+ CallerReference: (/* @__PURE__ */ new Date()).toISOString(),
7962
7962
  Comment: "Hot Updater CloudFront distribution",
7963
7963
  Enabled: true,
7964
7964
  Origins: {
@@ -8316,7 +8316,7 @@ var LambdaEdgeDeployer = class {
8316
8316
 
8317
8317
  //#endregion
8318
8318
  //#region iac/migrations/migrator.ts
8319
- var import_picocolors$1 = __toESM(require_picocolors(), 1);
8319
+ var import_picocolors$1 = __toESM(require_picocolors());
8320
8320
  /**
8321
8321
  * S3Migration
8322
8322
  * Base class that each migration script extends.
@@ -8327,7 +8327,7 @@ var S3Migration = class {
8327
8327
  s3;
8328
8328
  bucketName;
8329
8329
  dryRun = false;
8330
- backupMapping = new Map();
8330
+ backupMapping = /* @__PURE__ */ new Map();
8331
8331
  async doUpdateFile(key, content, { cacheControl } = {}) {
8332
8332
  const normalizedKey = key.startsWith("/") ? key.substring(1) : key;
8333
8333
  const upload = new __aws_sdk_lib_storage.Upload({
@@ -8541,7 +8541,7 @@ var S3Migrator = class {
8541
8541
  if (!dryRun) {
8542
8542
  this.migrationRecords.push({
8543
8543
  name: migration.name,
8544
- appliedAt: new Date().toISOString()
8544
+ appliedAt: (/* @__PURE__ */ new Date()).toISOString()
8545
8545
  });
8546
8546
  console.log(import_picocolors$1.default.green(`${import_picocolors$1.default.bold(migration.name)} applied successfully.`));
8547
8547
  await migration.cleanupBackups();
@@ -8850,7 +8850,7 @@ export default HotUpdater.wrap({
8850
8850
 
8851
8851
  //#endregion
8852
8852
  //#region iac/index.ts
8853
- var import_picocolors = __toESM(require_picocolors(), 1);
8853
+ var import_picocolors = __toESM(require_picocolors());
8854
8854
  const checkIfAwsCliInstalled = async () => {
8855
8855
  try {
8856
8856
  await execa("aws", ["--version"]);
@@ -6,6 +6,5 @@ declare const runInit: ({
6
6
  }: {
7
7
  build: BuildType;
8
8
  }) => Promise<void>;
9
-
10
9
  //#endregion
11
10
  export { runInit };
@@ -6,6 +6,5 @@ declare const runInit: ({
6
6
  }: {
7
7
  build: BuildType;
8
8
  }) => Promise<void>;
9
-
10
9
  //#endregion
11
10
  export { runInit };
package/dist/iac/index.js CHANGED
@@ -311,7 +311,7 @@ Object.keys(r.modifier);
311
311
  const tD = Object.keys(r.color), eD = Object.keys(r.bgColor);
312
312
  [...tD, ...eD];
313
313
  function sD() {
314
- const t = new Map();
314
+ const t = /* @__PURE__ */ new Map();
315
315
  for (const [u$2, F$1] of Object.entries(r)) {
316
316
  for (const [e$1, s] of Object.entries(F$1)) r[e$1] = {
317
317
  open: `\x1B[${s[0]}m`,
@@ -526,7 +526,7 @@ var AD = Object.defineProperty, pD = (t, u$2, F$1) => u$2 in t ? AD(t, u$2, {
526
526
  }) : t[u$2] = F$1, h$1 = (t, u$2, F$1) => (pD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
527
527
  var x = class {
528
528
  constructor(u$2, F$1 = !0) {
529
- h$1(this, "input"), h$1(this, "output"), h$1(this, "_abortSignal"), h$1(this, "rl"), h$1(this, "opts"), h$1(this, "_render"), h$1(this, "_track", !1), h$1(this, "_prevFrame", ""), h$1(this, "_subscribers", new Map()), h$1(this, "_cursor", 0), h$1(this, "state", "initial"), h$1(this, "error", ""), h$1(this, "value");
529
+ h$1(this, "input"), h$1(this, "output"), h$1(this, "_abortSignal"), h$1(this, "rl"), h$1(this, "opts"), h$1(this, "_render"), h$1(this, "_track", !1), h$1(this, "_prevFrame", ""), h$1(this, "_subscribers", /* @__PURE__ */ new Map()), h$1(this, "_cursor", 0), h$1(this, "state", "initial"), h$1(this, "error", ""), h$1(this, "value");
530
530
  const { input: e$1 = stdin, output: s = stdout, render: i$1, signal: D$1,...C$1 } = u$2;
531
531
  this.opts = C$1, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i$1.bind(this), this._track = F$1, this._abortSignal = D$1, this.input = e$1, this.output = s;
532
532
  }
@@ -1944,7 +1944,7 @@ const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, command
1944
1944
  type,
1945
1945
  escapedCommand,
1946
1946
  commandId: `${commandId}`,
1947
- timestamp: new Date(),
1947
+ timestamp: /* @__PURE__ */ new Date(),
1948
1948
  piped,
1949
1949
  result,
1950
1950
  options
@@ -3065,7 +3065,7 @@ const getFromStream = (source, from = "stdout") => {
3065
3065
  if (sourceStream === null || sourceStream === void 0) throw new TypeError(getInvalidStdioOptionMessage(fdNumber, from, options, isWritable));
3066
3066
  return sourceStream;
3067
3067
  };
3068
- const SUBPROCESS_OPTIONS = new WeakMap();
3068
+ const SUBPROCESS_OPTIONS = /* @__PURE__ */ new WeakMap();
3069
3069
  const getFdNumber = (fileDescriptors, fdName, isWritable) => {
3070
3070
  const fdNumber = parseFdNumber(fdName, isWritable);
3071
3071
  validateFdNumber(fdNumber, fdName, isWritable, fileDescriptors);
@@ -3194,7 +3194,7 @@ const onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, bou
3194
3194
  ipcEmitter.connected = false;
3195
3195
  ipcEmitter.emit("disconnect");
3196
3196
  };
3197
- const INCOMING_MESSAGES = new WeakMap();
3197
+ const INCOMING_MESSAGES = /* @__PURE__ */ new WeakMap();
3198
3198
 
3199
3199
  //#endregion
3200
3200
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/forward.js
@@ -3211,7 +3211,7 @@ const getIpcEmitter = (anyProcess, channel, isSubprocess) => {
3211
3211
  });
3212
3212
  return ipcEmitter;
3213
3213
  };
3214
- const IPC_EMITTERS = new WeakMap();
3214
+ const IPC_EMITTERS = /* @__PURE__ */ new WeakMap();
3215
3215
  const forwardEvents = ({ ipcEmitter, anyProcess, channel, isSubprocess }) => {
3216
3216
  const boundOnMessage = onMessage.bind(void 0, {
3217
3217
  anyProcess,
@@ -3310,7 +3310,7 @@ const RESPONSE_TYPE = "execa:ipc:response";
3310
3310
  //#endregion
3311
3311
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/outgoing.js
3312
3312
  const startSendMessage = (anyProcess, wrappedMessage, strict) => {
3313
- if (!OUTGOING_MESSAGES.has(anyProcess)) OUTGOING_MESSAGES.set(anyProcess, new Set());
3313
+ if (!OUTGOING_MESSAGES.has(anyProcess)) OUTGOING_MESSAGES.set(anyProcess, /* @__PURE__ */ new Set());
3314
3314
  const outgoingMessages = OUTGOING_MESSAGES.get(anyProcess);
3315
3315
  const onMessageSent = createDeferred();
3316
3316
  const id = strict ? wrappedMessage.id : void 0;
@@ -3335,7 +3335,7 @@ const waitForOutgoingMessages = async (anyProcess, ipcEmitter, wrappedMessage) =
3335
3335
  await Promise.all(outgoingMessages.map(({ onMessageSent }) => onMessageSent));
3336
3336
  }
3337
3337
  };
3338
- const OUTGOING_MESSAGES = new WeakMap();
3338
+ const OUTGOING_MESSAGES = /* @__PURE__ */ new WeakMap();
3339
3339
  const hasMessageListeners = (anyProcess, ipcEmitter) => ipcEmitter.listenerCount("message") > getMinListenerCount(anyProcess);
3340
3340
  const getMinListenerCount = (anyProcess) => SUBPROCESS_OPTIONS.has(anyProcess) && !getFdSpecificValue(SUBPROCESS_OPTIONS.get(anyProcess).options.buffer, "ipc") ? 1 : 0;
3341
3341
 
@@ -3407,7 +3407,7 @@ const getSendMethod = (anyProcess) => {
3407
3407
  PROCESS_SEND_METHODS.set(anyProcess, sendMethod);
3408
3408
  return sendMethod;
3409
3409
  };
3410
- const PROCESS_SEND_METHODS = new WeakMap();
3410
+ const PROCESS_SEND_METHODS = /* @__PURE__ */ new WeakMap();
3411
3411
 
3412
3412
  //#endregion
3413
3413
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/graceful.js
@@ -3724,14 +3724,14 @@ const CR_BINARY = CR.codePointAt(0);
3724
3724
  function isStream(stream, { checkOpen = true } = {}) {
3725
3725
  return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === void 0 && stream.readable === void 0) && typeof stream.pipe === "function";
3726
3726
  }
3727
- function isWritableStream$1(stream, { checkOpen = true } = {}) {
3727
+ function isWritableStream(stream, { checkOpen = true } = {}) {
3728
3728
  return isStream(stream, { checkOpen }) && (stream.writable || !checkOpen) && typeof stream.write === "function" && typeof stream.end === "function" && typeof stream.writable === "boolean" && typeof stream.writableObjectMode === "boolean" && typeof stream.destroy === "function" && typeof stream.destroyed === "boolean";
3729
3729
  }
3730
- function isReadableStream$1(stream, { checkOpen = true } = {}) {
3730
+ function isReadableStream(stream, { checkOpen = true } = {}) {
3731
3731
  return isStream(stream, { checkOpen }) && (stream.readable || !checkOpen) && typeof stream.read === "function" && typeof stream.readable === "boolean" && typeof stream.readableObjectMode === "boolean" && typeof stream.destroy === "function" && typeof stream.destroyed === "boolean";
3732
3732
  }
3733
3733
  function isDuplexStream(stream, options) {
3734
- return isWritableStream$1(stream, options) && isReadableStream$1(stream, options);
3734
+ return isWritableStream(stream, options) && isReadableStream(stream, options);
3735
3735
  }
3736
3736
 
3737
3737
  //#endregion
@@ -3818,7 +3818,7 @@ function h({ preventCancel: r$1 = !1 } = {}) {
3818
3818
  //#endregion
3819
3819
  //#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
3820
3820
  const getAsyncIterable = (stream) => {
3821
- if (isReadableStream$1(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
3821
+ if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
3822
3822
  if (typeof stream?.[Symbol.asyncIterator] === "function") return stream;
3823
3823
  if (toString.call(stream) === "[object ReadableStream]") return h.call(stream);
3824
3824
  throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.");
@@ -4517,10 +4517,10 @@ const KNOWN_STDIO_STRINGS = new Set([
4517
4517
  "overlapped",
4518
4518
  "pipe"
4519
4519
  ]);
4520
- const isReadableStream = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
4521
- const isWritableStream = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
4522
- const isWebStream = (value) => isReadableStream(value) || isWritableStream(value);
4523
- const isTransformStream = (value) => isReadableStream(value?.readable) && isWritableStream(value?.writable);
4520
+ const isReadableStream$1 = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
4521
+ const isWritableStream$1 = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
4522
+ const isWebStream = (value) => isReadableStream$1(value) || isWritableStream$1(value);
4523
+ const isTransformStream = (value) => isReadableStream$1(value?.readable) && isWritableStream$1(value?.writable);
4524
4524
  const isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
4525
4525
  const isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
4526
4526
  const isObject = (value) => typeof value === "object" && value !== null;
@@ -4684,10 +4684,10 @@ const guessStreamDirection = {
4684
4684
  iterable: alwaysInput,
4685
4685
  asyncIterable: alwaysInput,
4686
4686
  uint8Array: alwaysInput,
4687
- webStream: (value) => isWritableStream(value) ? "output" : "input",
4687
+ webStream: (value) => isWritableStream$1(value) ? "output" : "input",
4688
4688
  nodeStream(value) {
4689
- if (!isReadableStream$1(value, { checkOpen: false })) return "output";
4690
- return isWritableStream$1(value, { checkOpen: false }) ? void 0 : "input";
4689
+ if (!isReadableStream(value, { checkOpen: false })) return "output";
4690
+ return isWritableStream(value, { checkOpen: false }) ? void 0 : "input";
4691
4691
  },
4692
4692
  webTransform: anyDirection,
4693
4693
  duplex: anyDirection,
@@ -4817,7 +4817,7 @@ const handleInputOption = (input) => input === void 0 ? [] : [{
4817
4817
  optionName: "input"
4818
4818
  }];
4819
4819
  const getInputType = (input) => {
4820
- if (isReadableStream$1(input, { checkOpen: false })) return "nodeStream";
4820
+ if (isReadableStream(input, { checkOpen: false })) return "nodeStream";
4821
4821
  if (typeof input === "string") return "string";
4822
4822
  if (isUint8Array(input)) return "uint8Array";
4823
4823
  throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.");
@@ -5955,7 +5955,7 @@ var MergedStream = class extends PassThrough {
5955
5955
  #aborted = new Set([]);
5956
5956
  #onFinished;
5957
5957
  #unpipeEvent = Symbol("unpipe");
5958
- #streamPromises = new WeakMap();
5958
+ #streamPromises = /* @__PURE__ */ new WeakMap();
5959
5959
  add(stream) {
5960
5960
  validateStream(stream);
5961
5961
  if (this.#streams.has(stream)) return;
@@ -6135,7 +6135,7 @@ const abortSourceStream = (source) => {
6135
6135
  //#endregion
6136
6136
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-async.js
6137
6137
  const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
6138
- const pipeGroups = new Map();
6138
+ const pipeGroups = /* @__PURE__ */ new Map();
6139
6139
  for (const [fdNumber, { stdioItems, direction }] of Object.entries(fileDescriptors)) {
6140
6140
  for (const { stream } of stdioItems.filter(({ type }) => TRANSFORM_TYPES.has(type))) pipeTransform(subprocess, stream, direction, fdNumber);
6141
6141
  for (const { stream } of stdioItems.filter(({ type }) => !TRANSFORM_TYPES.has(type))) pipeStdioItem({
@@ -6541,7 +6541,7 @@ const cleanupMergedStreamsMap = async (destinationStream) => {
6541
6541
  } catch {}
6542
6542
  MERGED_STREAMS.delete(destinationStream);
6543
6543
  };
6544
- const MERGED_STREAMS = new WeakMap();
6544
+ const MERGED_STREAMS = /* @__PURE__ */ new WeakMap();
6545
6545
  const SOURCE_LISTENERS_PER_PIPE = 2;
6546
6546
  const DESTINATION_LISTENERS_PER_PIPE = 1;
6547
6547
 
@@ -7027,9 +7027,9 @@ const throwOnSubprocessError = async (subprocess, { signal }) => {
7027
7027
  //#endregion
7028
7028
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/concurrent.js
7029
7029
  const initializeConcurrentStreams = () => ({
7030
- readableDestroy: new WeakMap(),
7031
- writableFinal: new WeakMap(),
7032
- writableDestroy: new WeakMap()
7030
+ readableDestroy: /* @__PURE__ */ new WeakMap(),
7031
+ writableFinal: /* @__PURE__ */ new WeakMap(),
7032
+ writableDestroy: /* @__PURE__ */ new WeakMap()
7033
7033
  });
7034
7034
  const addConcurrentStream = (concurrentStreams, stream, waitName) => {
7035
7035
  const weakMap = concurrentStreams[waitName];
@@ -7943,7 +7943,7 @@ var CloudFrontManager = class {
7943
7943
  await cloudfrontClient.createInvalidation({
7944
7944
  DistributionId: selectedDistribution.Id,
7945
7945
  InvalidationBatch: {
7946
- CallerReference: new Date().toISOString(),
7946
+ CallerReference: (/* @__PURE__ */ new Date()).toISOString(),
7947
7947
  Paths: {
7948
7948
  Quantity: 1,
7949
7949
  Items: ["/*"]
@@ -7961,7 +7961,7 @@ var CloudFrontManager = class {
7961
7961
  }
7962
7962
  }
7963
7963
  const finalDistributionConfig = {
7964
- CallerReference: new Date().toISOString(),
7964
+ CallerReference: (/* @__PURE__ */ new Date()).toISOString(),
7965
7965
  Comment: "Hot Updater CloudFront distribution",
7966
7966
  Enabled: true,
7967
7967
  Origins: {
@@ -8319,7 +8319,7 @@ var LambdaEdgeDeployer = class {
8319
8319
 
8320
8320
  //#endregion
8321
8321
  //#region iac/migrations/migrator.ts
8322
- var import_picocolors$1 = __toESM(require_picocolors(), 1);
8322
+ var import_picocolors$1 = __toESM(require_picocolors());
8323
8323
  /**
8324
8324
  * S3Migration
8325
8325
  * Base class that each migration script extends.
@@ -8330,7 +8330,7 @@ var S3Migration = class {
8330
8330
  s3;
8331
8331
  bucketName;
8332
8332
  dryRun = false;
8333
- backupMapping = new Map();
8333
+ backupMapping = /* @__PURE__ */ new Map();
8334
8334
  async doUpdateFile(key, content, { cacheControl } = {}) {
8335
8335
  const normalizedKey = key.startsWith("/") ? key.substring(1) : key;
8336
8336
  const upload = new Upload({
@@ -8544,7 +8544,7 @@ var S3Migrator = class {
8544
8544
  if (!dryRun) {
8545
8545
  this.migrationRecords.push({
8546
8546
  name: migration.name,
8547
- appliedAt: new Date().toISOString()
8547
+ appliedAt: (/* @__PURE__ */ new Date()).toISOString()
8548
8548
  });
8549
8549
  console.log(import_picocolors$1.default.green(`${import_picocolors$1.default.bold(migration.name)} applied successfully.`));
8550
8550
  await migration.cleanupBackups();
@@ -8853,7 +8853,7 @@ export default HotUpdater.wrap({
8853
8853
 
8854
8854
  //#endregion
8855
8855
  //#region iac/index.ts
8856
- var import_picocolors = __toESM(require_picocolors(), 1);
8856
+ var import_picocolors = __toESM(require_picocolors());
8857
8857
  const checkIfAwsCliInstalled = async () => {
8858
8858
  try {
8859
8859
  await execa("aws", ["--version"]);
package/dist/index.cjs CHANGED
@@ -1300,16 +1300,16 @@ var __classPrivateFieldGet = void 0 && (void 0).__classPrivateFieldGet || functi
1300
1300
  var _Mime_extensionToType, _Mime_typeToExtension, _Mime_typeToExtensions;
1301
1301
  var Mime = class {
1302
1302
  constructor(...args) {
1303
- _Mime_extensionToType.set(this, new Map());
1304
- _Mime_typeToExtension.set(this, new Map());
1305
- _Mime_typeToExtensions.set(this, new Map());
1303
+ _Mime_extensionToType.set(this, /* @__PURE__ */ new Map());
1304
+ _Mime_typeToExtension.set(this, /* @__PURE__ */ new Map());
1305
+ _Mime_typeToExtensions.set(this, /* @__PURE__ */ new Map());
1306
1306
  for (const arg of args) this.define(arg);
1307
1307
  }
1308
1308
  define(typeMap, force = false) {
1309
1309
  for (let [type, extensions] of Object.entries(typeMap)) {
1310
1310
  type = type.toLowerCase();
1311
1311
  extensions = extensions.map((ext) => ext.toLowerCase());
1312
- if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").has(type)) __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type, new Set());
1312
+ if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").has(type)) __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type, /* @__PURE__ */ new Set());
1313
1313
  const allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type);
1314
1314
  let first = true;
1315
1315
  for (let extension of extensions) {
@@ -1359,7 +1359,7 @@ var Mime = class {
1359
1359
  };
1360
1360
  }
1361
1361
  };
1362
- _Mime_extensionToType = new WeakMap(), _Mime_typeToExtension = new WeakMap(), _Mime_typeToExtensions = new WeakMap();
1362
+ _Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtensions = /* @__PURE__ */ new WeakMap();
1363
1363
  var Mime_default = Mime;
1364
1364
 
1365
1365
  //#endregion
@@ -1441,7 +1441,7 @@ async function deleteObjectInS3(client, bucketName, key) {
1441
1441
  */
1442
1442
  async function invalidateCloudFront(client, distributionId, paths) {
1443
1443
  if (paths.length === 0) return;
1444
- const timestamp = new Date().getTime();
1444
+ const timestamp = (/* @__PURE__ */ new Date()).getTime();
1445
1445
  await client.send(new __aws_sdk_client_cloudfront.CreateInvalidationCommand({
1446
1446
  DistributionId: distributionId,
1447
1447
  InvalidationBatch: {
package/dist/index.d.cts CHANGED
@@ -9,13 +9,11 @@ interface S3DatabaseConfig extends S3ClientConfig {
9
9
  apiBasePath?: string;
10
10
  }
11
11
  declare const s3Database: (config: S3DatabaseConfig, hooks?: DatabasePluginHooks) => (options: _hot_updater_plugin_core0.BasePluginArgs) => _hot_updater_plugin_core0.DatabasePlugin;
12
-
13
12
  //#endregion
14
13
  //#region src/s3Storage.d.ts
15
14
  interface S3StorageConfig extends S3ClientConfig {
16
15
  bucketName: string;
17
16
  }
18
17
  declare const s3Storage: (config: S3StorageConfig, hooks?: StoragePluginHooks) => (_: BasePluginArgs) => StoragePlugin;
19
-
20
18
  //#endregion
21
19
  export { S3DatabaseConfig, S3StorageConfig, s3Database, s3Storage };
package/dist/index.d.ts CHANGED
@@ -9,13 +9,11 @@ interface S3DatabaseConfig extends S3ClientConfig {
9
9
  apiBasePath?: string;
10
10
  }
11
11
  declare const s3Database: (config: S3DatabaseConfig, hooks?: DatabasePluginHooks) => (options: _hot_updater_plugin_core0.BasePluginArgs) => _hot_updater_plugin_core0.DatabasePlugin;
12
-
13
12
  //#endregion
14
13
  //#region src/s3Storage.d.ts
15
14
  interface S3StorageConfig extends S3ClientConfig {
16
15
  bucketName: string;
17
16
  }
18
17
  declare const s3Storage: (config: S3StorageConfig, hooks?: StoragePluginHooks) => (_: BasePluginArgs) => StoragePlugin;
19
-
20
18
  //#endregion
21
19
  export { S3DatabaseConfig, S3StorageConfig, s3Database, s3Storage };
package/dist/index.js CHANGED
@@ -1277,16 +1277,16 @@ var __classPrivateFieldGet = void 0 && (void 0).__classPrivateFieldGet || functi
1277
1277
  var _Mime_extensionToType, _Mime_typeToExtension, _Mime_typeToExtensions;
1278
1278
  var Mime = class {
1279
1279
  constructor(...args) {
1280
- _Mime_extensionToType.set(this, new Map());
1281
- _Mime_typeToExtension.set(this, new Map());
1282
- _Mime_typeToExtensions.set(this, new Map());
1280
+ _Mime_extensionToType.set(this, /* @__PURE__ */ new Map());
1281
+ _Mime_typeToExtension.set(this, /* @__PURE__ */ new Map());
1282
+ _Mime_typeToExtensions.set(this, /* @__PURE__ */ new Map());
1283
1283
  for (const arg of args) this.define(arg);
1284
1284
  }
1285
1285
  define(typeMap, force = false) {
1286
1286
  for (let [type, extensions] of Object.entries(typeMap)) {
1287
1287
  type = type.toLowerCase();
1288
1288
  extensions = extensions.map((ext) => ext.toLowerCase());
1289
- if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").has(type)) __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type, new Set());
1289
+ if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").has(type)) __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type, /* @__PURE__ */ new Set());
1290
1290
  const allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type);
1291
1291
  let first = true;
1292
1292
  for (let extension of extensions) {
@@ -1336,7 +1336,7 @@ var Mime = class {
1336
1336
  };
1337
1337
  }
1338
1338
  };
1339
- _Mime_extensionToType = new WeakMap(), _Mime_typeToExtension = new WeakMap(), _Mime_typeToExtensions = new WeakMap();
1339
+ _Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtensions = /* @__PURE__ */ new WeakMap();
1340
1340
  var Mime_default = Mime;
1341
1341
 
1342
1342
  //#endregion
@@ -1418,7 +1418,7 @@ async function deleteObjectInS3(client, bucketName, key) {
1418
1418
  */
1419
1419
  async function invalidateCloudFront(client, distributionId, paths) {
1420
1420
  if (paths.length === 0) return;
1421
- const timestamp = new Date().getTime();
1421
+ const timestamp = (/* @__PURE__ */ new Date()).getTime();
1422
1422
  await client.send(new CreateInvalidationCommand({
1423
1423
  DistributionId: distributionId,
1424
1424
  InvalidationBatch: {
@@ -2191,7 +2191,7 @@ var require_lrucache = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_
2191
2191
  var LRUCache = class {
2192
2192
  constructor() {
2193
2193
  this.max = 1e3;
2194
- this.map = new Map();
2194
+ this.map = /* @__PURE__ */ new Map();
2195
2195
  }
2196
2196
  get(key) {
2197
2197
  const value = this.map.get(key);
@@ -2292,7 +2292,7 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
2292
2292
  return !!comp.match(re$1[t$1.COMPARATORLOOSE]);
2293
2293
  });
2294
2294
  debug$1("range list", rangeList);
2295
- const rangeMap = new Map();
2295
+ const rangeMap = /* @__PURE__ */ new Map();
2296
2296
  const comparators = rangeList.map((comp) => new Comparator$4(comp, this.options));
2297
2297
  for (const comp of comparators) {
2298
2298
  if (isNullSet(comp)) return [comp];
@@ -2804,7 +2804,7 @@ var require_subset = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mo
2804
2804
  else sub = minimumVersion;
2805
2805
  if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
2806
2806
  else dom = minimumVersion;
2807
- const eqSet = new Set();
2807
+ const eqSet = /* @__PURE__ */ new Set();
2808
2808
  let gt$5, lt$4;
2809
2809
  for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt$5 = higherGT(gt$5, c, options);
2810
2810
  else if (c.operator === "<" || c.operator === "<=") lt$4 = lowerLT(lt$4, c, options);
@@ -2957,7 +2957,7 @@ var require_semver = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mo
2957
2957
  rcompareIdentifiers: identifiers.rcompareIdentifiers
2958
2958
  };
2959
2959
  } });
2960
- var import_semver = __toESM(require_semver(), 1);
2960
+ var import_semver = __toESM(require_semver());
2961
2961
  const semverSatisfies = (targetAppVersion, currentVersion) => {
2962
2962
  const currentCoerce = import_semver.default.coerce(currentVersion);
2963
2963
  if (!currentCoerce) return false;
@@ -3100,7 +3100,7 @@ const year = day * 365.25;
3100
3100
 
3101
3101
  //#endregion
3102
3102
  //#region lambda/getUpdateInfo.ts
3103
- var import_dist_cjs$1 = __toESM$1(require_dist_cjs(), 1);
3103
+ var import_dist_cjs$1 = __toESM$1(require_dist_cjs());
3104
3104
  const getCdnJson = async ({ baseUrl, key, keyPairId, privateKey }) => {
3105
3105
  try {
3106
3106
  const url = new URL(baseUrl);
@@ -3177,7 +3177,7 @@ const fingerprintStrategy = async ({ baseUrl, keyPairId, privateKey }, { platfor
3177
3177
 
3178
3178
  //#endregion
3179
3179
  //#region lambda/withSignedUrl.ts
3180
- var import_dist_cjs = __toESM$1(require_dist_cjs(), 1);
3180
+ var import_dist_cjs = __toESM$1(require_dist_cjs());
3181
3181
  /**
3182
3182
  * Creates a CloudFront signed URL based on the provided update information.
3183
3183
  *
@@ -7,5 +7,6 @@ declare global {
7
7
  CLOUDFRONT_PRIVATE_KEY_BASE64: string;
8
8
  };
9
9
  }
10
- declare const handler: CloudFrontRequestHandler; //#endregion
10
+ declare const handler: CloudFrontRequestHandler;
11
+ //#endregion
11
12
  export { handler };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/aws",
3
3
  "type": "module",
4
- "version": "0.18.1",
4
+ "version": "0.18.3",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",
@@ -45,8 +45,8 @@
45
45
  "mime": "^4.0.4",
46
46
  "picocolors": "^1.0.0",
47
47
  "@clack/prompts": "0.10.0",
48
- "@hot-updater/core": "0.18.1",
49
- "@hot-updater/js": "0.18.1"
48
+ "@hot-updater/core": "0.18.3",
49
+ "@hot-updater/js": "0.18.3"
50
50
  },
51
51
  "dependencies": {
52
52
  "@aws-sdk/client-cloudfront": "3.772.0",
@@ -57,7 +57,7 @@
57
57
  "@aws-sdk/credential-providers": "3.772.0",
58
58
  "@aws-sdk/lib-storage": "3.772.0",
59
59
  "aws-lambda": "1.0.7",
60
- "@hot-updater/plugin-core": "0.18.1"
60
+ "@hot-updater/plugin-core": "0.18.3"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "tsdown",