@forinda/kickjs-cli 8.16.7 → 8.17.1
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/{agent-docs-Dy6kMeRU.mjs → agent-docs-CFIuAYrI.mjs} +3 -3
- package/dist/{agent-docs-Dy6kMeRU.mjs.map → agent-docs-CFIuAYrI.mjs.map} +1 -1
- package/dist/{agent-docs-buI7Tj1n.mjs → agent-docs-DWH4hvgM.mjs} +2 -2
- package/dist/{build-Uc8ph5YA.mjs → build-DAc4cvyH.mjs} +3 -3
- package/dist/{build-Uc8ph5YA.mjs.map → build-DAc4cvyH.mjs.map} +1 -1
- package/dist/{build-EiFZLMe9.mjs → build-DMz7AcV_.mjs} +2 -2
- package/dist/{builtins-5-QXn0O3.mjs → builtins-C-_EeTq7.mjs} +32 -32
- package/dist/{builtins-DTXc9hTj.mjs → builtins-FrW9aIJI.mjs} +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/{config-DoVEXp14.mjs → config-BokOIpu2.mjs} +3 -3
- package/dist/{config-DoVEXp14.mjs.map → config-BokOIpu2.mjs.map} +1 -1
- package/dist/{config-DLxZpAwN.mjs → config-aDiGo3fd.mjs} +2 -2
- package/dist/{doctor-DqSntgXB.mjs → doctor-CTbLbqR-.mjs} +4 -4
- package/dist/{doctor-DqSntgXB.mjs.map → doctor-CTbLbqR-.mjs.map} +1 -1
- package/dist/{fullstack-1dsidO8X.mjs → fullstack-6zzp1Fih.mjs} +3 -3
- package/dist/{fullstack-B2OHY0K4.mjs → fullstack-DT5GVycH.mjs} +4 -4
- package/dist/{fullstack-B2OHY0K4.mjs.map → fullstack-DT5GVycH.mjs.map} +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{plugin-h7j4xQb1.mjs → plugin-BLjbYboH.mjs} +2 -2
- package/dist/{plugin-DzlA2uuk.mjs → plugin-Dz1u7eXJ.mjs} +2 -2
- package/dist/{project-BKEjuej4.mjs → project-CXlUJNgn.mjs} +4 -4
- package/dist/{project-DIPsmDkV.mjs → project-qwat2wn3.mjs} +5 -5
- package/dist/{project-DIPsmDkV.mjs.map → project-qwat2wn3.mjs.map} +1 -1
- package/dist/{project-root-BhubgoTb.mjs → project-root-DCadp0Iq.mjs} +3 -3
- package/dist/{project-root-BhubgoTb.mjs.map → project-root-DCadp0Iq.mjs.map} +1 -1
- package/dist/{project-root-CxTvojiE.mjs → project-root-DxGw6MHj.mjs} +2 -2
- package/dist/{rolldown-runtime-BGq_wXRf.mjs → rolldown-runtime-DvuHrgxr.mjs} +1 -1
- package/dist/{run-plugins-BqI-pxkn.mjs → run-plugins-DypcYjfZ.mjs} +33 -33
- package/dist/run-plugins-DypcYjfZ.mjs.map +1 -0
- package/dist/{typegen-AI0KbOiO.mjs → typegen-Bau6VRWC.mjs} +4 -4
- package/dist/{typegen-Dw60oC5m.mjs → typegen-CzVKXsQp.mjs} +5 -5
- package/dist/{typegen-Dw60oC5m.mjs.map → typegen-CzVKXsQp.mjs.map} +1 -1
- package/dist/{types-CTZ70fug.mjs → types-BLmWEJG1.mjs} +1 -1
- package/package.json +4 -4
- package/templates/base/files/README.md +1 -1
- package/templates/feature-storage/files/_dot_env.example.append +11 -2
- package/templates/feature-storage/files/src/adapters/storage.ts +5 -2
- package/dist/run-plugins-BqI-pxkn.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forinda/kickjs-cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.17.1",
|
|
4
4
|
"description": "CLI for KickJS — project scaffolding, DDD module generation, dev/build/start",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kickjs",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"oxfmt": "^0.74.0",
|
|
42
42
|
"picocolors": "^1.1.1",
|
|
43
43
|
"pluralize": "^8.0.0",
|
|
44
|
-
"@forinda/kickjs
|
|
45
|
-
"@forinda/kickjs": "
|
|
46
|
-
"@forinda/kickjs-
|
|
44
|
+
"@forinda/kickjs": "10.14.0",
|
|
45
|
+
"@forinda/kickjs-cli-kit": "0.1.3",
|
|
46
|
+
"@forinda/kickjs-db": "8.12.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@swc/core": "^1.16.20",
|
|
@@ -69,7 +69,7 @@ Copy `.env.example` to `.env` and configure:
|
|
|
69
69
|
| `NODE_ENV` | `development` | Environment |
|
|
70
70
|
| `LOG_LEVEL` | `info` | Log level (`debug` shows more) |
|
|
71
71
|
|
|
72
|
-
The env schema lives in `src/config/index.ts`. `src/index.ts` imports it once (`import './config'`) before `bootstrap()`, which registers and validates it — a missing or malformed value fails at startup with a clear message. To add a variable, add it to the schema, then to `.env` and `.env.example
|
|
72
|
+
The env schema lives in `src/config/index.ts`. `src/index.ts` imports it once (`import './config'`) before `bootstrap()`, which registers and validates it — a missing or malformed value fails at startup with a clear message. To add a variable, add it to the schema (or to a settings section), set it in `.env`, then run `{{kick}} env example` to regenerate `.env.example` — it's written from the schema and every declared settings section, so don't edit it by hand. `{{kick}} env example --check` fails in CI when it's stale. A section only some setups read — SMTP when `MAIL_DRIVER=smtp`, a bucket only production uses — goes in a `settings` list as `MySettings.optional()`: listed in `.env.example`, but required only when the code that reads it runs ([optional sections](https://kickjs.app/guide/configuration#read-only-on-some-paths-optional)).
|
|
73
73
|
|
|
74
74
|
You don't import anything from `src/config` after that. Read values anywhere through the framework, not `process.env` — they come back parsed (`PORT` is a number, defaults applied) and typed:
|
|
75
75
|
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ── S3 settings (optional, declared by adapter StorageAdapter) ──
|
|
2
|
+
# Bucket name — required when used
|
|
2
3
|
# S3_BUCKET=
|
|
3
|
-
#
|
|
4
|
+
# Access key; set with S3_SECRET_ACCESS_KEY, or neither and pass credentials to s3FromSettings() (an IAM role)
|
|
4
5
|
# S3_ACCESS_KEY_ID=
|
|
6
|
+
# Secret for S3_ACCESS_KEY_ID
|
|
5
7
|
# S3_SECRET_ACCESS_KEY=
|
|
8
|
+
# Region, e.g. eu-west-1 (auto for Cloudflare R2); default us-east-1
|
|
9
|
+
# S3_REGION=
|
|
10
|
+
# Endpoint of an S3-compatible service (Cloudflare R2, MinIO); unset for AWS
|
|
6
11
|
# S3_ENDPOINT=
|
|
12
|
+
# Session token for temporary credentials
|
|
13
|
+
# S3_SESSION_TOKEN=
|
|
14
|
+
# <endpoint>/<bucket>/<key> addressing; default true with S3_ENDPOINT, false for AWS
|
|
15
|
+
# S3_FORCE_PATH_STYLE=
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StorageAdapter } from '@forinda/kickjs-storage/adapter'
|
|
2
2
|
import { diskStorage } from '@forinda/kickjs-storage/disk'
|
|
3
|
-
import { s3FromSettings } from '@forinda/kickjs-storage/settings'
|
|
3
|
+
import { S3Settings, s3FromSettings } from '@forinda/kickjs-storage/settings'
|
|
4
4
|
|
|
5
5
|
export { STORAGE } from '@forinda/kickjs-storage/adapter'
|
|
6
6
|
export type { Storage } from '@forinda/kickjs-storage'
|
|
@@ -8,9 +8,12 @@ export type { Storage } from '@forinda/kickjs-storage'
|
|
|
8
8
|
/**
|
|
9
9
|
* Where the app keeps files: the uploads/ folder until S3_BUCKET is set, then
|
|
10
10
|
* that bucket (S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_REGION; S3_ENDPOINT
|
|
11
|
-
* for Cloudflare R2 or MinIO). Inject it with `@Autowired(STORAGE)`.
|
|
11
|
+
* for Cloudflare R2 or MinIO). Inject it with `@Autowired(STORAGE)`. The bucket's
|
|
12
|
+
* section is declared optional, so `kick env example` lists S3_* while files are
|
|
13
|
+
* on disk; with S3_BUCKET set, a missing or invalid variable stops startup.
|
|
12
14
|
*/
|
|
13
15
|
export const storageAdapter = () =>
|
|
14
16
|
StorageAdapter({
|
|
15
17
|
storage: process.env.S3_BUCKET ? s3FromSettings() : diskStorage({ root: 'uploads' }),
|
|
18
|
+
settings: [S3Settings.optional()],
|
|
16
19
|
})
|