@selvajs/selva 4.20.1-beta.5 → 4.21.0-beta.11
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/adapter-node.js +1 -1
- package/build/client/_app/immutable/assets/0.DJ150bSr.css +2 -0
- package/build/client/_app/immutable/assets/0.DJ150bSr.css.br +0 -0
- package/build/client/_app/immutable/assets/0.DJ150bSr.css.gz +0 -0
- package/build/client/_app/immutable/chunks/{D-uUm_OB.js → B3BHv1lE.js} +73 -68
- package/build/client/_app/immutable/chunks/B3BHv1lE.js.br +0 -0
- package/build/client/_app/immutable/chunks/B3BHv1lE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CzfnuBzq.js → BAhtiTKe.js} +1 -1
- package/build/client/_app/immutable/chunks/BAhtiTKe.js.br +0 -0
- package/build/client/_app/immutable/chunks/BAhtiTKe.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BDYCH-_Q.js → BEPlNI5E.js} +1 -1
- package/build/client/_app/immutable/chunks/BEPlNI5E.js.br +0 -0
- package/build/client/_app/immutable/chunks/BEPlNI5E.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BSN2qO1R.js +1 -0
- package/build/client/_app/immutable/chunks/BSN2qO1R.js.br +0 -0
- package/build/client/_app/immutable/chunks/BSN2qO1R.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CcWwBvi8.js → CBf5ToEX.js} +1 -1
- package/build/client/_app/immutable/chunks/CBf5ToEX.js.br +0 -0
- package/build/client/_app/immutable/chunks/CBf5ToEX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CSy_25b1.js +55 -0
- package/build/client/_app/immutable/chunks/CSy_25b1.js.br +0 -0
- package/build/client/_app/immutable/chunks/CSy_25b1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{C6Y_BUwr.js → CmlXAF26.js} +1 -1
- package/build/client/_app/immutable/chunks/CmlXAF26.js.br +0 -0
- package/build/client/_app/immutable/chunks/CmlXAF26.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cv7GBWJh.js +2 -0
- package/build/client/_app/immutable/chunks/Cv7GBWJh.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cv7GBWJh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{zJ-SFdYZ.js → DIOXhUNn.js} +1 -1
- package/build/client/_app/immutable/chunks/DIOXhUNn.js.br +0 -0
- package/build/client/_app/immutable/chunks/DIOXhUNn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DQbsDiDJ.js +1 -0
- package/build/client/_app/immutable/chunks/DQbsDiDJ.js.br +1 -0
- package/build/client/_app/immutable/chunks/DQbsDiDJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DW5EJMC7.js +1 -0
- package/build/client/_app/immutable/chunks/DW5EJMC7.js.br +0 -0
- package/build/client/_app/immutable/chunks/DW5EJMC7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DzxE3j6C.js → Dqy8nTaG.js} +1 -1
- package/build/client/_app/immutable/chunks/Dqy8nTaG.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dqy8nTaG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{qi43d-TM.js → cUJB_11K.js} +1 -1
- package/build/client/_app/immutable/chunks/cUJB_11K.js.br +0 -0
- package/build/client/_app/immutable/chunks/cUJB_11K.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.B3im90t6.js +2 -0
- package/build/client/_app/immutable/entry/app.B3im90t6.js.br +0 -0
- package/build/client/_app/immutable/entry/app.B3im90t6.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.D3kiiIk_.js → 1.DWd6YbcT.js} +1 -1
- package/build/client/_app/immutable/nodes/1.DWd6YbcT.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.DWd6YbcT.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.NPUXRN3p.js +5 -0
- package/build/client/_app/immutable/nodes/11.NPUXRN3p.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.NPUXRN3p.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.C0vWxAsK.js +36 -0
- package/build/client/_app/immutable/nodes/15.C0vWxAsK.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.C0vWxAsK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{16.D7-QOesS.js → 16.BE4OfH4C.js} +1 -1
- package/build/client/_app/immutable/nodes/16.BE4OfH4C.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.BE4OfH4C.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.CUNbzjI_.js → 2.bCPP2ncY.js} +1 -1
- package/build/client/_app/immutable/nodes/2.bCPP2ncY.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.bCPP2ncY.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{20.9OIre0ah.js → 20.DI5Eri_M.js} +1 -1
- package/build/client/_app/immutable/nodes/20.DI5Eri_M.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.DI5Eri_M.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.BI8SjY_r.js +1 -0
- package/build/client/_app/immutable/nodes/21.BI8SjY_r.js.br +1 -0
- package/build/client/_app/immutable/nodes/21.BI8SjY_r.js.gz +0 -0
- package/build/client/_app/immutable/nodes/24.DkL5kHzA.js +3 -0
- package/build/client/_app/immutable/nodes/24.DkL5kHzA.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.DkL5kHzA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/25.BRm8FzmQ.js +42 -0
- package/build/client/_app/immutable/nodes/25.BRm8FzmQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/25.BRm8FzmQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/26.7nAJpm5P.js +5 -0
- package/build/client/_app/immutable/nodes/26.7nAJpm5P.js.br +0 -0
- package/build/client/_app/immutable/nodes/26.7nAJpm5P.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.3Z4QUsQQ.js → 3.Ctd9OGCk.js} +1 -1
- package/build/client/_app/immutable/nodes/3.Ctd9OGCk.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.Ctd9OGCk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{30.BBuL_XNB.js → 30.B6pd-F-z.js} +1 -1
- package/build/client/_app/immutable/nodes/30.B6pd-F-z.js.br +0 -0
- package/build/client/_app/immutable/nodes/30.B6pd-F-z.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{35.De6sleaH.js → 35.BPmyLjFW.js} +1 -1
- package/build/client/_app/immutable/nodes/35.BPmyLjFW.js.br +0 -0
- package/build/client/_app/immutable/nodes/35.BPmyLjFW.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.DmA9lTA-.js → 5.BUX4zZQj.js} +1 -1
- package/build/client/_app/immutable/nodes/5.BUX4zZQj.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.BUX4zZQj.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.D6WLqCgl.js → 6.BpjtFwPi.js} +1 -1
- package/build/client/_app/immutable/nodes/6.BpjtFwPi.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BpjtFwPi.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.CNuRjkv2.js → 7.hBM6C-wN.js} +1 -1
- package/build/client/_app/immutable/nodes/7.hBM6C-wN.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.hBM6C-wN.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/runtime-meta.json +1 -1
- package/build/server/.vite/manifest.json +201 -144
- package/build/server/_app/immutable/assets/_layout.DJ150bSr.css +2 -0
- package/build/server/chunks/AppHeader.js +1 -1
- package/build/server/chunks/Callout.js +1 -1
- package/build/server/chunks/DefinitionCard.js +4 -1
- package/build/server/chunks/DefinitionCard.js.map +1 -1
- package/build/server/chunks/ErrorScreen.js +1 -1
- package/build/server/chunks/FilterableDropdown.js +1 -1
- package/build/server/chunks/SettingsMenu.js +1 -1
- package/build/server/chunks/SideNav.js +1 -1
- package/build/server/chunks/access.js +15 -3
- package/build/server/chunks/access.js.map +1 -1
- package/build/server/chunks/access2.server.js +1 -1
- package/build/server/chunks/activity.js +1 -1
- package/build/server/chunks/alert-dialog.js +1 -1
- package/build/server/chunks/api-errors.js +18 -3
- package/build/server/chunks/api-errors.js.map +1 -1
- package/build/server/chunks/api.js +11 -33
- package/build/server/chunks/api.js.map +1 -1
- package/build/server/chunks/arrow-left.js +1 -1
- package/build/server/chunks/arrow-right.js +1 -1
- package/build/server/chunks/auth-bootstrap.server.js +63 -39
- package/build/server/chunks/auth-bootstrap.server.js.map +1 -1
- package/build/server/chunks/badge.js +1 -1
- package/build/server/chunks/bodies.js +37 -0
- package/build/server/chunks/bodies.js.map +1 -0
- package/build/server/chunks/boot.server.js +1 -1
- package/build/server/chunks/bootHealth.server.js +23 -23
- package/build/server/chunks/bootHealth.server.js.map +1 -1
- package/build/server/chunks/building-complex.js +1 -1
- package/build/server/chunks/button.js +1 -1
- package/build/server/chunks/card-content.js +1 -1
- package/build/server/chunks/card-description.js +1 -1
- package/build/server/chunks/card-header.js +1 -1
- package/build/server/chunks/card-title.js +1 -1
- package/build/server/chunks/chevron-down.js +1 -1
- package/build/server/chunks/chevron-left.js +1 -1
- package/build/server/chunks/chevron-right.js +1 -1
- package/build/server/chunks/chevron-up.js +1 -1
- package/build/server/chunks/circle.js +1 -1
- package/build/server/chunks/computeRateLimit.server.js +2 -2
- package/build/server/chunks/copy.js +1 -1
- package/build/server/chunks/delete-with-blobs.js +1 -1
- package/build/server/chunks/dialog.js +1 -1
- package/build/server/chunks/diff.js +275 -0
- package/build/server/chunks/diff.js.map +1 -0
- package/build/server/chunks/engine.server.js +50 -3
- package/build/server/chunks/engine.server.js.map +1 -1
- package/build/server/chunks/external-link.js +1 -1
- package/build/server/chunks/folder-kanban.js +1 -1
- package/build/server/chunks/folder-open.js +1 -1
- package/build/server/chunks/folders.js +1 -1
- package/build/server/chunks/gauge.js +1 -1
- package/build/server/chunks/grasshopper.js +15 -3
- package/build/server/chunks/grasshopper.js.map +1 -1
- package/build/server/chunks/handlers.js +308 -133
- package/build/server/chunks/handlers.js.map +1 -1
- package/build/server/chunks/http.js +24 -24
- package/build/server/chunks/http.js.map +1 -1
- package/build/server/chunks/http2.js +1 -1
- package/build/server/chunks/input-group.js +1 -1
- package/build/server/chunks/input.js +1 -1
- package/build/server/chunks/instance.js +3 -3
- package/build/server/chunks/instanceAdmins.server.js +31 -16
- package/build/server/chunks/instanceAdmins.server.js.map +1 -1
- package/build/server/chunks/internal.js +1 -1
- package/build/server/chunks/inventory.js +395 -0
- package/build/server/chunks/inventory.js.map +1 -0
- package/build/server/chunks/keepalive-vtcjhAV3.js +24 -0
- package/build/server/chunks/keepalive-vtcjhAV3.js.map +1 -0
- package/build/server/chunks/key-round.js +1 -1
- package/build/server/chunks/label.js +1 -1
- package/build/server/chunks/link-2.js +1 -1
- package/build/server/chunks/liveSolve.server.js +1 -1
- package/build/server/chunks/localeContext.svelte.js +14 -0
- package/build/server/chunks/localeContext.svelte.js.map +1 -1
- package/build/server/chunks/mail.js +1 -1
- package/build/server/chunks/minus.js +1 -1
- package/build/server/chunks/oauth.js +70 -24
- package/build/server/chunks/oauth.js.map +1 -1
- package/build/server/chunks/{outcome-DNrffAXp.js → outcome-D28FgvFK.js} +9 -6
- package/build/server/chunks/outcome-D28FgvFK.js.map +1 -0
- package/build/server/chunks/package.js +2 -1
- package/build/server/chunks/package.js.map +1 -1
- package/build/server/chunks/permissions.server.js +1 -1
- package/build/server/chunks/plus.js +1 -1
- package/build/server/chunks/popper-layer-force-mount.js +1 -1
- package/build/server/chunks/presets.server.js +1 -1
- package/build/server/chunks/providers.server.js +310 -98
- package/build/server/chunks/providers.server.js.map +1 -1
- package/build/server/chunks/refresh-cw.js +1 -1
- package/build/server/chunks/registry.js +69 -5
- package/build/server/chunks/registry.js.map +1 -1
- package/build/server/chunks/resolve-server.js +2 -2
- package/build/server/chunks/rotate-ccw.js +1 -1
- package/build/server/chunks/schema-extraction.js +117 -9
- package/build/server/chunks/schema-extraction.js.map +1 -1
- package/build/server/chunks/schema.js +1 -1
- package/build/server/chunks/schema.js.map +1 -1
- package/build/server/chunks/scroll-text.js +1 -1
- package/build/server/chunks/search.js +1 -1
- package/build/server/chunks/search2.js +1 -1
- package/build/server/chunks/select.js +1 -1
- package/build/server/chunks/separator.js +19 -7
- package/build/server/chunks/separator.js.map +1 -1
- package/build/server/chunks/server-config-write.js +6 -6
- package/build/server/chunks/server-config-write.js.map +1 -1
- package/build/server/chunks/server2.js +2 -2
- package/build/server/chunks/server2.js.map +1 -1
- package/build/server/chunks/server4.js +1 -1
- package/build/server/chunks/serverStats.server.js +1 -1
- package/build/server/chunks/settings.js +1 -1
- package/build/server/chunks/severity.js +1 -1
- package/build/server/chunks/shield-check.js +1 -1
- package/build/server/chunks/shield.js +1 -1
- package/build/server/chunks/signInMaxAge.server.js +1 -1
- package/build/server/chunks/solve.server.js +8 -8
- package/build/server/chunks/solve.server.js.map +1 -1
- package/build/server/chunks/star.js +1 -1
- package/build/server/chunks/sveltekit.js +4 -5
- package/build/server/chunks/sveltekit.js.map +1 -1
- package/build/server/chunks/tabs-trigger.js +1 -1
- package/build/server/chunks/textarea.js +1 -1
- package/build/server/chunks/toggle-group-item.js +1 -1
- package/build/server/chunks/trash.js +1 -1
- package/build/server/chunks/traversal.js +23 -0
- package/build/server/chunks/traversal.js.map +1 -0
- package/build/server/chunks/types2.js.map +1 -1
- package/build/server/chunks/update-outcome.js +11 -0
- package/build/server/chunks/update-outcome.js.map +1 -1
- package/build/server/chunks/updateCheck.server.js +24 -12
- package/build/server/chunks/updateCheck.server.js.map +1 -1
- package/build/server/chunks/user-plus.js +1 -1
- package/build/server/chunks/users.js +1 -1
- package/build/server/chunks/utils.js +156 -70
- package/build/server/chunks/utils.js.map +1 -1
- package/build/server/chunks/x.js +1 -1
- package/build/server/entries/endpoints/.well-known/oauth-authorization-server/_server.ts.js +6 -3
- package/build/server/entries/endpoints/.well-known/oauth-authorization-server/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/_server.ts.js +6 -3
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/mcp/_server.ts.js +6 -3
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/mcp/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/compute/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/admin/compute/actions/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/admin/compute/status/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/admin/orgs/_id_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/orgs/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/projects/_id_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/projects/_id_/grants/_grantId_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/projects/_id_/grants/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/projects/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/system/health/_server.ts.js +10 -3
- package/build/server/entries/endpoints/api/admin/system/health/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/system/update/_server.ts.js +59 -15
- package/build/server/entries/endpoints/api/admin/system/update/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/users/_id_/_server.ts.js +42 -16
- package/build/server/entries/endpoints/api/admin/users/_id_/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/users/_id_/disable/_server.ts.js +24 -13
- package/build/server/entries/endpoints/api/admin/users/_id_/disable/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/users/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/files/_...path_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/compute/_server.ts.js +15 -6
- package/build/server/entries/endpoints/api/v1/compute/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/v1/compute/schema/_server.ts.js +3 -3
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/image/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/publish/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/schema/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/share-links/_linkId_/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/share-links/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/solve/_server.ts.js +5 -4
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/solve/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/changes/_server.ts.js +9 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/changes/_server.ts.js.map +1 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/inventory/_server.ts.js +12 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/inventory/_server.ts.js.map +1 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/schema/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/scripts/_scriptId_/_server.ts.js +12 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/scripts/_scriptId_/_server.ts.js.map +1 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/check/_server.ts.js +12 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/check/_server.ts.js.map +1 -0
- package/build/server/entries/endpoints/api/v1/definitions/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/me/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/me/starred/_guid_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/me/token/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/assets/_kind_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/members/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/members/_userId_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/tokens/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/tokens/_tokenId_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/projects/_id_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/projects/_id_/members/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/projects/_id_/members/_userId_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/projects/_id_/reclaim/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/solve/_solveId_/cancel/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/solve-events/_server.ts.js +1 -1
- package/build/server/entries/endpoints/auth/email/callback/_server.ts.js +2 -2
- package/build/server/entries/endpoints/auth/email/callback/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/auth/supabase/callback/_server.ts.js +2 -2
- package/build/server/entries/endpoints/auth/supabase/callback/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/docs/api/openapi.yaml/_server.ts.js +1 -1
- package/build/server/entries/endpoints/mcp/_server.ts.js +43 -13
- package/build/server/entries/endpoints/mcp/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/oauth/register/_server.ts.js +1 -1
- package/build/server/entries/endpoints/oauth/token/_server.ts.js +1 -1
- package/build/server/entries/hooks.server.js +25 -6
- package/build/server/entries/hooks.server.js.map +1 -1
- package/build/server/entries/pages/admin/_page.svelte.js +1 -1
- package/build/server/entries/pages/admin/compute/_page.server.ts.js +2 -3
- package/build/server/entries/pages/admin/compute/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/admin/compute/_page.svelte.js +7 -3
- package/build/server/entries/pages/admin/compute/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/admin/projects/_id_/_page.svelte.js +1 -1
- package/build/server/entries/pages/admin/system/_page.server.ts.js +8 -3
- package/build/server/entries/pages/admin/system/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/admin/system/_page.svelte.js +23 -4
- package/build/server/entries/pages/admin/system/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/admin/users/_page.svelte.js +1 -1
- package/build/server/entries/pages/library/_guid_/_page.server.ts.js +198 -99
- package/build/server/entries/pages/library/_guid_/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/library/_guid_/_page.svelte.js +722 -80
- package/build/server/entries/pages/library/_guid_/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/library/_page.svelte.js +1 -1
- package/build/server/entries/pages/oauth/authorize/_page.server.ts.js +3 -2
- package/build/server/entries/pages/oauth/authorize/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/oauth/authorize/_page.svelte.js +8 -1
- package/build/server/entries/pages/oauth/authorize/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/projects/_page.server.ts.js +1 -1
- package/build/server/entries/pages/projects/_page.svelte.js +792 -35
- package/build/server/entries/pages/projects/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/setup/_page.server.ts.js +62 -8
- package/build/server/entries/pages/setup/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/setup/_page.svelte.js +52 -33
- package/build/server/entries/pages/setup/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/team/_layout.svelte.js +1 -1
- package/build/server/entries/pages/team/compute/_page.server.ts.js +1 -1
- package/build/server/entries/pages/team/members/_page.svelte.js +1 -1
- package/build/server/entries/pages/team/settings/_page.svelte.js +1 -1
- package/build/server/entries/pages/team/tokens/_page.server.ts.js +1 -1
- package/build/server/manifest-full.js +29 -1
- package/build/server/manifest.js +29 -1
- package/build/server/nodes/0.js +2 -2
- package/build/server/nodes/1.js +1 -1
- package/build/server/nodes/11.js +1 -1
- package/build/server/nodes/15.js +1 -1
- package/build/server/nodes/16.js +1 -1
- package/build/server/nodes/2.js +1 -1
- package/build/server/nodes/20.js +1 -1
- package/build/server/nodes/21.js +1 -1
- package/build/server/nodes/24.js +1 -1
- package/build/server/nodes/25.js +1 -1
- package/build/server/nodes/26.js +1 -1
- package/build/server/nodes/3.js +1 -1
- package/build/server/nodes/30.js +1 -1
- package/build/server/nodes/35.js +1 -1
- package/build/server/nodes/5.js +1 -1
- package/build/server/nodes/6.js +1 -1
- package/build/server/nodes/7.js +1 -1
- package/build/server/server.js +29 -1
- package/package.json +15 -12
- package/templates/.env.example +15 -7
- package/build/client/_app/immutable/assets/0.2jDm0bqh.css +0 -2
- package/build/client/_app/immutable/assets/0.2jDm0bqh.css.br +0 -0
- package/build/client/_app/immutable/assets/0.2jDm0bqh.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BDYCH-_Q.js.br +0 -0
- package/build/client/_app/immutable/chunks/BDYCH-_Q.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bga9Qxze.js +0 -55
- package/build/client/_app/immutable/chunks/Bga9Qxze.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bga9Qxze.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C6Y_BUwr.js.br +0 -0
- package/build/client/_app/immutable/chunks/C6Y_BUwr.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CBWE8gpj.js +0 -1
- package/build/client/_app/immutable/chunks/CBWE8gpj.js.br +0 -0
- package/build/client/_app/immutable/chunks/CBWE8gpj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CcWwBvi8.js.br +0 -0
- package/build/client/_app/immutable/chunks/CcWwBvi8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CzfnuBzq.js.br +0 -0
- package/build/client/_app/immutable/chunks/CzfnuBzq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D-uUm_OB.js.br +0 -0
- package/build/client/_app/immutable/chunks/D-uUm_OB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D84F7w9g.js +0 -1
- package/build/client/_app/immutable/chunks/D84F7w9g.js.br +0 -1
- package/build/client/_app/immutable/chunks/D84F7w9g.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DQsP4nZb.js +0 -1
- package/build/client/_app/immutable/chunks/DQsP4nZb.js.br +0 -0
- package/build/client/_app/immutable/chunks/DQsP4nZb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DzeQucGI.js +0 -2
- package/build/client/_app/immutable/chunks/DzeQucGI.js.br +0 -0
- package/build/client/_app/immutable/chunks/DzeQucGI.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DzxE3j6C.js.br +0 -0
- package/build/client/_app/immutable/chunks/DzxE3j6C.js.gz +0 -0
- package/build/client/_app/immutable/chunks/qi43d-TM.js.br +0 -0
- package/build/client/_app/immutable/chunks/qi43d-TM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/zJ-SFdYZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/zJ-SFdYZ.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.BpT6WkO1.js +0 -2
- package/build/client/_app/immutable/entry/app.BpT6WkO1.js.br +0 -0
- package/build/client/_app/immutable/entry/app.BpT6WkO1.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.D3kiiIk_.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.D3kiiIk_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.DS0azG6Y.js +0 -5
- package/build/client/_app/immutable/nodes/11.DS0azG6Y.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.DS0azG6Y.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.BXIV1QfS.js +0 -32
- package/build/client/_app/immutable/nodes/15.BXIV1QfS.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.BXIV1QfS.js.gz +0 -0
- package/build/client/_app/immutable/nodes/16.D7-QOesS.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.D7-QOesS.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.CUNbzjI_.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CUNbzjI_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/20.9OIre0ah.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.9OIre0ah.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.BkNlRItr.js +0 -1
- package/build/client/_app/immutable/nodes/21.BkNlRItr.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.BkNlRItr.js.gz +0 -0
- package/build/client/_app/immutable/nodes/24.CPSunfJJ.js +0 -3
- package/build/client/_app/immutable/nodes/24.CPSunfJJ.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.CPSunfJJ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/25.DW1_vMxq.js +0 -17
- package/build/client/_app/immutable/nodes/25.DW1_vMxq.js.br +0 -0
- package/build/client/_app/immutable/nodes/25.DW1_vMxq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/26.CqaMEm_t.js +0 -6
- package/build/client/_app/immutable/nodes/26.CqaMEm_t.js.br +0 -0
- package/build/client/_app/immutable/nodes/26.CqaMEm_t.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.3Z4QUsQQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.3Z4QUsQQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/30.BBuL_XNB.js.br +0 -0
- package/build/client/_app/immutable/nodes/30.BBuL_XNB.js.gz +0 -0
- package/build/client/_app/immutable/nodes/35.De6sleaH.js.br +0 -0
- package/build/client/_app/immutable/nodes/35.De6sleaH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.DmA9lTA-.js.br +0 -1
- package/build/client/_app/immutable/nodes/5.DmA9lTA-.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.D6WLqCgl.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.D6WLqCgl.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.CNuRjkv2.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CNuRjkv2.js.gz +0 -0
- package/build/server/_app/immutable/assets/_layout.2jDm0bqh.css +0 -2
- package/build/server/chunks/abort-Bfrdupaj.js +0 -40
- package/build/server/chunks/abort-Bfrdupaj.js.map +0 -1
- package/build/server/chunks/computeLimits.js +0 -33
- package/build/server/chunks/computeLimits.js.map +0 -1
- package/build/server/chunks/outcome-DNrffAXp.js.map +0 -1
- package/build/server/chunks/types4.js +0 -10
- package/build/server/chunks/types4.js.map +0 -1
- package/build/server/chunks/utils2.js +0 -174
- package/build/server/chunks/utils2.js.map +0 -1
- /package/build/client/_app/immutable/nodes/{0.CYdyv5To.js → 0.Bu9WQ0W_.js} +0 -0
- /package/build/client/_app/immutable/nodes/{0.CYdyv5To.js.br → 0.Bu9WQ0W_.js.br} +0 -0
- /package/build/client/_app/immutable/nodes/{0.CYdyv5To.js.gz → 0.Bu9WQ0W_.js.gz} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as spread_props } from "./server3.js";
|
|
2
|
-
import { n as Icon } from "./
|
|
2
|
+
import { n as Icon } from "./utils.js";
|
|
3
3
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/refresh-cw.svelte
|
|
4
4
|
var __iconData = {
|
|
5
5
|
"name": "refresh-cw",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as UpdateDefinitionBodySchema, b as UpdateProjectMemberBodySchema, c as AddProjectMemberBodySchema, d as CreateProjectBodySchema, f as CreateShareLinkBodySchema, h as SolveBodySchema, l as CreateApiTokenBodySchema, m as PublishVersionBodySchema, p as OrgComputePatchBodySchema, u as CreateInviteBodySchema, v as UpdateOrgMemberBodySchema, y as UpdateProjectBodySchema } from "./api.js";
|
|
2
2
|
// src/lib/server/api/v1/registry.ts
|
|
3
3
|
/**
|
|
4
4
|
* The v1 contract as data: one entry per method+path, naming its body validator,
|
|
@@ -130,6 +130,11 @@ var V1_ENDPOINTS = [
|
|
|
130
130
|
field: "computeServerId",
|
|
131
131
|
required: false,
|
|
132
132
|
description: "Pin to a compute server."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
field: "acceptMissingPlugins",
|
|
136
|
+
required: false,
|
|
137
|
+
description: "`true` uploads a file that needs a plugin the Compute server lacks. Without it, such a file is refused with 422."
|
|
133
138
|
}
|
|
134
139
|
],
|
|
135
140
|
errors: [
|
|
@@ -199,14 +204,40 @@ var V1_ENDPOINTS = [
|
|
|
199
204
|
summary: "Upload a new version.",
|
|
200
205
|
response: "object",
|
|
201
206
|
status: 201,
|
|
207
|
+
multipart: [
|
|
208
|
+
{
|
|
209
|
+
field: "file",
|
|
210
|
+
required: true,
|
|
211
|
+
description: "The `.gh` or `.ghx` file."
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
field: "changeNote",
|
|
215
|
+
required: false,
|
|
216
|
+
description: "Markdown, at most 10,000 characters. Longer is refused with 400."
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
field: "acceptMissingPlugins",
|
|
220
|
+
required: false,
|
|
221
|
+
description: "`true` uploads a file that needs a plugin the Compute server lacks. Without it, such a file is refused with 422."
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
errors: [
|
|
225
|
+
400,
|
|
226
|
+
404,
|
|
227
|
+
422,
|
|
228
|
+
503
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
method: "POST",
|
|
233
|
+
path: "/definitions/{guid}/versions/check",
|
|
234
|
+
scope: "upload",
|
|
235
|
+
summary: "Dry run of an upload: validates the file through Compute and diffs it against the version it would follow, form and inventory. Writes nothing.",
|
|
236
|
+
response: "object",
|
|
202
237
|
multipart: [{
|
|
203
238
|
field: "file",
|
|
204
239
|
required: true,
|
|
205
240
|
description: "The `.gh` or `.ghx` file."
|
|
206
|
-
}, {
|
|
207
|
-
field: "changeNote",
|
|
208
|
-
required: false,
|
|
209
|
-
description: "Truncated to 1000 characters."
|
|
210
241
|
}],
|
|
211
242
|
errors: [
|
|
212
243
|
400,
|
|
@@ -239,6 +270,39 @@ var V1_ENDPOINTS = [
|
|
|
239
270
|
response: "object",
|
|
240
271
|
errors: [404]
|
|
241
272
|
},
|
|
273
|
+
{
|
|
274
|
+
method: "GET",
|
|
275
|
+
path: "/definitions/{guid}/versions/{versionId}/changes",
|
|
276
|
+
scope: "read",
|
|
277
|
+
summary: "What this version changed in inputs, outputs and settings, against `?against=<versionId>` or the version before it.",
|
|
278
|
+
returns: "Editors also get `inventory`: warnings about the file and what changed inside it (plugins, components, values, scripts, wiring).",
|
|
279
|
+
response: "object",
|
|
280
|
+
errors: [404]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
method: "POST",
|
|
284
|
+
path: "/definitions/{guid}/versions/{versionId}/inventory",
|
|
285
|
+
scope: "upload",
|
|
286
|
+
summary: "Re-read a version's inventory from its stored file through Compute: for versions uploaded before inventories, or after installing a missing plugin.",
|
|
287
|
+
response: "object",
|
|
288
|
+
errors: [
|
|
289
|
+
404,
|
|
290
|
+
422,
|
|
291
|
+
503
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
method: "GET",
|
|
296
|
+
path: "/definitions/{guid}/versions/{versionId}/scripts/{scriptId}",
|
|
297
|
+
scope: "upload",
|
|
298
|
+
summary: "One script component's code in this version and in `?against=<versionId>` or the version before, with a line diff. Read from the stored files through Compute, never kept.",
|
|
299
|
+
response: "object",
|
|
300
|
+
errors: [
|
|
301
|
+
404,
|
|
302
|
+
422,
|
|
303
|
+
503
|
|
304
|
+
]
|
|
305
|
+
},
|
|
242
306
|
{
|
|
243
307
|
method: "POST",
|
|
244
308
|
path: "/definitions/{guid}/publish",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","names":[],"sources":["../../../src/lib/server/api/v1/registry.ts"],"sourcesContent":["/**\n * The v1 contract as data: one entry per method+path, naming its body validator,\n * response shape, and whether it's public or internal.\n *\n * Both the OpenAPI generator and the conformance test read this file. The test\n * walks `routes/api/v1/**` against this table and fails if either side has an\n * entry the other doesn't — a route with no registry entry is undocumented, a\n * registry entry with no route is a spec promising something that 404s.\n *\n * Request schemas are Zod values imported from `@selvajs/server/api`, not\n * transcribed, so a renamed field changes the spec on the next generate\n * instead of silently disagreeing with the validator.\n */\n\nimport {\n\ttype Endpoint,\n\ttype HttpMethod,\n\tSolveBodySchema,\n\tUpdateDefinitionBodySchema,\n\tPublishVersionBodySchema,\n\tCreateShareLinkBodySchema,\n\tCreateProjectBodySchema,\n\tUpdateProjectBodySchema,\n\tAddProjectMemberBodySchema,\n\tUpdateProjectMemberBodySchema,\n\tCreateInviteBodySchema,\n\tUpdateOrgMemberBodySchema,\n\tOrgComputePatchBodySchema,\n\tCreateApiTokenBodySchema\n} from '@selvajs/server/api';\n\nexport type { Endpoint, HttpMethod };\n\nconst solveErrors = [400, 401, 404, 429, 503];\n\nexport const V1_ENDPOINTS: Endpoint[] = [\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/openapi.json',\n\t\tscope: 'read',\n\t\tsummary: 'This document, as JSON.',\n\t\tresponse: 'object'\n\t},\n\n\t// ==========================================================================\n\t// Me\n\t// ==========================================================================\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/me',\n\t\tscope: 'read',\n\t\tsummary:\n\t\t\t'The calling identity, its acting org, its effective permissions, and for a token its id, scopes and expiry.',\n\t\tresponse: 'object',\n\t\treturns:\n\t\t\t'`apiToken: { id, scopes, expiresAt }` is present only when the caller is an API token. `capabilities.createProjects` says whether `POST /projects` would accept this caller, narrowed to the key; `orgPermissions` is the owner’s and is not.'\n\t},\n\t// Every key may call it, whatever its scopes; `read` is the action every key holds.\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/me/token',\n\t\tscope: 'read',\n\t\tsummary:\n\t\t\t'Revoke the API token that sent this request. A key can revoke itself and nothing else; a browser session gets 400.',\n\t\tresponse: 'empty',\n\t\terrors: [400, 503]\n\t},\n\t{\n\t\tmethod: 'PUT',\n\t\tpath: '/me/starred/{guid}',\n\t\tscope: 'write',\n\t\tsummary: 'Star a definition. Idempotent.',\n\t\tresponse: 'empty',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/me/starred/{guid}',\n\t\tscope: 'write',\n\t\tsummary: 'Unstar a definition. Idempotent.',\n\t\tresponse: 'empty'\n\t},\n\n\t// ==========================================================================\n\t// Definitions\n\t// ==========================================================================\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions',\n\t\tscope: 'read',\n\t\tsummary: 'List definitions the caller can see.',\n\t\tresponse: 'collection',\n\t\treturns:\n\t\t\t'Each item has `sourceDocumentId`: the Grasshopper document GUID the definition was last uploaded from, or null.',\n\t\tquery: [\n\t\t\t{ name: 'projectId', description: 'Restrict to one project.' },\n\t\t\t{ name: 'status', description: 'One of `draft`, `published`, `archived`.' },\n\t\t\t{\n\t\t\t\tname: 'documentId',\n\t\t\t\tdescription:\n\t\t\t\t\t'A Grasshopper document GUID. Returns only definitions last uploaded from that document which the caller can upload a new version of. Not a GUID: 400.'\n\t\t\t}\n\t\t],\n\t\terrors: [400]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions',\n\t\tscope: 'upload',\n\t\tidempotent: true,\n\t\tsummary: 'Create a definition from a Grasshopper file.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\tmultipart: [\n\t\t\t{ field: 'file', required: true, description: 'The `.gh` or `.ghx` file.' },\n\t\t\t{ field: 'projectId', required: true, description: 'Owning project.' },\n\t\t\t{ field: 'displayName', required: true, description: 'Human-readable name.' },\n\t\t\t{ field: 'description', required: false, description: 'Long description.' },\n\t\t\t{ field: 'category', required: false, description: 'Grouping label.' },\n\t\t\t{ field: 'tags', required: false, description: 'Comma-separated tags.' },\n\t\t\t{ field: 'image', required: false, description: 'Cover image.' },\n\t\t\t{ field: 'computeServerId', required: false, description: 'Pin to a compute server.' }\n\t\t],\n\t\terrors: [400, 403, 422, 503]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}',\n\t\tscope: 'read',\n\t\tsummary: 'Definition record plus its live and draft version summaries.',\n\t\tresponse: 'object',\n\t\treturns:\n\t\t\t'`canEdit` is true when the caller can upload a version and make one live; for an API token that includes its scopes. `sourceDocumentId` is the Grasshopper document GUID it was last uploaded from, or null.',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'PATCH',\n\t\tpath: '/definitions/{guid}',\n\t\tscope: 'write',\n\t\tsummary: 'Update definition metadata.',\n\t\tresponse: 'empty',\n\t\trequestBody: UpdateDefinitionBodySchema,\n\t\terrors: [400, 404]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/definitions/{guid}',\n\t\tscope: 'write',\n\t\tsummary: 'Soft-delete a definition.',\n\t\tresponse: 'empty',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/solve',\n\t\tscope: 'solve',\n\t\tidempotent: true,\n\t\tsummary: 'Solve a definition. The primary action of the API.',\n\t\tresponse: 'object',\n\t\trequestBody: SolveBodySchema,\n\t\terrors: solveErrors\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/schema',\n\t\tscope: 'read',\n\t\tsummary: \"The live version's UI schema. 404 when nothing is published.\",\n\t\tresponse: 'object',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/versions',\n\t\tscope: 'read',\n\t\tsummary: 'List versions, newest first.',\n\t\tresponse: 'collection',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/versions',\n\t\tscope: 'upload',\n\t\tidempotent: true,\n\t\tsummary: 'Upload a new version.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\tmultipart: [\n\t\t\t{ field: 'file', required: true, description: 'The `.gh` or `.ghx` file.' },\n\t\t\t{ field: 'changeNote', required: false, description: 'Truncated to 1000 characters.' }\n\t\t],\n\t\terrors: [400, 404, 422, 503]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/versions/{versionId}',\n\t\tscope: 'read',\n\t\tsummary: 'One version, without its cached schema.',\n\t\tresponse: 'object',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/definitions/{guid}/versions/{versionId}',\n\t\tscope: 'write',\n\t\tsummary: 'Delete a version. 409 when it is the live or draft pointer.',\n\t\tresponse: 'empty',\n\t\terrors: [404, 409]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/versions/{versionId}/schema',\n\t\tscope: 'read',\n\t\tsummary: \"That version's cached UI schema. No compute round-trip.\",\n\t\tresponse: 'object',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/publish',\n\t\tscope: 'upload',\n\t\tsummary: 'Promote a version to live.',\n\t\tresponse: 'object',\n\t\trequestBody: PublishVersionBodySchema,\n\t\terrors: [400, 404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/image',\n\t\tscope: 'write',\n\t\tsummary: 'Upload a cover image.',\n\t\tresponse: 'object',\n\t\tmultipart: [{ field: 'image', required: true, description: 'PNG, JPEG, WebP or GIF.' }],\n\t\terrors: [400, 404]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/share-links',\n\t\tscope: 'read',\n\t\tsummary: 'List share links. 404 when sharing is disabled on the instance.',\n\t\tresponse: 'collection',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/share-links',\n\t\tscope: 'write',\n\t\tidempotent: true,\n\t\tsummary: 'Create a share link. The raw token is returned once and never again.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\trequestBody: CreateShareLinkBodySchema,\n\t\terrors: [400, 404]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/definitions/{guid}/share-links/{linkId}',\n\t\tscope: 'write',\n\t\tsummary: 'Revoke a share link.',\n\t\tresponse: 'empty',\n\t\terrors: [404]\n\t},\n\n\t// ==========================================================================\n\t// Projects\n\t// ==========================================================================\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/projects',\n\t\tscope: 'read',\n\t\tsummary: 'List projects the caller can view.',\n\t\tresponse: 'collection',\n\t\treturns:\n\t\t\t'Each item has `canCreateDefinitions`: whether `POST /definitions` would accept this project from the caller, scopes included for an API token.'\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/projects',\n\t\tscope: 'create_projects',\n\t\tidempotent: true,\n\t\tsummary:\n\t\t\t'Create a project. A key with `create_projects` but not `write` may create private projects only, with `autoJoinOnUpload` off.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\trequestBody: CreateProjectBodySchema,\n\t\terrors: [400, 403, 409]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/projects/{id}',\n\t\tscope: 'read',\n\t\tsummary: \"Project record plus the caller's effective role and capabilities.\",\n\t\tresponse: 'object',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'PATCH',\n\t\tpath: '/projects/{id}',\n\t\tscope: 'write',\n\t\tsummary: 'Update project settings. Owner-only.',\n\t\tresponse: 'empty',\n\t\trequestBody: UpdateProjectBodySchema,\n\t\terrors: [400, 403, 404, 409]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/projects/{id}',\n\t\tscope: 'write',\n\t\tsummary: 'Delete a project.',\n\t\tresponse: 'empty',\n\t\terrors: [403, 404]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/projects/{id}/members',\n\t\tscope: 'read',\n\t\tsummary: 'List project members.',\n\t\tresponse: 'collection',\n\t\terrors: [403, 404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/projects/{id}/members',\n\t\tscope: 'write',\n\t\tsummary: 'Add a member. The target must already belong to the org.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\trequestBody: AddProjectMemberBodySchema,\n\t\terrors: [400, 403, 404]\n\t},\n\t{\n\t\tmethod: 'PATCH',\n\t\tpath: '/projects/{id}/members/{userId}',\n\t\tscope: 'write',\n\t\tsummary: 'Change a member role.',\n\t\tresponse: 'empty',\n\t\trequestBody: UpdateProjectMemberBodySchema,\n\t\terrors: [400, 403, 404, 409]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/projects/{id}/members/{userId}',\n\t\tscope: 'write',\n\t\tsummary: 'Remove a member. Idempotent.',\n\t\tresponse: 'empty',\n\t\tquery: [\n\t\t\t{\n\t\t\t\tname: 'confirm',\n\t\t\t\tdescription: 'Set to `true` to remove a co-owner; without it the call returns 409.'\n\t\t\t}\n\t\t],\n\t\terrors: [403, 404, 409]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/projects/{id}/reclaim',\n\t\tscope: 'write',\n\t\tsummary: 'Claim ownership of an unowned project.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\terrors: [403, 404, 409]\n\t},\n\n\t// ==========================================================================\n\t// Orgs\n\t// ==========================================================================\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/orgs/{orgId}',\n\t\tscope: 'read',\n\t\tsummary: \"Org record. The org must be the caller's acting org.\",\n\t\tresponse: 'object',\n\t\terrors: [403, 404]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/orgs/{orgId}/members',\n\t\tscope: 'read',\n\t\tsummary: 'List org members.',\n\t\tresponse: 'collection',\n\t\terrors: [403]\n\t},\n\t{\n\t\tmethod: 'PATCH',\n\t\tpath: '/orgs/{orgId}/members/{userId}',\n\t\tscope: 'write',\n\t\tsummary: 'Change an org role or permission set. The sole owner cannot be demoted.',\n\t\tresponse: 'empty',\n\t\trequestBody: UpdateOrgMemberBodySchema,\n\t\terrors: [400, 403, 404, 409]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/orgs/{orgId}/members/{userId}',\n\t\tscope: 'write',\n\t\tsummary: 'Remove an org member. The sole owner cannot be removed.',\n\t\tresponse: 'empty',\n\t\terrors: [403, 404, 409]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/orgs/{orgId}/invites',\n\t\tscope: 'read',\n\t\tsummary: 'List pending invites. Browser session only: an API key gets 403.',\n\t\tresponse: 'collection',\n\t\terrors: [403]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/orgs/{orgId}/invites',\n\t\tscope: 'write',\n\t\tsummary:\n\t\t\t'Invite someone to the org. The accept URL is returned once. Browser session only: an API key gets 403.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\trequestBody: CreateInviteBodySchema,\n\t\terrors: [400, 403, 409]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/orgs/{orgId}/invites/{id}',\n\t\tscope: 'write',\n\t\tsummary: 'Revoke an invite.',\n\t\tresponse: 'empty',\n\t\terrors: [403, 404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/orgs/{orgId}/invites/{id}/resend',\n\t\tscope: 'write',\n\t\tsummary:\n\t\t\t'Re-send an invite. Issues a replacement and revokes the original, so the previous link stops working. Browser session only: an API key gets 403.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\terrors: [403, 404, 409]\n\t},\n\t// Internal and session-only: a key can never manage keys.\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/orgs/{orgId}/tokens',\n\t\tscope: 'read',\n\t\tsummary: 'Your API tokens in this org, revoked and expired included.',\n\t\tinternal: true,\n\t\tresponse: 'collection',\n\t\tquery: [\n\t\t\t{ name: 'all', description: \"`true` for every member's tokens. Needs `manage_org_members`.\" }\n\t\t],\n\t\terrors: [403, 503]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/orgs/{orgId}/tokens',\n\t\tscope: 'write',\n\t\tsummary: 'Create an API token acting as you. The raw key is returned once, as `secret`.',\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\trequestBody: CreateApiTokenBodySchema,\n\t\terrors: [400, 403, 503]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/orgs/{orgId}/tokens/{tokenId}',\n\t\tscope: 'write',\n\t\tsummary: 'Revoke an API token: your own, or any in the org with `manage_org_members`.',\n\t\tinternal: true,\n\t\tresponse: 'empty',\n\t\terrors: [403, 404, 503]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/orgs/{orgId}/compute',\n\t\tscope: 'read',\n\t\tsummary: 'Org compute-server overrides and the shared catalog.',\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\terrors: [403]\n\t},\n\t{\n\t\tmethod: 'PATCH',\n\t\tpath: '/orgs/{orgId}/compute',\n\t\tscope: 'write',\n\t\tsummary: 'Replace the org compute-server overrides.',\n\t\tinternal: true,\n\t\tresponse: 'empty',\n\t\trequestBody: OrgComputePatchBodySchema,\n\t\terrors: [400, 403]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/orgs/{orgId}/assets/{kind}',\n\t\tscope: 'write',\n\t\tsummary: 'Upload an org branding asset.',\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\tmultipart: [{ field: 'image', required: true, description: 'PNG, JPEG, WebP, GIF or SVG.' }],\n\t\terrors: [400, 403, 404]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/orgs/{orgId}/assets/{kind}',\n\t\tscope: 'write',\n\t\tsummary: 'Remove an org branding asset.',\n\t\tinternal: true,\n\t\tresponse: 'empty',\n\t\terrors: [403, 404]\n\t},\n\n\t// ==========================================================================\n\t// Compute\n\t// ==========================================================================\n\t//\n\t// Internal: accepts a remote `definitionUrl` and the anonymous share-token\n\t// flow, neither part of the public contract. Public callers solve through\n\t// `/definitions/{guid}/solve`.\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/compute',\n\t\tscope: 'solve',\n\t\tsummary: 'Generic solve, including remote definition URLs and share-token access.',\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\terrors: solveErrors\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/compute/schema',\n\t\tscope: 'upload',\n\t\tsummary: 'Extract UI schemas from an uploaded file before it becomes a definition.',\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\tmultipart: [{ field: 'file', required: true, description: 'The `.gh` or `.ghx` file.' }],\n\t\tquery: [\n\t\t\t{ name: 'projectId', description: 'Project the file will belong to.' },\n\t\t\t{ name: 'computeServerId', description: 'Pin to a compute server.' }\n\t\t],\n\t\terrors: [400, 403, 422, 503]\n\t},\n\n\t// ==========================================================================\n\t// Live solve events\n\t// ==========================================================================\n\t//\n\t// Internal: the browser's live channel and the plugin's callback into it. Both\n\t// are shaped by the Selva plugin and web app, not by the public contract.\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/solve-events',\n\t\tscope: 'read',\n\t\tsummary: \"The tab's live event stream (SSE). Solves that name its `streamId` report here.\",\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\tquery: [{ name: 'streamId', description: 'Minted by the tab, 16-64 URL-safe characters.' }],\n\t\terrors: [400, 401, 409]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/solve-events/{solveId}',\n\t\tscope: 'write',\n\t\tsummary: \"The plugin's callback from inside a Compute solve. The reply carries `abort`.\",\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\terrors: [400, 401, 410]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/solve/{solveId}/cancel',\n\t\tscope: 'solve',\n\t\tsummary: 'Ask a running solve to abort. Cooperative: it stops at the next component.',\n\t\tinternal: true,\n\t\tresponse: 'empty',\n\t\terrors: [401, 404]\n\t}\n];\n\n/** `/definitions/{guid}` → the SvelteKit directory form `definitions/[guid]`. */\nexport function toRoutePath(openApiPath: string): string {\n\treturn openApiPath.replace(/^\\//, '').replace(/\\{(\\w+)\\}/g, '[$1]');\n}\n\nexport function endpointKey(method: HttpMethod, path: string): string {\n\treturn `${method} ${path}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,IAAM,cAAc;CAAC;CAAK;CAAK;CAAK;CAAK;AAAG;AAE5C,IAAa,eAA2B;CACvC;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;CACX;CAKA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SACC;EACD,UAAU;EACV,SACC;CACF;CAEA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SACC;EACD,UAAU;EACV,QAAQ,CAAC,KAAK,GAAG;CAClB;CACA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,QAAQ,CAAC,GAAG;CACb;CACA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;CACX;CAKA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,SACC;EACD,OAAO;GACN;IAAE,MAAM;IAAa,aAAa;GAA2B;GAC7D;IAAE,MAAM;IAAU,aAAa;GAA2C;GAC1E;IACC,MAAM;IACN,aACC;GACF;EACD;EACA,QAAQ,CAAC,GAAG;CACb;CACA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,YAAY;EACZ,SAAS;EACT,UAAU;EAC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QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,QAAQ,CAAC,KAAK,GAAG;CAClB;CASA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,QAAQ;CACT;CACA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,WAAW,CAAC;GAAE,OAAO;GAAQ,UAAU;GAAM,aAAa;EAA4B,CAAC;EACvF,OAAO,CACN;GAAE,MAAM;GAAa,aAAa;EAAmC,GACrE;GAAE,MAAM;GAAmB,aAAa;EAA2B,CACpE;EACA,QAAQ;GAAC;GAAK;GAAK;GAAK;EAAG;CAC5B;CAQA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,OAAO,CAAC;GAAE,MAAM;GAAY,aAAa;EAAgD,CAAC;EAC1F,QAAQ;GAAC;GAAK;GAAK;EAAG;CACvB;CACA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,QAAQ;GAAC;GAAK;GAAK;EAAG;CACvB;CACA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,QAAQ,CAAC,KAAK,GAAG;CAClB;AACD"}
|
|
1
|
+
{"version":3,"file":"registry.js","names":[],"sources":["../../../src/lib/server/api/v1/registry.ts"],"sourcesContent":["/**\n * The v1 contract as data: one entry per method+path, naming its body validator,\n * response shape, and whether it's public or internal.\n *\n * Both the OpenAPI generator and the conformance test read this file. The test\n * walks `routes/api/v1/**` against this table and fails if either side has an\n * entry the other doesn't — a route with no registry entry is undocumented, a\n * registry entry with no route is a spec promising something that 404s.\n *\n * Request schemas are Zod values imported from `@selvajs/server/api`, not\n * transcribed, so a renamed field changes the spec on the next generate\n * instead of silently disagreeing with the validator.\n */\n\nimport {\n\ttype Endpoint,\n\ttype HttpMethod,\n\tSolveBodySchema,\n\tUpdateDefinitionBodySchema,\n\tPublishVersionBodySchema,\n\tCreateShareLinkBodySchema,\n\tCreateProjectBodySchema,\n\tUpdateProjectBodySchema,\n\tAddProjectMemberBodySchema,\n\tUpdateProjectMemberBodySchema,\n\tCreateInviteBodySchema,\n\tUpdateOrgMemberBodySchema,\n\tOrgComputePatchBodySchema,\n\tCreateApiTokenBodySchema\n} from '@selvajs/server/api';\n\nexport type { Endpoint, HttpMethod };\n\nconst solveErrors = [400, 401, 404, 429, 503];\n\nexport const V1_ENDPOINTS: Endpoint[] = [\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/openapi.json',\n\t\tscope: 'read',\n\t\tsummary: 'This document, as JSON.',\n\t\tresponse: 'object'\n\t},\n\n\t// ==========================================================================\n\t// Me\n\t// ==========================================================================\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/me',\n\t\tscope: 'read',\n\t\tsummary:\n\t\t\t'The calling identity, its acting org, its effective permissions, and for a token its id, scopes and expiry.',\n\t\tresponse: 'object',\n\t\treturns:\n\t\t\t'`apiToken: { id, scopes, expiresAt }` is present only when the caller is an API token. `capabilities.createProjects` says whether `POST /projects` would accept this caller, narrowed to the key; `orgPermissions` is the owner’s and is not.'\n\t},\n\t// Every key may call it, whatever its scopes; `read` is the action every key holds.\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/me/token',\n\t\tscope: 'read',\n\t\tsummary:\n\t\t\t'Revoke the API token that sent this request. A key can revoke itself and nothing else; a browser session gets 400.',\n\t\tresponse: 'empty',\n\t\terrors: [400, 503]\n\t},\n\t{\n\t\tmethod: 'PUT',\n\t\tpath: '/me/starred/{guid}',\n\t\tscope: 'write',\n\t\tsummary: 'Star a definition. Idempotent.',\n\t\tresponse: 'empty',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/me/starred/{guid}',\n\t\tscope: 'write',\n\t\tsummary: 'Unstar a definition. Idempotent.',\n\t\tresponse: 'empty'\n\t},\n\n\t// ==========================================================================\n\t// Definitions\n\t// ==========================================================================\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions',\n\t\tscope: 'read',\n\t\tsummary: 'List definitions the caller can see.',\n\t\tresponse: 'collection',\n\t\treturns:\n\t\t\t'Each item has `sourceDocumentId`: the Grasshopper document GUID the definition was last uploaded from, or null.',\n\t\tquery: [\n\t\t\t{ name: 'projectId', description: 'Restrict to one project.' },\n\t\t\t{ name: 'status', description: 'One of `draft`, `published`, `archived`.' },\n\t\t\t{\n\t\t\t\tname: 'documentId',\n\t\t\t\tdescription:\n\t\t\t\t\t'A Grasshopper document GUID. Returns only definitions last uploaded from that document which the caller can upload a new version of. Not a GUID: 400.'\n\t\t\t}\n\t\t],\n\t\terrors: [400]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions',\n\t\tscope: 'upload',\n\t\tidempotent: true,\n\t\tsummary: 'Create a definition from a Grasshopper file.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\tmultipart: [\n\t\t\t{ field: 'file', required: true, description: 'The `.gh` or `.ghx` file.' },\n\t\t\t{ field: 'projectId', required: true, description: 'Owning project.' },\n\t\t\t{ field: 'displayName', required: true, description: 'Human-readable name.' },\n\t\t\t{ field: 'description', required: false, description: 'Long description.' },\n\t\t\t{ field: 'category', required: false, description: 'Grouping label.' },\n\t\t\t{ field: 'tags', required: false, description: 'Comma-separated tags.' },\n\t\t\t{ field: 'image', required: false, description: 'Cover image.' },\n\t\t\t{ field: 'computeServerId', required: false, description: 'Pin to a compute server.' },\n\t\t\t{\n\t\t\t\tfield: 'acceptMissingPlugins',\n\t\t\t\trequired: false,\n\t\t\t\tdescription:\n\t\t\t\t\t'`true` uploads a file that needs a plugin the Compute server lacks. Without it, such a file is refused with 422.'\n\t\t\t}\n\t\t],\n\t\terrors: [400, 403, 422, 503]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}',\n\t\tscope: 'read',\n\t\tsummary: 'Definition record plus its live and draft version summaries.',\n\t\tresponse: 'object',\n\t\treturns:\n\t\t\t'`canEdit` is true when the caller can upload a version and make one live; for an API token that includes its scopes. `sourceDocumentId` is the Grasshopper document GUID it was last uploaded from, or null.',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'PATCH',\n\t\tpath: '/definitions/{guid}',\n\t\tscope: 'write',\n\t\tsummary: 'Update definition metadata.',\n\t\tresponse: 'empty',\n\t\trequestBody: UpdateDefinitionBodySchema,\n\t\terrors: [400, 404]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/definitions/{guid}',\n\t\tscope: 'write',\n\t\tsummary: 'Soft-delete a definition.',\n\t\tresponse: 'empty',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/solve',\n\t\tscope: 'solve',\n\t\tidempotent: true,\n\t\tsummary: 'Solve a definition. The primary action of the API.',\n\t\tresponse: 'object',\n\t\trequestBody: SolveBodySchema,\n\t\terrors: solveErrors\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/schema',\n\t\tscope: 'read',\n\t\tsummary: \"The live version's UI schema. 404 when nothing is published.\",\n\t\tresponse: 'object',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/versions',\n\t\tscope: 'read',\n\t\tsummary: 'List versions, newest first.',\n\t\tresponse: 'collection',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/versions',\n\t\tscope: 'upload',\n\t\tidempotent: true,\n\t\tsummary: 'Upload a new version.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\tmultipart: [\n\t\t\t{ field: 'file', required: true, description: 'The `.gh` or `.ghx` file.' },\n\t\t\t{\n\t\t\t\tfield: 'changeNote',\n\t\t\t\trequired: false,\n\t\t\t\tdescription: 'Markdown, at most 10,000 characters. Longer is refused with 400.'\n\t\t\t},\n\t\t\t{\n\t\t\t\tfield: 'acceptMissingPlugins',\n\t\t\t\trequired: false,\n\t\t\t\tdescription:\n\t\t\t\t\t'`true` uploads a file that needs a plugin the Compute server lacks. Without it, such a file is refused with 422.'\n\t\t\t}\n\t\t],\n\t\terrors: [400, 404, 422, 503]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/versions/check',\n\t\tscope: 'upload',\n\t\tsummary:\n\t\t\t'Dry run of an upload: validates the file through Compute and diffs it against the version it would follow, form and inventory. Writes nothing.',\n\t\tresponse: 'object',\n\t\tmultipart: [{ field: 'file', required: true, description: 'The `.gh` or `.ghx` file.' }],\n\t\terrors: [400, 404, 422, 503]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/versions/{versionId}',\n\t\tscope: 'read',\n\t\tsummary: 'One version, without its cached schema.',\n\t\tresponse: 'object',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/definitions/{guid}/versions/{versionId}',\n\t\tscope: 'write',\n\t\tsummary: 'Delete a version. 409 when it is the live or draft pointer.',\n\t\tresponse: 'empty',\n\t\terrors: [404, 409]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/versions/{versionId}/schema',\n\t\tscope: 'read',\n\t\tsummary: \"That version's cached UI schema. No compute round-trip.\",\n\t\tresponse: 'object',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/versions/{versionId}/changes',\n\t\tscope: 'read',\n\t\tsummary:\n\t\t\t'What this version changed in inputs, outputs and settings, against `?against=<versionId>` or the version before it.',\n\t\treturns:\n\t\t\t'Editors also get `inventory`: warnings about the file and what changed inside it (plugins, components, values, scripts, wiring).',\n\t\tresponse: 'object',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/versions/{versionId}/inventory',\n\t\tscope: 'upload',\n\t\tsummary:\n\t\t\t\"Re-read a version's inventory from its stored file through Compute: for versions uploaded before inventories, or after installing a missing plugin.\",\n\t\tresponse: 'object',\n\t\terrors: [404, 422, 503]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/versions/{versionId}/scripts/{scriptId}',\n\t\tscope: 'upload',\n\t\tsummary:\n\t\t\t\"One script component's code in this version and in `?against=<versionId>` or the version before, with a line diff. Read from the stored files through Compute, never kept.\",\n\t\tresponse: 'object',\n\t\terrors: [404, 422, 503]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/publish',\n\t\tscope: 'upload',\n\t\tsummary: 'Promote a version to live.',\n\t\tresponse: 'object',\n\t\trequestBody: PublishVersionBodySchema,\n\t\terrors: [400, 404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/image',\n\t\tscope: 'write',\n\t\tsummary: 'Upload a cover image.',\n\t\tresponse: 'object',\n\t\tmultipart: [{ field: 'image', required: true, description: 'PNG, JPEG, WebP or GIF.' }],\n\t\terrors: [400, 404]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/definitions/{guid}/share-links',\n\t\tscope: 'read',\n\t\tsummary: 'List share links. 404 when sharing is disabled on the instance.',\n\t\tresponse: 'collection',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/definitions/{guid}/share-links',\n\t\tscope: 'write',\n\t\tidempotent: true,\n\t\tsummary: 'Create a share link. The raw token is returned once and never again.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\trequestBody: CreateShareLinkBodySchema,\n\t\terrors: [400, 404]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/definitions/{guid}/share-links/{linkId}',\n\t\tscope: 'write',\n\t\tsummary: 'Revoke a share link.',\n\t\tresponse: 'empty',\n\t\terrors: [404]\n\t},\n\n\t// ==========================================================================\n\t// Projects\n\t// ==========================================================================\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/projects',\n\t\tscope: 'read',\n\t\tsummary: 'List projects the caller can view.',\n\t\tresponse: 'collection',\n\t\treturns:\n\t\t\t'Each item has `canCreateDefinitions`: whether `POST /definitions` would accept this project from the caller, scopes included for an API token.'\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/projects',\n\t\tscope: 'create_projects',\n\t\tidempotent: true,\n\t\tsummary:\n\t\t\t'Create a project. A key with `create_projects` but not `write` may create private projects only, with `autoJoinOnUpload` off.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\trequestBody: CreateProjectBodySchema,\n\t\terrors: [400, 403, 409]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/projects/{id}',\n\t\tscope: 'read',\n\t\tsummary: \"Project record plus the caller's effective role and capabilities.\",\n\t\tresponse: 'object',\n\t\terrors: [404]\n\t},\n\t{\n\t\tmethod: 'PATCH',\n\t\tpath: '/projects/{id}',\n\t\tscope: 'write',\n\t\tsummary: 'Update project settings. Owner-only.',\n\t\tresponse: 'empty',\n\t\trequestBody: UpdateProjectBodySchema,\n\t\terrors: [400, 403, 404, 409]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/projects/{id}',\n\t\tscope: 'write',\n\t\tsummary: 'Delete a project.',\n\t\tresponse: 'empty',\n\t\terrors: [403, 404]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/projects/{id}/members',\n\t\tscope: 'read',\n\t\tsummary: 'List project members.',\n\t\tresponse: 'collection',\n\t\terrors: [403, 404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/projects/{id}/members',\n\t\tscope: 'write',\n\t\tsummary: 'Add a member. The target must already belong to the org.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\trequestBody: AddProjectMemberBodySchema,\n\t\terrors: [400, 403, 404]\n\t},\n\t{\n\t\tmethod: 'PATCH',\n\t\tpath: '/projects/{id}/members/{userId}',\n\t\tscope: 'write',\n\t\tsummary: 'Change a member role.',\n\t\tresponse: 'empty',\n\t\trequestBody: UpdateProjectMemberBodySchema,\n\t\terrors: [400, 403, 404, 409]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/projects/{id}/members/{userId}',\n\t\tscope: 'write',\n\t\tsummary: 'Remove a member. Idempotent.',\n\t\tresponse: 'empty',\n\t\tquery: [\n\t\t\t{\n\t\t\t\tname: 'confirm',\n\t\t\t\tdescription: 'Set to `true` to remove a co-owner; without it the call returns 409.'\n\t\t\t}\n\t\t],\n\t\terrors: [403, 404, 409]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/projects/{id}/reclaim',\n\t\tscope: 'write',\n\t\tsummary: 'Claim ownership of an unowned project.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\terrors: [403, 404, 409]\n\t},\n\n\t// ==========================================================================\n\t// Orgs\n\t// ==========================================================================\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/orgs/{orgId}',\n\t\tscope: 'read',\n\t\tsummary: \"Org record. The org must be the caller's acting org.\",\n\t\tresponse: 'object',\n\t\terrors: [403, 404]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/orgs/{orgId}/members',\n\t\tscope: 'read',\n\t\tsummary: 'List org members.',\n\t\tresponse: 'collection',\n\t\terrors: [403]\n\t},\n\t{\n\t\tmethod: 'PATCH',\n\t\tpath: '/orgs/{orgId}/members/{userId}',\n\t\tscope: 'write',\n\t\tsummary: 'Change an org role or permission set. The sole owner cannot be demoted.',\n\t\tresponse: 'empty',\n\t\trequestBody: UpdateOrgMemberBodySchema,\n\t\terrors: [400, 403, 404, 409]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/orgs/{orgId}/members/{userId}',\n\t\tscope: 'write',\n\t\tsummary: 'Remove an org member. The sole owner cannot be removed.',\n\t\tresponse: 'empty',\n\t\terrors: [403, 404, 409]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/orgs/{orgId}/invites',\n\t\tscope: 'read',\n\t\tsummary: 'List pending invites. Browser session only: an API key gets 403.',\n\t\tresponse: 'collection',\n\t\terrors: [403]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/orgs/{orgId}/invites',\n\t\tscope: 'write',\n\t\tsummary:\n\t\t\t'Invite someone to the org. The accept URL is returned once. Browser session only: an API key gets 403.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\trequestBody: CreateInviteBodySchema,\n\t\terrors: [400, 403, 409]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/orgs/{orgId}/invites/{id}',\n\t\tscope: 'write',\n\t\tsummary: 'Revoke an invite.',\n\t\tresponse: 'empty',\n\t\terrors: [403, 404]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/orgs/{orgId}/invites/{id}/resend',\n\t\tscope: 'write',\n\t\tsummary:\n\t\t\t'Re-send an invite. Issues a replacement and revokes the original, so the previous link stops working. Browser session only: an API key gets 403.',\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\terrors: [403, 404, 409]\n\t},\n\t// Internal and session-only: a key can never manage keys.\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/orgs/{orgId}/tokens',\n\t\tscope: 'read',\n\t\tsummary: 'Your API tokens in this org, revoked and expired included.',\n\t\tinternal: true,\n\t\tresponse: 'collection',\n\t\tquery: [\n\t\t\t{ name: 'all', description: \"`true` for every member's tokens. Needs `manage_org_members`.\" }\n\t\t],\n\t\terrors: [403, 503]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/orgs/{orgId}/tokens',\n\t\tscope: 'write',\n\t\tsummary: 'Create an API token acting as you. The raw key is returned once, as `secret`.',\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\tstatus: 201,\n\t\trequestBody: CreateApiTokenBodySchema,\n\t\terrors: [400, 403, 503]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/orgs/{orgId}/tokens/{tokenId}',\n\t\tscope: 'write',\n\t\tsummary: 'Revoke an API token: your own, or any in the org with `manage_org_members`.',\n\t\tinternal: true,\n\t\tresponse: 'empty',\n\t\terrors: [403, 404, 503]\n\t},\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/orgs/{orgId}/compute',\n\t\tscope: 'read',\n\t\tsummary: 'Org compute-server overrides and the shared catalog.',\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\terrors: [403]\n\t},\n\t{\n\t\tmethod: 'PATCH',\n\t\tpath: '/orgs/{orgId}/compute',\n\t\tscope: 'write',\n\t\tsummary: 'Replace the org compute-server overrides.',\n\t\tinternal: true,\n\t\tresponse: 'empty',\n\t\trequestBody: OrgComputePatchBodySchema,\n\t\terrors: [400, 403]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/orgs/{orgId}/assets/{kind}',\n\t\tscope: 'write',\n\t\tsummary: 'Upload an org branding asset.',\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\tmultipart: [{ field: 'image', required: true, description: 'PNG, JPEG, WebP, GIF or SVG.' }],\n\t\terrors: [400, 403, 404]\n\t},\n\t{\n\t\tmethod: 'DELETE',\n\t\tpath: '/orgs/{orgId}/assets/{kind}',\n\t\tscope: 'write',\n\t\tsummary: 'Remove an org branding asset.',\n\t\tinternal: true,\n\t\tresponse: 'empty',\n\t\terrors: [403, 404]\n\t},\n\n\t// ==========================================================================\n\t// Compute\n\t// ==========================================================================\n\t//\n\t// Internal: accepts a remote `definitionUrl` and the anonymous share-token\n\t// flow, neither part of the public contract. Public callers solve through\n\t// `/definitions/{guid}/solve`.\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/compute',\n\t\tscope: 'solve',\n\t\tsummary: 'Generic solve, including remote definition URLs and share-token access.',\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\terrors: solveErrors\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/compute/schema',\n\t\tscope: 'upload',\n\t\tsummary: 'Extract UI schemas from an uploaded file before it becomes a definition.',\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\tmultipart: [{ field: 'file', required: true, description: 'The `.gh` or `.ghx` file.' }],\n\t\tquery: [\n\t\t\t{ name: 'projectId', description: 'Project the file will belong to.' },\n\t\t\t{ name: 'computeServerId', description: 'Pin to a compute server.' }\n\t\t],\n\t\terrors: [400, 403, 422, 503]\n\t},\n\n\t// ==========================================================================\n\t// Live solve events\n\t// ==========================================================================\n\t//\n\t// Internal: the browser's live channel and the plugin's callback into it. Both\n\t// are shaped by the Selva plugin and web app, not by the public contract.\n\t{\n\t\tmethod: 'GET',\n\t\tpath: '/solve-events',\n\t\tscope: 'read',\n\t\tsummary: \"The tab's live event stream (SSE). Solves that name its `streamId` report here.\",\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\tquery: [{ name: 'streamId', description: 'Minted by the tab, 16-64 URL-safe characters.' }],\n\t\terrors: [400, 401, 409]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/solve-events/{solveId}',\n\t\tscope: 'write',\n\t\tsummary: \"The plugin's callback from inside a Compute solve. The reply carries `abort`.\",\n\t\tinternal: true,\n\t\tresponse: 'object',\n\t\terrors: [400, 401, 410]\n\t},\n\t{\n\t\tmethod: 'POST',\n\t\tpath: '/solve/{solveId}/cancel',\n\t\tscope: 'solve',\n\t\tsummary: 'Ask a running solve to abort. Cooperative: it stops at the next component.',\n\t\tinternal: true,\n\t\tresponse: 'empty',\n\t\terrors: [401, 404]\n\t}\n];\n\n/** `/definitions/{guid}` → the SvelteKit directory form `definitions/[guid]`. */\nexport function toRoutePath(openApiPath: string): string {\n\treturn openApiPath.replace(/^\\//, '').replace(/\\{(\\w+)\\}/g, '[$1]');\n}\n\nexport function endpointKey(method: HttpMethod, path: string): string {\n\treturn `${method} ${path}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,IAAM,cAAc;CAAC;CA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;EAC3F,QAAQ;GAAC;GAAK;GAAK;EAAG;CACvB;CACA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,QAAQ,CAAC,KAAK,GAAG;CAClB;CASA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,QAAQ;CACT;CACA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,WAAW,CAAC;GAAE,OAAO;GAAQ,UAAU;GAAM,aAAa;EAA4B,CAAC;EACvF,OAAO,CACN;GAAE,MAAM;GAAa,aAAa;EAAmC,GACrE;GAAE,MAAM;GAAmB,aAAa;EAA2B,CACpE;EACA,QAAQ;GAAC;GAAK;GAAK;GAAK;EAAG;CAC5B;CAQA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,OAAO,CAAC;GAAE,MAAM;GAAY,aAAa;EAAgD,CAAC;EAC1F,QAAQ;GAAC;GAAK;GAAK;EAAG;CACvB;CACA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,QAAQ;GAAC;GAAK;GAAK;EAAG;CACvB;CACA;EACC,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS;EACT,UAAU;EACV,UAAU;EACV,QAAQ,CAAC,KAAK,GAAG;CAClB;AACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { d as resolveServerForOrg$1 } from "./inventory.js";
|
|
2
|
+
import { f as ComputeServerUnconfiguredError } from "./schema-extraction.js";
|
|
3
3
|
// ../server/src/compute/resolve-server.ts
|
|
4
4
|
/**
|
|
5
5
|
* Pick the right Rhino.Compute server for an (org, definition) pair.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as spread_props } from "./server3.js";
|
|
2
|
-
import { n as Icon } from "./
|
|
2
|
+
import { n as Icon } from "./utils.js";
|
|
3
3
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/rotate-ccw.svelte
|
|
4
4
|
var __iconData = {
|
|
5
5
|
"name": "rotate-ccw",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as fetchParsedDefinitionIO, o as normalizeUISchemaCasing, s as readSchemaResults$1 } from "./grasshopper.js";
|
|
2
2
|
import { t as UI_SCHEMA_VERSION } from "./schema.js";
|
|
3
3
|
// ../server/src/compute/errors.ts
|
|
4
4
|
/**
|
|
@@ -21,6 +21,44 @@ var ComputeServerUnconfiguredError = class extends Error {
|
|
|
21
21
|
this.name = "ComputeServerUnconfiguredError";
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
+
// ../server/src/definitions/saved-values.ts
|
|
25
|
+
function savedValuesFrom(inputs) {
|
|
26
|
+
const values = /* @__PURE__ */ new Map();
|
|
27
|
+
for (const input of inputs) {
|
|
28
|
+
if (input.id === void 0 || input.default === void 0) continue;
|
|
29
|
+
values.set(input.id, input.paramType === "Color" ? colorToHex(input.default) : input.default);
|
|
30
|
+
}
|
|
31
|
+
return values;
|
|
32
|
+
}
|
|
33
|
+
/** `schema` with each input's `default` replaced by its saved value, where it has one. */
|
|
34
|
+
function applySavedValues(schema, values) {
|
|
35
|
+
return {
|
|
36
|
+
...schema,
|
|
37
|
+
inputs: schema.inputs.map((input) => values.has(input.id) ? {
|
|
38
|
+
...input,
|
|
39
|
+
default: values.get(input.id)
|
|
40
|
+
} : input)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function colorToHex(value) {
|
|
44
|
+
const parts = String(value).split(",").map((s) => parseInt(s.trim(), 10));
|
|
45
|
+
const hex = (n) => n.toString(16).padStart(2, "0");
|
|
46
|
+
if (parts.length === 3) return `#${hex(parts[0])}${hex(parts[1])}${hex(parts[2])}`;
|
|
47
|
+
if (parts.length === 4) return `#${hex(parts[1])}${hex(parts[2])}${hex(parts[3])}`;
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
// ../server/src/definitions/with-timeout.ts
|
|
51
|
+
/**
|
|
52
|
+
* Settles with `work`, or rejects with `onTimeout()` after `ms`. `work` is not cancelled: it runs
|
|
53
|
+
* on, and its later rejection stays handled.
|
|
54
|
+
*/
|
|
55
|
+
function withTimeout(work, ms, onTimeout) {
|
|
56
|
+
let timer;
|
|
57
|
+
const timeout = new Promise((_, reject) => {
|
|
58
|
+
timer = setTimeout(() => reject(onTimeout()), ms);
|
|
59
|
+
});
|
|
60
|
+
return Promise.race([work, timeout]).finally(() => clearTimeout(timer));
|
|
61
|
+
}
|
|
24
62
|
// ../server/src/definitions/schema-extraction.ts
|
|
25
63
|
/** Thin re-export of @selvajs/compute's unwrap, typed to `UISchema`. */
|
|
26
64
|
function readSchemaResults(raw) {
|
|
@@ -78,18 +116,25 @@ function parseSemver(version) {
|
|
|
78
116
|
] : null;
|
|
79
117
|
}
|
|
80
118
|
/**
|
|
119
|
+
* Orders a schema format version against the app's `UI_SCHEMA_VERSION`: -1 older, 0 current,
|
|
120
|
+
* 1 newer, null unparseable. A missing version is older: plugins before 2.12.0 emitted none.
|
|
121
|
+
*/
|
|
122
|
+
function compareSchemaVersion(version) {
|
|
123
|
+
if (!version) return -1;
|
|
124
|
+
const extracted = parseSemver(version);
|
|
125
|
+
const supported = parseSemver(UI_SCHEMA_VERSION);
|
|
126
|
+
if (!extracted || !supported) return null;
|
|
127
|
+
for (let i = 0; i < 3; i++) if (extracted[i] !== supported[i]) return extracted[i] < supported[i] ? -1 : 1;
|
|
128
|
+
return 0;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
81
131
|
* Rejects a schema from a NEWER plugin than this app was built against — its
|
|
82
132
|
* shape may contain constructs the renderer doesn't know. Older (or missing)
|
|
83
133
|
* versions pass: the compute-side C# migrator always emits its own current
|
|
84
134
|
* version, and an older shape only lacks optional additions.
|
|
85
135
|
*/
|
|
86
136
|
function assertSupportedSchemaVersion(schema) {
|
|
87
|
-
|
|
88
|
-
if (!version) return;
|
|
89
|
-
const extracted = parseSemver(version);
|
|
90
|
-
const supported = parseSemver(UI_SCHEMA_VERSION);
|
|
91
|
-
if (!extracted || !supported) return;
|
|
92
|
-
if (extracted[0] > supported[0] || extracted[0] === supported[0] && (extracted[1] > supported[1] || extracted[1] === supported[1] && extracted[2] > supported[2])) throw new SchemaExtractionError("unsupported", `This definition was authored with a newer Selva plugin (schema format ${version}); this server supports schema format ≤ ${UI_SCHEMA_VERSION}. Update the server, or re-save the definition with a matching plugin version.`);
|
|
137
|
+
if (compareSchemaVersion(schema.schemaVersion) === 1) throw new SchemaExtractionError("unsupported", `This definition was authored with a newer Selva plugin (schema format ${schema.schemaVersion}); this server supports schema format ≤ ${UI_SCHEMA_VERSION}. Update the server, or re-save the definition with a matching plugin version.`);
|
|
93
138
|
}
|
|
94
139
|
/**
|
|
95
140
|
* POSTs a multipart form to Rhino Compute's `/grasshopper/schema` endpoint (no
|
|
@@ -122,6 +167,10 @@ async function postSchemaFormData(formData, server) {
|
|
|
122
167
|
* 503 unreachable / 422 invalid or unsupported.
|
|
123
168
|
*/
|
|
124
169
|
async function fetchSchemaFromCompute(definitionBytes, server) {
|
|
170
|
+
return (await fetchExtraction(definitionBytes, server)).schema;
|
|
171
|
+
}
|
|
172
|
+
/** `fetchSchemaFromCompute` with the inventory Compute returns beside the schema. */
|
|
173
|
+
async function fetchExtraction(definitionBytes, server) {
|
|
125
174
|
const formData = new FormData();
|
|
126
175
|
const blob = new Blob([new Uint8Array(definitionBytes)], { type: "application/octet-stream" });
|
|
127
176
|
formData.append("file", blob, "definition.gh");
|
|
@@ -134,8 +183,67 @@ async function fetchSchemaFromCompute(definitionBytes, server) {
|
|
|
134
183
|
}
|
|
135
184
|
assertSupportedSchemaVersion(schemas[0]);
|
|
136
185
|
assertCamelCaseSchema(schemas[0]);
|
|
137
|
-
|
|
186
|
+
const inventory = results.find((r) => r.schemas?.length)?.inventory;
|
|
187
|
+
return {
|
|
188
|
+
schema: schemas[0],
|
|
189
|
+
inventory: isInventory(inventory) ? inventory : null
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function isInventory(value) {
|
|
193
|
+
const v = value;
|
|
194
|
+
return !!v && typeof v === "object" && Array.isArray(v.libraries) && Array.isArray(v.components) && Array.isArray(v.values) && Array.isArray(v.scripts) && typeof v.wires?.count === "number";
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* How long an upload waits for the saved values once the schema is in. Missing them costs only
|
|
198
|
+
* the first render its defaults: the render path reads them behind that render.
|
|
199
|
+
*/
|
|
200
|
+
var SAVED_VALUES_GRACE_MS = 5e3;
|
|
201
|
+
var SAVED_VALUES_TIMEOUT_MS = 12e4;
|
|
202
|
+
/**
|
|
203
|
+
* `fetchSchemaFromCompute` with the values saved in the file as input defaults, so the stored
|
|
204
|
+
* schema renders without asking Compute again. The values are read beside the schema,
|
|
205
|
+
* best-effort: only the schema gates the upload.
|
|
206
|
+
*/
|
|
207
|
+
async function extractSchemaForUpload(definitionBytes, server) {
|
|
208
|
+
const values = fetchParsedDefinitionIO(definitionBytes, {
|
|
209
|
+
serverUrl: server.serverUrl,
|
|
210
|
+
...server.apiKey && { apiKey: server.apiKey },
|
|
211
|
+
timeoutMs: SAVED_VALUES_TIMEOUT_MS
|
|
212
|
+
}).then((io) => savedValuesFrom(io.inputs));
|
|
213
|
+
values.catch(() => {});
|
|
214
|
+
const { schema, inventory } = await fetchExtraction(definitionBytes, server);
|
|
215
|
+
const saved = await withTimeout(values, SAVED_VALUES_GRACE_MS, () => /* @__PURE__ */ new Error("saved values not read in time")).catch(() => null);
|
|
216
|
+
return {
|
|
217
|
+
schema: saved ? applySavedValues(schema, saved) : schema,
|
|
218
|
+
inventory
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The source of the named script components, read by Compute from a stored file. The inventory
|
|
223
|
+
* keeps fingerprints only, so this is how a code diff gets the code. Throws 'unsupported' when the
|
|
224
|
+
* server's plugin cannot read scripts.
|
|
225
|
+
*/
|
|
226
|
+
async function fetchScriptSources(definitionBytes, ids, server) {
|
|
227
|
+
const form = new FormData();
|
|
228
|
+
form.append("file", new Blob([new Uint8Array(definitionBytes)]), "definition.gh");
|
|
229
|
+
form.append("ids", ids.join(","));
|
|
230
|
+
const headers = {};
|
|
231
|
+
if (server.apiKey) headers["RhinoComputeKey"] = server.apiKey;
|
|
232
|
+
let response;
|
|
233
|
+
try {
|
|
234
|
+
response = await fetch(new URL("/grasshopper/scripts", server.serverUrl), {
|
|
235
|
+
method: "POST",
|
|
236
|
+
headers,
|
|
237
|
+
body: form
|
|
238
|
+
});
|
|
239
|
+
} catch (err) {
|
|
240
|
+
throw new SchemaExtractionError("unreachable", `Compute server is unreachable: ${err instanceof Error ? err.message : String(err)}`);
|
|
241
|
+
}
|
|
242
|
+
if (response.status === 404 || response.status === 422) throw new SchemaExtractionError("unsupported", "This Compute server cannot read script source. Update the server and its Selva plugin.");
|
|
243
|
+
if (!response.ok) throw new SchemaExtractionError("unreachable", `Scripts endpoint returned ${response.status}: ${response.statusText}`);
|
|
244
|
+
const body = await response.json();
|
|
245
|
+
return Array.isArray(body) ? body : [];
|
|
138
246
|
}
|
|
139
|
-
export {
|
|
247
|
+
export { fetchExtraction as a, postSchemaFormData as c, savedValuesFrom as d, ComputeServerUnconfiguredError as f, extractSchemaForUpload as i, withTimeout as l, assertCamelCaseSchema as n, fetchSchemaFromCompute as o, compareSchemaVersion as r, fetchScriptSources as s, SchemaExtractionError as t, applySavedValues as u };
|
|
140
248
|
|
|
141
249
|
//# sourceMappingURL=schema-extraction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-extraction.js","names":["readWrapper"],"sources":["../../../../server/src/compute/errors.ts","../../../../server/src/definitions/schema-extraction.ts"],"sourcesContent":["/**\n * Compute error types, kept in a leaf module with no imports.\n *\n * Separate from the function that throws them on purpose: an error mapper needs\n * nothing but the class to `instanceof` against, and importing it from beside\n * the throw site drags that module's dependencies into every mapper. Anything\n * an error mapper imports belongs here.\n */\n\n/**\n * Thrown when no compute server is configured or visible for the org — a\n * misconfiguration an operator must fix in `/admin/compute`, not a bug. Routes\n * map this to 503 instead of letting the pure helper's plain `Error` surface as\n * a generic 500.\n */\nexport class ComputeServerUnconfiguredError extends Error {\n\tconstructor(\n\t\tmessage = 'No compute server configured. Ask an admin to add one in /admin/compute.'\n\t) {\n\t\tsuper(message);\n\t\tthis.name = 'ComputeServerUnconfiguredError';\n\t}\n}\n","// Extraction IS validation: a `.gh` with no valid \"Schema\" output, or an\n// unreachable compute server, throws here — which is what makes this the upload\n// gate as well as the render path's fallback for un-cached or stale versions.\n\nimport {\n\tnormalizeUISchemaCasing,\n\treadSchemaResults as readWrapper,\n\ttype SchemaEndpointResult\n} from '@selvajs/compute/grasshopper';\nimport { UI_SCHEMA_VERSION, type UISchema } from '@selvajs/schemas';\nimport type { ComputeServerConfig } from '@selvajs/platform';\n\n/** One entry of the compute schema endpoint's response, typed to our `UISchema`. */\nexport type SchemaExtractionResult = SchemaEndpointResult<UISchema>;\n\n/** Thin re-export of @selvajs/compute's unwrap, typed to `UISchema`. */\nexport function readSchemaResults(raw: unknown): SchemaExtractionResult[] {\n\treturn readWrapper<UISchema>(raw);\n}\n\n/** Thrown when compute is reachable but the definition yields no usable schema. */\nexport class SchemaExtractionError extends Error {\n\tconstructor(\n\t\tpublic readonly kind: 'unreachable' | 'invalid' | 'unsupported' | 'malformed',\n\t\tmessage: string\n\t) {\n\t\tsuper(message);\n\t\tthis.name = 'SchemaExtractionError';\n\t}\n}\n\n/**\n * Rejects a schema whose keys are not camelCase by the time it reaches a consumer.\n *\n * Compute serializes the plugin's `UISchema` POCO, whose camelCase names live in\n * `[JsonProperty]` attributes. `Selva.gha` ILRepack-merges Newtonsoft, so those\n * attributes have type `Selva!Newtonsoft.Json.JsonPropertyAttribute`; a compute\n * server serializing with its OWN Newtonsoft does not recognize them, reads no\n * attributes, and falls back to raw CLR member names — `Inputs`, `Layout`.\n * Nothing throws on the wire: every consumer just reads `schema.inputs` as\n * undefined and renders a definition with no inputs.\n *\n * `postSchemaFormData` repairs that casing via `normalizeUISchemaCasing`, so a\n * schema fresh off the wire never trips this. It stays because schemas are also\n * PERSISTED: a row cached before the normalizer existed still holds PascalCase,\n * and it reaches consumers without passing through `postSchemaFormData` again.\n * A schema with no `inputs` in any casing lands here too. It is a backstop, not\n * the primary defense — which is why it names the missing key rather than telling\n * the operator to go update their compute server.\n *\n * Checked structurally rather than by plugin version, because the casing depends\n * on which assembly serialized the schema, not on any version number.\n */\nexport function assertCamelCaseSchema(schema: UISchema): void {\n\tconst raw = schema as unknown as Record<string, unknown>;\n\tif (Array.isArray(raw.inputs)) return;\n\n\tconst pascalKeys = ['Inputs', 'Outputs', 'Layout', 'SchemaVersion'].filter((k) => k in raw);\n\tif (pascalKeys.length > 0) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'malformed',\n\t\t\t`Schema keys are PascalCase (found ${pascalKeys.join(', ')}), so every property name ` +\n\t\t\t\t`is wrong and the definition would render with no inputs. Compute serialized it with ` +\n\t\t\t\t`its own Newtonsoft instead of the one merged into Selva.gha. Fresh responses are ` +\n\t\t\t\t`normalized, so this is most likely a schema cached before that fix — re-save the ` +\n\t\t\t\t`definition version to re-extract it.`\n\t\t);\n\t}\n\n\tthrow new SchemaExtractionError(\n\t\t'malformed',\n\t\t`Compute returned a schema with no 'inputs' array (got keys: ${Object.keys(raw)\n\t\t\t.slice(0, 12)\n\t\t\t.join(', ')}).`\n\t);\n}\n\nfunction parseSemver(version: string): [number, number, number] | null {\n\tconst m = /^(\\d+)\\.(\\d+)\\.(\\d+)$/.exec(version);\n\treturn m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;\n}\n\n/**\n * Rejects a schema from a NEWER plugin than this app was built against — its\n * shape may contain constructs the renderer doesn't know. Older (or missing)\n * versions pass: the compute-side C# migrator always emits its own current\n * version, and an older shape only lacks optional additions.\n */\nexport function assertSupportedSchemaVersion(schema: UISchema): void {\n\tconst version = schema.schemaVersion;\n\tif (!version) return; // pre-2.12.0 plugin — older than the app, fine\n\tconst extracted = parseSemver(version);\n\tconst supported = parseSemver(UI_SCHEMA_VERSION);\n\tif (!extracted || !supported) return;\n\tconst newer =\n\t\textracted[0] > supported[0] ||\n\t\t(extracted[0] === supported[0] &&\n\t\t\t(extracted[1] > supported[1] ||\n\t\t\t\t(extracted[1] === supported[1] && extracted[2] > supported[2])));\n\tif (newer) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'unsupported',\n\t\t\t`This definition was authored with a newer Selva plugin (schema format ${version}); ` +\n\t\t\t\t`this server supports schema format ≤ ${UI_SCHEMA_VERSION}. Update the server, or ` +\n\t\t\t\t`re-save the definition with a matching plugin version.`\n\t\t);\n\t}\n}\n\n/**\n * POSTs a multipart form to Rhino Compute's `/grasshopper/schema` endpoint (no\n * solve required). Throws 'unreachable' on a network failure or non-2xx. The\n * per-file `error` Compute reports on its 200-with-no-schemas case is left to\n * the caller — single-file and multi-file callers want different messages.\n */\nexport async function postSchemaFormData(\n\tformData: FormData,\n\tserver: ComputeServerConfig\n): Promise<SchemaExtractionResult[]> {\n\tconst schemaUrl = new URL('/grasshopper/schema', server.serverUrl).toString();\n\n\tconst headers: Record<string, string> = {};\n\tif (server.apiKey) {\n\t\theaders['RhinoComputeKey'] = server.apiKey;\n\t}\n\n\tlet response: Response;\n\ttry {\n\t\tresponse = await fetch(schemaUrl, { method: 'POST', headers, body: formData });\n\t} catch (err) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'unreachable',\n\t\t\t`Compute server is unreachable: ${err instanceof Error ? err.message : String(err)}`\n\t\t);\n\t}\n\n\tif (!response.ok) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'unreachable',\n\t\t\t`Schema endpoint returned ${response.status}: ${response.statusText}`\n\t\t);\n\t}\n\n\t// Normalize here rather than in each caller: the upload/validation route reads\n\t// `postSchemaFormData` directly, so a fix applied only inside\n\t// `fetchSchemaFromCompute` would leave that path serving PascalCase schemas.\n\tconst results = readSchemaResults(await response.json());\n\treturn results.map((result) => ({\n\t\t...result,\n\t\tschemas: result.schemas?.map((schema) => normalizeUISchemaCasing(schema))\n\t}));\n}\n\n/**\n * Throws `SchemaExtractionError` so callers can map to the right HTTP status:\n * 503 unreachable / 422 invalid or unsupported.\n */\nexport async function fetchSchemaFromCompute(\n\tdefinitionBytes: Uint8Array,\n\tserver: ComputeServerConfig\n): Promise<UISchema> {\n\tconst formData = new FormData();\n\tconst blob = new Blob([new Uint8Array(definitionBytes)], { type: 'application/octet-stream' });\n\tformData.append('file', blob, 'definition.gh');\n\n\tconst results = await postSchemaFormData(formData, server);\n\tconst schemas = results.flatMap((r) => r.schemas ?? []);\n\n\tif (schemas.length === 0) {\n\t\t// Compute answers 200 while reporting a per-file `error`, so the\n\t\t// !response.ok guard never fires for it. Surface that message verbatim: it\n\t\t// names the actual cause (bad Schema source, no embedded schema, ...),\n\t\t// which the generic fallback below cannot.\n\t\tconst diagnosis = results.map((r) => r.error).filter(Boolean);\n\t\tif (diagnosis.length > 0) {\n\t\t\tthrow new SchemaExtractionError('invalid', diagnosis.join('\\n'));\n\t\t}\n\n\t\tthrow new SchemaExtractionError(\n\t\t\t'invalid',\n\t\t\t'No schemas found in definition.\\n\\n' +\n\t\t\t\t'In Grasshopper, verify a Context Bake component with the output name \"Schema\" is present and wired to the solver.'\n\t\t);\n\t}\n\n\tassertSupportedSchemaVersion(schemas[0]);\n\tassertCamelCaseSchema(schemas[0]);\n\treturn schemas[0];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAeA,IAAa,iCAAb,cAAoD,MAAM;CACzD,YACC,UAAU,4EACT;EACD,MAAM,OAAO;EACb,KAAK,OAAO;CACb;AACD;;;ACNA,SAA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":["../../../../server/src/compute/errors.ts","../../../../server/src/definitions/saved-values.ts","../../../../server/src/definitions/with-timeout.ts","../../../../server/src/definitions/schema-extraction.ts"],"sourcesContent":["/**\n * Compute error types, kept in a leaf module with no imports.\n *\n * Separate from the function that throws them on purpose: an error mapper needs\n * nothing but the class to `instanceof` against, and importing it from beside\n * the throw site drags that module's dependencies into every mapper. Anything\n * an error mapper imports belongs here.\n */\n\n/**\n * Thrown when no compute server is configured or visible for the org — a\n * misconfiguration an operator must fix in `/admin/compute`, not a bug. Routes\n * map this to 503 instead of letting the pure helper's plain `Error` surface as\n * a generic 500.\n */\nexport class ComputeServerUnconfiguredError extends Error {\n\tconstructor(\n\t\tmessage = 'No compute server configured. Ask an admin to add one in /admin/compute.'\n\t) {\n\t\tsuper(message);\n\t\tthis.name = 'ComputeServerUnconfiguredError';\n\t}\n}\n","// The embedded schema carries input values from the author's last schema sync. Compute's `/io`\n// reads the values saved in the file, which can be newer, and those are what a form must start\n// from. A version's bytes never change, so neither do its saved values.\n\nimport type { UISchema } from '@selvajs/schemas';\n\n/** Each input's saved value, keyed by param id. */\nexport type SavedValues = ReadonlyMap<string, unknown>;\n\nexport function savedValuesFrom(\n\tinputs: ReadonlyArray<{ id?: string; paramType?: string; default?: unknown }>\n): SavedValues {\n\tconst values = new Map<string, unknown>();\n\tfor (const input of inputs) {\n\t\tif (input.id === undefined || input.default === undefined) continue;\n\t\tvalues.set(input.id, input.paramType === 'Color' ? colorToHex(input.default) : input.default);\n\t}\n\treturn values;\n}\n\n/** `schema` with each input's `default` replaced by its saved value, where it has one. */\nexport function applySavedValues(schema: UISchema, values: SavedValues): UISchema {\n\treturn {\n\t\t...schema,\n\t\tinputs: schema.inputs.map((input) =>\n\t\t\tvalues.has(input.id) ? { ...input, default: values.get(input.id) } : input\n\t\t)\n\t};\n}\n\n// Compute sends colors as \"r,g,b\" or \"a,r,g,b\"; the color picker takes hex.\nfunction colorToHex(value: unknown): unknown {\n\tconst parts = String(value)\n\t\t.split(',')\n\t\t.map((s) => parseInt(s.trim(), 10));\n\tconst hex = (n: number) => n.toString(16).padStart(2, '0');\n\tif (parts.length === 3) return `#${hex(parts[0])}${hex(parts[1])}${hex(parts[2])}`;\n\tif (parts.length === 4) return `#${hex(parts[1])}${hex(parts[2])}${hex(parts[3])}`;\n\treturn value;\n}\n","/**\n * Settles with `work`, or rejects with `onTimeout()` after `ms`. `work` is not cancelled: it runs\n * on, and its later rejection stays handled.\n */\nexport function withTimeout<T>(work: Promise<T>, ms: number, onTimeout: () => Error): Promise<T> {\n\tlet timer: ReturnType<typeof setTimeout> | undefined;\n\tconst timeout = new Promise<never>((_, reject) => {\n\t\ttimer = setTimeout(() => reject(onTimeout()), ms);\n\t});\n\treturn Promise.race([work, timeout]).finally(() => clearTimeout(timer));\n}\n","// Extraction IS validation: a `.gh` with no valid \"Schema\" output, or an\n// unreachable compute server, throws here — which is what makes this the upload\n// gate as well as the render path's fallback for un-cached or stale versions.\n\nimport {\n\tfetchParsedDefinitionIO,\n\tnormalizeUISchemaCasing,\n\treadSchemaResults as readWrapper,\n\ttype SchemaEndpointResult\n} from '@selvajs/compute/grasshopper';\nimport {\n\tUI_SCHEMA_VERSION,\n\ttype DocumentInventory,\n\ttype ScriptSource,\n\ttype UISchema\n} from '@selvajs/schemas';\nimport type { ComputeServerConfig } from '@selvajs/platform';\nimport { applySavedValues, savedValuesFrom } from './saved-values.js';\nimport { withTimeout } from './with-timeout.js';\n\n/** One entry of the compute schema endpoint's response, typed to our `UISchema`. */\nexport type SchemaExtractionResult = SchemaEndpointResult<UISchema>;\n\n/** Thin re-export of @selvajs/compute's unwrap, typed to `UISchema`. */\nexport function readSchemaResults(raw: unknown): SchemaExtractionResult[] {\n\treturn readWrapper<UISchema>(raw);\n}\n\n/** Thrown when compute is reachable but the definition yields no usable schema. */\nexport class SchemaExtractionError extends Error {\n\tconstructor(\n\t\tpublic readonly kind: 'unreachable' | 'invalid' | 'unsupported' | 'malformed',\n\t\tmessage: string\n\t) {\n\t\tsuper(message);\n\t\tthis.name = 'SchemaExtractionError';\n\t}\n}\n\n/**\n * Rejects a schema whose keys are not camelCase by the time it reaches a consumer.\n *\n * Compute serializes the plugin's `UISchema` POCO, whose camelCase names live in\n * `[JsonProperty]` attributes. `Selva.gha` ILRepack-merges Newtonsoft, so those\n * attributes have type `Selva!Newtonsoft.Json.JsonPropertyAttribute`; a compute\n * server serializing with its OWN Newtonsoft does not recognize them, reads no\n * attributes, and falls back to raw CLR member names — `Inputs`, `Layout`.\n * Nothing throws on the wire: every consumer just reads `schema.inputs` as\n * undefined and renders a definition with no inputs.\n *\n * `postSchemaFormData` repairs that casing via `normalizeUISchemaCasing`, so a\n * schema fresh off the wire never trips this. It stays because schemas are also\n * PERSISTED: a row cached before the normalizer existed still holds PascalCase,\n * and it reaches consumers without passing through `postSchemaFormData` again.\n * A schema with no `inputs` in any casing lands here too. It is a backstop, not\n * the primary defense — which is why it names the missing key rather than telling\n * the operator to go update their compute server.\n *\n * Checked structurally rather than by plugin version, because the casing depends\n * on which assembly serialized the schema, not on any version number.\n */\nexport function assertCamelCaseSchema(schema: UISchema): void {\n\tconst raw = schema as unknown as Record<string, unknown>;\n\tif (Array.isArray(raw.inputs)) return;\n\n\tconst pascalKeys = ['Inputs', 'Outputs', 'Layout', 'SchemaVersion'].filter((k) => k in raw);\n\tif (pascalKeys.length > 0) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'malformed',\n\t\t\t`Schema keys are PascalCase (found ${pascalKeys.join(', ')}), so every property name ` +\n\t\t\t\t`is wrong and the definition would render with no inputs. Compute serialized it with ` +\n\t\t\t\t`its own Newtonsoft instead of the one merged into Selva.gha. Fresh responses are ` +\n\t\t\t\t`normalized, so this is most likely a schema cached before that fix — re-save the ` +\n\t\t\t\t`definition version to re-extract it.`\n\t\t);\n\t}\n\n\tthrow new SchemaExtractionError(\n\t\t'malformed',\n\t\t`Compute returned a schema with no 'inputs' array (got keys: ${Object.keys(raw)\n\t\t\t.slice(0, 12)\n\t\t\t.join(', ')}).`\n\t);\n}\n\nfunction parseSemver(version: string): [number, number, number] | null {\n\tconst m = /^(\\d+)\\.(\\d+)\\.(\\d+)$/.exec(version);\n\treturn m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;\n}\n\n/**\n * Orders a schema format version against the app's `UI_SCHEMA_VERSION`: -1 older, 0 current,\n * 1 newer, null unparseable. A missing version is older: plugins before 2.12.0 emitted none.\n */\nexport function compareSchemaVersion(version: string | undefined): -1 | 0 | 1 | null {\n\tif (!version) return -1;\n\tconst extracted = parseSemver(version);\n\tconst supported = parseSemver(UI_SCHEMA_VERSION);\n\tif (!extracted || !supported) return null;\n\tfor (let i = 0; i < 3; i++) {\n\t\tif (extracted[i] !== supported[i]) return extracted[i] < supported[i] ? -1 : 1;\n\t}\n\treturn 0;\n}\n\n/**\n * Rejects a schema from a NEWER plugin than this app was built against — its\n * shape may contain constructs the renderer doesn't know. Older (or missing)\n * versions pass: the compute-side C# migrator always emits its own current\n * version, and an older shape only lacks optional additions.\n */\nexport function assertSupportedSchemaVersion(schema: UISchema): void {\n\tif (compareSchemaVersion(schema.schemaVersion) === 1) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'unsupported',\n\t\t\t`This definition was authored with a newer Selva plugin (schema format ${schema.schemaVersion}); ` +\n\t\t\t\t`this server supports schema format ≤ ${UI_SCHEMA_VERSION}. Update the server, or ` +\n\t\t\t\t`re-save the definition with a matching plugin version.`\n\t\t);\n\t}\n}\n\n/**\n * POSTs a multipart form to Rhino Compute's `/grasshopper/schema` endpoint (no\n * solve required). Throws 'unreachable' on a network failure or non-2xx. The\n * per-file `error` Compute reports on its 200-with-no-schemas case is left to\n * the caller — single-file and multi-file callers want different messages.\n */\nexport async function postSchemaFormData(\n\tformData: FormData,\n\tserver: ComputeServerConfig\n): Promise<SchemaExtractionResult[]> {\n\tconst schemaUrl = new URL('/grasshopper/schema', server.serverUrl).toString();\n\n\tconst headers: Record<string, string> = {};\n\tif (server.apiKey) {\n\t\theaders['RhinoComputeKey'] = server.apiKey;\n\t}\n\n\tlet response: Response;\n\ttry {\n\t\tresponse = await fetch(schemaUrl, { method: 'POST', headers, body: formData });\n\t} catch (err) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'unreachable',\n\t\t\t`Compute server is unreachable: ${err instanceof Error ? err.message : String(err)}`\n\t\t);\n\t}\n\n\tif (!response.ok) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'unreachable',\n\t\t\t`Schema endpoint returned ${response.status}: ${response.statusText}`\n\t\t);\n\t}\n\n\t// Normalize here rather than in each caller: the upload/validation route reads\n\t// `postSchemaFormData` directly, so a fix applied only inside\n\t// `fetchSchemaFromCompute` would leave that path serving PascalCase schemas.\n\tconst results = readSchemaResults(await response.json());\n\treturn results.map((result) => ({\n\t\t...result,\n\t\tschemas: result.schemas?.map((schema) => normalizeUISchemaCasing(schema))\n\t}));\n}\n\n/**\n * Throws `SchemaExtractionError` so callers can map to the right HTTP status:\n * 503 unreachable / 422 invalid or unsupported.\n */\nexport async function fetchSchemaFromCompute(\n\tdefinitionBytes: Uint8Array,\n\tserver: ComputeServerConfig\n): Promise<UISchema> {\n\treturn (await fetchExtraction(definitionBytes, server)).schema;\n}\n\n/** A file's schema and, from a plugin that builds one, its inventory. */\nexport interface Extraction {\n\tschema: UISchema;\n\tinventory: DocumentInventory | null;\n}\n\n/** `fetchSchemaFromCompute` with the inventory Compute returns beside the schema. */\nexport async function fetchExtraction(\n\tdefinitionBytes: Uint8Array,\n\tserver: ComputeServerConfig\n): Promise<Extraction> {\n\tconst formData = new FormData();\n\tconst blob = new Blob([new Uint8Array(definitionBytes)], { type: 'application/octet-stream' });\n\tformData.append('file', blob, 'definition.gh');\n\n\tconst results = await postSchemaFormData(formData, server);\n\tconst schemas = results.flatMap((r) => r.schemas ?? []);\n\n\tif (schemas.length === 0) {\n\t\t// Compute answers 200 while reporting a per-file `error`, so the\n\t\t// !response.ok guard never fires for it. Surface that message verbatim: it\n\t\t// names the actual cause (bad Schema source, no embedded schema, ...),\n\t\t// which the generic fallback below cannot.\n\t\tconst diagnosis = results.map((r) => r.error).filter(Boolean);\n\t\tif (diagnosis.length > 0) {\n\t\t\tthrow new SchemaExtractionError('invalid', diagnosis.join('\\n'));\n\t\t}\n\n\t\tthrow new SchemaExtractionError(\n\t\t\t'invalid',\n\t\t\t'No schemas found in definition.\\n\\n' +\n\t\t\t\t'In Grasshopper, verify a Context Bake component with the output name \"Schema\" is present and wired to the solver.'\n\t\t);\n\t}\n\n\tassertSupportedSchemaVersion(schemas[0]);\n\tassertCamelCaseSchema(schemas[0]);\n\tconst inventory = results.find((r) => r.schemas?.length)?.inventory;\n\treturn { schema: schemas[0], inventory: isInventory(inventory) ? inventory : null };\n}\n\n// Shape check only: the plugin built it from the same wire schema. A malformed one is dropped, not\n// fatal, because the schema alone still gates the upload.\nfunction isInventory(value: unknown): value is DocumentInventory {\n\tconst v = value as Partial<DocumentInventory> | null;\n\treturn (\n\t\t!!v &&\n\t\ttypeof v === 'object' &&\n\t\tArray.isArray(v.libraries) &&\n\t\tArray.isArray(v.components) &&\n\t\tArray.isArray(v.values) &&\n\t\tArray.isArray(v.scripts) &&\n\t\ttypeof v.wires?.count === 'number'\n\t);\n}\n\n/**\n * How long an upload waits for the saved values once the schema is in. Missing them costs only\n * the first render its defaults: the render path reads them behind that render.\n */\nconst SAVED_VALUES_GRACE_MS = 5_000;\n\n// Bounds the `/io` request itself, which outlives an upload that stopped waiting for it.\nconst SAVED_VALUES_TIMEOUT_MS = 120_000;\n\n/**\n * `fetchSchemaFromCompute` with the values saved in the file as input defaults, so the stored\n * schema renders without asking Compute again. The values are read beside the schema,\n * best-effort: only the schema gates the upload.\n */\nexport async function extractSchemaForUpload(\n\tdefinitionBytes: Uint8Array,\n\tserver: ComputeServerConfig\n): Promise<Extraction> {\n\tconst values = fetchParsedDefinitionIO(definitionBytes, {\n\t\tserverUrl: server.serverUrl,\n\t\t...(server.apiKey && { apiKey: server.apiKey }),\n\t\ttimeoutMs: SAVED_VALUES_TIMEOUT_MS\n\t}).then((io) => savedValuesFrom(io.inputs));\n\tvalues.catch(() => {});\n\n\tconst { schema, inventory } = await fetchExtraction(definitionBytes, server);\n\tconst saved = await withTimeout(\n\t\tvalues,\n\t\tSAVED_VALUES_GRACE_MS,\n\t\t() => new Error('saved values not read in time')\n\t).catch(() => null);\n\treturn { schema: saved ? applySavedValues(schema, saved) : schema, inventory };\n}\n\n/**\n * The source of the named script components, read by Compute from a stored file. The inventory\n * keeps fingerprints only, so this is how a code diff gets the code. Throws 'unsupported' when the\n * server's plugin cannot read scripts.\n */\nexport async function fetchScriptSources(\n\tdefinitionBytes: Uint8Array,\n\tids: readonly string[],\n\tserver: ComputeServerConfig\n): Promise<ScriptSource[]> {\n\tconst form = new FormData();\n\tform.append('file', new Blob([new Uint8Array(definitionBytes)]), 'definition.gh');\n\tform.append('ids', ids.join(','));\n\tconst headers: Record<string, string> = {};\n\tif (server.apiKey) headers['RhinoComputeKey'] = server.apiKey;\n\n\tlet response: Response;\n\ttry {\n\t\tresponse = await fetch(new URL('/grasshopper/scripts', server.serverUrl), {\n\t\t\tmethod: 'POST',\n\t\t\theaders,\n\t\t\tbody: form\n\t\t});\n\t} catch (err) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'unreachable',\n\t\t\t`Compute server is unreachable: ${err instanceof Error ? err.message : String(err)}`\n\t\t);\n\t}\n\t// A server without the endpoint answers 404; one whose plugin predates it, 422.\n\tif (response.status === 404 || response.status === 422) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'unsupported',\n\t\t\t'This Compute server cannot read script source. Update the server and its Selva plugin.'\n\t\t);\n\t}\n\tif (!response.ok) {\n\t\tthrow new SchemaExtractionError(\n\t\t\t'unreachable',\n\t\t\t`Scripts endpoint returned ${response.status}: ${response.statusText}`\n\t\t);\n\t}\n\tconst body = (await response.json()) as ScriptSource[];\n\treturn Array.isArray(body) ? body : [];\n}\n"],"mappings":";;;;;;;;;;;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,OAAO,OAAO,IAAI,KAAK,GAAG,CAAC;CAChC,MAAM,UAAkC,CAAC;CACzC,IAAI,OAAO,QAAQ,QAAQ,qBAAqB,OAAO;CAEvD,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,MAAM,IAAI,IAAI,wBAAwB,OAAO,SAAS,GAAG;GACzE,QAAQ;GACR;GACA,MAAM;EACP,CAAC;CACF,SAAS,KAAK;EACb,MAAM,IAAI,sBACT,eACA,kCAAkC,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,GAClF;CACD;CAEA,IAAI,SAAS,WAAW,OAAO,SAAS,WAAW,KAClD,MAAM,IAAI,sBACT,eACA,wFACD;CAED,IAAI,CAAC,SAAS,IACb,MAAM,IAAI,sBACT,eACA,6BAA6B,SAAS,OAAO,IAAI,SAAS,YAC3D;CAED,MAAM,OAAQ,MAAM,SAAS,KAAK;CAClC,OAAO,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC;AACtC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ../schemas/src/generated/schema.ts
|
|
2
2
|
/** Current UISchema format version (from ui-schema.json's schemaVersion default). */
|
|
3
|
-
var UI_SCHEMA_VERSION = "2.
|
|
3
|
+
var UI_SCHEMA_VERSION = "2.20.0";
|
|
4
4
|
function isNumberWidget(item) {
|
|
5
5
|
return item.type === "input" && item.widgetType === "number";
|
|
6
6
|
}
|