sst 2.44.0 → 2.44.2

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.
@@ -148,7 +148,7 @@ export interface JobProps {
148
148
  */
149
149
  memorySize?: JobMemorySize;
150
150
  /**
151
- * The execution timeout. Minimum 5 minutes. Maximum 8 hours.
151
+ * The execution timeout. Minimum 5 minutes. Maximum 36 hours.
152
152
  *
153
153
  * @default "8 hours"
154
154
  *
package/constructs/Job.js CHANGED
@@ -406,7 +406,7 @@ export class Job extends Construct {
406
406
  }
407
407
  normalizeTimeout(timeout) {
408
408
  const value = toCdkDuration(timeout);
409
- if (value.toSeconds() < 5 * 60 || value.toSeconds() > 480 * 60) {
409
+ if (value.toSeconds() < 5 * 60 || value.toSeconds() > 2160 * 60) {
410
410
  throw new Error(`Invalid timeout value for the ${this.node.id} Job.`);
411
411
  }
412
412
  return value;
@@ -4,6 +4,12 @@ export declare const EventBus: EventBusResources;
4
4
  import { PutEventsCommandOutput } from "@aws-sdk/client-eventbridge";
5
5
  import { EventBridgeEvent } from "aws-lambda";
6
6
  import { ZodObject, ZodSchema, z } from "zod";
7
+ /**
8
+ * @link https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-eventbridge/Interface/PutEventsCommandInput/
9
+ */
10
+ type PublishOptions = {
11
+ traceHeader?: string;
12
+ };
7
13
  /**
8
14
  * PutEventsCommandOutput is used in return type of createEvent, in case the consumer of SST builds
9
15
  * their project with declaration files, this is not portable. In order to allow TS to generate a
@@ -18,7 +24,7 @@ export declare function createEventBuilder<Bus extends keyof typeof EventBus, Me
18
24
  metadataFn?: MetadataFunction;
19
25
  validator: Validator;
20
26
  }): <Type extends string, Schema extends Parameters<Validator>[0]>(type: Type, schema: Schema) => {
21
- publish: undefined extends MetadataSchema ? (properties: inferParser<Schema>["in"]) => Promise<PutEventsCommandOutput> : (properties: inferParser<Schema>["in"], metadata: inferParser<MetadataSchema>["in"]) => Promise<void>;
27
+ publish: undefined extends MetadataSchema ? (properties: inferParser<Schema>["in"], options?: PublishOptions) => Promise<PutEventsCommandOutput> : (properties: inferParser<Schema>["in"], metadata: inferParser<MetadataSchema>["in"], options?: PublishOptions) => Promise<void>;
22
28
  type: Type;
23
29
  $input: inferParser<Schema>["in"];
24
30
  $output: inferParser<Schema>["out"];
@@ -10,7 +10,7 @@ export function createEventBuilder(input) {
10
10
  const metadataValidator = input.metadata ? validator(input.metadata) : null;
11
11
  return function event(type, schema) {
12
12
  const validate = validator(schema);
13
- async function publish(properties, metadata) {
13
+ async function publish(properties, metadata, options) {
14
14
  const result = await useLoader("sst.bus.publish", async (input) => {
15
15
  const size = 10;
16
16
  const promises = [];
@@ -18,6 +18,9 @@ export function createEventBuilder(input) {
18
18
  const chunk = input.slice(i, i + size);
19
19
  promises.push(client.send(new PutEventsCommand({
20
20
  Entries: chunk,
21
+ ...(options?.traceHeader && {
22
+ TraceHeader: options.traceHeader,
23
+ }),
21
24
  })));
22
25
  }
23
26
  const settled = await Promise.allSettled(promises);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.44.0",
4
+ "version": "2.44.2",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
@@ -10,7 +10,7 @@
10
10
  "license": "MIT",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "git+https://github.com/sst/sst.git",
13
+ "url": "git+https://github.com/sst/v2.git",
14
14
  "directory": "packages/cli"
15
15
  },
16
16
  "exports": {
@@ -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.44.0",
121
+ "astro-sst": "2.44.2",
122
122
  "async": "^3.2.4",
123
123
  "tsx": "^3.12.1",
124
124
  "typescript": "^5.2.2",
@@ -133,7 +133,7 @@
133
133
  }
134
134
  },
135
135
  "bugs": {
136
- "url": "https://github.com/sst/sst/issues"
136
+ "url": "https://github.com/sst/v2/issues"
137
137
  },
138
138
  "main": "index.js",
139
139
  "directories": {