sst 2.41.5 → 2.43.0

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.
@@ -72,6 +72,9 @@ export declare class SolidStartSite extends SsrSite {
72
72
  allowedHeaders?: string[] | undefined;
73
73
  } | undefined;
74
74
  buildId?: string | undefined;
75
+ warmer?: {
76
+ function: string;
77
+ } | undefined;
75
78
  };
76
79
  getConstructMetadata(): {
77
80
  data: {
@@ -1,7 +1,7 @@
1
1
  import { Construct } from "constructs";
2
2
  import { IGrantable } from "aws-cdk-lib/aws-iam";
3
3
  import { RetentionDays } from "aws-cdk-lib/aws-logs";
4
- import { FunctionOptions, Function as CdkFunction, FunctionUrlOptions } from "aws-cdk-lib/aws-lambda";
4
+ import { FunctionOptions, Function as CdkFunction, FunctionUrlOptions, FunctionUrl } from "aws-cdk-lib/aws-lambda";
5
5
  import { NodeJSProps, FunctionCopyFilesProps } from "./Function.js";
6
6
  import { SSTConstruct } from "./Construct.js";
7
7
  import { BindingResource } from "./util/binding.js";
@@ -29,6 +29,7 @@ export declare class SsrFunction extends Construct implements SSTConstruct {
29
29
  /** @internal */
30
30
  readonly _doNotAllowOthersToBind = true;
31
31
  function: CdkFunction;
32
+ private functionUrl?;
32
33
  private assetReplacer;
33
34
  private assetReplacerPolicy;
34
35
  private missingSourcemap?;
@@ -37,8 +38,9 @@ export declare class SsrFunction extends Construct implements SSTConstruct {
37
38
  get role(): import("aws-cdk-lib/aws-iam").IRole | undefined;
38
39
  get functionArn(): string;
39
40
  get functionName(): string;
41
+ get url(): string | undefined;
40
42
  addEnvironment(key: string, value: string): CdkFunction;
41
- addFunctionUrl(props?: FunctionUrlOptions): import("aws-cdk-lib/aws-lambda").FunctionUrl;
43
+ addFunctionUrl(props?: FunctionUrlOptions): FunctionUrl;
42
44
  grantInvoke(grantee: IGrantable): import("aws-cdk-lib/aws-iam").Grant;
43
45
  attachPermissions(permissions: Permissions): void;
44
46
  _overrideMissingSourcemap(): void;
@@ -29,6 +29,7 @@ export class SsrFunction extends Construct {
29
29
  /** @internal */
30
30
  _doNotAllowOthersToBind = true;
31
31
  function;
32
+ functionUrl;
32
33
  assetReplacer;
33
34
  assetReplacerPolicy;
34
35
  missingSourcemap;
@@ -80,11 +81,15 @@ export class SsrFunction extends Construct {
80
81
  get functionName() {
81
82
  return this.function.functionName;
82
83
  }
84
+ get url() {
85
+ return this.functionUrl?.url;
86
+ }
83
87
  addEnvironment(key, value) {
84
88
  return this.function.addEnvironment(key, value);
85
89
  }
86
90
  addFunctionUrl(props) {
87
- return this.function.addFunctionUrl(props);
91
+ this.functionUrl = this.function.addFunctionUrl(props);
92
+ return this.functionUrl;
88
93
  }
89
94
  grantInvoke(grantee) {
90
95
  return this.function.grantInvoke(grantee);
@@ -1,7 +1,7 @@
1
1
  import { Construct } from "constructs";
2
2
  import { Bucket, BucketProps, IBucket } from "aws-cdk-lib/aws-s3";
3
3
  import { Function as CdkFunction, FunctionProps as CdkFunctionProps } from "aws-cdk-lib/aws-lambda";
4
- import { ICachePolicy, IResponseHeadersPolicy, ViewerProtocolPolicy, AllowedMethods, CachePolicyProps, ErrorResponse } from "aws-cdk-lib/aws-cloudfront";
4
+ import { ICachePolicy, IResponseHeadersPolicy, ViewerProtocolPolicy, AllowedMethods, ErrorResponse } from "aws-cdk-lib/aws-cloudfront";
5
5
  import { S3OriginProps } from "aws-cdk-lib/aws-cloudfront-origins";
6
6
  import { DistributionDomainProps } from "./Distribution.js";
7
7
  import { SSTConstruct } from "./Construct.js";
@@ -13,26 +13,27 @@ import { Size } from "./util/size.js";
13
13
  import { Duration } from "./util/duration.js";
14
14
  import { Permissions } from "./util/permission.js";
15
15
  import { BindingResource, BindingProps } from "./util/binding.js";
16
- type CloudFrontFunctionConfig = {
16
+ export type CloudFrontFunctionConfig = {
17
17
  constructId: string;
18
18
  injections: string[];
19
19
  };
20
- type EdgeFunctionConfig = {
20
+ export type EdgeFunctionConfig = {
21
21
  constructId: string;
22
22
  function: EdgeFunctionProps;
23
23
  };
24
- type FunctionOriginConfig = {
24
+ export type FunctionOriginConfig = {
25
25
  type: "function";
26
26
  constructId: string;
27
27
  function: SsrFunctionProps;
28
28
  injections?: string[];
29
29
  streaming?: boolean;
30
+ warm?: number;
30
31
  };
31
- type ImageOptimizationFunctionOriginConfig = {
32
+ export type ImageOptimizationFunctionOriginConfig = {
32
33
  type: "image-optimization-function";
33
34
  function: CdkFunctionProps;
34
35
  };
35
- type S3OriginConfig = {
36
+ export type S3OriginConfig = {
36
37
  type: "s3";
37
38
  originPath?: string;
38
39
  copy: {
@@ -42,7 +43,7 @@ type S3OriginConfig = {
42
43
  versionedSubDir?: string;
43
44
  }[];
44
45
  };
45
- type OriginGroupConfig = {
46
+ export type OriginGroupConfig = {
46
47
  type: "group";
47
48
  primaryOriginName: string;
48
49
  fallbackOriginName: string;
@@ -424,11 +425,12 @@ export declare abstract class SsrSite extends Construct implements SSTConstruct
424
425
  protected doNotDeploy: boolean;
425
426
  protected bucket: Bucket;
426
427
  protected serverFunction?: EdgeFunction | SsrFunction;
428
+ protected serverFunctions: SsrFunction[];
429
+ protected edgeFunctions: Record<string, EdgeFunction>;
427
430
  private serverFunctionForDev?;
428
431
  private edge?;
429
432
  private distribution;
430
433
  constructor(scope: Construct, id: string, rawProps?: SsrSiteProps);
431
- protected static buildDefaultServerCachePolicyProps(allowedHeaders: string[]): CachePolicyProps;
432
434
  /**
433
435
  * The CloudFront URL of the website.
434
436
  */
@@ -495,6 +497,9 @@ export declare abstract class SsrSite extends Construct implements SSTConstruct
495
497
  allowedHeaders?: string[];
496
498
  };
497
499
  buildId?: string;
500
+ warmer?: {
501
+ function: string;
502
+ };
498
503
  }): {
499
504
  cloudFrontFunctions?: CloudFrontFunctions | undefined;
500
505
  edgeFunctions?: EdgeFunctions | undefined;
@@ -513,6 +518,9 @@ export declare abstract class SsrSite extends Construct implements SSTConstruct
513
518
  allowedHeaders?: string[] | undefined;
514
519
  } | undefined;
515
520
  buildId?: string | undefined;
521
+ warmer?: {
522
+ function: string;
523
+ } | undefined;
516
524
  };
517
525
  }
518
526
  export declare const useSites: () => {
@@ -49,6 +49,8 @@ export class SsrSite extends Construct {
49
49
  doNotDeploy;
50
50
  bucket;
51
51
  serverFunction;
52
+ serverFunctions = [];
53
+ edgeFunctions = {};
52
54
  serverFunctionForDev;
53
55
  edge;
54
56
  distribution;
@@ -87,6 +89,7 @@ export class SsrSite extends Construct {
87
89
  }
88
90
  let s3DeployCRs = [];
89
91
  let ssrFunctions = [];
92
+ let warmConfig = [];
90
93
  let singletonUrlSigner;
91
94
  let singletonCachePolicy;
92
95
  let singletonOriginRequestPolicy;
@@ -107,6 +110,8 @@ export class SsrSite extends Construct {
107
110
  createWarmer();
108
111
  this.bucket = bucket;
109
112
  this.distribution = distribution;
113
+ this.serverFunctions = [...ssrFunctions];
114
+ this.edgeFunctions = { ...edgeFunctions };
110
115
  this.serverFunction = ssrFunctions[0] ?? Object.values(edgeFunctions)[0];
111
116
  this.edge = plan.edge;
112
117
  app.registerTypes(this);
@@ -213,27 +218,26 @@ export class SsrSite extends Construct {
213
218
  // note: Currently all sites have a single server function. When we add
214
219
  // support for multiple server functions (ie. route splitting), we
215
220
  // need to handle warming multiple functions.
216
- if (!warm)
217
- return;
218
- if (warm && plan.edge) {
219
- throw new VisibleError(`In the "${id}" Site, warming is currently supported only for the regional mode.`);
221
+ if (warm && ssrFunctions[0] instanceof SsrFunction) {
222
+ warmConfig.push({ concurrency: warm, function: ssrFunctions[0] });
220
223
  }
221
- if (ssrFunctions.length === 0)
222
- return;
224
+ const warmParams = warmConfig.map((config) => ({
225
+ concurrency: config.concurrency,
226
+ function: config.function.functionName,
227
+ }));
223
228
  // Create warmer function
224
229
  const warmer = new CdkFunction(self, "WarmerFunction", {
225
230
  description: "SSR warmer",
226
- code: Code.fromAsset(path.join(__dirname, "../support/ssr-warmer")),
231
+ code: Code.fromAsset(plan.warmer?.function ?? path.join(__dirname, "../support/ssr-warmer")),
227
232
  runtime: Runtime.NODEJS_18_X,
228
233
  handler: "index.handler",
229
234
  timeout: CdkDuration.minutes(15),
230
235
  memorySize: 128,
231
236
  environment: {
232
- FUNCTION_NAME: ssrFunctions[0].functionName,
233
- CONCURRENCY: warm.toString(),
237
+ WARM_PARAMS: JSON.stringify(warmParams),
234
238
  },
235
239
  });
236
- ssrFunctions[0].grantInvoke(warmer);
240
+ warmConfig.forEach((config) => config.function.grantInvoke(warmer));
237
241
  // Create cron job
238
242
  new Rule(self, "WarmerRule", {
239
243
  schedule: Schedule.rate(CdkDuration.minutes(5)),
@@ -461,6 +465,9 @@ function handler(event) {
461
465
  prefetchSecrets: regional?.prefetchSecrets,
462
466
  });
463
467
  ssrFunctions.push(fn);
468
+ if (props.warm) {
469
+ warmConfig.push({ concurrency: props.warm, function: fn });
470
+ }
464
471
  bucket.grantReadWrite(fn?.role);
465
472
  const fnUrl = fn.addFunctionUrl({
466
473
  authType: regional?.enableServerUrlIamAuth
@@ -638,7 +645,19 @@ function handler(event) {
638
645
  const allowedHeaders = plan.serverCachePolicy?.allowedHeaders ?? [];
639
646
  singletonCachePolicy =
640
647
  singletonCachePolicy ??
641
- new CachePolicy(self, "ServerCache", SsrSite.buildDefaultServerCachePolicyProps(allowedHeaders));
648
+ new CachePolicy(self, "ServerCache", {
649
+ queryStringBehavior: CacheQueryStringBehavior.all(),
650
+ headerBehavior: allowedHeaders.length > 0
651
+ ? CacheHeaderBehavior.allowList(...allowedHeaders)
652
+ : CacheHeaderBehavior.none(),
653
+ cookieBehavior: CacheCookieBehavior.none(),
654
+ defaultTtl: CdkDuration.days(0),
655
+ maxTtl: CdkDuration.days(365),
656
+ minTtl: CdkDuration.days(0),
657
+ enableAcceptEncodingBrotli: true,
658
+ enableAcceptEncodingGzip: true,
659
+ comment: "SST server response cache policy",
660
+ });
642
661
  return singletonCachePolicy;
643
662
  }
644
663
  function useServerBehaviorOriginRequestPolicy() {
@@ -797,21 +816,6 @@ function handler(event) {
797
816
  });
798
817
  }
799
818
  }
800
- static buildDefaultServerCachePolicyProps(allowedHeaders) {
801
- return {
802
- queryStringBehavior: CacheQueryStringBehavior.all(),
803
- headerBehavior: allowedHeaders.length > 0
804
- ? CacheHeaderBehavior.allowList(...allowedHeaders)
805
- : CacheHeaderBehavior.none(),
806
- cookieBehavior: CacheCookieBehavior.none(),
807
- defaultTtl: CdkDuration.days(0),
808
- maxTtl: CdkDuration.days(365),
809
- minTtl: CdkDuration.days(0),
810
- enableAcceptEncodingBrotli: true,
811
- enableAcceptEncodingGzip: true,
812
- comment: "SST server response cache policy",
813
- };
814
- }
815
819
  /**
816
820
  * The CloudFront URL of the website.
817
821
  */
@@ -103,6 +103,9 @@ export declare class SvelteKitSite extends SsrSite {
103
103
  allowedHeaders?: string[] | undefined;
104
104
  } | undefined;
105
105
  buildId?: string | undefined;
106
+ warmer?: {
107
+ function: string;
108
+ } | undefined;
106
109
  };
107
110
  getConstructMetadata(): {
108
111
  data: {
@@ -1,9 +1,10 @@
1
+ import { BaseClient } from "openid-client";
1
2
  import { OauthConfig } from "./oauth.js";
2
3
  export declare const AppleAdapter: (config: OauthConfig) => () => Promise<{
3
4
  type: "success";
4
5
  properties: {
5
6
  tokenset: import("openid-client").TokenSet;
6
- client: import("openid-client").BaseClient;
7
+ client: BaseClient;
7
8
  };
8
9
  } | {
9
10
  type: "step";
@@ -8,7 +8,15 @@ import { useBody, useCookie, useDomainName, usePathParam, useResponse, } from ".
8
8
  // Also note that Apple's discover uri does not work for the OAuth flow, as the
9
9
  // userinfo_endpoint are not included in the response.
10
10
  // await Issuer.discover("https://appleid.apple.com/.well-known/openid-configuration/");
11
- const issuer = await Issuer.discover("https://appleid.apple.com/.well-known/openid-configuration");
11
+ let realIssuer;
12
+ const issuer = new Proxy({}, {
13
+ get: async function (target, prop) {
14
+ if (!realIssuer) {
15
+ realIssuer = await Issuer.discover("https://appleid.apple.com/.well-known/openid-configuration");
16
+ }
17
+ return realIssuer[prop];
18
+ },
19
+ });
12
20
  export const AppleAdapter =
13
21
  /* @__PURE__ */
14
22
  (config) => {
@@ -1,3 +1,4 @@
1
+ import { BaseClient } from "openid-client";
1
2
  import { OidcBasicConfig } from "./oidc.js";
2
3
  import { OauthBasicConfig } from "./oauth.js";
3
4
  type GooglePrompt = "none" | "consent" | "select_account";
@@ -14,7 +15,7 @@ export declare function GoogleAdapter(config: GoogleConfig): (() => Promise<{
14
15
  type: "success";
15
16
  properties: {
16
17
  tokenset: import("openid-client").TokenSet;
17
- client: import("openid-client").BaseClient;
18
+ client: BaseClient;
18
19
  };
19
20
  } | {
20
21
  type: "step";
@@ -28,7 +29,7 @@ export declare function GoogleAdapter(config: GoogleConfig): (() => Promise<{
28
29
  type: "success";
29
30
  properties: {
30
31
  tokenset: import("openid-client").TokenSet;
31
- client: import("openid-client").BaseClient;
32
+ client: BaseClient;
32
33
  };
33
34
  } | {
34
35
  type: "step";
@@ -1,12 +1,20 @@
1
1
  import { Issuer } from "openid-client";
2
2
  import { OidcAdapter } from "./oidc.js";
3
3
  import { OauthAdapter } from "./oauth.js";
4
- const issuer = await Issuer.discover("https://accounts.google.com");
4
+ let realIssuer;
5
+ const issuer = new Proxy({}, {
6
+ get: async function (target, prop) {
7
+ if (!realIssuer) {
8
+ realIssuer = await Issuer.discover("https://accounts.google.com");
9
+ }
10
+ return realIssuer[prop];
11
+ },
12
+ });
5
13
  export function GoogleAdapter(config) {
6
14
  /* @__PURE__ */
7
15
  if (config.mode === "oauth") {
8
16
  return OauthAdapter({
9
- issuer,
17
+ issuer: issuer,
10
18
  ...config,
11
19
  params: {
12
20
  ...(config.accessType && { access_type: config.accessType }),
@@ -15,7 +23,7 @@ export function GoogleAdapter(config) {
15
23
  });
16
24
  }
17
25
  return OidcAdapter({
18
- issuer,
26
+ issuer: issuer,
19
27
  scope: "openid email profile",
20
28
  ...config,
21
29
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.41.5",
4
+ "version": "2.43.0",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "homepage": "https://sst.dev",
27
27
  "dependencies": {
28
- "@aws-cdk/aws-lambda-python-alpha": "2.132.1-alpha.0",
29
- "@aws-cdk/cloud-assembly-schema": "2.132.1",
30
- "@aws-cdk/cloudformation-diff": "2.132.1",
31
- "@aws-cdk/cx-api": "2.132.1",
28
+ "@aws-cdk/aws-lambda-python-alpha": "2.142.1-alpha.0",
29
+ "@aws-cdk/cloud-assembly-schema": "2.142.1",
30
+ "@aws-cdk/cloudformation-diff": "2.142.1",
31
+ "@aws-cdk/cx-api": "2.142.1",
32
32
  "@aws-crypto/sha256-js": "^5.2.0",
33
33
  "@aws-sdk/client-cloudformation": "^3.454.0",
34
34
  "@aws-sdk/client-ecs": "^3.454.0",
@@ -53,11 +53,11 @@
53
53
  "@smithy/signature-v4": "^2.0.16",
54
54
  "@trpc/server": "9.16.0",
55
55
  "adm-zip": "^0.5.10",
56
- "aws-cdk-lib": "2.132.1",
56
+ "aws-cdk-lib": "2.142.1",
57
57
  "aws-iot-device-sdk": "^2.2.13",
58
58
  "aws-sdk": "^2.1501.0",
59
59
  "builtin-modules": "3.2.0",
60
- "cdk-assets": "2.132.1",
60
+ "cdk-assets": "2.142.1",
61
61
  "chalk": "^5.2.0",
62
62
  "chokidar": "^3.5.3",
63
63
  "ci-info": "^3.7.0",
@@ -85,7 +85,7 @@
85
85
  "ora": "^6.1.2",
86
86
  "react": "^18.0.0",
87
87
  "remeda": "^1.3.0",
88
- "sst-aws-cdk": "2.132.1",
88
+ "sst-aws-cdk": "2.142.1",
89
89
  "tree-kill": "^1.2.2",
90
90
  "undici": "^5.12.0",
91
91
  "uuid": "^9.0.0",
@@ -118,7 +118,7 @@
118
118
  "@types/ws": "^8.5.3",
119
119
  "@types/yargs": "^17.0.13",
120
120
  "archiver": "^5.3.1",
121
- "astro-sst": "2.41.5",
121
+ "astro-sst": "2.43.0",
122
122
  "async": "^3.2.4",
123
123
  "tsx": "^3.12.1",
124
124
  "typescript": "^5.2.2",
@@ -231,8 +231,9 @@ export const useContainerHandler = () => {
231
231
  `type=${input.props.container?.cacheTo.type}`,
232
232
  ...(input.props.container?.cacheTo?.params
233
233
  ? Object.entries(input.props.container?.cacheTo?.params).map(([pk, pv]) => `${pk}=${pv}`)
234
- : []).join(","),
235
- ],
234
+ : []),
235
+ ].join(","),
236
+ ,
236
237
  ]
237
238
  : []),
238
239
  `.`,
@@ -279,8 +280,9 @@ export const useContainerHandler = () => {
279
280
  `type=${input.props.container?.cacheTo.type}`,
280
281
  ...(input.props.container?.cacheTo?.params
281
282
  ? Object.entries(input.props.container?.cacheTo?.params).map(([pk, pv]) => `${pk}=${pv}`)
282
- : []).join(","),
283
- ],
283
+ : []),
284
+ ].join(","),
285
+ ,
284
286
  ]
285
287
  : []),
286
288
  `--platform ${platform}`,
@@ -30914,62 +30914,65 @@ var require_dist_cjs59 = __commonJS({
30914
30914
  // support/ssr-warmer/index.ts
30915
30915
  var import_client_lambda = __toESM(require_dist_cjs59(), 1);
30916
30916
  var lambda = new import_client_lambda.LambdaClient({});
30917
- var FUNCTION_NAME = process.env.FUNCTION_NAME;
30918
- var CONCURRENCY = parseInt(process.env.CONCURRENCY);
30917
+ var warmParams = JSON.parse(process.env.WARM_PARAMS);
30919
30918
  function generateUniqueId() {
30920
30919
  return Math.random().toString(36).slice(2, 8);
30921
30920
  }
30922
30921
  async function handler(_event, context) {
30923
30922
  const warmerId = `warmer-${generateUniqueId()}`;
30924
- console.log({
30925
- event: "warmer invoked",
30926
- functionName: FUNCTION_NAME,
30927
- concurrency: CONCURRENCY,
30928
- warmerId
30929
- });
30930
- const ret = await Promise.all(
30931
- Array.from({ length: CONCURRENCY }, (_v, i) => i).map((i) => {
30932
- try {
30933
- return lambda.send(
30934
- new import_client_lambda.InvokeCommand({
30935
- FunctionName: FUNCTION_NAME,
30936
- InvocationType: "RequestResponse",
30937
- Payload: JSON.stringify({
30938
- type: "warmer",
30939
- warmerId,
30940
- index: i,
30941
- concurrency: CONCURRENCY,
30942
- delay: 75
30923
+ for (const warmParam of warmParams) {
30924
+ const { concurrency: CONCURRENCY, function: FUNCTION_NAME } = warmParam;
30925
+ console.log({
30926
+ event: "warmer invoked",
30927
+ functionName: FUNCTION_NAME,
30928
+ concurrency: CONCURRENCY,
30929
+ warmerId
30930
+ });
30931
+ const ret = await Promise.all(
30932
+ Array.from({ length: CONCURRENCY }, (_v, i) => i).map((i) => {
30933
+ try {
30934
+ return lambda.send(
30935
+ new import_client_lambda.InvokeCommand({
30936
+ FunctionName: FUNCTION_NAME,
30937
+ InvocationType: "RequestResponse",
30938
+ Payload: JSON.stringify({
30939
+ type: "warmer",
30940
+ warmerId,
30941
+ index: i,
30942
+ concurrency: CONCURRENCY,
30943
+ delay: 75
30944
+ })
30943
30945
  })
30944
- })
30946
+ );
30947
+ } catch (e) {
30948
+ console.error(`failed to warm up #${i}`, e);
30949
+ }
30950
+ })
30951
+ );
30952
+ const warmedServerIds = [];
30953
+ ret.forEach((r, i) => {
30954
+ if (r?.StatusCode !== 200 || !r?.Payload) {
30955
+ console.error(`failed to warm up #${i}:`, r?.Payload?.toString());
30956
+ return;
30957
+ }
30958
+ const payloadString = r.Payload.transformToString();
30959
+ if (payloadString) {
30960
+ const payload = JSON.parse(
30961
+ r.Payload.transformToString()
30945
30962
  );
30946
- } catch (e) {
30947
- console.error(`failed to warm up #${i}`, e);
30948
- }
30949
- })
30950
- );
30951
- const warmedServerIds = [];
30952
- ret.forEach((r, i) => {
30953
- if (r?.StatusCode !== 200 || !r?.Payload) {
30954
- console.error(`failed to warm up #${i}:`, r?.Payload?.toString());
30955
- return;
30956
- }
30957
- const payloadString = r.Payload.transformToString();
30958
- if (payloadString) {
30959
- const payload = JSON.parse(
30960
- r.Payload.transformToString()
30961
- );
30962
- warmedServerIds.push(payload.serverId);
30963
- } else {
30964
- warmedServerIds.push("unknown");
30965
- }
30966
- });
30967
- console.log({
30968
- event: "warmer result",
30969
- sent: CONCURRENCY,
30970
- success: warmedServerIds.length,
30971
- uniqueServersWarmed: [...new Set(warmedServerIds)].length
30972
- });
30963
+ warmedServerIds.push(payload.serverId);
30964
+ } else {
30965
+ warmedServerIds.push("unknown");
30966
+ }
30967
+ });
30968
+ console.log({
30969
+ event: "warmer result",
30970
+ sent: CONCURRENCY,
30971
+ name: FUNCTION_NAME,
30972
+ success: warmedServerIds.length,
30973
+ uniqueServersWarmed: [...new Set(warmedServerIds)].length
30974
+ });
30975
+ }
30973
30976
  }
30974
30977
  export {
30975
30978
  handler