@hot-updater/aws 0.29.3 → 0.29.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
  enumerable: true
23
23
  }) : target, mod));
24
24
  //#endregion
25
+ let fs = require("fs");
26
+ fs = __toESM(fs);
25
27
  let _aws_sdk_credential_providers = require("@aws-sdk/credential-providers");
26
28
  let _hot_updater_cli_tools = require("@hot-updater/cli-tools");
27
29
  let node_url = require("node:url");
@@ -36,8 +38,6 @@ let node_path = require("node:path");
36
38
  node_path = __toESM(node_path);
37
39
  let path = require("path");
38
40
  path = __toESM(path);
39
- let fs = require("fs");
40
- fs = __toESM(fs);
41
41
  let node_timers_promises = require("node:timers/promises");
42
42
  let node_os = require("node:os");
43
43
  let node_events = require("node:events");
@@ -46,14 +46,14 @@ let node_fs = require("node:fs");
46
46
  let node_stream_promises = require("node:stream/promises");
47
47
  let node_stream = require("node:stream");
48
48
  let node_buffer = require("node:buffer");
49
- let _aws_sdk_client_cloudfront = require("@aws-sdk/client-cloudfront");
50
49
  let crypto = require("crypto");
51
50
  crypto = __toESM(crypto);
51
+ let _aws_sdk_client_cloudfront = require("@aws-sdk/client-cloudfront");
52
52
  let _aws_sdk_client_iam = require("@aws-sdk/client-iam");
53
53
  let _aws_sdk_client_sts = require("@aws-sdk/client-sts");
54
- let _aws_sdk_client_lambda = require("@aws-sdk/client-lambda");
55
54
  let fs_promises = require("fs/promises");
56
55
  fs_promises = __toESM(fs_promises);
56
+ let _aws_sdk_client_lambda = require("@aws-sdk/client-lambda");
57
57
  let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
58
58
  let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
59
59
  let _aws_sdk_client_ssm = require("@aws-sdk/client-ssm");
@@ -6626,7 +6626,7 @@ var CloudFrontManager = class {
6626
6626
  while (retryCount < 600) try {
6627
6627
  if ((await cloudfrontClient.getDistribution({ Id: distributionId })).Distribution?.Status === "Deployed") return "CloudFront distribution deployment completed.";
6628
6628
  throw new Error("Retry");
6629
- } catch (_err) {
6629
+ } catch {
6630
6630
  if (retryCount++ >= 5) message(`CloudFront distribution is still in progress. This may take a few minutes. (${retryCount})`);
6631
6631
  await delay(1e3);
6632
6632
  }
@@ -1,4 +1,5 @@
1
1
  import { createRequire } from "node:module";
2
+ import fs from "fs";
2
3
  import { fromSSO } from "@aws-sdk/credential-providers";
3
4
  import { ConfigBuilder, colors, copyDirToTmp, createZip, ensureInstallPackages, getCwd, link, makeEnv, p, transformEnv, transformTemplate } from "@hot-updater/cli-tools";
4
5
  import { fileURLToPath } from "node:url";
@@ -9,7 +10,6 @@ import process$1, { execArgv, execPath, hrtime, platform } from "node:process";
9
10
  import tty from "node:tty";
10
11
  import path from "node:path";
11
12
  import path$1 from "path";
12
- import fs from "fs";
13
13
  import { scheduler, setImmediate, setTimeout as setTimeout$1 } from "node:timers/promises";
14
14
  import { constants } from "node:os";
15
15
  import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
@@ -18,12 +18,12 @@ import { appendFileSync, createReadStream, createWriteStream, readFileSync, stat
18
18
  import { finished } from "node:stream/promises";
19
19
  import { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark } from "node:stream";
20
20
  import { Buffer as Buffer$1 } from "node:buffer";
21
- import { CloudFront } from "@aws-sdk/client-cloudfront";
22
21
  import crypto from "crypto";
22
+ import { CloudFront } from "@aws-sdk/client-cloudfront";
23
23
  import { IAM } from "@aws-sdk/client-iam";
24
24
  import { STS } from "@aws-sdk/client-sts";
25
- import { Lambda } from "@aws-sdk/client-lambda";
26
25
  import fs$1 from "fs/promises";
26
+ import { Lambda } from "@aws-sdk/client-lambda";
27
27
  import { CopyObjectCommand, DeleteObjectCommand, GetObjectCommand, ListObjectsV2Command, S3 } from "@aws-sdk/client-s3";
28
28
  import { Upload } from "@aws-sdk/lib-storage";
29
29
  import { ParameterNotFound, SSM } from "@aws-sdk/client-ssm";
@@ -6620,7 +6620,7 @@ var CloudFrontManager = class {
6620
6620
  while (retryCount < 600) try {
6621
6621
  if ((await cloudfrontClient.getDistribution({ Id: distributionId })).Distribution?.Status === "Deployed") return "CloudFront distribution deployment completed.";
6622
6622
  throw new Error("Retry");
6623
- } catch (_err) {
6623
+ } catch {
6624
6624
  if (retryCount++ >= 5) message(`CloudFront distribution is still in progress. This may take a few minutes. (${retryCount})`);
6625
6625
  await delay(1e3);
6626
6626
  }
package/dist/index.cjs CHANGED
@@ -25,11 +25,11 @@ let _aws_sdk_client_cloudfront = require("@aws-sdk/client-cloudfront");
25
25
  let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
26
26
  let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
27
27
  let _hot_updater_plugin_core = require("@hot-updater/plugin-core");
28
- let _aws_sdk_s3_request_presigner = require("@aws-sdk/s3-request-presigner");
29
28
  let fs_promises = require("fs/promises");
30
29
  fs_promises = __toESM(fs_promises);
31
30
  let path = require("path");
32
31
  path = __toESM(path);
32
+ let _aws_sdk_s3_request_presigner = require("@aws-sdk/s3-request-presigner");
33
33
  let _aws_sdk_client_ssm = require("@aws-sdk/client-ssm");
34
34
  let _aws_sdk_cloudfront_signer = require("@aws-sdk/cloudfront-signer");
35
35
  //#region ../../node_modules/.pnpm/mime@4.0.4/node_modules/mime/dist/types/other.js
package/dist/index.mjs CHANGED
@@ -2,9 +2,9 @@ import { CloudFrontClient, CreateInvalidationCommand, GetInvalidationCommand } f
2
2
  import { DeleteObjectCommand, DeleteObjectsCommand, GetObjectCommand, ListObjectsV2Command, NoSuchKey, S3Client } from "@aws-sdk/client-s3";
3
3
  import { Upload } from "@aws-sdk/lib-storage";
4
4
  import { createBlobDatabasePlugin, createStorageKeyBuilder, createStoragePlugin, getContentType, parseStorageUri } from "@hot-updater/plugin-core";
5
- import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
6
5
  import fs from "fs/promises";
7
6
  import path from "path";
7
+ import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
8
8
  import { SSM } from "@aws-sdk/client-ssm";
9
9
  import { getSignedUrl as getSignedUrl$1 } from "@aws-sdk/cloudfront-signer";
10
10
  //#region ../../node_modules/.pnpm/mime@4.0.4/node_modules/mime/dist/types/other.js