@awsless/cli 0.1.33 → 0.1.35

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/bin.js CHANGED
@@ -4479,7 +4479,7 @@ var require_node_gyp_build_optional_packages = __commonJS(function(exports, modu
4479
4479
 
4480
4480
  // ../../node_modules/.pnpm/msgpackr-extract@3.0.4/node_modules/msgpackr-extract/index.js
4481
4481
  var require_msgpackr_extract = __commonJS(function(exports, module) {
4482
- var __dirname = "/Users/work/Code/awsless/node_modules/.pnpm/msgpackr-extract@3.0.4/node_modules/msgpackr-extract";
4482
+ var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/msgpackr-extract@3.0.4/node_modules/msgpackr-extract";
4483
4483
  module.exports = require_node_gyp_build_optional_packages()(__dirname);
4484
4484
  });
4485
4485
 
@@ -17343,7 +17343,7 @@ var require_src3 = __commonJS(function(exports) {
17343
17343
 
17344
17344
  // ../../node_modules/.pnpm/@grpc+grpc-js@1.12.6/node_modules/@grpc/grpc-js/build/src/channelz.js
17345
17345
  var require_channelz = __commonJS(function(exports) {
17346
- var __dirname = "/Users/work/Code/awsless/node_modules/.pnpm/@grpc+grpc-js@1.12.6/node_modules/@grpc/grpc-js/build/src";
17346
+ var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/@grpc+grpc-js@1.12.6/node_modules/@grpc/grpc-js/build/src";
17347
17347
  Object.defineProperty(exports, "__esModule", { value: true });
17348
17348
  exports.registerChannelzSocket = exports.registerChannelzServer = exports.registerChannelzSubchannel = exports.registerChannelzChannel = exports.ChannelzCallTrackerStub = exports.ChannelzCallTracker = exports.ChannelzChildrenTrackerStub = exports.ChannelzChildrenTracker = exports.ChannelzTrace = exports.ChannelzTraceStub = undefined;
17349
17349
  exports.unregisterChannelzRef = unregisterChannelzRef;
@@ -55168,7 +55168,7 @@ var require_replyTransformers = __commonJS(function(exports) {
55168
55168
 
55169
55169
  // ../../node_modules/.pnpm/ioredis@6.0.0_supports-color@8.1.1/node_modules/ioredis/built/Command.js
55170
55170
  var require_Command = __commonJS(function(exports) {
55171
- var __dirname = "/Users/work/Code/awsless/node_modules/.pnpm/ioredis@6.0.0_supports-color@8.1.1/node_modules/ioredis/built";
55171
+ var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/ioredis@6.0.0_supports-color@8.1.1/node_modules/ioredis/built";
55172
55172
  Object.defineProperty(exports, "__esModule", { value: true });
55173
55173
  var commands_1 = require_built();
55174
55174
  var calculateSlot = require_lib4();
@@ -75677,7 +75677,7 @@ var require_cross_spawn = __commonJS(function(exports, module) {
75677
75677
  var cp = __require("child_process");
75678
75678
  var parse7 = require_parse4();
75679
75679
  var enoent = require_enoent();
75680
- function spawn2(command, args, options) {
75680
+ function spawn3(command, args, options) {
75681
75681
  const parsed = parse7(command, args, options);
75682
75682
  const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
75683
75683
  enoent.hookChildProcess(spawned, parsed);
@@ -75689,8 +75689,8 @@ var require_cross_spawn = __commonJS(function(exports, module) {
75689
75689
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
75690
75690
  return result;
75691
75691
  }
75692
- module.exports = spawn2;
75693
- module.exports.spawn = spawn2;
75692
+ module.exports = spawn3;
75693
+ module.exports.spawn = spawn3;
75694
75694
  module.exports.sync = spawnSync;
75695
75695
  module.exports._parse = parse7;
75696
75696
  module.exports._enoent = enoent;
@@ -75719,7 +75719,7 @@ var require_db_util = __commonJS(function(exports) {
75719
75719
 
75720
75720
  // ../../node_modules/.pnpm/redis-memory-server@0.17.1_supports-color@8.1.1/node_modules/redis-memory-server/lib/util/RedisInstance.js
75721
75721
  var require_RedisInstance = __commonJS(function(exports) {
75722
- var __dirname = "/Users/work/Code/awsless/node_modules/.pnpm/redis-memory-server@0.17.1_supports-color@8.1.1/node_modules/redis-memory-server/lib/util";
75722
+ var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/redis-memory-server@0.17.1_supports-color@8.1.1/node_modules/redis-memory-server/lib/util";
75723
75723
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
75724
75724
  function adopt(value) {
75725
75725
  return value instanceof P2 ? value : new P2(function(resolve3) {
@@ -76696,7 +76696,7 @@ var require_chunk = __commonJS(function(exports, module) {
76696
76696
  // ../../node_modules/.pnpm/tree-kill@1.2.2/node_modules/tree-kill/index.js
76697
76697
  var require_tree_kill = __commonJS(function(exports, module) {
76698
76698
  var childProcess2 = __require("child_process");
76699
- var spawn2 = childProcess2.spawn;
76699
+ var spawn3 = childProcess2.spawn;
76700
76700
  var exec3 = childProcess2.exec;
76701
76701
  module.exports = function(pid, signal, callback) {
76702
76702
  if (typeof signal === "function" && callback === undefined) {
@@ -76721,14 +76721,14 @@ var require_tree_kill = __commonJS(function(exports, module) {
76721
76721
  break;
76722
76722
  case "darwin":
76723
76723
  buildProcessTree(pid, tree, pidsToProcess, function(parentPid) {
76724
- return spawn2("pgrep", ["-P", parentPid]);
76724
+ return spawn3("pgrep", ["-P", parentPid]);
76725
76725
  }, function() {
76726
76726
  killAll(tree, signal, callback);
76727
76727
  });
76728
76728
  break;
76729
76729
  default:
76730
76730
  buildProcessTree(pid, tree, pidsToProcess, function(parentPid) {
76731
- return spawn2("ps", ["-o", "pid", "--no-headers", "--ppid", parentPid]);
76731
+ return spawn3("ps", ["-o", "pid", "--no-headers", "--ppid", parentPid]);
76732
76732
  }, function() {
76733
76733
  killAll(tree, signal, callback);
76734
76734
  });
@@ -78795,7 +78795,7 @@ var require_client2 = __commonJS(function(exports) {
78795
78795
  // ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-cjs/submodules/config/index.js
78796
78796
  var require_config = __commonJS(function(exports) {
78797
78797
  var { homedir: homedir2 } = __require("os");
78798
- var { sep: sep2, join: join29 } = __require("path");
78798
+ var { sep: sep2, join: join30 } = __require("path");
78799
78799
  var { createHash: createHash15 } = __require("crypto");
78800
78800
  var { readFile: readFile$1 } = __require("fs/promises");
78801
78801
  var { IniSectionType } = require_dist_cjs();
@@ -78953,7 +78953,7 @@ var require_config = __commonJS(function(exports) {
78953
78953
  var getSSOTokenFilepath = (id) => {
78954
78954
  const hasher = createHash15("sha1");
78955
78955
  const cacheName = hasher.update(id).digest("hex");
78956
- return join29(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`);
78956
+ return join30(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`);
78957
78957
  };
78958
78958
  var tokenIntercept = {};
78959
78959
  var getSSOTokenFromFile = async (id) => {
@@ -78980,9 +78980,9 @@ var require_config = __commonJS(function(exports) {
78980
78980
  ...data.default && { default: data.default }
78981
78981
  });
78982
78982
  var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
78983
- var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || join29(getHomeDir(), ".aws", "config");
78983
+ var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || join30(getHomeDir(), ".aws", "config");
78984
78984
  var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
78985
- var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || join29(getHomeDir(), ".aws", "credentials");
78985
+ var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || join30(getHomeDir(), ".aws", "credentials");
78986
78986
  var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/;
78987
78987
  var profileNameBlockList = ["__proto__", "profile __proto__"];
78988
78988
  var parseIni = (iniData) => {
@@ -79048,11 +79048,11 @@ var require_config = __commonJS(function(exports) {
79048
79048
  const relativeHomeDirPrefix = "~/";
79049
79049
  let resolvedFilepath = filepath;
79050
79050
  if (filepath.startsWith(relativeHomeDirPrefix)) {
79051
- resolvedFilepath = join29(homeDir, filepath.slice(2));
79051
+ resolvedFilepath = join30(homeDir, filepath.slice(2));
79052
79052
  }
79053
79053
  let resolvedConfigFilepath = configFilepath;
79054
79054
  if (configFilepath.startsWith(relativeHomeDirPrefix)) {
79055
- resolvedConfigFilepath = join29(homeDir, configFilepath.slice(2));
79055
+ resolvedConfigFilepath = join30(homeDir, configFilepath.slice(2));
79056
79056
  }
79057
79057
  const parsedFiles = await Promise.all([
79058
79058
  readFile14(resolvedConfigFilepath, {
@@ -98880,7 +98880,7 @@ var require_signin = __commonJS(function(exports) {
98880
98880
  import { createHash as createHash15, createPrivateKey, createPublicKey, sign } from "crypto";
98881
98881
  import { promises as fs4 } from "fs";
98882
98882
  import { homedir as homedir2 } from "os";
98883
- import { dirname as dirname16, join as join29 } from "path";
98883
+ import { dirname as dirname17, join as join30 } from "path";
98884
98884
  var import_config20, import_protocols3, LoginCredentialsFetcher;
98885
98885
  var init_LoginCredentialsFetcher = __esm(() => {
98886
98886
  import_config20 = __toESM(require_config(), 1);
@@ -99040,17 +99040,17 @@ var init_LoginCredentialsFetcher = __esm(() => {
99040
99040
  }
99041
99041
  async saveToken(token) {
99042
99042
  const tokenFilePath = this.getTokenFilePath();
99043
- const directory = dirname16(tokenFilePath);
99043
+ const directory = dirname17(tokenFilePath);
99044
99044
  try {
99045
99045
  await fs4.mkdir(directory, { recursive: true });
99046
99046
  } catch (error52) {}
99047
99047
  await fs4.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
99048
99048
  }
99049
99049
  getTokenFilePath() {
99050
- const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join29(homedir2(), ".aws", "login", "cache");
99050
+ const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join30(homedir2(), ".aws", "login", "cache");
99051
99051
  const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
99052
99052
  const loginSessionSha256 = createHash15("sha256").update(loginSessionBytes).digest("hex");
99053
- return join29(directory, `${loginSessionSha256}.json`);
99053
+ return join30(directory, `${loginSessionSha256}.json`);
99054
99054
  }
99055
99055
  derToRawSignature(derSignature) {
99056
99056
  let offset = 2;
@@ -107150,7 +107150,7 @@ var require_common_path_prefix = __commonJS(function(exports, module) {
107150
107150
 
107151
107151
  // ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
107152
107152
  import process5 from "process";
107153
- import { fileURLToPath as fileURLToPath11 } from "url";
107153
+ import { fileURLToPath as fileURLToPath12 } from "url";
107154
107154
  import fs5 from "fs";
107155
107155
  import path3 from "path";
107156
107156
  function findUpSync(name, {
@@ -107176,7 +107176,7 @@ function findUpSync(name, {
107176
107176
  directory = path3.dirname(directory);
107177
107177
  }
107178
107178
  }
107179
- var toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath11(urlOrPath) : urlOrPath;
107179
+ var toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath12(urlOrPath) : urlOrPath;
107180
107180
  var init_find_up_simple = () => {};
107181
107181
 
107182
107182
  // ../../node_modules/.pnpm/pkg-dir@8.0.0/node_modules/pkg-dir/index.js
@@ -107506,8 +107506,8 @@ import { Client as Client2 } from "@opensearch-project/opensearch";
107506
107506
  import { AwsSigv4Signer } from "@opensearch-project/opensearch/aws";
107507
107507
  import { createHash as createHash17 } from "crypto";
107508
107508
  import { mkdir as mkdir6, rename as rename3, rm as rm8, stat as stat3 } from "fs/promises";
107509
- import { join as join31, resolve as resolve4 } from "path";
107510
- import { execFile as execFile2, spawn as spawn3 } from "child_process";
107509
+ import { join as join32, resolve as resolve4 } from "path";
107510
+ import { execFile as execFile2, spawn as spawn4 } from "child_process";
107511
107511
  import { promisify as promisify3 } from "util";
107512
107512
  import { BigFloat, parse as parse10 } from "@awsless/big-float";
107513
107513
  var import_decompress, import_sleep_await, mock, searchClient = (options = {}, service = "es") => {
@@ -107558,9 +107558,9 @@ var import_decompress, import_sleep_await, mock, searchClient = (options = {}, s
107558
107558
  }
107559
107559
  return true;
107560
107560
  }, download = async ({ version: version3 }) => {
107561
- const path6 = join31(getDownloadPath(), "min");
107561
+ const path6 = join32(getDownloadPath(), "min");
107562
107562
  const name = `opensearch-${version3}`;
107563
- const file3 = join31(path6, name);
107563
+ const file3 = join32(path6, name);
107564
107564
  if (await exists$1(file3))
107565
107565
  return file3;
107566
107566
  console.log(`Downloading OpenSearch ${version3}`);
@@ -107576,14 +107576,14 @@ var import_decompress, import_sleep_await, mock, searchClient = (options = {}, s
107576
107576
  const checksum = (await checksumResponse.text()).split(/\s+/)[0];
107577
107577
  if (createHash17("sha512").update(buffer).digest("hex") !== checksum)
107578
107578
  throw new Error(`The OpenSearch archive doesn't match its published sha512 checksum: ${url2}`);
107579
- const staging = join31(path6, `staging-${process.pid}`);
107579
+ const staging = join32(path6, `staging-${process.pid}`);
107580
107580
  await mkdir6(staging, {
107581
107581
  recursive: true,
107582
107582
  mode: "0777"
107583
107583
  });
107584
107584
  await import_decompress.default(buffer, staging);
107585
107585
  try {
107586
- await rename3(join31(staging, name), file3);
107586
+ await rename3(join32(staging, name), file3);
107587
107587
  } catch (error52) {
107588
107588
  if (!await exists$1(file3))
107589
107589
  throw error52;
@@ -107595,7 +107595,7 @@ var import_decompress, import_sleep_await, mock, searchClient = (options = {}, s
107595
107595
  return file3;
107596
107596
  }, exec4, MINIMUM_JAVA_VERSION = 21, getJavaVersion = async (home) => {
107597
107597
  try {
107598
- const result = await exec4(join31(home, "bin/java"), ["-version"]);
107598
+ const result = await exec4(join32(home, "bin/java"), ["-version"]);
107599
107599
  const match2 = `${result.stdout}${result.stderr}`.match(/version "(\d+)/);
107600
107600
  if (match2)
107601
107601
  return Number(match2[1]);
@@ -107633,13 +107633,13 @@ var import_decompress, import_sleep_await, mock, searchClient = (options = {}, s
107633
107633
  return ["-E", `${key}=${value}`];
107634
107634
  }).flat();
107635
107635
  }, launch = async ({ path: path6, host, port, version: version3, debug: debug4, onExit: onDied, onOutput }) => {
107636
- const cache3 = join31(path6, "cache", String(port));
107636
+ const cache3 = join32(path6, "cache", String(port));
107637
107637
  const cleanUp = async () => {
107638
107638
  if (await exists2(cache3))
107639
107639
  await rm8(cache3, { recursive: true });
107640
107640
  };
107641
107641
  await cleanUp();
107642
- const binary = join31(path6, "bin/opensearch");
107642
+ const binary = join32(path6, "bin/opensearch");
107643
107643
  const env3 = { ...process.env };
107644
107644
  if (process.platform === "darwin") {
107645
107645
  const javaHome = await findJavaHome();
@@ -107648,7 +107648,7 @@ var import_decompress, import_sleep_await, mock, searchClient = (options = {}, s
107648
107648
  env3.OPENSEARCH_JAVA_HOME = javaHome;
107649
107649
  }
107650
107650
  return new Promise((resolve5, reject) => {
107651
- const child = spawn3(binary, parseSettings(version3.settings({
107651
+ const child = spawn4(binary, parseSettings(version3.settings({
107652
107652
  host,
107653
107653
  port,
107654
107654
  cache: cache3
@@ -108528,7 +108528,7 @@ var require_find_exec = __commonJS(function(exports, module) {
108528
108528
  var require_play_sound = __commonJS(function(exports, module) {
108529
108529
  var fs7 = __require("fs");
108530
108530
  var findExec = require_find_exec();
108531
- var spawn4 = __require("child_process").spawn;
108531
+ var spawn5 = __require("child_process").spawn;
108532
108532
  var players = [
108533
108533
  "mplayer",
108534
108534
  "afplay",
@@ -108558,7 +108558,7 @@ var require_play_sound = __commonJS(function(exports, module) {
108558
108558
  return next(new Error("Couldn't find a suitable audio player"));
108559
108559
  }
108560
108560
  var args = Array.isArray(options[this.player]) ? options[this.player].concat(what) : [what];
108561
- var process7 = spawn4(this.player, args, options);
108561
+ var process7 = spawn5(this.player, args, options);
108562
108562
  if (!process7) {
108563
108563
  next(new Error("Unable to spawn process with " + this.player));
108564
108564
  return null;
@@ -140146,7 +140146,7 @@ var authFeature = defineFeature({
140146
140146
  // src/feature/bundle/index.ts
140147
140147
  import { createHash as createHash8 } from "crypto";
140148
140148
  import { readdir as readdir3, readFile as readFile7, writeFile as writeFile6 } from "fs/promises";
140149
- import { join as join9 } from "path";
140149
+ import { join as join10 } from "path";
140150
140150
  import { toDays as toDays3, toSeconds as toSeconds2 } from "@awsless/duration";
140151
140151
 
140152
140152
  // ../size/dist/index.js
@@ -140767,8 +140767,8 @@ var formatPolicyDocument = (statements) => {
140767
140767
  // src/feature/function/util.ts
140768
140768
  import { createHash as createHash7 } from "crypto";
140769
140769
  import { readdir as readdir2, readFile as readFile6, rm as rm6, writeFile as writeFile5 } from "fs/promises";
140770
- import { dirname as dirname4, join as join8 } from "path";
140771
- import { fileURLToPath as fileURLToPath2 } from "url";
140770
+ import { dirname as dirname5, join as join9 } from "path";
140771
+ import { fileURLToPath as fileURLToPath3 } from "url";
140772
140772
  import { days, seconds, toDays as toDays2, toSeconds } from "@awsless/duration";
140773
140773
  import { generateFileHash as generateFileHash2 } from "@awsless/ts-file-cache";
140774
140774
  var import_deepmerge = __toESM(require_cjs2(), 1);
@@ -144502,9 +144502,12 @@ var createTempFolder = async (name) => {
144502
144502
  };
144503
144503
 
144504
144504
  // src/feature/bundle/build/rolldown.ts
144505
+ import { spawn as spawn2 } from "child_process";
144505
144506
  import { createHash as createHash5 } from "crypto";
144507
+ import { existsSync } from "fs";
144506
144508
  import { readFile as readFile4 } from "fs/promises";
144507
- import { extname as extname4 } from "path";
144509
+ import { dirname as dirname3, extname as extname4, join as join7 } from "path";
144510
+ import { fileURLToPath } from "url";
144508
144511
 
144509
144512
  // ../../node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js
144510
144513
  var balanced = (a2, b, str) => {
@@ -146344,6 +146347,55 @@ var createModuleMatcher = (patterns = []) => {
146344
146347
  };
146345
146348
  };
146346
146349
  var bundleTypeScriptWithRolldown = async (props) => {
146350
+ const worker = findBuildWorker();
146351
+ if (!worker || process.env.AWSLESS_BUILD_IN_PROCESS) {
146352
+ return bundleTypeScriptInProcess(props);
146353
+ }
146354
+ return new Promise((resolve3, reject) => {
146355
+ const child = spawn2("bun", [worker], {
146356
+ cwd: directories.root,
146357
+ stdio: ["pipe", "pipe", "pipe"]
146358
+ });
146359
+ const stdout2 = [];
146360
+ const stderr = [];
146361
+ child.stdout.on("data", (chunk) => stdout2.push(chunk));
146362
+ child.stderr.on("data", (chunk) => stderr.push(chunk));
146363
+ child.on("error", reject);
146364
+ child.on("close", () => {
146365
+ try {
146366
+ const result = JSON.parse(Buffer.concat(stdout2).toString());
146367
+ if (!result.ok) {
146368
+ reject(result.expected ? new ExpectedError(result.message) : new Error(result.message));
146369
+ return;
146370
+ }
146371
+ resolve3({
146372
+ hash: result.hash,
146373
+ files: result.files.map((file3) => ({
146374
+ name: file3.name,
146375
+ code: Buffer.from(file3.code, "base64"),
146376
+ map: file3.map ? Buffer.from(file3.map, "base64") : undefined
146377
+ }))
146378
+ });
146379
+ } catch {
146380
+ reject(new Error(`The build worker failed:
146381
+ ${Buffer.concat(stderr).toString().slice(-2000)}`));
146382
+ }
146383
+ });
146384
+ child.stdin.end(JSON.stringify({ root: directories.root, props }));
146385
+ });
146386
+ };
146387
+ var workerPath;
146388
+ var findBuildWorker = () => {
146389
+ if (workerPath === undefined) {
146390
+ const base = dirname3(fileURLToPath(import.meta.url));
146391
+ workerPath = [
146392
+ join7(base, "handlers/rolldown-worker.js"),
146393
+ join7(base, "../../../../dist/handlers/rolldown-worker.js")
146394
+ ].find((candidate) => existsSync(candidate)) ?? false;
146395
+ }
146396
+ return workerPath;
146397
+ };
146398
+ var bundleTypeScriptInProcess = async (props) => {
146347
146399
  const { format: format3 = "esm", minify = true } = props;
146348
146400
  const hasModuleSideEffects = createModuleMatcher(props.moduleSideEffects);
146349
146401
  const bundle = await rolldown({
@@ -146457,8 +146509,8 @@ var zipFiles = (files) => {
146457
146509
  // src/feature/bundle/util.ts
146458
146510
  import { createHash as createHash6 } from "crypto";
146459
146511
  import { readFile as readFile5, rm as rm5, writeFile as writeFile4 } from "fs/promises";
146460
- import { dirname as dirname3, join as join7 } from "path";
146461
- import { fileURLToPath } from "url";
146512
+ import { dirname as dirname4, join as join8 } from "path";
146513
+ import { fileURLToPath as fileURLToPath2 } from "url";
146462
146514
  import { generateDependencyHash, generateFileHash } from "@awsless/ts-file-cache";
146463
146515
  import { formatRouteKey, ROUTE_HEADER } from "awsless";
146464
146516
  var parseExportName = (handler) => {
@@ -146478,7 +146530,7 @@ var registerBundleFunction = (ctx, routeKey, props) => {
146478
146530
  };
146479
146531
  var buildBundle = (props) => {
146480
146532
  return async (build2, { workspace }) => {
146481
- const runtime = props.runtime ?? join7(dirname3(fileURLToPath(import.meta.url)), "/handlers/bundle.js");
146533
+ const runtime = props.runtime ?? join8(dirname4(fileURLToPath2(import.meta.url)), "/handlers/bundle.js");
146482
146534
  const handlers = [...props.handlers].toSorted((a2, b) => a2.routeKey.localeCompare(b.routeKey));
146483
146535
  const entries2 = handlers.map(({ routeKey, file: file3, exportName }) => {
146484
146536
  const virtualFile = JSON.stringify(formatRouteModuleId(file3, routeKey));
@@ -146507,7 +146559,7 @@ ${entries2.join(`
146507
146559
  `;
146508
146560
  const hashes = await Promise.all([
146509
146561
  readFile5(runtime),
146510
- ...handlers.map((handler) => dirname3(handler.file) === dirname3(runtime) ? readFile5(handler.file) : generateFileHash(workspace, handler.file))
146562
+ ...handlers.map((handler) => dirname4(handler.file) === dirname4(runtime) ? readFile5(handler.file) : generateFileHash(workspace, handler.file))
146511
146563
  ]);
146512
146564
  const hash3 = createHash6("sha1").update(entry).update(JSON.stringify([
146513
146565
  props.external,
@@ -146521,7 +146573,7 @@ ${entries2.join(`
146521
146573
  const fingerprint = hash3.digest("hex");
146522
146574
  return build2(fingerprint, async (write2) => {
146523
146575
  const temp = await createTempFolder(`bundle--${props.name}`);
146524
- const entryFile = join7(temp.path, "entry.ts");
146576
+ const entryFile = join8(temp.path, "entry.ts");
146525
146577
  await writeFile4(entryFile, entry);
146526
146578
  const importAsString2 = handlers.flatMap((handler) => handler.importAsString ?? []);
146527
146579
  const moduleSideEffects = handlers.flatMap((handler) => handler.moduleSideEffects ?? []);
@@ -146657,7 +146709,7 @@ export default (event, context) => {
146657
146709
  }
146658
146710
  `;
146659
146711
  const temp = await createTempFolder(name);
146660
- const entryFile = join8(temp.path, "entry.ts");
146712
+ const entryFile = join9(temp.path, "entry.ts");
146661
146713
  await writeFile5(entryFile, entry);
146662
146714
  const result = await bundleTypeScriptWithRolldown({
146663
146715
  file: entryFile,
@@ -146700,7 +146752,7 @@ export default (event, context) => {
146700
146752
  const dir = getBuildPath("function", name, "files");
146701
146753
  const files = await readdir2(dir);
146702
146754
  const archive = await zipFiles([
146703
- ...files.filter((file3) => !file3.endsWith(".map")).map((file3) => ({ name: file3, path: join8(dir, file3) })),
146755
+ ...files.filter((file3) => !file3.endsWith(".map")).map((file3) => ({ name: file3, path: join9(dir, file3) })),
146704
146756
  { name: "awsless-env.mjs", code: Buffer.from(envFile, "utf8") }
146705
146757
  ]);
146706
146758
  await writeFile5(zipFile, archive);
@@ -146944,10 +146996,10 @@ var createLambdaFunction = (ctx, id, local) => {
146944
146996
  ];
146945
146997
  if (routes.length > 0) {
146946
146998
  const bundle = ctx.shared.get("bundle", "main");
146947
- const distDir = dirname4(fileURLToPath2(import.meta.url));
146999
+ const distDir = dirname5(fileURLToPath3(import.meta.url));
146948
147000
  const proxy = createLambdaFunctionFromZip(group, ctx, "function", `${id}-proxy`, {
146949
- zipFile: join8(distDir, "/prebuild/sandbox-proxy/bundle.zip"),
146950
- sourceHash: $file(join8(distDir, "/prebuild/sandbox-proxy/HASH")),
147001
+ zipFile: join9(distDir, "/prebuild/sandbox-proxy/bundle.zip"),
147002
+ sourceHash: $file(join9(distDir, "/prebuild/sandbox-proxy/HASH")),
146951
147003
  runtime: "nodejs24.x",
146952
147004
  handler: "index.default",
146953
147005
  publish: true,
@@ -147282,7 +147334,7 @@ var bundleFeature = defineFeature({
147282
147334
  const dir = getBuildPath("bundle", name, "files");
147283
147335
  const files = await readdir3(dir);
147284
147336
  const archive = await zipFiles([
147285
- ...files.filter((file3) => !file3.endsWith(".map")).map((file3) => ({ name: file3, path: join9(dir, file3) })),
147337
+ ...files.filter((file3) => !file3.endsWith(".map")).map((file3) => ({ name: file3, path: join10(dir, file3) })),
147286
147338
  { name: "awsless-env.mjs", code: Buffer.from(envFile, "utf8") }
147287
147339
  ]);
147288
147340
  await writeFile6(getBuildPath("bundle", name, "bundle.zip"), archive);
@@ -147765,7 +147817,7 @@ var commandFeature = defineFeature({
147765
147817
  });
147766
147818
 
147767
147819
  // src/feature/config/index.ts
147768
- import { join as join12 } from "path";
147820
+ import { join as join13 } from "path";
147769
147821
 
147770
147822
  // src/dev/servers/ssm.ts
147771
147823
  import { readFile as readFile9 } from "fs/promises";
@@ -147774,25 +147826,25 @@ import { createServer as createServer2 } from "http";
147774
147826
  // src/dev/util.ts
147775
147827
  import { randomBytes } from "crypto";
147776
147828
  import { createServer } from "net";
147777
- import { join as join11 } from "path";
147829
+ import { join as join12 } from "path";
147778
147830
 
147779
147831
  // src/dev/children.ts
147780
147832
  var import_tree_kill = __toESM(require_tree_kill(), 1);
147781
- import { execFile, spawn as spawn2 } from "child_process";
147833
+ import { execFile, spawn as spawn3 } from "child_process";
147782
147834
  import { mkdir as mkdir5, readFile as readFile8, rm as rm7, writeFile as writeFile7 } from "fs/promises";
147783
- import { dirname as dirname5, join as join10 } from "path";
147835
+ import { dirname as dirname6, join as join11 } from "path";
147784
147836
  import { promisify } from "util";
147785
147837
  var tracked = new Map;
147786
147838
  var childrenFile = () => {
147787
- return join10(directories.output, "dev", "children.json");
147839
+ return join11(directories.output, "dev", "children.json");
147788
147840
  };
147789
147841
  var persist = async () => {
147790
147842
  const file3 = childrenFile();
147791
- await mkdir5(dirname5(file3), { recursive: true });
147843
+ await mkdir5(dirname6(file3), { recursive: true });
147792
147844
  await writeFile7(file3, JSON.stringify([...tracked.values()]));
147793
147845
  };
147794
147846
  var spawnDevChild = (command, args, options = {}) => {
147795
- const child = spawn2(command, args, options);
147847
+ const child = spawn3(command, args, options);
147796
147848
  if (child.pid) {
147797
147849
  tracked.set(child.pid, { pid: child.pid, command: [command, ...args].join(" ") });
147798
147850
  persist().catch(() => {});
@@ -147864,7 +147916,7 @@ if (typeof Bun === 'undefined') {
147864
147916
  }
147865
147917
  `;
147866
147918
  var watchdogPath = () => {
147867
- return join11(directories.output, "local", WATCHDOG_FILE);
147919
+ return join12(directories.output, "local", WATCHDOG_FILE);
147868
147920
  };
147869
147921
  var TRACE_HEADER = "x-awsless-trace";
147870
147922
  var traceId = () => randomBytes(4).toString("hex");
@@ -148093,7 +148145,7 @@ var configFeature = defineFeature({
148093
148145
  for (const name of names) {
148094
148146
  ctx.registerResource({ kind: "config", id: name });
148095
148147
  }
148096
- const file3 = join12(directories.output, "local", "config.json");
148148
+ const file3 = join13(directories.output, "local", "config.json");
148097
148149
  const { server, port } = await ctx.keep("shim:ssm", file3, async () => {
148098
148150
  const server2 = createSsmServer({ file: file3 });
148099
148151
  const port2 = await server2.listen();
@@ -148456,6 +148508,75 @@ var formatFullDomainName = (config2, id, subDomain) => {
148456
148508
  // src/feature/domain/index.ts
148457
148509
  var domainFeature = defineFeature({
148458
148510
  name: "domain",
148511
+ onValidate(ctx) {
148512
+ const domains = ctx.appConfig.domains ?? {};
148513
+ const fqdn = (name, domain2) => {
148514
+ const clean = (name ?? domain2).replace(/\.$/, "");
148515
+ return clean === domain2 || clean.endsWith(`.${domain2}`) ? clean : `${clean}.${domain2}`;
148516
+ };
148517
+ const seen = new Map;
148518
+ for (const [id, props] of Object.entries(domains)) {
148519
+ seen.set(`${id}:_amazonses.${props.domain}:TXT`, "the mail verification of the domain");
148520
+ seen.set(`${id}:mail.${props.domain}:MX`, "the mail setup of the domain");
148521
+ seen.set(`${id}:mail.${props.domain}:TXT`, "the mail setup of the domain");
148522
+ seen.set(`${id}:_dmarc.${props.domain}:TXT`, "the mail setup of the domain");
148523
+ }
148524
+ for (const [routerId, router] of Object.entries(ctx.appConfig.router ?? {})) {
148525
+ if (!router.domain) {
148526
+ continue;
148527
+ }
148528
+ const names = [formatFullDomainName(ctx.appConfig, router.domain, router.subDomain)];
148529
+ if (router.redirectWww) {
148530
+ names.push(`www.${names[0]}`);
148531
+ }
148532
+ for (const name of names) {
148533
+ seen.set(`${router.domain}:${name}:A`, `the "${routerId}" router`);
148534
+ seen.set(`${router.domain}:${name}:AAAA`, `the "${routerId}" router`);
148535
+ }
148536
+ }
148537
+ for (const [id, props] of Object.entries(domains)) {
148538
+ for (const record2 of props.dns ?? []) {
148539
+ seen.set(`${id}:${fqdn(record2.name, props.domain)}:${record2.type}`, "the app config");
148540
+ }
148541
+ }
148542
+ for (const stack of ctx.stackConfigs) {
148543
+ for (const [id, records] of Object.entries(stack.dns ?? {})) {
148544
+ const domain2 = domains[id];
148545
+ if (!domain2) {
148546
+ throw new FileError(stack.file, `Dns records for a non existent domain "${id}"`);
148547
+ }
148548
+ for (const record2 of records) {
148549
+ const name = fqdn(record2.name, domain2.domain);
148550
+ const key = `${id}:${name}:${record2.type}`;
148551
+ const owner = seen.get(key);
148552
+ if (owner) {
148553
+ throw new FileError(stack.file, `Conflicting dns record "${name} ${record2.type}" on domain "${id}" - already defined in ${owner}`);
148554
+ }
148555
+ seen.set(key, `"${stack.file}"`);
148556
+ }
148557
+ }
148558
+ }
148559
+ },
148560
+ onStack(ctx) {
148561
+ const entries2 = Object.entries(ctx.stackConfig.dns ?? {});
148562
+ for (const [id, records] of entries2) {
148563
+ const group = new Group(ctx.stack, "dns", id);
148564
+ const domain2 = ctx.appConfig.domains[id].domain;
148565
+ const zoneId = ctx.shared.entry("domain", "zone-id", id);
148566
+ for (const record2 of records) {
148567
+ const name = record2.name ?? domain2;
148568
+ new aws.route53.Record(group, `${name}-${record2.type}`, {
148569
+ zoneId,
148570
+ name,
148571
+ ttl: toSeconds4(record2.ttl),
148572
+ type: record2.type,
148573
+ records: record2.records
148574
+ }, {
148575
+ replaceOnChanges: ["name", "type", "zoneId"]
148576
+ });
148577
+ }
148578
+ }
148579
+ },
148459
148580
  onApp(ctx) {
148460
148581
  const domains = Object.entries(ctx.appConfig.domains ?? {});
148461
148582
  if (domains.length === 0) {
@@ -148783,14 +148904,14 @@ var functionFeature = defineFeature({
148783
148904
  });
148784
148905
 
148785
148906
  // src/feature/icon/index.ts
148786
- import { dirname as dirname6, join as join14 } from "path";
148787
- import { fileURLToPath as fileURLToPath3 } from "url";
148907
+ import { dirname as dirname7, join as join15 } from "path";
148908
+ import { fileURLToPath as fileURLToPath4 } from "url";
148788
148909
  import { toDays as toDays4 } from "@awsless/duration";
148789
148910
  import { formatRouteEnvName as formatRouteEnvName2 } from "awsless";
148790
148911
 
148791
148912
  // src/feature/icon/dev.ts
148792
148913
  import { cp } from "fs/promises";
148793
- import { isAbsolute as isAbsolute2, join as join13 } from "path";
148914
+ import { isAbsolute as isAbsolute2, join as join14 } from "path";
148794
148915
  import { formatRouteEnvName } from "awsless";
148795
148916
  var iconOnDev = async (ctx) => {
148796
148917
  const icons = ctx.stackConfigs.flatMap((stack) => Object.keys(stack.icons ?? {}));
@@ -148829,8 +148950,8 @@ var iconOnDev = async (ctx) => {
148829
148950
  }
148830
148951
  if (props.origin.static) {
148831
148952
  ctx.addEnv(formatRouteEnvName(routeKey, "ICON_ORIGIN_S3"), "true");
148832
- const source = isAbsolute2(props.origin.static) ? props.origin.static : join13(directories.root, props.origin.static);
148833
- await cp(source, join13(directories.output, "local", "store", bucket, folder, "origin"), {
148953
+ const source = isAbsolute2(props.origin.static) ? props.origin.static : join14(directories.root, props.origin.static);
148954
+ await cp(source, join14(directories.output, "local", "store", bucket, folder, "origin"), {
148834
148955
  recursive: true
148835
148956
  });
148836
148957
  }
@@ -148877,7 +148998,7 @@ var iconFeature = defineFeature({
148877
148998
  const serverRouteKey = formatRouteKey(ctx.stack.name, "icon", id);
148878
148999
  bundle.addHandler({
148879
149000
  routeKey: serverRouteKey,
148880
- file: join14(dirname6(fileURLToPath3(import.meta.url)), "/handlers/icon.js"),
149001
+ file: join15(dirname7(fileURLToPath4(import.meta.url)), "/handlers/icon.js"),
148881
149002
  exportName: "default"
148882
149003
  });
148883
149004
  addRoutes({
@@ -148917,8 +149038,8 @@ var iconFeature = defineFeature({
148917
149038
  new aws.s3.BucketObject(group, `static-${file3}`, {
148918
149039
  bucket: bucket.name,
148919
149040
  key: `${folder}origin/${file3}`,
148920
- source: join14(props.origin.static, file3),
148921
- sourceHash: $hash(join14(props.origin.static, file3))
149041
+ source: join15(props.origin.static, file3),
149042
+ sourceHash: $hash(join15(props.origin.static, file3))
148922
149043
  }, {
148923
149044
  replaceOnChanges: ["bucket", "key"]
148924
149045
  });
@@ -148934,14 +149055,14 @@ var iconFeature = defineFeature({
148934
149055
  // src/feature/image/index.ts
148935
149056
  import { createHash as createHash9 } from "crypto";
148936
149057
  import { readFile as readFile10 } from "fs/promises";
148937
- import { dirname as dirname7, join as join16 } from "path";
148938
- import { fileURLToPath as fileURLToPath4 } from "url";
149058
+ import { dirname as dirname8, join as join17 } from "path";
149059
+ import { fileURLToPath as fileURLToPath5 } from "url";
148939
149060
  import { toDays as toDays5 } from "@awsless/duration";
148940
149061
  import { formatRouteEnvName as formatRouteEnvName4 } from "awsless";
148941
149062
 
148942
149063
  // src/feature/image/dev.ts
148943
149064
  import { cp as cp2 } from "fs/promises";
148944
- import { isAbsolute as isAbsolute3, join as join15 } from "path";
149065
+ import { isAbsolute as isAbsolute3, join as join16 } from "path";
148945
149066
  import { formatRouteEnvName as formatRouteEnvName3 } from "awsless";
148946
149067
  var imageOnDev = async (ctx) => {
148947
149068
  const images = ctx.stackConfigs.flatMap((stack) => Object.keys(stack.images ?? {}));
@@ -148980,8 +149101,8 @@ var imageOnDev = async (ctx) => {
148980
149101
  }
148981
149102
  if (props.origin.static) {
148982
149103
  ctx.addEnv(formatRouteEnvName3(routeKey, "IMAGE_ORIGIN_S3"), "true");
148983
- const source = isAbsolute3(props.origin.static) ? props.origin.static : join15(directories.root, props.origin.static);
148984
- await cp2(source, join15(directories.output, "local", "store", bucket, folder, "origin"), {
149104
+ const source = isAbsolute3(props.origin.static) ? props.origin.static : join16(directories.root, props.origin.static);
149105
+ await cp2(source, join16(directories.output, "local", "store", bucket, folder, "origin"), {
148985
149106
  recursive: true
148986
149107
  });
148987
149108
  }
@@ -149011,7 +149132,7 @@ var imageFeature = defineFeature({
149011
149132
  throw new FileError("app.json", "The image feature requires an arm64 function bundle.");
149012
149133
  }
149013
149134
  const group = new Group(ctx.base, "image", "layer");
149014
- const path3 = join16(dirname7(fileURLToPath4(import.meta.url)), "/layers/sharp-arm.zip");
149135
+ const path3 = join17(dirname8(fileURLToPath5(import.meta.url)), "/layers/sharp-arm.zip");
149015
149136
  const layerId = formatGlobalResourceName({
149016
149137
  appName: ctx.appConfig.name,
149017
149138
  resourceType: "layer",
@@ -149091,7 +149212,7 @@ var imageFeature = defineFeature({
149091
149212
  const serverRouteKey = formatRouteKey(ctx.stack.name, "image", id);
149092
149213
  bundle.addHandler({
149093
149214
  routeKey: serverRouteKey,
149094
- file: join16(dirname7(fileURLToPath4(import.meta.url)), "/handlers/image.js"),
149215
+ file: join17(dirname8(fileURLToPath5(import.meta.url)), "/handlers/image.js"),
149095
149216
  exportName: "default",
149096
149217
  external: ["sharp"]
149097
149218
  });
@@ -149129,8 +149250,8 @@ var imageFeature = defineFeature({
149129
149250
  new aws.s3.BucketObject(group, `static-${file3}`, {
149130
149251
  bucket: bucket.name,
149131
149252
  key: `${folder}origin/${file3}`,
149132
- source: join16(props.origin.static, file3),
149133
- sourceHash: $hash(join16(props.origin.static, file3))
149253
+ source: join17(props.origin.static, file3),
149254
+ sourceHash: $hash(join17(props.origin.static, file3))
149134
149255
  }, {
149135
149256
  replaceOnChanges: ["bucket", "key"]
149136
149257
  });
@@ -149147,14 +149268,14 @@ var imageFeature = defineFeature({
149147
149268
  import { days as days2, seconds as seconds2, toSeconds as toSeconds6 } from "@awsless/duration";
149148
149269
 
149149
149270
  // src/feature/instance/dev.ts
149150
- import { dirname as dirname10, join as join19 } from "path";
149271
+ import { dirname as dirname11, join as join20 } from "path";
149151
149272
  var import_deepmerge3 = __toESM(require_cjs2(), 1);
149152
149273
 
149153
149274
  // src/feature/site/dev.ts
149154
- import { delimiter, dirname as dirname9, isAbsolute as isAbsolute4, join as join18, normalize as normalize2, relative as relative4 } from "path";
149275
+ import { delimiter, dirname as dirname10, isAbsolute as isAbsolute4, join as join19, normalize as normalize2, relative as relative4 } from "path";
149155
149276
 
149156
149277
  // src/feature/site/static-routes.ts
149157
- import { basename, dirname as dirname8, join as join17 } from "path";
149278
+ import { basename, dirname as dirname9, join as join18 } from "path";
149158
149279
  var isPageFile = (file3) => {
149159
149280
  return file3.endsWith(".html") || !basename(file3).includes(".");
149160
149281
  };
@@ -149164,7 +149285,7 @@ var pageUrl = (file3) => {
149164
149285
  }
149165
149286
  const url2 = file3.slice(0, -".html".length);
149166
149287
  if (basename(url2) === "index") {
149167
- return dirname8(url2);
149288
+ return dirname9(url2);
149168
149289
  }
149169
149290
  return url2;
149170
149291
  };
@@ -149173,10 +149294,10 @@ var planStaticRoutes = (files, sitePath) => {
149173
149294
  const pages = files.filter((file3) => isPageFile(file3));
149174
149295
  const assets = files.filter((file3) => !isPageFile(file3));
149175
149296
  for (const page of pages) {
149176
- plan.files[join17(sitePath, pageUrl(page))] = page;
149297
+ plan.files[join18(sitePath, pageUrl(page))] = page;
149177
149298
  }
149178
149299
  if (sitePath !== "/") {
149179
- plan.catchAll = join17(sitePath, "*.");
149300
+ plan.catchAll = join18(sitePath, "*.");
149180
149301
  return plan;
149181
149302
  }
149182
149303
  const folders = new Set;
@@ -149186,9 +149307,9 @@ var planStaticRoutes = (files, sitePath) => {
149186
149307
  folders.add(folder);
149187
149308
  continue;
149188
149309
  }
149189
- plan.files[join17(sitePath, asset)] = asset;
149310
+ plan.files[join18(sitePath, asset)] = asset;
149190
149311
  }
149191
- plan.dirs = [...folders].map((folder) => join17(sitePath, folder, "*."));
149312
+ plan.dirs = [...folders].map((folder) => join18(sitePath, folder, "*."));
149192
149313
  return plan;
149193
149314
  };
149194
149315
 
@@ -149197,8 +149318,8 @@ var binPath = (from) => {
149197
149318
  const paths = [];
149198
149319
  let dir = from;
149199
149320
  while (true) {
149200
- paths.push(join18(dir, "node_modules", ".bin"));
149201
- const parent = dirname9(dir);
149321
+ paths.push(join19(dir, "node_modules", ".bin"));
149322
+ const parent = dirname10(dir);
149202
149323
  if (parent === dir) {
149203
149324
  break;
149204
149325
  }
@@ -149229,7 +149350,7 @@ var siteOnDev = async (ctx) => {
149229
149350
  async start({ env: env2 }) {
149230
149351
  const value = await ctx.keep(key, { command, port, env: env2 }, async () => {
149231
149352
  const [bin, ...args] = command.split(" ");
149232
- const cwd = join18(directories.root, dirname9(stackConfig.file));
149353
+ const cwd = join19(directories.root, dirname10(stackConfig.file));
149233
149354
  const sink3 = {
149234
149355
  emit: () => {},
149235
149356
  stopping: false
@@ -149308,7 +149429,7 @@ ${tail.join(`
149308
149429
  hostname: "127.0.0.1",
149309
149430
  async fetch(request) {
149310
149431
  const pathname = decodeURIComponent(new URL(request.url).pathname);
149311
- const path3 = normalize2(join18(staticDir, pathname));
149432
+ const path3 = normalize2(join19(staticDir, pathname));
149312
149433
  const rel = relative4(normalize2(staticDir), path3);
149313
149434
  if (rel.startsWith("..") || isAbsolute4(rel)) {
149314
149435
  return new Response("Forbidden", { status: 403 });
@@ -149386,7 +149507,7 @@ var instanceOnDev = async (ctx) => {
149386
149507
  const healthPort = await findFreePort();
149387
149508
  const merged = import_deepmerge3.default(ctx.appConfig.instance ?? {}, props);
149388
149509
  const file3 = merged.code.file;
149389
- const cwd = join19(directories.root, dirname10(stackConfig.file));
149510
+ const cwd = join20(directories.root, dirname11(stackConfig.file));
149390
149511
  let child;
149391
149512
  let stopping = false;
149392
149513
  let restarting = false;
@@ -149482,7 +149603,7 @@ ${tail.join(`
149482
149603
 
149483
149604
  // src/feature/instance/util.ts
149484
149605
  import { createHash as createHash11 } from "crypto";
149485
- import { join as join21 } from "path";
149606
+ import { join as join22 } from "path";
149486
149607
  import { toDays as toDays6, toSeconds as toSeconds5 } from "@awsless/duration";
149487
149608
  import { stringify } from "@awsless/json";
149488
149609
  import { generateFileHash as generateFileHash3 } from "@awsless/ts-file-cache";
@@ -149491,9 +149612,9 @@ var import_deepmerge4 = __toESM(require_cjs2(), 1);
149491
149612
  // src/feature/instance/build/executable.ts
149492
149613
  import { createHash as createHash10 } from "crypto";
149493
149614
  import { readFile as readFile11 } from "fs/promises";
149494
- import { join as join20 } from "path";
149615
+ import { join as join21 } from "path";
149495
149616
  var buildExecutable = async (input, outputPath, architecture) => {
149496
- const filePath = join20(outputPath, "program");
149617
+ const filePath = join21(outputPath, "program");
149497
149618
  const target2 = architecture === "x86_64" ? "bun-linux-x64" : "bun-linux-arm64";
149498
149619
  let result;
149499
149620
  try {
@@ -149739,7 +149860,7 @@ var createFargateTask = (parentGroup, ctx, ns2, id, local) => {
149739
149860
  healthCheck: props.healthCheck ? {
149740
149861
  command: [
149741
149862
  "CMD-SHELL",
149742
- `curl -f http://${join21("localhost", props.healthCheck.path)} || exit 1`
149863
+ `curl -f http://${join22("localhost", props.healthCheck.path)} || exit 1`
149743
149864
  ],
149744
149865
  interval: toSeconds5(props.healthCheck.interval),
149745
149866
  retries: props.healthCheck.retries,
@@ -149952,10 +150073,10 @@ var import_deepmerge5 = __toESM(require_cjs2(), 1);
149952
150073
  // src/feature/job/build/executable.ts
149953
150074
  import { createHash as createHash12 } from "crypto";
149954
150075
  import { readFile as readFile12, writeFile as writeFile8 } from "fs/promises";
149955
- import { join as join22, resolve as resolve3 } from "path";
150076
+ import { join as join23, resolve as resolve3 } from "path";
149956
150077
  var buildJobExecutable = async (input, outputPath, architecture) => {
149957
- const filePath = join22(outputPath, "program");
149958
- const wrapperPath = join22(outputPath, "wrapper.ts");
150078
+ const filePath = join23(outputPath, "program");
150079
+ const wrapperPath = join23(outputPath, "wrapper.ts");
149959
150080
  const handlerPath = resolve3(input);
149960
150081
  await writeFile8(wrapperPath, `import { parse } from '@awsless/json'
149961
150082
  import { getObject } from '@awsless/s3'
@@ -150642,8 +150763,8 @@ var metricFeature = defineFeature({
150642
150763
  });
150643
150764
 
150644
150765
  // src/feature/on-error-log/index.ts
150645
- import { dirname as dirname11, join as join23 } from "path";
150646
- import { fileURLToPath as fileURLToPath5 } from "url";
150766
+ import { dirname as dirname12, join as join24 } from "path";
150767
+ import { fileURLToPath as fileURLToPath6 } from "url";
150647
150768
  import { days as days3 } from "@awsless/duration";
150648
150769
  var onErrorLogFeature = defineFeature({
150649
150770
  name: "on-error-log",
@@ -150668,7 +150789,7 @@ var onErrorLogFeature = defineFeature({
150668
150789
  const build2 = registerFunctionBuild(ctx, name, {
150669
150790
  code: consumer.code,
150670
150791
  handler: consumer.handler,
150671
- wrapper: join23(dirname11(fileURLToPath5(import.meta.url)), "/handlers/on-error-log.js")
150792
+ wrapper: join24(dirname12(fileURLToPath6(import.meta.url)), "/handlers/on-error-log.js")
150672
150793
  });
150673
150794
  const handler = createLambdaFunctionFromZip(group, ctx, "on-error-log", "handler", {
150674
150795
  zipFile: build2.zipFile,
@@ -150727,8 +150848,8 @@ var onErrorLogFeature = defineFeature({
150727
150848
  });
150728
150849
 
150729
150850
  // src/feature/on-failure/index.ts
150730
- import { dirname as dirname12, join as join24 } from "path";
150731
- import { fileURLToPath as fileURLToPath6 } from "url";
150851
+ import { dirname as dirname13, join as join25 } from "path";
150852
+ import { fileURLToPath as fileURLToPath7 } from "url";
150732
150853
  import { days as days4, toSeconds as toSeconds9 } from "@awsless/duration";
150733
150854
  var onFailureFeature = defineFeature({
150734
150855
  name: "on-failure",
@@ -150911,7 +151032,7 @@ var onFailureFeature = defineFeature({
150911
151032
  const build2 = registerFunctionBuild(ctx, name, {
150912
151033
  code: consumer.code,
150913
151034
  handler: consumer.handler,
150914
- wrapper: join24(dirname12(fileURLToPath6(import.meta.url)), "/handlers/on-failure.js")
151035
+ wrapper: join25(dirname13(fileURLToPath7(import.meta.url)), "/handlers/on-failure.js")
150915
151036
  });
150916
151037
  const handler = createLambdaFunctionFromZip(group, ctx, "on-failure", "handler", {
150917
151038
  zipFile: build2.zipFile,
@@ -151002,13 +151123,13 @@ var onFailureFeature = defineFeature({
151002
151123
 
151003
151124
  // src/feature/pubsub/index.ts
151004
151125
  import { createHmac as createHmac2 } from "crypto";
151005
- import { fileURLToPath as fileURLToPath9 } from "url";
151006
- import { dirname as dirname15, join as join28 } from "path";
151126
+ import { fileURLToPath as fileURLToPath10 } from "url";
151127
+ import { dirname as dirname16, join as join29 } from "path";
151007
151128
  import { formatRouteEnvName as formatRouteEnvName6 } from "awsless";
151008
151129
 
151009
151130
  // src/feature/pubsub/dev.ts
151010
- import { dirname as dirname13, join as join25 } from "path";
151011
- import { fileURLToPath as fileURLToPath7 } from "url";
151131
+ import { dirname as dirname14, join as join26 } from "path";
151132
+ import { fileURLToPath as fileURLToPath8 } from "url";
151012
151133
  var import_ioredis2 = __toESM(require_built3(), 1);
151013
151134
  import { formatRouteEnvName as formatRouteEnvName5 } from "awsless";
151014
151135
 
@@ -151262,7 +151383,7 @@ var pubsubOnDev = async (ctx) => {
151262
151383
  const sink3 = {
151263
151384
  stopping: false
151264
151385
  };
151265
- const runtime = join25(dirname13(fileURLToPath7(import.meta.url)), "handlers", "pubsub-server.js");
151386
+ const runtime = join26(dirname14(fileURLToPath8(import.meta.url)), "handlers", "pubsub-server.js");
151266
151387
  const child = spawnDevChild(process.execPath, ["-r", watchdogPath(), runtime], {
151267
151388
  stdio: ["ignore", "ignore", "pipe"],
151268
151389
  env: {
@@ -151338,14 +151459,14 @@ var durationMax = (max) => {
151338
151459
  import { stat as stat2 } from "fs/promises";
151339
151460
 
151340
151461
  // src/config/schema/relative-path.ts
151341
- import { join as join26 } from "path";
151462
+ import { join as join27 } from "path";
151342
151463
  var basePath;
151343
151464
  var setLocalBasePath = (path3) => {
151344
151465
  basePath = path3;
151345
151466
  };
151346
151467
  var resolvePath = (path3) => {
151347
151468
  if (path3.startsWith(".") && basePath) {
151348
- return join26(basePath, path3);
151469
+ return join27(basePath, path3);
151349
151470
  }
151350
151471
  return path3;
151351
151472
  };
@@ -151871,11 +151992,11 @@ var pubsubEventTypes = ["connected", "disconnected", "subscribed", "unsubscribed
151871
151992
  // src/feature/pubsub/util.ts
151872
151993
  import { createHash as createHash14 } from "crypto";
151873
151994
  import { readFile as readFile13 } from "fs/promises";
151874
- import { fileURLToPath as fileURLToPath8 } from "url";
151875
- import { dirname as dirname14, join as join27 } from "path";
151995
+ import { fileURLToPath as fileURLToPath9 } from "url";
151996
+ import { dirname as dirname15, join as join28 } from "path";
151876
151997
  import { toDays as toDays10 } from "@awsless/duration";
151877
151998
  import { stringify as stringify3 } from "@awsless/json";
151878
- var __dirname2 = dirname14(fileURLToPath8(import.meta.url));
151999
+ var __dirname2 = dirname15(fileURLToPath9(import.meta.url));
151879
152000
  var WS_PORT = 3000;
151880
152001
  var ARCHITECTURE = "arm64";
151881
152002
  var CPU = "256";
@@ -151891,7 +152012,7 @@ var createPubSubService = (parentGroup, ctx, id, props, inputs) => {
151891
152012
  });
151892
152013
  const shortName = shortId(`${ctx.app.name}:pubsub:${id}:${ctx.appId}`);
151893
152014
  const image = "public.ecr.aws/aws-cli/aws-cli:arm64";
151894
- const bundleFile = join27(__dirname2, "handlers/pubsub-server.js");
152015
+ const bundleFile = join28(__dirname2, "handlers/pubsub-server.js");
151895
152016
  ctx.registerBuild("pubsub", name, async (build2) => {
151896
152017
  const hash3 = createHash14("sha1").update(await readFile13(bundleFile)).digest("hex");
151897
152018
  const fingerprint = `${hash3}-${ARCHITECTURE}`;
@@ -152176,7 +152297,7 @@ var createPubSubService = (parentGroup, ctx, id, props, inputs) => {
152176
152297
  };
152177
152298
 
152178
152299
  // src/feature/pubsub/index.ts
152179
- var __dirname3 = dirname15(fileURLToPath9(import.meta.url));
152300
+ var __dirname3 = dirname16(fileURLToPath10(import.meta.url));
152180
152301
  var typeGenCode8 = `
152181
152302
  import type { Mock } from 'vitest'
152182
152303
 
@@ -152426,7 +152547,7 @@ var pubsubFeature = defineFeature({
152426
152547
  const publisherRouteKey = formatRouteKey("base", "pubsub", `${id}-publisher`);
152427
152548
  bundle.addHandler({
152428
152549
  routeKey: publisherRouteKey,
152429
- file: join28(__dirname3, "/handlers/pubsub-publisher.js"),
152550
+ file: join29(__dirname3, "/handlers/pubsub-publisher.js"),
152430
152551
  exportName: "default"
152431
152552
  });
152432
152553
  bundle.addEnv(formatRouteEnvName6(publisherRouteKey, "REDIS_HOST"), redisHost);
@@ -152690,7 +152811,7 @@ var formatWebEvent = (request, route, body, url2, sourceIp) => {
152690
152811
  }
152691
152812
  const cookie = request.headers.get("cookie");
152692
152813
  const contentType2 = request.headers.get("content-type");
152693
- const textual = typeof contentType2 === "string" && isTextualBody(contentType2);
152814
+ const textual = typeof contentType2 === "string" && isTextualBody(contentType2) && Buffer.from(body.toString()).equals(body);
152694
152815
  const now = new Date;
152695
152816
  return {
152696
152817
  version: "2.0",
@@ -165163,14 +165284,24 @@ class ListDistributionTenantsCommand extends command2(_ep02, _mw02, "ListDistrib
165163
165284
 
165164
165285
  // src/formation/cloudfront-kvs.ts
165165
165286
  import {
165166
- CloudFrontKeyValueStoreClient,
165167
165287
  DescribeKeyValueStoreCommand as DescribeDataStoreCommand,
165168
165288
  GetKeyCommand,
165169
165289
  ListKeysCommand,
165170
165290
  UpdateKeysCommand
165171
165291
  } from "@aws-sdk/client-cloudfront-keyvaluestore";
165172
165292
  var import_chunk2 = __toESM(require_chunk(), 1);
165173
- import"@aws-sdk/signature-v4-crt";
165293
+
165294
+ // src/util/kvs.ts
165295
+ import { CloudFrontKeyValueStoreClient } from "@aws-sdk/client-cloudfront-keyvaluestore";
165296
+ import { SignatureV4a } from "@aws-sdk/signature-v4a";
165297
+ var createKvsClient = (props) => {
165298
+ return new CloudFrontKeyValueStoreClient({
165299
+ ...props,
165300
+ signerConstructor: SignatureV4a
165301
+ });
165302
+ };
165303
+
165304
+ // src/formation/cloudfront-kvs.ts
165174
165305
  var ACTIVE_KEY = "$active";
165175
165306
  var DEPLOY_KEY_PREFIX = "$deploy:";
165176
165307
  var routeSchema = exports_external.object({
@@ -165263,7 +165394,7 @@ var stageRoutes = async (kvs, state) => {
165263
165394
  };
165264
165395
  };
165265
165396
  var createCloudFrontKvsProvider = ({ credentials: credentials2, region }) => {
165266
- const kvs = new CloudFrontKeyValueStoreClient({ credentials: credentials2, region });
165397
+ const kvs = createKvsClient({ credentials: credentials2, region });
165267
165398
  return createCustomProvider("cloudfront-kvs", {
165268
165399
  "import-keys": {},
165269
165400
  "route-deployment": {
@@ -166224,8 +166355,8 @@ var routerFeature = defineFeature({
166224
166355
  });
166225
166356
 
166226
166357
  // src/feature/rpc/index.ts
166227
- import { dirname as dirname17, join as join30, relative as relative7 } from "path";
166228
- import { fileURLToPath as fileURLToPath10 } from "url";
166358
+ import { dirname as dirname18, join as join31, relative as relative7 } from "path";
166359
+ import { fileURLToPath as fileURLToPath11 } from "url";
166229
166360
  import { toSeconds as toSeconds14 } from "@awsless/duration";
166230
166361
  import { formatRouteEnvName as formatRouteEnvName8 } from "awsless";
166231
166362
 
@@ -166341,7 +166472,7 @@ var rpcFeature = defineFeature({
166341
166472
  const serverRouteKey = formatRouteKey("base", "rpc", id);
166342
166473
  bundle.addHandler({
166343
166474
  routeKey: serverRouteKey,
166344
- file: join30(dirname17(fileURLToPath10(import.meta.url)), "/handlers/rpc.js"),
166475
+ file: join31(dirname18(fileURLToPath11(import.meta.url)), "/handlers/rpc.js"),
166345
166476
  exportName: "default"
166346
166477
  });
166347
166478
  bundle.addEnv(formatRouteEnvName8(serverRouteKey, "TIMEOUT"), toSeconds14(ctx.appConfig.function.timeout).toString());
@@ -166784,11 +166915,11 @@ var searchFeature = defineFeature({
166784
166915
 
166785
166916
  // src/feature/site/index.ts
166786
166917
  import { createHash as createHash18 } from "crypto";
166787
- import { dirname as dirname18, join as join33 } from "path";
166918
+ import { dirname as dirname19, join as join34 } from "path";
166788
166919
 
166789
166920
  // src/util/cache.ts
166790
166921
  import { lstat as lstat2, readdir as readdir4 } from "fs/promises";
166791
- import { join as join32 } from "path";
166922
+ import { join as join33 } from "path";
166792
166923
  var generateCacheKey = async (directories2) => {
166793
166924
  const files = await listAllFiles(directories2);
166794
166925
  const sortedFiles = files.toSorted();
@@ -166815,7 +166946,7 @@ var listAllFiles = async (list2) => {
166815
166946
  recursive: true,
166816
166947
  withFileTypes: true
166817
166948
  });
166818
- files.push(...dirents.filter((d3) => d3.isFile()).map((file3) => join32(file3.parentPath, file3.name)));
166949
+ files.push(...dirents.filter((d3) => d3.isFile()).map((file3) => join33(file3.parentPath, file3.name)));
166819
166950
  } else if (stat4.isFile()) {
166820
166951
  files.push(entry);
166821
166952
  }
@@ -166845,7 +166976,7 @@ var siteFeature = defineFeature({
166845
166976
  return build2(fingerprint, async (write2) => {
166846
166977
  const credentialProvider = await getCredentials(ctx.appConfig.profile);
166847
166978
  const credentials2 = await credentialProvider();
166848
- const cwd2 = join33(directories.root, dirname18(ctx.stackConfig.file));
166979
+ const cwd2 = join34(directories.root, dirname19(ctx.stackConfig.file));
166849
166980
  const env3 = {
166850
166981
  ...process.env,
166851
166982
  PATH: binPath(cwd2),
@@ -166930,7 +167061,7 @@ ${(errors4.trim() || output.trim()).slice(-2000)}`);
166930
167061
  cwd: staticDir,
166931
167062
  nodir: true
166932
167063
  }).toSorted();
166933
- const hashes = files.map((file3) => $hash(join33(staticDir, file3)));
167064
+ const hashes = files.map((file3) => $hash(join34(staticDir, file3)));
166934
167065
  const version3 = $combine(...hashes).pipe((hashes2) => {
166935
167066
  const hash3 = createHash18("sha1");
166936
167067
  for (const [index, file3] of files.entries()) {
@@ -166979,7 +167110,7 @@ ${(errors4.trim() || output.trim()).slice(-2000)}`);
166979
167110
 
166980
167111
  // src/feature/store/index.ts
166981
167112
  import { cp as cp3 } from "fs/promises";
166982
- import { join as join34 } from "path";
167113
+ import { join as join35 } from "path";
166983
167114
  import { toDays as toDays11 } from "@awsless/duration";
166984
167115
  var typeGenCode11 = `
166985
167116
  import { Body, PutObjectProps, BodyStream } from '@awsless/s3'
@@ -167045,7 +167176,7 @@ var storeFeature = defineFeature({
167045
167176
  for (const [id, props] of Object.entries(stack.stores ?? {})) {
167046
167177
  if (typeof props.static === "string") {
167047
167178
  const folder = getFeatureFolder("store", stack.name, id);
167048
- await cp3(props.static, join34(directories.output, "local", "store", bucket, folder), {
167179
+ await cp3(props.static, join35(directories.output, "local", "store", bucket, folder), {
167049
167180
  recursive: true,
167050
167181
  force: true
167051
167182
  });
@@ -167130,8 +167261,8 @@ var storeFeature = defineFeature({
167130
167261
  key: `${folder}${file3}`,
167131
167262
  cacheControl: getCacheControl(file3),
167132
167263
  contentType: getContentType(file3),
167133
- source: join34(props.static, file3),
167134
- sourceHash: $hash(join34(props.static, file3))
167264
+ source: join35(props.static, file3),
167265
+ sourceHash: $hash(join35(props.static, file3))
167135
167266
  }, {
167136
167267
  replaceOnChanges: ["bucket", "key"]
167137
167268
  });
@@ -167152,14 +167283,14 @@ import { toSeconds as toSeconds15 } from "@awsless/duration";
167152
167283
 
167153
167284
  // src/feature/table/dev.ts
167154
167285
  import { readFile as readFile14 } from "fs/promises";
167155
- import { join as join36 } from "path";
167286
+ import { join as join37 } from "path";
167156
167287
  import { CreateTableCommand as CreateTableCommand2, DeleteTableCommand } from "@aws-sdk/client-dynamodb";
167157
167288
  import { PutCommand } from "@aws-sdk/lib-dynamodb";
167158
167289
 
167159
167290
  // src/dev/reset.ts
167160
167291
  var import_ioredis3 = __toESM(require_built3(), 1);
167161
167292
  import { readdir as readdir5, rm as rm9 } from "fs/promises";
167162
- import { join as join35 } from "path";
167293
+ import { join as join36 } from "path";
167163
167294
  import { DeleteCommand, ScanCommand } from "@aws-sdk/lib-dynamodb";
167164
167295
  import { Client as Client5 } from "@opensearch-project/opensearch";
167165
167296
  var wiping = false;
@@ -167215,14 +167346,14 @@ var createDataReset = (props) => {
167215
167346
  }
167216
167347
  }
167217
167348
  }
167218
- const storeRoot = join35(directories.output, "local", "store");
167349
+ const storeRoot = join36(directories.output, "local", "store");
167219
167350
  try {
167220
167351
  for (const bucket of await readdir5(storeRoot)) {
167221
- for (const entry of await readdir5(join35(storeRoot, bucket))) {
167352
+ for (const entry of await readdir5(join36(storeRoot, bucket))) {
167222
167353
  if (entry === "image" || entry === "icon") {
167223
167354
  continue;
167224
167355
  }
167225
- await rm9(join35(storeRoot, bucket, entry), { recursive: true, force: true });
167356
+ await rm9(join36(storeRoot, bucket, entry), { recursive: true, force: true });
167226
167357
  }
167227
167358
  }
167228
167359
  } catch {}
@@ -167290,7 +167421,7 @@ var createTableInput = (name, props) => {
167290
167421
  };
167291
167422
  };
167292
167423
  var loadSeed = async (stackName, id) => {
167293
- const file3 = join36(directories.output, "local", "seed", "table", stackName, `${id}.json`);
167424
+ const file3 = join37(directories.output, "local", "seed", "table", stackName, `${id}.json`);
167294
167425
  try {
167295
167426
  const items = JSON.parse(await readFile14(file3, "utf8"));
167296
167427
  return Array.isArray(items) ? items : [];
@@ -168350,7 +168481,7 @@ var createApp = (props) => {
168350
168481
 
168351
168482
  // src/util/workspace.ts
168352
168483
  import { mkdir as mkdir7, readFile as readFile15, rm as rm10, writeFile as writeFile10 } from "fs/promises";
168353
- import { dirname as dirname19, join as join37 } from "path";
168484
+ import { dirname as dirname20, join as join38 } from "path";
168354
168485
  var getStateBucketName = (region, accountId) => {
168355
168486
  return `awsless-state-${region}-${accountId}`;
168356
168487
  };
@@ -168414,9 +168545,9 @@ var createWorkSpace = async (props) => {
168414
168545
  };
168415
168546
  };
168416
168547
  var pullRemoteState = async (app, stateBackend) => {
168417
- const file3 = join37(directories.state, `${app.urn}.json`);
168548
+ const file3 = join38(directories.state, `${app.urn}.json`);
168418
168549
  const state = await stateBackend.get(app.urn);
168419
- await mkdir7(dirname19(file3), { recursive: true });
168550
+ await mkdir7(dirname20(file3), { recursive: true });
168420
168551
  if (typeof state === "undefined") {
168421
168552
  const exist = await fileExist(file3);
168422
168553
  if (exist) {
@@ -168427,14 +168558,14 @@ var pullRemoteState = async (app, stateBackend) => {
168427
168558
  }
168428
168559
  };
168429
168560
  var pushRemoteState = async (app, stateBackend) => {
168430
- const file3 = join37(directories.state, `${app.urn}.json`);
168561
+ const file3 = join38(directories.state, `${app.urn}.json`);
168431
168562
  const data = await readFile15(file3, "utf8");
168432
168563
  const state = JSON.parse(data);
168433
168564
  await stateBackend.update(app.urn, state);
168434
168565
  };
168435
168566
 
168436
168567
  // src/config/load/load.ts
168437
- import { basename as basename3, dirname as dirname21, join as join39 } from "path";
168568
+ import { basename as basename3, dirname as dirname22, join as join40 } from "path";
168438
168569
 
168439
168570
  // src/feature/alert/schema.ts
168440
168571
  var AlertNameSchema = exports_external.string().min(3).max(256).regex(/^[a-z0-9-]+$/i, "Invalid alert name").transform((value) => kebabCase(value)).describe("Define alert name.");
@@ -168471,15 +168602,17 @@ var DomainNameSchema = exports_external.string().regex(/[a-z\-_.]/g, "Invalid do
168471
168602
  var DNSTypeSchema = exports_external.enum(["A", "AAAA", "CAA", "CNAME", "DS", "MX", "NAPTR", "NS", "PTR", "SOA", "SPF", "SRV", "TXT"]).describe("The DNS record type.");
168472
168603
  var TTLSchema = DurationSchema.describe("The resource record cache time to live (TTL).");
168473
168604
  var RecordsSchema = exports_external.string().array().describe("One or more values that correspond with the value that you specified for the Type property.");
168605
+ var DnsRecordSchema = exports_external.object({
168606
+ name: DomainNameSchema.optional(),
168607
+ type: DNSTypeSchema,
168608
+ ttl: TTLSchema,
168609
+ records: RecordsSchema
168610
+ });
168474
168611
  var DomainsDefaultSchema = exports_external.record(ResourceIdSchema, exports_external.object({
168475
168612
  domain: DomainNameSchema.describe("Define the domain name"),
168476
- dns: exports_external.object({
168477
- name: DomainNameSchema.optional(),
168478
- type: DNSTypeSchema,
168479
- ttl: TTLSchema,
168480
- records: RecordsSchema
168481
- }).array().optional().describe("Define the domain dns records")
168613
+ dns: DnsRecordSchema.array().optional().describe("Define the domain dns records")
168482
168614
  })).optional().describe("Define the domains for your application.");
168615
+ var StackDnsSchema = exports_external.record(ResourceIdSchema, DnsRecordSchema.array().describe("The dns records to add to the domain.")).optional().describe("Define extra dns records on domains from the app config.");
168483
168616
 
168484
168617
  // src/feature/job/schema.ts
168485
168618
  import { days as days10, toDays as toDays12 } from "@awsless/duration";
@@ -169255,6 +169388,7 @@ var StackSchema = exports_external.object({
169255
169388
  $schema: exports_external.string().optional(),
169256
169389
  name: NameSchema,
169257
169390
  routes: RoutesSchema,
169391
+ dns: StackDnsSchema,
169258
169392
  commands: CommandsSchema,
169259
169393
  rest: RestSchema,
169260
169394
  rpc: RpcSchema,
@@ -169279,7 +169413,7 @@ var StackSchema = exports_external.object({
169279
169413
 
169280
169414
  // src/config/load/read.ts
169281
169415
  import { readFile as readFile16 } from "fs/promises";
169282
- import { basename as basename2, dirname as dirname20, extname as extname5, join as join38 } from "path";
169416
+ import { basename as basename2, dirname as dirname21, extname as extname5, join as join39 } from "path";
169283
169417
 
169284
169418
  // ../../node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/core.mjs
169285
169419
  var exports_core3 = {};
@@ -170030,7 +170164,7 @@ var readConfigWithStage = async (file3, stage) => {
170030
170164
  }
170031
170165
  const ext2 = extname5(file3);
170032
170166
  const stageFileName = basename2(file3, ext2) + "." + stage + ext2;
170033
- const stageFile = join38(dirname20(file3), stageFileName);
170167
+ const stageFile = join39(dirname21(file3), stageFileName);
170034
170168
  const stageFileExists = await fileExist(stageFile);
170035
170169
  if (!stageFileExists) {
170036
170170
  return {
@@ -170050,7 +170184,7 @@ var readConfigWithStage = async (file3, stage) => {
170050
170184
  // src/config/load/load.ts
170051
170185
  var loadAppConfig = async (options) => {
170052
170186
  debug("Find the root directory");
170053
- const cwd2 = options.configFile ? dirname21(join39(process.cwd(), options.configFile)) : process.cwd();
170187
+ const cwd2 = options.configFile ? dirname22(join40(process.cwd(), options.configFile)) : process.cwd();
170054
170188
  const configFileOptions = options.configFile ? [basename3(options.configFile)] : ["app.json", "app.jsonc", "app.json5"];
170055
170189
  const [appFileName, root4] = await findRootDir(cwd2, configFileOptions);
170056
170190
  setRoot(root4);
@@ -170078,8 +170212,8 @@ var loadStackConfigs = async (options) => {
170078
170212
  continue;
170079
170213
  }
170080
170214
  debug("Load stack file:", color2.info(file3));
170081
- const stackConfig = await readConfigWithStage(join39(directories.root, file3), options.stage);
170082
- setLocalBasePath(join39(directories.root, dirname21(file3)));
170215
+ const stackConfig = await readConfigWithStage(join40(directories.root, file3), options.stage);
170216
+ setLocalBasePath(join40(directories.root, dirname22(file3)));
170083
170217
  const stack = await validateConfig(StackSchema, stackConfig.file, stackConfig.data);
170084
170218
  stacks.push({
170085
170219
  ...stack,
@@ -170845,12 +170979,12 @@ var auth = (program3) => {
170845
170979
 
170846
170980
  // src/cli/command/bind.ts
170847
170981
  import { readFile as readFile17 } from "fs/promises";
170848
- import { join as join40 } from "path";
170982
+ import { join as join41 } from "path";
170849
170983
  var bind = (program3) => {
170850
170984
  program3.command("bind").argument("[command...]", "The command to execute").option("--config <string...>", "List of config values that will be accessable", (v3) => v3.split(",")).option("--local", "Bind against the running local dev environment instead of the deployed app").description(`Bind your site environment variables to a command`).action(async (commands4 = [], opts) => {
170851
170985
  await layout("bind", async ({ appConfig, stackConfigs }) => {
170852
170986
  if (opts.local) {
170853
- const file3 = join40(directories.output, "local", "env.json");
170987
+ const file3 = join41(directories.output, "local", "env.json");
170854
170988
  let env4;
170855
170989
  try {
170856
170990
  env4 = JSON.parse(await readFile17(file3, "utf8"));
@@ -170958,7 +171092,6 @@ import { DynamoDBClient as DynamoDBClient2, migrate } from "@awsless/dynamodb";
170958
171092
 
170959
171093
  // src/util/deployment.ts
170960
171094
  import { userInfo } from "os";
170961
- import { CloudFrontKeyValueStoreClient as CloudFrontKeyValueStoreClient2 } from "@aws-sdk/client-cloudfront-keyvaluestore";
170962
171095
  import { DeleteFunctionCommand, GetFunctionCommand, LambdaClient as LambdaClient3 } from "@aws-sdk/client-lambda";
170963
171096
  import {
170964
171097
  define as define3,
@@ -172768,7 +172901,7 @@ var activateDeployment = async (props) => {
172768
172901
  const accountId = await getAccountId(credentials2, region);
172769
172902
  const appId = generateGlobalAppId({ accountId, region, appName: props.appConfig.name });
172770
172903
  const cloudfront = new CloudFrontClient({ credentials: credentials2, region: "us-east-1" });
172771
- const kvs = new CloudFrontKeyValueStoreClient2({ credentials: credentials2, region });
172904
+ const kvs = createKvsClient({ credentials: credentials2, region });
172772
172905
  const lambda = new LambdaClient3({ credentials: credentials2, region });
172773
172906
  const dynamo = new DynamoDBClient({ credentials: credentials2, region });
172774
172907
  const functionName = getBundleFunctionName(props.appConfig.name);
@@ -173409,12 +173542,12 @@ import { DynamoDBClient as DynamoDBClient4 } from "@awsless/dynamodb";
173409
173542
 
173410
173543
  // src/test/environment.ts
173411
173544
  import { mkdir as mkdir8, writeFile as writeFile11 } from "fs/promises";
173412
- import { join as join42 } from "path";
173545
+ import { join as join43 } from "path";
173413
173546
 
173414
173547
  // src/test/manifest.ts
173415
- import { isAbsolute as isAbsolute5, join as join41 } from "path";
173548
+ import { isAbsolute as isAbsolute5, join as join42 } from "path";
173416
173549
  var absolute = (file3) => {
173417
- return isAbsolute5(file3) ? file3 : join41(directories.root, file3);
173550
+ return isAbsolute5(file3) ? file3 : join42(directories.root, file3);
173418
173551
  };
173419
173552
  var createTestManifest = (appConfig, stackConfigs) => {
173420
173553
  const manifest = {
@@ -173505,7 +173638,7 @@ var waitForSearch2 = async (port, timeoutMs) => {
173505
173638
  };
173506
173639
  var withTestEnvironment = async (appConfig, stackConfigs, run) => {
173507
173640
  const manifest = createTestManifest(appConfig, stackConfigs);
173508
- const manifestFile = join42(directories.output, "test", "manifest.json");
173641
+ const manifestFile = join43(directories.output, "test", "manifest.json");
173509
173642
  let redis;
173510
173643
  let killSearch;
173511
173644
  let booting;
@@ -173532,7 +173665,7 @@ var withTestEnvironment = async (appConfig, stackConfigs, run) => {
173532
173665
  await redis.ping();
173533
173666
  manifest.servers.redis = { host: "127.0.0.1", port: await redis.getPort() };
173534
173667
  }
173535
- await mkdir8(join42(directories.output, "test"), { recursive: true });
173668
+ await mkdir8(join43(directories.output, "test"), { recursive: true });
173536
173669
  await writeFile11(manifestFile, JSON.stringify(manifest));
173537
173670
  })();
173538
173671
  return booting;
@@ -173549,15 +173682,15 @@ var withTestEnvironment = async (appConfig, stackConfigs, run) => {
173549
173682
  import { createHash as createHash19 } from "crypto";
173550
173683
  import { mkdir as mkdir9, readdir as readdir6, readFile as readFile18, writeFile as writeFile12 } from "fs/promises";
173551
173684
  import { availableParallelism } from "os";
173552
- import { join as join44, relative as relative10, sep as sep2 } from "path";
173685
+ import { join as join45, relative as relative10, sep as sep2 } from "path";
173553
173686
  import { inspect } from "util";
173554
173687
  var import_wildstring2 = __toESM(require_wildstring(), 1);
173555
173688
  import { parse as parse11, stringify as stringify4 } from "@awsless/json";
173556
173689
  import { generateFileHash as generateFileHash5, generateFolderHash, loadWorkspace as loadWorkspace2 } from "@awsless/ts-file-cache";
173557
173690
 
173558
173691
  // src/test/start.ts
173559
- import { dirname as dirname22, join as join43 } from "path";
173560
- import { fileURLToPath as fileURLToPath12 } from "url";
173692
+ import { dirname as dirname23, join as join44 } from "path";
173693
+ import { fileURLToPath as fileURLToPath13 } from "url";
173561
173694
  import { configDefaults } from "vitest/config";
173562
173695
  import { startVitest } from "vitest/node";
173563
173696
 
@@ -173608,7 +173741,7 @@ ${statements.join(`
173608
173741
 
173609
173742
  // src/test/start.ts
173610
173743
  var startProjectsTest = async (props) => {
173611
- const __dirname4 = dirname22(fileURLToPath12(import.meta.url));
173744
+ const __dirname4 = dirname23(fileURLToPath13(import.meta.url));
173612
173745
  const startTime = process.hrtime.bigint();
173613
173746
  process.noDeprecation = true;
173614
173747
  const nodeEnv = process.env["NODE_ENV"];
@@ -173650,7 +173783,7 @@ var startProjectsTest = async (props) => {
173650
173783
  exclude: ["**/_*", "**/_*/**", ...configDefaults.exclude],
173651
173784
  globals: true,
173652
173785
  env: project.env,
173653
- setupFiles: [join43(__dirname4, "test-global-setup.js")]
173786
+ setupFiles: [join44(__dirname4, "test-global-setup.js")]
173654
173787
  }
173655
173788
  }))
173656
173789
  }, {
@@ -173851,7 +173984,7 @@ var countTestFiles = async (dir) => {
173851
173984
  if (!entry.isFile() || !/\.(js|jsx|ts|tsx)$/.test(entry.name)) {
173852
173985
  return false;
173853
173986
  }
173854
- const relativePath2 = relative10(dir, join44(entry.parentPath, entry.name));
173987
+ const relativePath2 = relative10(dir, join45(entry.parentPath, entry.name));
173855
173988
  return relativePath2.split(sep2).every((segment) => !segment.startsWith("_"));
173856
173989
  }).length;
173857
173990
  };
@@ -173898,7 +174031,7 @@ var runTests = async (tests, stackFilters = [], testFilters = [], opts) => {
173898
174031
  if (files === 0) {
173899
174032
  continue;
173900
174033
  }
173901
- const file3 = join44(directories.test, `${test.name}.json`);
174034
+ const file3 = join45(directories.test, `${test.name}.json`);
173902
174035
  const fingerprint = fingerprints.get(dir);
173903
174036
  const cached2 = await readCachedResult(file3, fingerprint);
173904
174037
  if (cached2) {
@@ -174336,7 +174469,6 @@ var deploy = (program3) => {
174336
174469
  };
174337
174470
 
174338
174471
  // src/cli/command/deployment.ts
174339
- import { CloudFrontKeyValueStoreClient as CloudFrontKeyValueStoreClient3 } from "@aws-sdk/client-cloudfront-keyvaluestore";
174340
174472
  import { LambdaClient as LambdaClient6 } from "@aws-sdk/client-lambda";
174341
174473
  import { S3Client as S3Client4 } from "@aws-sdk/client-s3";
174342
174474
  import { DynamoDBClient as DynamoDBClient5 } from "@awsless/dynamodb";
@@ -174349,7 +174481,7 @@ var createClients = async (appConfig) => {
174349
174481
  functionName: getBundleFunctionName(appConfig.name),
174350
174482
  dynamo: new DynamoDBClient5({ credentials: credentials2, region }),
174351
174483
  lambda: new LambdaClient6({ credentials: credentials2, region }),
174352
- kvs: new CloudFrontKeyValueStoreClient3({ credentials: credentials2, region }),
174484
+ kvs: createKvsClient({ credentials: credentials2, region }),
174353
174485
  cloudfront: new CloudFrontClient({ credentials: credentials2, region: "us-east-1" }),
174354
174486
  s3: new S3Client4({ credentials: credentials2, region })
174355
174487
  };
@@ -174439,18 +174571,18 @@ var watchConfig = async (options, resolve5, reject) => {
174439
174571
  // src/dev/index.ts
174440
174572
  import { watch as watch2 } from "fs";
174441
174573
  import { mkdir as mkdir12, rm as rm13, writeFile as writeFile16 } from "fs/promises";
174442
- import { basename as basename5, dirname as dirname25, join as join51, sep as sep6 } from "path";
174574
+ import { basename as basename5, dirname as dirname26, join as join52, sep as sep6 } from "path";
174443
174575
  import { loadWorkspace as loadWorkspace3 } from "@awsless/ts-file-cache";
174444
174576
 
174445
174577
  // src/dev/context.ts
174446
- import { join as join46 } from "path";
174578
+ import { join as join47 } from "path";
174447
174579
  import { DynamoDBServer } from "@awsless/dynamodb-server";
174448
174580
 
174449
174581
  // src/dev/servers/s3.ts
174450
174582
  import { createHash as createHash20 } from "crypto";
174451
174583
  import { mkdir as mkdir10, readdir as readdir7, readFile as readFile19, rm as rm11, stat as stat6, writeFile as writeFile13 } from "fs/promises";
174452
174584
  import { createServer as createServer7 } from "http";
174453
- import { dirname as dirname23, isAbsolute as isAbsolute6, join as join45, relative as relative11, sep as sep4 } from "path";
174585
+ import { dirname as dirname24, isAbsolute as isAbsolute6, join as join46, relative as relative11, sep as sep4 } from "path";
174454
174586
  var escapeXml = (value) => {
174455
174587
  return value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&apos;");
174456
174588
  };
@@ -174515,8 +174647,8 @@ var createS3Server = (props) => {
174515
174647
  res.end(xmlError("InvalidRequest", "Missing bucket name"));
174516
174648
  return;
174517
174649
  }
174518
- const bucketDir = join45(props.root, bucket);
174519
- const file3 = join45(bucketDir, ...keyParts);
174650
+ const bucketDir = join46(props.root, bucket);
174651
+ const file3 = join46(bucketDir, ...keyParts);
174520
174652
  const escapes = (base, path6) => {
174521
174653
  const rel = relative11(base, path6);
174522
174654
  return rel.startsWith("..") || isAbsolute6(rel);
@@ -174537,7 +174669,7 @@ var createS3Server = (props) => {
174537
174669
  return;
174538
174670
  }
174539
174671
  for (const entry of entries2) {
174540
- const path6 = join45(dir, entry.name);
174672
+ const path6 = join46(dir, entry.name);
174541
174673
  if (entry.isDirectory()) {
174542
174674
  await walk2(path6);
174543
174675
  } else {
@@ -174563,7 +174695,7 @@ var createS3Server = (props) => {
174563
174695
  if (typeof encoding === "string" && encoding.includes("aws-chunked") || typeof sha === "string" && sha.startsWith("STREAMING")) {
174564
174696
  body = decodeAwsChunked(body);
174565
174697
  }
174566
- await mkdir10(dirname23(file3), { recursive: true });
174698
+ await mkdir10(dirname24(file3), { recursive: true });
174567
174699
  await writeFile13(file3, body);
174568
174700
  const eTag = createHash20("md5").update(body).digest("hex");
174569
174701
  res.writeHead(200, { etag: `"${eTag}"` });
@@ -175011,7 +175143,7 @@ var createDevContext = (props) => {
175011
175143
  const value = await props.pool.keep("store", null, async () => {
175012
175144
  const rules = [];
175013
175145
  const server = createS3Server({
175014
- root: join46(directories.output, "local", "store"),
175146
+ root: join47(directories.output, "local", "store"),
175015
175147
  region: props.appConfig.region,
175016
175148
  rules
175017
175149
  });
@@ -175141,14 +175273,14 @@ var import_ioredis4 = __toESM(require_built3(), 1);
175141
175273
  import { randomUUID as randomUUID8 } from "crypto";
175142
175274
  import { readdir as readdir8, readFile as readFile20, stat as stat7, writeFile as writeFile15 } from "fs/promises";
175143
175275
  import { createServer as createServer9 } from "http";
175144
- import { join as join48, relative as relative12, sep as sep5 } from "path";
175276
+ import { join as join49, relative as relative12, sep as sep5 } from "path";
175145
175277
  import { DynamoDBClient as DynamoDBClient6 } from "@aws-sdk/client-dynamodb";
175146
175278
  import { DynamoDBDocumentClient, ScanCommand as ScanCommand2 } from "@aws-sdk/lib-dynamodb";
175147
175279
 
175148
175280
  // src/dev/worker.ts
175149
175281
  import { writeFile as writeFile14 } from "fs/promises";
175150
175282
  import { availableParallelism as availableParallelism2 } from "os";
175151
- import { join as join47 } from "path";
175283
+ import { join as join48 } from "path";
175152
175284
  class WorkerError extends Error {
175153
175285
  name;
175154
175286
  constructor(name, message3, stack) {
@@ -175368,7 +175500,7 @@ var createBundleWorker = (props) => {
175368
175500
  throw new Error("The bundle worker never became ready.");
175369
175501
  };
175370
175502
  const startWorker = async () => {
175371
- const entry = join47(props.buildDir, "worker.mjs");
175503
+ const entry = join48(props.buildDir, "worker.mjs");
175372
175504
  const port = await findFreePort();
175373
175505
  const child = spawnDevChild("node", ["--enable-source-maps", entry], {
175374
175506
  cwd: props.buildDir,
@@ -175429,7 +175561,7 @@ var createBundleWorker = (props) => {
175429
175561
  return worker;
175430
175562
  };
175431
175563
  const doStart = async () => {
175432
- await writeFile14(join47(props.buildDir, "worker.mjs"), WORKER_ENTRY);
175564
+ await writeFile14(join48(props.buildDir, "worker.mjs"), WORKER_ENTRY);
175433
175565
  const results = await Promise.allSettled(Array.from({ length: concurrency }, () => startWorker()));
175434
175566
  const started = results.filter((result) => result.status === "fulfilled").map((result) => result.value);
175435
175567
  const failed = results.find((result) => result.status === "rejected");
@@ -176409,6 +176541,65 @@ const findRouteResource = route => {
176409
176541
  return undefined
176410
176542
  }
176411
176543
 
176544
+ // ------------------------------------------------------------------
176545
+ // Live events: every feed on a page shares one EventSource. The
176546
+ // browser only allows 6 connections per origin, so a stream per feed
176547
+ // would lock up the whole dashboard after a couple of open tabs.
176548
+
176549
+ const events = (() => {
176550
+ const handlers = new Map()
176551
+ let source
176552
+ let scheduled = false
176553
+
176554
+ const sync = () => {
176555
+ const channels = Array.from(handlers.keys()).sort().join(',')
176556
+
176557
+ if (source && source.channels === channels) {
176558
+ return
176559
+ }
176560
+
176561
+ source?.close()
176562
+ source = undefined
176563
+
176564
+ if (!channels) {
176565
+ return
176566
+ }
176567
+
176568
+ source = new EventSource('/api/events?channels=' + encodeURIComponent(channels))
176569
+ source.channels = channels
176570
+ source.onmessage = message => {
176571
+ try {
176572
+ const { channel, data } = JSON.parse(message.data)
176573
+ handlers.get(channel)?.forEach(handler => handler(data))
176574
+ } catch (_) {}
176575
+ }
176576
+ }
176577
+
176578
+ // A render pass tears feeds down & builds new ones in one go - the
176579
+ // microtask collapses that churn into a single reconnect.
176580
+ const schedule = () => {
176581
+ if (scheduled) return
176582
+ scheduled = true
176583
+ queueMicrotask(() => {
176584
+ scheduled = false
176585
+ sync()
176586
+ })
176587
+ }
176588
+
176589
+ return (channel, handler) => {
176590
+ let set = handlers.get(channel)
176591
+ if (!set) handlers.set(channel, (set = new Set()))
176592
+ set.add(handler)
176593
+ schedule()
176594
+
176595
+ return () => {
176596
+ set.delete(handler)
176597
+ if (set.size === 0) handlers.delete(channel)
176598
+ schedule()
176599
+ }
176600
+ }
176601
+ })()
176602
+
176412
176603
  // A route tag that links through to its resource, shared by the log
176413
176604
  // feeds & the activity feed.
176414
176605
  const routeTag = route => {
@@ -176430,11 +176621,7 @@ const attachLogFeed = (main, channel, route, title = 'Logs') => {
176430
176621
  const feed = $('div', { className: 'logs' }, $('p', { className: 'empty' }, 'Waiting for output...'))
176431
176622
  main.append(feed)
176432
176623
 
176433
- const source = new EventSource('/api/events?channel=' + encodeURIComponent(channel))
176434
-
176435
- source.onmessage = message => {
176436
- const data = JSON.parse(message.data)
176437
-
176624
+ return events(channel, data => {
176438
176625
  // A route filter shows only the lines of one resource, like the
176439
176626
  // function panel showing its own console output.
176440
176627
  if (route && data.route !== route) {
@@ -176470,9 +176657,7 @@ const attachLogFeed = (main, channel, route, title = 'Logs') => {
176470
176657
  }
176471
176658
 
176472
176659
  feed.scrollTop = feed.scrollHeight
176473
- }
176474
-
176475
- return () => source.close()
176660
+ })
176476
176661
  }
176477
176662
 
176478
176663
  // ------------------------------------------------------------------
@@ -176489,11 +176674,7 @@ const showEventsFeed = channel => {
176489
176674
  aside.hidden = false
176490
176675
  feed.innerHTML = '<p class="empty">Waiting for events...</p>'
176491
176676
 
176492
- const source = new EventSource('/api/events?channel=' + encodeURIComponent(channel))
176493
-
176494
- source.onmessage = message => {
176495
- const data = JSON.parse(message.data)
176496
-
176677
+ const unsubscribe = events(channel, data => {
176497
176678
  feed.querySelector('.empty')?.remove()
176498
176679
  feed.prepend($('div', { className: 'event' }, [
176499
176680
  $('div', { className: 'head' }, [
@@ -176510,10 +176691,10 @@ const showEventsFeed = channel => {
176510
176691
  while (feed.children.length > 25) {
176511
176692
  feed.lastChild.remove()
176512
176693
  }
176513
- }
176694
+ })
176514
176695
 
176515
176696
  return () => {
176516
- source.close()
176697
+ unsubscribe()
176517
176698
  aside.hidden = true
176518
176699
  document.body.classList.remove('with-events')
176519
176700
  }
@@ -177377,12 +177558,7 @@ const renderHome = main => {
177377
177558
 
177378
177559
  for (const entry of state.health ?? []) renderChip(entry)
177379
177560
 
177380
- const healthSource = new EventSource('/api/events?channel=health')
177381
- healthSource.onmessage = message => {
177382
- try {
177383
- renderChip(JSON.parse(message.data))
177384
- } catch (_) {}
177385
- }
177561
+ const unsubHealth = events('health', renderChip)
177386
177562
 
177387
177563
  if ((state.health ?? []).length > 0) {
177388
177564
  main.append(chips)
@@ -177445,12 +177621,7 @@ const renderHome = main => {
177445
177621
  }
177446
177622
  }
177447
177623
 
177448
- const problemSource = new EventSource('/api/events?channel=problems')
177449
- problemSource.onmessage = message => {
177450
- try {
177451
- problemRow(JSON.parse(message.data))
177452
- } catch (_) {}
177453
- }
177624
+ const unsubProblems = events('problems', problemRow)
177454
177625
 
177455
177626
  // ----------------------------------------------------------------
177456
177627
  // Activity: every dispatch through the bundle, newest first.
@@ -177600,12 +177771,7 @@ const renderHome = main => {
177600
177771
  activityFeed.scrollTop = activityFeed.scrollHeight
177601
177772
  }
177602
177773
 
177603
- const activitySource = new EventSource('/api/events?channel=activity')
177604
- activitySource.onmessage = message => {
177605
- try {
177606
- activityRow(JSON.parse(message.data))
177607
- } catch (_) {}
177608
- }
177774
+ const unsubActivity = events('activity', activityRow)
177609
177775
 
177610
177776
  // ----------------------------------------------------------------
177611
177777
  // Logs: the handlers' own console output, live - the full feed
@@ -177616,9 +177782,9 @@ const renderHome = main => {
177616
177782
  cleanupPanel = () => {
177617
177783
  clearInterval(uptimeTimer)
177618
177784
  closeTrace()
177619
- healthSource.close()
177620
- problemSource.close()
177621
- activitySource.close()
177785
+ unsubHealth()
177786
+ unsubProblems()
177787
+ unsubActivity()
177622
177788
  logsFeed?.()
177623
177789
  }
177624
177790
  }
@@ -177848,7 +178014,7 @@ var createDashboardServer = (props) => {
177848
178014
  return;
177849
178015
  }
177850
178016
  for (const entry of entries2) {
177851
- const path6 = join48(dir, entry.name);
178017
+ const path6 = join49(dir, entry.name);
177852
178018
  if (entry.isDirectory()) {
177853
178019
  await walk2(path6);
177854
178020
  } else {
@@ -177934,7 +178100,7 @@ var createDashboardServer = (props) => {
177934
178100
  }
177935
178101
  return { status: 404, body: JSON.stringify({ error: `Unknown dashboard path: ${url2.pathname}` }) };
177936
178102
  };
177937
- const streamEvents = (req, res, channel) => {
178103
+ const streamEvents = (req, res, channels) => {
177938
178104
  res.writeHead(200, {
177939
178105
  "content-type": "text/event-stream",
177940
178106
  "cache-control": "no-cache",
@@ -177943,17 +178109,19 @@ var createDashboardServer = (props) => {
177943
178109
  res.write(`:connected
177944
178110
 
177945
178111
  `);
177946
- const unsubscribe = props.events.subscribe(channel, (data) => {
177947
- res.write(`data: ${JSON.stringify(data)}
178112
+ const unsubscribes = channels.map((channel) => props.events.subscribe(channel, (data) => {
178113
+ res.write(`data: ${JSON.stringify({ channel, data })}
177948
178114
 
177949
178115
  `);
177950
- });
178116
+ }));
177951
178117
  const heartbeat = setInterval(() => res.write(`:heartbeat
177952
178118
 
177953
178119
  `), 15000);
177954
178120
  req.on("close", () => {
177955
178121
  clearInterval(heartbeat);
177956
- unsubscribe();
178122
+ for (const unsubscribe of unsubscribes) {
178123
+ unsubscribe();
178124
+ }
177957
178125
  });
177958
178126
  };
177959
178127
  return {
@@ -177964,7 +178132,13 @@ var createDashboardServer = (props) => {
177964
178132
  server = createServer9((req, res) => {
177965
178133
  const url2 = new URL(req.url ?? "/", "http://localhost");
177966
178134
  if (url2.pathname === "/api/events") {
177967
- streamEvents(req, res, url2.searchParams.get("channel") ?? "");
178135
+ const channels = (url2.searchParams.get("channels") ?? "").split(",").filter(Boolean);
178136
+ if (channels.length === 0) {
178137
+ res.writeHead(204);
178138
+ res.end();
178139
+ return;
178140
+ }
178141
+ streamEvents(req, res, channels);
177968
178142
  return;
177969
178143
  }
177970
178144
  const started = performance.now();
@@ -178057,15 +178231,15 @@ var createFailureReporter = (props) => {
178057
178231
  // src/dev/sdk.ts
178058
178232
  import { readdir as readdir9, readFile as readFile21, mkdir as mkdir11, rm as rm12, stat as stat8, symlink } from "fs/promises";
178059
178233
  import { createRequire } from "module";
178060
- import { dirname as dirname24, join as join49 } from "path";
178234
+ import { dirname as dirname25, join as join50 } from "path";
178061
178235
  var linkSdkPackages = async (workspace, buildDir, onWarn) => {
178062
- const filesDir = join49(buildDir, "files");
178236
+ const filesDir = join50(buildDir, "files");
178063
178237
  const packages = new Set;
178064
178238
  for (const file3 of await readdir9(filesDir)) {
178065
178239
  if (!file3.endsWith(".mjs")) {
178066
178240
  continue;
178067
178241
  }
178068
- const code = await readFile21(join49(filesDir, file3), "utf8");
178242
+ const code = await readFile21(join50(filesDir, file3), "utf8");
178069
178243
  for (const match3 of code.matchAll(/(?:from\s*|import\()\s*["'](@aws-sdk\/[a-z0-9-]+|sharp)["']/g)) {
178070
178244
  packages.add(match3[1]);
178071
178245
  }
@@ -178073,7 +178247,7 @@ var linkSdkPackages = async (workspace, buildDir, onWarn) => {
178073
178247
  const ownRequire = createRequire(import.meta.url);
178074
178248
  const isProjectDep = async (name) => {
178075
178249
  try {
178076
- await stat8(join49(directories.root, "node_modules", name, "package.json"));
178250
+ await stat8(join50(directories.root, "node_modules", name, "package.json"));
178077
178251
  return true;
178078
178252
  } catch {
178079
178253
  return false;
@@ -178082,19 +178256,19 @@ var linkSdkPackages = async (workspace, buildDir, onWarn) => {
178082
178256
  const resolveFromDependents = async (name) => {
178083
178257
  const roots = Object.values(workspace.packages).flatMap((pkg) => [
178084
178258
  pkg.path,
178085
- ...Object.entries(pkg.dependencies).map(([dependency, info2]) => info2.type === "workspace" ? workspace.packages[info2.link]?.path : join49(pkg.path, "node_modules", dependency))
178259
+ ...Object.entries(pkg.dependencies).map(([dependency, info2]) => info2.type === "workspace" ? workspace.packages[info2.link]?.path : join50(pkg.path, "node_modules", dependency))
178086
178260
  ]);
178087
178261
  for (const root4 of roots.filter((root5) => typeof root5 === "string").toSorted()) {
178088
- const path6 = join49(root4, "node_modules", name);
178262
+ const path6 = join50(root4, "node_modules", name);
178089
178263
  try {
178090
- await stat8(join49(path6, "package.json"));
178264
+ await stat8(join50(path6, "package.json"));
178091
178265
  return path6;
178092
178266
  } catch {}
178093
178267
  }
178094
178268
  return;
178095
178269
  };
178096
178270
  for (const name of packages) {
178097
- const target2 = join49(buildDir, "node_modules", name);
178271
+ const target2 = join50(buildDir, "node_modules", name);
178098
178272
  try {
178099
178273
  if (await isProjectDep(name)) {
178100
178274
  await rm12(target2, { recursive: true, force: true });
@@ -178104,16 +178278,16 @@ var linkSdkPackages = async (workspace, buildDir, onWarn) => {
178104
178278
  let source = await resolveFromDependents(name);
178105
178279
  if (!source) {
178106
178280
  try {
178107
- source = dirname24(ownRequire.resolve(`${name}/package.json`));
178281
+ source = dirname25(ownRequire.resolve(`${name}/package.json`));
178108
178282
  } catch {
178109
178283
  onWarn?.(`The bundle imports "${name}", which is neither a project dependency nor shipped with the cli. Add it to your project dependencies.`);
178110
178284
  continue;
178111
178285
  }
178112
178286
  }
178113
- await mkdir11(dirname24(target2), { recursive: true });
178287
+ await mkdir11(dirname25(target2), { recursive: true });
178114
178288
  await rm12(target2, { recursive: true, force: true });
178115
178289
  await symlink(source, target2, "dir");
178116
- await stat8(join49(target2, "package.json"));
178290
+ await stat8(join50(target2, "package.json"));
178117
178291
  debug(`Sdk link ${name}: ${source}`);
178118
178292
  } catch (error52) {
178119
178293
  onWarn?.(`Linking the "${name}" sdk package failed: ${error52 instanceof Error ? error52.message : String(error52)}`);
@@ -178122,10 +178296,10 @@ var linkSdkPackages = async (workspace, buildDir, onWarn) => {
178122
178296
  };
178123
178297
 
178124
178298
  // src/dev/seed.ts
178125
- import { spawn as spawn4 } from "child_process";
178126
- import { isAbsolute as isAbsolute7, join as join50 } from "path";
178299
+ import { spawn as spawn5 } from "child_process";
178300
+ import { isAbsolute as isAbsolute7, join as join51 } from "path";
178127
178301
  var createSeedRunner = (props) => {
178128
- const file3 = props.seed && (isAbsolute7(props.seed) ? props.seed : join50(directories.root, props.seed));
178302
+ const file3 = props.seed && (isAbsolute7(props.seed) ? props.seed : join51(directories.root, props.seed));
178129
178303
  let running;
178130
178304
  const run = () => {
178131
178305
  running ??= (async () => {
@@ -178135,7 +178309,7 @@ var createSeedRunner = (props) => {
178135
178309
  }
178136
178310
  debug(`Seeding from ${props.seed}`);
178137
178311
  await new Promise((resolve5, reject) => {
178138
- const child = spawn4("bun", [file3], {
178312
+ const child = spawn5("bun", [file3], {
178139
178313
  cwd: directories.root,
178140
178314
  stdio: ["ignore", "pipe", "pipe"],
178141
178315
  env: { ...process.env, ...props.env }
@@ -178301,7 +178475,7 @@ var startDev = async (props) => {
178301
178475
  dev: true
178302
178476
  });
178303
178477
  ready2();
178304
- await mkdir12(join51(directories.output, "local"), { recursive: true });
178478
+ await mkdir12(join52(directories.output, "local"), { recursive: true });
178305
178479
  await writeFile16(watchdogPath(), WATCHDOG_SOURCE);
178306
178480
  const routerPorts = {};
178307
178481
  Object.keys(appConfig.router ?? {}).forEach((id, index) => {
@@ -178379,7 +178553,7 @@ var startDev = async (props) => {
178379
178553
  for (const [id, port] of Object.entries(routerPorts)) {
178380
178554
  env4[`ROUTER_${constantCase(id)}_ENDPOINT`] = `localhost:${port}`;
178381
178555
  }
178382
- await writeFile16(join51(directories.output, "local", "env.json"), JSON.stringify(env4, null, "\t") + `
178556
+ await writeFile16(join52(directories.output, "local", "env.json"), JSON.stringify(env4, null, "\t") + `
178383
178557
  `);
178384
178558
  return { env: env4, lambda: lambda2 };
178385
178559
  });
@@ -178633,8 +178807,8 @@ var startDev = async (props) => {
178633
178807
  resources: dev.resources,
178634
178808
  routes: dev.routes,
178635
178809
  env: env3,
178636
- storeRoot: join51(directories.output, "local", "store"),
178637
- configFile: join51(directories.output, "local", "config.json"),
178810
+ storeRoot: join52(directories.output, "local", "store"),
178811
+ configFile: join52(directories.output, "local", "config.json"),
178638
178812
  getEmails: () => props.pool.peek("shim:ses-email")?.server.list() ?? [],
178639
178813
  getAlerts: () => props.pool.peek("shim:sns")?.alerts ?? [],
178640
178814
  getSession: () => ({ startedAt, workers: worker.size() }),
@@ -178685,8 +178859,8 @@ var startDev = async (props) => {
178685
178859
  };
178686
178860
  const restartWatchers = [];
178687
178861
  for (const path6 of dev.restartPaths) {
178688
- await mkdir12(dirname25(path6), { recursive: true });
178689
- restartWatchers.push(watch2(dirname25(path6), (_event, filename) => {
178862
+ await mkdir12(dirname26(path6), { recursive: true });
178863
+ restartWatchers.push(watch2(dirname26(path6), (_event, filename) => {
178690
178864
  if (filename === basename5(path6)) {
178691
178865
  restartWorker();
178692
178866
  }
@@ -178697,7 +178871,7 @@ var startDev = async (props) => {
178697
178871
  routerPorts,
178698
178872
  async stop() {
178699
178873
  stopping = true;
178700
- await rm13(join51(directories.output, "local", "env.json"), { force: true });
178874
+ await rm13(join52(directories.output, "local", "env.json"), { force: true });
178701
178875
  clearTimeout(rebuildTimer);
178702
178876
  watcher.close();
178703
178877
  for (const restartWatcher of restartWatchers) {
@@ -178765,7 +178939,7 @@ var createServerPool = () => {
178765
178939
 
178766
178940
  // src/type-gen/generate.ts
178767
178941
  import { mkdir as mkdir13, writeFile as writeFile17 } from "fs/promises";
178768
- import { dirname as dirname26, join as join52, relative as relative13 } from "path";
178942
+ import { dirname as dirname27, join as join53, relative as relative13 } from "path";
178769
178943
  var generateTypes = async (props) => {
178770
178944
  const files = [];
178771
178945
  await Promise.all(features.map(async (feature) => {
@@ -178773,12 +178947,12 @@ var generateTypes = async (props) => {
178773
178947
  ...props,
178774
178948
  async write(file3, data, include = false) {
178775
178949
  const code = data?.toString("utf8");
178776
- const path6 = join52(directories.types, file3);
178950
+ const path6 = join53(directories.types, file3);
178777
178951
  if (code) {
178778
178952
  if (include) {
178779
178953
  files.push(relative13(directories.root, path6));
178780
178954
  }
178781
- await mkdir13(dirname26(path6), { recursive: true });
178955
+ await mkdir13(dirname27(path6), { recursive: true });
178782
178956
  await writeFile17(path6, code);
178783
178957
  }
178784
178958
  }
@@ -178787,7 +178961,7 @@ var generateTypes = async (props) => {
178787
178961
  if (files.length) {
178788
178962
  const code = files.map((file3) => `/// <reference path='${file3}' />`).join(`
178789
178963
  `);
178790
- await writeFile17(join52(directories.root, `awsless.d.ts`), code);
178964
+ await writeFile17(join53(directories.root, `awsless.d.ts`), code);
178791
178965
  }
178792
178966
  };
178793
178967
 
@@ -179692,7 +179866,7 @@ var import_config33 = __toESM(require_config(), 1);
179692
179866
  var import_endpoints7 = __toESM(require_endpoints(), 1);
179693
179867
  var import_protocols11 = __toESM(require_protocols(), 1);
179694
179868
  var import_retry6 = __toESM(require_retry2(), 1);
179695
- var import_schema68 = __toESM(require_schema(), 1);
179869
+ var import_schema69 = __toESM(require_schema(), 1);
179696
179870
 
179697
179871
  // ../../node_modules/.pnpm/@aws-sdk+client-iot-data-plane@3.1113.0/node_modules/@aws-sdk/client-iot-data-plane/dist-es/auth/httpAuthSchemeProvider.js
179698
179872
  var import_httpAuthSchemes4 = __toESM(require_httpAuthSchemes(), 1);
@@ -179990,7 +180164,7 @@ var defaultEndpointResolver3 = (endpointParams, context = {}) => {
179990
180164
  import_endpoints6.customEndpointFunctions.aws = import_client26.awsEndpointFunctions;
179991
180165
 
179992
180166
  // ../../node_modules/.pnpm/@aws-sdk+client-iot-data-plane@3.1113.0/node_modules/@aws-sdk/client-iot-data-plane/dist-es/schemas/schemas_0.js
179993
- var import_schema67 = __toESM(require_schema(), 1);
180167
+ var import_schema68 = __toESM(require_schema(), 1);
179994
180168
 
179995
180169
  // ../../node_modules/.pnpm/@aws-sdk+client-iot-data-plane@3.1113.0/node_modules/@aws-sdk/client-iot-data-plane/dist-es/models/IoTDataPlaneServiceException.js
179996
180170
  var import_client27 = __toESM(require_client2(), 1);
@@ -180263,10 +180437,10 @@ var _xamcd = "x-amz-mqtt5-correlation-data";
180263
180437
  var _xampfi = "x-amz-mqtt5-payload-format-indicator";
180264
180438
  var _xamup = "x-amz-mqtt5-user-properties";
180265
180439
  var n03 = "com.amazonaws.iotdataplane";
180266
- var _s_registry3 = import_schema67.TypeRegistry.for(_s4);
180440
+ var _s_registry3 = import_schema68.TypeRegistry.for(_s4);
180267
180441
  var IoTDataPlaneServiceException$ = [-3, _s4, "IoTDataPlaneServiceException", 0, [], []];
180268
180442
  _s_registry3.registerError(IoTDataPlaneServiceException$, IoTDataPlaneServiceException);
180269
- var n0_registry3 = import_schema67.TypeRegistry.for(n03);
180443
+ var n0_registry3 = import_schema68.TypeRegistry.for(n03);
180270
180444
  var ConflictException$ = [
180271
180445
  -3,
180272
180446
  n03,
@@ -180807,7 +180981,7 @@ class IoTDataPlaneClient extends import_client34.Client {
180807
180981
  const _config_7 = resolveHttpAuthSchemeConfig3(_config_6);
180808
180982
  const _config_8 = resolveRuntimeExtensions3(_config_7, configuration?.extensions || []);
180809
180983
  this.config = _config_8;
180810
- this.middlewareStack.use(import_schema68.getSchemaSerdePlugin(this.config));
180984
+ this.middlewareStack.use(import_schema69.getSchemaSerdePlugin(this.config));
180811
180985
  this.middlewareStack.use(import_client33.getUserAgentPlugin(this.config));
180812
180986
  this.middlewareStack.use(import_retry6.getRetryPlugin(this.config));
180813
180987
  this.middlewareStack.use(import_protocols11.getContentLengthPlugin(this.config));
@@ -180934,7 +181108,7 @@ var sinon;
180934
181108
  const arraySlice = arrayProto.slice;
180935
181109
  const concat = arrayProto.concat;
180936
181110
  const forEach = arrayProto.forEach;
180937
- const join53 = arrayProto.join;
181111
+ const join54 = arrayProto.join;
180938
181112
  const splice = arrayProto.splice;
180939
181113
  function applyDefaults(obj, defaults2) {
180940
181114
  for (const key of Object.keys(defaults2)) {
@@ -180970,7 +181144,7 @@ var sinon;
180970
181144
  let actual = "";
180971
181145
  if (!calledInOrder(arguments)) {
180972
181146
  try {
180973
- expected = join53(arguments, ", ");
181147
+ expected = join54(arguments, ", ");
180974
181148
  const calls = arraySlice(arguments);
180975
181149
  let i5 = calls.length;
180976
181150
  while (i5) {
@@ -180978,7 +181152,7 @@ var sinon;
180978
181152
  splice(calls, i5, 1);
180979
181153
  }
180980
181154
  }
180981
- actual = join53(orderByFirstCall(calls), ", ");
181155
+ actual = join54(orderByFirstCall(calls), ", ");
180982
181156
  } catch (e5) {}
180983
181157
  failAssertion(this, `expected ${expected} to be called in order but were called as ${actual}`);
180984
181158
  } else {
@@ -181023,7 +181197,7 @@ var sinon;
181023
181197
  ` expected = ${inspect2(expectation)}`,
181024
181198
  ` actual = ${inspect2(actual)}`
181025
181199
  ];
181026
- failAssertion(this, join53(formatted, `
181200
+ failAssertion(this, join54(formatted, `
181027
181201
  `));
181028
181202
  }
181029
181203
  }
@@ -181128,7 +181302,7 @@ var sinon;
181128
181302
  const valueToString = require2("@sinonjs/commons").valueToString;
181129
181303
  const exportAsyncBehaviors = require2("./util/core/export-async-behaviors");
181130
181304
  const concat = arrayProto.concat;
181131
- const join53 = arrayProto.join;
181305
+ const join54 = arrayProto.join;
181132
181306
  const reverse = arrayProto.reverse;
181133
181307
  const slice = arrayProto.slice;
181134
181308
  const useLeftMostCallback = -1;
@@ -181165,7 +181339,7 @@ var sinon;
181165
181339
  msg = `${functionName(behavior.stub)} expected to yield, but no callback was passed.`;
181166
181340
  }
181167
181341
  if (args.length > 0) {
181168
- msg += ` Received [${join53(args, ", ")}]`;
181342
+ msg += ` Received [${join54(args, ", ")}]`;
181169
181343
  }
181170
181344
  return msg;
181171
181345
  }
@@ -181975,7 +182149,7 @@ var sinon;
181975
182149
  const filter2 = arrayProto.filter;
181976
182150
  const forEach = arrayProto.forEach;
181977
182151
  const every = arrayProto.every;
181978
- const join53 = arrayProto.join;
182152
+ const join54 = arrayProto.join;
181979
182153
  const push = arrayProto.push;
181980
182154
  const slice = arrayProto.slice;
181981
182155
  const unshift = arrayProto.unshift;
@@ -182052,10 +182226,10 @@ var sinon;
182052
182226
  });
182053
182227
  this.restore();
182054
182228
  if (messages.length > 0) {
182055
- mockExpectation.fail(join53(concat(messages, met), `
182229
+ mockExpectation.fail(join54(concat(messages, met), `
182056
182230
  `));
182057
182231
  } else if (met.length > 0) {
182058
- mockExpectation.pass(join53(concat(messages, met), `
182232
+ mockExpectation.pass(join54(concat(messages, met), `
182059
182233
  `));
182060
182234
  }
182061
182235
  return true;
@@ -182108,7 +182282,7 @@ var sinon;
182108
182282
  args,
182109
182283
  stack: err.stack
182110
182284
  })}`);
182111
- mockExpectation.fail(join53(messages, `
182285
+ mockExpectation.fail(join54(messages, `
182112
182286
  `));
182113
182287
  }
182114
182288
  });
@@ -182215,14 +182389,14 @@ var sinon;
182215
182389
  const valueToString = require2("@sinonjs/commons").valueToString;
182216
182390
  const concat = arrayProto.concat;
182217
182391
  const filter2 = arrayProto.filter;
182218
- const join53 = arrayProto.join;
182392
+ const join54 = arrayProto.join;
182219
182393
  const map2 = arrayProto.map;
182220
182394
  const reduce = arrayProto.reduce;
182221
182395
  const slice = arrayProto.slice;
182222
182396
  function throwYieldError(proxy, text2, args) {
182223
182397
  let msg = functionName(proxy) + text2;
182224
182398
  if (args.length) {
182225
- msg += ` Received [${join53(slice(args), ", ")}]`;
182399
+ msg += ` Received [${join54(slice(args), ", ")}]`;
182226
182400
  }
182227
182401
  throw new Error(msg);
182228
182402
  }
@@ -182344,7 +182518,7 @@ var sinon;
182344
182518
  const formattedArgs = map2(this.args, function(arg) {
182345
182519
  return inspect2(arg);
182346
182520
  });
182347
- callStr = `${callStr + join53(formattedArgs, ", ")})`;
182521
+ callStr = `${callStr + join54(formattedArgs, ", ")})`;
182348
182522
  if (typeof this.returnValue !== "undefined") {
182349
182523
  callStr += ` => ${inspect2(this.returnValue)}`;
182350
182524
  }
@@ -183075,7 +183249,7 @@ var sinon;
183075
183249
  const timesInWords = require2("./util/core/times-in-words");
183076
183250
  const inspect2 = require2("util").inspect;
183077
183251
  const jsDiff = require2("diff");
183078
- const join53 = arrayProto.join;
183252
+ const join54 = arrayProto.join;
183079
183253
  const map2 = arrayProto.map;
183080
183254
  const push = arrayProto.push;
183081
183255
  const slice = arrayProto.slice;
@@ -183103,7 +183277,7 @@ var sinon;
183103
183277
  }
183104
183278
  return text2;
183105
183279
  });
183106
- return join53(objects, "");
183280
+ return join54(objects, "");
183107
183281
  }
183108
183282
  function quoteStringValue(value) {
183109
183283
  if (typeof value === "string") {
@@ -183161,7 +183335,7 @@ ${stringifiedCall}`;
183161
183335
  push(calls, stringifiedCall);
183162
183336
  }
183163
183337
  return calls.length > 0 ? `
183164
- ${join53(calls, `
183338
+ ${join54(calls, `
183165
183339
  `)}` : "";
183166
183340
  },
183167
183341
  t: function(spyInstance) {
@@ -183169,10 +183343,10 @@ ${join53(calls, `
183169
183343
  for (let i5 = 0, l4 = spyInstance.callCount;i5 < l4; ++i5) {
183170
183344
  push(objects, inspect2(spyInstance.thisValues[i5]));
183171
183345
  }
183172
- return join53(objects, ", ");
183346
+ return join54(objects, ", ");
183173
183347
  },
183174
183348
  "*": function(spyInstance, args) {
183175
- return join53(map2(args, function(arg) {
183349
+ return join54(map2(args, function(arg) {
183176
183350
  return inspect2(arg);
183177
183351
  }), ", ");
183178
183352
  }
@@ -183504,7 +183678,7 @@ ${join53(calls, `
183504
183678
  }, { "@sinonjs/commons": 48 }], 26: [function(require2, module, exports) {
183505
183679
  const arrayProto = require2("@sinonjs/commons").prototypes.array;
183506
183680
  const hasOwnProperty2 = require2("@sinonjs/commons").prototypes.object.hasOwnProperty;
183507
- const join53 = arrayProto.join;
183681
+ const join54 = arrayProto.join;
183508
183682
  const push = arrayProto.push;
183509
183683
  const hasDontEnumBug = function() {
183510
183684
  const obj = {
@@ -183545,7 +183719,7 @@ ${join53(calls, `
183545
183719
  push(result, obj[prop]());
183546
183720
  }
183547
183721
  }
183548
- return join53(result, "") !== "0123456789";
183722
+ return join54(result, "") !== "0123456789";
183549
183723
  }();
183550
183724
  function extendCommon(target2, sources, doCopy) {
183551
183725
  let source, i5, prop;
@@ -185610,7 +185784,7 @@ ${job.error.stack.split(`
185610
185784
  module.exports = matcherPrototype;
185611
185785
  }, { "../create-matcher": 63 }], 71: [function(require2, module, exports) {
185612
185786
  var functionName = require2("@sinonjs/commons").functionName;
185613
- var join53 = require2("@sinonjs/commons").prototypes.array.join;
185787
+ var join54 = require2("@sinonjs/commons").prototypes.array.join;
185614
185788
  var map2 = require2("@sinonjs/commons").prototypes.array.map;
185615
185789
  var stringIndexOf = require2("@sinonjs/commons").prototypes.string.indexOf;
185616
185790
  var valueToString = require2("@sinonjs/commons").valueToString;
@@ -185641,7 +185815,7 @@ ${job.error.stack.split(`
185641
185815
  m4.test = function(actual) {
185642
185816
  return matchObject(actual, expectation, match3);
185643
185817
  };
185644
- m4.message = `match(${join53(array3, ", ")})`;
185818
+ m4.message = `match(${join54(array3, ", ")})`;
185645
185819
  return m4;
185646
185820
  },
185647
185821
  regexp: function(m4, expectation) {
@@ -188965,7 +189139,7 @@ ${job.error.stack.split(`
188965
189139
  tokenize: function tokenize(value) {
188966
189140
  return value.split("");
188967
189141
  },
188968
- join: function join53(chars) {
189142
+ join: function join54(chars) {
188969
189143
  return chars.join("");
188970
189144
  }
188971
189145
  };