@percepta/create 3.6.3 → 4.0.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.
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/library/README.md +5 -2
- package/templates/library/gitignore.template +1 -0
- package/templates/library/package.json.template +17 -13
- package/templates/library/src/index.test.ts +8 -0
- package/templates/library/tsconfig.json +1 -17
- package/templates/library/tsdown.config.ts +3 -0
- package/templates/library/vitest.config.ts +3 -0
- package/templates/monorepo/.dockerignore +1 -0
- package/templates/monorepo/.github/CODEOWNERS +67 -0
- package/templates/monorepo/.github/actions/ci/action.yml +56 -0
- package/templates/monorepo/.github/workflows/build-and-publish.yml +22 -0
- package/templates/monorepo/.github/workflows/pr-build.yml +21 -0
- package/templates/monorepo/.node-version +1 -0
- package/templates/monorepo/auth/package.json +4 -4
- package/templates/monorepo/auth/src/auth.ts +0 -1
- package/templates/monorepo/auth/tsconfig.json +1 -10
- package/templates/monorepo/gitignore.template +1 -0
- package/templates/monorepo/oxfmt.config.ts.template +3 -0
- package/templates/monorepo/oxlint.config.ts.template +3 -0
- package/templates/monorepo/package.json.template +17 -9
- package/templates/monorepo/turbo.json +20 -0
- package/templates/webapp/.node-version +0 -1
- package/templates/webapp/AGENTS.md +20 -15
- package/templates/webapp/README.md +2 -2
- package/templates/webapp/globals.d.ts +1 -0
- package/templates/webapp/oxfmt.config.ts.template +5 -0
- package/templates/webapp/package.json.template +14 -22
- package/templates/webapp/scripts/seed.ts +1 -1
- package/templates/webapp/src/app/global-error.tsx +1 -1
- package/templates/webapp/src/config/isDev.ts +0 -2
- package/templates/webapp/src/drizzle/db.ts +2 -2
- package/templates/webapp/src/lib/auth-client.ts +6 -3
- package/templates/webapp/tsconfig.json +1 -12
- package/templates/webapp/vitest.config.ts +3 -7
- package/templates/library/eslint.config.js +0 -10
- package/templates/monorepo/eslint.config.js +0 -10
- package/templates/monorepo/tsconfig.json +0 -16
- package/templates/webapp/.github/workflows/ci.yml +0 -149
- package/templates/webapp/.prettierrc.mjs +0 -5
- package/templates/webapp/eslint.config.mjs +0 -100
- package/templates/webapp/npmrc.template +0 -4
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ES2022"],
|
|
5
|
-
"module": "NodeNext",
|
|
6
|
-
"moduleResolution": "NodeNext",
|
|
7
|
-
"strict": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"forceConsistentCasingInFileNames": true,
|
|
11
|
-
"declaration": true,
|
|
12
|
-
"declarationMap": true,
|
|
13
|
-
"sourceMap": true,
|
|
14
|
-
"resolveJsonModule": true
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
name: Build
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push: {}
|
|
5
|
-
|
|
6
|
-
env:
|
|
7
|
-
PNPM_VERSION: 10.x
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
setup:
|
|
11
|
-
name: Setup
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- name: Checkout repository
|
|
16
|
-
uses: actions/checkout@v4
|
|
17
|
-
|
|
18
|
-
- name: Setup PNPM
|
|
19
|
-
uses: pnpm/action-setup@v4
|
|
20
|
-
with:
|
|
21
|
-
version: ${{ env.PNPM_VERSION }}
|
|
22
|
-
|
|
23
|
-
- name: Setup Node.js
|
|
24
|
-
uses: actions/setup-node@v4
|
|
25
|
-
with:
|
|
26
|
-
node-version-file: ".node-version"
|
|
27
|
-
cache: pnpm
|
|
28
|
-
|
|
29
|
-
- name: Install dependencies
|
|
30
|
-
run: pnpm install --frozen-lockfile
|
|
31
|
-
|
|
32
|
-
- name: Check packages are deduplicated
|
|
33
|
-
run: pnpm dedupe --check
|
|
34
|
-
|
|
35
|
-
build:
|
|
36
|
-
name: Build
|
|
37
|
-
needs: setup
|
|
38
|
-
runs-on: ubuntu-latest
|
|
39
|
-
|
|
40
|
-
steps:
|
|
41
|
-
- name: Checkout repository
|
|
42
|
-
uses: actions/checkout@v4
|
|
43
|
-
|
|
44
|
-
- name: Setup PNPM
|
|
45
|
-
uses: pnpm/action-setup@v4
|
|
46
|
-
with:
|
|
47
|
-
version: ${{ env.PNPM_VERSION }}
|
|
48
|
-
|
|
49
|
-
- name: Setup Node.js
|
|
50
|
-
uses: actions/setup-node@v4
|
|
51
|
-
with:
|
|
52
|
-
node-version-file: ".node-version"
|
|
53
|
-
cache: pnpm
|
|
54
|
-
|
|
55
|
-
- name: Install dependencies
|
|
56
|
-
run: pnpm install --frozen-lockfile
|
|
57
|
-
|
|
58
|
-
- name: Build project
|
|
59
|
-
run: pnpm build
|
|
60
|
-
|
|
61
|
-
lint:
|
|
62
|
-
name: Lint
|
|
63
|
-
needs: setup
|
|
64
|
-
runs-on: ubuntu-latest
|
|
65
|
-
|
|
66
|
-
steps:
|
|
67
|
-
- name: Checkout repository
|
|
68
|
-
uses: actions/checkout@v4
|
|
69
|
-
|
|
70
|
-
- name: Setup PNPM
|
|
71
|
-
uses: pnpm/action-setup@v4
|
|
72
|
-
with:
|
|
73
|
-
version: ${{ env.PNPM_VERSION }}
|
|
74
|
-
|
|
75
|
-
- name: Setup Node.js
|
|
76
|
-
uses: actions/setup-node@v4
|
|
77
|
-
with:
|
|
78
|
-
node-version-file: ".node-version"
|
|
79
|
-
cache: pnpm
|
|
80
|
-
|
|
81
|
-
- name: Install dependencies
|
|
82
|
-
run: pnpm install --frozen-lockfile
|
|
83
|
-
|
|
84
|
-
- name: Run lint checks
|
|
85
|
-
run: pnpm lint
|
|
86
|
-
|
|
87
|
-
check-migrations:
|
|
88
|
-
name: Check for Migrations
|
|
89
|
-
needs: setup
|
|
90
|
-
runs-on: ubuntu-latest
|
|
91
|
-
|
|
92
|
-
steps:
|
|
93
|
-
- name: Checkout repository
|
|
94
|
-
uses: actions/checkout@v4
|
|
95
|
-
|
|
96
|
-
- name: Setup PNPM
|
|
97
|
-
uses: pnpm/action-setup@v4
|
|
98
|
-
with:
|
|
99
|
-
version: ${{ env.PNPM_VERSION }}
|
|
100
|
-
|
|
101
|
-
- name: Setup Node.js
|
|
102
|
-
uses: actions/setup-node@v4
|
|
103
|
-
with:
|
|
104
|
-
node-version-file: ".node-version"
|
|
105
|
-
cache: pnpm
|
|
106
|
-
|
|
107
|
-
- name: Install dependencies
|
|
108
|
-
run: pnpm install --frozen-lockfile
|
|
109
|
-
|
|
110
|
-
- name: Generate migration check
|
|
111
|
-
run: pnpm db:generate
|
|
112
|
-
|
|
113
|
-
- name: Check for journal changes
|
|
114
|
-
run: git diff --exit-code src/drizzle/migrations/meta/_journal.json
|
|
115
|
-
|
|
116
|
-
# ──────────────────────────────────────────────────────────────────────────────
|
|
117
|
-
# Docker Build Validation
|
|
118
|
-
# ──────────────────────────────────────────────────────────────────────────────
|
|
119
|
-
|
|
120
|
-
changes:
|
|
121
|
-
name: Detect Changes
|
|
122
|
-
runs-on: ubuntu-latest
|
|
123
|
-
outputs:
|
|
124
|
-
root: ${{ steps.filter.outputs.root }}
|
|
125
|
-
steps:
|
|
126
|
-
- uses: actions/checkout@v4
|
|
127
|
-
- uses: dorny/paths-filter@v3
|
|
128
|
-
id: filter
|
|
129
|
-
with:
|
|
130
|
-
filters: |
|
|
131
|
-
root:
|
|
132
|
-
- 'src/**'
|
|
133
|
-
- 'scripts/**'
|
|
134
|
-
- 'Dockerfile'
|
|
135
|
-
- 'package.json'
|
|
136
|
-
- 'pnpm-lock.yaml'
|
|
137
|
-
- 'tsconfig.json'
|
|
138
|
-
|
|
139
|
-
docker-build-root:
|
|
140
|
-
name: Docker Build (root)
|
|
141
|
-
needs: changes
|
|
142
|
-
if: needs.changes.outputs.root == 'true'
|
|
143
|
-
runs-on: ubuntu-latest
|
|
144
|
-
steps:
|
|
145
|
-
- uses: actions/checkout@v4
|
|
146
|
-
- name: Build Docker image
|
|
147
|
-
run: docker build --build-arg NPM_TOKEN=${{ secrets.NPM_TOKEN }} -t __APP_NAME__:ci .
|
|
148
|
-
- name: Verify server.js is valid
|
|
149
|
-
run: docker run --rm __APP_NAME__:ci node --check server.js
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
import eslint from "@eslint/js";
|
|
3
|
-
import nextPlugin from "@next/eslint-plugin-next";
|
|
4
|
-
import nodePlugin from "eslint-plugin-n";
|
|
5
|
-
import reactPlugin from "eslint-plugin-react";
|
|
6
|
-
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
7
|
-
import globals from "globals";
|
|
8
|
-
import tseslint from "typescript-eslint";
|
|
9
|
-
|
|
10
|
-
export default tseslint.config(
|
|
11
|
-
{
|
|
12
|
-
ignores: [
|
|
13
|
-
"pnpm-lock.yaml",
|
|
14
|
-
"package.json",
|
|
15
|
-
".next/**",
|
|
16
|
-
"next-env.d.ts",
|
|
17
|
-
"public/**",
|
|
18
|
-
"terraform/**",
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
eslint.configs.recommended,
|
|
22
|
-
...tseslint.configs.recommended,
|
|
23
|
-
{
|
|
24
|
-
files: ["**/*.{js,mjs,cjs,ts,tsx}"],
|
|
25
|
-
languageOptions: {
|
|
26
|
-
ecmaVersion: "latest",
|
|
27
|
-
globals: {
|
|
28
|
-
...globals.browser,
|
|
29
|
-
...globals.node,
|
|
30
|
-
},
|
|
31
|
-
parserOptions: {
|
|
32
|
-
ecmaFeatures: {
|
|
33
|
-
jsx: true,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
sourceType: "module",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
plugins: {
|
|
41
|
-
"@next/next": nextPlugin,
|
|
42
|
-
react: reactPlugin,
|
|
43
|
-
"react-hooks": reactHooksPlugin,
|
|
44
|
-
},
|
|
45
|
-
rules: {
|
|
46
|
-
...nextPlugin.configs.recommended.rules,
|
|
47
|
-
...nextPlugin.configs["core-web-vitals"].rules,
|
|
48
|
-
...reactPlugin.configs.recommended.rules,
|
|
49
|
-
...reactHooksPlugin.configs.recommended.rules,
|
|
50
|
-
"react/jsx-uses-react": "off",
|
|
51
|
-
"react/react-in-jsx-scope": "off",
|
|
52
|
-
},
|
|
53
|
-
settings: {
|
|
54
|
-
react: {
|
|
55
|
-
version: "detect",
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
files: ["src/**/*"],
|
|
61
|
-
rules: {
|
|
62
|
-
"no-console": "error",
|
|
63
|
-
"no-restricted-syntax": [
|
|
64
|
-
"error",
|
|
65
|
-
{
|
|
66
|
-
selector:
|
|
67
|
-
"CallExpression[callee.property.name=/^(debug|info|warn|error)$/][callee.object.type='CallExpression'][callee.object.callee.name='getLogger'] > :nth-child(2):not(Literal)",
|
|
68
|
-
message:
|
|
69
|
-
"Logger message must be a plain string literal, not a variable or template. Use the first parameter (args) for dynamic data.",
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
plugins: {
|
|
76
|
-
n: nodePlugin,
|
|
77
|
-
},
|
|
78
|
-
rules: {
|
|
79
|
-
"n/no-process-env": "error",
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
files: ["src/config/clientEnvConfig.ts"],
|
|
84
|
-
rules: {
|
|
85
|
-
"n/no-process-env": "off",
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
files: ["scripts/with-local-env.ts"],
|
|
90
|
-
rules: {
|
|
91
|
-
"n/no-process-env": "off",
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
files: ["playwright.config.ts"],
|
|
96
|
-
rules: {
|
|
97
|
-
"n/no-process-env": "off",
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
);
|