sst 2.0.0-rc.17 → 2.0.0-rc.19

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/bus.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  export interface Events {
2
2
  }
3
- export declare type EventTypes = keyof Events;
4
- export declare type EventPayload<Type extends EventTypes = EventTypes> = {
3
+ export type EventTypes = keyof Events;
4
+ export type EventPayload<Type extends EventTypes = EventTypes> = {
5
5
  type: Type;
6
6
  sourceID: string;
7
7
  properties: Events[Type];
8
8
  };
9
- declare type Subscription = {
9
+ type Subscription = {
10
10
  type: EventTypes;
11
11
  cb: (payload: any) => void;
12
12
  };
@@ -4,7 +4,7 @@ import { ISDK, SdkProvider } from "aws-cdk/lib/api/aws-auth/index.js";
4
4
  import { ToolkitInfo } from "aws-cdk/lib/api/toolkit-info.js";
5
5
  import { ResourcesToImport } from "aws-cdk/lib/api/util/cloudformation.js";
6
6
  import { StackActivityProgress } from "aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.js";
7
- declare type TemplateBodyParameter = {
7
+ type TemplateBodyParameter = {
8
8
  TemplateBody?: string;
9
9
  TemplateURL?: string;
10
10
  };
@@ -166,7 +166,7 @@ export interface DeployStackOptions {
166
166
  */
167
167
  readonly assetParallelism?: boolean;
168
168
  }
169
- export declare type DeploymentMethod = DirectDeploymentMethod | ChangeSetDeploymentMethod;
169
+ export type DeploymentMethod = DirectDeploymentMethod | ChangeSetDeploymentMethod;
170
170
  export interface DirectDeploymentMethod {
171
171
  readonly method: "direct";
172
172
  }
@@ -1,4 +1,5 @@
1
1
  import { printDeploymentResults } from "../ui/deploy.js";
2
+ import { createSpinner } from "../spinner.js";
2
3
  export const deploy = (program) => program.command("deploy [filter]", "Work on your SST app locally", (yargs) => yargs
3
4
  .option("from", { type: "string" })
4
5
  .option("fullscreen", {
@@ -20,10 +21,13 @@ export const deploy = (program) => program.command("deploy [filter]", "Work on y
20
21
  const result = new CloudAssembly(args.from);
21
22
  return result;
22
23
  }
23
- return await Stacks.synth({
24
+ const spinner = createSpinner("Building stacks");
25
+ const result = await Stacks.synth({
24
26
  fn: project.stacks,
25
27
  mode: "deploy",
26
28
  });
29
+ spinner.succeed();
30
+ return result;
27
31
  })();
28
32
  const target = assembly.stacks.filter((s) => !args.filter ||
29
33
  s.stackName.toLowerCase().includes(args.filter.toLowerCase()));
@@ -1,6 +1,6 @@
1
1
  import * as trpc from "@trpc/server";
2
2
  import { DendriformPatch } from "dendriform-immer-patch-optimiser";
3
- export declare type State = {
3
+ export type State = {
4
4
  app: string;
5
5
  stage: string;
6
6
  functions: Record<string, FunctionState>;
@@ -9,13 +9,13 @@ export declare type State = {
9
9
  status: any;
10
10
  };
11
11
  };
12
- export declare type FunctionState = {
12
+ export type FunctionState = {
13
13
  state: "idle" | "building" | "checking";
14
14
  invocations: Invocation[];
15
15
  issues: Record<string, any[]>;
16
16
  warm: boolean;
17
17
  };
18
- export declare type Invocation = {
18
+ export type Invocation = {
19
19
  id: string;
20
20
  request: any;
21
21
  response?: any;
@@ -28,7 +28,7 @@ export declare type Invocation = {
28
28
  timestamp: number;
29
29
  }[];
30
30
  };
31
- export declare type Context = {
31
+ export type Context = {
32
32
  state: State;
33
33
  };
34
34
  export declare const router: import("@trpc/server/dist/declarations/src/router.js").Router<Context, Context, Record<"getCredentials", import("@trpc/server/dist/declarations/src/internals/procedure.js").Procedure<Context, Context, undefined, undefined, {
@@ -39,4 +39,4 @@ export declare const router: import("@trpc/server/dist/declarations/src/router.j
39
39
  sessionToken: string | undefined;
40
40
  };
41
41
  }>> & Record<"getState", import("@trpc/server/dist/declarations/src/internals/procedure.js").Procedure<Context, Context, undefined, undefined, State>>, Record<"deploy", import("@trpc/server/dist/declarations/src/internals/procedure.js").Procedure<Context, Context, undefined, undefined, void>>, Record<"onStateChange", import("@trpc/server/dist/declarations/src/internals/procedure.js").Procedure<Context, Context, undefined, undefined, trpc.Subscription<DendriformPatch[]>>>, trpc.DefaultErrorShape>;
42
- export declare type Router = typeof router;
42
+ export type Router = typeof router;
@@ -1,7 +1,7 @@
1
1
  import { FunctionState, State } from "./router.js";
2
2
  import { WritableDraft } from "immer/dist/internal.js";
3
3
  import { DendriformPatch } from "dendriform-immer-patch-optimiser";
4
- declare type Opts = {
4
+ type Opts = {
5
5
  port: number;
6
6
  key: any;
7
7
  cert: any;
package/cli/program.d.ts CHANGED
@@ -6,4 +6,4 @@ export declare const program: import("yargs").Argv<{
6
6
  } & {
7
7
  region: string | undefined;
8
8
  }>;
9
- export declare type Program = typeof program;
9
+ export type Program = typeof program;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
- declare type EnvironmentData = {
2
+ type EnvironmentData = {
3
3
  systemPlatform: NodeJS.Platform;
4
4
  systemRelease: string;
5
5
  systemArchitecture: string;
@@ -14,8 +14,8 @@ import * as apigV2Cors from "./util/apiGatewayV2Cors.js";
14
14
  import * as apigV2Domain from "./util/apiGatewayV2Domain.js";
15
15
  import * as apigV2AccessLog from "./util/apiGatewayV2AccessLog.js";
16
16
  declare const PayloadFormatVersions: readonly ["1.0", "2.0"];
17
- export declare type ApiPayloadFormatVersion = typeof PayloadFormatVersions[number];
18
- export declare type ApiAuthorizer = ApiUserPoolAuthorizer | ApiJwtAuthorizer | ApiLambdaAuthorizer;
17
+ export type ApiPayloadFormatVersion = typeof PayloadFormatVersions[number];
18
+ export type ApiAuthorizer = ApiUserPoolAuthorizer | ApiJwtAuthorizer | ApiLambdaAuthorizer;
19
19
  interface ApiBaseAuthorizer {
20
20
  /**
21
21
  * The name of the authorizer.
@@ -393,7 +393,7 @@ export interface ApiProps<Authorizers extends Record<string, ApiAuthorizer> = Re
393
393
  httpStages?: Omit<apig.HttpStageProps, "httpApi">[];
394
394
  };
395
395
  }
396
- export declare type ApiRouteProps<AuthorizerKeys> = FunctionInlineDefinition | ApiFunctionRouteProps<AuthorizerKeys> | ApiHttpRouteProps<AuthorizerKeys> | ApiAlbRouteProps<AuthorizerKeys> | ApiGraphQLRouteProps<AuthorizerKeys> | ApiPothosRouteProps<AuthorizerKeys>;
396
+ export type ApiRouteProps<AuthorizerKeys> = FunctionInlineDefinition | ApiFunctionRouteProps<AuthorizerKeys> | ApiHttpRouteProps<AuthorizerKeys> | ApiAlbRouteProps<AuthorizerKeys> | ApiGraphQLRouteProps<AuthorizerKeys> | ApiPothosRouteProps<AuthorizerKeys>;
397
397
  interface ApiBaseRouteProps<AuthorizerKeys = string> {
398
398
  authorizer?: "none" | "iam" | (string extends AuthorizerKeys ? Omit<AuthorizerKeys, "none" | "iam"> : AuthorizerKeys);
399
399
  authorizationScopes?: string[];
@@ -203,7 +203,7 @@ export interface ApiGatewayV1ApiProps<Authorizers extends Record<string, ApiGate
203
203
  };
204
204
  };
205
205
  }
206
- export declare type ApiGatewayV1ApiRouteProps<AuthorizerKeys> = FunctionInlineDefinition | ApiGatewayV1ApiFunctionRouteProps<AuthorizerKeys>;
206
+ export type ApiGatewayV1ApiRouteProps<AuthorizerKeys> = FunctionInlineDefinition | ApiGatewayV1ApiFunctionRouteProps<AuthorizerKeys>;
207
207
  /**
208
208
  * Specify a function route handler and configure additional options
209
209
  *
@@ -230,7 +230,7 @@ export interface ApiGatewayV1ApiFunctionRouteProps<AuthorizerKeys = never> {
230
230
  function?: lambda.IFunction;
231
231
  };
232
232
  }
233
- export declare type ApiGatewayV1ApiAuthorizer = ApiGatewayV1ApiUserPoolsAuthorizer | ApiGatewayV1ApiLambdaTokenAuthorizer | ApiGatewayV1ApiLambdaRequestAuthorizer;
233
+ export type ApiGatewayV1ApiAuthorizer = ApiGatewayV1ApiUserPoolsAuthorizer | ApiGatewayV1ApiLambdaTokenAuthorizer | ApiGatewayV1ApiLambdaRequestAuthorizer;
234
234
  interface ApiGatewayV1ApiBaseAuthorizer {
235
235
  /**
236
236
  * The name of the authorizer.
@@ -42,8 +42,8 @@ export interface AppDeployProps {
42
42
  readonly mode: "deploy" | "dev" | "remove";
43
43
  readonly bootstrap: Awaited<ReturnType<typeof useBootstrap>>;
44
44
  }
45
- declare type AppRemovalPolicy = Lowercase<keyof typeof cdk.RemovalPolicy>;
46
- export declare type AppProps = cdk.AppProps;
45
+ type AppRemovalPolicy = Lowercase<keyof typeof cdk.RemovalPolicy>;
46
+ export type AppProps = cdk.AppProps;
47
47
  /**
48
48
  * The App construct extends cdk.App and is used internally by SST.
49
49
  */
@@ -178,7 +178,7 @@ export interface MappingTemplateInline {
178
178
  */
179
179
  inline: string;
180
180
  }
181
- export declare type MappingTemplate = MappingTemplateFile | MappingTemplateInline;
181
+ export type MappingTemplate = MappingTemplateFile | MappingTemplateInline;
182
182
  /**
183
183
  * Used to define full resolver config
184
184
  */
@@ -34,9 +34,9 @@ declare const supportedRuntimes: {
34
34
  java11: cdk.aws_lambda.Runtime;
35
35
  "go1.x": cdk.aws_lambda.Runtime;
36
36
  };
37
- export declare type Runtime = keyof typeof supportedRuntimes;
38
- export declare type FunctionInlineDefinition = string | Function;
39
- export declare type FunctionDefinition = string | Function | FunctionProps;
37
+ export type Runtime = keyof typeof supportedRuntimes;
38
+ export type FunctionInlineDefinition = string | Function;
39
+ export type FunctionDefinition = string | Function | FunctionProps;
40
40
  export interface FunctionUrlCorsProps extends functionUrlCors.CorsProps {
41
41
  }
42
42
  export interface FunctionHooks {
@@ -505,7 +505,7 @@ export interface JavaProps {
505
505
  */
506
506
  experimentalUseProvidedRuntime?: "provided" | "provided.al2";
507
507
  }
508
- export declare type FunctionBundleProp = FunctionBundlePythonProps | boolean;
508
+ export type FunctionBundleProp = FunctionBundlePythonProps | boolean;
509
509
  interface FunctionBundleBase {
510
510
  }
511
511
  /**
@@ -6,8 +6,8 @@ export declare function stack(app: App, fn: FunctionalStack<any>, props?: StackP
6
6
  export declare function use<T>(stack: FunctionalStack<T>): T;
7
7
  export declare function dependsOn(stack: FunctionalStack<any>): void;
8
8
  export declare function getStack(stack: FunctionalStack<any>): Stack;
9
- export declare type StackContext = {
9
+ export type StackContext = {
10
10
  app: App;
11
11
  stack: Stack;
12
12
  };
13
- export declare type FunctionalStack<T> = (this: Stack, ctx: StackContext) => T | Promise<T>;
13
+ export type FunctionalStack<T> = (this: Stack, ctx: StackContext) => T | Promise<T>;
@@ -5,7 +5,7 @@ import { Function } from "./Function.js";
5
5
  import { Duration } from "./util/duration.js";
6
6
  import { Permissions } from "./util/permission.js";
7
7
  import { IVpc } from "aws-cdk-lib/aws-ec2";
8
- export declare type JobMemorySize = "3 GB" | "7 GB" | "15 GB" | "145 GB";
8
+ export type JobMemorySize = "3 GB" | "7 GB" | "15 GB" | "145 GB";
9
9
  export interface JobProps {
10
10
  /**
11
11
  * Path to the entry point and handler function. Of the format:
@@ -1,42 +1,42 @@
1
1
  import { SSTConstruct } from "./Construct.js";
2
- declare type ExtractMetadata<T extends SSTConstruct> = ReturnType<T["getConstructMetadata"]> & {
2
+ type ExtractMetadata<T extends SSTConstruct> = ReturnType<T["getConstructMetadata"]> & {
3
3
  id: string;
4
4
  addr: string;
5
5
  stack: string;
6
6
  };
7
7
  import type { Api } from "./Api.js";
8
- export declare type ApiMetadata = ExtractMetadata<Api<any>>;
8
+ export type ApiMetadata = ExtractMetadata<Api<any>>;
9
9
  import { GraphQLApi } from "./GraphQLApi.js";
10
- export declare type GraphQLApiMetadata = ExtractMetadata<GraphQLApi>;
10
+ export type GraphQLApiMetadata = ExtractMetadata<GraphQLApi>;
11
11
  import type { ApiGatewayV1Api } from "./ApiGatewayV1Api.js";
12
- export declare type ApiGatewayV1ApiMetadata = ExtractMetadata<ApiGatewayV1Api<any>>;
12
+ export type ApiGatewayV1ApiMetadata = ExtractMetadata<ApiGatewayV1Api<any>>;
13
13
  import type { Cognito } from "./Cognito.js";
14
- export declare type AuthMetadata = ExtractMetadata<Cognito>;
14
+ export type AuthMetadata = ExtractMetadata<Cognito>;
15
15
  import type { AppSyncApi } from "./AppSyncApi.js";
16
- export declare type AppSyncApiMetadata = ExtractMetadata<AppSyncApi>;
16
+ export type AppSyncApiMetadata = ExtractMetadata<AppSyncApi>;
17
17
  import type { Bucket } from "./Bucket.js";
18
- export declare type BucketMetadata = ExtractMetadata<Bucket>;
18
+ export type BucketMetadata = ExtractMetadata<Bucket>;
19
19
  import type { Cron } from "./Cron.js";
20
- export declare type CronMetadata = ExtractMetadata<Cron>;
20
+ export type CronMetadata = ExtractMetadata<Cron>;
21
21
  import type { EventBus } from "./EventBus.js";
22
- export declare type EventBusMetadata = ExtractMetadata<EventBus>;
22
+ export type EventBusMetadata = ExtractMetadata<EventBus>;
23
23
  import type { Function as Fn } from "./Function.js";
24
- export declare type FunctionMetadata = ExtractMetadata<Fn>;
24
+ export type FunctionMetadata = ExtractMetadata<Fn>;
25
25
  import type { KinesisStream } from "./KinesisStream.js";
26
- export declare type KinesisStreamMetadata = ExtractMetadata<KinesisStream>;
26
+ export type KinesisStreamMetadata = ExtractMetadata<KinesisStream>;
27
27
  import type { NextjsSite } from "./NextjsSite.js";
28
- export declare type NextjsMetadata = ExtractMetadata<NextjsSite>;
28
+ export type NextjsMetadata = ExtractMetadata<NextjsSite>;
29
29
  import type { Queue } from "./Queue.js";
30
- export declare type QueueMetadata = ExtractMetadata<Queue>;
30
+ export type QueueMetadata = ExtractMetadata<Queue>;
31
31
  import type { StaticSite } from "./StaticSite.js";
32
- export declare type StaticSiteMetadata = ExtractMetadata<StaticSite>;
32
+ export type StaticSiteMetadata = ExtractMetadata<StaticSite>;
33
33
  import type { Table } from "./Table.js";
34
- export declare type TableMetadata = ExtractMetadata<Table>;
34
+ export type TableMetadata = ExtractMetadata<Table>;
35
35
  import type { Topic } from "./Topic.js";
36
- export declare type TopicMetadata = ExtractMetadata<Topic>;
36
+ export type TopicMetadata = ExtractMetadata<Topic>;
37
37
  import type { WebSocketApi } from "./WebSocketApi.js";
38
- export declare type WebSocketApiMetadata = ExtractMetadata<WebSocketApi>;
38
+ export type WebSocketApiMetadata = ExtractMetadata<WebSocketApi>;
39
39
  import type { RDS } from "./RDS.js";
40
- export declare type RDSMetadata = ExtractMetadata<RDS>;
41
- export declare type Metadata = ApiMetadata | ApiGatewayV1ApiMetadata | AuthMetadata | AppSyncApiMetadata | BucketMetadata | CronMetadata | EventBusMetadata | FunctionMetadata | KinesisStreamMetadata | NextjsMetadata | QueueMetadata | StaticSiteMetadata | TableMetadata | TopicMetadata | WebSocketApiMetadata | GraphQLApiMetadata | RDSMetadata;
40
+ export type RDSMetadata = ExtractMetadata<RDS>;
41
+ export type Metadata = ApiMetadata | ApiGatewayV1ApiMetadata | AuthMetadata | AppSyncApiMetadata | BucketMetadata | CronMetadata | EventBusMetadata | FunctionMetadata | KinesisStreamMetadata | NextjsMetadata | QueueMetadata | StaticSiteMetadata | TableMetadata | TopicMetadata | WebSocketApiMetadata | GraphQLApiMetadata | RDSMetadata;
42
42
  export {};
@@ -134,7 +134,7 @@ export interface RDSProps {
134
134
  secret?: secretsManager.ISecret;
135
135
  };
136
136
  }
137
- export declare type RDSEngineType = RDSProps["engine"];
137
+ export type RDSEngineType = RDSProps["engine"];
138
138
  export interface RDSCdkServerlessClusterProps extends Omit<rds.ServerlessClusterProps, "vpc" | "engine" | "defaultDatabaseName" | "scaling"> {
139
139
  vpc?: ec2.IVpc;
140
140
  }
@@ -1,7 +1,7 @@
1
1
  import { Construct } from "constructs";
2
2
  import { StaticSite, StaticSiteProps } from "./StaticSite.js";
3
3
  import { SSTConstruct } from "./Construct.js";
4
- export declare type ReactStaticSiteProps = StaticSiteProps;
4
+ export type ReactStaticSiteProps = StaticSiteProps;
5
5
  /**
6
6
  * The `ReactStaticSite` construct is a higher level CDK construct that makes it easy to create a React single page app.
7
7
  *
@@ -10,7 +10,7 @@ import { EdgeFunction } from "./EdgeFunction.js";
10
10
  import { BaseSiteDomainProps, BaseSiteCdkDistributionProps } from "./BaseSite.js";
11
11
  import { Permissions } from "./util/permission.js";
12
12
  import { FunctionBindingProps } from "./util/functionBinding.js";
13
- export declare type SsrBuildConfig = {
13
+ export type SsrBuildConfig = {
14
14
  serverBuildOutputFile: string;
15
15
  clientBuildOutputDir: string;
16
16
  clientBuildVersionedSubDir: string;
@@ -5,7 +5,7 @@ import { FunctionProps, Function as Fn } from "./Function.js";
5
5
  import * as Config from "./Config.js";
6
6
  import { SSTConstruct } from "./Construct.js";
7
7
  import { Permissions } from "./util/permission.js";
8
- export declare type StackProps = cdk.StackProps;
8
+ export type StackProps = cdk.StackProps;
9
9
  /**
10
10
  * The Stack construct extends cdk.Stack. It automatically prefixes the stack names with the stage and app name to ensure that they can be deployed to multiple regions in the same AWS account. It also ensure that the stack uses the same AWS profile and region as the app. They're defined using functions that return resources that can be imported by other stacks.
11
11
  *
@@ -80,7 +80,7 @@ export interface TableGlobalIndexProps {
80
80
  index?: Omit<dynamodb.GlobalSecondaryIndexProps, "indexName" | "partitionKey" | "sortKey">;
81
81
  };
82
82
  }
83
- declare type TableFieldType = Lowercase<keyof typeof dynamodb.AttributeType>;
83
+ type TableFieldType = Lowercase<keyof typeof dynamodb.AttributeType>;
84
84
  export interface TableProps {
85
85
  /**
86
86
  * An object defining the fields of the table. Key is the name of the field and the value is the type.
@@ -1,4 +1,4 @@
1
- declare type Task = () => Promise<void>;
1
+ type Task = () => Promise<void>;
2
2
  export declare const useDeferredTasks: () => {
3
3
  add(task: Task): void;
4
4
  run(): Promise<unknown>;
@@ -6,7 +6,7 @@ export interface AccessLogProps {
6
6
  destinationArn?: string;
7
7
  retention?: Lowercase<keyof typeof logs.RetentionDays>;
8
8
  }
9
- export declare type AccessLogData = {
9
+ export type AccessLogData = {
10
10
  logGroup: logs.LogGroup | undefined;
11
11
  format: apig.AccessLogFormat;
12
12
  destination: apig.LogGroupLogDestination;
@@ -1,3 +1,3 @@
1
1
  import { Duration as CDKDuration } from "aws-cdk-lib";
2
- export declare type Duration = `${number} ${"second" | "seconds" | "minute" | "minutes" | "hour" | "hours" | "day" | "days"}`;
2
+ export type Duration = `${number} ${"second" | "seconds" | "minute" | "minutes" | "hour" | "hours" | "day" | "days"}`;
3
3
  export declare function toCdkDuration(duration: Duration): CDKDuration;
@@ -1,8 +1,8 @@
1
1
  import { IConstruct } from "constructs";
2
2
  import * as iam from "aws-cdk-lib/aws-iam";
3
- export declare type Permissions = "*" | Permission[];
4
- declare type SupportedPermissions = "execute-api" | "appsync" | "dynamodb" | "sns" | "sqs" | "events" | "kinesis" | "s3" | "rds-data" | "secretsmanager" | "lambda" | "ssm";
5
- declare type Permission = SupportedPermissions | Omit<string, SupportedPermissions> | IConstruct | [IConstruct, string] | iam.PolicyStatement;
3
+ export type Permissions = "*" | Permission[];
4
+ type SupportedPermissions = "execute-api" | "appsync" | "dynamodb" | "sns" | "sqs" | "events" | "kinesis" | "s3" | "rds-data" | "secretsmanager" | "lambda" | "ssm";
5
+ type Permission = SupportedPermissions | Omit<string, SupportedPermissions> | IConstruct | [IConstruct, string] | iam.PolicyStatement;
6
6
  export declare function attachPermissionsToRole(role: iam.Role, permissions: Permissions): void;
7
7
  export declare function attachPermissionsToPolicy(policy: iam.Policy, permissions: Permissions): void;
8
8
  export {};
@@ -1,3 +1,3 @@
1
1
  import * as cdk from "aws-cdk-lib";
2
- export declare type Size = `${number} ${"MB" | "GB"}`;
2
+ export type Size = `${number} ${"MB" | "GB"}`;
3
3
  export declare function toCdkSize(size: Size): cdk.Size;
@@ -9,7 +9,7 @@ export interface Handlers {
9
9
  response: SQSBatchResponse;
10
10
  };
11
11
  }
12
- declare type HandlerTypes = keyof Handlers;
12
+ type HandlerTypes = keyof Handlers;
13
13
  export declare function useEvent<Type extends HandlerTypes>(type: Type): Handlers[Type]["event"];
14
14
  export declare function useLambdaContext(): LambdaContext;
15
15
  export declare function Handler<Type extends HandlerTypes, Event = Handlers[Type]["event"], Response = Handlers[Type]["response"]>(type: Type, cb: (evt: Event, ctx: LambdaContext) => Promise<Response>): (event: Event, context: LambdaContext) => Promise<Response>;
package/credentials.d.ts CHANGED
@@ -4,7 +4,7 @@ import { RegionInputConfig } from "@aws-sdk/config-resolver";
4
4
  import { RetryInputConfig } from "@aws-sdk/middleware-retry";
5
5
  import { AwsAuthInputConfig } from "@aws-sdk/middleware-signing";
6
6
  import { SdkProvider } from "aws-cdk/lib/api/aws-auth/sdk-provider.js";
7
- declare type Config = RegionInputConfig & RetryInputConfig & AwsAuthInputConfig & HostHeaderConditionConfig;
7
+ type Config = RegionInputConfig & RetryInputConfig & AwsAuthInputConfig & HostHeaderConditionConfig;
8
8
  export declare const useAWSCredentialsProvider: () => import("@aws-sdk/types").CredentialProvider;
9
9
  export declare const useAWSCredentials: () => Promise<import("@aws-sdk/types").Credentials>;
10
10
  export declare const useSTSIdentity: () => Promise<import("@aws-sdk/client-sts").GetCallerIdentityCommandOutput>;
@@ -1,3 +1,3 @@
1
1
  import { APIGatewayProxyStructuredResultV2 } from "aws-lambda";
2
2
  export declare function createAdapter<A extends (config: any) => Adapter>(adapter: A): A;
3
- export declare type Adapter = () => Promise<APIGatewayProxyStructuredResultV2>;
3
+ export type Adapter = () => Promise<APIGatewayProxyStructuredResultV2>;
@@ -5,17 +5,17 @@ import { OidcAdapter } from "./oidc.js";
5
5
  const issuer = new Issuer({
6
6
  issuer: "https://github.com",
7
7
  authorization_endpoint: "https://github.com/login/oauth/authorize",
8
- token_endpoint: "https://github.com/login/oauth/access_token"
8
+ token_endpoint: "https://github.com/login/oauth/access_token",
9
9
  });
10
10
  export const GithubAdapter = /* @__PURE__ */ createAdapter((config) => {
11
- if ("clientSecret" in config) {
11
+ if (config.clientSecret) {
12
12
  return OauthAdapter({
13
13
  issuer,
14
- ...config
14
+ ...config,
15
15
  });
16
16
  }
17
17
  return OidcAdapter({
18
18
  issuer,
19
- ...config
19
+ ...config,
20
20
  });
21
21
  });
@@ -1,6 +1,6 @@
1
1
  import { OauthBasicConfig } from "./oauth.js";
2
2
  import { OidcBasicConfig } from "./oidc.js";
3
- declare type GoogleConfig = (OauthBasicConfig & {
3
+ type GoogleConfig = (OauthBasicConfig & {
4
4
  mode: "oauth";
5
5
  }) | (OidcBasicConfig & {
6
6
  mode: "oidc";
@@ -3,7 +3,7 @@ import { APIGatewayProxyStructuredResultV2 } from "aws-lambda";
3
3
  export interface SessionTypes {
4
4
  public: {};
5
5
  }
6
- export declare type SessionValue = {
6
+ export type SessionValue = {
7
7
  [type in keyof SessionTypes]: {
8
8
  type: type;
9
9
  properties: SessionTypes[type];
@@ -4,10 +4,10 @@ export interface SecretResources {
4
4
  }
5
5
  export interface ConfigTypes {
6
6
  }
7
- export declare type ParameterTypes = {
7
+ export type ParameterTypes = {
8
8
  [T in keyof ParameterResources]: string;
9
9
  };
10
- export declare type SecretTypes = {
10
+ export type SecretTypes = {
11
11
  [T in keyof SecretResources]: string;
12
12
  };
13
13
  export declare const Config: ConfigTypes & ParameterTypes & SecretTypes;
@@ -2,10 +2,10 @@ export interface JobResources {
2
2
  }
3
3
  export interface JobTypes {
4
4
  }
5
- export declare type JobRunProps<T extends keyof JobResources> = {
5
+ export type JobRunProps<T extends keyof JobResources> = {
6
6
  payload?: JobTypes[T];
7
7
  };
8
- export declare type JobType = {
8
+ export type JobType = {
9
9
  [T in keyof JobResources]: ReturnType<typeof JobControl<T>>;
10
10
  };
11
11
  export declare const Job: JobType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sst",
3
- "version": "2.0.0-rc.17",
3
+ "version": "2.0.0-rc.19",
4
4
  "bin": {
5
5
  "sst": "cli/sst.js"
6
6
  },
@@ -65,6 +65,7 @@
65
65
  "express": "^4.18.2",
66
66
  "fast-jwt": "^1.6.1",
67
67
  "glob": "^8.0.3",
68
+ "graphql": "*",
68
69
  "graphql-helix": "^1.12.0",
69
70
  "immer": "9",
70
71
  "ink": "^3.2.0",
@@ -100,20 +101,15 @@
100
101
  "@types/uuid": "^8.3.4",
101
102
  "@types/ws": "^8.5.3",
102
103
  "@types/yargs": "^17.0.13",
103
- "graphql": "^16.5.0",
104
104
  "tsx": "^3.12.1",
105
105
  "vitest": "^0.15.1"
106
106
  },
107
107
  "peerDependencies": {
108
- "@sls-next/lambda-at-edge": "^3.7.0",
109
- "graphql": "^16.5.0"
108
+ "@sls-next/lambda-at-edge": "^3.7.0"
110
109
  },
111
110
  "peerDependenciesMeta": {
112
111
  "@sls-next/lambda-at-edge": {
113
112
  "optional": true
114
- },
115
- "graphql": {
116
- "optional": true
117
113
  }
118
114
  },
119
115
  "bugs": {
@@ -157,7 +157,10 @@ export const useNodeHandler = Context.memo(() => {
157
157
  }
158
158
  if (input.mode === "start") {
159
159
  const dir = path.join(await find(parsed.dir, "package.json"), "node_modules");
160
- await fs.symlink(path.resolve(dir), path.resolve(path.join(input.out, "node_modules")), "dir");
160
+ try {
161
+ await fs.symlink(path.resolve(dir), path.resolve(path.join(input.out, "node_modules")), "dir");
162
+ }
163
+ catch { }
161
164
  }
162
165
  }
163
166
  cache[input.functionID] = result;