@rharkor/caching-for-turbo 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -48,6 +48,7 @@ const cacheTwirpClient = __importStar(__nccwpck_require__(96819));
48
48
  const config_1 = __nccwpck_require__(17606);
49
49
  const tar_1 = __nccwpck_require__(95321);
50
50
  const constants_1 = __nccwpck_require__(58287);
51
+ const http_client_1 = __nccwpck_require__(54844);
51
52
  class ValidationError extends Error {
52
53
  constructor(message) {
53
54
  super(message);
@@ -84,7 +85,17 @@ function checkKey(key) {
84
85
  * @returns boolean return true if Actions cache service feature is available, otherwise false
85
86
  */
86
87
  function isFeatureAvailable() {
87
- return !!process.env['ACTIONS_CACHE_URL'];
88
+ const cacheServiceVersion = (0, config_1.getCacheServiceVersion)();
89
+ // Check availability based on cache service version
90
+ switch (cacheServiceVersion) {
91
+ case 'v2':
92
+ // For v2, we need ACTIONS_RESULTS_URL
93
+ return !!process.env['ACTIONS_RESULTS_URL'];
94
+ case 'v1':
95
+ default:
96
+ // For v1, we only need ACTIONS_CACHE_URL
97
+ return !!process.env['ACTIONS_CACHE_URL'];
98
+ }
88
99
  }
89
100
  exports.isFeatureAvailable = isFeatureAvailable;
90
101
  /**
@@ -169,8 +180,16 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
169
180
  throw error;
170
181
  }
171
182
  else {
172
- // Supress all non-validation cache related errors because caching should be optional
173
- core.warning(`Failed to restore: ${error.message}`);
183
+ // warn on cache restore failure and continue build
184
+ // Log server errors (5xx) as errors, all other errors as warnings
185
+ if (typedError instanceof http_client_1.HttpClientError &&
186
+ typeof typedError.statusCode === 'number' &&
187
+ typedError.statusCode >= 500) {
188
+ core.error(`Failed to restore: ${error.message}`);
189
+ }
190
+ else {
191
+ core.warning(`Failed to restore: ${error.message}`);
192
+ }
174
193
  }
175
194
  }
176
195
  finally {
@@ -223,7 +242,13 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
223
242
  core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
224
243
  return undefined;
225
244
  }
226
- core.info(`Cache hit for: ${request.key}`);
245
+ const isRestoreKeyMatch = request.key !== response.matchedKey;
246
+ if (isRestoreKeyMatch) {
247
+ core.info(`Cache hit for restore-key: ${response.matchedKey}`);
248
+ }
249
+ else {
250
+ core.info(`Cache hit for: ${response.matchedKey}`);
251
+ }
227
252
  if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
228
253
  core.info('Lookup only - skipping download');
229
254
  return response.matchedKey;
@@ -248,7 +273,15 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
248
273
  }
249
274
  else {
250
275
  // Supress all non-validation cache related errors because caching should be optional
251
- core.warning(`Failed to restore: ${error.message}`);
276
+ // Log server errors (5xx) as errors, all other errors as warnings
277
+ if (typedError instanceof http_client_1.HttpClientError &&
278
+ typeof typedError.statusCode === 'number' &&
279
+ typedError.statusCode >= 500) {
280
+ core.error(`Failed to restore: ${error.message}`);
281
+ }
282
+ else {
283
+ core.warning(`Failed to restore: ${error.message}`);
284
+ }
252
285
  }
253
286
  }
254
287
  finally {
@@ -351,7 +384,15 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) {
351
384
  core.info(`Failed to save: ${typedError.message}`);
352
385
  }
353
386
  else {
354
- core.warning(`Failed to save: ${typedError.message}`);
387
+ // Log server errors (5xx) as errors, all other errors as warnings
388
+ if (typedError instanceof http_client_1.HttpClientError &&
389
+ typeof typedError.statusCode === 'number' &&
390
+ typedError.statusCode >= 500) {
391
+ core.error(`Failed to save: ${typedError.message}`);
392
+ }
393
+ else {
394
+ core.warning(`Failed to save: ${typedError.message}`);
395
+ }
355
396
  }
356
397
  }
357
398
  finally {
@@ -447,7 +488,15 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
447
488
  core.info(`Failed to save: ${typedError.message}`);
448
489
  }
449
490
  else {
450
- core.warning(`Failed to save: ${typedError.message}`);
491
+ // Log server errors (5xx) as errors, all other errors as warnings
492
+ if (typedError instanceof http_client_1.HttpClientError &&
493
+ typeof typedError.statusCode === 'number' &&
494
+ typedError.statusCode >= 500) {
495
+ core.error(`Failed to save: ${typedError.message}`);
496
+ }
497
+ else {
498
+ core.warning(`Failed to save: ${typedError.message}`);
499
+ }
451
500
  }
452
501
  }
453
502
  finally {
@@ -25070,7 +25119,6 @@ var JsonShapeDeserializer = class extends SerdeContextConfig {
25070
25119
  // src/submodules/protocols/json/JsonShapeSerializer.ts
25071
25120
  var import_schema2 = __nccwpck_require__(26890);
25072
25121
  var import_serde4 = __nccwpck_require__(92430);
25073
- var import_serde5 = __nccwpck_require__(92430);
25074
25122
 
25075
25123
  // src/submodules/protocols/json/jsonReplacer.ts
25076
25124
  var import_serde3 = __nccwpck_require__(92430);
@@ -25099,7 +25147,7 @@ var JsonReplacer = class {
25099
25147
  this.stage = 1;
25100
25148
  return (key, value) => {
25101
25149
  if (value instanceof import_serde3.NumericValue) {
25102
- const v = `${NUMERIC_CONTROL_CHAR + +"nv" + this.counter++}_` + value.string;
25150
+ const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string;
25103
25151
  this.values.set(`"${v}"`, value.string);
25104
25152
  return v;
25105
25153
  }
@@ -25221,11 +25269,16 @@ var JsonShapeSerializer = class extends SerdeContextConfig {
25221
25269
  return String(value);
25222
25270
  }
25223
25271
  }
25224
- const mediaType = ns.getMergedTraits().mediaType;
25225
- if (ns.isStringSchema() && typeof value === "string" && mediaType) {
25226
- const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
25227
- if (isJson) {
25228
- return import_serde5.LazyJsonString.from(value);
25272
+ if (ns.isStringSchema()) {
25273
+ if (typeof value === "undefined" && ns.isIdempotencyToken()) {
25274
+ return (0, import_serde4.generateIdempotencyToken)();
25275
+ }
25276
+ const mediaType = ns.getMergedTraits().mediaType;
25277
+ if (typeof value === "string" && mediaType) {
25278
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
25279
+ if (isJson) {
25280
+ return import_serde4.LazyJsonString.from(value);
25281
+ }
25229
25282
  }
25230
25283
  }
25231
25284
  return value;
@@ -25260,11 +25313,13 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol {
25260
25313
  }
25261
25314
  serializer;
25262
25315
  deserializer;
25316
+ serviceTarget;
25263
25317
  codec;
25264
- constructor({ defaultNamespace }) {
25318
+ constructor({ defaultNamespace, serviceTarget }) {
25265
25319
  super({
25266
25320
  defaultNamespace
25267
25321
  });
25322
+ this.serviceTarget = serviceTarget;
25268
25323
  this.codec = new JsonCodec({
25269
25324
  timestampFormat: {
25270
25325
  useTrait: true,
@@ -25282,7 +25337,7 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol {
25282
25337
  }
25283
25338
  Object.assign(request.headers, {
25284
25339
  "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
25285
- "x-amz-target": (this.getJsonRpcVersion() === "1.0" ? `JsonRpc10.` : `JsonProtocol.`) + import_schema3.NormalizedSchema.of(operationSchema).getName()
25340
+ "x-amz-target": `${this.serviceTarget}.${import_schema3.NormalizedSchema.of(operationSchema).getName()}`
25286
25341
  });
25287
25342
  if ((0, import_schema3.deref)(operationSchema.input) === "unit" || !request.body) {
25288
25343
  request.body = "{}";
@@ -25340,9 +25395,10 @@ var AwsJson1_0Protocol = class extends AwsJsonRpcProtocol {
25340
25395
  static {
25341
25396
  __name(this, "AwsJson1_0Protocol");
25342
25397
  }
25343
- constructor({ defaultNamespace }) {
25398
+ constructor({ defaultNamespace, serviceTarget }) {
25344
25399
  super({
25345
- defaultNamespace
25400
+ defaultNamespace,
25401
+ serviceTarget
25346
25402
  });
25347
25403
  }
25348
25404
  getShapeId() {
@@ -25351,6 +25407,12 @@ var AwsJson1_0Protocol = class extends AwsJsonRpcProtocol {
25351
25407
  getJsonRpcVersion() {
25352
25408
  return "1.0";
25353
25409
  }
25410
+ /**
25411
+ * @override
25412
+ */
25413
+ getDefaultContentType() {
25414
+ return "application/x-amz-json-1.0";
25415
+ }
25354
25416
  };
25355
25417
 
25356
25418
  // src/submodules/protocols/json/AwsJson1_1Protocol.ts
@@ -25358,9 +25420,10 @@ var AwsJson1_1Protocol = class extends AwsJsonRpcProtocol {
25358
25420
  static {
25359
25421
  __name(this, "AwsJson1_1Protocol");
25360
25422
  }
25361
- constructor({ defaultNamespace }) {
25423
+ constructor({ defaultNamespace, serviceTarget }) {
25362
25424
  super({
25363
- defaultNamespace
25425
+ defaultNamespace,
25426
+ serviceTarget
25364
25427
  });
25365
25428
  }
25366
25429
  getShapeId() {
@@ -25369,6 +25432,12 @@ var AwsJson1_1Protocol = class extends AwsJsonRpcProtocol {
25369
25432
  getJsonRpcVersion() {
25370
25433
  return "1.1";
25371
25434
  }
25435
+ /**
25436
+ * @override
25437
+ */
25438
+ getDefaultContentType() {
25439
+ return "application/x-amz-json-1.1";
25440
+ }
25372
25441
  };
25373
25442
 
25374
25443
  // src/submodules/protocols/json/AwsRestJsonProtocol.ts
@@ -25425,7 +25494,7 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol {
25425
25494
  } else if (httpPayloadMember.isBlobSchema()) {
25426
25495
  request.headers["content-type"] = "application/octet-stream";
25427
25496
  } else {
25428
- request.headers["content-type"] = "application/json";
25497
+ request.headers["content-type"] = this.getDefaultContentType();
25429
25498
  }
25430
25499
  } else if (!inputSchema.isUnitSchema()) {
25431
25500
  const hasBody = Object.values(members).find((m) => {
@@ -25433,7 +25502,7 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol {
25433
25502
  return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;
25434
25503
  });
25435
25504
  if (hasBody) {
25436
- request.headers["content-type"] = "application/json";
25505
+ request.headers["content-type"] = this.getDefaultContentType();
25437
25506
  }
25438
25507
  }
25439
25508
  }
@@ -25485,6 +25554,12 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol {
25485
25554
  });
25486
25555
  throw exception;
25487
25556
  }
25557
+ /**
25558
+ * @override
25559
+ */
25560
+ getDefaultContentType() {
25561
+ return "application/json";
25562
+ }
25488
25563
  };
25489
25564
 
25490
25565
  // src/submodules/protocols/json/awsExpectUnion.ts
@@ -25659,7 +25734,7 @@ var XmlShapeDeserializer = class extends SerdeContextConfig {
25659
25734
  // src/submodules/protocols/query/QueryShapeSerializer.ts
25660
25735
  var import_protocols4 = __nccwpck_require__(93422);
25661
25736
  var import_schema6 = __nccwpck_require__(26890);
25662
- var import_serde6 = __nccwpck_require__(92430);
25737
+ var import_serde5 = __nccwpck_require__(92430);
25663
25738
  var import_smithy_client4 = __nccwpck_require__(61411);
25664
25739
  var import_util_base642 = __nccwpck_require__(68385);
25665
25740
  var QueryShapeSerializer = class extends SerdeContextConfig {
@@ -25688,6 +25763,9 @@ var QueryShapeSerializer = class extends SerdeContextConfig {
25688
25763
  if (value != null) {
25689
25764
  this.writeKey(prefix);
25690
25765
  this.writeValue(String(value));
25766
+ } else if (ns.isIdempotencyToken()) {
25767
+ this.writeKey(prefix);
25768
+ this.writeValue((0, import_serde5.generateIdempotencyToken)());
25691
25769
  }
25692
25770
  } else if (ns.isBigIntegerSchema()) {
25693
25771
  if (value != null) {
@@ -25697,7 +25775,7 @@ var QueryShapeSerializer = class extends SerdeContextConfig {
25697
25775
  } else if (ns.isBigDecimalSchema()) {
25698
25776
  if (value != null) {
25699
25777
  this.writeKey(prefix);
25700
- this.writeValue(value instanceof import_serde6.NumericValue ? value.string : String(value));
25778
+ this.writeValue(value instanceof import_serde5.NumericValue ? value.string : String(value));
25701
25779
  }
25702
25780
  } else if (ns.isTimestampSchema()) {
25703
25781
  if (value instanceof Date) {
@@ -25761,7 +25839,7 @@ var QueryShapeSerializer = class extends SerdeContextConfig {
25761
25839
  } else if (ns.isStructSchema()) {
25762
25840
  if (value && typeof value === "object") {
25763
25841
  for (const [memberName, member] of ns.structIterator()) {
25764
- if (value[memberName] == null) {
25842
+ if (value[memberName] == null && !member.isIdempotencyToken()) {
25765
25843
  continue;
25766
25844
  }
25767
25845
  const suffix = this.getKey(memberName, member.getMergedTraits().xmlName);
@@ -25952,6 +26030,12 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol {
25952
26030
  const errorData = this.loadQueryError(data);
25953
26031
  return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown";
25954
26032
  }
26033
+ /**
26034
+ * @override
26035
+ */
26036
+ getDefaultContentType() {
26037
+ return "application/x-www-form-urlencoded";
26038
+ }
25955
26039
  };
25956
26040
 
25957
26041
  // src/submodules/protocols/query/AwsEc2QueryProtocol.ts
@@ -26042,7 +26126,7 @@ var loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => {
26042
26126
  // src/submodules/protocols/xml/XmlShapeSerializer.ts
26043
26127
  var import_xml_builder = __nccwpck_require__(94274);
26044
26128
  var import_schema8 = __nccwpck_require__(26890);
26045
- var import_serde7 = __nccwpck_require__(92430);
26129
+ var import_serde6 = __nccwpck_require__(92430);
26046
26130
  var import_smithy_client6 = __nccwpck_require__(61411);
26047
26131
  var import_util_base643 = __nccwpck_require__(68385);
26048
26132
  var XmlShapeSerializer = class extends SerdeContextConfig {
@@ -26107,7 +26191,7 @@ var XmlShapeSerializer = class extends SerdeContextConfig {
26107
26191
  }
26108
26192
  for (const [memberName, memberSchema] of ns.structIterator()) {
26109
26193
  const val = value[memberName];
26110
- if (val != null) {
26194
+ if (val != null || memberSchema.isIdempotencyToken()) {
26111
26195
  if (memberSchema.getMergedTraits().xmlAttribute) {
26112
26196
  structXmlNode.addAttribute(
26113
26197
  memberSchema.getMergedTraits().xmlName ?? memberName,
@@ -26268,7 +26352,7 @@ var XmlShapeSerializer = class extends SerdeContextConfig {
26268
26352
  break;
26269
26353
  }
26270
26354
  } else if (ns.isBigDecimalSchema() && value) {
26271
- if (value instanceof import_serde7.NumericValue) {
26355
+ if (value instanceof import_serde6.NumericValue) {
26272
26356
  return value.string;
26273
26357
  }
26274
26358
  return String(value);
@@ -26284,9 +26368,16 @@ var XmlShapeSerializer = class extends SerdeContextConfig {
26284
26368
  );
26285
26369
  }
26286
26370
  }
26287
- if (ns.isStringSchema() || ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
26371
+ if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
26288
26372
  nodeContents = String(value);
26289
26373
  }
26374
+ if (ns.isStringSchema()) {
26375
+ if (value === void 0 && ns.isIdempotencyToken()) {
26376
+ nodeContents = (0, import_serde6.generateIdempotencyToken)();
26377
+ } else {
26378
+ nodeContents = String(value);
26379
+ }
26380
+ }
26290
26381
  if (nodeContents === null) {
26291
26382
  throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);
26292
26383
  }
@@ -26382,7 +26473,7 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol {
26382
26473
  } else if (httpPayloadMember.isBlobSchema()) {
26383
26474
  request.headers["content-type"] = "application/octet-stream";
26384
26475
  } else {
26385
- request.headers["content-type"] = "application/xml";
26476
+ request.headers["content-type"] = this.getDefaultContentType();
26386
26477
  }
26387
26478
  } else if (!ns.isUnitSchema()) {
26388
26479
  const hasBody = Object.values(members).find((m) => {
@@ -26390,11 +26481,11 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol {
26390
26481
  return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;
26391
26482
  });
26392
26483
  if (hasBody) {
26393
- request.headers["content-type"] = "application/xml";
26484
+ request.headers["content-type"] = this.getDefaultContentType();
26394
26485
  }
26395
26486
  }
26396
26487
  }
26397
- if (request.headers["content-type"] === "application/xml") {
26488
+ if (request.headers["content-type"] === this.getDefaultContentType()) {
26398
26489
  if (typeof request.body === "string") {
26399
26490
  request.body = '<?xml version="1.0" encoding="UTF-8"?>' + request.body;
26400
26491
  }
@@ -26448,6 +26539,12 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol {
26448
26539
  });
26449
26540
  throw exception;
26450
26541
  }
26542
+ /**
26543
+ * @override
26544
+ */
26545
+ getDefaultContentType() {
26546
+ return "application/xml";
26547
+ }
26451
26548
  };
26452
26549
  // Annotate the CommonJS export names for ESM import in node:
26453
26550
  0 && (0);
@@ -33723,7 +33820,7 @@ var partitions_default = {
33723
33820
  description: "Asia Pacific (Thailand)"
33724
33821
  },
33725
33822
  "aws-global": {
33726
- description: "AWS Standard global region"
33823
+ description: "aws global region"
33727
33824
  },
33728
33825
  "ca-central-1": {
33729
33826
  description: "Canada (Central)"
@@ -33796,7 +33893,7 @@ var partitions_default = {
33796
33893
  regionRegex: "^cn\\-\\w+\\-\\d+$",
33797
33894
  regions: {
33798
33895
  "aws-cn-global": {
33799
- description: "AWS China global region"
33896
+ description: "aws-cn global region"
33800
33897
  },
33801
33898
  "cn-north-1": {
33802
33899
  description: "China (Beijing)"
@@ -33806,32 +33903,26 @@ var partitions_default = {
33806
33903
  }
33807
33904
  }
33808
33905
  }, {
33809
- id: "aws-us-gov",
33906
+ id: "aws-eusc",
33810
33907
  outputs: {
33811
- dnsSuffix: "amazonaws.com",
33812
- dualStackDnsSuffix: "api.aws",
33813
- implicitGlobalRegion: "us-gov-west-1",
33814
- name: "aws-us-gov",
33815
- supportsDualStack: true,
33908
+ dnsSuffix: "amazonaws.eu",
33909
+ dualStackDnsSuffix: "api.amazonwebservices.eu",
33910
+ implicitGlobalRegion: "eusc-de-east-1",
33911
+ name: "aws-eusc",
33912
+ supportsDualStack: false,
33816
33913
  supportsFIPS: true
33817
33914
  },
33818
- regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
33915
+ regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$",
33819
33916
  regions: {
33820
- "aws-us-gov-global": {
33821
- description: "AWS GovCloud (US) global region"
33822
- },
33823
- "us-gov-east-1": {
33824
- description: "AWS GovCloud (US-East)"
33825
- },
33826
- "us-gov-west-1": {
33827
- description: "AWS GovCloud (US-West)"
33917
+ "eusc-de-east-1": {
33918
+ description: "EU (Germany)"
33828
33919
  }
33829
33920
  }
33830
33921
  }, {
33831
33922
  id: "aws-iso",
33832
33923
  outputs: {
33833
33924
  dnsSuffix: "c2s.ic.gov",
33834
- dualStackDnsSuffix: "c2s.ic.gov",
33925
+ dualStackDnsSuffix: "api.aws.ic.gov",
33835
33926
  implicitGlobalRegion: "us-iso-east-1",
33836
33927
  name: "aws-iso",
33837
33928
  supportsDualStack: false,
@@ -33840,7 +33931,7 @@ var partitions_default = {
33840
33931
  regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
33841
33932
  regions: {
33842
33933
  "aws-iso-global": {
33843
- description: "AWS ISO (US) global region"
33934
+ description: "aws-iso global region"
33844
33935
  },
33845
33936
  "us-iso-east-1": {
33846
33937
  description: "US ISO East"
@@ -33853,7 +33944,7 @@ var partitions_default = {
33853
33944
  id: "aws-iso-b",
33854
33945
  outputs: {
33855
33946
  dnsSuffix: "sc2s.sgov.gov",
33856
- dualStackDnsSuffix: "sc2s.sgov.gov",
33947
+ dualStackDnsSuffix: "api.aws.scloud",
33857
33948
  implicitGlobalRegion: "us-isob-east-1",
33858
33949
  name: "aws-iso-b",
33859
33950
  supportsDualStack: false,
@@ -33862,7 +33953,7 @@ var partitions_default = {
33862
33953
  regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
33863
33954
  regions: {
33864
33955
  "aws-iso-b-global": {
33865
- description: "AWS ISOB (US) global region"
33956
+ description: "aws-iso-b global region"
33866
33957
  },
33867
33958
  "us-isob-east-1": {
33868
33959
  description: "US ISOB East (Ohio)"
@@ -33872,7 +33963,7 @@ var partitions_default = {
33872
33963
  id: "aws-iso-e",
33873
33964
  outputs: {
33874
33965
  dnsSuffix: "cloud.adc-e.uk",
33875
- dualStackDnsSuffix: "cloud.adc-e.uk",
33966
+ dualStackDnsSuffix: "api.cloud-aws.adc-e.uk",
33876
33967
  implicitGlobalRegion: "eu-isoe-west-1",
33877
33968
  name: "aws-iso-e",
33878
33969
  supportsDualStack: false,
@@ -33881,7 +33972,7 @@ var partitions_default = {
33881
33972
  regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
33882
33973
  regions: {
33883
33974
  "aws-iso-e-global": {
33884
- description: "AWS ISOE (Europe) global region"
33975
+ description: "aws-iso-e global region"
33885
33976
  },
33886
33977
  "eu-isoe-west-1": {
33887
33978
  description: "EU ISOE West"
@@ -33891,7 +33982,7 @@ var partitions_default = {
33891
33982
  id: "aws-iso-f",
33892
33983
  outputs: {
33893
33984
  dnsSuffix: "csp.hci.ic.gov",
33894
- dualStackDnsSuffix: "csp.hci.ic.gov",
33985
+ dualStackDnsSuffix: "api.aws.hci.ic.gov",
33895
33986
  implicitGlobalRegion: "us-isof-south-1",
33896
33987
  name: "aws-iso-f",
33897
33988
  supportsDualStack: false,
@@ -33900,7 +33991,7 @@ var partitions_default = {
33900
33991
  regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
33901
33992
  regions: {
33902
33993
  "aws-iso-f-global": {
33903
- description: "AWS ISOF global region"
33994
+ description: "aws-iso-f global region"
33904
33995
  },
33905
33996
  "us-isof-east-1": {
33906
33997
  description: "US ISOF EAST"
@@ -33910,19 +34001,25 @@ var partitions_default = {
33910
34001
  }
33911
34002
  }
33912
34003
  }, {
33913
- id: "aws-eusc",
34004
+ id: "aws-us-gov",
33914
34005
  outputs: {
33915
- dnsSuffix: "amazonaws.eu",
33916
- dualStackDnsSuffix: "amazonaws.eu",
33917
- implicitGlobalRegion: "eusc-de-east-1",
33918
- name: "aws-eusc",
33919
- supportsDualStack: false,
34006
+ dnsSuffix: "amazonaws.com",
34007
+ dualStackDnsSuffix: "api.aws",
34008
+ implicitGlobalRegion: "us-gov-west-1",
34009
+ name: "aws-us-gov",
34010
+ supportsDualStack: true,
33920
34011
  supportsFIPS: true
33921
34012
  },
33922
- regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$",
34013
+ regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
33923
34014
  regions: {
33924
- "eusc-de-east-1": {
33925
- description: "EU (Germany)"
34015
+ "aws-us-gov-global": {
34016
+ description: "aws-us-gov global region"
34017
+ },
34018
+ "us-gov-east-1": {
34019
+ description: "AWS GovCloud (US-East)"
34020
+ },
34021
+ "us-gov-west-1": {
34022
+ description: "AWS GovCloud (US-West)"
33926
34023
  }
33927
34024
  }
33928
34025
  }],
@@ -69676,6 +69773,10 @@ class RpcOutputStreamController {
69676
69773
  cmp: [],
69677
69774
  };
69678
69775
  this._closed = false;
69776
+ // --- RpcOutputStream async iterator API
69777
+ // iterator state.
69778
+ // is undefined when no iterator has been acquired yet.
69779
+ this._itState = { q: [] };
69679
69780
  }
69680
69781
  // --- RpcOutputStream callback API
69681
69782
  onNext(callback) {
@@ -69775,10 +69876,6 @@ class RpcOutputStreamController {
69775
69876
  * messages are queued.
69776
69877
  */
69777
69878
  [Symbol.asyncIterator]() {
69778
- // init the iterator state, enabling pushIt()
69779
- if (!this._itState) {
69780
- this._itState = { q: [] };
69781
- }
69782
69879
  // if we are closed, we are definitely not receiving any more messages.
69783
69880
  // but we can't let the iterator get stuck. we want to either:
69784
69881
  // a) finish the new iterator immediately, because we are completed
@@ -69811,8 +69908,6 @@ class RpcOutputStreamController {
69811
69908
  // this either resolves a pending promise, or enqueues the result.
69812
69909
  pushIt(result) {
69813
69910
  let state = this._itState;
69814
- if (!state)
69815
- return;
69816
69911
  // is the consumer waiting for us?
69817
69912
  if (state.p) {
69818
69913
  // yes, consumer is waiting for this promise.
@@ -71706,6 +71801,7 @@ const reflection_equals_1 = __nccwpck_require__(4827);
71706
71801
  const binary_writer_1 = __nccwpck_require__(23957);
71707
71802
  const binary_reader_1 = __nccwpck_require__(92889);
71708
71803
  const baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
71804
+ const messageTypeDescriptor = baseDescriptors[message_type_contract_1.MESSAGE_TYPE] = {};
71709
71805
  /**
71710
71806
  * This standard message type provides reflection-based
71711
71807
  * operations to work with a message.
@@ -71716,7 +71812,8 @@ class MessageType {
71716
71812
  this.typeName = name;
71717
71813
  this.fields = fields.map(reflection_info_1.normalizeFieldInfo);
71718
71814
  this.options = options !== null && options !== void 0 ? options : {};
71719
- this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, baseDescriptors), { [message_type_contract_1.MESSAGE_TYPE]: { value: this } }));
71815
+ messageTypeDescriptor.value = this;
71816
+ this.messagePrototype = Object.create(null, baseDescriptors);
71720
71817
  this.refTypeCheck = new reflection_type_check_1.ReflectionTypeCheck(this);
71721
71818
  this.refJsonReader = new reflection_json_reader_1.ReflectionJsonReader(this);
71722
71819
  this.refJsonWriter = new reflection_json_writer_1.ReflectionJsonWriter(this);
@@ -73223,12 +73320,16 @@ class ReflectionJsonReader {
73223
73320
  target[localName] = field.T().internalJsonRead(jsonValue, options, target[localName]);
73224
73321
  break;
73225
73322
  case "enum":
73323
+ if (jsonValue === null)
73324
+ continue;
73226
73325
  let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields);
73227
73326
  if (val === false)
73228
73327
  continue;
73229
73328
  target[localName] = val;
73230
73329
  break;
73231
73330
  case "scalar":
73331
+ if (jsonValue === null)
73332
+ continue;
73232
73333
  target[localName] = this.scalar(jsonValue, field.T, field.L, field.name);
73233
73334
  break;
73234
73335
  }
@@ -77434,13 +77535,13 @@ function extendedEncodeURIComponent(str) {
77434
77535
 
77435
77536
  // src/submodules/protocols/HttpBindingProtocol.ts
77436
77537
  var import_schema2 = __nccwpck_require__(26890);
77538
+ var import_serde = __nccwpck_require__(92430);
77437
77539
  var import_protocol_http2 = __nccwpck_require__(72356);
77540
+ var import_util_stream2 = __nccwpck_require__(4252);
77438
77541
 
77439
77542
  // src/submodules/protocols/HttpProtocol.ts
77440
77543
  var import_schema = __nccwpck_require__(26890);
77441
- var import_serde = __nccwpck_require__(92430);
77442
77544
  var import_protocol_http = __nccwpck_require__(72356);
77443
- var import_util_stream2 = __nccwpck_require__(4252);
77444
77545
  var HttpProtocol = class {
77445
77546
  constructor(options) {
77446
77547
  this.options = options;
@@ -77515,89 +77616,7 @@ var HttpProtocol = class {
77515
77616
  };
77516
77617
  }
77517
77618
  async deserializeHttpMessage(schema, context, response, arg4, arg5) {
77518
- let dataObject;
77519
- if (arg4 instanceof Set) {
77520
- dataObject = arg5;
77521
- } else {
77522
- dataObject = arg4;
77523
- }
77524
- const deserializer = this.deserializer;
77525
- const ns = import_schema.NormalizedSchema.of(schema);
77526
- const nonHttpBindingMembers = [];
77527
- for (const [memberName, memberSchema] of ns.structIterator()) {
77528
- const memberTraits = memberSchema.getMemberTraits();
77529
- if (memberTraits.httpPayload) {
77530
- const isStreaming = memberSchema.isStreaming();
77531
- if (isStreaming) {
77532
- const isEventStream = memberSchema.isStructSchema();
77533
- if (isEventStream) {
77534
- const context2 = this.serdeContext;
77535
- if (!context2.eventStreamMarshaller) {
77536
- throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
77537
- }
77538
- const memberSchemas = memberSchema.getMemberSchemas();
77539
- dataObject[memberName] = context2.eventStreamMarshaller.deserialize(response.body, async (event) => {
77540
- const unionMember = Object.keys(event).find((key) => {
77541
- return key !== "__type";
77542
- }) ?? "";
77543
- if (unionMember in memberSchemas) {
77544
- const eventStreamSchema = memberSchemas[unionMember];
77545
- return {
77546
- [unionMember]: await deserializer.read(eventStreamSchema, event[unionMember].body)
77547
- };
77548
- } else {
77549
- return {
77550
- $unknown: event
77551
- };
77552
- }
77553
- });
77554
- } else {
77555
- dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);
77556
- }
77557
- } else if (response.body) {
77558
- const bytes = await collectBody(response.body, context);
77559
- if (bytes.byteLength > 0) {
77560
- dataObject[memberName] = await deserializer.read(memberSchema, bytes);
77561
- }
77562
- }
77563
- } else if (memberTraits.httpHeader) {
77564
- const key = String(memberTraits.httpHeader).toLowerCase();
77565
- const value = response.headers[key];
77566
- if (null != value) {
77567
- if (memberSchema.isListSchema()) {
77568
- const headerListValueSchema = memberSchema.getValueSchema();
77569
- let sections;
77570
- if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === import_schema.SCHEMA.TIMESTAMP_DEFAULT) {
77571
- sections = (0, import_serde.splitEvery)(value, ",", 2);
77572
- } else {
77573
- sections = (0, import_serde.splitHeader)(value);
77574
- }
77575
- const list = [];
77576
- for (const section of sections) {
77577
- list.push(await deserializer.read([headerListValueSchema, { httpHeader: key }], section.trim()));
77578
- }
77579
- dataObject[memberName] = list;
77580
- } else {
77581
- dataObject[memberName] = await deserializer.read(memberSchema, value);
77582
- }
77583
- }
77584
- } else if (memberTraits.httpPrefixHeaders !== void 0) {
77585
- dataObject[memberName] = {};
77586
- for (const [header, value] of Object.entries(response.headers)) {
77587
- if (header.startsWith(memberTraits.httpPrefixHeaders)) {
77588
- dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(
77589
- [memberSchema.getValueSchema(), { httpHeader: header }],
77590
- value
77591
- );
77592
- }
77593
- }
77594
- } else if (memberTraits.httpResponseCode) {
77595
- dataObject[memberName] = response.statusCode;
77596
- } else {
77597
- nonHttpBindingMembers.push(memberName);
77598
- }
77599
- }
77600
- return nonHttpBindingMembers;
77619
+ return [];
77601
77620
  }
77602
77621
  };
77603
77622
 
@@ -77773,6 +77792,91 @@ var HttpBindingProtocol = class extends HttpProtocol {
77773
77792
  };
77774
77793
  return output;
77775
77794
  }
77795
+ async deserializeHttpMessage(schema, context, response, arg4, arg5) {
77796
+ let dataObject;
77797
+ if (arg4 instanceof Set) {
77798
+ dataObject = arg5;
77799
+ } else {
77800
+ dataObject = arg4;
77801
+ }
77802
+ const deserializer = this.deserializer;
77803
+ const ns = import_schema2.NormalizedSchema.of(schema);
77804
+ const nonHttpBindingMembers = [];
77805
+ for (const [memberName, memberSchema] of ns.structIterator()) {
77806
+ const memberTraits = memberSchema.getMemberTraits();
77807
+ if (memberTraits.httpPayload) {
77808
+ const isStreaming = memberSchema.isStreaming();
77809
+ if (isStreaming) {
77810
+ const isEventStream = memberSchema.isStructSchema();
77811
+ if (isEventStream) {
77812
+ const context2 = this.serdeContext;
77813
+ if (!context2.eventStreamMarshaller) {
77814
+ throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
77815
+ }
77816
+ const memberSchemas = memberSchema.getMemberSchemas();
77817
+ dataObject[memberName] = context2.eventStreamMarshaller.deserialize(response.body, async (event) => {
77818
+ const unionMember = Object.keys(event).find((key) => {
77819
+ return key !== "__type";
77820
+ }) ?? "";
77821
+ if (unionMember in memberSchemas) {
77822
+ const eventStreamSchema = memberSchemas[unionMember];
77823
+ return {
77824
+ [unionMember]: await deserializer.read(eventStreamSchema, event[unionMember].body)
77825
+ };
77826
+ } else {
77827
+ return {
77828
+ $unknown: event
77829
+ };
77830
+ }
77831
+ });
77832
+ } else {
77833
+ dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);
77834
+ }
77835
+ } else if (response.body) {
77836
+ const bytes = await collectBody(response.body, context);
77837
+ if (bytes.byteLength > 0) {
77838
+ dataObject[memberName] = await deserializer.read(memberSchema, bytes);
77839
+ }
77840
+ }
77841
+ } else if (memberTraits.httpHeader) {
77842
+ const key = String(memberTraits.httpHeader).toLowerCase();
77843
+ const value = response.headers[key];
77844
+ if (null != value) {
77845
+ if (memberSchema.isListSchema()) {
77846
+ const headerListValueSchema = memberSchema.getValueSchema();
77847
+ let sections;
77848
+ if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === import_schema2.SCHEMA.TIMESTAMP_DEFAULT) {
77849
+ sections = (0, import_serde.splitEvery)(value, ",", 2);
77850
+ } else {
77851
+ sections = (0, import_serde.splitHeader)(value);
77852
+ }
77853
+ const list = [];
77854
+ for (const section of sections) {
77855
+ list.push(await deserializer.read([headerListValueSchema, { httpHeader: key }], section.trim()));
77856
+ }
77857
+ dataObject[memberName] = list;
77858
+ } else {
77859
+ dataObject[memberName] = await deserializer.read(memberSchema, value);
77860
+ }
77861
+ }
77862
+ } else if (memberTraits.httpPrefixHeaders !== void 0) {
77863
+ dataObject[memberName] = {};
77864
+ for (const [header, value] of Object.entries(response.headers)) {
77865
+ if (header.startsWith(memberTraits.httpPrefixHeaders)) {
77866
+ dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(
77867
+ [memberSchema.getValueSchema(), { httpHeader: header }],
77868
+ value
77869
+ );
77870
+ }
77871
+ }
77872
+ } else if (memberTraits.httpResponseCode) {
77873
+ dataObject[memberName] = response.statusCode;
77874
+ } else {
77875
+ nonHttpBindingMembers.push(memberName);
77876
+ }
77877
+ }
77878
+ return nonHttpBindingMembers;
77879
+ }
77776
77880
  };
77777
77881
 
77778
77882
  // src/submodules/protocols/RpcProtocol.ts
@@ -78860,6 +78964,18 @@ var NormalizedSchema = class _NormalizedSchema {
78860
78964
  }
78861
78965
  return this.getSchema() === SCHEMA.STREAMING_BLOB;
78862
78966
  }
78967
+ /**
78968
+ * This is a shortcut to avoid calling `getMergedTraits().idempotencyToken` on every string.
78969
+ * @returns whether the schema has the idempotencyToken trait.
78970
+ */
78971
+ isIdempotencyToken() {
78972
+ if (typeof this.traits === "number") {
78973
+ return (this.traits & 4) === 4;
78974
+ } else if (typeof this.traits === "object") {
78975
+ return !!this.traits.idempotencyToken;
78976
+ }
78977
+ return false;
78978
+ }
78863
78979
  /**
78864
78980
  * @returns own traits merged with member traits, where member traits of the same trait key take priority.
78865
78981
  * This method is cached.
@@ -79071,6 +79187,7 @@ __export(serde_exports, {
79071
79187
  expectShort: () => expectShort,
79072
79188
  expectString: () => expectString,
79073
79189
  expectUnion: () => expectUnion,
79190
+ generateIdempotencyToken: () => import_uuid.v4,
79074
79191
  handleFloat: () => handleFloat,
79075
79192
  limitedParseDouble: () => limitedParseDouble,
79076
79193
  limitedParseFloat: () => limitedParseFloat,
@@ -79097,57 +79214,7 @@ __export(serde_exports, {
79097
79214
  module.exports = __toCommonJS(serde_exports);
79098
79215
 
79099
79216
  // src/submodules/serde/copyDocumentWithTransform.ts
79100
- var import_schema = __nccwpck_require__(26890);
79101
- var copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => {
79102
- const ns = import_schema.NormalizedSchema.of(schemaRef);
79103
- switch (typeof source) {
79104
- case "undefined":
79105
- case "boolean":
79106
- case "number":
79107
- case "string":
79108
- case "bigint":
79109
- case "symbol":
79110
- return transform(source, ns);
79111
- case "function":
79112
- case "object":
79113
- if (source === null) {
79114
- return transform(null, ns);
79115
- }
79116
- if (Array.isArray(source)) {
79117
- const newArray = new Array(source.length);
79118
- let i = 0;
79119
- for (const item of source) {
79120
- newArray[i++] = copyDocumentWithTransform(item, ns.getValueSchema(), transform);
79121
- }
79122
- return transform(newArray, ns);
79123
- }
79124
- if ("byteLength" in source) {
79125
- const newBytes = new Uint8Array(source.byteLength);
79126
- newBytes.set(source, 0);
79127
- return transform(newBytes, ns);
79128
- }
79129
- if (source instanceof Date) {
79130
- return transform(source, ns);
79131
- }
79132
- const newObject = {};
79133
- if (ns.isMapSchema()) {
79134
- for (const key of Object.keys(source)) {
79135
- newObject[key] = copyDocumentWithTransform(source[key], ns.getValueSchema(), transform);
79136
- }
79137
- } else if (ns.isStructSchema()) {
79138
- for (const [key, memberSchema] of ns.structIterator()) {
79139
- newObject[key] = copyDocumentWithTransform(source[key], memberSchema, transform);
79140
- }
79141
- } else if (ns.isDocumentSchema()) {
79142
- for (const key of Object.keys(source)) {
79143
- newObject[key] = copyDocumentWithTransform(source[key], ns.getValueSchema(), transform);
79144
- }
79145
- }
79146
- return transform(newObject, ns);
79147
- default:
79148
- return transform(source, ns);
79149
- }
79150
- };
79217
+ var copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;
79151
79218
 
79152
79219
  // src/submodules/serde/parse-utils.ts
79153
79220
  var parseBoolean = (value) => {
@@ -79602,6 +79669,9 @@ var stripLeadingZeroes = (value) => {
79602
79669
  return value.slice(idx);
79603
79670
  };
79604
79671
 
79672
+ // src/submodules/serde/generateIdempotencyToken.ts
79673
+ var import_uuid = __nccwpck_require__(13932);
79674
+
79605
79675
  // src/submodules/serde/lazy-json.ts
79606
79676
  var LazyJsonString = function LazyJsonString2(val) {
79607
79677
  const str = Object.assign(new String(val), {
@@ -79752,6 +79822,671 @@ function nv(input) {
79752
79822
  0 && (0);
79753
79823
 
79754
79824
 
79825
+ /***/ }),
79826
+
79827
+ /***/ 13932:
79828
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
79829
+
79830
+
79831
+
79832
+ Object.defineProperty(exports, "__esModule", ({
79833
+ value: true
79834
+ }));
79835
+ Object.defineProperty(exports, "NIL", ({
79836
+ enumerable: true,
79837
+ get: function () {
79838
+ return _nil.default;
79839
+ }
79840
+ }));
79841
+ Object.defineProperty(exports, "parse", ({
79842
+ enumerable: true,
79843
+ get: function () {
79844
+ return _parse.default;
79845
+ }
79846
+ }));
79847
+ Object.defineProperty(exports, "stringify", ({
79848
+ enumerable: true,
79849
+ get: function () {
79850
+ return _stringify.default;
79851
+ }
79852
+ }));
79853
+ Object.defineProperty(exports, "v1", ({
79854
+ enumerable: true,
79855
+ get: function () {
79856
+ return _v.default;
79857
+ }
79858
+ }));
79859
+ Object.defineProperty(exports, "v3", ({
79860
+ enumerable: true,
79861
+ get: function () {
79862
+ return _v2.default;
79863
+ }
79864
+ }));
79865
+ Object.defineProperty(exports, "v4", ({
79866
+ enumerable: true,
79867
+ get: function () {
79868
+ return _v3.default;
79869
+ }
79870
+ }));
79871
+ Object.defineProperty(exports, "v5", ({
79872
+ enumerable: true,
79873
+ get: function () {
79874
+ return _v4.default;
79875
+ }
79876
+ }));
79877
+ Object.defineProperty(exports, "validate", ({
79878
+ enumerable: true,
79879
+ get: function () {
79880
+ return _validate.default;
79881
+ }
79882
+ }));
79883
+ Object.defineProperty(exports, "version", ({
79884
+ enumerable: true,
79885
+ get: function () {
79886
+ return _version.default;
79887
+ }
79888
+ }));
79889
+
79890
+ var _v = _interopRequireDefault(__nccwpck_require__(87619));
79891
+
79892
+ var _v2 = _interopRequireDefault(__nccwpck_require__(12933));
79893
+
79894
+ var _v3 = _interopRequireDefault(__nccwpck_require__(30256));
79895
+
79896
+ var _v4 = _interopRequireDefault(__nccwpck_require__(37127));
79897
+
79898
+ var _nil = _interopRequireDefault(__nccwpck_require__(27007));
79899
+
79900
+ var _version = _interopRequireDefault(__nccwpck_require__(14048));
79901
+
79902
+ var _validate = _interopRequireDefault(__nccwpck_require__(54732));
79903
+
79904
+ var _stringify = _interopRequireDefault(__nccwpck_require__(51297));
79905
+
79906
+ var _parse = _interopRequireDefault(__nccwpck_require__(64575));
79907
+
79908
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79909
+
79910
+ /***/ }),
79911
+
79912
+ /***/ 89492:
79913
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
79914
+
79915
+
79916
+
79917
+ Object.defineProperty(exports, "__esModule", ({
79918
+ value: true
79919
+ }));
79920
+ exports["default"] = void 0;
79921
+
79922
+ var _crypto = _interopRequireDefault(__nccwpck_require__(76982));
79923
+
79924
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79925
+
79926
+ function md5(bytes) {
79927
+ if (Array.isArray(bytes)) {
79928
+ bytes = Buffer.from(bytes);
79929
+ } else if (typeof bytes === 'string') {
79930
+ bytes = Buffer.from(bytes, 'utf8');
79931
+ }
79932
+
79933
+ return _crypto.default.createHash('md5').update(bytes).digest();
79934
+ }
79935
+
79936
+ var _default = md5;
79937
+ exports["default"] = _default;
79938
+
79939
+ /***/ }),
79940
+
79941
+ /***/ 14585:
79942
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
79943
+
79944
+
79945
+
79946
+ Object.defineProperty(exports, "__esModule", ({
79947
+ value: true
79948
+ }));
79949
+ exports["default"] = void 0;
79950
+
79951
+ var _crypto = _interopRequireDefault(__nccwpck_require__(76982));
79952
+
79953
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79954
+
79955
+ var _default = {
79956
+ randomUUID: _crypto.default.randomUUID
79957
+ };
79958
+ exports["default"] = _default;
79959
+
79960
+ /***/ }),
79961
+
79962
+ /***/ 27007:
79963
+ /***/ ((__unused_webpack_module, exports) => {
79964
+
79965
+
79966
+
79967
+ Object.defineProperty(exports, "__esModule", ({
79968
+ value: true
79969
+ }));
79970
+ exports["default"] = void 0;
79971
+ var _default = '00000000-0000-0000-0000-000000000000';
79972
+ exports["default"] = _default;
79973
+
79974
+ /***/ }),
79975
+
79976
+ /***/ 64575:
79977
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
79978
+
79979
+
79980
+
79981
+ Object.defineProperty(exports, "__esModule", ({
79982
+ value: true
79983
+ }));
79984
+ exports["default"] = void 0;
79985
+
79986
+ var _validate = _interopRequireDefault(__nccwpck_require__(54732));
79987
+
79988
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79989
+
79990
+ function parse(uuid) {
79991
+ if (!(0, _validate.default)(uuid)) {
79992
+ throw TypeError('Invalid UUID');
79993
+ }
79994
+
79995
+ let v;
79996
+ const arr = new Uint8Array(16); // Parse ########-....-....-....-............
79997
+
79998
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
79999
+ arr[1] = v >>> 16 & 0xff;
80000
+ arr[2] = v >>> 8 & 0xff;
80001
+ arr[3] = v & 0xff; // Parse ........-####-....-....-............
80002
+
80003
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
80004
+ arr[5] = v & 0xff; // Parse ........-....-####-....-............
80005
+
80006
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
80007
+ arr[7] = v & 0xff; // Parse ........-....-....-####-............
80008
+
80009
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
80010
+ arr[9] = v & 0xff; // Parse ........-....-....-....-############
80011
+ // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
80012
+
80013
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
80014
+ arr[11] = v / 0x100000000 & 0xff;
80015
+ arr[12] = v >>> 24 & 0xff;
80016
+ arr[13] = v >>> 16 & 0xff;
80017
+ arr[14] = v >>> 8 & 0xff;
80018
+ arr[15] = v & 0xff;
80019
+ return arr;
80020
+ }
80021
+
80022
+ var _default = parse;
80023
+ exports["default"] = _default;
80024
+
80025
+ /***/ }),
80026
+
80027
+ /***/ 25779:
80028
+ /***/ ((__unused_webpack_module, exports) => {
80029
+
80030
+
80031
+
80032
+ Object.defineProperty(exports, "__esModule", ({
80033
+ value: true
80034
+ }));
80035
+ exports["default"] = void 0;
80036
+ var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
80037
+ exports["default"] = _default;
80038
+
80039
+ /***/ }),
80040
+
80041
+ /***/ 90145:
80042
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
80043
+
80044
+
80045
+
80046
+ Object.defineProperty(exports, "__esModule", ({
80047
+ value: true
80048
+ }));
80049
+ exports["default"] = rng;
80050
+
80051
+ var _crypto = _interopRequireDefault(__nccwpck_require__(76982));
80052
+
80053
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80054
+
80055
+ const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
80056
+
80057
+ let poolPtr = rnds8Pool.length;
80058
+
80059
+ function rng() {
80060
+ if (poolPtr > rnds8Pool.length - 16) {
80061
+ _crypto.default.randomFillSync(rnds8Pool);
80062
+
80063
+ poolPtr = 0;
80064
+ }
80065
+
80066
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
80067
+ }
80068
+
80069
+ /***/ }),
80070
+
80071
+ /***/ 70951:
80072
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
80073
+
80074
+
80075
+
80076
+ Object.defineProperty(exports, "__esModule", ({
80077
+ value: true
80078
+ }));
80079
+ exports["default"] = void 0;
80080
+
80081
+ var _crypto = _interopRequireDefault(__nccwpck_require__(76982));
80082
+
80083
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80084
+
80085
+ function sha1(bytes) {
80086
+ if (Array.isArray(bytes)) {
80087
+ bytes = Buffer.from(bytes);
80088
+ } else if (typeof bytes === 'string') {
80089
+ bytes = Buffer.from(bytes, 'utf8');
80090
+ }
80091
+
80092
+ return _crypto.default.createHash('sha1').update(bytes).digest();
80093
+ }
80094
+
80095
+ var _default = sha1;
80096
+ exports["default"] = _default;
80097
+
80098
+ /***/ }),
80099
+
80100
+ /***/ 51297:
80101
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
80102
+
80103
+
80104
+
80105
+ Object.defineProperty(exports, "__esModule", ({
80106
+ value: true
80107
+ }));
80108
+ exports["default"] = void 0;
80109
+ exports.unsafeStringify = unsafeStringify;
80110
+
80111
+ var _validate = _interopRequireDefault(__nccwpck_require__(54732));
80112
+
80113
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80114
+
80115
+ /**
80116
+ * Convert array of 16 byte values to UUID string format of the form:
80117
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
80118
+ */
80119
+ const byteToHex = [];
80120
+
80121
+ for (let i = 0; i < 256; ++i) {
80122
+ byteToHex.push((i + 0x100).toString(16).slice(1));
80123
+ }
80124
+
80125
+ function unsafeStringify(arr, offset = 0) {
80126
+ // Note: Be careful editing this code! It's been tuned for performance
80127
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
80128
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
80129
+ }
80130
+
80131
+ function stringify(arr, offset = 0) {
80132
+ const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
80133
+ // of the following:
80134
+ // - One or more input array values don't map to a hex octet (leading to
80135
+ // "undefined" in the uuid)
80136
+ // - Invalid input values for the RFC `version` or `variant` fields
80137
+
80138
+ if (!(0, _validate.default)(uuid)) {
80139
+ throw TypeError('Stringified UUID is invalid');
80140
+ }
80141
+
80142
+ return uuid;
80143
+ }
80144
+
80145
+ var _default = stringify;
80146
+ exports["default"] = _default;
80147
+
80148
+ /***/ }),
80149
+
80150
+ /***/ 87619:
80151
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
80152
+
80153
+
80154
+
80155
+ Object.defineProperty(exports, "__esModule", ({
80156
+ value: true
80157
+ }));
80158
+ exports["default"] = void 0;
80159
+
80160
+ var _rng = _interopRequireDefault(__nccwpck_require__(90145));
80161
+
80162
+ var _stringify = __nccwpck_require__(51297);
80163
+
80164
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80165
+
80166
+ // **`v1()` - Generate time-based UUID**
80167
+ //
80168
+ // Inspired by https://github.com/LiosK/UUID.js
80169
+ // and http://docs.python.org/library/uuid.html
80170
+ let _nodeId;
80171
+
80172
+ let _clockseq; // Previous uuid creation time
80173
+
80174
+
80175
+ let _lastMSecs = 0;
80176
+ let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
80177
+
80178
+ function v1(options, buf, offset) {
80179
+ let i = buf && offset || 0;
80180
+ const b = buf || new Array(16);
80181
+ options = options || {};
80182
+ let node = options.node || _nodeId;
80183
+ let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
80184
+ // specified. We do this lazily to minimize issues related to insufficient
80185
+ // system entropy. See #189
80186
+
80187
+ if (node == null || clockseq == null) {
80188
+ const seedBytes = options.random || (options.rng || _rng.default)();
80189
+
80190
+ if (node == null) {
80191
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
80192
+ node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
80193
+ }
80194
+
80195
+ if (clockseq == null) {
80196
+ // Per 4.2.2, randomize (14 bit) clockseq
80197
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
80198
+ }
80199
+ } // UUID timestamps are 100 nano-second units since the Gregorian epoch,
80200
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
80201
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
80202
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
80203
+
80204
+
80205
+ let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
80206
+ // cycle to simulate higher resolution clock
80207
+
80208
+ let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
80209
+
80210
+ const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
80211
+
80212
+ if (dt < 0 && options.clockseq === undefined) {
80213
+ clockseq = clockseq + 1 & 0x3fff;
80214
+ } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
80215
+ // time interval
80216
+
80217
+
80218
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
80219
+ nsecs = 0;
80220
+ } // Per 4.2.1.2 Throw error if too many uuids are requested
80221
+
80222
+
80223
+ if (nsecs >= 10000) {
80224
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
80225
+ }
80226
+
80227
+ _lastMSecs = msecs;
80228
+ _lastNSecs = nsecs;
80229
+ _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
80230
+
80231
+ msecs += 12219292800000; // `time_low`
80232
+
80233
+ const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
80234
+ b[i++] = tl >>> 24 & 0xff;
80235
+ b[i++] = tl >>> 16 & 0xff;
80236
+ b[i++] = tl >>> 8 & 0xff;
80237
+ b[i++] = tl & 0xff; // `time_mid`
80238
+
80239
+ const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
80240
+ b[i++] = tmh >>> 8 & 0xff;
80241
+ b[i++] = tmh & 0xff; // `time_high_and_version`
80242
+
80243
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
80244
+
80245
+ b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
80246
+
80247
+ b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
80248
+
80249
+ b[i++] = clockseq & 0xff; // `node`
80250
+
80251
+ for (let n = 0; n < 6; ++n) {
80252
+ b[i + n] = node[n];
80253
+ }
80254
+
80255
+ return buf || (0, _stringify.unsafeStringify)(b);
80256
+ }
80257
+
80258
+ var _default = v1;
80259
+ exports["default"] = _default;
80260
+
80261
+ /***/ }),
80262
+
80263
+ /***/ 12933:
80264
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
80265
+
80266
+
80267
+
80268
+ Object.defineProperty(exports, "__esModule", ({
80269
+ value: true
80270
+ }));
80271
+ exports["default"] = void 0;
80272
+
80273
+ var _v = _interopRequireDefault(__nccwpck_require__(74470));
80274
+
80275
+ var _md = _interopRequireDefault(__nccwpck_require__(89492));
80276
+
80277
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80278
+
80279
+ const v3 = (0, _v.default)('v3', 0x30, _md.default);
80280
+ var _default = v3;
80281
+ exports["default"] = _default;
80282
+
80283
+ /***/ }),
80284
+
80285
+ /***/ 74470:
80286
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
80287
+
80288
+
80289
+
80290
+ Object.defineProperty(exports, "__esModule", ({
80291
+ value: true
80292
+ }));
80293
+ exports.URL = exports.DNS = void 0;
80294
+ exports["default"] = v35;
80295
+
80296
+ var _stringify = __nccwpck_require__(51297);
80297
+
80298
+ var _parse = _interopRequireDefault(__nccwpck_require__(64575));
80299
+
80300
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80301
+
80302
+ function stringToBytes(str) {
80303
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
80304
+
80305
+ const bytes = [];
80306
+
80307
+ for (let i = 0; i < str.length; ++i) {
80308
+ bytes.push(str.charCodeAt(i));
80309
+ }
80310
+
80311
+ return bytes;
80312
+ }
80313
+
80314
+ const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
80315
+ exports.DNS = DNS;
80316
+ const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
80317
+ exports.URL = URL;
80318
+
80319
+ function v35(name, version, hashfunc) {
80320
+ function generateUUID(value, namespace, buf, offset) {
80321
+ var _namespace;
80322
+
80323
+ if (typeof value === 'string') {
80324
+ value = stringToBytes(value);
80325
+ }
80326
+
80327
+ if (typeof namespace === 'string') {
80328
+ namespace = (0, _parse.default)(namespace);
80329
+ }
80330
+
80331
+ if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
80332
+ throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
80333
+ } // Compute hash of namespace and value, Per 4.3
80334
+ // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
80335
+ // hashfunc([...namespace, ... value])`
80336
+
80337
+
80338
+ let bytes = new Uint8Array(16 + value.length);
80339
+ bytes.set(namespace);
80340
+ bytes.set(value, namespace.length);
80341
+ bytes = hashfunc(bytes);
80342
+ bytes[6] = bytes[6] & 0x0f | version;
80343
+ bytes[8] = bytes[8] & 0x3f | 0x80;
80344
+
80345
+ if (buf) {
80346
+ offset = offset || 0;
80347
+
80348
+ for (let i = 0; i < 16; ++i) {
80349
+ buf[offset + i] = bytes[i];
80350
+ }
80351
+
80352
+ return buf;
80353
+ }
80354
+
80355
+ return (0, _stringify.unsafeStringify)(bytes);
80356
+ } // Function#name is not settable on some platforms (#270)
80357
+
80358
+
80359
+ try {
80360
+ generateUUID.name = name; // eslint-disable-next-line no-empty
80361
+ } catch (err) {} // For CommonJS default export support
80362
+
80363
+
80364
+ generateUUID.DNS = DNS;
80365
+ generateUUID.URL = URL;
80366
+ return generateUUID;
80367
+ }
80368
+
80369
+ /***/ }),
80370
+
80371
+ /***/ 30256:
80372
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
80373
+
80374
+
80375
+
80376
+ Object.defineProperty(exports, "__esModule", ({
80377
+ value: true
80378
+ }));
80379
+ exports["default"] = void 0;
80380
+
80381
+ var _native = _interopRequireDefault(__nccwpck_require__(14585));
80382
+
80383
+ var _rng = _interopRequireDefault(__nccwpck_require__(90145));
80384
+
80385
+ var _stringify = __nccwpck_require__(51297);
80386
+
80387
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80388
+
80389
+ function v4(options, buf, offset) {
80390
+ if (_native.default.randomUUID && !buf && !options) {
80391
+ return _native.default.randomUUID();
80392
+ }
80393
+
80394
+ options = options || {};
80395
+
80396
+ const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
80397
+
80398
+
80399
+ rnds[6] = rnds[6] & 0x0f | 0x40;
80400
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
80401
+
80402
+ if (buf) {
80403
+ offset = offset || 0;
80404
+
80405
+ for (let i = 0; i < 16; ++i) {
80406
+ buf[offset + i] = rnds[i];
80407
+ }
80408
+
80409
+ return buf;
80410
+ }
80411
+
80412
+ return (0, _stringify.unsafeStringify)(rnds);
80413
+ }
80414
+
80415
+ var _default = v4;
80416
+ exports["default"] = _default;
80417
+
80418
+ /***/ }),
80419
+
80420
+ /***/ 37127:
80421
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
80422
+
80423
+
80424
+
80425
+ Object.defineProperty(exports, "__esModule", ({
80426
+ value: true
80427
+ }));
80428
+ exports["default"] = void 0;
80429
+
80430
+ var _v = _interopRequireDefault(__nccwpck_require__(74470));
80431
+
80432
+ var _sha = _interopRequireDefault(__nccwpck_require__(70951));
80433
+
80434
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80435
+
80436
+ const v5 = (0, _v.default)('v5', 0x50, _sha.default);
80437
+ var _default = v5;
80438
+ exports["default"] = _default;
80439
+
80440
+ /***/ }),
80441
+
80442
+ /***/ 54732:
80443
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
80444
+
80445
+
80446
+
80447
+ Object.defineProperty(exports, "__esModule", ({
80448
+ value: true
80449
+ }));
80450
+ exports["default"] = void 0;
80451
+
80452
+ var _regex = _interopRequireDefault(__nccwpck_require__(25779));
80453
+
80454
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80455
+
80456
+ function validate(uuid) {
80457
+ return typeof uuid === 'string' && _regex.default.test(uuid);
80458
+ }
80459
+
80460
+ var _default = validate;
80461
+ exports["default"] = _default;
80462
+
80463
+ /***/ }),
80464
+
80465
+ /***/ 14048:
80466
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
80467
+
80468
+
80469
+
80470
+ Object.defineProperty(exports, "__esModule", ({
80471
+ value: true
80472
+ }));
80473
+ exports["default"] = void 0;
80474
+
80475
+ var _validate = _interopRequireDefault(__nccwpck_require__(54732));
80476
+
80477
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80478
+
80479
+ function version(uuid) {
80480
+ if (!(0, _validate.default)(uuid)) {
80481
+ throw TypeError('Invalid UUID');
80482
+ }
80483
+
80484
+ return parseInt(uuid.slice(14, 15), 16);
80485
+ }
80486
+
80487
+ var _default = version;
80488
+ exports["default"] = _default;
80489
+
79755
80490
  /***/ }),
79756
80491
 
79757
80492
  /***/ 40566:
@@ -98686,7 +99421,7 @@ module.exports = Error;
98686
99421
 
98687
99422
  /***/ }),
98688
99423
 
98689
- /***/ 14585:
99424
+ /***/ 36966:
98690
99425
  /***/ ((module) => {
98691
99426
 
98692
99427
 
@@ -111277,7 +112012,7 @@ var $Object = __nccwpck_require__(95399);
111277
112012
 
111278
112013
  var $Error = __nccwpck_require__(31620);
111279
112014
  var $EvalError = __nccwpck_require__(33056);
111280
- var $RangeError = __nccwpck_require__(14585);
112015
+ var $RangeError = __nccwpck_require__(36966);
111281
112016
  var $ReferenceError = __nccwpck_require__(46905);
111282
112017
  var $SyntaxError = __nccwpck_require__(80105);
111283
112018
  var $TypeError = __nccwpck_require__(73314);
@@ -183191,7 +183926,7 @@ module.exports = {
183191
183926
 
183192
183927
 
183193
183928
 
183194
- const VERSION = '5.4.0'
183929
+ const VERSION = '5.5.0'
183195
183930
 
183196
183931
  const Avvio = __nccwpck_require__(92586)
183197
183932
  const http = __nccwpck_require__(37067)
@@ -183237,7 +183972,7 @@ const { Hooks, hookRunnerApplication, supportedHooks } = __nccwpck_require__(275
183237
183972
  const { createChildLogger, defaultChildLoggerFactory, createLogger } = __nccwpck_require__(39868)
183238
183973
  const pluginUtils = __nccwpck_require__(52419)
183239
183974
  const { getGenReqId, reqIdGenFactory } = __nccwpck_require__(46742)
183240
- const { buildRouting, validateBodyLimitOption } = __nccwpck_require__(16806)
183975
+ const { buildRouting, validateBodyLimitOption, buildRouterOptions } = __nccwpck_require__(16806)
183241
183976
  const build404 = __nccwpck_require__(44364)
183242
183977
  const getSecuredInitialConfig = __nccwpck_require__(53594)
183243
183978
  const override = __nccwpck_require__(46088)
@@ -183247,6 +183982,7 @@ const {
183247
183982
  AVVIO_ERRORS_MAP,
183248
183983
  ...errorCodes
183249
183984
  } = __nccwpck_require__(71036)
183985
+ const PonyPromise = __nccwpck_require__(23602)
183250
183986
 
183251
183987
  const { defaultInitOptions } = getSecuredInitialConfig
183252
183988
 
@@ -183298,8 +184034,14 @@ function fastify (options) {
183298
184034
  options = Object.assign({}, options)
183299
184035
  }
183300
184036
 
183301
- if (options.querystringParser && typeof options.querystringParser !== 'function') {
183302
- throw new FST_ERR_QSP_NOT_FN(typeof options.querystringParser)
184037
+ if (
184038
+ (options.querystringParser && typeof options.querystringParser !== 'function') ||
184039
+ (
184040
+ options.routerOptions?.querystringParser &&
184041
+ typeof options.routerOptions.querystringParser !== 'function'
184042
+ )
184043
+ ) {
184044
+ throw new FST_ERR_QSP_NOT_FN(typeof (options.querystringParser ?? options.routerOptions.querystringParser))
183303
184045
  }
183304
184046
 
183305
184047
  if (options.schemaController && options.schemaController.bucket && typeof options.schemaController.bucket !== 'function') {
@@ -183350,21 +184092,20 @@ function fastify (options) {
183350
184092
  // exposeHeadRoutes have its default set from the validator
183351
184093
  options.exposeHeadRoutes = initialConfig.exposeHeadRoutes
183352
184094
 
184095
+ options.routerOptions = buildRouterOptions(options, {
184096
+ defaultRoute,
184097
+ onBadUrl,
184098
+ ignoreTrailingSlash: defaultInitOptions.ignoreTrailingSlash,
184099
+ ignoreDuplicateSlashes: defaultInitOptions.ignoreDuplicateSlashes,
184100
+ maxParamLength: defaultInitOptions.maxParamLength,
184101
+ allowUnsafeRegex: defaultInitOptions.allowUnsafeRegex,
184102
+ buildPrettyMeta: defaultBuildPrettyMeta,
184103
+ useSemicolonDelimiter: defaultInitOptions.useSemicolonDelimiter
184104
+ })
184105
+
183353
184106
  // Default router
183354
184107
  const router = buildRouting({
183355
- config: {
183356
- defaultRoute,
183357
- onBadUrl,
183358
- constraints: options.constraints,
183359
- ignoreTrailingSlash: options.ignoreTrailingSlash || defaultInitOptions.ignoreTrailingSlash,
183360
- ignoreDuplicateSlashes: options.ignoreDuplicateSlashes || defaultInitOptions.ignoreDuplicateSlashes,
183361
- maxParamLength: options.maxParamLength || defaultInitOptions.maxParamLength,
183362
- caseSensitive: options.caseSensitive,
183363
- allowUnsafeRegex: options.allowUnsafeRegex || defaultInitOptions.allowUnsafeRegex,
183364
- buildPrettyMeta: defaultBuildPrettyMeta,
183365
- querystringParser: options.querystringParser,
183366
- useSemicolonDelimiter: options.useSemicolonDelimiter ?? defaultInitOptions.useSemicolonDelimiter
183367
- }
184108
+ config: options.routerOptions
183368
184109
  })
183369
184110
 
183370
184111
  // 404 router, used for handling encapsulated 404 handlers
@@ -183402,7 +184143,8 @@ function fastify (options) {
183402
184143
  started: false,
183403
184144
  ready: false,
183404
184145
  booting: false,
183405
- readyPromise: null
184146
+ aborted: false,
184147
+ readyResolver: null
183406
184148
  },
183407
184149
  [kKeepAliveConnections]: keepAliveConnections,
183408
184150
  [kSupportedHTTPMethods]: {
@@ -183778,18 +184520,15 @@ function fastify (options) {
183778
184520
  }
183779
184521
 
183780
184522
  function ready (cb) {
183781
- if (this[kState].readyPromise !== null) {
184523
+ if (this[kState].readyResolver !== null) {
183782
184524
  if (cb != null) {
183783
- this[kState].readyPromise.then(() => cb(null, fastify), cb)
184525
+ this[kState].readyResolver.promise.then(() => cb(null, fastify), cb)
183784
184526
  return
183785
184527
  }
183786
184528
 
183787
- return this[kState].readyPromise
184529
+ return this[kState].readyResolver.promise
183788
184530
  }
183789
184531
 
183790
- let resolveReady
183791
- let rejectReady
183792
-
183793
184532
  // run the hooks after returning the promise
183794
184533
  process.nextTick(runHooks)
183795
184534
 
@@ -183797,15 +184536,12 @@ function fastify (options) {
183797
184536
  // It will work as a barrier for all the .ready() calls (ensuring single hook execution)
183798
184537
  // as well as a flow control mechanism to chain cbs and further
183799
184538
  // promises
183800
- this[kState].readyPromise = new Promise(function (resolve, reject) {
183801
- resolveReady = resolve
183802
- rejectReady = reject
183803
- })
184539
+ this[kState].readyResolver = PonyPromise.withResolvers()
183804
184540
 
183805
184541
  if (!cb) {
183806
- return this[kState].readyPromise
184542
+ return this[kState].readyResolver.promise
183807
184543
  } else {
183808
- this[kState].readyPromise.then(() => cb(null, fastify), cb)
184544
+ this[kState].readyResolver.promise.then(() => cb(null, fastify), cb)
183809
184545
  }
183810
184546
 
183811
184547
  function runHooks () {
@@ -183830,13 +184566,13 @@ function fastify (options) {
183830
184566
  : err
183831
184567
 
183832
184568
  if (err) {
183833
- return rejectReady(err)
184569
+ return fastify[kState].readyResolver.reject(err)
183834
184570
  }
183835
184571
 
183836
- resolveReady(fastify)
184572
+ fastify[kState].readyResolver.resolve(fastify)
183837
184573
  fastify[kState].booting = false
183838
184574
  fastify[kState].ready = true
183839
- fastify[kState].readyPromise = null
184575
+ fastify[kState].readyResolver = null
183840
184576
  }
183841
184577
  }
183842
184578
 
@@ -184163,7 +184899,7 @@ module.exports["default"] = fastify
184163
184899
 
184164
184900
  module.exports = validate10;
184165
184901
  module.exports["default"] = validate10;
184166
- const schema11 = {"type":"object","additionalProperties":false,"properties":{"connectionTimeout":{"type":"integer","default":0},"keepAliveTimeout":{"type":"integer","default":72000},"forceCloseConnections":{"oneOf":[{"type":"string","pattern":"idle"},{"type":"boolean"}]},"maxRequestsPerSocket":{"type":"integer","default":0,"nullable":true},"requestTimeout":{"type":"integer","default":0},"bodyLimit":{"type":"integer","default":1048576},"caseSensitive":{"type":"boolean","default":true},"allowUnsafeRegex":{"type":"boolean","default":false},"http2":{"type":"boolean"},"https":{"if":{"not":{"oneOf":[{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":false,"required":["allowHTTP1"],"properties":{"allowHTTP1":{"type":"boolean"}}}]}},"then":{"setDefaultValue":true}},"ignoreTrailingSlash":{"type":"boolean","default":false},"ignoreDuplicateSlashes":{"type":"boolean","default":false},"disableRequestLogging":{"type":"boolean","default":false},"maxParamLength":{"type":"integer","default":100},"onProtoPoisoning":{"type":"string","default":"error"},"onConstructorPoisoning":{"type":"string","default":"error"},"pluginTimeout":{"type":"integer","default":10000},"requestIdHeader":{"anyOf":[{"type":"boolean"},{"type":"string"}],"default":false},"requestIdLogLabel":{"type":"string","default":"reqId"},"http2SessionTimeout":{"type":"integer","default":72000},"exposeHeadRoutes":{"type":"boolean","default":true},"useSemicolonDelimiter":{"type":"boolean","default":false},"constraints":{"type":"object","additionalProperties":{"type":"object","required":["name","storage","validate","deriveConstraint"],"additionalProperties":true,"properties":{"name":{"type":"string"},"storage":{},"validate":{},"deriveConstraint":{}}}}}};
184902
+ const schema11 = {"type":"object","additionalProperties":false,"properties":{"connectionTimeout":{"type":"integer","default":0},"keepAliveTimeout":{"type":"integer","default":72000},"forceCloseConnections":{"oneOf":[{"type":"string","pattern":"idle"},{"type":"boolean"}]},"maxRequestsPerSocket":{"type":"integer","default":0,"nullable":true},"requestTimeout":{"type":"integer","default":0},"bodyLimit":{"type":"integer","default":1048576},"caseSensitive":{"type":"boolean","default":true},"allowUnsafeRegex":{"type":"boolean","default":false},"http2":{"type":"boolean"},"https":{"if":{"not":{"oneOf":[{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":false,"required":["allowHTTP1"],"properties":{"allowHTTP1":{"type":"boolean"}}}]}},"then":{"setDefaultValue":true}},"ignoreTrailingSlash":{"type":"boolean","default":false},"ignoreDuplicateSlashes":{"type":"boolean","default":false},"disableRequestLogging":{"type":"boolean","default":false},"maxParamLength":{"type":"integer","default":100},"onProtoPoisoning":{"type":"string","default":"error"},"onConstructorPoisoning":{"type":"string","default":"error"},"pluginTimeout":{"type":"integer","default":10000},"requestIdHeader":{"anyOf":[{"type":"boolean"},{"type":"string"}],"default":false},"requestIdLogLabel":{"type":"string","default":"reqId"},"http2SessionTimeout":{"type":"integer","default":72000},"exposeHeadRoutes":{"type":"boolean","default":true},"useSemicolonDelimiter":{"type":"boolean","default":false},"routerOptions":{"type":"object","additionalProperties":false,"properties":{"ignoreTrailingSlash":{"type":"boolean","default":false},"ignoreDuplicateSlashes":{"type":"boolean","default":false},"maxParamLength":{"type":"integer","default":100},"allowUnsafeRegex":{"type":"boolean","default":false},"useSemicolonDelimiter":{"type":"boolean","default":false}}},"constraints":{"type":"object","additionalProperties":{"type":"object","required":["name","storage","validate","deriveConstraint"],"additionalProperties":true,"properties":{"name":{"type":"string"},"storage":{},"validate":{},"deriveConstraint":{}}}}}};
184167
184903
  const func2 = Object.prototype.hasOwnProperty;
184168
184904
  const pattern0 = new RegExp("idle", "u");
184169
184905
 
@@ -185162,56 +185898,223 @@ data["useSemicolonDelimiter"] = coerced25;
185162
185898
  }
185163
185899
  var valid0 = _errs67 === errors;
185164
185900
  if(valid0){
185165
- if(data.constraints !== undefined){
185166
- let data23 = data.constraints;
185901
+ if(data.routerOptions !== undefined){
185902
+ let data23 = data.routerOptions;
185167
185903
  const _errs69 = errors;
185168
185904
  if(errors === _errs69){
185169
185905
  if(data23 && typeof data23 == "object" && !Array.isArray(data23)){
185906
+ if(data23.ignoreTrailingSlash === undefined){
185907
+ data23.ignoreTrailingSlash = false;
185908
+ }
185909
+ if(data23.ignoreDuplicateSlashes === undefined){
185910
+ data23.ignoreDuplicateSlashes = false;
185911
+ }
185912
+ if(data23.maxParamLength === undefined){
185913
+ data23.maxParamLength = 100;
185914
+ }
185915
+ if(data23.allowUnsafeRegex === undefined){
185916
+ data23.allowUnsafeRegex = false;
185917
+ }
185918
+ if(data23.useSemicolonDelimiter === undefined){
185919
+ data23.useSemicolonDelimiter = false;
185920
+ }
185921
+ const _errs71 = errors;
185170
185922
  for(const key2 in data23){
185171
- let data24 = data23[key2];
185172
- const _errs72 = errors;
185173
- if(errors === _errs72){
185174
- if(data24 && typeof data24 == "object" && !Array.isArray(data24)){
185175
- let missing1;
185176
- if(((((data24.name === undefined) && (missing1 = "name")) || ((data24.storage === undefined) && (missing1 = "storage"))) || ((data24.validate === undefined) && (missing1 = "validate"))) || ((data24.deriveConstraint === undefined) && (missing1 = "deriveConstraint"))){
185177
- validate10.errors = [{instancePath:instancePath+"/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/constraints/additionalProperties/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];
185178
- return false;
185923
+ if(!(((((key2 === "ignoreTrailingSlash") || (key2 === "ignoreDuplicateSlashes")) || (key2 === "maxParamLength")) || (key2 === "allowUnsafeRegex")) || (key2 === "useSemicolonDelimiter"))){
185924
+ delete data23[key2];
185179
185925
  }
185180
- else {
185181
- if(data24.name !== undefined){
185182
- let data25 = data24.name;
185183
- if(typeof data25 !== "string"){
185184
- let dataType26 = typeof data25;
185926
+ }
185927
+ if(_errs71 === errors){
185928
+ let data24 = data23.ignoreTrailingSlash;
185929
+ const _errs72 = errors;
185930
+ if(typeof data24 !== "boolean"){
185185
185931
  let coerced26 = undefined;
185186
185932
  if(!(coerced26 !== undefined)){
185187
- if(dataType26 == "number" || dataType26 == "boolean"){
185188
- coerced26 = "" + data25;
185933
+ if(data24 === "false" || data24 === 0 || data24 === null){
185934
+ coerced26 = false;
185189
185935
  }
185190
- else if(data25 === null){
185191
- coerced26 = "";
185936
+ else if(data24 === "true" || data24 === 1){
185937
+ coerced26 = true;
185192
185938
  }
185193
185939
  else {
185194
- validate10.errors = [{instancePath:instancePath+"/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/properties/constraints/additionalProperties/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];
185940
+ validate10.errors = [{instancePath:instancePath+"/routerOptions/ignoreTrailingSlash",schemaPath:"#/properties/routerOptions/properties/ignoreTrailingSlash/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
185195
185941
  return false;
185196
185942
  }
185197
185943
  }
185198
185944
  if(coerced26 !== undefined){
185199
- data25 = coerced26;
185200
- if(data24 !== undefined){
185201
- data24["name"] = coerced26;
185945
+ data24 = coerced26;
185946
+ if(data23 !== undefined){
185947
+ data23["ignoreTrailingSlash"] = coerced26;
185202
185948
  }
185203
185949
  }
185204
185950
  }
185951
+ var valid7 = _errs72 === errors;
185952
+ if(valid7){
185953
+ let data25 = data23.ignoreDuplicateSlashes;
185954
+ const _errs74 = errors;
185955
+ if(typeof data25 !== "boolean"){
185956
+ let coerced27 = undefined;
185957
+ if(!(coerced27 !== undefined)){
185958
+ if(data25 === "false" || data25 === 0 || data25 === null){
185959
+ coerced27 = false;
185960
+ }
185961
+ else if(data25 === "true" || data25 === 1){
185962
+ coerced27 = true;
185963
+ }
185964
+ else {
185965
+ validate10.errors = [{instancePath:instancePath+"/routerOptions/ignoreDuplicateSlashes",schemaPath:"#/properties/routerOptions/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
185966
+ return false;
185205
185967
  }
185206
185968
  }
185969
+ if(coerced27 !== undefined){
185970
+ data25 = coerced27;
185971
+ if(data23 !== undefined){
185972
+ data23["ignoreDuplicateSlashes"] = coerced27;
185973
+ }
185974
+ }
185975
+ }
185976
+ var valid7 = _errs74 === errors;
185977
+ if(valid7){
185978
+ let data26 = data23.maxParamLength;
185979
+ const _errs76 = errors;
185980
+ if(!(((typeof data26 == "number") && (!(data26 % 1) && !isNaN(data26))) && (isFinite(data26)))){
185981
+ let dataType28 = typeof data26;
185982
+ let coerced28 = undefined;
185983
+ if(!(coerced28 !== undefined)){
185984
+ if(dataType28 === "boolean" || data26 === null
185985
+ || (dataType28 === "string" && data26 && data26 == +data26 && !(data26 % 1))){
185986
+ coerced28 = +data26;
185207
185987
  }
185208
185988
  else {
185209
- validate10.errors = [{instancePath:instancePath+"/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/constraints/additionalProperties/type",keyword:"type",params:{type: "object"},message:"must be object"}];
185989
+ validate10.errors = [{instancePath:instancePath+"/routerOptions/maxParamLength",schemaPath:"#/properties/routerOptions/properties/maxParamLength/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
185210
185990
  return false;
185211
185991
  }
185212
185992
  }
185213
- var valid7 = _errs72 === errors;
185214
- if(!valid7){
185993
+ if(coerced28 !== undefined){
185994
+ data26 = coerced28;
185995
+ if(data23 !== undefined){
185996
+ data23["maxParamLength"] = coerced28;
185997
+ }
185998
+ }
185999
+ }
186000
+ var valid7 = _errs76 === errors;
186001
+ if(valid7){
186002
+ let data27 = data23.allowUnsafeRegex;
186003
+ const _errs78 = errors;
186004
+ if(typeof data27 !== "boolean"){
186005
+ let coerced29 = undefined;
186006
+ if(!(coerced29 !== undefined)){
186007
+ if(data27 === "false" || data27 === 0 || data27 === null){
186008
+ coerced29 = false;
186009
+ }
186010
+ else if(data27 === "true" || data27 === 1){
186011
+ coerced29 = true;
186012
+ }
186013
+ else {
186014
+ validate10.errors = [{instancePath:instancePath+"/routerOptions/allowUnsafeRegex",schemaPath:"#/properties/routerOptions/properties/allowUnsafeRegex/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
186015
+ return false;
186016
+ }
186017
+ }
186018
+ if(coerced29 !== undefined){
186019
+ data27 = coerced29;
186020
+ if(data23 !== undefined){
186021
+ data23["allowUnsafeRegex"] = coerced29;
186022
+ }
186023
+ }
186024
+ }
186025
+ var valid7 = _errs78 === errors;
186026
+ if(valid7){
186027
+ let data28 = data23.useSemicolonDelimiter;
186028
+ const _errs80 = errors;
186029
+ if(typeof data28 !== "boolean"){
186030
+ let coerced30 = undefined;
186031
+ if(!(coerced30 !== undefined)){
186032
+ if(data28 === "false" || data28 === 0 || data28 === null){
186033
+ coerced30 = false;
186034
+ }
186035
+ else if(data28 === "true" || data28 === 1){
186036
+ coerced30 = true;
186037
+ }
186038
+ else {
186039
+ validate10.errors = [{instancePath:instancePath+"/routerOptions/useSemicolonDelimiter",schemaPath:"#/properties/routerOptions/properties/useSemicolonDelimiter/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
186040
+ return false;
186041
+ }
186042
+ }
186043
+ if(coerced30 !== undefined){
186044
+ data28 = coerced30;
186045
+ if(data23 !== undefined){
186046
+ data23["useSemicolonDelimiter"] = coerced30;
186047
+ }
186048
+ }
186049
+ }
186050
+ var valid7 = _errs80 === errors;
186051
+ }
186052
+ }
186053
+ }
186054
+ }
186055
+ }
186056
+ }
186057
+ else {
186058
+ validate10.errors = [{instancePath:instancePath+"/routerOptions",schemaPath:"#/properties/routerOptions/type",keyword:"type",params:{type: "object"},message:"must be object"}];
186059
+ return false;
186060
+ }
186061
+ }
186062
+ var valid0 = _errs69 === errors;
186063
+ }
186064
+ else {
186065
+ var valid0 = true;
186066
+ }
186067
+ if(valid0){
186068
+ if(data.constraints !== undefined){
186069
+ let data29 = data.constraints;
186070
+ const _errs82 = errors;
186071
+ if(errors === _errs82){
186072
+ if(data29 && typeof data29 == "object" && !Array.isArray(data29)){
186073
+ for(const key3 in data29){
186074
+ let data30 = data29[key3];
186075
+ const _errs85 = errors;
186076
+ if(errors === _errs85){
186077
+ if(data30 && typeof data30 == "object" && !Array.isArray(data30)){
186078
+ let missing1;
186079
+ if(((((data30.name === undefined) && (missing1 = "name")) || ((data30.storage === undefined) && (missing1 = "storage"))) || ((data30.validate === undefined) && (missing1 = "validate"))) || ((data30.deriveConstraint === undefined) && (missing1 = "deriveConstraint"))){
186080
+ validate10.errors = [{instancePath:instancePath+"/constraints/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/constraints/additionalProperties/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];
186081
+ return false;
186082
+ }
186083
+ else {
186084
+ if(data30.name !== undefined){
186085
+ let data31 = data30.name;
186086
+ if(typeof data31 !== "string"){
186087
+ let dataType31 = typeof data31;
186088
+ let coerced31 = undefined;
186089
+ if(!(coerced31 !== undefined)){
186090
+ if(dataType31 == "number" || dataType31 == "boolean"){
186091
+ coerced31 = "" + data31;
186092
+ }
186093
+ else if(data31 === null){
186094
+ coerced31 = "";
186095
+ }
186096
+ else {
186097
+ validate10.errors = [{instancePath:instancePath+"/constraints/" + key3.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/properties/constraints/additionalProperties/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];
186098
+ return false;
186099
+ }
186100
+ }
186101
+ if(coerced31 !== undefined){
186102
+ data31 = coerced31;
186103
+ if(data30 !== undefined){
186104
+ data30["name"] = coerced31;
186105
+ }
186106
+ }
186107
+ }
186108
+ }
186109
+ }
186110
+ }
186111
+ else {
186112
+ validate10.errors = [{instancePath:instancePath+"/constraints/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/constraints/additionalProperties/type",keyword:"type",params:{type: "object"},message:"must be object"}];
186113
+ return false;
186114
+ }
186115
+ }
186116
+ var valid8 = _errs85 === errors;
186117
+ if(!valid8){
185215
186118
  break;
185216
186119
  }
185217
186120
  }
@@ -185221,7 +186124,7 @@ validate10.errors = [{instancePath:instancePath+"/constraints",schemaPath:"#/pro
185221
186124
  return false;
185222
186125
  }
185223
186126
  }
185224
- var valid0 = _errs69 === errors;
186127
+ var valid0 = _errs82 === errors;
185225
186128
  }
185226
186129
  else {
185227
186130
  var valid0 = true;
@@ -185250,6 +186153,7 @@ var valid0 = true;
185250
186153
  }
185251
186154
  }
185252
186155
  }
186156
+ }
185253
186157
  else {
185254
186158
  validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];
185255
186159
  return false;
@@ -185260,7 +186164,7 @@ return errors === 0;
185260
186164
  }
185261
186165
 
185262
186166
 
185263
- module.exports.defaultInitOptions = {"connectionTimeout":0,"keepAliveTimeout":72000,"maxRequestsPerSocket":0,"requestTimeout":0,"bodyLimit":1048576,"caseSensitive":true,"allowUnsafeRegex":false,"disableRequestLogging":false,"ignoreTrailingSlash":false,"ignoreDuplicateSlashes":false,"maxParamLength":100,"onProtoPoisoning":"error","onConstructorPoisoning":"error","pluginTimeout":10000,"requestIdHeader":false,"requestIdLogLabel":"reqId","http2SessionTimeout":72000,"exposeHeadRoutes":true,"useSemicolonDelimiter":false,"allowErrorHandlerOverride":true}
186167
+ module.exports.defaultInitOptions = {"connectionTimeout":0,"keepAliveTimeout":72000,"maxRequestsPerSocket":0,"requestTimeout":0,"bodyLimit":1048576,"caseSensitive":true,"allowUnsafeRegex":false,"disableRequestLogging":false,"ignoreTrailingSlash":false,"ignoreDuplicateSlashes":false,"maxParamLength":100,"onProtoPoisoning":"error","onConstructorPoisoning":"error","pluginTimeout":10000,"requestIdHeader":false,"requestIdLogLabel":"reqId","http2SessionTimeout":72000,"exposeHeadRoutes":true,"useSemicolonDelimiter":false,"allowErrorHandlerOverride":true,"routerOptions":{"ignoreTrailingSlash":false,"ignoreDuplicateSlashes":false,"maxParamLength":100,"allowUnsafeRegex":false,"useSemicolonDelimiter":false}}
185264
186168
  /* c8 ignore stop */
185265
186169
 
185266
186170
 
@@ -185295,7 +186199,8 @@ const {
185295
186199
  FST_ERR_CTP_INVALID_MEDIA_TYPE,
185296
186200
  FST_ERR_CTP_INVALID_CONTENT_LENGTH,
185297
186201
  FST_ERR_CTP_EMPTY_JSON_BODY,
185298
- FST_ERR_CTP_INSTANCE_ALREADY_STARTED
186202
+ FST_ERR_CTP_INSTANCE_ALREADY_STARTED,
186203
+ FST_ERR_CTP_INVALID_JSON_BODY
185299
186204
  } = __nccwpck_require__(71036)
185300
186205
  const { FSTSEC001 } = __nccwpck_require__(45054)
185301
186206
 
@@ -185445,17 +186350,18 @@ ContentTypeParser.prototype.run = function (contentType, handler, request, reply
185445
186350
  const parser = this.getParser(contentType)
185446
186351
 
185447
186352
  if (parser === undefined) {
185448
- if (request.is404) {
186353
+ if (request.is404 === true) {
185449
186354
  handler(request, reply)
185450
- } else {
185451
- reply.send(new FST_ERR_CTP_INVALID_MEDIA_TYPE(contentType || undefined))
186355
+ return
185452
186356
  }
185453
186357
 
185454
- // Early return to avoid allocating an AsyncResource if it's not needed
186358
+ reply[kReplyIsError] = true
186359
+ reply.send(new FST_ERR_CTP_INVALID_MEDIA_TYPE(contentType || undefined))
185455
186360
  return
185456
186361
  }
185457
186362
 
185458
186363
  const resource = new AsyncResource('content-type-parser:run', request)
186364
+ const done = resource.bind(onDone)
185459
186365
 
185460
186366
  if (parser.asString === true || parser.asBuffer === true) {
185461
186367
  rawBody(
@@ -185465,48 +186371,44 @@ ContentTypeParser.prototype.run = function (contentType, handler, request, reply
185465
186371
  parser,
185466
186372
  done
185467
186373
  )
185468
- } else {
185469
- const result = parser.fn(request, request[kRequestPayloadStream], done)
186374
+ return
186375
+ }
185470
186376
 
185471
- if (result && typeof result.then === 'function') {
185472
- result.then(body => done(null, body), done)
185473
- }
186377
+ const result = parser.fn(request, request[kRequestPayloadStream], done)
186378
+ if (result && typeof result.then === 'function') {
186379
+ result.then(body => { done(null, body) }, done)
185474
186380
  }
185475
186381
 
185476
- function done (error, body) {
185477
- // We cannot use resource.bind() because it is broken in node v12 and v14
185478
- resource.runInAsyncScope(() => {
185479
- resource.emitDestroy()
185480
- if (error) {
185481
- reply[kReplyIsError] = true
185482
- reply.send(error)
185483
- } else {
185484
- request.body = body
185485
- handler(request, reply)
185486
- }
185487
- })
186382
+ function onDone (error, body) {
186383
+ resource.emitDestroy()
186384
+ if (error != null) {
186385
+ // We must close the connection as the client may
186386
+ // send more data
186387
+ reply.header('connection', 'close')
186388
+ reply[kReplyIsError] = true
186389
+ reply.send(error)
186390
+ return
186391
+ }
186392
+ request.body = body
186393
+ handler(request, reply)
185488
186394
  }
185489
186395
  }
185490
186396
 
185491
186397
  function rawBody (request, reply, options, parser, done) {
185492
- const asString = parser.asString
186398
+ const asString = parser.asString === true
185493
186399
  const limit = options.limit === null ? parser.bodyLimit : options.limit
185494
186400
  const contentLength = Number(request.headers['content-length'])
185495
186401
 
185496
186402
  if (contentLength > limit) {
185497
- // We must close the connection as the client is going
185498
- // to send this data anyway
185499
- reply.header('connection', 'close')
185500
- reply.send(new FST_ERR_CTP_BODY_TOO_LARGE())
186403
+ done(new FST_ERR_CTP_BODY_TOO_LARGE(), undefined)
185501
186404
  return
185502
186405
  }
185503
186406
 
185504
186407
  let receivedLength = 0
185505
- let body = asString === true ? '' : []
185506
-
186408
+ let body = asString ? '' : []
185507
186409
  const payload = request[kRequestPayloadStream] || request.raw
185508
186410
 
185509
- if (asString === true) {
186411
+ if (asString) {
185510
186412
  payload.setEncoding('utf8')
185511
186413
  }
185512
186414
 
@@ -185516,7 +186418,7 @@ function rawBody (request, reply, options, parser, done) {
185516
186418
  payload.resume()
185517
186419
 
185518
186420
  function onData (chunk) {
185519
- receivedLength += chunk.length
186421
+ receivedLength += asString ? Buffer.byteLength(chunk) : chunk.length
185520
186422
  const { receivedEncodedLength = 0 } = payload
185521
186423
  // The resulting body length must not exceed bodyLimit (see "zip bomb").
185522
186424
  // The case when encoded length is larger than received length is rather theoretical,
@@ -185525,11 +186427,11 @@ function rawBody (request, reply, options, parser, done) {
185525
186427
  payload.removeListener('data', onData)
185526
186428
  payload.removeListener('end', onEnd)
185527
186429
  payload.removeListener('error', onEnd)
185528
- reply.send(new FST_ERR_CTP_BODY_TOO_LARGE())
186430
+ done(new FST_ERR_CTP_BODY_TOO_LARGE(), undefined)
185529
186431
  return
185530
186432
  }
185531
186433
 
185532
- if (asString === true) {
186434
+ if (asString) {
185533
186435
  body += chunk
185534
186436
  } else {
185535
186437
  body.push(chunk)
@@ -185541,37 +186443,33 @@ function rawBody (request, reply, options, parser, done) {
185541
186443
  payload.removeListener('end', onEnd)
185542
186444
  payload.removeListener('error', onEnd)
185543
186445
 
185544
- if (err !== undefined) {
186446
+ if (err != null) {
185545
186447
  if (!(typeof err.statusCode === 'number' && err.statusCode >= 400)) {
185546
186448
  err.statusCode = 400
185547
186449
  }
185548
- reply[kReplyIsError] = true
185549
- reply.code(err.statusCode).send(err)
186450
+ done(err, undefined)
185550
186451
  return
185551
186452
  }
185552
186453
 
185553
- if (asString === true) {
185554
- receivedLength = Buffer.byteLength(body)
185555
- }
185556
-
185557
186454
  if (!Number.isNaN(contentLength) && (payload.receivedEncodedLength || receivedLength) !== contentLength) {
185558
- reply.header('connection', 'close')
185559
- reply.send(new FST_ERR_CTP_INVALID_CONTENT_LENGTH())
186455
+ done(new FST_ERR_CTP_INVALID_CONTENT_LENGTH(), undefined)
185560
186456
  return
185561
186457
  }
185562
186458
 
185563
- if (asString === false) {
186459
+ if (!asString) {
185564
186460
  body = Buffer.concat(body)
185565
186461
  }
185566
186462
 
185567
186463
  const result = parser.fn(request, body, done)
185568
186464
  if (result && typeof result.then === 'function') {
185569
- result.then(body => done(null, body), done)
186465
+ result.then(body => { done(null, body) }, done)
185570
186466
  }
185571
186467
  }
185572
186468
  }
185573
186469
 
185574
186470
  function getDefaultJsonParser (onProtoPoisoning, onConstructorPoisoning) {
186471
+ const parseOptions = { protoAction: onProtoPoisoning, constructorAction: onConstructorPoisoning }
186472
+
185575
186473
  return defaultJsonParser
185576
186474
 
185577
186475
  function defaultJsonParser (req, body, done) {
@@ -185580,10 +186478,9 @@ function getDefaultJsonParser (onProtoPoisoning, onConstructorPoisoning) {
185580
186478
  return
185581
186479
  }
185582
186480
  try {
185583
- done(null, secureJsonParse(body, { protoAction: onProtoPoisoning, constructorAction: onConstructorPoisoning }))
185584
- } catch (err) {
185585
- err.statusCode = 400
185586
- done(err, undefined)
186481
+ done(null, secureJsonParse(body, parseOptions))
186482
+ } catch {
186483
+ done(new FST_ERR_CTP_INVALID_JSON_BODY(), undefined)
185587
186484
  }
185588
186485
  }
185589
186486
  }
@@ -185987,7 +186884,7 @@ function handleError (reply, error, cb) {
185987
186884
  if (!reply.log[kDisableRequestLogging]) {
185988
186885
  reply.log.warn(
185989
186886
  { req: reply.request, res: reply, err: error },
185990
- error && error.message
186887
+ error?.message
185991
186888
  )
185992
186889
  }
185993
186890
  reply.raw.writeHead(reply.raw.statusCode)
@@ -186037,14 +186934,14 @@ function defaultErrorHandler (error, request, reply) {
186037
186934
  if (!reply.log[kDisableRequestLogging]) {
186038
186935
  reply.log.info(
186039
186936
  { res: reply, err: error },
186040
- error && error.message
186937
+ error?.message
186041
186938
  )
186042
186939
  }
186043
186940
  } else {
186044
186941
  if (!reply.log[kDisableRequestLogging]) {
186045
186942
  reply.log.error(
186046
186943
  { req: request, res: reply, err: error },
186047
- error && error.message
186944
+ error?.message
186048
186945
  )
186049
186946
  }
186050
186947
  }
@@ -186382,6 +187279,11 @@ const codes = {
186382
187279
  "Body cannot be empty when content-type is set to 'application/json'",
186383
187280
  400
186384
187281
  ),
187282
+ FST_ERR_CTP_INVALID_JSON_BODY: createError(
187283
+ 'FST_ERR_CTP_INVALID_JSON_BODY',
187284
+ "Body is not valid JSON but content-type is set to 'application/json'",
187285
+ 400
187286
+ ),
186385
187287
  FST_ERR_CTP_INSTANCE_ALREADY_STARTED: createError(
186386
187288
  'FST_ERR_CTP_INSTANCE_ALREADY_STARTED',
186387
187289
  'Cannot call "%s" when fastify instance is already started!',
@@ -186980,9 +187882,7 @@ function handleRequest (err, request, reply) {
186980
187882
  return
186981
187883
  }
186982
187884
 
186983
- const method = request.raw.method
186984
- const headers = request.headers
186985
- const context = request[kRouteContext]
187885
+ const method = request.method
186986
187886
 
186987
187887
  if (this[kSupportedHTTPMethods].bodyless.has(method)) {
186988
187888
  handler(request, reply)
@@ -186990,28 +187890,26 @@ function handleRequest (err, request, reply) {
186990
187890
  }
186991
187891
 
186992
187892
  if (this[kSupportedHTTPMethods].bodywith.has(method)) {
187893
+ const headers = request.headers
186993
187894
  const contentType = headers['content-type']
186994
- const contentLength = headers['content-length']
186995
- const transferEncoding = headers['transfer-encoding']
186996
187895
 
186997
187896
  if (contentType === undefined) {
186998
- if (
186999
- (contentLength === undefined || contentLength === '0') &&
187000
- transferEncoding === undefined
187001
- ) {
187897
+ const contentLength = headers['content-length']
187898
+ const transferEncoding = headers['transfer-encoding']
187899
+ const isEmptyBody = transferEncoding === undefined &&
187900
+ (contentLength === undefined || contentLength === '0')
187901
+
187902
+ if (isEmptyBody) {
187002
187903
  // Request has no body to parse
187003
187904
  handler(request, reply)
187004
- } else {
187005
- context.contentTypeParser.run('', handler, request, reply)
187006
- }
187007
- } else {
187008
- if (contentLength === undefined && transferEncoding === undefined && method === 'OPTIONS') {
187009
- // OPTIONS can have a Content-Type header without a body
187010
- handler(request, reply)
187011
187905
  return
187012
187906
  }
187013
- context.contentTypeParser.run(contentType, handler, request, reply)
187907
+
187908
+ request[kRouteContext].contentTypeParser.run('', handler, request, reply)
187909
+ return
187014
187910
  }
187911
+
187912
+ request[kRouteContext].contentTypeParser.run(contentType, handler, request, reply)
187015
187913
  return
187016
187914
  }
187017
187915
 
@@ -188173,6 +189071,36 @@ module.exports[kTestInternals] = {
188173
189071
  }
188174
189072
 
188175
189073
 
189074
+ /***/ }),
189075
+
189076
+ /***/ 23602:
189077
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
189078
+
189079
+
189080
+
189081
+ const { kTestInternals } = __nccwpck_require__(34582)
189082
+
189083
+ function withResolvers () {
189084
+ let res, rej
189085
+ const promise = new Promise((resolve, reject) => {
189086
+ res = resolve
189087
+ rej = reject
189088
+ })
189089
+ return { promise, resolve: res, reject: rej }
189090
+ }
189091
+
189092
+ module.exports = {
189093
+ // TODO(20.x): remove when node@20 is not supported
189094
+ withResolvers: typeof Promise.withResolvers === 'function'
189095
+ ? Promise.withResolvers.bind(Promise) // Promise.withResolvers must bind to itself
189096
+ /* c8 ignore next */
189097
+ : withResolvers, // Tested using the kTestInternals
189098
+ [kTestInternals]: {
189099
+ withResolvers
189100
+ }
189101
+ }
189102
+
189103
+
188176
189104
  /***/ }),
188177
189105
 
188178
189106
  /***/ 13411:
@@ -188306,16 +189234,16 @@ Reply.prototype.hijack = function () {
188306
189234
  }
188307
189235
 
188308
189236
  Reply.prototype.send = function (payload) {
188309
- if (this[kReplyIsRunningOnErrorHook] === true) {
189237
+ if (this[kReplyIsRunningOnErrorHook]) {
188310
189238
  throw new FST_ERR_SEND_INSIDE_ONERR()
188311
189239
  }
188312
189240
 
188313
- if (this.sent) {
189241
+ if (this.sent === true) {
188314
189242
  this.log.warn({ err: new FST_ERR_REP_ALREADY_SENT(this.request.url, this.request.method) })
188315
189243
  return this
188316
189244
  }
188317
189245
 
188318
- if (payload instanceof Error || this[kReplyIsError] === true) {
189246
+ if (this[kReplyIsError] || payload instanceof Error) {
188319
189247
  this[kReplyIsError] = false
188320
189248
  onErrorHook(this, payload, onSendHook)
188321
189249
  return this
@@ -188342,8 +189270,8 @@ Reply.prototype.send = function (payload) {
188342
189270
  return this
188343
189271
  }
188344
189272
 
188345
- if (payload?.buffer instanceof ArrayBuffer) {
188346
- if (hasContentType === false) {
189273
+ if (payload.buffer instanceof ArrayBuffer) {
189274
+ if (!hasContentType) {
188347
189275
  this[kReplyHeaders]['content-type'] = CONTENT_TYPE.OCTET
188348
189276
  }
188349
189277
  const payloadToSend = Buffer.isBuffer(payload) ? payload : Buffer.from(payload.buffer, payload.byteOffset, payload.byteLength)
@@ -188351,7 +189279,7 @@ Reply.prototype.send = function (payload) {
188351
189279
  return this
188352
189280
  }
188353
189281
 
188354
- if (hasContentType === false && typeof payload === 'string') {
189282
+ if (!hasContentType && typeof payload === 'string') {
188355
189283
  this[kReplyHeaders]['content-type'] = CONTENT_TYPE.PLAIN
188356
189284
  onSendHook(this, payload)
188357
189285
  return this
@@ -188362,26 +189290,24 @@ Reply.prototype.send = function (payload) {
188362
189290
  if (typeof payload !== 'string') {
188363
189291
  preSerializationHook(this, payload)
188364
189292
  return this
188365
- } else {
188366
- payload = this[kReplySerializer](payload)
188367
189293
  }
189294
+ payload = this[kReplySerializer](payload)
188368
189295
 
188369
189296
  // The indexOf below also matches custom json mimetypes such as 'application/hal+json' or 'application/ld+json'
188370
- } else if (hasContentType === false || contentType.indexOf('json') > -1) {
188371
- if (hasContentType === false) {
189297
+ } else if (!hasContentType || contentType.indexOf('json') !== -1) {
189298
+ if (!hasContentType) {
188372
189299
  this[kReplyHeaders]['content-type'] = CONTENT_TYPE.JSON
188373
- } else {
189300
+ } else if (contentType.indexOf('charset') === -1) {
188374
189301
  // If user doesn't set charset, we will set charset to utf-8
188375
- if (contentType.indexOf('charset') === -1) {
188376
- const customContentType = contentType.trim()
188377
- if (customContentType.endsWith(';')) {
188378
- // custom content-type is ended with ';'
188379
- this[kReplyHeaders]['content-type'] = `${customContentType} charset=utf-8`
188380
- } else {
188381
- this[kReplyHeaders]['content-type'] = `${customContentType}; charset=utf-8`
188382
- }
189302
+ const customContentType = contentType.trim()
189303
+ if (customContentType.endsWith(';')) {
189304
+ // custom content-type is ended with ';'
189305
+ this[kReplyHeaders]['content-type'] = `${customContentType} charset=utf-8`
189306
+ } else {
189307
+ this[kReplyHeaders]['content-type'] = `${customContentType}; charset=utf-8`
188383
189308
  }
188384
189309
  }
189310
+
188385
189311
  if (typeof payload !== 'string') {
188386
189312
  preSerializationHook(this, payload)
188387
189313
  return this
@@ -189595,6 +190521,8 @@ const {
189595
190521
  FST_ERR_HOOK_INVALID_ASYNC_HANDLER
189596
190522
  } = __nccwpck_require__(71036)
189597
190523
 
190524
+ const { FSTDEP022 } = __nccwpck_require__(45054)
190525
+
189598
190526
  const {
189599
190527
  kRoutePrefix,
189600
190528
  kSupportedHTTPMethods,
@@ -189618,6 +190546,20 @@ const { buildErrorHandler } = __nccwpck_require__(11252)
189618
190546
  const { createChildLogger } = __nccwpck_require__(39868)
189619
190547
  const { getGenReqId } = __nccwpck_require__(46742)
189620
190548
 
190549
+ const routerKeys = [
190550
+ 'allowUnsafeRegex',
190551
+ 'buildPrettyMeta',
190552
+ 'caseSensitive',
190553
+ 'constraints',
190554
+ 'defaultRoute',
190555
+ 'ignoreDuplicateSlashes',
190556
+ 'ignoreTrailingSlash',
190557
+ 'maxParamLength',
190558
+ 'onBadUrl',
190559
+ 'querystringParser',
190560
+ 'useSemicolonDelimiter'
190561
+ ]
190562
+
189621
190563
  function buildRouting (options) {
189622
190564
  const router = FindMyWay(options.config)
189623
190565
 
@@ -189651,8 +190593,8 @@ function buildRouting (options) {
189651
190593
 
189652
190594
  globalExposeHeadRoutes = options.exposeHeadRoutes
189653
190595
  disableRequestLogging = options.disableRequestLogging
189654
- ignoreTrailingSlash = options.ignoreTrailingSlash
189655
- ignoreDuplicateSlashes = options.ignoreDuplicateSlashes
190596
+ ignoreTrailingSlash = options.routerOptions.ignoreTrailingSlash
190597
+ ignoreDuplicateSlashes = options.routerOptions.ignoreDuplicateSlashes
189656
190598
  return503OnClosing = Object.hasOwn(options, 'return503OnClosing') ? options.return503OnClosing : true
189657
190599
  keepAliveConnections = fastifyArgs.keepAliveConnections
189658
190600
  },
@@ -190138,6 +191080,24 @@ function runPreParsing (err, request, reply) {
190138
191080
  }
190139
191081
  }
190140
191082
 
191083
+ function buildRouterOptions (options, defaultOptions) {
191084
+ const routerOptions = options.routerOptions || Object.create(null)
191085
+
191086
+ const usedDeprecatedOptions = routerKeys.filter(key => Object.hasOwn(options, key))
191087
+
191088
+ if (usedDeprecatedOptions.length > 0) {
191089
+ FSTDEP022(usedDeprecatedOptions.join(', '))
191090
+ }
191091
+
191092
+ for (const key of routerKeys) {
191093
+ if (!Object.hasOwn(routerOptions, key)) {
191094
+ routerOptions[key] = options[key] ?? defaultOptions[key]
191095
+ }
191096
+ }
191097
+
191098
+ return routerOptions
191099
+ }
191100
+
190141
191101
  /**
190142
191102
  * Used within the route handler as a `net.Socket.close` event handler.
190143
191103
  * The purpose is to remove a socket from the tracked sockets collection when
@@ -190149,7 +191109,7 @@ function removeTrackedSocket () {
190149
191109
 
190150
191110
  function noop () { }
190151
191111
 
190152
- module.exports = { buildRouting, validateBodyLimitOption }
191112
+ module.exports = { buildRouting, validateBodyLimitOption, buildRouterOptions }
190153
191113
 
190154
191114
 
190155
191115
  /***/ }),
@@ -190558,6 +191518,7 @@ const {
190558
191518
  FST_ERR_REOPENED_SERVER,
190559
191519
  FST_ERR_LISTEN_OPTIONS_INVALID
190560
191520
  } = __nccwpck_require__(71036)
191521
+ const PonyPromise = __nccwpck_require__(23602)
190561
191522
 
190562
191523
  module.exports.createServer = createServer
190563
191524
 
@@ -190585,10 +191546,14 @@ function createServer (options, httpHandler) {
190585
191546
  throw new FST_ERR_LISTEN_OPTIONS_INVALID('Invalid options.signal')
190586
191547
  }
190587
191548
 
190588
- if (listenOptions.signal.aborted) {
190589
- this.close()
191549
+ // copy the current signal state
191550
+ this[kState].aborted = listenOptions.signal.aborted
191551
+
191552
+ if (this[kState].aborted) {
191553
+ return this.close()
190590
191554
  } else {
190591
191555
  const onAborted = () => {
191556
+ this[kState].aborted = true
190592
191557
  this.close()
190593
191558
  }
190594
191559
  listenOptions.signal.addEventListener('abort', onAborted, { once: true })
@@ -190643,18 +191608,18 @@ function createServer (options, httpHandler) {
190643
191608
  if (cb === undefined) {
190644
191609
  const listening = listenPromise.call(this, server, listenOptions)
190645
191610
  return listening.then(address => {
190646
- return new Promise((resolve, reject) => {
190647
- if (host === 'localhost') {
190648
- multipleBindings.call(this, server, httpHandler, options, listenOptions, () => {
190649
- this[kState].listening = true
190650
- resolve(address)
190651
- onListenHookRunner(this)
190652
- })
190653
- } else {
191611
+ const { promise, resolve } = PonyPromise.withResolvers()
191612
+ if (host === 'localhost') {
191613
+ multipleBindings.call(this, server, httpHandler, options, listenOptions, () => {
191614
+ this[kState].listening = true
190654
191615
  resolve(address)
190655
191616
  onListenHookRunner(this)
190656
- }
190657
- })
191617
+ })
191618
+ } else {
191619
+ resolve(address)
191620
+ onListenHookRunner(this)
191621
+ }
191622
+ return promise
190658
191623
  })
190659
191624
  }
190660
191625
 
@@ -190670,7 +191635,7 @@ function multipleBindings (mainServer, httpHandler, serverOpts, listenOptions, o
190670
191635
 
190671
191636
  // let's check if we need to bind additional addresses
190672
191637
  dns.lookup(listenOptions.host, { all: true }, (dnsErr, addresses) => {
190673
- if (dnsErr) {
191638
+ if (dnsErr || this[kState].aborted) {
190674
191639
  // not blocking the main server listening
190675
191640
  // this.log.warn('dns.lookup error:', dnsErr)
190676
191641
  onListen()
@@ -190783,35 +191748,31 @@ function listenPromise (server, listenOptions) {
190783
191748
  }
190784
191749
 
190785
191750
  return this.ready().then(() => {
190786
- let errEventHandler
190787
- let listeningEventHandler
191751
+ // skip listen when aborted during ready
191752
+ if (this[kState].aborted) return
191753
+
191754
+ const { promise, resolve, reject } = PonyPromise.withResolvers()
191755
+
191756
+ const errEventHandler = (err) => {
191757
+ cleanup()
191758
+ this[kState].listening = false
191759
+ reject(err)
191760
+ }
191761
+ const listeningEventHandler = () => {
191762
+ cleanup()
191763
+ this[kState].listening = true
191764
+ resolve(logServerAddress.call(this, server, listenOptions.listenTextResolver || defaultResolveServerListeningText))
191765
+ }
190788
191766
  function cleanup () {
190789
191767
  server.removeListener('error', errEventHandler)
190790
191768
  server.removeListener('listening', listeningEventHandler)
190791
191769
  }
190792
- const errEvent = new Promise((resolve, reject) => {
190793
- errEventHandler = (err) => {
190794
- cleanup()
190795
- this[kState].listening = false
190796
- reject(err)
190797
- }
190798
- server.once('error', errEventHandler)
190799
- })
190800
- const listeningEvent = new Promise((resolve, reject) => {
190801
- listeningEventHandler = () => {
190802
- cleanup()
190803
- this[kState].listening = true
190804
- resolve(logServerAddress.call(this, server, listenOptions.listenTextResolver || defaultResolveServerListeningText))
190805
- }
190806
- server.once('listening', listeningEventHandler)
190807
- })
191770
+ server.once('error', errEventHandler)
191771
+ server.once('listening', listeningEventHandler)
190808
191772
 
190809
191773
  server.listen(listenOptions)
190810
191774
 
190811
- return Promise.race([
190812
- errEvent, // e.g invalid port range error is always emitted before the server listening
190813
- listeningEvent
190814
- ])
191775
+ return promise
190815
191776
  })
190816
191777
  }
190817
191778
 
@@ -191263,8 +192224,10 @@ const { createWarning } = __nccwpck_require__(44385)
191263
192224
  * Deprecation codes:
191264
192225
  * - FSTWRN001
191265
192226
  * - FSTSEC001
192227
+ * - FSTDEP022
191266
192228
  *
191267
192229
  * Deprecation Codes FSTDEP001 - FSTDEP021 were used by v4 and MUST NOT not be reused.
192230
+ * - FSTDEP022 is used by v5 and MUST NOT be reused.
191268
192231
  * Warning Codes FSTWRN001 - FSTWRN002 were used by v4 and MUST NOT not be reused.
191269
192232
  */
191270
192233
 
@@ -191296,11 +192259,19 @@ const FSTSEC001 = createWarning({
191296
192259
  unlimited: true
191297
192260
  })
191298
192261
 
192262
+ const FSTDEP022 = createWarning({
192263
+ name: 'FastifyWarning',
192264
+ code: 'FSTDPE022',
192265
+ message: 'The router options for %s property access is deprecated. Please use "options.routerOptions" instead for accessing router options. The router options will be removed in `fastify@6`.',
192266
+ unlimited: true
192267
+ })
192268
+
191299
192269
  module.exports = {
191300
192270
  FSTWRN001,
191301
192271
  FSTWRN003,
191302
192272
  FSTWRN004,
191303
- FSTSEC001
192273
+ FSTSEC001,
192274
+ FSTDEP022
191304
192275
  }
191305
192276
 
191306
192277
 
@@ -202685,28 +203656,28 @@ exports.LruObjectHitStatistics = LruObjectHitStatistics;
202685
203656
  /***/ 64012:
202686
203657
  /***/ ((module) => {
202687
203658
 
202688
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.3","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
203659
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.5","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"}}');
202689
203660
 
202690
203661
  /***/ }),
202691
203662
 
202692
203663
  /***/ 27413:
202693
203664
  /***/ ((module) => {
202694
203665
 
202695
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-s3","description":"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native","version":"3.859.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3","test":"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.ts","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.ts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts","test:integration":"yarn g:vitest run -c vitest.config.integ.ts","test:integration:watch":"yarn g:vitest watch -c vitest.config.integ.ts","test:watch":"yarn g:vitest watch"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.858.0","@aws-sdk/credential-provider-node":"3.859.0","@aws-sdk/middleware-bucket-endpoint":"3.840.0","@aws-sdk/middleware-expect-continue":"3.840.0","@aws-sdk/middleware-flexible-checksums":"3.858.0","@aws-sdk/middleware-host-header":"3.840.0","@aws-sdk/middleware-location-constraint":"3.840.0","@aws-sdk/middleware-logger":"3.840.0","@aws-sdk/middleware-recursion-detection":"3.840.0","@aws-sdk/middleware-sdk-s3":"3.858.0","@aws-sdk/middleware-ssec":"3.840.0","@aws-sdk/middleware-user-agent":"3.858.0","@aws-sdk/region-config-resolver":"3.840.0","@aws-sdk/signature-v4-multi-region":"3.858.0","@aws-sdk/types":"3.840.0","@aws-sdk/util-endpoints":"3.848.0","@aws-sdk/util-user-agent-browser":"3.840.0","@aws-sdk/util-user-agent-node":"3.858.0","@aws-sdk/xml-builder":"3.821.0","@smithy/config-resolver":"^4.1.4","@smithy/core":"^3.7.2","@smithy/eventstream-serde-browser":"^4.0.4","@smithy/eventstream-serde-config-resolver":"^4.1.2","@smithy/eventstream-serde-node":"^4.0.4","@smithy/fetch-http-handler":"^5.1.0","@smithy/hash-blob-browser":"^4.0.4","@smithy/hash-node":"^4.0.4","@smithy/hash-stream-node":"^4.0.4","@smithy/invalid-dependency":"^4.0.4","@smithy/md5-js":"^4.0.4","@smithy/middleware-content-length":"^4.0.4","@smithy/middleware-endpoint":"^4.1.17","@smithy/middleware-retry":"^4.1.18","@smithy/middleware-serde":"^4.0.8","@smithy/middleware-stack":"^4.0.4","@smithy/node-config-provider":"^4.1.3","@smithy/node-http-handler":"^4.1.0","@smithy/protocol-http":"^5.1.2","@smithy/smithy-client":"^4.4.9","@smithy/types":"^4.3.1","@smithy/url-parser":"^4.0.4","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.25","@smithy/util-defaults-mode-node":"^4.0.25","@smithy/util-endpoints":"^3.0.6","@smithy/util-middleware":"^4.0.4","@smithy/util-retry":"^4.0.6","@smithy/util-stream":"^4.2.3","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.6","@types/uuid":"^9.0.1","tslib":"^2.6.2","uuid":"^9.0.1"},"devDependencies":{"@aws-sdk/signature-v4-crt":"3.858.0","@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-s3"}}');
203666
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-s3","description":"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native","version":"3.873.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3","test":"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.mts","test:integration":"yarn g:vitest run -c vitest.config.integ.mts","test:integration:watch":"yarn g:vitest watch -c vitest.config.integ.mts","test:watch":"yarn g:vitest watch"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.873.0","@aws-sdk/credential-provider-node":"3.873.0","@aws-sdk/middleware-bucket-endpoint":"3.873.0","@aws-sdk/middleware-expect-continue":"3.873.0","@aws-sdk/middleware-flexible-checksums":"3.873.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-location-constraint":"3.873.0","@aws-sdk/middleware-logger":"3.873.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-sdk-s3":"3.873.0","@aws-sdk/middleware-ssec":"3.873.0","@aws-sdk/middleware-user-agent":"3.873.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/signature-v4-multi-region":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.873.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.873.0","@aws-sdk/xml-builder":"3.873.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.8.0","@smithy/eventstream-serde-browser":"^4.0.5","@smithy/eventstream-serde-config-resolver":"^4.1.3","@smithy/eventstream-serde-node":"^4.0.5","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-blob-browser":"^4.0.5","@smithy/hash-node":"^4.0.5","@smithy/hash-stream-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/md5-js":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.18","@smithy/middleware-retry":"^4.1.19","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.4.10","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.26","@smithy/util-defaults-mode-node":"^4.0.26","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-stream":"^4.2.4","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.7","@types/uuid":"^9.0.1","tslib":"^2.6.2","uuid":"^9.0.1"},"devDependencies":{"@aws-sdk/signature-v4-crt":"3.873.0","@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-s3"}}');
202696
203667
 
202697
203668
  /***/ }),
202698
203669
 
202699
203670
  /***/ 45188:
202700
203671
  /***/ ((module) => {
202701
203672
 
202702
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.858.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.858.0","@aws-sdk/middleware-host-header":"3.840.0","@aws-sdk/middleware-logger":"3.840.0","@aws-sdk/middleware-recursion-detection":"3.840.0","@aws-sdk/middleware-user-agent":"3.858.0","@aws-sdk/region-config-resolver":"3.840.0","@aws-sdk/types":"3.840.0","@aws-sdk/util-endpoints":"3.848.0","@aws-sdk/util-user-agent-browser":"3.840.0","@aws-sdk/util-user-agent-node":"3.858.0","@smithy/config-resolver":"^4.1.4","@smithy/core":"^3.7.2","@smithy/fetch-http-handler":"^5.1.0","@smithy/hash-node":"^4.0.4","@smithy/invalid-dependency":"^4.0.4","@smithy/middleware-content-length":"^4.0.4","@smithy/middleware-endpoint":"^4.1.17","@smithy/middleware-retry":"^4.1.18","@smithy/middleware-serde":"^4.0.8","@smithy/middleware-stack":"^4.0.4","@smithy/node-config-provider":"^4.1.3","@smithy/node-http-handler":"^4.1.0","@smithy/protocol-http":"^5.1.2","@smithy/smithy-client":"^4.4.9","@smithy/types":"^4.3.1","@smithy/url-parser":"^4.0.4","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.25","@smithy/util-defaults-mode-node":"^4.0.25","@smithy/util-endpoints":"^3.0.6","@smithy/util-middleware":"^4.0.4","@smithy/util-retry":"^4.0.6","@smithy/util-utf8":"^4.0.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}');
203673
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.873.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.873.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.873.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.873.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.873.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.873.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.8.0","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.18","@smithy/middleware-retry":"^4.1.19","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.4.10","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.26","@smithy/util-defaults-mode-node":"^4.0.26","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}');
202703
203674
 
202704
203675
  /***/ }),
202705
203676
 
202706
203677
  /***/ 39955:
202707
203678
  /***/ ((module) => {
202708
203679
 
202709
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.858.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.858.0","@aws-sdk/middleware-host-header":"3.840.0","@aws-sdk/middleware-logger":"3.840.0","@aws-sdk/middleware-recursion-detection":"3.840.0","@aws-sdk/middleware-user-agent":"3.858.0","@aws-sdk/region-config-resolver":"3.840.0","@aws-sdk/types":"3.840.0","@aws-sdk/util-endpoints":"3.848.0","@aws-sdk/util-user-agent-browser":"3.840.0","@aws-sdk/util-user-agent-node":"3.858.0","@smithy/config-resolver":"^4.1.4","@smithy/core":"^3.7.2","@smithy/fetch-http-handler":"^5.1.0","@smithy/hash-node":"^4.0.4","@smithy/invalid-dependency":"^4.0.4","@smithy/middleware-content-length":"^4.0.4","@smithy/middleware-endpoint":"^4.1.17","@smithy/middleware-retry":"^4.1.18","@smithy/middleware-serde":"^4.0.8","@smithy/middleware-stack":"^4.0.4","@smithy/node-config-provider":"^4.1.3","@smithy/node-http-handler":"^4.1.0","@smithy/protocol-http":"^5.1.2","@smithy/smithy-client":"^4.4.9","@smithy/types":"^4.3.1","@smithy/url-parser":"^4.0.4","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.25","@smithy/util-defaults-mode-node":"^4.0.25","@smithy/util-endpoints":"^3.0.6","@smithy/util-middleware":"^4.0.4","@smithy/util-retry":"^4.0.6","@smithy/util-utf8":"^4.0.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}');
203680
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.873.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.873.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.873.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.873.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.873.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.873.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.8.0","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.18","@smithy/middleware-retry":"^4.1.19","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.4.10","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.26","@smithy/util-defaults-mode-node":"^4.0.26","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}');
202710
203681
 
202711
203682
  /***/ }),
202712
203683
 
@@ -202971,8 +203942,7 @@ var external_path_ = __nccwpck_require__(16928);
202971
203942
  const envObject = {
202972
203943
  ACTIONS_RUNTIME_TOKEN: process.env.ACTIONS_RUNTIME_TOKEN,
202973
203944
  ACTIONS_CACHE_URL: process.env.ACTIONS_CACHE_URL,
202974
- RUNNER_TEMP: process.env.RUNNER_TEMP,
202975
- LOG_LEVEL: process.env.LOG_LEVEL
203945
+ RUNNER_TEMP: process.env.RUNNER_TEMP
202976
203946
  };
202977
203947
  const env = {
202978
203948
  valid: Object.values(envObject).every(value => value !== undefined),
@@ -203005,26 +203975,22 @@ const blue = "#7DCFEA";
203005
203975
  const gray = "#686868";
203006
203976
 
203007
203977
  const printColor = (bg, text2) => (...args) => {
203008
- const data = args.map((arg) => {
203009
- if (typeof arg === "object" && arg) {
203010
- const str = arg.toString();
203011
- if (str === "[object Object]") {
203012
- return JSON.stringify(arg, null, 2);
203013
- }
203014
- return str;
203015
- }
203016
- return arg;
203017
- }).join(" ");
203018
- if (isBrowser()) return data;
203978
+ if (isBrowser()) return args;
203019
203979
  try {
203020
203980
  const chalk = getChalk();
203021
- if (bg && text2) return chalk.bgHex(bg).hex(text2)(data);
203022
- if (bg) return chalk.bgHex(bg)(data);
203023
- if (text2) return chalk.hex(text2)(data);
203024
- } catch (e) {
203981
+ const data = args.map((arg) => {
203982
+ if (typeof arg === "object" && arg) {
203983
+ return arg;
203984
+ }
203985
+ if (bg && text2) return chalk.bgHex(bg).hex(text2)(arg);
203986
+ if (bg) return chalk.bgHex(bg)(arg);
203987
+ if (text2) return chalk.hex(text2)(arg);
203988
+ return arg;
203989
+ });
203025
203990
  return data;
203991
+ } catch (e) {
203992
+ return args;
203026
203993
  }
203027
- return data;
203028
203994
  };
203029
203995
  const _log = printColor(void 0, void 0);
203030
203996
  const log = printColor(void 0, dist_text);
@@ -203082,57 +204048,57 @@ const logger = {
203082
204048
  allowDebug,
203083
204049
  _log: (...args) => {
203084
204050
  warnIfNotInitialized();
203085
- const value = addPrefixToArgs(logger.prefix, _log(...args));
204051
+ const value = addPrefixToArgs(logger.prefix, ..._log(...args));
203086
204052
  dist_console.log(...value);
203087
204053
  logger.onLog?.("log", value);
203088
204054
  },
203089
204055
  log: (...args) => {
203090
204056
  warnIfNotInitialized();
203091
- const value = addPrefixToArgs(logger.prefix, log(...args));
204057
+ const value = addPrefixToArgs(logger.prefix, ...log(...args));
203092
204058
  dist_console.log(...value);
203093
204059
  logger.onLog?.("log", value);
203094
204060
  },
203095
204061
  debug: (...args) => {
203096
204062
  if (allowDebug()) {
203097
204063
  warnIfNotInitialized();
203098
- const value = addPrefixToArgs(logger.prefix, debug(" DEBUG "), debugText(...args));
204064
+ const value = addPrefixToArgs(logger.prefix, ...debug(" DEBUG "), ...debugText(...args));
203099
204065
  dist_console.debug(...value);
203100
204066
  logger.onLog?.("debug", value);
203101
204067
  }
203102
204068
  },
203103
204069
  warn: (...args) => {
203104
204070
  warnIfNotInitialized();
203105
- const value = addPrefixToArgs(logger.prefix, warn(" WARN "), warnText(...args));
204071
+ const value = addPrefixToArgs(logger.prefix, ...warn(" WARN "), ...warnText(...args));
203106
204072
  dist_console.warn(...value);
203107
204073
  logger.onLog?.("warn", value);
203108
204074
  },
203109
204075
  error: (...args) => {
203110
204076
  warnIfNotInitialized();
203111
- const value = addPrefixToArgs(logger.prefix, error(" ERROR "), errorText(...args));
204077
+ const value = addPrefixToArgs(logger.prefix, ...error(" ERROR "), ...errorText(...args));
203112
204078
  dist_console.error(...value);
203113
204079
  logger.onLog?.("error", value);
203114
204080
  },
203115
204081
  trace: (...args) => {
203116
204082
  warnIfNotInitialized();
203117
- const value = addPrefixToArgs(logger.prefix, error(" ERROR "), errorText(...args));
204083
+ const value = addPrefixToArgs(logger.prefix, ...error(" ERROR "), ...errorText(...args));
203118
204084
  dist_console.trace(...value);
203119
204085
  logger.onLog?.("trace", value);
203120
204086
  },
203121
204087
  success: (...args) => {
203122
204088
  warnIfNotInitialized();
203123
- const value = addPrefixToArgs(logger.prefix, success(" SUCCESS "), successText(...args));
204089
+ const value = addPrefixToArgs(logger.prefix, ...success(" SUCCESS "), ...successText(...args));
203124
204090
  dist_console.log(...value);
203125
204091
  logger.onLog?.("success", value);
203126
204092
  },
203127
204093
  info: (...args) => {
203128
204094
  warnIfNotInitialized();
203129
- const value = addPrefixToArgs(logger.prefix, info(" INFO "), infoText(...args));
204095
+ const value = addPrefixToArgs(logger.prefix, ...info(" INFO "), ...infoText(...args));
203130
204096
  dist_console.log(...value);
203131
204097
  logger.onLog?.("info", value);
203132
204098
  },
203133
204099
  subLog: (...args) => {
203134
204100
  warnIfNotInitialized();
203135
- const value = addPrefixToArgs(logger.prefix, subLog(...args));
204101
+ const value = addPrefixToArgs(logger.prefix, ...subLog(...args));
203136
204102
  dist_console.log(...value);
203137
204103
  logger.onLog?.("subLog", value);
203138
204104
  },
@@ -203376,13 +204342,12 @@ function getCacheClient() {
203376
204342
  }
203377
204343
 
203378
204344
  ;// CONCATENATED MODULE: ./src/lib/utils.ts
203379
-
203380
204345
  const timingProvider = (name, tracker, fn) => {
203381
204346
  return async (...args) => {
203382
204347
  const start = performance.now();
203383
204348
  const result = await fn(...args);
203384
204349
  const end = performance.now();
203385
- if (env.LOG_LEVEL === 'debug') {
204350
+ if (process.env.LOG_LEVEL === 'debug') {
203386
204351
  console.log(`${name} took ${end - start}ms`);
203387
204352
  }
203388
204353
  tracker[name] += end - start;
@@ -203834,7 +204799,6 @@ async function cleanup(ctx, tracker) {
203834
204799
  ctx.log.info(`Cleaning up ${fileToDelete.length} files (${fileToDelete.map(f => `${f.path} (${f.reason})`)})`);
203835
204800
  for (const file of fileToDelete) {
203836
204801
  try {
203837
- console.log('Deleting', file);
203838
204802
  await provider.delete(file.path);
203839
204803
  ctx.log.info(`Deleted ${file}`);
203840
204804
  }
@@ -203865,12 +204829,11 @@ const getTracker = () => ({
203865
204829
 
203866
204830
 
203867
204831
 
203868
-
203869
204832
  async function server() {
203870
204833
  const tracker = getTracker();
203871
204834
  //* Create the server
203872
204835
  const fastify = fastify_default()({
203873
- logger: env.LOG_LEVEL === 'debug' ? true : false
204836
+ logger: process.env.LOG_LEVEL === 'debug' ? true : false
203874
204837
  });
203875
204838
  //? Server status check
203876
204839
  fastify.get('/', async () => {