@voltro/cli 0.37.0 → 0.38.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/CHANGELOG.md +92 -0
- package/dist/{apiBuild-DGsShRuF.js → apiBuild-CvacV4zA.js} +2 -2
- package/dist/apiBuild-ttSDDOGp.js +2 -0
- package/dist/bin.js +1 -1
- package/dist/bootRefusal-pgvDxlrU.js +7 -0
- package/dist/{build-CiFA-E19.js → build-_LoTC1s0.js} +30 -30
- package/dist/{checkCommand-CLPTzYqM.js → checkCommand-Pjk5sBl2.js} +2 -2
- package/dist/{checkCommand-CIPYyNyc.js → checkCommand-wibtQx-N.js} +1 -1
- package/dist/{codegenCommand-BxS3sCeJ.js → codegenCommand-C60m_LCp.js} +1 -1
- package/dist/{codemodRunner-cyqu5oxr.js → codemodRunner-CXgQ-ecJ.js} +314 -201
- package/dist/{commands-BwG9A9Vv.js → commands-DaZVi9wi.js} +20 -20
- package/dist/{dashboardCommand-C7U146xQ.js → dashboardCommand-Dxy_kmoW.js} +3 -3
- package/dist/{dataCommand-BOwd8_aJ.js → dataCommand-D6-Ha2lf.js} +1 -1
- package/dist/{dev-BV6XNYKf.js → dev-CAOoXOkc.js} +1 -1
- package/dist/{dev-bwDgSObH.js → dev-E7Eo5GHc.js} +261 -260
- package/dist/doctorCommand-Cjl8Yii8.js +2 -0
- package/dist/{doctorCommand-BXyrtN2l.js → doctorCommand-gmDyALFL.js} +10 -10
- package/dist/{dormancyCommand-BDdRRLsa.js → dormancyCommand-CE6wG8lj.js} +1 -1
- package/dist/{embeddingsCommand-CjWGcAE6.js → embeddingsCommand-C3uAuf6N.js} +1 -1
- package/dist/{envCommand-B_TeG297.js → envCommand-DzuWh8ya.js} +19 -19
- package/dist/{evolveCommand-D6N-WfA4.js → evolveCommand-DPLqcYb2.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{infoCommand-BHKTprrx.js → infoCommand-CmczGj_l.js} +1 -1
- package/dist/{runtimeTrace-WYV7qYvz.js → runtimeTrace-6jfznSzr.js} +1 -1
- package/dist/{sdkgen-TM5sSdf7.js → sdkgen-CEJZZQUA.js} +1 -1
- package/dist/serveCommand-DNRF2nDI.js +2 -0
- package/dist/{serveCommand-CyZsXL1l.js → serveCommand-DnY4VS3D.js} +541 -540
- package/dist/serveEntry.js +1 -1
- package/dist/{start-BgN62boB.js → start-CidwCcjl.js} +1 -1
- package/dist/{start-T4VesWiM.js → start-RCh6qKFe.js} +24 -24
- package/dist/startEntry.js +1 -1
- package/dist/startup.d.ts +40 -1
- package/dist/startup.js +2 -2
- package/dist/startupRunner-CEqQq7ax.js +108 -0
- package/dist/updateCommand-B0J_T9Vs.js +2 -0
- package/dist/{updateCommand-9GHHsmDf.js → updateCommand-CmksX7m_.js} +1 -1
- package/dist/{webDev-Dybxew86.js → webDev-BKdD7c_a.js} +689 -691
- package/dist/webDev-CcJfdSjl2.js +2 -0
- package/dist/{webhooksCommand-CHWSPk5z.js → webhooksCommand-BHeaF1ZJ.js} +1 -1
- package/package.json +29 -17
- package/templates/AGENTS.md +1 -1
- package/templates/agent-docs/_index.md +1 -1
- package/templates/agent-docs/plugins/audit.md +4 -0
- package/templates/agent-docs/plugins/auth.md +4 -6
- package/templates/agent-docs/reference.md +3 -2
- package/templates/agent-docs/whats-new.md +49 -47
- package/templates/apps/api-ai/package.json +7 -7
- package/templates/apps/api-auth/package.json +8 -8
- package/templates/apps/api-backend/package.json +7 -7
- package/templates/apps/api-backend-deactivation/package.json +7 -7
- package/templates/apps/api-backend-mail/package.json +8 -8
- package/templates/apps/api-backend-mariadb/package.json +9 -9
- package/templates/apps/api-backend-sqlite/package.json +8 -8
- package/templates/apps/api-backend-storage/package.json +8 -8
- package/templates/apps/api-cms/package.json +10 -10
- package/templates/apps/api-cms/tests/content.write.test.ts +16 -2
- package/templates/apps/api-collab/mutations/documents.setBody.mutation.server.ts +11 -5
- package/templates/apps/api-collab/package.json +8 -8
- package/templates/apps/api-collab/tests/documents.setBody.test.ts +8 -2
- package/templates/apps/api-data-advanced/package.json +8 -8
- package/templates/apps/api-durable/package.json +8 -8
- package/templates/apps/api-feature-flags/package.json +9 -9
- package/templates/apps/api-governance/package.json +8 -8
- package/templates/apps/api-kv/package.json +8 -8
- package/templates/apps/api-moderation/package.json +8 -8
- package/templates/apps/api-observability/package.json +8 -8
- package/templates/apps/api-ratelimit/package.json +8 -8
- package/templates/apps/api-rbac/package.json +8 -8
- package/templates/apps/api-rest/package.json +7 -7
- package/templates/apps/api-saas/package.json +11 -11
- package/templates/apps/api-saas-starter/package.json +10 -10
- package/templates/apps/api-search/package.json +8 -8
- package/templates/apps/api-status/package.json +8 -8
- package/templates/apps/api-versioning/mutations/documents.update.mutation.server.ts +7 -5
- package/templates/apps/api-versioning/package.json +8 -8
- package/templates/apps/api-webhooks/package.json +9 -9
- package/templates/apps/changelog/package.json +6 -6
- package/templates/apps/edge-functions/package.json +2 -2
- package/templates/apps/frontend-admin/package.json +8 -8
- package/templates/apps/frontend-app/package.json +9 -9
- package/templates/apps/frontend-auth/package.json +8 -8
- package/templates/apps/frontend-blank/package.json +7 -7
- package/templates/apps/frontend-cms/package.json +9 -9
- package/templates/apps/frontend-collab/package.json +10 -10
- package/templates/apps/frontend-contact/package.json +7 -7
- package/templates/apps/frontend-dashboard/package.json +7 -7
- package/templates/apps/frontend-docs/package.json +7 -7
- package/templates/apps/frontend-i18n/package.json +6 -6
- package/templates/apps/frontend-landing/package.json +7 -7
- package/templates/apps/frontend-portal/package.json +8 -8
- package/templates/apps/frontend-saas/package.json +8 -8
- package/templates/apps/frontend-spa/package.json +7 -7
- package/templates/apps/frontend-ssr/package.json +7 -7
- package/templates/apps/frontend-ssr-api/package.json +8 -8
- package/templates/apps/frontend-static-blog/package.json +6 -6
- package/templates/apps/frontend-status/package.json +8 -8
- package/templates/apps/mobile-app/package.json +3 -3
- package/templates/patches/@effect__cluster@0.60.0.patch +51 -3
- package/dist/apiBuild-D0f6hYbH.js +0 -2
- package/dist/doctorCommand-C4L61G_L.js +0 -2
- package/dist/serveCommand-qumm7jdF.js +0 -2
- package/dist/startupRunner-DPGFchOa.js +0 -71
- package/dist/updateCommand-BN0tkl9-.js +0 -2
- package/dist/webDev-BcykISYQ2.js +0 -2
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/cms": "0.
|
|
18
|
-
"@voltro/database": "0.
|
|
19
|
-
"@voltro/env": "0.
|
|
20
|
-
"@voltro/plugin-auth": "0.
|
|
21
|
-
"@voltro/plugin-multitenancy": "0.
|
|
22
|
-
"@voltro/protocol": "0.
|
|
23
|
-
"@voltro/runtime": "0.
|
|
24
|
-
"@voltro/sql-postgres": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/cms": "0.38.0",
|
|
18
|
+
"@voltro/database": "0.38.0",
|
|
19
|
+
"@voltro/env": "0.38.0",
|
|
20
|
+
"@voltro/plugin-auth": "0.38.0",
|
|
21
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
22
|
+
"@voltro/protocol": "0.38.0",
|
|
23
|
+
"@voltro/runtime": "0.38.0",
|
|
24
|
+
"@voltro/sql-postgres": "0.38.0",
|
|
25
25
|
"effect": "^3.22.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@voltro/testing": "0.
|
|
28
|
+
"@voltro/testing": "0.38.0",
|
|
29
29
|
"typescript": "^6.0.3",
|
|
30
30
|
"@vitest/coverage-v8": "^4.1.10",
|
|
31
31
|
"vitest": "^4.1.10"
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
// built from the SAME derived tables the app registers. That's what makes these
|
|
4
4
|
// assertions honest: derivation + validation come from @voltro/cms, and
|
|
5
5
|
// tenant-scoping/stamping come from the spine, not a mock. Run with `voltro test`.
|
|
6
|
+
//
|
|
7
|
+
// Read the note on `registry` below before trusting the word "exactly": the
|
|
8
|
+
// registry here is hand-built, and that is precisely the half a booted app gets
|
|
9
|
+
// from discovery instead.
|
|
6
10
|
|
|
7
11
|
import { describe, it, expect } from 'vitest'
|
|
8
12
|
import {
|
|
@@ -15,8 +19,18 @@ import { ContentValidationFailed, publish, saveDraft } from '@voltro/cms'
|
|
|
15
19
|
import { blogPost } from '../content'
|
|
16
20
|
import { blogEntities, pageEntities } from '../database/schema'
|
|
17
21
|
|
|
18
|
-
// Registry over the real derived tables
|
|
19
|
-
//
|
|
22
|
+
// Registry over the real derived tables, built BY HAND here.
|
|
23
|
+
//
|
|
24
|
+
// It proves derivation, validation and the spine's stamping. It does NOT prove
|
|
25
|
+
// that a booted app's registry CONTAINS these tables — this file supplies them
|
|
26
|
+
// directly, while the app's registry is filled by discovery. That gap was not
|
|
27
|
+
// theoretical: discovery only saw a schema module's direct exports, so these
|
|
28
|
+
// four tables (exported nested, registered via `databaseHandle`) never reached
|
|
29
|
+
// it, and every `saveDraft` died on `missing required column 'tenantId'` while
|
|
30
|
+
// this suite stayed green. Fixed framework-side and guarded there
|
|
31
|
+
// (`cli/src/handleOnlyTableDiscovery.test.ts`), which is the right level — but
|
|
32
|
+
// if you copy this pattern into your own app's tests, know which half it
|
|
33
|
+
// covers.
|
|
20
34
|
const registry = makeSchemaRegistry([
|
|
21
35
|
blogEntities.draft, blogEntities.published,
|
|
22
36
|
pageEntities.draft, pageEntities.published,
|
|
@@ -8,13 +8,19 @@ import type { AppContext } from '@voltro/runtime'
|
|
|
8
8
|
// converge; the reactive engine then broadcasts the merged row to every
|
|
9
9
|
// subscriber. This handler stays a one-liner precisely because the convergence
|
|
10
10
|
// lives in the write path, not here.
|
|
11
|
+
// No `if (row === null)` branch here, and that is deliberate. `documents` is
|
|
12
|
+
// `.with(tenant())`, so a keyed write the caller may not perform does not come
|
|
13
|
+
// back as `null` — the store THROWS `TenantRowNotFound`, identically for "no
|
|
14
|
+
// such row" and "someone else's row". Re-checking for `null` would be dead code,
|
|
15
|
+
// and answering it with a 404 would undo the point: two different answers for
|
|
16
|
+
// the two cases turn any keyed write into a cross-tenant existence oracle.
|
|
17
|
+
//
|
|
18
|
+
// The typed error reaches the client as itself (`_tag`, payload and prototype
|
|
19
|
+
// intact), so a `catchTag('TenantRowNotFound')` on the caller is the handling
|
|
20
|
+
// site — not a hand-rolled status here.
|
|
11
21
|
const execute = async (
|
|
12
22
|
input: { id: string; update: Uint8Array },
|
|
13
23
|
ctx: AppContext,
|
|
14
|
-
) => {
|
|
15
|
-
const row = await ctx.store.update('documents', input.id, { body: input.update })
|
|
16
|
-
if (row === null) throw { status: 404, message: `document ${input.id} not found` }
|
|
17
|
-
return row
|
|
18
|
-
}
|
|
24
|
+
) => ctx.store.update('documents', input.id, { body: input.update })
|
|
19
25
|
|
|
20
26
|
export default execute
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/local-first": "0.
|
|
20
|
-
"@voltro/plugin-multitenancy": "0.
|
|
21
|
-
"@voltro/protocol": "0.
|
|
22
|
-
"@voltro/runtime": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/local-first": "0.38.0",
|
|
20
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
21
|
+
"@voltro/protocol": "0.38.0",
|
|
22
|
+
"@voltro/runtime": "0.38.0",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.
|
|
26
|
+
"@voltro/testing": "0.38.0",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -80,10 +80,16 @@ describe('documents.setBody — authoritative server-side CRDT merge', () => {
|
|
|
80
80
|
expect(bodyText(merged)).toBe('seed')
|
|
81
81
|
})
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
// NOT "404s" — the assertion is that the two cases are INDISTINGUISHABLE.
|
|
84
|
+
// `documents` is `.with(tenant())`, so a keyed write to a row that does not
|
|
85
|
+
// exist and one to another tenant's row both throw the same `TenantRowNotFound`
|
|
86
|
+
// carrying the same fields. Answering "not found" for one and "forbidden" for
|
|
87
|
+
// the other would let a caller walk ids and learn which are real in someone
|
|
88
|
+
// else's tenant, which is the isolation `tenant()` exists to provide.
|
|
89
|
+
it('refuses a write to a document the caller cannot see, without saying which case it was', async () => {
|
|
84
90
|
const ctx = freshCtx()
|
|
85
91
|
await expect(
|
|
86
92
|
setBody({ id: 'doc_does_not_exist', update: crdtText().insert(0, 'x').encode() }, ctx),
|
|
87
|
-
).rejects.toMatchObject({
|
|
93
|
+
).rejects.toMatchObject({ _tag: 'TenantRowNotFound', table: 'documents', id: 'doc_does_not_exist' })
|
|
88
94
|
})
|
|
89
95
|
})
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@effect/platform": "^0.97.0",
|
|
14
14
|
"@effect/rpc": "^0.76.0",
|
|
15
|
-
"@voltro/cli": "0.
|
|
16
|
-
"@voltro/database": "0.
|
|
17
|
-
"@voltro/env": "0.
|
|
18
|
-
"@voltro/plugin-governance": "0.
|
|
19
|
-
"@voltro/plugin-multitenancy": "0.
|
|
20
|
-
"@voltro/protocol": "0.
|
|
21
|
-
"@voltro/runtime": "0.
|
|
15
|
+
"@voltro/cli": "0.38.0",
|
|
16
|
+
"@voltro/database": "0.38.0",
|
|
17
|
+
"@voltro/env": "0.38.0",
|
|
18
|
+
"@voltro/plugin-governance": "0.38.0",
|
|
19
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
20
|
+
"@voltro/protocol": "0.38.0",
|
|
21
|
+
"@voltro/runtime": "0.38.0",
|
|
22
22
|
"effect": "^3.22.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@voltro/testing": "0.
|
|
25
|
+
"@voltro/testing": "0.38.0",
|
|
26
26
|
"typescript": "^6.0.3",
|
|
27
27
|
"@vitest/coverage-v8": "^4.1.10",
|
|
28
28
|
"vitest": "^4.1.10"
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@effect/platform": "^0.97.0",
|
|
14
14
|
"@effect/rpc": "^0.76.0",
|
|
15
|
-
"@voltro/cli": "0.
|
|
16
|
-
"@voltro/database": "0.
|
|
17
|
-
"@voltro/env": "0.
|
|
18
|
-
"@voltro/plugin-multitenancy": "0.
|
|
19
|
-
"@voltro/protocol": "0.
|
|
20
|
-
"@voltro/runtime": "0.
|
|
21
|
-
"@voltro/workflow": "0.
|
|
15
|
+
"@voltro/cli": "0.38.0",
|
|
16
|
+
"@voltro/database": "0.38.0",
|
|
17
|
+
"@voltro/env": "0.38.0",
|
|
18
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
19
|
+
"@voltro/protocol": "0.38.0",
|
|
20
|
+
"@voltro/runtime": "0.38.0",
|
|
21
|
+
"@voltro/workflow": "0.38.0",
|
|
22
22
|
"effect": "^3.22.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@voltro/testing": "0.
|
|
25
|
+
"@voltro/testing": "0.38.0",
|
|
26
26
|
"typescript": "^6.0.3",
|
|
27
27
|
"@vitest/coverage-v8": "^4.1.10",
|
|
28
28
|
"vitest": "^4.1.10"
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/plugin-flags": "0.
|
|
20
|
-
"@voltro/plugin-multitenancy": "0.
|
|
21
|
-
"@voltro/protocol": "0.
|
|
22
|
-
"@voltro/runtime": "0.
|
|
23
|
-
"@voltro/sql-postgres": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/plugin-flags": "0.38.0",
|
|
20
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
21
|
+
"@voltro/protocol": "0.38.0",
|
|
22
|
+
"@voltro/runtime": "0.38.0",
|
|
23
|
+
"@voltro/sql-postgres": "0.38.0",
|
|
24
24
|
"effect": "^3.22.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@voltro/testing": "0.
|
|
27
|
+
"@voltro/testing": "0.38.0",
|
|
28
28
|
"typescript": "^6.0.3",
|
|
29
29
|
"@vitest/coverage-v8": "^4.1.10",
|
|
30
30
|
"vitest": "^4.1.10"
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/plugin-audit": "0.
|
|
20
|
-
"@voltro/plugin-governance": "0.
|
|
21
|
-
"@voltro/protocol": "0.
|
|
22
|
-
"@voltro/runtime": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/plugin-audit": "0.38.0",
|
|
20
|
+
"@voltro/plugin-governance": "0.38.0",
|
|
21
|
+
"@voltro/protocol": "0.38.0",
|
|
22
|
+
"@voltro/runtime": "0.38.0",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.
|
|
26
|
+
"@voltro/testing": "0.38.0",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@effect/platform": "^0.97.0",
|
|
14
14
|
"@effect/rpc": "^0.76.0",
|
|
15
|
-
"@voltro/cli": "0.
|
|
16
|
-
"@voltro/database": "0.
|
|
17
|
-
"@voltro/env": "0.
|
|
18
|
-
"@voltro/kv": "0.
|
|
19
|
-
"@voltro/plugin-multitenancy": "0.
|
|
20
|
-
"@voltro/protocol": "0.
|
|
21
|
-
"@voltro/runtime": "0.
|
|
15
|
+
"@voltro/cli": "0.38.0",
|
|
16
|
+
"@voltro/database": "0.38.0",
|
|
17
|
+
"@voltro/env": "0.38.0",
|
|
18
|
+
"@voltro/kv": "0.38.0",
|
|
19
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
20
|
+
"@voltro/protocol": "0.38.0",
|
|
21
|
+
"@voltro/runtime": "0.38.0",
|
|
22
22
|
"effect": "^3.22.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@voltro/testing": "0.
|
|
25
|
+
"@voltro/testing": "0.38.0",
|
|
26
26
|
"typescript": "^6.0.3",
|
|
27
27
|
"@vitest/coverage-v8": "^4.1.10",
|
|
28
28
|
"vitest": "^4.1.10"
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/plugin-moderation": "0.
|
|
20
|
-
"@voltro/plugin-multitenancy": "0.
|
|
21
|
-
"@voltro/protocol": "0.
|
|
22
|
-
"@voltro/runtime": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/plugin-moderation": "0.38.0",
|
|
20
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
21
|
+
"@voltro/protocol": "0.38.0",
|
|
22
|
+
"@voltro/runtime": "0.38.0",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.
|
|
26
|
+
"@voltro/testing": "0.38.0",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/plugin-multitenancy": "0.
|
|
19
|
-
"@voltro/plugin-prometheus": "0.
|
|
20
|
-
"@voltro/plugin-sentry": "0.
|
|
21
|
-
"@voltro/protocol": "0.
|
|
22
|
-
"@voltro/runtime": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
19
|
+
"@voltro/plugin-prometheus": "0.38.0",
|
|
20
|
+
"@voltro/plugin-sentry": "0.38.0",
|
|
21
|
+
"@voltro/protocol": "0.38.0",
|
|
22
|
+
"@voltro/runtime": "0.38.0",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.
|
|
26
|
+
"@voltro/testing": "0.38.0",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/plugin-multitenancy": "0.
|
|
20
|
-
"@voltro/plugin-ratelimit": "0.
|
|
21
|
-
"@voltro/protocol": "0.
|
|
22
|
-
"@voltro/runtime": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
20
|
+
"@voltro/plugin-ratelimit": "0.38.0",
|
|
21
|
+
"@voltro/protocol": "0.38.0",
|
|
22
|
+
"@voltro/runtime": "0.38.0",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.
|
|
26
|
+
"@voltro/testing": "0.38.0",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/plugin-multitenancy": "0.
|
|
20
|
-
"@voltro/plugin-rbac": "0.
|
|
21
|
-
"@voltro/protocol": "0.
|
|
22
|
-
"@voltro/runtime": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
20
|
+
"@voltro/plugin-rbac": "0.38.0",
|
|
21
|
+
"@voltro/protocol": "0.38.0",
|
|
22
|
+
"@voltro/runtime": "0.38.0",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.
|
|
26
|
+
"@voltro/testing": "0.38.0",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/plugin-openapi": "0.
|
|
19
|
-
"@voltro/protocol": "0.
|
|
20
|
-
"@voltro/runtime": "0.
|
|
21
|
-
"@voltro/sql-postgres": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/plugin-openapi": "0.38.0",
|
|
19
|
+
"@voltro/protocol": "0.38.0",
|
|
20
|
+
"@voltro/runtime": "0.38.0",
|
|
21
|
+
"@voltro/sql-postgres": "0.38.0",
|
|
22
22
|
"effect": "^3.22.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@voltro/testing": "0.
|
|
25
|
+
"@voltro/testing": "0.38.0",
|
|
26
26
|
"typescript": "^6.0.3",
|
|
27
27
|
"@vitest/coverage-v8": "^4.1.10",
|
|
28
28
|
"vitest": "^4.1.10"
|
|
@@ -13,20 +13,20 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/plugin-analytics-postgres": "0.
|
|
19
|
-
"@voltro/plugin-billing": "0.
|
|
20
|
-
"@voltro/plugin-multitenancy": "0.
|
|
21
|
-
"@voltro/plugin-notifications": "0.
|
|
22
|
-
"@voltro/plugin-presence": "0.
|
|
23
|
-
"@voltro/protocol": "0.
|
|
24
|
-
"@voltro/runtime": "0.
|
|
25
|
-
"@voltro/sql-postgres": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/plugin-analytics-postgres": "0.38.0",
|
|
19
|
+
"@voltro/plugin-billing": "0.38.0",
|
|
20
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
21
|
+
"@voltro/plugin-notifications": "0.38.0",
|
|
22
|
+
"@voltro/plugin-presence": "0.38.0",
|
|
23
|
+
"@voltro/protocol": "0.38.0",
|
|
24
|
+
"@voltro/runtime": "0.38.0",
|
|
25
|
+
"@voltro/sql-postgres": "0.38.0",
|
|
26
26
|
"effect": "^3.22.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@voltro/testing": "0.
|
|
29
|
+
"@voltro/testing": "0.38.0",
|
|
30
30
|
"typescript": "^6.0.3",
|
|
31
31
|
"@vitest/coverage-v8": "^4.1.10",
|
|
32
32
|
"vitest": "^4.1.10"
|
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@effect/platform": "^0.97.0",
|
|
18
18
|
"@effect/rpc": "^0.76.0",
|
|
19
|
-
"@voltro/cli": "0.
|
|
20
|
-
"@voltro/database": "0.
|
|
21
|
-
"@voltro/env": "0.
|
|
22
|
-
"@voltro/plugin-auth": "0.
|
|
23
|
-
"@voltro/plugin-billing": "0.
|
|
24
|
-
"@voltro/plugin-multitenancy": "0.
|
|
25
|
-
"@voltro/protocol": "0.
|
|
26
|
-
"@voltro/runtime": "0.
|
|
27
|
-
"@voltro/sql-postgres": "0.
|
|
19
|
+
"@voltro/cli": "0.38.0",
|
|
20
|
+
"@voltro/database": "0.38.0",
|
|
21
|
+
"@voltro/env": "0.38.0",
|
|
22
|
+
"@voltro/plugin-auth": "0.38.0",
|
|
23
|
+
"@voltro/plugin-billing": "0.38.0",
|
|
24
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
25
|
+
"@voltro/protocol": "0.38.0",
|
|
26
|
+
"@voltro/runtime": "0.38.0",
|
|
27
|
+
"@voltro/sql-postgres": "0.38.0",
|
|
28
28
|
"effect": "^3.22.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@voltro/testing": "0.
|
|
31
|
+
"@voltro/testing": "0.38.0",
|
|
32
32
|
"typescript": "^6.0.3",
|
|
33
33
|
"@vitest/coverage-v8": "^4.1.10",
|
|
34
34
|
"vitest": "^4.1.10"
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/plugin-multitenancy": "0.
|
|
20
|
-
"@voltro/plugin-search": "0.
|
|
21
|
-
"@voltro/protocol": "0.
|
|
22
|
-
"@voltro/runtime": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
20
|
+
"@voltro/plugin-search": "0.38.0",
|
|
21
|
+
"@voltro/protocol": "0.38.0",
|
|
22
|
+
"@voltro/runtime": "0.38.0",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.
|
|
26
|
+
"@voltro/testing": "0.38.0",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/plugin-rbac": "0.
|
|
20
|
-
"@voltro/protocol": "0.
|
|
21
|
-
"@voltro/runtime": "0.
|
|
22
|
-
"@voltro/sql-postgres": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/plugin-rbac": "0.38.0",
|
|
20
|
+
"@voltro/protocol": "0.38.0",
|
|
21
|
+
"@voltro/runtime": "0.38.0",
|
|
22
|
+
"@voltro/sql-postgres": "0.38.0",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.
|
|
26
|
+
"@voltro/testing": "0.38.0",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { AppContext } from '@voltro/runtime'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
// `documents` is `.with(tenant())`, so a keyed write to a row the caller may not
|
|
4
|
+
// touch THROWS `TenantRowNotFound` rather than returning `null` — identically
|
|
5
|
+
// whether the row is missing or belongs to another tenant. So there is no null
|
|
6
|
+
// branch to write: it would be unreachable, and giving the two cases different
|
|
7
|
+
// answers is what turns a keyed write into a cross-tenant existence oracle.
|
|
8
|
+
const execute = async (input: { id: string; content: string }, ctx: AppContext) =>
|
|
9
|
+
ctx.store.update('documents', input.id, { content: input.content })
|
|
8
10
|
|
|
9
11
|
export default execute
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/plugin-multitenancy": "0.
|
|
20
|
-
"@voltro/plugin-versioning": "0.
|
|
21
|
-
"@voltro/protocol": "0.
|
|
22
|
-
"@voltro/runtime": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
20
|
+
"@voltro/plugin-versioning": "0.38.0",
|
|
21
|
+
"@voltro/protocol": "0.38.0",
|
|
22
|
+
"@voltro/runtime": "0.38.0",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.
|
|
26
|
+
"@voltro/testing": "0.38.0",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/database": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/plugin-multitenancy": "0.
|
|
20
|
-
"@voltro/plugin-webhooks": "0.
|
|
21
|
-
"@voltro/protocol": "0.
|
|
22
|
-
"@voltro/runtime": "0.
|
|
23
|
-
"@voltro/sql-postgres": "0.
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/database": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/plugin-multitenancy": "0.38.0",
|
|
20
|
+
"@voltro/plugin-webhooks": "0.38.0",
|
|
21
|
+
"@voltro/protocol": "0.38.0",
|
|
22
|
+
"@voltro/runtime": "0.38.0",
|
|
23
|
+
"@voltro/sql-postgres": "0.38.0",
|
|
24
24
|
"effect": "^3.22.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@voltro/testing": "0.
|
|
27
|
+
"@voltro/testing": "0.38.0",
|
|
28
28
|
"typescript": "^6.0.3",
|
|
29
29
|
"@vitest/coverage-v8": "^4.1.10",
|
|
30
30
|
"vitest": "^4.1.10"
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"test": "voltro test"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@voltro/changelog": "0.
|
|
16
|
-
"@voltro/cli": "0.
|
|
17
|
-
"@voltro/client": "0.
|
|
18
|
-
"@voltro/env": "0.
|
|
19
|
-
"@voltro/i18n": "0.
|
|
20
|
-
"@voltro/web": "0.
|
|
15
|
+
"@voltro/changelog": "0.38.0",
|
|
16
|
+
"@voltro/cli": "0.38.0",
|
|
17
|
+
"@voltro/client": "0.38.0",
|
|
18
|
+
"@voltro/env": "0.38.0",
|
|
19
|
+
"@voltro/i18n": "0.38.0",
|
|
20
|
+
"@voltro/web": "0.38.0",
|
|
21
21
|
"react": "^19.0.0",
|
|
22
22
|
"react-dom": "^19.0.0"
|
|
23
23
|
},
|