@batijs/cli 0.0.462 → 0.0.464
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/boilerplates/@batijs/auth0/files/$.env.js +5 -5
- package/dist/boilerplates/@batijs/auth0/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/authjs/files/$package.json.js +3 -3
- package/dist/boilerplates/@batijs/authjs/files/global.d.ts +0 -2
- package/dist/boilerplates/@batijs/aws/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/aws/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/aws/files/cdk/bin/infrastructure.ts +3 -4
- package/dist/boilerplates/@batijs/aws/files/cdk/lib/vike-stack.ts +12 -12
- package/dist/boilerplates/@batijs/aws/files/tests/aws_handler.spec.ts +4 -3
- package/dist/boilerplates/@batijs/aws/types/cdk/lib/vike-stack.d.ts +1 -1
- package/dist/boilerplates/@batijs/biome/files/$biome.json.js +93 -0
- package/dist/boilerplates/@batijs/biome/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/compiled/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/d1/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/d1/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/d1/files/$wrangler.toml.js +0 -2
- package/dist/boilerplates/@batijs/d1/files/database/d1/helpers.ts +1 -0
- package/dist/boilerplates/@batijs/d1/files/global.d.ts +1 -3
- package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/drizzle/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/drizzle/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +3 -3
- package/dist/boilerplates/@batijs/drizzle/files/database/drizzle/db.ts +1 -1
- package/dist/boilerplates/@batijs/drizzle/files/database/drizzle/queries/todos.ts +2 -1
- package/dist/boilerplates/@batijs/drizzle/files/drizzle.config.ts +1 -0
- package/dist/boilerplates/@batijs/drizzle/types/database/drizzle/db.d.ts +1 -1
- package/dist/boilerplates/@batijs/drizzle/types/database/drizzle/queries/todos.d.ts +1 -1
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/express/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/express/files/express-entry.ts +2 -2
- package/dist/boilerplates/@batijs/fastify/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/fastify/files/fastify-entry.ts +4 -4
- package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +4 -3
- package/dist/boilerplates/@batijs/hono/files/$package.json.js +9 -9
- package/dist/boilerplates/@batijs/hono/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/hono/files/entry_aws_lambda.ts +5 -5
- package/dist/boilerplates/@batijs/hono/files/hono-entry.node.ts +1 -1
- package/dist/boilerplates/@batijs/hono/files/hono-entry.ts +3 -3
- package/dist/boilerplates/@batijs/hono/types/entry_aws_lambda.d.ts +1 -1
- package/dist/boilerplates/@batijs/mantine/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/mantine/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/mantine/files/components/Link.tsx +1 -1
- package/dist/boilerplates/@batijs/mantine/files/layouts/LayoutDefault.tsx +3 -3
- package/dist/boilerplates/@batijs/mantine/files/layouts/theme.ts +1 -1
- package/dist/boilerplates/@batijs/pnpm/files/$pnpm-workspace.yaml.js +3 -3
- package/dist/boilerplates/@batijs/prettier/files/$package.json.js +3 -3
- package/dist/boilerplates/@batijs/prisma/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/prisma/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/prisma/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/react/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/react/files/$package.json.js +9 -9
- package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/react/files/pages/+Head.tsx +12 -7
- package/dist/boilerplates/@batijs/react/files/pages/+config.ts +1 -1
- package/dist/boilerplates/@batijs/react/files/pages/star-wars/@id/+data.ts +1 -1
- package/dist/boilerplates/@batijs/react/files/pages/star-wars/index/+data.ts +1 -1
- package/dist/boilerplates/@batijs/react/files/pages/todo/TodoList.tsx +1 -1
- package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/react-sentry/files/pages/sentry/+Page.tsx +3 -2
- package/dist/boilerplates/@batijs/sentry/files/$.env.js +4 -4
- package/dist/boilerplates/@batijs/sentry/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/sentry/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +9 -9
- package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/shadcn-ui/files/lib/utils.ts +1 -1
- package/dist/boilerplates/@batijs/shared/files/$README.md.js +9 -9
- package/dist/boilerplates/@batijs/shared/files/package.json +2 -2
- package/dist/boilerplates/@batijs/shared/files/vite.config.ts +2 -1
- package/dist/boilerplates/@batijs/shared-db/files/server/db-middleware.ts +4 -3
- package/dist/boilerplates/@batijs/shared-db/types/server/db-middleware.d.ts +2 -2
- package/dist/boilerplates/@batijs/shared-no-db/files/database/todoItems.ts +1 -1
- package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/shared-server/files/server/create-todo-handler.ts +4 -3
- package/dist/boilerplates/@batijs/shared-server/files/server/vike-handler.ts +2 -1
- package/dist/boilerplates/@batijs/shared-server/types/server/create-todo-handler.d.ts +1 -1
- package/dist/boilerplates/@batijs/shared-todo/files/global.d.ts +3 -5
- package/dist/boilerplates/@batijs/shared-todo/files/pages/todo/+data.ts +3 -2
- package/dist/boilerplates/@batijs/solid/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/solid/files/pages/+Head.tsx +1 -5
- package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +1 -1
- package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+data.ts +1 -1
- package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+data.ts +1 -1
- package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/solid-sentry/files/pages/sentry/+Page.tsx +2 -3
- package/dist/boilerplates/@batijs/sqlite/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/sqlite/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/sqlite/files/database/sqlite/db.ts +1 -1
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/tailwindcss/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/telefunc/files/global.d.ts +3 -5
- package/dist/boilerplates/@batijs/telefunc/files/pages/todo/TodoList.telefunc.ts +2 -2
- package/dist/boilerplates/@batijs/telefunc/files/server/telefunc-handler.ts +3 -3
- package/dist/boilerplates/@batijs/trpc/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/trpc/files/server/trpc-handler.ts +4 -3
- package/dist/boilerplates/@batijs/trpc/files/trpc/server.ts +4 -4
- package/dist/boilerplates/@batijs/trpc/types/trpc/server.d.ts +1 -1
- package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/ts-rest/files/server/ts-rest-handler.ts +8 -7
- package/dist/boilerplates/@batijs/ts-rest/types/server/ts-rest-handler.d.ts +1 -1
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/vercel/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/vercel/files/pages/$+config.ts.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/vue/files/layouts/LayoutDefault.vue +1 -0
- package/dist/boilerplates/@batijs/vue/files/pages/+Head.vue +1 -1
- package/dist/boilerplates/@batijs/vue/files/pages/+config.ts +1 -1
- package/dist/boilerplates/@batijs/vue/files/pages/star-wars/@id/+data.ts +1 -1
- package/dist/boilerplates/@batijs/vue/files/pages/star-wars/index/+data.ts +1 -1
- package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/vue-sentry/files/sentry.browser.config.ts +3 -4
- package/dist/{chunk-EFIXXE6N.js → chunk-IAY736Z6.js} +159734 -159712
- package/dist/index.js +5089 -5185
- package/dist/{jiti-EM3N2G3P-5LY37YR5.js → jiti-W5Y5D52V-VBLACVBV.js} +417 -417
- package/package.json +8 -8
- package/dist/boilerplates/@batijs/biome/files/biome.json +0 -29
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
$js
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -14,9 +14,9 @@ async function getEnv(props) {
|
|
|
14
14
|
const auth0ClientSecret = process.env.TEST_AUTH0_CLIENT_SECRET;
|
|
15
15
|
const auth0BaseUrl = process.env.TEST_AUTH0_ISSUER_BASE_URL;
|
|
16
16
|
let envContent = await props.readfile?.();
|
|
17
|
-
envContent =
|
|
18
|
-
envContent =
|
|
19
|
-
envContent =
|
|
17
|
+
envContent = $js(envContent, "AUTH0_CLIENT_ID", auth0ClientId ?? "", "Auth0 Client ID");
|
|
18
|
+
envContent = $js(envContent, "AUTH0_CLIENT_SECRET", auth0ClientSecret ?? "", "Auth0 Client Secret");
|
|
19
|
+
envContent = $js(envContent, "AUTH0_ISSUER_BASE_URL", auth0BaseUrl ?? "", "Auth0 base URL");
|
|
20
20
|
return envContent;
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
pEs
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/auth0/dist/files/$README.md.js
|
|
12
12
|
async function getReadme(props) {
|
|
13
|
-
const content = await
|
|
13
|
+
const content = await pEs(props);
|
|
14
14
|
const todo = `
|
|
15
15
|
## *Auth0*
|
|
16
16
|
- Sign up or login to an Auth0 account, then go to [your Dashboard](https://manage.auth0.com/dashboard/)
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
_Es
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -87,7 +87,7 @@ var require_package = __commonJS({
|
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
async function getPackageJson(props) {
|
|
90
|
-
const packageJson = await
|
|
90
|
+
const packageJson = await _Es(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
91
91
|
return packageJson.addDependencies(["@auth/core", "@universal-middleware/core"]);
|
|
92
92
|
}
|
|
93
93
|
export {
|
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
pEs
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/aws/dist/files/$README.md.js
|
|
12
12
|
async function getReadme(props) {
|
|
13
|
-
const content = await
|
|
13
|
+
const content = await pEs(props);
|
|
14
14
|
const todo = `
|
|
15
15
|
## *AWS CDK Deployment*
|
|
16
16
|
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
_Es
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -53,14 +53,14 @@ var require_package = __commonJS({
|
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
54
|
"@types/node": "^20.19.9",
|
|
55
55
|
"@types/which": "^3.0.4",
|
|
56
|
-
"aws-cdk": "^2.
|
|
57
|
-
"aws-cdk-lib": "^2.
|
|
58
|
-
cdk: "^2.
|
|
56
|
+
"aws-cdk": "^2.1025.0",
|
|
57
|
+
"aws-cdk-lib": "^2.211.0",
|
|
58
|
+
cdk: "^2.1025.0",
|
|
59
59
|
constructs: "^10.4.2",
|
|
60
|
-
esbuild: "^0.25.
|
|
60
|
+
esbuild: "^0.25.9",
|
|
61
61
|
"npm-run-all2": "^8.0.4",
|
|
62
62
|
"source-map-support": "^0.5.21",
|
|
63
|
-
tsx: "^4.20.
|
|
63
|
+
tsx: "^4.20.4",
|
|
64
64
|
typescript: "^5.9.2",
|
|
65
65
|
vitest: "^3.2.4",
|
|
66
66
|
which: "^5.0.0"
|
|
@@ -111,7 +111,7 @@ var require_package = __commonJS({
|
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
async function getPackageJson(props) {
|
|
114
|
-
const packageJson = await
|
|
114
|
+
const packageJson = await _Es(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
115
115
|
return packageJson.setScript("test", {
|
|
116
116
|
value: "vitest",
|
|
117
117
|
precedence: 0
|
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
fEs
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/aws/dist/files/$tsconfig.json.js
|
|
12
12
|
async function getTsConfig(props) {
|
|
13
|
-
const tsConfig = await
|
|
13
|
+
const tsConfig = await fEs(props);
|
|
14
14
|
tsConfig.compilerOptions.types = [
|
|
15
15
|
...tsConfig.compilerOptions.types ?? [],
|
|
16
16
|
"@types/node",
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "source-map-support/register";
|
|
3
3
|
import * as cdk from "aws-cdk-lib";
|
|
4
|
-
import { VikeStack } from "../lib/vike-stack";
|
|
5
|
-
|
|
6
4
|
import * as certificatemanager from "aws-cdk-lib/aws-certificatemanager";
|
|
7
5
|
import * as route53 from "aws-cdk-lib/aws-route53";
|
|
6
|
+
import { VikeStack } from "../lib/vike-stack";
|
|
8
7
|
|
|
9
8
|
//# BATI.has("REMOVE-COMMENT") || "remove-comments-only"
|
|
10
|
-
// @ts-
|
|
9
|
+
// @ts-expect-error file will be generated by the transformer
|
|
11
10
|
import { stackNameSuffix } from "../stack-name-suffix.json";
|
|
12
11
|
|
|
13
12
|
const env: cdk.Environment = {
|
|
@@ -76,7 +75,7 @@ function loadCertificate(stack: cdk.Stack, stackConfig: CustomStackProps): certi
|
|
|
76
75
|
return undefined;
|
|
77
76
|
}
|
|
78
77
|
|
|
79
|
-
const siteDomainName = `${(subDomain?.length ?? 0 > 0
|
|
78
|
+
const siteDomainName = `${(subDomain?.length ?? 0) > 0 ? `${subDomain}.` : ""}${domainName}`;
|
|
80
79
|
return new certificatemanager.Certificate(stack, "Certificate", {
|
|
81
80
|
domainName: siteDomainName,
|
|
82
81
|
//subjectAlternativeNames: props.domainAliases,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "source-map-support/register";
|
|
3
|
-
import {
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import * as cdk from "aws-cdk-lib";
|
|
7
|
-
import * as ssm from "aws-cdk-lib/aws-ssm";
|
|
8
|
-
import * as s3 from "aws-cdk-lib/aws-s3";
|
|
9
|
-
import * as s3deploy from "aws-cdk-lib/aws-s3-deployment";
|
|
10
|
-
import * as lambda from "aws-cdk-lib/aws-lambda";
|
|
11
|
-
import * as logs from "aws-cdk-lib/aws-logs";
|
|
12
|
-
import * as cloudfront from "aws-cdk-lib/aws-cloudfront";
|
|
13
|
-
import * as nodejs from "aws-cdk-lib/aws-lambda-nodejs";
|
|
14
|
-
import * as origin from "aws-cdk-lib/aws-cloudfront-origins";
|
|
15
7
|
import * as api from "aws-cdk-lib/aws-apigatewayv2";
|
|
16
8
|
import { HttpLambdaIntegration } from "aws-cdk-lib/aws-apigatewayv2-integrations";
|
|
9
|
+
import * as cloudfront from "aws-cdk-lib/aws-cloudfront";
|
|
10
|
+
import * as origin from "aws-cdk-lib/aws-cloudfront-origins";
|
|
11
|
+
import * as lambda from "aws-cdk-lib/aws-lambda";
|
|
12
|
+
import * as nodejs from "aws-cdk-lib/aws-lambda-nodejs";
|
|
13
|
+
import * as logs from "aws-cdk-lib/aws-logs";
|
|
17
14
|
import * as route53 from "aws-cdk-lib/aws-route53";
|
|
18
15
|
import * as targets from "aws-cdk-lib/aws-route53-targets";
|
|
19
|
-
import
|
|
16
|
+
import * as s3 from "aws-cdk-lib/aws-s3";
|
|
17
|
+
import * as s3deploy from "aws-cdk-lib/aws-s3-deployment";
|
|
18
|
+
import * as ssm from "aws-cdk-lib/aws-ssm";
|
|
19
|
+
import type { Construct } from "constructs";
|
|
20
20
|
import type { CustomStackProps } from "../bin/infrastructure";
|
|
21
21
|
|
|
22
22
|
type VikeStackProps = cdk.StackProps & {
|
|
@@ -42,7 +42,7 @@ export class VikeStack extends cdk.Stack {
|
|
|
42
42
|
const subDomain = props.customStackProps?.subDomain;
|
|
43
43
|
const domainName = props.customStackProps?.domainName;
|
|
44
44
|
const siteDomainName = domainName
|
|
45
|
-
? `${(subDomain?.length ?? 0 > 0
|
|
45
|
+
? `${(subDomain?.length ?? 0) > 0 ? `${subDomain}.` : ""}${domainName}`
|
|
46
46
|
: undefined;
|
|
47
47
|
|
|
48
48
|
const bucket = new s3.Bucket(this, "StaticAssetsBucket", {
|
|
@@ -158,7 +158,7 @@ export class VikeStack extends cdk.Stack {
|
|
|
158
158
|
// Store the CloudFront URL in an SSM parameter
|
|
159
159
|
new ssm.StringParameter(this, "DistributionUrlParameter", {
|
|
160
160
|
parameterName: this.distributionUrlParameterName,
|
|
161
|
-
stringValue: siteDomainName
|
|
161
|
+
stringValue: siteDomainName ?? distribution.distributionDomainName,
|
|
162
162
|
tier: ssm.ParameterTier.STANDARD,
|
|
163
163
|
});
|
|
164
164
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: JsonData */
|
|
2
|
+
/** biome-ignore-all lint/style/noNonNullAssertion: test file */
|
|
3
3
|
import { execSync } from "node:child_process";
|
|
4
4
|
import { existsSync, readdirSync, readFileSync, rmSync } from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
|
+
import { beforeAll, describe, expect, it } from "vitest";
|
|
6
7
|
import which from "which";
|
|
7
8
|
|
|
8
9
|
const bunExists = which.sync("bun", { nothrow: true }) !== null;
|
|
@@ -90,7 +91,7 @@ describe("AWSHandler", () => {
|
|
|
90
91
|
});
|
|
91
92
|
});
|
|
92
93
|
|
|
93
|
-
|
|
94
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
94
95
|
type JsonData = Record<string, any>;
|
|
95
96
|
|
|
96
97
|
function extractRequestHandlerPath(jsonData: JsonData, targetCdkPath: string): string | null {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "source-map-support/register";
|
|
3
|
-
import { Construct } from "constructs";
|
|
4
3
|
import * as cdk from "aws-cdk-lib";
|
|
4
|
+
import type { Construct } from "constructs";
|
|
5
5
|
import type { CustomStackProps } from "../bin/infrastructure";
|
|
6
6
|
type VikeStackProps = cdk.StackProps & {
|
|
7
7
|
customStackProps: CustomStackProps;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
3
|
+
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
|
+
|
|
5
|
+
import "../../../../chunk-DHZ7AZKP.js";
|
|
6
|
+
|
|
7
|
+
// ../../boilerplates/biome/dist/files/$biome.json.js
|
|
8
|
+
async function getBiomeJson(props) {
|
|
9
|
+
const additionalLinter = {};
|
|
10
|
+
const additionalConfig = {};
|
|
11
|
+
if (props.meta.BATI.has("vue")) {
|
|
12
|
+
additionalLinter.domains = {
|
|
13
|
+
vue: "recommended"
|
|
14
|
+
};
|
|
15
|
+
additionalLinter.rules = {
|
|
16
|
+
style: {
|
|
17
|
+
useConst: "off",
|
|
18
|
+
useImportType: "off"
|
|
19
|
+
},
|
|
20
|
+
correctness: {
|
|
21
|
+
noUnusedVariables: "off",
|
|
22
|
+
noUnusedImports: "off"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (props.meta.BATI.has("react")) {
|
|
27
|
+
additionalLinter.domains = {
|
|
28
|
+
react: "recommended"
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
if (props.meta.BATI.has("solid")) {
|
|
32
|
+
additionalLinter.domains = {
|
|
33
|
+
solid: "recommended"
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (props.meta.BATI.has("tailwindcss") || props.meta.BATI.has("shadcn-ui")) {
|
|
37
|
+
additionalConfig.overrides ??= [];
|
|
38
|
+
additionalConfig.overrides.push({
|
|
39
|
+
includes: ["**/*.css"],
|
|
40
|
+
linter: {
|
|
41
|
+
rules: {
|
|
42
|
+
suspicious: {
|
|
43
|
+
noUnknownAtRules: "off"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
$schema: "./node_modules/@biomejs/biome/configuration_schema.json",
|
|
51
|
+
formatter: {
|
|
52
|
+
indentWidth: 2,
|
|
53
|
+
indentStyle: "space"
|
|
54
|
+
},
|
|
55
|
+
linter: {
|
|
56
|
+
enabled: true,
|
|
57
|
+
rules: {
|
|
58
|
+
recommended: true
|
|
59
|
+
},
|
|
60
|
+
...additionalLinter
|
|
61
|
+
},
|
|
62
|
+
assist: {
|
|
63
|
+
enabled: true,
|
|
64
|
+
actions: {
|
|
65
|
+
source: {
|
|
66
|
+
organizeImports: "on"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
files: {
|
|
71
|
+
includes: [
|
|
72
|
+
"**",
|
|
73
|
+
"!*.cjs",
|
|
74
|
+
"!*.js",
|
|
75
|
+
"!*.mjs",
|
|
76
|
+
"!*.spec.ts",
|
|
77
|
+
"!**/*.ts.build-*.mjs",
|
|
78
|
+
"!dist/*",
|
|
79
|
+
"!node_modules/*",
|
|
80
|
+
"!**/.DS_Store"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
vcs: {
|
|
84
|
+
enabled: true,
|
|
85
|
+
clientKind: "git",
|
|
86
|
+
useIgnoreFile: true
|
|
87
|
+
},
|
|
88
|
+
...additionalConfig
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
getBiomeJson as default
|
|
93
|
+
};
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
_Es
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -51,7 +51,7 @@ var require_package = __commonJS({
|
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
|
-
"@biomejs/biome": "2.
|
|
54
|
+
"@biomejs/biome": "2.2.0",
|
|
55
55
|
"@types/node": "^20.19.9"
|
|
56
56
|
},
|
|
57
57
|
dependencies: {
|
|
@@ -69,7 +69,7 @@ var require_package = __commonJS({
|
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
async function getPackageJson(props) {
|
|
72
|
-
const packageJson = await
|
|
72
|
+
const packageJson = await _Es(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
73
73
|
return packageJson.setScript("lint", {
|
|
74
74
|
value: "biome lint --write .",
|
|
75
75
|
precedence: 0
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
_Es
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -51,11 +51,11 @@ var require_package = __commonJS({
|
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
|
-
"@cloudflare/workers-types": "^4.
|
|
54
|
+
"@cloudflare/workers-types": "^4.20250816.0",
|
|
55
55
|
"@types/node": "^20.19.9",
|
|
56
56
|
"npm-run-all2": "^8.0.4",
|
|
57
57
|
"vike-cloudflare": "^0.1.7",
|
|
58
|
-
wrangler: "^4.
|
|
58
|
+
wrangler: "^4.30.0"
|
|
59
59
|
},
|
|
60
60
|
dependencies: {
|
|
61
61
|
"@batijs/core": "workspace:*"
|
|
@@ -85,7 +85,7 @@ var require_package = __commonJS({
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
async function getPackageJson(props) {
|
|
88
|
-
const packageJson = await
|
|
88
|
+
const packageJson = await _Es(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
89
89
|
return packageJson.setScript("preview:wrangler", {
|
|
90
90
|
value: "wrangler pages dev",
|
|
91
91
|
precedence: 40,
|
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
fEs
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/cloudflare/dist/files/$tsconfig.json.js
|
|
12
12
|
async function getTsConfig(props) {
|
|
13
|
-
const tsConfig = await
|
|
13
|
+
const tsConfig = await fEs(props);
|
|
14
14
|
tsConfig.compilerOptions.types = [...tsConfig.compilerOptions.types ?? [], "vike-cloudflare/types"];
|
|
15
15
|
return tsConfig;
|
|
16
16
|
}
|
|
@@ -3,16 +3,16 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "../../../../chunk-
|
|
6
|
+
Vri,
|
|
7
|
+
dEs
|
|
8
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
9
9
|
import "../../../../chunk-IAWYWZSL.js";
|
|
10
10
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
11
11
|
|
|
12
12
|
// ../../boilerplates/cloudflare/dist/files/$vite.config.ts.js
|
|
13
13
|
async function getViteConfig(props) {
|
|
14
|
-
const mod = await
|
|
15
|
-
let options
|
|
14
|
+
const mod = await dEs(props);
|
|
15
|
+
let options;
|
|
16
16
|
if (props.meta.BATI.has("hono")) {
|
|
17
17
|
options = {
|
|
18
18
|
server: {
|
|
@@ -21,7 +21,7 @@ async function getViteConfig(props) {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
Vri(mod, {
|
|
25
25
|
from: "vike-cloudflare",
|
|
26
26
|
constructor: "pages",
|
|
27
27
|
imported: "pages",
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
_Es
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -52,7 +52,7 @@ var require_package = __commonJS({
|
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
54
|
"@types/node": "^20.19.9",
|
|
55
|
-
vite: "^7.
|
|
55
|
+
vite: "^7.1.2",
|
|
56
56
|
"vite-plugin-compiled-react": "^1.3.1"
|
|
57
57
|
},
|
|
58
58
|
dependencies: {
|
|
@@ -71,7 +71,7 @@ var require_package = __commonJS({
|
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
async function getPackageJson(props) {
|
|
74
|
-
const packageJson = await
|
|
74
|
+
const packageJson = await _Es(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
75
75
|
return packageJson.addDevDependencies(["vite-plugin-compiled-react"]).addDependencies(["@compiled/react"]);
|
|
76
76
|
}
|
|
77
77
|
export {
|
|
@@ -3,16 +3,16 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "../../../../chunk-
|
|
6
|
+
Vri,
|
|
7
|
+
dEs
|
|
8
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
9
9
|
import "../../../../chunk-IAWYWZSL.js";
|
|
10
10
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
11
11
|
|
|
12
12
|
// ../../boilerplates/compiled/dist/files/$vite.config.ts.js
|
|
13
13
|
async function getViteConfig(props) {
|
|
14
|
-
const mod = await
|
|
15
|
-
|
|
14
|
+
const mod = await dEs(props);
|
|
15
|
+
Vri(mod, {
|
|
16
16
|
from: "vite-plugin-compiled-react",
|
|
17
17
|
constructor: "compiled",
|
|
18
18
|
imported: "compiled",
|
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
pEs
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/d1/dist/files/$README.md.js
|
|
12
12
|
async function getReadme(props) {
|
|
13
|
-
const content = await
|
|
13
|
+
const content = await pEs(props);
|
|
14
14
|
const todo = `
|
|
15
15
|
## *Cloudflare D1*
|
|
16
16
|
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
_Es
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -51,11 +51,11 @@ var require_package = __commonJS({
|
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
|
-
"@cloudflare/workers-types": "^4.
|
|
54
|
+
"@cloudflare/workers-types": "^4.20250816.0",
|
|
55
55
|
"@types/node": "^20.19.9",
|
|
56
56
|
"@universal-middleware/core": "^0.4.9",
|
|
57
|
-
vike: "^0.4.
|
|
58
|
-
wrangler: "^4.
|
|
57
|
+
vike: "^0.4.237",
|
|
58
|
+
wrangler: "^4.30.0"
|
|
59
59
|
},
|
|
60
60
|
dependencies: {
|
|
61
61
|
"@batijs/core": "workspace:*"
|
|
@@ -92,7 +92,7 @@ var require_package = __commonJS({
|
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
async function getPackageJson(props) {
|
|
95
|
-
const packageJson = await
|
|
95
|
+
const packageJson = await _Es(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
96
96
|
return packageJson.addDevDependencies(["@universal-middleware/core"]);
|
|
97
97
|
}
|
|
98
98
|
export {
|
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
fEs
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/d1/dist/files/$tsconfig.json.js
|
|
12
12
|
async function getTsConfig(props) {
|
|
13
|
-
const tsConfig = await
|
|
13
|
+
const tsConfig = await fEs(props);
|
|
14
14
|
tsConfig.compilerOptions.types = [...tsConfig.compilerOptions.types ?? [], "@cloudflare/workers-types"];
|
|
15
15
|
return tsConfig;
|
|
16
16
|
}
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
|
-
import "../../../../chunk-EFIXXE6N.js";
|
|
6
|
-
import "../../../../chunk-IAWYWZSL.js";
|
|
7
5
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
8
6
|
|
|
9
7
|
// ../../boilerplates/d1/dist/files/$wrangler.toml.js
|
|
@@ -6,6 +6,7 @@ import type { RuntimeAdapter } from "@universal-middleware/core";
|
|
|
6
6
|
*/
|
|
7
7
|
export async function getDbFromRuntime(runtime: RuntimeAdapter): Promise<D1Database> {
|
|
8
8
|
if (runtime.runtime === "workerd") {
|
|
9
|
+
// biome-ignore lint/style/noNonNullAssertion: always exists
|
|
9
10
|
return runtime.env!.DB as D1Database;
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
_Es
|
|
7
|
+
} from "../../../../chunk-IAY736Z6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -51,10 +51,10 @@ var require_package = __commonJS({
|
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
|
-
"@cloudflare/workers-types": "^4.
|
|
54
|
+
"@cloudflare/workers-types": "^4.20250816.0",
|
|
55
55
|
"@types/node": "^20.19.9",
|
|
56
56
|
"@universal-middleware/core": "^0.4.9",
|
|
57
|
-
vike: "^0.4.
|
|
57
|
+
vike: "^0.4.237"
|
|
58
58
|
},
|
|
59
59
|
dependencies: {
|
|
60
60
|
"@batijs/core": "workspace:*"
|
|
@@ -88,7 +88,7 @@ var require_package = __commonJS({
|
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
async function getPackageJson(props) {
|
|
91
|
-
const packageJson = await
|
|
91
|
+
const packageJson = await _Es(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
92
92
|
return packageJson.setScript("d1:migrate", {
|
|
93
93
|
value: "wrangler d1 migrations apply YOUR_DATABASE_NAME --local",
|
|
94
94
|
precedence: 0
|