@akanjs/cli 3.3.0-rc.11 → 3.3.0-rc.13
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/.build-stamp +2 -2
- package/{CodeAgent-cqbf9gsv.js → CodeAgent-zkr3s3xy.js} +2 -2
- package/{CodeTui-ehdr4hgw.js → CodeTui-1qvrzfmy.js} +1 -1
- package/TunnelShare-8j95ta3w.js +16 -0
- package/{agent.command-x55ncdjm.js → agent.command-dejgb8vz.js} +18 -17
- package/akanCode.js +2 -2
- package/{appExecutor-1ctzymwa.js → appExecutor-nj95a6en.js} +3 -3
- package/{application.command-xpntxnh8.js → application.command-3tnq1587.js} +45 -15
- package/{applicationBuildRunner-19c76791.js → applicationBuildRunner-cbjy05yg.js} +75 -12
- package/buildBatch.proc.js +10 -10
- package/{cloud.command-p3ybjes7.js → cloud.command-qae6et2e.js} +19 -18
- package/cloud.script-34xmprty.js +31 -0
- package/{code.command-m6skj1kj.js → code.command-xrh506zf.js} +10 -10
- package/commandManifest.json +1 -1
- package/{context.command-3c3nv0d6.js → context.command-fxyzkwg5.js} +18 -18
- package/context.runner-bz1jwxkk.js +32 -0
- package/{csrArtifactBuilder-mdh9ykn2.js → csrArtifactBuilder-rqg85wbg.js} +2 -2
- package/{guideline.command-725fq5p0.js → guideline.command-7dgscqjq.js} +6 -6
- package/guidelines/akanApi/akanApi.instruction.md +10 -0
- package/guidelines/conventions/rules/config.md +5 -0
- package/guidelines/conventions/rules/page.md +4 -3
- package/guidelines/conventions/rules/server.md +21 -81
- package/guidelines/conventions/rules/ssr.md +4 -25
- package/guidelines/conventions/rules/style.md +9 -32
- package/guidelines/cssRule/cssRule.instruction.md +11 -4
- package/guidelines/errorCodes/errorCodes.instruction.md +4 -0
- package/guidelines/pageRule/pageRule.instruction.md +19 -0
- package/guidelines/recipeRule/recipeRule.instruction.md +3 -3
- package/guidelines/runtimeRule/runtimeRule.instruction.md +109 -6
- package/guidelines/ssrRule/ssrRule.instruction.md +3 -0
- package/guidelines/transportRule/transportRule.instruction.md +4 -0
- package/incrementalBuilder.proc.js +8 -8
- package/{index-3mj5trqc.js → index-0bzrcv91.js} +1 -1
- package/{index-q63nbpv7.js → index-0zkxsdsg.js} +3 -3
- package/{index-wxqp1amd.js → index-1c52g4st.js} +11 -9
- package/{index-vnk1qwgr.js → index-22h6vq3f.js} +4 -4
- package/index-35p43f33.js +16 -0
- package/{index-fagjtk6m.js → index-3q7ectss.js} +2 -2
- package/{index-se7n78fh.js → index-54g085ty.js} +1 -1
- package/{index-rt7q20sj.js → index-5sa1tr7w.js} +1 -1
- package/{index-h8w1n11r.js → index-6a3rmwxx.js} +4 -4
- package/{index-yey1envc.js → index-741xbhes.js} +1 -1
- package/{index-9a9t77hz.js → index-77627y32.js} +2 -2
- package/{index-4r8dgm4x.js → index-8javbznc.js} +3 -3
- package/{index-hxg6ctk2.js → index-a2a3nh57.js} +3 -3
- package/{index-j2wq064m.js → index-aezpcphy.js} +121 -15
- package/{index-3r1crbct.js → index-ay4vkwr8.js} +1 -1
- package/{index-t23dgyaf.js → index-b4m7bjbx.js} +7 -7
- package/{index-rdcgz02t.js → index-bma8tmgb.js} +4 -4
- package/{index-3zkhg65e.js → index-c4g8egm2.js} +40 -13
- package/{index-9gjcbp2g.js → index-c8kj74zz.js} +1 -1
- package/{index-fjqapyex.js → index-es2wkn41.js} +40 -5
- package/{index-pyjkbg8e.js → index-extg77rx.js} +2 -2
- package/{index-nmdmkjt2.js → index-fey1dd49.js} +4 -4
- package/{index-c669pbyb.js → index-fjzeak0t.js} +68 -37
- package/{index-f4jydw2x.js → index-gdgbgn82.js} +1 -1
- package/{index-4yvtqcme.js → index-gyyscjzx.js} +16 -4
- package/{index-qecrqpt6.js → index-hxcefw29.js} +1 -1
- package/{index-a4gcdffy.js → index-k380ww64.js} +3 -3
- package/index-kqxs1d7z.js +377 -0
- package/{index-nnmw56fz.js → index-mv3ke0fc.js} +5 -5
- package/{index-m303nhv6.js → index-mvdmb73w.js} +6 -6
- package/{index-cbm9gzgx.js → index-pa53zktp.js} +5 -5
- package/{index-3a3vy2xy.js → index-psvxwemh.js} +8 -8
- package/{index-ckcc9ab3.js → index-r24mj2pw.js} +8 -8
- package/{index-8bta5pnr.js → index-serpfvat.js} +2 -2
- package/{index-kbnvyhy4.js → index-shjjjdte.js} +3 -3
- package/{index-pr9nypg7.js → index-sjmk7wp7.js} +2 -2
- package/{index-wkwe91sn.js → index-th7qbjfz.js} +11 -11
- package/{index-5ahe641t.js → index-vgd07z61.js} +8 -8
- package/{index-crd99zqs.js → index-wzvvqkcy.js} +1 -1
- package/{index-v16gj2as.js → index-ys1sjp6m.js} +90 -51
- package/{index-22bwg8hy.js → index-zc43cyg8.js} +1 -1
- package/index.js +27 -27
- package/{libExecutor-n8hpm8s7.js → libExecutor-mqxnn0h6.js} +2 -2
- package/{library.command-8abb26pg.js → library.command-4kefxh8z.js} +7 -7
- package/{localRegistry.command-sa211m1z.js → localRegistry.command-phgrhkks.js} +18 -17
- package/{module.command-z3cwjf0p.js → module.command-8476gwze.js} +9 -9
- package/{package.command-akynhtee.js → package.command-ygxm5pp9.js} +8 -8
- package/package.json +2 -2
- package/{page.command-3fpdavk9.js → page.command-f7fwkj8y.js} +7 -7
- package/{pipeline.command-ca95n8rd.js → pipeline.command-9htjbrdm.js} +6 -6
- package/{pkgExecutor-a73q41vx.js → pkgExecutor-6a91xng5.js} +2 -2
- package/{primitive.command-xwe9ggnf.js → primitive.command-0k0h0cm0.js} +10 -10
- package/{projectTypecheck-7g542ymk.js → projectTypecheck-7kakbacs.js} +1 -1
- package/{quality.command-7wz7y8z1.js → quality.command-frsfdfc5.js} +9 -8
- package/{repair.command-dej1qtfq.js → repair.command-yag3bpq2.js} +9 -9
- package/{scalar.command-z9qfxnvm.js → scalar.command-qtyrywvt.js} +8 -8
- package/skills/akan-err/SKILL.md +11 -2
- package/skills/akan-page/SKILL.md +4 -14
- package/skills/akan-runtime/SKILL.md +20 -0
- package/{subspace.command-9wekm4gn.js → subspace.command-kr53abzt.js} +10 -10
- package/{tunnel.command-cxc4h3j8.js → tunnel.command-pswe6nye.js} +9 -9
- package/{typeChecker-7jt6abrs.js → typeChecker-epg7ebfy.js} +2 -1
- package/typecheck.proc.js +2 -1
- package/{verify.command-j0w9dr5c.js → verify.command-ghhhzgrw.js} +15 -14
- package/{workflow.command-yt4sz04b.js → workflow.command-fpwqth4w.js} +14 -14
- package/{workspace.command-8mp4mcp2.js → workspace.command-6bbmtn3w.js} +33 -31
- package/TunnelShare-0p4dy89e.js +0 -16
- package/cloud.script-0dsyd10v.js +0 -30
- package/context.runner-yyp7a112.js +0 -32
|
@@ -66,9 +66,9 @@ const config: AppConfig = { api: { prefix: "/backend", websocketPrefix: "/socket
|
|
|
66
66
|
inside it can reach a prebuilt bundle at all. The two jobs need two names.
|
|
67
67
|
- **`new AkanApp({ prefix })` reaches the browser through the page, not through a prop.** `FetchClient` fixes its
|
|
68
68
|
origin when the module graph initializes, before any component renders, so a React prop — a `System.Provider`
|
|
69
|
-
value, anything out of `implicitRootLayout` — is always too late. The value rides the SSR classic
|
|
70
|
-
script instead, the one thing guaranteed to run ahead of every module script, and is omitted when
|
|
71
|
-
what the bundle already assumes. `akan.config.ts` is what a native app bundle or a statically served CSR shell
|
|
69
|
+
value, anything out of `implicitRootLayout` — is always too late. The value rides the data block the SSR classic
|
|
70
|
+
bootstrap script reads instead, the one thing guaranteed to run ahead of every module script, and is omitted when
|
|
71
|
+
it matches what the bundle already assumes. `akan.config.ts` is what a native app bundle or a statically served CSR shell
|
|
72
72
|
follows, because neither is rendered by a server that could tell it otherwise.
|
|
73
73
|
- **A prefix is a path segment.** A blank value or a bare `/` is refused: `/` would be mounted ahead of the SSR
|
|
74
74
|
catch-all and swallow every page route. A prefix whose first segment is a declared basePath is refused at
|
|
@@ -137,6 +137,13 @@ worker per web-serving replica.
|
|
|
137
137
|
`infra/app` chart adds the `prometheus.io/*` scrape annotations with `<branch>.metrics.scrape: true` and reads the
|
|
138
138
|
token from the Secret `<branch>.metrics.tokenSecret` names, and refuses to render `scrape` without it;
|
|
139
139
|
`infra/monitoring` holds a Grafana dashboard and the alert rules.
|
|
140
|
+
- **Each SQL statement is timed once, where its driver sends it**; the `db:` spans, the `akan_db_statement*` series
|
|
141
|
+
(labels `model`, `op`; the SQLite write-turn or Postgres pool wait apart) and the slow log read that
|
|
142
|
+
point. A fingerprint hashes the text with literals `?` and lists collapsed; the text sent never changes.
|
|
143
|
+
`/_akan/app/statements` (metrics token) ranks statements by total time and p95 with their senders.
|
|
144
|
+
`AKAN_LOG_SLOW_STATEMENT_MS` (200, `off`) logs one `SlowStatement` warn per fingerprint a minute; a local dev run
|
|
145
|
+
warns once (`QueryPlan`) of a full scan or temp sort, silenced per fingerprint by `AKAN_QUERY_PLAN_IGNORE`.
|
|
146
|
+
`akan_room_replay_bytes` and `akan_pubsub_buffered_messages` gauge the reconnect replay and the Redis buffer.
|
|
140
147
|
- **Nothing supervises a solo process but the orchestrator**, since the gateway's crash-restart-with-backoff went
|
|
141
148
|
with it. `infra/app/templates/app.yaml` carries the liveness, readiness and startup probes that replace it.
|
|
142
149
|
- **`PORT` is the whole tree's port, and a server-side self-call follows it.** `AkanApp` resolves it once
|
|
@@ -188,13 +195,16 @@ worker per web-serving replica.
|
|
|
188
195
|
and neither does a save in a sibling app. An import that makes a new lib a dependency needs a fresh
|
|
189
196
|
`akan start`, because it needs a `sync` first anyway. Before the first `sync` the manifests do not exist yet and
|
|
190
197
|
the whole `libs/` container is watched, which is the safe direction.
|
|
191
|
-
- **A built artifact runs from the generated app directory, without Docker
|
|
198
|
+
- **A built artifact runs from the generated app directory, without Docker.** `akan build`
|
|
192
199
|
writes `akan.env.json` beside `main.js` with the values the Dockerfile's `ENV` lines set, and `main.js` takes
|
|
193
200
|
each one the process was not started with, so a variable you set (or the image's `ENV`) wins. Start it from that
|
|
194
|
-
directory: the runtime reads its artifacts and writes `runtime/` and SQLite files relative to the cwd.
|
|
201
|
+
directory: the runtime reads its artifacts and writes `runtime/` and SQLite files relative to the cwd. The secrets
|
|
202
|
+
of its server env are not in it (see "Server Env Secrets" below): give them in the env, or it warns and runs
|
|
203
|
+
without them.
|
|
195
204
|
|
|
196
205
|
```bash
|
|
197
206
|
cd dist/apps/<appName> && PORT=3100 bun main.js
|
|
207
|
+
cd dist/apps/<appName> && bun --env-file=/path/outside/dist/<appName>.env main.js
|
|
198
208
|
```
|
|
199
209
|
|
|
200
210
|
- **A server a test boots in-process takes `start({ listen: false, schedules: false })`** to run no internal
|
|
@@ -231,6 +241,16 @@ normalized to `info` with one warning.
|
|
|
231
241
|
render message, a server-side `fetch` sends `traceparent` to the app's own server and to a `clone({ origin })`,
|
|
232
242
|
every websocket frame is a span under its handshake's id, and a queued job is a trace of its own that links the
|
|
233
243
|
enqueuing one.
|
|
244
|
+
- **Errors to a tracker go through `option.setErrorReporter(fn)`**, never a `Logger` sink parsing lines. It gets each
|
|
245
|
+
server 5xx (never a 4xx), render error, uncaught exception and unhandled rejection as a real `Error`, once, after
|
|
246
|
+
the response, with `{ source, traceId, endpoint, routeId, accountId, digest }`, in the solo server or the replica
|
|
247
|
+
(a worker's render error is carried to it; the gateway reports none). Reports of one request share `traceId`. A
|
|
248
|
+
process hands it at most 600 errors a minute, 10 of them process errors, and 3 render errors a request, so `await`
|
|
249
|
+
what the reporter sends: an unawaited send that fails returns as an unhandled rejection. `option.setClientReport({
|
|
250
|
+
sampleRate })`, off unless set, adds what pages hit in the browser as a `BrowserError` through
|
|
251
|
+
`/_akan/client-report`: a report is taken only with the signed id the page's `Server-Timing` gave that page view,
|
|
252
|
+
for 30 to 60 minutes and five times, and its text is cleaned of query strings, email addresses and credentials. With
|
|
253
|
+
more than one gateway or pod, set `AKAN_CLIENT_REPORT_KEY` (a secret, 32+ characters, the same on each) so each takes the others' ids.
|
|
234
254
|
- **Not everything carries context, by design.** The primitive query fast path (an unauthenticated GET of a
|
|
235
255
|
primitive with no args, guards or middlewares) skips it; the schedule adaptor's own `started/finished/error`
|
|
236
256
|
lines wrap the traced handler from outside; gateway lines written outside a request have none. `akan logs
|
|
@@ -268,7 +288,17 @@ normalized to `info` with one warning.
|
|
|
268
288
|
`AKAN_LOG_FLIGHT_MS`; an `x-akan-debug` header lowers one request to `trace`, records its spans and answers with
|
|
269
289
|
`Server-Timing` — under the local dev runtime, or with the `AKAN_LOG_DEBUG_HEADER` secret. A local runtime sends
|
|
270
290
|
`Server-Timing` on every signal response. Spans carry ids, parents and start offsets; under `AKAN_TRACE=1` each
|
|
271
|
-
|
|
291
|
+
SQL statement sent is a `db:<model>.<op>` span, never its text or values.
|
|
292
|
+
- **`OTEL_EXPORTER_OTLP_ENDPOINT` (or `…_TRACES_ENDPOINT` / `…_LOGS_ENDPOINT`) turns on OTLP/HTTP JSON export**;
|
|
293
|
+
with none set nothing is created. Each process sends its own spans and log records with `akan.process.role`, the
|
|
294
|
+
RSC worker included, batched in a bounded queue that drops its oldest and never blocks or throws into a request.
|
|
295
|
+
`OTEL_TRACES_SAMPLER` (`always_on`, `always_off`, `traceidratio` and their `parentbased_` forms, default
|
|
296
|
+
`parentbased_always_on`; any other value exports no spans) decides at the first TCP hop, and the sampled flag of
|
|
297
|
+
`traceparent` carries it to the replica and the worker. Logs go only with `OTEL_LOGS_EXPORTER=otlp` or
|
|
298
|
+
`…_LOGS_ENDPOINT`, never from the generic endpoint alone, their message text as written; only secret-named attrs are
|
|
299
|
+
redacted. Stage spans wait for `AKAN_TRACE=1`. `OTEL_EXPORTER_OTLP_HEADERS` values are credentials, never
|
|
300
|
+
logged; `OTEL_SERVICE_NAME`, `OTEL_RESOURCE_ATTRIBUTES` and `OTEL_SDK_DISABLED` work as in the OTel spec. It is
|
|
301
|
+
separate from `AKAN_TRACE` and `x-akan-debug`: neither changes what is sampled.
|
|
272
302
|
- **Every dev route is listed once, in `akanjs/server/routing/devSurfaces`** — devtools, Studio, `/_akan/hmr`,
|
|
273
303
|
the ssr-dev and csr-dev module registries, `/__rsc/manifest` — and is mounted through `DevRoutes.mount`, which
|
|
274
304
|
refuses a path the list lacks. Each answers only localhost, an IP address, the app's own hosts and
|
|
@@ -324,6 +354,79 @@ const config: AppConfig = { docker: "FROM oven/bun:1.4.4-slim\n…" }; // verbat
|
|
|
324
354
|
- `AkanAppConfig.docker` is the resolved declaration; `AkanAppConfig.dockerfile` is the text `akan build` writes
|
|
325
355
|
to `dist/apps/<app>/Dockerfile`.
|
|
326
356
|
|
|
357
|
+
## Server Env Secrets — Read From The Process Env
|
|
358
|
+
|
|
359
|
+
`akan build <app>` puts no secret value of the server env into the server it builds. The env file stays the one
|
|
360
|
+
place a developer writes them; the build turns each into a read of an environment variable the deployment sets.
|
|
361
|
+
|
|
362
|
+
- **What is a secret.** A string under a secret-named key at any depth below it, unless blank, or a URL carrying a
|
|
363
|
+
password or a secret-named query parameter. The names are the ones the logger masks: `password`, `pass`, `pwd`,
|
|
364
|
+
`token`, `jwt`, `secret`, `cookie`, `authorization`, `apiKey`, `aesKey`, `privateKey`, `accessKey`, `authKey`,
|
|
365
|
+
`hashKey`, a signing, encryption, master or session key, `webhook`, `credential`, a `dsn`, a connection string,
|
|
366
|
+
`iapVerify`, `serviceAccount`, `cred(s)`. Numbers, booleans and `null` never are. The rule over-matches
|
|
367
|
+
(`cookieDomain`, `tokenTtl` as a string), which only means the deployment sets that value too; it misses a key such
|
|
368
|
+
as `stripeKey` or `salt`, which stays in the build unless the env file reads `process.env.<NAME>` itself.
|
|
369
|
+
- **Its variable** is its key path, each key in upper snake case and joined with `__`:
|
|
370
|
+
`security.sso.google.clientSecret` is `SECURITY__SSO__GOOGLE__CLIENT_SECRET`, `iapVerify.google.private_key` is
|
|
371
|
+
`IAP_VERIFY__GOOGLE__PRIVATE_KEY`. Four keep the names the framework already reads ahead of the env file:
|
|
372
|
+
`security.jwtSecret` is `JWT_SECRET`, `database.postgres.url` is `POSTGRES_URL` (`POSTGRES_URI` satisfies it),
|
|
373
|
+
`database.postgres.password` is `POSTGRES_PASSWORD`, `database.postgres.insightUrl` is `POSTGRES_INSIGHT_URL`.
|
|
374
|
+
An array holding a secret moves whole into one variable holding JSON (`discord.tokens` is `DISCORD__TOKENS`,
|
|
375
|
+
`["a","b"]`). An object is never one variable: each secret string in it is its own. A multi-line value (a PEM key)
|
|
376
|
+
is carried with its real line breaks.
|
|
377
|
+
- **What the build rewrites** is source text: a string literal that is the value of a key in the object
|
|
378
|
+
`export const env` holds, in the app's `env.server.<env>.ts`, in `env.server.ts` itself where a pipeline copies an
|
|
379
|
+
env file over it, and in each lib's `env.server.<name>.ts`. In `process.env.MY_URL ?? "literal"` only the literal
|
|
380
|
+
becomes the read, so the developer's own variable comes first. Two keys that map to one name (`apiKey` and
|
|
381
|
+
`api_key`), and a name the platform or akan owns (`PATH`, `HOME`, `HOSTNAME`, `PORT`, `USER`, `PWD`, `TZ`,
|
|
382
|
+
`NODE_ENV`, `AKAN_*`, `BUN_*`), stop the build before it starts.
|
|
383
|
+
- **What stops a build.** Before any phase the build loads the env file with each literal marked, to list the
|
|
384
|
+
variables and to see what it cannot move. A secret-named key whose value is computed, imported or spread from
|
|
385
|
+
another file stops it there, whatever the value's length or shape, naming the app, the env file and the keys:
|
|
386
|
+
write the string at the key, or `process.env.<NAME>`. A key the env file reads from `process.env` itself is the
|
|
387
|
+
developer's own: it is not moved, never stops the build, and the bundle holds the read and no value, set in the
|
|
388
|
+
build's shell or not. After the bundles are written the build looks in `dist/apps/<app>` for each secret string it
|
|
389
|
+
left out, eight characters or longer: a long mixed one found there stops the build, naming its key, its variable
|
|
390
|
+
and a plain key of the env that holds it too; a short or plain one (a password equal to a database's name) is a
|
|
391
|
+
warning by the same names, as is a shorter string a plain key holds as well. No message prints a value.
|
|
392
|
+
- **How the env file is loaded.** In a process with `PATH`, `HOME` and `AKAN_PUBLIC_ENV` alone, so the list is the
|
|
393
|
+
same from any shell and `process.env.X ?? fallback` reads as the fallback the bundle carries. A file that cannot
|
|
394
|
+
load so (`process.env.HOSTS!.split(",")`) is loaded again with the build shell's variables, where a value a
|
|
395
|
+
variable gave counts as the developer's read. One that loads neither way stops the build with the error's class
|
|
396
|
+
and its file and line, never its message, which could quote a value; loading has a 60 second limit, and a file
|
|
397
|
+
that leaves a timer or a server open still ends when its answer is in.
|
|
398
|
+
- **What the image carries** is the list: `AKAN_ENV_NAMES` in `akan.env.json` and the Dockerfile, names with
|
|
399
|
+
`:json` or `:multiline` after an array or a multi-line value, never a value. The build prints the names.
|
|
400
|
+
- **At boot**, in `AkanApp.start` before the server is loaded or a replica is spawned, the list is compared with the
|
|
401
|
+
process env. A variable not set, or set empty, is one warning naming every such variable. The framework does not
|
|
402
|
+
stop for it, and what reads the value gets `undefined` and may stop (an app that requires its
|
|
403
|
+
JWT secret does); version 3.5.0 will refuse to boot. A `:json` variable that does not parse as an
|
|
404
|
+
array is refused (`secretEnvInvalid`). A `:multiline` variable holding a backslash and an n in place of its line
|
|
405
|
+
breaks is warned about by name. No message carries a value. `bun console.js` and `bun main.js ops …` do not
|
|
406
|
+
check.
|
|
407
|
+
- **`akan secret-env <app> [--env <env>]`** lists each variable with its kind, whether the shell sets it, and its key
|
|
408
|
+
in the env file. `--out <file>` writes the values the env file evaluates to: `--format k8s` (the default) a
|
|
409
|
+
`kind: Secret` with base64 `data`, named by `--name` (default `<app>-env`); `--format dotenv` `NAME=value` lines
|
|
410
|
+
quoted so that Bun's loader reads each back unchanged. The file is created readable by its user alone. A path
|
|
411
|
+
under `dist/`, a path git would track and an existing file (without `--force`) are refused. The file holds the
|
|
412
|
+
secrets: apply or import it, then delete it.
|
|
413
|
+
- **Giving the server its variables.** Kubernetes: apply the Secret and name it in the container's `envFrom`; a
|
|
414
|
+
Secret that is missing stops the container before boot. Docker: `-e NAME=value`; `docker run --env-file` takes
|
|
415
|
+
each line as written, so of the dotenv file it reads the unquoted values and no quoted or multi-line one.
|
|
416
|
+
A host: `bun --env-file=<file> main.js`, with the file outside `dist/apps/<app>`, which an image copies whole.
|
|
417
|
+
Every replica and the RSC worker inherit the gateway's env, so a changed Secret reaches a pod only when it
|
|
418
|
+
restarts.
|
|
419
|
+
- **`akan build <app> --inline-secrets`** keeps each value in the build as what its read falls back to, for a
|
|
420
|
+
deployment that does not set the variables yet; a variable that is set still wins, the boot warning says the
|
|
421
|
+
built-in values are in use, and nothing above stops it: a computed or imported secret stays, the files written are
|
|
422
|
+
not searched, and an env file that cannot be loaded is a warning, after which the env files are bundled as
|
|
423
|
+
written and no variable is read. Version 3.5.0 removes the flag.
|
|
424
|
+
- **Read as written, as before:** `akan start` and `akan test` (the env file is imported from source), a
|
|
425
|
+
`--profile` build (its profile file may hold no secret at all), and the server a desktop or mobile build carries.
|
|
426
|
+
- **Not covered:** a key file an env value names by path (`security.sso.apple.keyFilePath` under `private/`) ships
|
|
427
|
+
with `private/`; mount it instead. Images built before 3.4.0 still hold the values: rotate the secrets once the
|
|
428
|
+
new images are live.
|
|
429
|
+
|
|
327
430
|
## Native Apps — The `native` Section
|
|
328
431
|
|
|
329
432
|
An app's iOS, Android and desktop (macOS, Windows, Linux) apps are the `native` section of its `akan.config.ts`.
|
|
@@ -15,6 +15,9 @@ on the client side**.
|
|
|
15
15
|
- In domain UI the file role fixes the directive: `Template`, `Zone`, and `Util` are client; `Unit` and `View` are
|
|
16
16
|
server. That decides *where* the boundary sits, not how much markup sits behind it — a `Zone` that hoards markup
|
|
17
17
|
is still an SSR regression.
|
|
18
|
+
- Keep page props serializable unless the route pattern clearly allows otherwise, and be careful importing
|
|
19
|
+
client-only code into pages and layouts. Preserve file roles (`.document.ts`, `.service.ts`, `.store.ts`,
|
|
20
|
+
`.constant.ts`, `.client.ts`) and inspect nearby files before introducing a new boundary pattern.
|
|
18
21
|
- Measure with `akan quality ssr` (`--format json` for tooling). It reports the server render share per app and
|
|
19
22
|
lib as server-rendered JSX elements over total. Treat **50% server share as the floor** and a falling share as a
|
|
20
23
|
regression to justify or revert.
|
|
@@ -286,6 +286,10 @@ HTTP verb a mutation is mounted under. `conventions` carries the invariants —
|
|
|
286
286
|
|
|
287
287
|
- `.body(...)` / `.param(...)` args accept `ConstantFieldTypeInput` only: scalars, model refs, or `enumOf(...)`.
|
|
288
288
|
Numbers are `Int` or `Float` — `Number` is rejected (`pkgs/akanjs/signal/endpointInfo.ts`).
|
|
289
|
+
- **A model or scalar argument is checked against the request schema on every transport**: a wrong JSON type, a
|
|
290
|
+
value outside its enum or a missing required field answers 400 with `data.name` naming the path
|
|
291
|
+
(`data.items.2.price`); a defaulted field may be left out, an undeclared key is dropped, and a stored model's input
|
|
292
|
+
keeps an absent field absent.
|
|
289
293
|
- **`Upload` is valid only inside a mutation flagged for file upload**:
|
|
290
294
|
`mutation([cnst.File], { fileUpload: true }).body("files", [Upload])`, as the `file` module does. It is not a
|
|
291
295
|
model field type. The other body args of such a mutation arrive typed as in a JSON body. A file's `type` on the
|
|
@@ -3,21 +3,21 @@ import"./index-zyjztrvc.js";
|
|
|
3
3
|
import {
|
|
4
4
|
CodegenLock,
|
|
5
5
|
WorkspaceExecutor
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-ys1sjp6m.js";
|
|
7
7
|
import"./index-j4yvgfhr.js";
|
|
8
8
|
import {
|
|
9
9
|
HmrWatcher,
|
|
10
10
|
WatchRootResolver,
|
|
11
11
|
ApplicationBuildReporter
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-serpfvat.js";
|
|
13
13
|
import {
|
|
14
14
|
AppExecutor2
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
15
|
+
} from "./index-77627y32.js";
|
|
16
|
+
import"./index-741xbhes.js";
|
|
17
|
+
import"./index-wzvvqkcy.js";
|
|
18
18
|
import {
|
|
19
19
|
ServerGraphFile
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-0bzrcv91.js";
|
|
21
21
|
import {
|
|
22
22
|
GraphClientEntryDiscovery,
|
|
23
23
|
RouteClientBuilder,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
DevChangePlanner,
|
|
28
28
|
DevGeneratedIndexSync,
|
|
29
29
|
SsrDevBundler
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-gyyscjzx.js";
|
|
31
31
|
import"./index-trffs83s.js";
|
|
32
32
|
import {
|
|
33
33
|
FrameworkGraph2
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
prepareDevWatchBatch
|
|
43
43
|
} from "./index-a5vmm6x4.js";
|
|
44
|
-
import"./index-
|
|
44
|
+
import"./index-ay4vkwr8.js";
|
|
45
45
|
|
|
46
46
|
// pkgs/@akanjs/devkit/incrementalBuilder/incrementalBuilder.proc.ts
|
|
47
47
|
import path6 from "path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AppExecutor2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-77627y32.js";
|
|
5
5
|
import {
|
|
6
6
|
LibExecutor2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-741xbhes.js";
|
|
8
8
|
import {
|
|
9
9
|
createAst,
|
|
10
10
|
AkanIndex
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./index-va90m8nd.js";
|
|
16
16
|
import {
|
|
17
17
|
camelToKebabCase
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-mv3ke0fc.js";
|
|
19
19
|
|
|
20
20
|
// pkgs/@akanjs/devkit/workflow/artifacts.ts
|
|
21
21
|
import { capitalize as capitalize2 } from "akanjs/common";
|
|
@@ -3,29 +3,32 @@ import {
|
|
|
3
3
|
parseBiomeReport,
|
|
4
4
|
Linter,
|
|
5
5
|
ProjectTypecheck2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-ys1sjp6m.js";
|
|
7
7
|
import {
|
|
8
8
|
TypecheckFailure
|
|
9
9
|
} from "./index-j4yvgfhr.js";
|
|
10
10
|
import {
|
|
11
11
|
ApplicationBuildReporter
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-serpfvat.js";
|
|
13
13
|
import {
|
|
14
14
|
AppExecutor2
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-77627y32.js";
|
|
16
16
|
import {
|
|
17
17
|
LibExecutor2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-741xbhes.js";
|
|
19
19
|
import {
|
|
20
20
|
PkgExecutor2
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-wzvvqkcy.js";
|
|
22
22
|
import {
|
|
23
23
|
WorkspaceRunner,
|
|
24
24
|
AkanQualityScanner
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-aezpcphy.js";
|
|
26
|
+
import {
|
|
27
|
+
WithheldEnvFile
|
|
28
|
+
} from "./index-35p43f33.js";
|
|
26
29
|
import {
|
|
27
30
|
VerifyScope
|
|
28
|
-
} from "./index-
|
|
31
|
+
} from "./index-th7qbjfz.js";
|
|
29
32
|
|
|
30
33
|
// pkgs/@akanjs/cli/verify/verifyComments.ts
|
|
31
34
|
import { existsSync } from "fs";
|
|
@@ -205,7 +208,6 @@ import path5 from "path";
|
|
|
205
208
|
// pkgs/@akanjs/cli/verify/verifyDiagnostics.ts
|
|
206
209
|
import { readFileSync } from "fs";
|
|
207
210
|
import path2 from "path";
|
|
208
|
-
|
|
209
211
|
class VerifyDiagnostics {
|
|
210
212
|
static fromTypecheck(records) {
|
|
211
213
|
return records.map((record) => {
|
|
@@ -248,7 +250,7 @@ class VerifyDiagnostics {
|
|
|
248
250
|
col: diagnostic.location?.start?.column ?? 0,
|
|
249
251
|
code: diagnostic.category ?? "biome",
|
|
250
252
|
severity: diagnostic.severity === "error" ? "error" : "warning",
|
|
251
|
-
...VerifyDiagnostics.#adapterErrorOf(file, diagnostic.message) ?? VerifyDiagnostics.#deepImportOf(root, file, diagnostic) ?? { message: diagnostic.message }
|
|
253
|
+
...WithheldEnvFile.isEnvFile(file ?? undefined) ? { message: WithheldEnvFile.note } : VerifyDiagnostics.#adapterErrorOf(file, diagnostic.message) ?? VerifyDiagnostics.#deepImportOf(root, file, diagnostic) ?? { message: diagnostic.message }
|
|
252
254
|
};
|
|
253
255
|
});
|
|
254
256
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
script
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-mv3ke0fc.js";
|
|
5
5
|
import {
|
|
6
6
|
jsonText
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-0zkxsdsg.js";
|
|
8
8
|
import {
|
|
9
9
|
akanMcpInstallTargets
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-6a3rmwxx.js";
|
|
11
11
|
import {
|
|
12
12
|
ContextRunner2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-vgd07z61.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/cli/context/context.script.ts
|
|
16
16
|
import { Logger } from "akanjs/common";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// pkgs/@akanjs/devkit/lint/withheldEnvFile.ts
|
|
3
|
+
class WithheldEnvFile {
|
|
4
|
+
static #name = "env[\\\\/]env\\.(?:server|client)(?:\\.[A-Za-z0-9-]+)*\\.ts";
|
|
5
|
+
static #envFile = new RegExp(`[\\\\/]${WithheldEnvFile.#name}$`);
|
|
6
|
+
static #named = new RegExp(WithheldEnvFile.#name);
|
|
7
|
+
static note = "the text is withheld because this file holds secrets";
|
|
8
|
+
static isEnvFile(fileName) {
|
|
9
|
+
return fileName !== undefined && WithheldEnvFile.#envFile.test(fileName.startsWith("env/") ? `/${fileName}` : fileName);
|
|
10
|
+
}
|
|
11
|
+
static namesEnvFile(text) {
|
|
12
|
+
return WithheldEnvFile.#named.test(text);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { WithheldEnvFile };
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-mv3ke0fc.js";
|
|
6
6
|
import {
|
|
7
7
|
generatedFilesForSync,
|
|
8
8
|
createPassedPrimitiveReport,
|
|
9
9
|
scalarChangedFiles
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-0zkxsdsg.js";
|
|
11
11
|
import {
|
|
12
12
|
pluralizeName
|
|
13
13
|
} from "./index-nz8prx9g.js";
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
isScannedRootEntry,
|
|
9
9
|
extractBlockVersion,
|
|
10
10
|
readDevkitVersion
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-ys1sjp6m.js";
|
|
12
12
|
import {
|
|
13
13
|
FileSys2
|
|
14
14
|
} from "./index-zyjztrvc.js";
|
|
15
15
|
import {
|
|
16
16
|
AppExecutor2
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-77627y32.js";
|
|
18
18
|
import {
|
|
19
19
|
LibExecutor2
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-741xbhes.js";
|
|
21
21
|
import {
|
|
22
22
|
workflowPathsForPlan,
|
|
23
23
|
workflowRunArtifactPath,
|
|
24
24
|
workflowSyncDir
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-0zkxsdsg.js";
|
|
26
26
|
import {
|
|
27
27
|
collectRecipeSources2,
|
|
28
28
|
scanRecipes2,
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
AkanAppConfig,
|
|
8
8
|
increaseBuildNum,
|
|
9
9
|
decreaseBuildNum
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ys1sjp6m.js";
|
|
11
11
|
import {
|
|
12
12
|
FileSys2
|
|
13
13
|
} from "./index-zyjztrvc.js";
|
|
14
14
|
import {
|
|
15
15
|
LibExecutor2
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-741xbhes.js";
|
|
17
17
|
|
|
18
18
|
// pkgs/@akanjs/devkit/executors/appExecutor.ts
|
|
19
19
|
import { cp as cpEntry, lstat, mkdir, readdir as readDirEntries, realpath, rm as rm2, stat, symlink } from "fs/promises";
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-mv3ke0fc.js";
|
|
6
6
|
import {
|
|
7
7
|
CommandExecutionError,
|
|
8
8
|
LibSource,
|
|
9
9
|
formatLibStatuses
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ys1sjp6m.js";
|
|
11
11
|
import {
|
|
12
12
|
LibExecutor2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-741xbhes.js";
|
|
14
14
|
import {
|
|
15
15
|
assertPlainName
|
|
16
16
|
} from "./index-va90m8nd.js";
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-mv3ke0fc.js";
|
|
6
6
|
import {
|
|
7
7
|
FileSys2
|
|
8
8
|
} from "./index-zyjztrvc.js";
|
|
9
9
|
import {
|
|
10
10
|
PkgExecutor2
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-wzvvqkcy.js";
|
|
12
12
|
import {
|
|
13
13
|
MaintainabilityBaseline
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-54g085ty.js";
|
|
15
15
|
import {
|
|
16
16
|
assertPackageName
|
|
17
17
|
} from "./index-va90m8nd.js";
|