@stacksjs/ts-cloud 0.2.6 → 0.2.8

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/index.js CHANGED
@@ -1193,7 +1193,7 @@ __export(exports_client, {
1193
1193
  AWSClient: () => AWSClient
1194
1194
  });
1195
1195
  import * as crypto2 from "node:crypto";
1196
- import { existsSync as existsSync10, readFileSync as readFileSync4 } from "node:fs";
1196
+ import { existsSync as existsSync9, readFileSync as readFileSync4 } from "node:fs";
1197
1197
  import { homedir as homedir3 } from "node:os";
1198
1198
  import { join as join6 } from "node:path";
1199
1199
 
@@ -1243,7 +1243,7 @@ class AWSClient {
1243
1243
  loadCredentialsFromFile() {
1244
1244
  const profile = process.env.AWS_PROFILE || "default";
1245
1245
  const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || join6(homedir3(), ".aws", "credentials");
1246
- if (!existsSync10(credentialsPath)) {
1246
+ if (!existsSync9(credentialsPath)) {
1247
1247
  return null;
1248
1248
  }
1249
1249
  try {
@@ -1419,7 +1419,7 @@ class AWSClient {
1419
1419
  return result;
1420
1420
  }
1421
1421
  buildUrl(options) {
1422
- const { service, region, path: path3, queryParams } = options;
1422
+ const { service, region, path, queryParams } = options;
1423
1423
  let host;
1424
1424
  if (service === "s3") {
1425
1425
  if (options.bucket) {
@@ -1442,7 +1442,7 @@ class AWSClient {
1442
1442
  } else {
1443
1443
  host = `${service}.${region}.amazonaws.com`;
1444
1444
  }
1445
- let url = `https://${host}${path3}`;
1445
+ let url = `https://${host}${path}`;
1446
1446
  if (queryParams && Object.keys(queryParams).length > 0) {
1447
1447
  const queryString = Object.keys(queryParams).map((k) => `${this.uriEncode(k)}=${this.uriEncode(queryParams[k])}`).join("&");
1448
1448
  url += `?${queryString}`;
@@ -1450,7 +1450,7 @@ class AWSClient {
1450
1450
  return url;
1451
1451
  }
1452
1452
  signRequest(options, credentials) {
1453
- const { service, region, method, path: path3, queryParams, body } = options;
1453
+ const { service, region, method, path, queryParams, body } = options;
1454
1454
  const now = new Date;
1455
1455
  const amzDate = this.getAmzDate(now);
1456
1456
  const dateStamp = this.getDateStamp(now);
@@ -1493,7 +1493,7 @@ class AWSClient {
1493
1493
  }
1494
1494
  const payloadHash = this.sha256(body || "");
1495
1495
  headers["x-amz-content-sha256"] = payloadHash;
1496
- const canonicalUri = path3;
1496
+ const canonicalUri = path;
1497
1497
  const canonicalQueryString2 = queryParams ? Object.keys(queryParams).sort().map((k) => `${this.uriEncode(k)}=${this.uriEncode(queryParams[k])}`).join("&") : "";
1498
1498
  const sortedHeaderKeys = Object.keys(headers).sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
1499
1499
  const canonicalHeaders = sortedHeaderKeys.map((key) => `${key.toLowerCase()}:${headers[key].trim()}
@@ -1732,7 +1732,7 @@ function detectCredentialSource() {
1732
1732
  }
1733
1733
  const profile = process.env.AWS_PROFILE || "default";
1734
1734
  const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || join6(homedir3(), ".aws", "credentials");
1735
- if (existsSync10(credentialsPath)) {
1735
+ if (existsSync9(credentialsPath)) {
1736
1736
  return {
1737
1737
  source: "file",
1738
1738
  profile,
@@ -2354,8 +2354,8 @@ var init_cloudformation = __esm(() => {
2354
2354
  // src/aws/s3.ts
2355
2355
  import * as crypto3 from "node:crypto";
2356
2356
  import { readdir as readdir2 } from "node:fs/promises";
2357
- import { join as join7 } from "node:path";
2358
- import { readFileSync as readFileSync5 } from "node:fs";
2357
+ import { join as join8 } from "node:path";
2358
+ import { readFileSync as readFileSync6 } from "node:fs";
2359
2359
  function toFetchBody(data) {
2360
2360
  const { buffer, byteOffset, byteLength } = data;
2361
2361
  if (buffer instanceof ArrayBuffer) {
@@ -2377,9 +2377,9 @@ class S3Client2 {
2377
2377
  this.client = new AWSClient(creds);
2378
2378
  }
2379
2379
  resolveProfileCredentialsSync() {
2380
- const { existsSync: existsSync8, readFileSync: readFileSync6 } = __require("node:fs");
2380
+ const { existsSync: existsSync8, readFileSync: readFileSync5 } = __require("node:fs");
2381
2381
  const { homedir: homedir4 } = __require("node:os");
2382
- const { join: join4 } = __require("node:path");
2382
+ const { join: join7 } = __require("node:path");
2383
2383
  const envProfile = process.env.AWS_PROFILE;
2384
2384
  const envAccessKey = process.env.AWS_ACCESS_KEY_ID;
2385
2385
  const envSecretKey = process.env.AWS_SECRET_ACCESS_KEY;
@@ -2390,9 +2390,9 @@ class S3Client2 {
2390
2390
  sessionToken: process.env.AWS_SESSION_TOKEN
2391
2391
  };
2392
2392
  }
2393
- const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || join4(homedir4(), ".aws", "credentials");
2393
+ const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || join7(homedir4(), ".aws", "credentials");
2394
2394
  if (existsSync8(credentialsPath)) {
2395
- const content = readFileSync6(credentialsPath, "utf-8");
2395
+ const content = readFileSync5(credentialsPath, "utf-8");
2396
2396
  const lines = content.split(`
2397
2397
  `);
2398
2398
  let currentProfile = null;
@@ -2458,7 +2458,7 @@ class S3Client2 {
2458
2458
  }
2459
2459
  loadCredentialsFromFile() {
2460
2460
  try {
2461
- const { existsSync: existsSync8, readFileSync: readFileSync6 } = __require("node:fs");
2461
+ const { existsSync: existsSync8, readFileSync: readFileSync5 } = __require("node:fs");
2462
2462
  const { homedir: homedir4 } = __require("node:os");
2463
2463
  const { join: pathJoin } = __require("node:path");
2464
2464
  const profile = process.env.AWS_PROFILE || "default";
@@ -2466,7 +2466,7 @@ class S3Client2 {
2466
2466
  if (!existsSync8(credentialsPath)) {
2467
2467
  return null;
2468
2468
  }
2469
- const content = readFileSync6(credentialsPath, "utf-8");
2469
+ const content = readFileSync5(credentialsPath, "utf-8");
2470
2470
  const lines = content.split(`
2471
2471
  `);
2472
2472
  let currentProfile = "";
@@ -2793,7 +2793,7 @@ class S3Client2 {
2793
2793
  }
2794
2794
  }
2795
2795
  async copy(options) {
2796
- const fileContent = readFileSync5(options.source);
2796
+ const fileContent = readFileSync6(options.source);
2797
2797
  await this.putObject({
2798
2798
  bucket: options.bucket,
2799
2799
  key: options.key,
@@ -2816,7 +2816,7 @@ class S3Client2 {
2816
2816
  const relativePath = file.substring(options.source.length + 1);
2817
2817
  const s3Key = options.prefix ? `${options.prefix}/${relativePath}` : relativePath;
2818
2818
  if (!options.dryRun) {
2819
- const fileContent = readFileSync5(file);
2819
+ const fileContent = readFileSync6(file);
2820
2820
  await this.putObject({
2821
2821
  bucket: options.bucket,
2822
2822
  key: s3Key,
@@ -2847,7 +2847,7 @@ class S3Client2 {
2847
2847
  const files = [];
2848
2848
  const entries = await readdir2(dir, { withFileTypes: true });
2849
2849
  for (const entry of entries) {
2850
- const fullPath = join7(dir, entry.name);
2850
+ const fullPath = join8(dir, entry.name);
2851
2851
  if (entry.isDirectory()) {
2852
2852
  const subFiles = await this.listFilesRecursive(fullPath);
2853
2853
  files.push(...subFiles);
@@ -4075,7 +4075,7 @@ class CloudFrontClient {
4075
4075
  <Paths>
4076
4076
  <Quantity>${options.paths.length}</Quantity>
4077
4077
  <Items>
4078
- ${options.paths.map((path3) => `<Path>${path3}</Path>`).join(`
4078
+ ${options.paths.map((path) => `<Path>${path}</Path>`).join(`
4079
4079
  `)}
4080
4080
  </Items>
4081
4081
  </Paths>
@@ -4201,17 +4201,17 @@ class CloudFrontClient {
4201
4201
  });
4202
4202
  }
4203
4203
  async invalidatePaths(distributionId, paths) {
4204
- const formattedPaths = paths.map((path3) => path3.startsWith("/") ? path3 : `/${path3}`);
4204
+ const formattedPaths = paths.map((path) => path.startsWith("/") ? path : `/${path}`);
4205
4205
  return this.createInvalidation({
4206
4206
  distributionId,
4207
4207
  paths: formattedPaths
4208
4208
  });
4209
4209
  }
4210
4210
  async invalidatePattern(distributionId, pattern) {
4211
- const path3 = pattern.startsWith("/") ? pattern : `/${pattern}`;
4211
+ const path = pattern.startsWith("/") ? pattern : `/${pattern}`;
4212
4212
  return this.createInvalidation({
4213
4213
  distributionId,
4214
- paths: [path3]
4214
+ paths: [path]
4215
4215
  });
4216
4216
  }
4217
4217
  async invalidateAfterDeployment(options) {
@@ -7463,7 +7463,8 @@ function generateExternalDnsStaticSiteTemplate(config4) {
7463
7463
  certificateArn,
7464
7464
  defaultRootObject = "index.html",
7465
7465
  errorDocument = "404.html",
7466
- passthroughUrls = false
7466
+ passthroughUrls = false,
7467
+ singlePageApp = false
7467
7468
  } = config4;
7468
7469
  const resources = {};
7469
7470
  const outputs = {};
@@ -7563,13 +7564,26 @@ function generateExternalDnsStaticSiteTemplate(config4) {
7563
7564
  ]
7564
7565
  }
7565
7566
  },
7566
- CustomErrorResponses: [
7567
+ CustomErrorResponses: singlePageApp ? [
7567
7568
  {
7568
7569
  ErrorCode: 403,
7569
7570
  ResponseCode: 200,
7570
7571
  ResponsePagePath: `/${defaultRootObject}`,
7571
7572
  ErrorCachingMinTTL: 300
7572
7573
  },
7574
+ {
7575
+ ErrorCode: 404,
7576
+ ResponseCode: 200,
7577
+ ResponsePagePath: `/${defaultRootObject}`,
7578
+ ErrorCachingMinTTL: 300
7579
+ }
7580
+ ] : [
7581
+ {
7582
+ ErrorCode: 403,
7583
+ ResponseCode: 404,
7584
+ ResponsePagePath: `/${errorDocument}`,
7585
+ ErrorCachingMinTTL: 300
7586
+ },
7573
7587
  {
7574
7588
  ErrorCode: 404,
7575
7589
  ResponseCode: 404,
@@ -7839,7 +7853,8 @@ async function deployStaticSiteWithExternalDns(config4) {
7839
7853
  certificateArn,
7840
7854
  defaultRootObject: config4.defaultRootObject,
7841
7855
  errorDocument: config4.errorDocument,
7842
- passthroughUrls: config4.passthroughUrls
7856
+ passthroughUrls: config4.passthroughUrls,
7857
+ singlePageApp: config4.singlePageApp
7843
7858
  });
7844
7859
  const tags = Object.entries(config4.tags || {}).map(([Key, Value]) => ({ Key, Value }));
7845
7860
  tags.push({ Key: "ManagedBy", Value: "ts-cloud" });
@@ -8883,13 +8898,13 @@ async function uploadStaticFiles(options) {
8883
8898
  const { sourceDir, bucket, region, cacheControl = "max-age=31536000, public", onProgress } = options;
8884
8899
  const s32 = new S3Client2(region);
8885
8900
  const { readdir: readdir3 } = await import("node:fs/promises");
8886
- const { join: join4, relative: relative2 } = await import("node:path");
8901
+ const { join: join7, relative: relative3 } = await import("node:path");
8887
8902
  const { createHash: createHash5 } = await import("node:crypto");
8888
8903
  async function listFiles(dir) {
8889
8904
  const files2 = [];
8890
8905
  const entries = await readdir3(dir, { withFileTypes: true });
8891
8906
  for (const entry of entries) {
8892
- const fullPath = join4(dir, entry.name);
8907
+ const fullPath = join7(dir, entry.name);
8893
8908
  if (entry.isDirectory()) {
8894
8909
  files2.push(...await listFiles(fullPath));
8895
8910
  } else {
@@ -8949,7 +8964,7 @@ async function uploadStaticFiles(options) {
8949
8964
  let skipped = 0;
8950
8965
  const existingETags = await getExistingETags();
8951
8966
  for (const file of files) {
8952
- const key = relative2(sourceDir, file);
8967
+ const key = relative3(sourceDir, file);
8953
8968
  const contentType = getContentType(file);
8954
8969
  const fileCacheControl = file.endsWith(".html") ? "max-age=3600, public" : cacheControl;
8955
8970
  try {
@@ -12732,11 +12747,11 @@ import { readFileSync as readFileSync22, existsSync as existsSync32 } from "node
12732
12747
  import { homedir as homedir2 } from "node:os";
12733
12748
  import { join as join32 } from "node:path";
12734
12749
  import { createHash as createHash2 } from "node:crypto";
12735
- import * as fs from "node:fs";
12736
- import * as path from "node:path";
12750
+ import { existsSync as existsSync42, mkdirSync as mkdirSync2, readFileSync as readFileSync3, readdirSync as readdirSync32, unlinkSync, writeFileSync as writeFileSync22 } from "node:fs";
12751
+ import { join as join4 } from "node:path";
12737
12752
  import { createHash as createHash3 } from "node:crypto";
12738
- import fs2 from "node:fs";
12739
- import path2 from "node:path";
12753
+ import { createReadStream as createReadStream2, readdirSync as readdirSync4, statSync as statSync22 } from "node:fs";
12754
+ import { join as join5, relative as relative2 } from "node:path";
12740
12755
  var __defProp3 = Object.defineProperty;
12741
12756
  var __returnValue3 = (v) => v;
12742
12757
  function __exportSetter3(name, newValue) {
@@ -12865,7 +12880,7 @@ function signRequest(options) {
12865
12880
  cache: options.cache
12866
12881
  });
12867
12882
  }
12868
- const path3 = urlObj.pathname || "/";
12883
+ const path = urlObj.pathname || "/";
12869
12884
  const query = canonicalQueryString(urlObj.searchParams);
12870
12885
  const headers = {
12871
12886
  host,
@@ -12887,7 +12902,7 @@ function signRequest(options) {
12887
12902
  const payloadHash = headers["x-amz-content-sha256"] || hash(body);
12888
12903
  const canonicalRequest = [
12889
12904
  method,
12890
- encodePath(path3),
12905
+ encodePath(path),
12891
12906
  query,
12892
12907
  canonicalHeaders,
12893
12908
  signedHeaders,
@@ -12962,7 +12977,7 @@ async function signRequestAsync(options) {
12962
12977
  cache: options.cache
12963
12978
  });
12964
12979
  }
12965
- const path3 = urlObj.pathname || "/";
12980
+ const path = urlObj.pathname || "/";
12966
12981
  const query = canonicalQueryString(urlObj.searchParams);
12967
12982
  const headers = {
12968
12983
  host,
@@ -12985,7 +13000,7 @@ async function signRequestAsync(options) {
12985
13000
  const payloadHash = headers["x-amz-content-sha256"] || bodyHash;
12986
13001
  const canonicalRequest = [
12987
13002
  method,
12988
- encodePath(path3),
13003
+ encodePath(path),
12989
13004
  query,
12990
13005
  canonicalHeaders,
12991
13006
  signedHeaders,
@@ -13046,13 +13061,13 @@ function signWithQueryString(params) {
13046
13061
  if (sessionToken) {
13047
13062
  signedUrl.searchParams.set("X-Amz-Security-Token", sessionToken);
13048
13063
  }
13049
- const path3 = encodePath(signedUrl.pathname || "/");
13064
+ const path = encodePath(signedUrl.pathname || "/");
13050
13065
  const canonicalHeaders = `host:${signedUrl.hostname}
13051
13066
  `;
13052
13067
  const query = canonicalQueryString(signedUrl.searchParams);
13053
13068
  const canonicalRequest = [
13054
13069
  method,
13055
- path3,
13070
+ path,
13056
13071
  query,
13057
13072
  canonicalHeaders,
13058
13073
  signedHeaders,
@@ -13107,13 +13122,13 @@ async function signWithQueryStringAsync(params) {
13107
13122
  if (sessionToken) {
13108
13123
  signedUrl.searchParams.set("X-Amz-Security-Token", sessionToken);
13109
13124
  }
13110
- const path3 = encodePath(signedUrl.pathname || "/");
13125
+ const path = encodePath(signedUrl.pathname || "/");
13111
13126
  const canonicalHeaders = `host:${signedUrl.hostname}
13112
13127
  `;
13113
13128
  const query = canonicalQueryString(signedUrl.searchParams);
13114
13129
  const canonicalRequest = [
13115
13130
  method,
13116
- path3,
13131
+ path,
13117
13132
  query,
13118
13133
  canonicalHeaders,
13119
13134
  signedHeaders,
@@ -13197,8 +13212,8 @@ function canonicalQueryString(params) {
13197
13212
  });
13198
13213
  return sorted.map(([k, v]) => `${k}=${v}`).join("&");
13199
13214
  }
13200
- function encodePath(path3) {
13201
- return path3.split("/").map((segment) => encodeRfc3986(segment)).join("/");
13215
+ function encodePath(path) {
13216
+ return path.split("/").map((segment) => encodeRfc3986(segment)).join("/");
13202
13217
  }
13203
13218
  function encodeRfc3986(str) {
13204
13219
  return encodeURIComponent(str).replace(/[!'()*]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
@@ -14131,11 +14146,11 @@ function analyzeStackDiff(oldTemplate, newTemplate) {
14131
14146
  }
14132
14147
  };
14133
14148
  }
14134
- function compareProperties(oldProps, newProps, path3 = "") {
14149
+ function compareProperties(oldProps, newProps, path = "") {
14135
14150
  const changes = [];
14136
14151
  const allKeys = new Set([...Object.keys(oldProps), ...Object.keys(newProps)]);
14137
14152
  for (const key of allKeys) {
14138
- const currentPath = path3 ? `${path3}.${key}` : key;
14153
+ const currentPath = path ? `${path}.${key}` : key;
14139
14154
  const oldValue = oldProps[key];
14140
14155
  const newValue = newProps[key];
14141
14156
  if (oldValue === undefined && newValue !== undefined) {
@@ -16647,8 +16662,8 @@ class Security {
16647
16662
  if (!webAcl.Properties.Rules) {
16648
16663
  webAcl.Properties.Rules = [];
16649
16664
  }
16650
- const pathConditions = rule.paths.map((path3) => ({
16651
- SearchString: path3,
16665
+ const pathConditions = rule.paths.map((path) => ({
16666
+ SearchString: path,
16652
16667
  FieldToMatch: {
16653
16668
  UriPath: {}
16654
16669
  },
@@ -18221,7 +18236,7 @@ echo "Database tools installed!"
18221
18236
  static LoadBalancerConfig = {
18222
18237
  healthCheck: (options) => {
18223
18238
  const {
18224
- path: path3 = "/",
18239
+ path = "/",
18225
18240
  interval = 30,
18226
18241
  timeout = 5,
18227
18242
  healthyThreshold = 2,
@@ -18235,7 +18250,7 @@ echo "Database tools installed!"
18235
18250
  UnhealthyThresholdCount: unhealthyThreshold
18236
18251
  };
18237
18252
  if (protocol !== "TCP") {
18238
- config4.HealthCheckPath = path3;
18253
+ config4.HealthCheckPath = path;
18239
18254
  config4.HealthCheckProtocol = protocol;
18240
18255
  }
18241
18256
  return config4;
@@ -19410,7 +19425,7 @@ class FileSystem {
19410
19425
  const {
19411
19426
  slug,
19412
19427
  environment,
19413
- path: path3 = "/",
19428
+ path = "/",
19414
19429
  uid = "1000",
19415
19430
  gid = "1000",
19416
19431
  permissions = "755"
@@ -19420,7 +19435,7 @@ class FileSystem {
19420
19435
  environment,
19421
19436
  resourceType: "efs-ap"
19422
19437
  });
19423
- const logicalId = generateLogicalId(`${resourceName}-${path3.replace(/\//g, "-")}`);
19438
+ const logicalId = generateLogicalId(`${resourceName}-${path.replace(/\//g, "-")}`);
19424
19439
  const accessPoint = {
19425
19440
  Type: "AWS::EFS::AccessPoint",
19426
19441
  Properties: {
@@ -19430,7 +19445,7 @@ class FileSystem {
19430
19445
  Gid: gid
19431
19446
  },
19432
19447
  RootDirectory: {
19433
- Path: path3,
19448
+ Path: path,
19434
19449
  CreationInfo: {
19435
19450
  OwnerUid: uid,
19436
19451
  OwnerGid: gid,
@@ -19438,7 +19453,7 @@ class FileSystem {
19438
19453
  }
19439
19454
  },
19440
19455
  AccessPointTags: [
19441
- { Key: "Name", Value: `${resourceName}-${path3}` },
19456
+ { Key: "Name", Value: `${resourceName}-${path}` },
19442
19457
  { Key: "Environment", Value: environment }
19443
19458
  ]
19444
19459
  }
@@ -22134,16 +22149,16 @@ class JobLoader {
22134
22149
  const fullPath = `${projectRoot}/${jobsPath}`;
22135
22150
  const jobs = [];
22136
22151
  try {
22137
- const fs3 = await import("node:fs");
22138
- const path3 = await import("node:path");
22139
- if (!fs3.existsSync(fullPath)) {
22152
+ const fs = await import("node:fs");
22153
+ const path = await import("node:path");
22154
+ if (!fs.existsSync(fullPath)) {
22140
22155
  return [];
22141
22156
  }
22142
- const files = fs3.readdirSync(fullPath).filter((f) => f.endsWith(".ts") && !f.startsWith("_") && f !== "runner.ts");
22157
+ const files = fs.readdirSync(fullPath).filter((f) => f.endsWith(".ts") && !f.startsWith("_") && f !== "runner.ts");
22143
22158
  for (const file of files) {
22144
- const filePath = path3.join(fullPath, file);
22159
+ const filePath = path.join(fullPath, file);
22145
22160
  const jobName = file.replace(".ts", "");
22146
- const content = fs3.readFileSync(filePath, "utf-8");
22161
+ const content = fs.readFileSync(filePath, "utf-8");
22147
22162
  const metadata = JobLoader.parseJobMetadata(content, jobName, filePath);
22148
22163
  if (metadata) {
22149
22164
  jobs.push(metadata);
@@ -22154,7 +22169,7 @@ class JobLoader {
22154
22169
  }
22155
22170
  return jobs;
22156
22171
  }
22157
- static parseJobMetadata(content, name, path3) {
22172
+ static parseJobMetadata(content, name, path) {
22158
22173
  const scheduleMatch = content.match(/export\s+const\s+schedule\s*=\s*['"`]([^'"`]+)['"`]/) || content.match(/schedule:\s*['"`]([^'"`]+)['"`]/);
22159
22174
  const enabledMatch = content.match(/export\s+const\s+enabled\s*=\s*(true|false)/) || content.match(/enabled:\s*(true|false)/);
22160
22175
  const retriesMatch = content.match(/export\s+const\s+retries\s*=\s*(\d+)/) || content.match(/retries:\s*(\d+)/);
@@ -22167,7 +22182,7 @@ class JobLoader {
22167
22182
  }
22168
22183
  return {
22169
22184
  name,
22170
- path: path3,
22185
+ path,
22171
22186
  schedule: scheduleMatch?.[1],
22172
22187
  handler: `${name}.handle`,
22173
22188
  enabled: enabledMatch?.[1] !== "false",
@@ -22182,16 +22197,16 @@ class JobLoader {
22182
22197
  const fullPath = `${projectRoot}/${actionsPath}`;
22183
22198
  const actions = [];
22184
22199
  try {
22185
- const fs3 = await import("node:fs");
22186
- const path3 = await import("node:path");
22187
- if (!fs3.existsSync(fullPath)) {
22200
+ const fs = await import("node:fs");
22201
+ const path = await import("node:path");
22202
+ if (!fs.existsSync(fullPath)) {
22188
22203
  return [];
22189
22204
  }
22190
- const files = fs3.readdirSync(fullPath).filter((f) => f.endsWith(".ts") && !f.startsWith("_"));
22205
+ const files = fs.readdirSync(fullPath).filter((f) => f.endsWith(".ts") && !f.startsWith("_"));
22191
22206
  for (const file of files) {
22192
- const filePath = path3.join(fullPath, file);
22207
+ const filePath = path.join(fullPath, file);
22193
22208
  const actionName = file.replace(".ts", "");
22194
- const content = fs3.readFileSync(filePath, "utf-8");
22209
+ const content = fs.readFileSync(filePath, "utf-8");
22195
22210
  const metadata = JobLoader.parseActionMetadata(content, actionName, filePath);
22196
22211
  if (metadata) {
22197
22212
  actions.push(metadata);
@@ -22202,7 +22217,7 @@ class JobLoader {
22202
22217
  }
22203
22218
  return actions;
22204
22219
  }
22205
- static parseActionMetadata(content, name, path3) {
22220
+ static parseActionMetadata(content, name, path) {
22206
22221
  const hasHandle = content.includes("export async function handle") || content.includes("export function handle") || content.includes("export default");
22207
22222
  if (!hasHandle) {
22208
22223
  return null;
@@ -22210,7 +22225,7 @@ class JobLoader {
22210
22225
  const descriptionMatch = content.match(/export\s+const\s+description\s*=\s*['"`]([^'"`]+)['"`]/) || content.match(/description:\s*['"`]([^'"`]+)['"`]/);
22211
22226
  return {
22212
22227
  name,
22213
- path: path3,
22228
+ path,
22214
22229
  handler: `${name}.handle`,
22215
22230
  description: descriptionMatch?.[1]
22216
22231
  };
@@ -27807,22 +27822,22 @@ class AssetHasher {
27807
27822
  };
27808
27823
  const oldPaths = new Set(Object.keys(oldManifest.hashMap));
27809
27824
  const newPaths = new Set(Object.keys(newManifest.hashMap));
27810
- for (const path3 of newPaths) {
27811
- if (!oldPaths.has(path3)) {
27812
- result.added.push(path3);
27825
+ for (const path of newPaths) {
27826
+ if (!oldPaths.has(path)) {
27827
+ result.added.push(path);
27813
27828
  }
27814
27829
  }
27815
- for (const path3 of oldPaths) {
27816
- if (!newPaths.has(path3)) {
27817
- result.removed.push(path3);
27830
+ for (const path of oldPaths) {
27831
+ if (!newPaths.has(path)) {
27832
+ result.removed.push(path);
27818
27833
  }
27819
27834
  }
27820
- for (const path3 of newPaths) {
27821
- if (oldPaths.has(path3)) {
27822
- if (oldManifest.hashMap[path3] !== newManifest.hashMap[path3]) {
27823
- result.changed.push(path3);
27835
+ for (const path of newPaths) {
27836
+ if (oldPaths.has(path)) {
27837
+ if (oldManifest.hashMap[path] !== newManifest.hashMap[path]) {
27838
+ result.changed.push(path);
27824
27839
  } else {
27825
- result.unchanged.push(path3);
27840
+ result.unchanged.push(path);
27826
27841
  }
27827
27842
  }
27828
27843
  }
@@ -28670,19 +28685,19 @@ ${redirectMap}
28670
28685
  protocol,
28671
28686
  preservePath: true
28672
28687
  }),
28673
- httpToHttps: (path3 = "/") => ({
28674
- source: path3,
28675
- target: path3,
28688
+ httpToHttps: (path = "/") => ({
28689
+ source: path,
28690
+ target: path,
28676
28691
  statusCode: 301
28677
28692
  }),
28678
- addTrailingSlash: (paths) => paths.map((path3) => ({
28679
- source: path3.endsWith("/") ? path3.slice(0, -1) : path3,
28680
- target: path3.endsWith("/") ? path3 : `${path3}/`,
28693
+ addTrailingSlash: (paths) => paths.map((path) => ({
28694
+ source: path.endsWith("/") ? path.slice(0, -1) : path,
28695
+ target: path.endsWith("/") ? path : `${path}/`,
28681
28696
  statusCode: 301
28682
28697
  })),
28683
- removeTrailingSlash: (paths) => paths.map((path3) => ({
28684
- source: path3.endsWith("/") && path3 !== "/" ? path3 : `${path3}/`,
28685
- target: path3.endsWith("/") && path3 !== "/" ? path3.slice(0, -1) : path3,
28698
+ removeTrailingSlash: (paths) => paths.map((path) => ({
28699
+ source: path.endsWith("/") && path !== "/" ? path : `${path}/`,
28700
+ target: path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path,
28686
28701
  statusCode: 301
28687
28702
  }))
28688
28703
  };
@@ -28716,8 +28731,8 @@ ${redirectMap}
28716
28731
  statusCode: 307,
28717
28732
  preserveQueryString: true
28718
28733
  })),
28719
- gonePages: (paths) => paths.map((path3) => ({
28720
- source: path3,
28734
+ gonePages: (paths) => paths.map((path) => ({
28735
+ source: path,
28721
28736
  target: "/410",
28722
28737
  statusCode: 301
28723
28738
  }))
@@ -31486,10 +31501,10 @@ function addCDNResources(builder, config4) {
31486
31501
  };
31487
31502
  }
31488
31503
  if (config4.errorPages) {
31489
- distributionConfig.CustomErrorResponses = Object.entries(config4.errorPages).map(([code, path3]) => ({
31504
+ distributionConfig.CustomErrorResponses = Object.entries(config4.errorPages).map(([code, path]) => ({
31490
31505
  ErrorCode: Number.parseInt(code),
31491
31506
  ResponseCode: 200,
31492
- ResponsePagePath: path3,
31507
+ ResponsePagePath: path,
31493
31508
  ErrorCachingMinTTL: 300
31494
31509
  }));
31495
31510
  }
@@ -35993,29 +36008,29 @@ class FileCache {
35993
36008
  constructor(cacheDir, options = {}) {
35994
36009
  this.cacheDir = cacheDir;
35995
36010
  this.ttl = options.ttl || 86400000;
35996
- if (!fs.existsSync(cacheDir)) {
35997
- fs.mkdirSync(cacheDir, { recursive: true });
36011
+ if (!existsSync42(cacheDir)) {
36012
+ mkdirSync2(cacheDir, { recursive: true });
35998
36013
  }
35999
36014
  }
36000
36015
  getCachePath(key) {
36001
36016
  const hash2 = createHash2("sha256").update(key).digest("hex");
36002
- return path.join(this.cacheDir, `${hash2}.json`);
36017
+ return join4(this.cacheDir, `${hash2}.json`);
36003
36018
  }
36004
36019
  get(key) {
36005
36020
  const cachePath = this.getCachePath(key);
36006
- if (!fs.existsSync(cachePath)) {
36021
+ if (!existsSync42(cachePath)) {
36007
36022
  return;
36008
36023
  }
36009
36024
  try {
36010
- const data = fs.readFileSync(cachePath, "utf-8");
36025
+ const data = readFileSync3(cachePath, "utf-8");
36011
36026
  const entry = JSON.parse(data);
36012
36027
  if (Date.now() - entry.timestamp > this.ttl) {
36013
- fs.unlinkSync(cachePath);
36028
+ unlinkSync(cachePath);
36014
36029
  return;
36015
36030
  }
36016
36031
  return entry.value;
36017
36032
  } catch {
36018
- fs.unlinkSync(cachePath);
36033
+ unlinkSync(cachePath);
36019
36034
  return;
36020
36035
  }
36021
36036
  }
@@ -36026,30 +36041,30 @@ class FileCache {
36026
36041
  timestamp: Date.now(),
36027
36042
  hash: hash2
36028
36043
  };
36029
- fs.writeFileSync(cachePath, JSON.stringify(entry), "utf-8");
36044
+ writeFileSync22(cachePath, JSON.stringify(entry), "utf-8");
36030
36045
  }
36031
36046
  has(key) {
36032
36047
  return this.get(key) !== undefined;
36033
36048
  }
36034
36049
  clear() {
36035
- const files = fs.readdirSync(this.cacheDir);
36050
+ const files = readdirSync32(this.cacheDir);
36036
36051
  for (const file of files) {
36037
- fs.unlinkSync(path.join(this.cacheDir, file));
36052
+ unlinkSync(join4(this.cacheDir, file));
36038
36053
  }
36039
36054
  }
36040
36055
  prune() {
36041
- const files = fs.readdirSync(this.cacheDir);
36056
+ const files = readdirSync32(this.cacheDir);
36042
36057
  const now = Date.now();
36043
36058
  for (const file of files) {
36044
- const filePath = path.join(this.cacheDir, file);
36059
+ const filePath = join4(this.cacheDir, file);
36045
36060
  try {
36046
- const data = fs.readFileSync(filePath, "utf-8");
36061
+ const data = readFileSync3(filePath, "utf-8");
36047
36062
  const entry = JSON.parse(data);
36048
36063
  if (now - entry.timestamp > this.ttl) {
36049
- fs.unlinkSync(filePath);
36064
+ unlinkSync(filePath);
36050
36065
  }
36051
36066
  } catch {
36052
- fs.unlinkSync(filePath);
36067
+ unlinkSync(filePath);
36053
36068
  }
36054
36069
  }
36055
36070
  }
@@ -36094,7 +36109,7 @@ async function hashFile(filePath, options = {}) {
36094
36109
  const chunkSize = options.chunkSize || 65536;
36095
36110
  return new Promise((resolve4, reject) => {
36096
36111
  const hash2 = createHash3(algorithm);
36097
- const stream = fs2.createReadStream(filePath, { highWaterMark: chunkSize });
36112
+ const stream = createReadStream2(filePath, { highWaterMark: chunkSize });
36098
36113
  stream.on("data", (chunk) => hash2.update(chunk));
36099
36114
  stream.on("end", () => resolve4(hash2.digest("hex")));
36100
36115
  stream.on("error", reject);
@@ -36116,17 +36131,17 @@ async function hashDirectory(dirPath, options = {}) {
36116
36131
  ];
36117
36132
  const files = [];
36118
36133
  async function walk(dir) {
36119
- const entries = fs2.readdirSync(dir, { withFileTypes: true });
36134
+ const entries = readdirSync4(dir, { withFileTypes: true });
36120
36135
  for (const entry of entries) {
36121
- const fullPath = path2.join(dir, entry.name);
36122
- const relativePath = path2.relative(dirPath, fullPath);
36136
+ const fullPath = join5(dir, entry.name);
36137
+ const relativePath = relative2(dirPath, fullPath);
36123
36138
  if (ignorePatterns.some((pattern) => relativePath.includes(pattern))) {
36124
36139
  continue;
36125
36140
  }
36126
36141
  if (entry.isDirectory()) {
36127
36142
  await walk(fullPath);
36128
36143
  } else if (entry.isFile()) {
36129
- const stats = fs2.statSync(fullPath);
36144
+ const stats = statSync22(fullPath);
36130
36145
  const hash2 = await hashFile(fullPath, options);
36131
36146
  files.push({
36132
36147
  path: relativePath,
@@ -36147,7 +36162,7 @@ function hashManifest(fileHashes) {
36147
36162
  return hashString(content);
36148
36163
  }
36149
36164
  function quickHash(filePath) {
36150
- const stats = fs2.statSync(filePath);
36165
+ const stats = statSync22(filePath);
36151
36166
  return hashString(`${filePath}:${stats.size}:${stats.mtimeMs}`);
36152
36167
  }
36153
36168
  function findChangedFiles(oldHashes, newHashes) {
@@ -36156,16 +36171,16 @@ function findChangedFiles(oldHashes, newHashes) {
36156
36171
  const added = [];
36157
36172
  const modified = [];
36158
36173
  const deleted = [];
36159
- for (const [path3, newFile] of newMap) {
36160
- const oldFile = oldMap.get(path3);
36174
+ for (const [path, newFile] of newMap) {
36175
+ const oldFile = oldMap.get(path);
36161
36176
  if (!oldFile) {
36162
36177
  added.push(newFile);
36163
36178
  } else if (oldFile.hash !== newFile.hash) {
36164
36179
  modified.push(newFile);
36165
36180
  }
36166
36181
  }
36167
- for (const [path3, oldFile] of oldMap) {
36168
- if (!newMap.has(path3)) {
36182
+ for (const [path, oldFile] of oldMap) {
36183
+ if (!newMap.has(path)) {
36169
36184
  deleted.push(oldFile);
36170
36185
  }
36171
36186
  }
@@ -36178,7 +36193,7 @@ class HashCache {
36178
36193
  this.cache = new Map;
36179
36194
  }
36180
36195
  get(filePath) {
36181
- const stats = fs2.statSync(filePath);
36196
+ const stats = statSync22(filePath);
36182
36197
  const cached = this.cache.get(filePath);
36183
36198
  if (cached && cached.mtime === stats.mtimeMs && cached.size === stats.size) {
36184
36199
  return cached.hash;
@@ -36186,7 +36201,7 @@ class HashCache {
36186
36201
  return;
36187
36202
  }
36188
36203
  set(filePath, hash2) {
36189
- const stats = fs2.statSync(filePath);
36204
+ const stats = statSync22(filePath);
36190
36205
  this.cache.set(filePath, {
36191
36206
  hash: hash2,
36192
36207
  mtime: stats.mtimeMs,
@@ -38851,8 +38866,8 @@ class REPL {
38851
38866
  if (!this.options.historyFile)
38852
38867
  return;
38853
38868
  try {
38854
- const fs3 = await import("node:fs/promises");
38855
- const data = await fs3.readFile(this.options.historyFile, "utf-8");
38869
+ const fs = await import("node:fs/promises");
38870
+ const data = await fs.readFile(this.options.historyFile, "utf-8");
38856
38871
  this.history.commands = data.split(`
38857
38872
  `).filter((line) => line.trim());
38858
38873
  this.historyIndex = this.history.commands.length;
@@ -38862,8 +38877,8 @@ class REPL {
38862
38877
  if (!this.options.historyFile)
38863
38878
  return;
38864
38879
  try {
38865
- const fs3 = await import("node:fs/promises");
38866
- await fs3.writeFile(this.options.historyFile, this.history.commands.join(`
38880
+ const fs = await import("node:fs/promises");
38881
+ await fs.writeFile(this.options.historyFile, this.history.commands.join(`
38867
38882
  `));
38868
38883
  } catch (error) {
38869
38884
  console.error(`Failed to save history: ${error}`);
@@ -38899,8 +38914,8 @@ class REPLContext {
38899
38914
  clear() {
38900
38915
  this.variables.clear();
38901
38916
  }
38902
- setWorkingDirectory(path3) {
38903
- this.workingDirectory = path3;
38917
+ setWorkingDirectory(path) {
38918
+ this.workingDirectory = path;
38904
38919
  }
38905
38920
  getWorkingDirectory() {
38906
38921
  return this.workingDirectory;
@@ -39017,9 +39032,9 @@ class CommandHistory {
39017
39032
  if (!this.persistFile)
39018
39033
  return;
39019
39034
  try {
39020
- const fs3 = await import("node:fs/promises");
39035
+ const fs = await import("node:fs/promises");
39021
39036
  const data = JSON.stringify(this.entries, null, 2);
39022
- await fs3.writeFile(this.persistFile, data, "utf-8");
39037
+ await fs.writeFile(this.persistFile, data, "utf-8");
39023
39038
  } catch (error) {
39024
39039
  throw new Error(`Failed to save history: ${error}`);
39025
39040
  }
@@ -39028,8 +39043,8 @@ class CommandHistory {
39028
39043
  if (!this.persistFile)
39029
39044
  return;
39030
39045
  try {
39031
- const fs3 = await import("node:fs/promises");
39032
- const data = await fs3.readFile(this.persistFile, "utf-8");
39046
+ const fs = await import("node:fs/promises");
39047
+ const data = await fs.readFile(this.persistFile, "utf-8");
39033
39048
  const parsed = JSON.parse(data);
39034
39049
  this.entries = parsed.map((entry) => ({
39035
39050
  ...entry,
@@ -42442,14 +42457,14 @@ class CloudTrailManager {
42442
42457
  if (trail.advancedEventSelectors) {
42443
42458
  cf.Properties.AdvancedEventSelectors = trail.advancedEventSelectors.map((selector) => ({
42444
42459
  Name: selector.name,
42445
- FieldSelectors: selector.fieldSelectors.map((fs3) => ({
42446
- Field: fs3.field,
42447
- ...fs3.equals && { Equals: fs3.equals },
42448
- ...fs3.startsWith && { StartsWith: fs3.startsWith },
42449
- ...fs3.endsWith && { EndsWith: fs3.endsWith },
42450
- ...fs3.notEquals && { NotEquals: fs3.notEquals },
42451
- ...fs3.notStartsWith && { NotStartsWith: fs3.notStartsWith },
42452
- ...fs3.notEndsWith && { NotEndsWith: fs3.notEndsWith }
42460
+ FieldSelectors: selector.fieldSelectors.map((fs) => ({
42461
+ Field: fs.field,
42462
+ ...fs.equals && { Equals: fs.equals },
42463
+ ...fs.startsWith && { StartsWith: fs.startsWith },
42464
+ ...fs.endsWith && { EndsWith: fs.endsWith },
42465
+ ...fs.notEquals && { NotEquals: fs.notEquals },
42466
+ ...fs.notStartsWith && { NotStartsWith: fs.notStartsWith },
42467
+ ...fs.notEndsWith && { NotEndsWith: fs.notEndsWith }
42453
42468
  }))
42454
42469
  }));
42455
42470
  }
@@ -51962,8 +51977,8 @@ The {{appName}} Team`,
51962
51977
  });
51963
51978
  return result;
51964
51979
  }
51965
- static getNestedValue(obj, path3) {
51966
- return path3.split(".").reduce((current, key) => current?.[key], obj);
51980
+ static getNestedValue(obj, path) {
51981
+ return path.split(".").reduce((current, key) => current?.[key], obj);
51967
51982
  }
51968
51983
  static extractVariables(template) {
51969
51984
  const variables = new Set;
@@ -59922,23 +59937,23 @@ function findCircularDependencies(resources) {
59922
59937
  const visited = new Set;
59923
59938
  const recursionStack = new Set;
59924
59939
  const cycle = [];
59925
- function dfs(node, path3) {
59940
+ function dfs(node, path) {
59926
59941
  visited.add(node);
59927
59942
  recursionStack.add(node);
59928
- path3.push(node);
59943
+ path.push(node);
59929
59944
  const neighbors = graph[node] || [];
59930
59945
  for (const neighbor of neighbors) {
59931
59946
  if (!visited.has(neighbor)) {
59932
- if (dfs(neighbor, path3)) {
59947
+ if (dfs(neighbor, path)) {
59933
59948
  return true;
59934
59949
  }
59935
59950
  } else if (recursionStack.has(neighbor)) {
59936
- const cycleStart = path3.indexOf(neighbor);
59937
- cycle.push(...path3.slice(cycleStart), neighbor);
59951
+ const cycleStart = path.indexOf(neighbor);
59952
+ cycle.push(...path.slice(cycleStart), neighbor);
59938
59953
  return true;
59939
59954
  }
59940
59955
  }
59941
- path3.pop();
59956
+ path.pop();
59942
59957
  recursionStack.delete(node);
59943
59958
  return false;
59944
59959
  }
@@ -62478,12 +62493,12 @@ class SSMClient {
62478
62493
  });
62479
62494
  return result.Parameter?.Value;
62480
62495
  }
62481
- async getAllByPath(path3, recursive = true) {
62496
+ async getAllByPath(path, recursive = true) {
62482
62497
  const allParams = [];
62483
62498
  let nextToken;
62484
62499
  do {
62485
62500
  const result = await this.getParametersByPath({
62486
- Path: path3,
62501
+ Path: path,
62487
62502
  Recursive: recursive,
62488
62503
  WithDecryption: true,
62489
62504
  NextToken: nextToken
@@ -63238,7 +63253,7 @@ class SESClient {
63238
63253
  });
63239
63254
  }
63240
63255
  async listEmailIdentities(params) {
63241
- let path3 = "/v2/email/identities";
63256
+ let path = "/v2/email/identities";
63242
63257
  const queryParams = [];
63243
63258
  if (params?.PageSize) {
63244
63259
  queryParams.push(`PageSize=${params.PageSize}`);
@@ -63247,13 +63262,13 @@ class SESClient {
63247
63262
  queryParams.push(`NextToken=${encodeURIComponent(params.NextToken)}`);
63248
63263
  }
63249
63264
  if (queryParams.length > 0) {
63250
- path3 += `?${queryParams.join("&")}`;
63265
+ path += `?${queryParams.join("&")}`;
63251
63266
  }
63252
63267
  const result = await this.client.request({
63253
63268
  service: "email",
63254
63269
  region: this.region,
63255
63270
  method: "GET",
63256
- path: path3,
63271
+ path,
63257
63272
  headers: {
63258
63273
  "Content-Type": "application/json"
63259
63274
  }
@@ -63352,7 +63367,7 @@ class SESClient {
63352
63367
  });
63353
63368
  }
63354
63369
  async listEmailTemplates(params) {
63355
- let path3 = "/v2/email/templates";
63370
+ let path = "/v2/email/templates";
63356
63371
  const queryParams = [];
63357
63372
  if (params?.PageSize) {
63358
63373
  queryParams.push(`PageSize=${params.PageSize}`);
@@ -63361,13 +63376,13 @@ class SESClient {
63361
63376
  queryParams.push(`NextToken=${encodeURIComponent(params.NextToken)}`);
63362
63377
  }
63363
63378
  if (queryParams.length > 0) {
63364
- path3 += `?${queryParams.join("&")}`;
63379
+ path += `?${queryParams.join("&")}`;
63365
63380
  }
63366
63381
  const result = await this.client.request({
63367
63382
  service: "email",
63368
63383
  region: this.region,
63369
63384
  method: "GET",
63370
- path: path3,
63385
+ path,
63371
63386
  headers: {
63372
63387
  "Content-Type": "application/json"
63373
63388
  }
@@ -68307,7 +68322,7 @@ class BedrockRuntimeClient {
68307
68322
  }
68308
68323
  return { accessKeyId, secretAccessKey, sessionToken };
68309
68324
  }
68310
- signStreamRequest(method, path3, headers, body, credentials) {
68325
+ signStreamRequest(method, path, headers, body, credentials) {
68311
68326
  const crypto4 = __require("node:crypto");
68312
68327
  const service = "bedrock-runtime";
68313
68328
  const region = this.region;
@@ -68332,7 +68347,7 @@ class BedrockRuntimeClient {
68332
68347
  const signedHeaders = sortedHeaderKeys.map((key) => key.toLowerCase()).join(";");
68333
68348
  const canonicalRequest = [
68334
68349
  method,
68335
- path3,
68350
+ path,
68336
68351
  "",
68337
68352
  canonicalHeaders,
68338
68353
  signedHeaders,
@@ -68631,15 +68646,15 @@ class BedrockClient {
68631
68646
  });
68632
68647
  }
68633
68648
  async getGuardrail(params) {
68634
- let path3 = `/guardrails/${encodeURIComponent(params.guardrailIdentifier)}`;
68649
+ let path = `/guardrails/${encodeURIComponent(params.guardrailIdentifier)}`;
68635
68650
  if (params.guardrailVersion) {
68636
- path3 += `?guardrailVersion=${encodeURIComponent(params.guardrailVersion)}`;
68651
+ path += `?guardrailVersion=${encodeURIComponent(params.guardrailVersion)}`;
68637
68652
  }
68638
68653
  return this.client.request({
68639
68654
  service: "bedrock",
68640
68655
  region: this.region,
68641
68656
  method: "GET",
68642
- path: path3
68657
+ path
68643
68658
  });
68644
68659
  }
68645
68660
  async listGuardrails(params) {
@@ -68659,15 +68674,15 @@ class BedrockClient {
68659
68674
  });
68660
68675
  }
68661
68676
  async deleteGuardrail(params) {
68662
- let path3 = `/guardrails/${encodeURIComponent(params.guardrailIdentifier)}`;
68677
+ let path = `/guardrails/${encodeURIComponent(params.guardrailIdentifier)}`;
68663
68678
  if (params.guardrailVersion) {
68664
- path3 += `?guardrailVersion=${encodeURIComponent(params.guardrailVersion)}`;
68679
+ path += `?guardrailVersion=${encodeURIComponent(params.guardrailVersion)}`;
68665
68680
  }
68666
68681
  return this.client.request({
68667
68682
  service: "bedrock",
68668
68683
  region: this.region,
68669
68684
  method: "DELETE",
68670
- path: path3
68685
+ path
68671
68686
  });
68672
68687
  }
68673
68688
  async listModelInvocationJobs(params) {
@@ -71122,7 +71137,7 @@ class ApplicationAutoScalingClient {
71122
71137
  init_s3();
71123
71138
  import * as net from "node:net";
71124
71139
  import * as tls from "node:tls";
71125
- import * as fs3 from "node:fs";
71140
+ import { readFileSync as readFileSync7 } from "node:fs";
71126
71141
  import * as crypto4 from "node:crypto";
71127
71142
 
71128
71143
  class ImapServer {
@@ -71157,8 +71172,8 @@ class ImapServer {
71157
71172
  });
71158
71173
  if (this.config.tls?.key && this.config.tls?.cert) {
71159
71174
  const tlsOptions = {
71160
- key: fs3.readFileSync(this.config.tls.key),
71161
- cert: fs3.readFileSync(this.config.tls.cert)
71175
+ key: readFileSync7(this.config.tls.key),
71176
+ cert: readFileSync7(this.config.tls.cert)
71162
71177
  };
71163
71178
  this.tlsServer = tls.createServer(tlsOptions, (socket) => {
71164
71179
  this.handleConnection(socket);
@@ -71962,8 +71977,8 @@ class ImapServer {
71962
71977
  }
71963
71978
  this.send(session, `${tag} OK Begin TLS negotiation`);
71964
71979
  const tlsOptions = {
71965
- key: fs3.readFileSync(this.config.tls.key),
71966
- cert: fs3.readFileSync(this.config.tls.cert),
71980
+ key: readFileSync7(this.config.tls.key),
71981
+ cert: readFileSync7(this.config.tls.cert),
71967
71982
  isServer: true
71968
71983
  };
71969
71984
  const tlsSocket = new tls.TLSSocket(session.socket, tlsOptions);
@@ -72554,7 +72569,7 @@ ${text}`);
72554
72569
  // src/aws/smtp-server.ts
72555
72570
  import * as net2 from "node:net";
72556
72571
  import * as tls2 from "node:tls";
72557
- import * as fs5 from "node:fs";
72572
+ import { readFileSync as readFileSync8 } from "node:fs";
72558
72573
  import * as crypto5 from "node:crypto";
72559
72574
  init_s3();
72560
72575
 
@@ -72586,8 +72601,8 @@ class SmtpServer {
72586
72601
  });
72587
72602
  if (this.config.tls?.key && this.config.tls?.cert) {
72588
72603
  const tlsOptions = {
72589
- key: fs5.readFileSync(this.config.tls.key),
72590
- cert: fs5.readFileSync(this.config.tls.cert)
72604
+ key: readFileSync8(this.config.tls.key),
72605
+ cert: readFileSync8(this.config.tls.cert)
72591
72606
  };
72592
72607
  this.tlsServer = tls2.createServer(tlsOptions, (socket) => {
72593
72608
  this.handleConnection(socket, true);
@@ -72721,8 +72736,8 @@ class SmtpServer {
72721
72736
  }
72722
72737
  this.send(session, "220 Ready to start TLS");
72723
72738
  const tlsOptions = {
72724
- key: fs5.readFileSync(this.config.tls.key),
72725
- cert: fs5.readFileSync(this.config.tls.cert),
72739
+ key: readFileSync8(this.config.tls.key),
72740
+ cert: readFileSync8(this.config.tls.cert),
72726
72741
  isServer: true
72727
72742
  };
72728
72743
  const tlsSocket = new tls2.TLSSocket(session.socket, tlsOptions);
@@ -74469,31 +74484,31 @@ class EFSClient {
74469
74484
  if (options?.CreationToken) {
74470
74485
  queryParams.push(`CreationToken=${encodeURIComponent(options.CreationToken)}`);
74471
74486
  }
74472
- const path3 = `/2015-02-01/file-systems${queryParams.length > 0 ? `?${queryParams.join("&")}` : ""}`;
74487
+ const path = `/2015-02-01/file-systems${queryParams.length > 0 ? `?${queryParams.join("&")}` : ""}`;
74473
74488
  const result = await this.client.request({
74474
74489
  service: "elasticfilesystem",
74475
74490
  region: this.region,
74476
74491
  method: "GET",
74477
- path: path3,
74492
+ path,
74478
74493
  headers: {
74479
74494
  "Content-Type": "application/json"
74480
74495
  }
74481
74496
  });
74482
74497
  return {
74483
- FileSystems: (result.FileSystems || []).map((fs4) => ({
74484
- FileSystemId: fs4.FileSystemId,
74485
- Name: fs4.Name,
74486
- CreationTime: fs4.CreationTime,
74487
- LifeCycleState: fs4.LifeCycleState,
74488
- NumberOfMountTargets: fs4.NumberOfMountTargets,
74489
- SizeInBytes: fs4.SizeInBytes ? {
74490
- Value: fs4.SizeInBytes.Value,
74491
- Timestamp: fs4.SizeInBytes.Timestamp
74498
+ FileSystems: (result.FileSystems || []).map((fs) => ({
74499
+ FileSystemId: fs.FileSystemId,
74500
+ Name: fs.Name,
74501
+ CreationTime: fs.CreationTime,
74502
+ LifeCycleState: fs.LifeCycleState,
74503
+ NumberOfMountTargets: fs.NumberOfMountTargets,
74504
+ SizeInBytes: fs.SizeInBytes ? {
74505
+ Value: fs.SizeInBytes.Value,
74506
+ Timestamp: fs.SizeInBytes.Timestamp
74492
74507
  } : undefined,
74493
- PerformanceMode: fs4.PerformanceMode,
74494
- Encrypted: fs4.Encrypted,
74495
- ThroughputMode: fs4.ThroughputMode,
74496
- Tags: fs4.Tags
74508
+ PerformanceMode: fs.PerformanceMode,
74509
+ Encrypted: fs.Encrypted,
74510
+ ThroughputMode: fs.ThroughputMode,
74511
+ Tags: fs.Tags
74497
74512
  }))
74498
74513
  };
74499
74514
  }