Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency vite to v6 - abandoned #942

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions cdk/arch/lambda-s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ import {
environment,
lambdaRuntime,
memorySize,
stream,
stream
} from '../external/params'
import {
lambdaModifier
} from '../external/cdk-modifiers'
import { lambdaModifier } from '../external/cdk-modifiers'

export class CDKStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
Expand All @@ -43,10 +41,10 @@ export class CDKStack extends Stack {
memorySize,
timeout: Duration.seconds(30),
environment
});
})

// allow custom modification of CDK lambda function
lambdaModifier(lambdaFunction);
lambdaModifier(lambdaFunction)

const lambdaURL = lambdaFunction.addFunctionUrl({
authType: aws_lambda.FunctionUrlAuthType.NONE,
Expand Down
4 changes: 3 additions & 1 deletion cdk/external/cdk-modifiers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* $$__ADAPTER_IMPORTS__$$ */
import * as cdk from 'aws-cdk-lib'

export const lambdaModifier = (lambdaFunction: cdk.aws_lambda.Function) => {} /* $$__LAMBDA_MODIFIER__$$ */
export const lambdaModifier = (
lambdaFunction: cdk.aws_lambda.Function
) => {} /* $$__LAMBDA_MODIFIER__$$ */
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/jill64/sveltekit-adapter-aws.git",
"image": "https://opengraph.githubassets.com/000accb0cba21a8e7aeb7efe51fb468efe71c43a52fa53f55a0006fa70f840a7/jill64/sveltekit-adapter-aws"
"image": "https://opengraph.githubassets.com/1489952fa61841934c190807d164afd94b9086578affd2d39f61cbbc04d29741/jill64/sveltekit-adapter-aws"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 4 additions & 2 deletions packages/adapter/src/steps/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const setup = async ({ builder, tmp, options }: Context) => {
__DOMAIN_NAME__: options.domain?.fqdn ?? '',
__CERTIFICATE_ARN__: options.domain?.certificateArn ?? '',
__LAMBDA_RUNTIME__: options.runtime ?? 'NODE_LATEST',
'{} /* $$__ENVIRONMENT__$$ */': JSON.stringify(options.env ?? {}),
'{} /* $$__ENVIRONMENT__$$ */': JSON.stringify(options.env ?? {})
}
)

Expand All @@ -80,7 +80,9 @@ export const setup = async ({ builder, tmp, options }: Context) => {
path.join(options.out, 'external', 'cdk-modifiers.ts'),
{
'/* $$__ADAPTER_IMPORTS__$$ */': options.adapterImports?.join('\n') ?? '',
'(lambdaFunction: cdk.aws_lambda.Function) => {} /* $$__LAMBDA_MODIFIER__$$ */': options.lambdaModifier?.toString() ?? '(lambdaFunction: cdk.aws_lambda.Function) => {}'
'(lambdaFunction: cdk.aws_lambda.Function) => {} /* $$__LAMBDA_MODIFIER__$$ */':
options.lambdaModifier?.toString() ??
'(lambdaFunction: cdk.aws_lambda.Function) => {}'
}
)

Expand Down
4 changes: 2 additions & 2 deletions packages/adapter/src/types/AdapterOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export type AdapterOptions = {
certificateArn: string
}
/**
* Adds imports to the adapter params.ts to allow things like `lambdaModifier`
* Adds imports to the adapter params.ts to allow things like `lambdaModifier`
* to access types
* @example ["import { Stack } from 'aws-cdk-lib'"]
*/
Expand All @@ -107,5 +107,5 @@ export type AdapterOptions = {
* }
* ```
*/
lambdaModifier?: (lambdaFunction: aws_lambda.Function) => { }
lambdaModifier?: (lambdaFunction: aws_lambda.Function) => {}
}
2 changes: 1 addition & 1 deletion packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@sveltejs/kit": "2.13.0",
"@types/cookie": "1.0.0",
"svelte": "4.2.19",
"vite": "5.4.11",
"vite": "6.0.5",
"@sveltejs/vite-plugin-svelte": "3.1.2"
}
}
4 changes: 2 additions & 2 deletions packages/site/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ const config = {
KEY3: 'VALUE3'
},
stream: process.env.BUFFERED_RESPONSE !== 'TRUE',
adapterImports: [ "import { Stack } from 'aws-cdk-lib'" ],
adapterImports: ["import { Stack } from 'aws-cdk-lib'"],
lambdaModifier: (fn) => {
const stack = Stack.of(fn)
fn.addEnvironment("abc", "def")
fn.addEnvironment('abc', 'def')
}
})
}
Expand Down
Loading
Loading