@oss-ma/tpl 1.0.3 → 1.0.24
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/commands/check.js +87 -9
- package/dist/commands/init.js +1 -0
- package/dist/engine/copy.js +52 -2
- package/dist/engine/hooks.js +103 -6
- package/dist/engine/initProject.js +4 -4
- package/dist/engine/loadTemplate.js +1 -0
- package/dist/engine/lock.js +66 -1
- package/dist/engine/packs/applyPackFiles.js +16 -5
- package/dist/engine/packs/validatePackRules.js +58 -115
- package/dist/engine/prompt.js +1 -0
- package/dist/engine/readLock.js +16 -0
- package/dist/engine/render.js +1 -0
- package/dist/engine/validators/reactTs.js +70 -3
- package/dist/engine/validators/standard.js +1 -0
- package/dist/engine/validators/template.js +1 -0
- package/package.json +36 -33
- package/resources/packs/company-pack-a/files/.github/badges/company-a.svg +5 -5
- package/resources/packs/company-pack-a/files/README.company.md +14 -14
- package/resources/packs/company-pack-a/files/SECURITY.md +19 -19
- package/resources/packs/company-pack-a/pack.yaml +28 -28
- package/resources/packs/company-pack-a/rules/rules.json +11 -11
- package/resources/standard.schema.json +31 -28
- package/resources/templates/react-ts/files/.editorconfig +9 -9
- package/resources/templates/react-ts/files/.gitattributes +1 -1
- package/resources/templates/react-ts/files/.github/dependabot.yml +12 -12
- package/resources/templates/react-ts/files/.github/workflows/ci.yml +297 -94
- package/resources/templates/react-ts/files/.github/workflows/codeql.yml +38 -37
- package/resources/templates/react-ts/files/.husky/commit-msg +4 -4
- package/resources/templates/react-ts/files/.husky/pre-commit +6 -6
- package/resources/templates/react-ts/files/.prettierrc.json +4 -4
- package/resources/templates/react-ts/files/README.md +51 -51
- package/resources/templates/react-ts/files/SECURITY.md +23 -0
- package/resources/templates/react-ts/files/commitlint.config.cjs +2 -2
- package/resources/templates/react-ts/files/eslint.config.js +67 -67
- package/resources/templates/react-ts/files/gitignore +8 -8
- package/resources/templates/react-ts/files/index.html +39 -11
- package/resources/templates/react-ts/files/package.json +55 -55
- package/resources/templates/react-ts/files/src/app/App.js +3 -3
- package/resources/templates/react-ts/files/src/app/App.tsx +9 -9
- package/resources/templates/react-ts/files/src/app/main.js +2 -2
- package/resources/templates/react-ts/files/src/app/main.tsx +8 -8
- package/resources/templates/react-ts/files/src/features/example/Example.js +4 -4
- package/resources/templates/react-ts/files/src/features/example/Example.tsx +13 -13
- package/resources/templates/react-ts/files/src/shared/ui/Button.js +2 -2
- package/resources/templates/react-ts/files/src/shared/ui/Button.tsx +19 -19
- package/resources/templates/react-ts/files/template.lock +8 -8
- package/resources/templates/react-ts/files/tsconfig.json +20 -20
- package/resources/templates/react-ts/files/tsconfig.node.json +9 -9
- package/resources/templates/react-ts/files/vite.config.ts +5 -5
- package/resources/templates/react-ts/template.yaml +60 -20
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
charset = utf-8
|
|
5
|
-
end_of_line = lf
|
|
6
|
-
insert_final_newline = true
|
|
7
|
-
indent_style = space
|
|
8
|
-
indent_size = 2
|
|
9
|
-
trim_trailing_whitespace = true
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
indent_style = space
|
|
8
|
+
indent_size = 2
|
|
9
|
+
trim_trailing_whitespace = true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
* text=auto eol=lf
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: "npm"
|
|
4
|
-
directory: "/"
|
|
5
|
-
schedule:
|
|
6
|
-
interval: "weekly"
|
|
7
|
-
open-pull-requests-limit: 10
|
|
8
|
-
groups:
|
|
9
|
-
dev-dependencies:
|
|
10
|
-
dependency-type: "development"
|
|
11
|
-
patterns:
|
|
12
|
-
- "*"
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "npm"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
open-pull-requests-limit: 10
|
|
8
|
+
groups:
|
|
9
|
+
dev-dependencies:
|
|
10
|
+
dependency-type: "development"
|
|
11
|
+
patterns:
|
|
12
|
+
- "*"
|
|
@@ -1,94 +1,297 @@
|
|
|
1
|
-
name:
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["main"]
|
|
6
|
-
pull_request:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- name:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
1
|
+
name: codeql
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "0 3 * * 1" # every Monday 03:00 UTC
|
|
9
|
+
|
|
10
|
+
permissions: {}
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
analyze:
|
|
14
|
+
name: Analyze (CodeQL)
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
security-events: write
|
|
19
|
+
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
language: ["javascript-typescript"]
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout
|
|
27
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
28
|
+
with:
|
|
29
|
+
persist-credentials: false
|
|
30
|
+
|
|
31
|
+
- name: Initialize CodeQL
|
|
32
|
+
uses: github/codeql-action/init@f5c2471be782132e47a6e6f9c725e56730d6e9a3
|
|
33
|
+
with:
|
|
34
|
+
languages: ${{ matrix.language }}
|
|
35
|
+
queries: security-extended
|
|
36
|
+
|
|
37
|
+
- name: Autobuild
|
|
38
|
+
uses: github/codeql-action/autobuild@f5c2471be782132e47a6e6f9c725e56730d6e9a3
|
|
39
|
+
|
|
40
|
+
- name: Perform CodeQL Analysis
|
|
41
|
+
uses: github/codeql-action/analyze@f5c2471be782132e47a6e6f9c725e56730d6e9a3
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# name: ci
|
|
45
|
+
|
|
46
|
+
# on:
|
|
47
|
+
# push:
|
|
48
|
+
# branches: ["main"]
|
|
49
|
+
# pull_request:
|
|
50
|
+
|
|
51
|
+
# concurrency:
|
|
52
|
+
# group: ci-${{ github.ref }}
|
|
53
|
+
# cancel-in-progress: true
|
|
54
|
+
|
|
55
|
+
# # Global: deny everything, grant per-job only
|
|
56
|
+
# permissions: {}
|
|
57
|
+
|
|
58
|
+
# jobs:
|
|
59
|
+
# # ── 1. Secrets Scan ───────────────────────────────────────────────────────
|
|
60
|
+
# secrets-scan:
|
|
61
|
+
# name: Secrets Scan
|
|
62
|
+
# runs-on: ubuntu-latest
|
|
63
|
+
# permissions:
|
|
64
|
+
# contents: read
|
|
65
|
+
|
|
66
|
+
# steps:
|
|
67
|
+
# - name: Checkout
|
|
68
|
+
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
69
|
+
# with:
|
|
70
|
+
# fetch-depth: 0
|
|
71
|
+
# persist-credentials: false
|
|
72
|
+
|
|
73
|
+
# - name: Run Gitleaks
|
|
74
|
+
# uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c3 # v2.3.9
|
|
75
|
+
# env:
|
|
76
|
+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
77
|
+
|
|
78
|
+
# # ── 2. Dependency Audit (blocking) ────────────────────────────────────────
|
|
79
|
+
# audit:
|
|
80
|
+
# name: Dependency Audit
|
|
81
|
+
# runs-on: ubuntu-latest
|
|
82
|
+
# permissions:
|
|
83
|
+
# contents: read
|
|
84
|
+
|
|
85
|
+
# steps:
|
|
86
|
+
# - name: Checkout
|
|
87
|
+
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
88
|
+
# with:
|
|
89
|
+
# persist-credentials: false
|
|
90
|
+
|
|
91
|
+
# - name: Setup Node.js
|
|
92
|
+
# uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.1.0
|
|
93
|
+
# with:
|
|
94
|
+
# node-version: "20"
|
|
95
|
+
# cache: "npm"
|
|
96
|
+
|
|
97
|
+
# - name: Install
|
|
98
|
+
# run: npm ci --ignore-scripts
|
|
99
|
+
|
|
100
|
+
# - name: Audit (high+) — blocking
|
|
101
|
+
# run: npm audit --audit-level=high
|
|
102
|
+
|
|
103
|
+
# # ── 3. Lint ───────────────────────────────────────────────────────────────
|
|
104
|
+
# lint:
|
|
105
|
+
# name: Lint
|
|
106
|
+
# runs-on: ubuntu-latest
|
|
107
|
+
# permissions:
|
|
108
|
+
# contents: read
|
|
109
|
+
|
|
110
|
+
# steps:
|
|
111
|
+
# - name: Checkout
|
|
112
|
+
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
113
|
+
# with:
|
|
114
|
+
# persist-credentials: false
|
|
115
|
+
|
|
116
|
+
# - name: Setup Node.js
|
|
117
|
+
# uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.1.0
|
|
118
|
+
# with:
|
|
119
|
+
# node-version: "20"
|
|
120
|
+
# cache: "npm"
|
|
121
|
+
|
|
122
|
+
# - name: Install
|
|
123
|
+
# run: npm ci --ignore-scripts
|
|
124
|
+
|
|
125
|
+
# - name: Lint
|
|
126
|
+
# run: npm run lint
|
|
127
|
+
|
|
128
|
+
# # ── 4. Typecheck ──────────────────────────────────────────────────────────
|
|
129
|
+
# typecheck:
|
|
130
|
+
# name: Typecheck
|
|
131
|
+
# runs-on: ubuntu-latest
|
|
132
|
+
# permissions:
|
|
133
|
+
# contents: read
|
|
134
|
+
|
|
135
|
+
# steps:
|
|
136
|
+
# - name: Checkout
|
|
137
|
+
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
138
|
+
# with:
|
|
139
|
+
# persist-credentials: false
|
|
140
|
+
|
|
141
|
+
# - name: Setup Node.js
|
|
142
|
+
# uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.1.0
|
|
143
|
+
# with:
|
|
144
|
+
# node-version: "20"
|
|
145
|
+
# cache: "npm"
|
|
146
|
+
|
|
147
|
+
# - name: Install
|
|
148
|
+
# run: npm ci --ignore-scripts
|
|
149
|
+
|
|
150
|
+
# - name: Typecheck
|
|
151
|
+
# run: npm run typecheck
|
|
152
|
+
|
|
153
|
+
# # ── 5. Test ───────────────────────────────────────────────────────────────
|
|
154
|
+
# test:
|
|
155
|
+
# name: Test
|
|
156
|
+
# runs-on: ubuntu-latest
|
|
157
|
+
# permissions:
|
|
158
|
+
# contents: read
|
|
159
|
+
|
|
160
|
+
# steps:
|
|
161
|
+
# - name: Checkout
|
|
162
|
+
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
163
|
+
# with:
|
|
164
|
+
# persist-credentials: false
|
|
165
|
+
|
|
166
|
+
# - name: Setup Node.js
|
|
167
|
+
# uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.1.0
|
|
168
|
+
# with:
|
|
169
|
+
# node-version: "20"
|
|
170
|
+
# cache: "npm"
|
|
171
|
+
|
|
172
|
+
# - name: Install
|
|
173
|
+
# run: npm ci --ignore-scripts
|
|
174
|
+
|
|
175
|
+
# - name: Test
|
|
176
|
+
# run: npm run test
|
|
177
|
+
|
|
178
|
+
# # ── 6. Build (gate — requires all checks to pass) ─────────────────────────
|
|
179
|
+
# build:
|
|
180
|
+
# name: Build
|
|
181
|
+
# runs-on: ubuntu-latest
|
|
182
|
+
# needs: [secrets-scan, audit, lint, typecheck, test]
|
|
183
|
+
# permissions:
|
|
184
|
+
# contents: read
|
|
185
|
+
|
|
186
|
+
# steps:
|
|
187
|
+
# - name: Checkout
|
|
188
|
+
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
189
|
+
# with:
|
|
190
|
+
# persist-credentials: false
|
|
191
|
+
|
|
192
|
+
# - name: Setup Node.js
|
|
193
|
+
# uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.1.0
|
|
194
|
+
# with:
|
|
195
|
+
# node-version: "20"
|
|
196
|
+
# cache: "npm"
|
|
197
|
+
|
|
198
|
+
# - name: Install
|
|
199
|
+
# run: npm ci --ignore-scripts
|
|
200
|
+
|
|
201
|
+
# - name: Build
|
|
202
|
+
# run: npm run build
|
|
203
|
+
|
|
204
|
+
# # name: ci
|
|
205
|
+
|
|
206
|
+
# # on:
|
|
207
|
+
# # push:
|
|
208
|
+
# # branches: ["main"]
|
|
209
|
+
# # pull_request:
|
|
210
|
+
|
|
211
|
+
# # concurrency:
|
|
212
|
+
# # group: ci-${{ github.ref }}
|
|
213
|
+
# # cancel-in-progress: true
|
|
214
|
+
|
|
215
|
+
# # jobs:
|
|
216
|
+
# # lint:
|
|
217
|
+
# # runs-on: ubuntu-latest
|
|
218
|
+
# # steps:
|
|
219
|
+
# # - uses: actions/checkout@v4
|
|
220
|
+
|
|
221
|
+
# # - uses: actions/setup-node@v4
|
|
222
|
+
# # with:
|
|
223
|
+
# # node-version: "20"
|
|
224
|
+
# # cache: "npm"
|
|
225
|
+
|
|
226
|
+
# # - name: Install
|
|
227
|
+
# # run: npm ci
|
|
228
|
+
|
|
229
|
+
# # - name: Lint
|
|
230
|
+
# # run: npm run lint
|
|
231
|
+
|
|
232
|
+
# # typecheck:
|
|
233
|
+
# # runs-on: ubuntu-latest
|
|
234
|
+
# # steps:
|
|
235
|
+
# # - uses: actions/checkout@v4
|
|
236
|
+
|
|
237
|
+
# # - uses: actions/setup-node@v4
|
|
238
|
+
# # with:
|
|
239
|
+
# # node-version: "20"
|
|
240
|
+
# # cache: "npm"
|
|
241
|
+
|
|
242
|
+
# # - name: Install
|
|
243
|
+
# # run: npm ci
|
|
244
|
+
|
|
245
|
+
# # - name: Typecheck
|
|
246
|
+
# # run: npm run typecheck
|
|
247
|
+
|
|
248
|
+
# # test:
|
|
249
|
+
# # runs-on: ubuntu-latest
|
|
250
|
+
# # steps:
|
|
251
|
+
# # - uses: actions/checkout@v4
|
|
252
|
+
|
|
253
|
+
# # - uses: actions/setup-node@v4
|
|
254
|
+
# # with:
|
|
255
|
+
# # node-version: "20"
|
|
256
|
+
# # cache: "npm"
|
|
257
|
+
|
|
258
|
+
# # - name: Install
|
|
259
|
+
# # run: npm ci
|
|
260
|
+
|
|
261
|
+
# # - name: Test
|
|
262
|
+
# # run: npm run test
|
|
263
|
+
|
|
264
|
+
# # build:
|
|
265
|
+
# # runs-on: ubuntu-latest
|
|
266
|
+
# # needs: [lint, typecheck, test]
|
|
267
|
+
# # steps:
|
|
268
|
+
# # - uses: actions/checkout@v4
|
|
269
|
+
|
|
270
|
+
# # - uses: actions/setup-node@v4
|
|
271
|
+
# # with:
|
|
272
|
+
# # node-version: "20"
|
|
273
|
+
# # cache: "npm"
|
|
274
|
+
|
|
275
|
+
# # - name: Install
|
|
276
|
+
# # run: npm ci
|
|
277
|
+
|
|
278
|
+
# # - name: Build
|
|
279
|
+
# # run: npm run build
|
|
280
|
+
|
|
281
|
+
# # audit:
|
|
282
|
+
# # runs-on: ubuntu-latest
|
|
283
|
+
# # needs: [lint, typecheck, test]
|
|
284
|
+
# # continue-on-error: true
|
|
285
|
+
# # steps:
|
|
286
|
+
# # - uses: actions/checkout@v4
|
|
287
|
+
|
|
288
|
+
# # - uses: actions/setup-node@v4
|
|
289
|
+
# # with:
|
|
290
|
+
# # node-version: "20"
|
|
291
|
+
# # cache: "npm"
|
|
292
|
+
|
|
293
|
+
# # - name: Install
|
|
294
|
+
# # run: npm ci
|
|
295
|
+
|
|
296
|
+
# # - name: Audit (high+)
|
|
297
|
+
# # run: npm run audit
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
name: codeql
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["main"]
|
|
6
|
-
pull_request:
|
|
7
|
-
schedule:
|
|
8
|
-
- cron: "0 3 * * 1" # every Monday 03:00 UTC
|
|
9
|
-
|
|
10
|
-
permissions:
|
|
11
|
-
contents: read
|
|
12
|
-
security-events: write
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
analyze:
|
|
16
|
-
name: Analyze (CodeQL)
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
|
|
19
|
-
strategy:
|
|
20
|
-
fail-fast: false
|
|
21
|
-
matrix:
|
|
22
|
-
language: ["javascript-typescript"]
|
|
23
|
-
|
|
24
|
-
steps:
|
|
25
|
-
- name: Checkout
|
|
26
|
-
uses: actions/checkout@v4
|
|
27
|
-
|
|
28
|
-
- name: Initialize CodeQL
|
|
29
|
-
uses: github/codeql-action/init@
|
|
30
|
-
with:
|
|
31
|
-
languages: ${{ matrix.language }}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
name: codeql
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "0 3 * * 1" # every Monday 03:00 UTC
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
security-events: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
analyze:
|
|
16
|
+
name: Analyze (CodeQL)
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
language: ["javascript-typescript"]
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: Initialize CodeQL
|
|
29
|
+
uses: github/codeql-action/init@f5c2471be782132e47a6e6f9c725e56730d6e9a3
|
|
30
|
+
with:
|
|
31
|
+
languages: ${{ matrix.language }}
|
|
32
|
+
queries: security-extended
|
|
33
|
+
|
|
34
|
+
- name: Autobuild
|
|
35
|
+
uses: github/codeql-action/autobuild@f5c2471be782132e47a6e6f9c725e56730d6e9a3
|
|
36
|
+
|
|
37
|
+
- name: Perform CodeQL Analysis
|
|
38
|
+
uses: github/codeql-action/analyze@f5c2471be782132e47a6e6f9c725e56730d6e9a3
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
npx --no -- commitlint --edit "$1"
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
npx --no -- commitlint --edit "$1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
npm run lint
|
|
5
|
-
npm run typecheck
|
|
6
|
-
npm run test
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
npm run lint
|
|
5
|
+
npm run typecheck
|
|
6
|
+
npm run test
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"semi": true,
|
|
3
|
-
"singleQuote": false,
|
|
4
|
-
"printWidth": 100
|
|
1
|
+
{
|
|
2
|
+
"semi": true,
|
|
3
|
+
"singleQuote": false,
|
|
4
|
+
"printWidth": 100
|
|
5
5
|
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# {{appName}}
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
Starter React + TypeScript (Vite) with a strict structure and default quality gates (lint/format/test/build).
|
|
5
|
-
|
|
6
|
-
## Quickstart
|
|
7
|
-
```bash
|
|
8
|
-
{{packageManager}} install
|
|
9
|
-
{{packageManager}} run dev
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Scripts
|
|
13
|
-
{{packageManager}} run dev : start dev server
|
|
14
|
-
{{packageManager}} run build : production build
|
|
15
|
-
{{packageManager}} run test : run tests
|
|
16
|
-
{{packageManager}} run lint : lint code
|
|
17
|
-
{{packageManager}} run format : format code
|
|
18
|
-
|
|
19
|
-
## Architecture
|
|
20
|
-
src/app : app bootstrap (entry, root component)
|
|
21
|
-
src/features : feature modules (business/UI by feature)
|
|
22
|
-
src/shared : reusable primitives (ui, utils, types)
|
|
23
|
-
|
|
24
|
-
## Contributing
|
|
25
|
-
Keep code inside features/ when it belongs to a domain feature.
|
|
26
|
-
Reuse from shared/ only when it’s truly cross-feature.
|
|
27
|
-
CI must stay green: lint + test + build.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### ADR obligatoire
|
|
31
|
-
**`templates/react-ts/files/docs/adr/0001-context.md`**
|
|
32
|
-
```md
|
|
33
|
-
# ADR 0001 — Project context
|
|
34
|
-
|
|
35
|
-
- Date: {{date}}
|
|
36
|
-
- Status: Accepted
|
|
37
|
-
|
|
38
|
-
## Context
|
|
39
|
-
We need a React + TypeScript starter that is easy to hand over between teams and stays consistent over time.
|
|
40
|
-
|
|
41
|
-
## Decision
|
|
42
|
-
Use Vite + React + TypeScript with:
|
|
43
|
-
- Feature-based structure
|
|
44
|
-
- ESLint + Prettier
|
|
45
|
-
- Vitest for unit tests
|
|
46
|
-
- GitHub Actions CI running lint, test and build
|
|
47
|
-
|
|
48
|
-
## Consequences
|
|
49
|
-
- Fast local setup and consistent code style
|
|
50
|
-
- Enforced quality gates via CI
|
|
51
|
-
- Clear separation between app bootstrap, features and shared code
|
|
1
|
+
# {{appName}}
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Starter React + TypeScript (Vite) with a strict structure and default quality gates (lint/format/test/build).
|
|
5
|
+
|
|
6
|
+
## Quickstart
|
|
7
|
+
```bash
|
|
8
|
+
{{packageManager}} install
|
|
9
|
+
{{packageManager}} run dev
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Scripts
|
|
13
|
+
{{packageManager}} run dev : start dev server
|
|
14
|
+
{{packageManager}} run build : production build
|
|
15
|
+
{{packageManager}} run test : run tests
|
|
16
|
+
{{packageManager}} run lint : lint code
|
|
17
|
+
{{packageManager}} run format : format code
|
|
18
|
+
|
|
19
|
+
## Architecture
|
|
20
|
+
src/app : app bootstrap (entry, root component)
|
|
21
|
+
src/features : feature modules (business/UI by feature)
|
|
22
|
+
src/shared : reusable primitives (ui, utils, types)
|
|
23
|
+
|
|
24
|
+
## Contributing
|
|
25
|
+
Keep code inside features/ when it belongs to a domain feature.
|
|
26
|
+
Reuse from shared/ only when it’s truly cross-feature.
|
|
27
|
+
CI must stay green: lint + test + build.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### ADR obligatoire
|
|
31
|
+
**`templates/react-ts/files/docs/adr/0001-context.md`**
|
|
32
|
+
```md
|
|
33
|
+
# ADR 0001 — Project context
|
|
34
|
+
|
|
35
|
+
- Date: {{date}}
|
|
36
|
+
- Status: Accepted
|
|
37
|
+
|
|
38
|
+
## Context
|
|
39
|
+
We need a React + TypeScript starter that is easy to hand over between teams and stays consistent over time.
|
|
40
|
+
|
|
41
|
+
## Decision
|
|
42
|
+
Use Vite + React + TypeScript with:
|
|
43
|
+
- Feature-based structure
|
|
44
|
+
- ESLint + Prettier
|
|
45
|
+
- Vitest for unit tests
|
|
46
|
+
- GitHub Actions CI running lint, test and build
|
|
47
|
+
|
|
48
|
+
## Consequences
|
|
49
|
+
- Fast local setup and consistent code style
|
|
50
|
+
- Enforced quality gates via CI
|
|
51
|
+
- Clear separation between app bootstrap, features and shared code
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a vulnerability
|
|
4
|
+
If you discover a security vulnerability, please report it privately.
|
|
5
|
+
|
|
6
|
+
- Email: alahyaneossama@gmail.com
|
|
7
|
+
|
|
8
|
+
Do NOT open public issues for security problems.
|
|
9
|
+
|
|
10
|
+
## Supported versions
|
|
11
|
+
Only the latest released version is actively supported.
|
|
12
|
+
|
|
13
|
+
## Scope
|
|
14
|
+
This policy applies to:
|
|
15
|
+
- application code
|
|
16
|
+
- dependencies
|
|
17
|
+
- CI/CD pipelines
|
|
18
|
+
- infrastructure-as-code
|
|
19
|
+
|
|
20
|
+
## Security baseline
|
|
21
|
+
- Keep dependencies up to date.
|
|
22
|
+
- Keep CodeQL enabled.
|
|
23
|
+
- Do not commit secrets.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: ["@commitlint/config-conventional"]
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ["@commitlint/config-conventional"]
|
|
3
3
|
};
|