@volvel/docs 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +21 -3
- package/assets/screenshots/administer/access-changes.dark.5bf247ce0f19.png +0 -0
- package/assets/screenshots/administer/access-changes.light.ed91948531ce.png +0 -0
- package/assets/screenshots/administer/access-end-users.dark.4d9a5acba896.png +0 -0
- package/assets/screenshots/administer/access-end-users.light.cef020771af1.png +0 -0
- package/assets/screenshots/administer/access-groups.dark.aaf84e089c11.png +0 -0
- package/assets/screenshots/administer/sso-audit-filters.dark.9aa82a2ac9c5.png +0 -0
- package/assets/screenshots/administer/sso-audit-filters.light.5ecfdb651ace.png +0 -0
- package/assets/screenshots/administer/{sso-branding-theme.dark.80bc3ce901a4.png → sso-branding-theme.dark.9a2c0482b3c2.png} +0 -0
- package/assets/screenshots/administer/{sso-branding-theme.light.f48bd968481c.png → sso-branding-theme.light.7be432359625.png} +0 -0
- package/assets/screenshots/administer/{sso-provider-setup.dark.8834ae797a50.png → sso-provider-setup.dark.bc7d126f135d.png} +0 -0
- package/assets/screenshots/administer/sso-provider-setup.light.0cbda9279747.png +0 -0
- package/assets/screenshots/administer/sso-workers-pools.dark.43f043620615.png +0 -0
- package/assets/screenshots/administer/sso-workers-pools.light.25b0e09b2ff0.png +0 -0
- package/assets/screenshots/console/account-sessions.dark.05dbf87d40a9.png +0 -0
- package/assets/screenshots/console/account-sessions.light.2ef44c907ee5.png +0 -0
- package/{dist/assets/screenshots/console/app-builder-list.dark.48340ac81e11.png → assets/screenshots/console/app-builder-list.dark.124cca05b904.png} +0 -0
- package/{dist/assets/screenshots/console/app-builder-list.light.85064d6742d4.png → assets/screenshots/console/app-builder-list.light.082ae0464cbe.png} +0 -0
- package/{dist/assets/screenshots/console/apps-list.dark.6580be4c6f17.png → assets/screenshots/console/apps-list.dark.b24bb8a4fe8f.png} +0 -0
- package/{dist/assets/screenshots/console/apps-list.light.35ac9711c9a0.png → assets/screenshots/console/apps-list.light.fa8996fe55ff.png} +0 -0
- package/assets/screenshots/console/{apps-share.dark.cf87c470cec4.png → apps-share.dark.0bb1a7899419.png} +0 -0
- package/{dist/assets/screenshots/console/apps-share.light.eddc9c058c37.png → assets/screenshots/console/apps-share.light.f26f075b3680.png} +0 -0
- package/assets/screenshots/console/{basics-workspace-overview.dark.75d4329d6bd9.png → basics-workspace-overview.dark.678c40fa9f2a.png} +0 -0
- package/assets/screenshots/console/{basics-workspace-overview.light.0a097241dfcb.png → basics-workspace-overview.light.86f7922860c9.png} +0 -0
- package/assets/screenshots/console/configure-alerts-default.dark.8a2c534aa415.png +0 -0
- package/{dist/assets/screenshots/console/configure-alerts.dark.3e4b58238bd2.png → assets/screenshots/console/configure-alerts.dark.314fe8d7e0c6.png} +0 -0
- package/{dist/assets/screenshots/console/configure-alerts.light.24608f63f849.png → assets/screenshots/console/configure-alerts.light.ff5022a76eca.png} +0 -0
- package/assets/screenshots/console/{configure-connection-sheet.dark.a8ae26d592fb.png → configure-connection-sheet.dark.41ba4383632c.png} +0 -0
- package/assets/screenshots/console/configure-connections.dark.52147265a170.png +0 -0
- package/assets/screenshots/console/{configure-connections.light.c3c1ec8eca52.png → configure-connections.light.8b15826634f1.png} +0 -0
- package/{dist/assets/screenshots/console/dashboard-resource.dark.532f219609cc.png → assets/screenshots/console/dashboard-resource.dark.4188f2810be1.png} +0 -0
- package/assets/screenshots/console/dashboard-resource.light.8211fe9f380e.png +0 -0
- package/{dist/assets/screenshots/console/dashboards-list.light.bb704dd75a30.png → assets/screenshots/console/dashboards-list.light.438e3d23c888.png} +0 -0
- package/assets/screenshots/console/extensions-editor.dark.4e5246f282e2.png +0 -0
- package/{dist/assets/screenshots/console/extensions-list.light.f65bb930d029.png → assets/screenshots/console/extensions-list.light.a1703d257ceb.png} +0 -0
- package/assets/screenshots/console/flow-editor.dark.00229a94001e.png +0 -0
- package/assets/screenshots/console/flow-editor.light.5eb68a339e84.png +0 -0
- package/assets/screenshots/console/operate-approvals.light.1501cede2f94.png +0 -0
- package/assets/screenshots/console/operate-cancel-by-age.dark.419042b822db.png +0 -0
- package/assets/screenshots/console/operate-cancel-by-age.light.7d48915e9922.png +0 -0
- package/assets/screenshots/console/operate-events.dark.2589975f7f46.png +0 -0
- package/assets/screenshots/console/operate-events.light.c4d8d8ae8748.png +0 -0
- package/assets/screenshots/console/operate-run-failed.dark.09addb030b58.png +0 -0
- package/assets/screenshots/console/{operate-run-failed.light.482db87101aa.png → operate-run-failed.light.6163d2f9d3b3.png} +0 -0
- package/assets/screenshots/console/operate-runs.dark.3bf1250f1f59.png +0 -0
- package/assets/screenshots/console/{operate-runs.light.bccafcd93196.png → operate-runs.light.235f6baf6f3d.png} +0 -0
- package/assets/screenshots/console/page-editor.light.3ec1f9d43475.png +0 -0
- package/assets/screenshots/console/queries-editor.dark.ee99f9050a23.png +0 -0
- package/assets/screenshots/console/queries-editor.light.67bd22086115.png +0 -0
- package/assets/screenshots/console/queries-parameters.light.c471d505bbd1.png +0 -0
- package/assets/screenshots/console/{releases-review.dark.34ec540432dc.png → releases-review.dark.091d815aa9c9.png} +0 -0
- package/{dist/assets/screenshots/console/releases-review.light.7f7eea72fc90.png → assets/screenshots/console/releases-review.light.a440c30d08b2.png} +0 -0
- package/{dist/assets/screenshots/console/script-settings-tab.dark.976df3a2aaf0.png → assets/screenshots/console/script-settings-tab.dark.5e96eedd9889.png} +0 -0
- package/assets/screenshots/console/{scripts-test-pane.dark.6112678956ed.png → scripts-test-pane.dark.63dcff509936.png} +0 -0
- package/assets/screenshots/console/{scripts-test-pane.light.2e1b637a8c7a.png → scripts-test-pane.light.bcef48f905b0.png} +0 -0
- package/assets/screenshots/console/table-definition.light.b97883e1b6e0.png +0 -0
- package/assets/screenshots/console/table-help.dark.da3a47215e6b.png +0 -0
- package/assets/screenshots/console/table-help.light.07c67e63ef2e.png +0 -0
- package/assets/screenshots/console/table-rows-filtered.dark.c61524c872a5.png +0 -0
- package/assets/screenshots/console/table-rows-filtered.light.787e71f743dd.png +0 -0
- package/assets/screenshots/console/table-rows.dark.19e2afeb688e.png +0 -0
- package/assets/screenshots/console/table-rows.light.a9249d7b9bd5.png +0 -0
- package/assets/screenshots/console/tut-visit-mix.dark.f1dd71da8937.png +0 -0
- package/{dist/assets/screenshots/console/widgets-chart-scatter.light.e57e41675d8d.png → assets/screenshots/console/widgets-chart-scatter.light.85ea38faaed8.png} +0 -0
- package/assets/screenshots/console/widgets-phone-page.dark.360a39e459c7.png +0 -0
- package/{dist/assets/screenshots/console/workspace-settings.light.3ac3bbfd9f4e.png → assets/screenshots/console/workspace-settings.light.c56e7f5d80f8.png} +0 -0
- package/assets/screenshots/docs/draft-conflict.dark.597b616abec7.png +0 -0
- package/assets/screenshots/docs/draft-conflict.light.6d326a37e8bc.png +0 -0
- package/assets/screenshots/docs/page-details-type.dark.2e382c8f131e.png +0 -0
- package/assets/screenshots/index.json +94 -94
- package/assets/screenshots/self-host/extensions-component-kit.dark.ba673f636a8f.png +0 -0
- package/assets/screenshots/self-host/extensions-component-kit.light.282da6a4c589.png +0 -0
- package/assets/screenshots/self-host/instance-audit.dark.21de79247590.png +0 -0
- package/assets/screenshots/self-host/instance-audit.light.dba4eaa712ed.png +0 -0
- package/assets/screenshots/self-host/instance-branding.dark.0ddd4c2df652.png +0 -0
- package/assets/screenshots/self-host/instance-branding.light.c3b7ffef6d4e.png +0 -0
- package/assets/screenshots/self-host/instance-databases.dark.dd2403f84456.png +0 -0
- package/assets/screenshots/self-host/instance-databases.light.3248546636cf.png +0 -0
- package/assets/screenshots/self-host/instance-health.dark.5791805f72b7.png +0 -0
- package/assets/screenshots/self-host/instance-health.light.cbfad910fc8e.png +0 -0
- package/assets/screenshots/self-host/instance-import-check.dark.11ccf001d9f8.png +0 -0
- package/assets/screenshots/self-host/instance-import-check.light.efbbef163d80.png +0 -0
- package/assets/screenshots/self-host/instance-members.dark.d9fa55d364fd.png +0 -0
- package/assets/screenshots/self-host/instance-members.light.7af6bfa48914.png +0 -0
- package/assets/screenshots/self-host/instance-operators.dark.1326e9460224.png +0 -0
- package/assets/screenshots/self-host/instance-operators.light.3f2cac001fb5.png +0 -0
- package/assets/screenshots/self-host/instance-tenants.dark.ba860dc98c90.png +0 -0
- package/assets/screenshots/self-host/instance-tenants.light.6a63877c41b3.png +0 -0
- package/assets/screenshots/self-host/instance-triggers.dark.f2bba07895f2.png +0 -0
- package/assets/screenshots/self-host/instance-triggers.light.dddb827e214a.png +0 -0
- package/assets/screenshots/start/basics-finding-your-way.dark.5cc80a2d591f.png +0 -0
- package/assets/screenshots/start/basics-finding-your-way.light.dddf72e4ad38.png +0 -0
- package/assets/screenshots/start/tut-approve-step.dark.5b773354ba35.png +0 -0
- package/assets/screenshots/start/tut-approve-step.light.b0224c9b1133.png +0 -0
- package/assets/screenshots/start/visit-notes-filtered.dark.f6fb7a707e2f.png +0 -0
- package/assets/screenshots/start/visit-notes-filtered.light.a4b4d64a7fc2.png +0 -0
- package/content/administer/explanation/sso/how-single-sign-on-works.md +2 -0
- package/content/administer/how-to/access/invite-end-users.md +8 -0
- package/content/administer/how-to/access/rule-rows-by-group-or-attribute.md +7 -0
- package/content/administer/how-to/apps/give-an-app-a-hostname.md +1 -1
- package/content/administer/how-to/sso/provision-people-with-scim.md +1 -1
- package/content/administer/reference/screens/branding.md +1 -1
- package/content/administer/reference/screens/end-users.md +3 -1
- package/content/administer/reference/screens/overview.md +21 -0
- package/content/administer/reference/screens/retention.md +3 -2
- package/content/administer/reference/screens/single-sign-on.md +1 -1
- package/content/console/how-to/app-builder/publish-an-app.md +0 -1
- package/content/console/how-to/data/row-rules.md +1 -0
- package/content/console/reference/screens/build/published-apps.md +1 -2
- package/content/console/reference/screens/data/tables.md +1 -1
- package/content/console/reference/screens/home/tenants.md +1 -1
- package/content/develop/explanation/api/how-the-api-knows-who-is-calling.md +10 -3
- package/content/develop/explanation/apps/app-access.md +29 -10
- package/content/develop/explanation/scripts/how-scripts-run.md +1 -1
- package/content/develop/how-to/apps/write-an-app.md +1 -1
- package/content/develop/how-to/cli/install-from-source.md +1 -1
- package/content/develop/how-to/cli/install-the-cli.md +1 -1
- package/content/develop/how-to/cli/test-a-script.md +1 -1
- package/content/develop/how-to/configure/set-up-from-a-script.md +1 -1
- package/content/develop/reference/access/mcp.md +11 -1
- package/content/develop/reference/apps/app-client.md +10 -8
- package/content/develop/reference/apps/content-policy.md +8 -3
- package/content/develop/reference/queries/data-as-code.md +12 -0
- package/content/develop/reference/tenant-widgets/what-a-view-is-given.md +1 -1
- package/content/develop/tutorials/cli/quickstart.md +1 -1
- package/content/self-host/explanation/access/index.md +1 -0
- package/content/self-host/explanation/access/instance-service-accounts.md +66 -0
- package/content/self-host/explanation/access/who-runs-what.md +2 -0
- package/content/self-host/explanation/running/architecture.md +1 -1
- package/content/self-host/explanation/running/egress-and-offline.md +1 -1
- package/content/self-host/explanation/running/managed-workers-and-isolation.md +35 -8
- package/content/self-host/explanation/running/security-hardening.md +9 -8
- package/content/self-host/explanation/running/sizing-and-scaling.md +29 -0
- package/content/self-host/how-to/instance/moving-a-tenant.md +12 -0
- package/content/self-host/how-to/running/back-up-an-instance.md +1 -1
- package/content/self-host/how-to/running/build-the-image.md +1 -1
- package/content/self-host/how-to/running/install-on-fly.md +27 -10
- package/content/self-host/how-to/running/install-with-compose.md +4 -4
- package/content/self-host/how-to/running/monitor-an-instance.md +2 -0
- package/content/self-host/how-to/running/put-a-proxy-in-front.md +7 -8
- package/content/self-host/how-to/running/restore-an-instance.md +34 -5
- package/content/self-host/how-to/running/run-a-standalone-worker.md +2 -2
- package/content/self-host/how-to/running/set-up-mail.md +13 -6
- package/content/self-host/reference/console/health.md +21 -1
- package/content/self-host/reference/running/configuration.md +1 -1
- package/content/self-host/reference/running/requirements.md +9 -2
- package/content/self-host/reference/running/retention.md +2 -1
- package/content/self-host/reference/running/troubleshooting.md +6 -1
- package/content/self-host/reference/running/versions-and-support.md +9 -1
- package/content/self-host/tutorials/install-on-one-machine.md +1 -1
- package/content/start/how-to/example/set-up-the-fernhill-example.md +26 -3
- package/content/start/index.md +11 -1
- package/content/start/reference/accessibility.md +35 -0
- package/content/start/reference/index.md +1 -0
- package/content/start/tutorials/index.md +6 -1
- package/content/start/tutorials/your-first-script.md +0 -1
- package/content/start/tutorials/your-first-table.md +2 -2
- package/dist/assets/screenshots/administer/access-changes.dark.5bf247ce0f19.png +0 -0
- package/dist/assets/screenshots/administer/access-changes.light.ed91948531ce.png +0 -0
- package/dist/assets/screenshots/administer/access-end-users.dark.4d9a5acba896.png +0 -0
- package/dist/assets/screenshots/administer/access-end-users.light.cef020771af1.png +0 -0
- package/dist/assets/screenshots/administer/access-groups.dark.aaf84e089c11.png +0 -0
- package/dist/assets/screenshots/administer/sso-audit-filters.dark.9aa82a2ac9c5.png +0 -0
- package/dist/assets/screenshots/administer/sso-audit-filters.light.5ecfdb651ace.png +0 -0
- package/dist/assets/screenshots/administer/{sso-branding-theme.dark.80bc3ce901a4.png → sso-branding-theme.dark.9a2c0482b3c2.png} +0 -0
- package/dist/assets/screenshots/administer/{sso-branding-theme.light.f48bd968481c.png → sso-branding-theme.light.7be432359625.png} +0 -0
- package/dist/assets/screenshots/administer/{sso-provider-setup.dark.8834ae797a50.png → sso-provider-setup.dark.bc7d126f135d.png} +0 -0
- package/dist/assets/screenshots/administer/sso-provider-setup.light.0cbda9279747.png +0 -0
- package/dist/assets/screenshots/administer/sso-workers-pools.dark.43f043620615.png +0 -0
- package/dist/assets/screenshots/administer/sso-workers-pools.light.25b0e09b2ff0.png +0 -0
- package/dist/assets/screenshots/console/account-sessions.dark.05dbf87d40a9.png +0 -0
- package/dist/assets/screenshots/console/account-sessions.light.2ef44c907ee5.png +0 -0
- package/{assets/screenshots/console/app-builder-list.dark.48340ac81e11.png → dist/assets/screenshots/console/app-builder-list.dark.124cca05b904.png} +0 -0
- package/{assets/screenshots/console/app-builder-list.light.85064d6742d4.png → dist/assets/screenshots/console/app-builder-list.light.082ae0464cbe.png} +0 -0
- package/{assets/screenshots/console/apps-list.dark.6580be4c6f17.png → dist/assets/screenshots/console/apps-list.dark.b24bb8a4fe8f.png} +0 -0
- package/{assets/screenshots/console/apps-list.light.35ac9711c9a0.png → dist/assets/screenshots/console/apps-list.light.fa8996fe55ff.png} +0 -0
- package/dist/assets/screenshots/console/{apps-share.dark.cf87c470cec4.png → apps-share.dark.0bb1a7899419.png} +0 -0
- package/{assets/screenshots/console/apps-share.light.eddc9c058c37.png → dist/assets/screenshots/console/apps-share.light.f26f075b3680.png} +0 -0
- package/dist/assets/screenshots/console/{basics-workspace-overview.dark.75d4329d6bd9.png → basics-workspace-overview.dark.678c40fa9f2a.png} +0 -0
- package/dist/assets/screenshots/console/{basics-workspace-overview.light.0a097241dfcb.png → basics-workspace-overview.light.86f7922860c9.png} +0 -0
- package/dist/assets/screenshots/console/configure-alerts-default.dark.8a2c534aa415.png +0 -0
- package/{assets/screenshots/console/configure-alerts.dark.3e4b58238bd2.png → dist/assets/screenshots/console/configure-alerts.dark.314fe8d7e0c6.png} +0 -0
- package/{assets/screenshots/console/configure-alerts.light.24608f63f849.png → dist/assets/screenshots/console/configure-alerts.light.ff5022a76eca.png} +0 -0
- package/dist/assets/screenshots/console/{configure-connection-sheet.dark.a8ae26d592fb.png → configure-connection-sheet.dark.41ba4383632c.png} +0 -0
- package/dist/assets/screenshots/console/configure-connections.dark.52147265a170.png +0 -0
- package/dist/assets/screenshots/console/{configure-connections.light.c3c1ec8eca52.png → configure-connections.light.8b15826634f1.png} +0 -0
- package/{assets/screenshots/console/dashboard-resource.dark.532f219609cc.png → dist/assets/screenshots/console/dashboard-resource.dark.4188f2810be1.png} +0 -0
- package/dist/assets/screenshots/console/dashboard-resource.light.8211fe9f380e.png +0 -0
- package/{assets/screenshots/console/dashboards-list.light.bb704dd75a30.png → dist/assets/screenshots/console/dashboards-list.light.438e3d23c888.png} +0 -0
- package/dist/assets/screenshots/console/extensions-editor.dark.4e5246f282e2.png +0 -0
- package/{assets/screenshots/console/extensions-list.light.f65bb930d029.png → dist/assets/screenshots/console/extensions-list.light.a1703d257ceb.png} +0 -0
- package/dist/assets/screenshots/console/flow-editor.dark.00229a94001e.png +0 -0
- package/dist/assets/screenshots/console/flow-editor.light.5eb68a339e84.png +0 -0
- package/dist/assets/screenshots/console/operate-approvals.light.1501cede2f94.png +0 -0
- package/dist/assets/screenshots/console/operate-cancel-by-age.dark.419042b822db.png +0 -0
- package/dist/assets/screenshots/console/operate-cancel-by-age.light.7d48915e9922.png +0 -0
- package/dist/assets/screenshots/console/operate-events.dark.2589975f7f46.png +0 -0
- package/dist/assets/screenshots/console/operate-events.light.c4d8d8ae8748.png +0 -0
- package/dist/assets/screenshots/console/operate-run-failed.dark.09addb030b58.png +0 -0
- package/dist/assets/screenshots/console/{operate-run-failed.light.482db87101aa.png → operate-run-failed.light.6163d2f9d3b3.png} +0 -0
- package/dist/assets/screenshots/console/operate-runs.dark.3bf1250f1f59.png +0 -0
- package/dist/assets/screenshots/console/{operate-runs.light.bccafcd93196.png → operate-runs.light.235f6baf6f3d.png} +0 -0
- package/dist/assets/screenshots/console/page-editor.light.3ec1f9d43475.png +0 -0
- package/dist/assets/screenshots/console/queries-editor.dark.ee99f9050a23.png +0 -0
- package/dist/assets/screenshots/console/queries-editor.light.67bd22086115.png +0 -0
- package/dist/assets/screenshots/console/queries-parameters.light.c471d505bbd1.png +0 -0
- package/dist/assets/screenshots/console/{releases-review.dark.34ec540432dc.png → releases-review.dark.091d815aa9c9.png} +0 -0
- package/{assets/screenshots/console/releases-review.light.7f7eea72fc90.png → dist/assets/screenshots/console/releases-review.light.a440c30d08b2.png} +0 -0
- package/{assets/screenshots/console/script-settings-tab.dark.976df3a2aaf0.png → dist/assets/screenshots/console/script-settings-tab.dark.5e96eedd9889.png} +0 -0
- package/dist/assets/screenshots/console/{scripts-test-pane.dark.6112678956ed.png → scripts-test-pane.dark.63dcff509936.png} +0 -0
- package/dist/assets/screenshots/console/{scripts-test-pane.light.2e1b637a8c7a.png → scripts-test-pane.light.bcef48f905b0.png} +0 -0
- package/dist/assets/screenshots/console/table-definition.light.b97883e1b6e0.png +0 -0
- package/dist/assets/screenshots/console/table-help.dark.da3a47215e6b.png +0 -0
- package/dist/assets/screenshots/console/table-help.light.07c67e63ef2e.png +0 -0
- package/dist/assets/screenshots/console/table-rows-filtered.dark.c61524c872a5.png +0 -0
- package/dist/assets/screenshots/console/table-rows-filtered.light.787e71f743dd.png +0 -0
- package/dist/assets/screenshots/console/table-rows.dark.19e2afeb688e.png +0 -0
- package/dist/assets/screenshots/console/table-rows.light.a9249d7b9bd5.png +0 -0
- package/dist/assets/screenshots/console/tut-visit-mix.dark.f1dd71da8937.png +0 -0
- package/{assets/screenshots/console/widgets-chart-scatter.light.e57e41675d8d.png → dist/assets/screenshots/console/widgets-chart-scatter.light.85ea38faaed8.png} +0 -0
- package/dist/assets/screenshots/console/widgets-phone-page.dark.360a39e459c7.png +0 -0
- package/{assets/screenshots/console/workspace-settings.light.3ac3bbfd9f4e.png → dist/assets/screenshots/console/workspace-settings.light.c56e7f5d80f8.png} +0 -0
- package/dist/assets/screenshots/docs/draft-conflict.dark.597b616abec7.png +0 -0
- package/dist/assets/screenshots/docs/draft-conflict.light.6d326a37e8bc.png +0 -0
- package/dist/assets/screenshots/docs/page-details-type.dark.2e382c8f131e.png +0 -0
- package/dist/assets/screenshots/self-host/extensions-component-kit.dark.ba673f636a8f.png +0 -0
- package/dist/assets/screenshots/self-host/extensions-component-kit.light.282da6a4c589.png +0 -0
- package/dist/assets/screenshots/self-host/instance-audit.dark.21de79247590.png +0 -0
- package/dist/assets/screenshots/self-host/instance-audit.light.dba4eaa712ed.png +0 -0
- package/dist/assets/screenshots/self-host/instance-branding.dark.0ddd4c2df652.png +0 -0
- package/dist/assets/screenshots/self-host/instance-branding.light.c3b7ffef6d4e.png +0 -0
- package/dist/assets/screenshots/self-host/instance-databases.dark.dd2403f84456.png +0 -0
- package/dist/assets/screenshots/self-host/instance-databases.light.3248546636cf.png +0 -0
- package/dist/assets/screenshots/self-host/instance-health.dark.5791805f72b7.png +0 -0
- package/dist/assets/screenshots/self-host/instance-health.light.cbfad910fc8e.png +0 -0
- package/dist/assets/screenshots/self-host/instance-import-check.dark.11ccf001d9f8.png +0 -0
- package/dist/assets/screenshots/self-host/instance-import-check.light.efbbef163d80.png +0 -0
- package/dist/assets/screenshots/self-host/instance-members.dark.d9fa55d364fd.png +0 -0
- package/dist/assets/screenshots/self-host/instance-members.light.7af6bfa48914.png +0 -0
- package/dist/assets/screenshots/self-host/instance-operators.dark.1326e9460224.png +0 -0
- package/dist/assets/screenshots/self-host/instance-operators.light.3f2cac001fb5.png +0 -0
- package/dist/assets/screenshots/self-host/instance-tenants.dark.ba860dc98c90.png +0 -0
- package/dist/assets/screenshots/self-host/instance-tenants.light.6a63877c41b3.png +0 -0
- package/dist/assets/screenshots/self-host/instance-triggers.dark.f2bba07895f2.png +0 -0
- package/dist/assets/screenshots/self-host/instance-triggers.light.dddb827e214a.png +0 -0
- package/dist/assets/screenshots/start/basics-finding-your-way.dark.5cc80a2d591f.png +0 -0
- package/dist/assets/screenshots/start/basics-finding-your-way.light.dddf72e4ad38.png +0 -0
- package/dist/assets/screenshots/start/tut-approve-step.dark.5b773354ba35.png +0 -0
- package/dist/assets/screenshots/start/tut-approve-step.light.b0224c9b1133.png +0 -0
- package/dist/assets/screenshots/start/visit-notes-filtered.dark.f6fb7a707e2f.png +0 -0
- package/dist/assets/screenshots/start/visit-notes-filtered.light.a4b4d64a7fc2.png +0 -0
- package/dist/fields.json +1 -1
- package/dist/manifest.json +1 -1
- package/dist/md/administer/explanation/sso/how-single-sign-on-works.md +2 -0
- package/dist/md/administer/how-to/access/invite-end-users.md +8 -0
- package/dist/md/administer/how-to/access/rule-rows-by-group-or-attribute.md +7 -0
- package/dist/md/administer/how-to/apps/give-an-app-a-hostname.md +1 -1
- package/dist/md/administer/how-to/sso/provision-people-with-scim.md +1 -1
- package/dist/md/administer/reference/audit-actions.md +1 -0
- package/dist/md/administer/reference/permissions.md +1 -0
- package/dist/md/administer/reference/screens/branding.md +1 -1
- package/dist/md/administer/reference/screens/end-users.md +3 -1
- package/dist/md/administer/reference/screens/overview.md +21 -0
- package/dist/md/administer/reference/screens/retention.md +3 -2
- package/dist/md/administer/reference/screens/single-sign-on.md +1 -1
- package/dist/md/console/how-to/app-builder/publish-an-app.md +0 -1
- package/dist/md/console/how-to/data/row-rules.md +1 -0
- package/dist/md/console/reference/screens/build/published-apps.md +1 -2
- package/dist/md/console/reference/screens/data/tables.md +1 -1
- package/dist/md/console/reference/screens/home/tenants.md +1 -1
- package/dist/md/develop/explanation/api/how-the-api-knows-who-is-calling.md +10 -3
- package/dist/md/develop/explanation/apps/app-access.md +29 -10
- package/dist/md/develop/explanation/scripts/how-scripts-run.md +1 -1
- package/dist/md/develop/how-to/apps/write-an-app.md +1 -1
- package/dist/md/develop/how-to/cli/install-from-source.md +1 -1
- package/dist/md/develop/how-to/cli/install-the-cli.md +1 -1
- package/dist/md/develop/how-to/cli/test-a-script.md +1 -1
- package/dist/md/develop/how-to/configure/set-up-from-a-script.md +1 -1
- package/dist/md/develop/reference/access/mcp.md +11 -1
- package/dist/md/develop/reference/api/agents.md +27 -1
- package/dist/md/develop/reference/api/apps.md +25 -1
- package/dist/md/develop/reference/api/end-users.md +71 -6
- package/dist/md/develop/reference/api/figures.md +160 -0
- package/dist/md/develop/reference/api/identity.md +318 -1
- package/dist/md/develop/reference/api/index.md +7 -6
- package/dist/md/develop/reference/api/instance.md +59 -1
- package/dist/md/develop/reference/api/permissions.md +13 -4
- package/dist/md/develop/reference/api/tenancy.md +13 -0
- package/dist/md/develop/reference/apps/app-client.md +10 -8
- package/dist/md/develop/reference/apps/content-policy.md +8 -3
- package/dist/md/develop/reference/errors.md +6 -0
- package/dist/md/develop/reference/kinds/dashboard.md +10 -0
- package/dist/md/develop/reference/kinds/interface.md +10 -0
- package/dist/md/develop/reference/kinds/widget.md +1 -1
- package/dist/md/develop/reference/queries/data-as-code.md +12 -0
- package/dist/md/develop/reference/sdk/sdk.md +1 -1
- package/dist/md/develop/reference/sdk/widgets-page.md +13 -0
- package/dist/md/develop/reference/sdk/widgets.md +2 -2
- package/dist/md/develop/reference/tenant-widgets/what-a-view-is-given.md +1 -1
- package/dist/md/develop/reference/widgets/chart.md +1 -1
- package/dist/md/develop/reference/widgets/goal.md +1 -1
- package/dist/md/develop/reference/widgets/pivot.md +1 -1
- package/dist/md/develop/reference/widgets/stat.md +1 -1
- package/dist/md/develop/tutorials/cli/quickstart.md +1 -1
- package/dist/md/self-host/explanation/access/index.md +1 -0
- package/dist/md/self-host/explanation/access/instance-service-accounts.md +66 -0
- package/dist/md/self-host/explanation/access/who-runs-what.md +2 -0
- package/dist/md/self-host/explanation/running/architecture.md +1 -1
- package/dist/md/self-host/explanation/running/egress-and-offline.md +1 -1
- package/dist/md/self-host/explanation/running/managed-workers-and-isolation.md +35 -8
- package/dist/md/self-host/explanation/running/security-hardening.md +9 -8
- package/dist/md/self-host/explanation/running/sizing-and-scaling.md +29 -0
- package/dist/md/self-host/how-to/instance/moving-a-tenant.md +12 -0
- package/dist/md/self-host/how-to/running/back-up-an-instance.md +1 -1
- package/dist/md/self-host/how-to/running/build-the-image.md +1 -1
- package/dist/md/self-host/how-to/running/install-on-fly.md +27 -10
- package/dist/md/self-host/how-to/running/install-with-compose.md +4 -4
- package/dist/md/self-host/how-to/running/monitor-an-instance.md +2 -0
- package/dist/md/self-host/how-to/running/put-a-proxy-in-front.md +7 -8
- package/dist/md/self-host/how-to/running/restore-an-instance.md +34 -5
- package/dist/md/self-host/how-to/running/run-a-standalone-worker.md +2 -2
- package/dist/md/self-host/how-to/running/set-up-mail.md +13 -6
- package/dist/md/self-host/reference/console/health.md +21 -1
- package/dist/md/self-host/reference/running/configuration.md +1 -1
- package/dist/md/self-host/reference/running/requirements.md +9 -2
- package/dist/md/self-host/reference/running/retention.md +2 -1
- package/dist/md/self-host/reference/running/troubleshooting.md +6 -1
- package/dist/md/self-host/reference/running/versions-and-support.md +9 -1
- package/dist/md/self-host/reference/settings.md +2 -2
- package/dist/md/self-host/tutorials/install-on-one-machine.md +1 -1
- package/dist/md/start/how-to/example/set-up-the-fernhill-example.md +26 -3
- package/dist/md/start/index.md +11 -1
- package/dist/md/start/reference/accessibility.md +35 -0
- package/dist/md/start/reference/changelog/0-7-0.md +208 -0
- package/dist/md/start/reference/index.md +1 -0
- package/dist/md/start/tutorials/index.md +6 -1
- package/dist/md/start/tutorials/your-first-script.md +0 -1
- package/dist/md/start/tutorials/your-first-table.md +2 -2
- package/dist/pages/administer/explanation/sso/how-single-sign-on-works.json +1 -1
- package/dist/pages/administer/how-to/access/invite-end-users.json +1 -1
- package/dist/pages/administer/how-to/access/rule-rows-by-group-or-attribute.json +1 -1
- package/dist/pages/administer/how-to/apps/give-an-app-a-hostname.json +1 -1
- package/dist/pages/administer/how-to/sso/provision-people-with-scim.json +1 -1
- package/dist/pages/administer/reference/audit-actions.json +1 -1
- package/dist/pages/administer/reference/permissions.json +1 -1
- package/dist/pages/administer/reference/screens/branding.json +1 -1
- package/dist/pages/administer/reference/screens/end-users.json +1 -1
- package/dist/pages/administer/reference/screens/overview.json +1 -1
- package/dist/pages/administer/reference/screens/retention.json +1 -1
- package/dist/pages/administer/reference/screens/single-sign-on.json +1 -1
- package/dist/pages/console/how-to/app-builder/publish-an-app.json +1 -1
- package/dist/pages/console/how-to/data/row-rules.json +1 -1
- package/dist/pages/console/reference/screens/build/published-apps.json +1 -1
- package/dist/pages/console/reference/screens/data/tables.json +1 -1
- package/dist/pages/console/reference/screens/home/tenants.json +1 -1
- package/dist/pages/develop/explanation/api/how-the-api-knows-who-is-calling.json +1 -1
- package/dist/pages/develop/explanation/apps/app-access.json +1 -1
- package/dist/pages/develop/explanation/scripts/how-scripts-run.json +1 -1
- package/dist/pages/develop/how-to/apps/write-an-app.json +1 -1
- package/dist/pages/develop/how-to/cli/install-from-source.json +1 -1
- package/dist/pages/develop/how-to/cli/install-the-cli.json +1 -1
- package/dist/pages/develop/how-to/cli/test-a-script.json +1 -1
- package/dist/pages/develop/how-to/configure/set-up-from-a-script.json +1 -1
- package/dist/pages/develop/reference/access/mcp.json +1 -1
- package/dist/pages/develop/reference/api/agents.json +1 -1
- package/dist/pages/develop/reference/api/apps.json +1 -1
- package/dist/pages/develop/reference/api/end-users.json +1 -1
- package/dist/pages/develop/reference/api/figures.json +1 -0
- package/dist/pages/develop/reference/api/identity.json +1 -1
- package/dist/pages/develop/reference/api/index.json +1 -1
- package/dist/pages/develop/reference/api/instance.json +1 -1
- package/dist/pages/develop/reference/api/permissions.json +1 -1
- package/dist/pages/develop/reference/api/tenancy.json +1 -1
- package/dist/pages/develop/reference/apps/app-client.json +1 -1
- package/dist/pages/develop/reference/apps/content-policy.json +1 -1
- package/dist/pages/develop/reference/errors.json +1 -1
- package/dist/pages/develop/reference/kinds/dashboard.json +1 -1
- package/dist/pages/develop/reference/kinds/interface.json +1 -1
- package/dist/pages/develop/reference/kinds/widget.json +1 -1
- package/dist/pages/develop/reference/queries/data-as-code.json +1 -1
- package/dist/pages/develop/reference/sdk/sdk.json +1 -1
- package/dist/pages/develop/reference/sdk/widgets-page.json +1 -1
- package/dist/pages/develop/reference/sdk/widgets.json +1 -1
- package/dist/pages/develop/reference/tenant-widgets/what-a-view-is-given.json +1 -1
- package/dist/pages/develop/reference/widgets/chart.json +1 -1
- package/dist/pages/develop/reference/widgets/goal.json +1 -1
- package/dist/pages/develop/reference/widgets/pivot.json +1 -1
- package/dist/pages/develop/reference/widgets/stat.json +1 -1
- package/dist/pages/develop/tutorials/cli/quickstart.json +1 -1
- package/dist/pages/self-host/explanation/access/index.json +1 -1
- package/dist/pages/self-host/explanation/access/instance-service-accounts.json +1 -0
- package/dist/pages/self-host/explanation/access/who-runs-what.json +1 -1
- package/dist/pages/self-host/explanation/running/architecture.json +1 -1
- package/dist/pages/self-host/explanation/running/egress-and-offline.json +1 -1
- package/dist/pages/self-host/explanation/running/managed-workers-and-isolation.json +1 -1
- package/dist/pages/self-host/explanation/running/security-hardening.json +1 -1
- package/dist/pages/self-host/explanation/running/sizing-and-scaling.json +1 -1
- package/dist/pages/self-host/how-to/instance/moving-a-tenant.json +1 -1
- package/dist/pages/self-host/how-to/running/back-up-an-instance.json +1 -1
- package/dist/pages/self-host/how-to/running/build-the-image.json +1 -1
- package/dist/pages/self-host/how-to/running/install-on-fly.json +1 -1
- package/dist/pages/self-host/how-to/running/install-with-compose.json +1 -1
- package/dist/pages/self-host/how-to/running/monitor-an-instance.json +1 -1
- package/dist/pages/self-host/how-to/running/put-a-proxy-in-front.json +1 -1
- package/dist/pages/self-host/how-to/running/restore-an-instance.json +1 -1
- package/dist/pages/self-host/how-to/running/run-a-standalone-worker.json +1 -1
- package/dist/pages/self-host/how-to/running/set-up-mail.json +1 -1
- package/dist/pages/self-host/reference/console/health.json +1 -1
- package/dist/pages/self-host/reference/running/configuration.json +1 -1
- package/dist/pages/self-host/reference/running/requirements.json +1 -1
- package/dist/pages/self-host/reference/running/retention.json +1 -1
- package/dist/pages/self-host/reference/running/troubleshooting.json +1 -1
- package/dist/pages/self-host/reference/running/versions-and-support.json +1 -1
- package/dist/pages/self-host/reference/settings.json +1 -1
- package/dist/pages/self-host/tutorials/install-on-one-machine.json +1 -1
- package/dist/pages/start/how-to/example/set-up-the-fernhill-example.json +1 -1
- package/dist/pages/start/index.json +1 -1
- package/dist/pages/start/reference/accessibility.json +1 -0
- package/dist/pages/start/reference/changelog/0-7-0.json +1 -0
- package/dist/pages/start/reference/index.json +1 -1
- package/dist/pages/start/tutorials/index.json +1 -1
- package/dist/pages/start/tutorials/your-first-script.json +1 -1
- package/dist/pages/start/tutorials/your-first-table.json +1 -1
- package/dist/redirects.json +1 -1
- package/dist/search.json +1 -1
- package/generated/administer/reference/audit-actions.md +1 -0
- package/generated/administer/reference/permissions.md +1 -0
- package/generated/develop/reference/api/agents.md +27 -1
- package/generated/develop/reference/api/apps.md +25 -1
- package/generated/develop/reference/api/end-users.md +71 -6
- package/generated/develop/reference/api/figures.md +160 -0
- package/generated/develop/reference/api/identity.md +318 -1
- package/generated/develop/reference/api/index.md +7 -6
- package/generated/develop/reference/api/instance.md +59 -1
- package/generated/develop/reference/api/permissions.md +13 -4
- package/generated/develop/reference/api/tenancy.md +13 -0
- package/generated/develop/reference/errors.md +6 -0
- package/generated/develop/reference/kinds/dashboard.md +10 -0
- package/generated/develop/reference/kinds/interface.md +10 -0
- package/generated/develop/reference/kinds/widget.md +1 -1
- package/generated/develop/reference/sdk/sdk.md +1 -1
- package/generated/develop/reference/sdk/widgets-page.md +13 -0
- package/generated/develop/reference/sdk/widgets.md +2 -2
- package/generated/develop/reference/widgets/chart.md +1 -1
- package/generated/develop/reference/widgets/goal.md +1 -1
- package/generated/develop/reference/widgets/pivot.md +1 -1
- package/generated/develop/reference/widgets/stat.md +1 -1
- package/generated/openapi.json +4899 -1734
- package/generated/self-host/reference/settings.md +2 -2
- package/generated/start/reference/changelog/0-7-0.md +208 -0
- package/package.json +11 -6
- package/assets/screenshots/administer/access-changes.dark.5b3255fafe5c.png +0 -0
- package/assets/screenshots/administer/access-changes.light.cff6913107a3.png +0 -0
- package/assets/screenshots/administer/access-end-users.dark.c0d4e526952b.png +0 -0
- package/assets/screenshots/administer/access-end-users.light.b3368747a4d3.png +0 -0
- package/assets/screenshots/administer/access-groups.dark.bff155b79a2c.png +0 -0
- package/assets/screenshots/administer/sso-audit-filters.dark.b6a4dc01aa2c.png +0 -0
- package/assets/screenshots/administer/sso-audit-filters.light.1a295f8a94ff.png +0 -0
- package/assets/screenshots/administer/sso-provider-setup.light.b7e337ee30fb.png +0 -0
- package/assets/screenshots/administer/sso-workers-pools.dark.2270cb13aaab.png +0 -0
- package/assets/screenshots/administer/sso-workers-pools.light.1efebb29f50c.png +0 -0
- package/assets/screenshots/console/account-sessions.dark.678e11711e06.png +0 -0
- package/assets/screenshots/console/account-sessions.light.d742e8f3d3d1.png +0 -0
- package/assets/screenshots/console/configure-alerts-default.dark.425955f71c50.png +0 -0
- package/assets/screenshots/console/configure-connections.dark.7b64ffab4c8c.png +0 -0
- package/assets/screenshots/console/dashboard-resource.light.55b36abe8e0e.png +0 -0
- package/assets/screenshots/console/extensions-editor.dark.ebb816369d53.png +0 -0
- package/assets/screenshots/console/flow-editor.dark.caab11f209cb.png +0 -0
- package/assets/screenshots/console/flow-editor.light.bfc7e6b366dc.png +0 -0
- package/assets/screenshots/console/operate-approvals.light.36987d0a4c62.png +0 -0
- package/assets/screenshots/console/operate-cancel-by-age.dark.2786b42ecfbe.png +0 -0
- package/assets/screenshots/console/operate-cancel-by-age.light.8ef6601ebbe7.png +0 -0
- package/assets/screenshots/console/operate-events.dark.7067e88d771e.png +0 -0
- package/assets/screenshots/console/operate-events.light.b58a8c7f0b04.png +0 -0
- package/assets/screenshots/console/operate-run-failed.dark.eb8c52a9fcf7.png +0 -0
- package/assets/screenshots/console/operate-runs.dark.ae45d93820b3.png +0 -0
- package/assets/screenshots/console/page-editor.light.2023b176d1a0.png +0 -0
- package/assets/screenshots/console/queries-editor.dark.b0ef383c3b90.png +0 -0
- package/assets/screenshots/console/queries-editor.light.8e413390ad34.png +0 -0
- package/assets/screenshots/console/queries-parameters.light.9bca851e025c.png +0 -0
- package/assets/screenshots/console/table-definition.light.ff11cce13c18.png +0 -0
- package/assets/screenshots/console/table-help.dark.bc35e748426c.png +0 -0
- package/assets/screenshots/console/table-help.light.fb1b109ee396.png +0 -0
- package/assets/screenshots/console/table-rows-filtered.dark.6fab42faa122.png +0 -0
- package/assets/screenshots/console/table-rows-filtered.light.aa9881d95f4d.png +0 -0
- package/assets/screenshots/console/table-rows.dark.4ce02d5478c9.png +0 -0
- package/assets/screenshots/console/table-rows.light.a1f7d91a9e77.png +0 -0
- package/assets/screenshots/console/tut-visit-mix.dark.724c62999f95.png +0 -0
- package/assets/screenshots/console/widgets-phone-page.dark.386738c3e5fb.png +0 -0
- package/assets/screenshots/docs/draft-conflict.dark.894a4f116020.png +0 -0
- package/assets/screenshots/docs/draft-conflict.light.c5187649da9a.png +0 -0
- package/assets/screenshots/docs/page-details-type.dark.26fda0943a41.png +0 -0
- package/assets/screenshots/self-host/extensions-component-kit.dark.95cf642b62b6.png +0 -0
- package/assets/screenshots/self-host/extensions-component-kit.light.d4d7ae43474d.png +0 -0
- package/assets/screenshots/self-host/instance-audit.dark.eabb7e1545a2.png +0 -0
- package/assets/screenshots/self-host/instance-audit.light.e0704c3e2f3c.png +0 -0
- package/assets/screenshots/self-host/instance-branding.dark.65706ba2f266.png +0 -0
- package/assets/screenshots/self-host/instance-branding.light.53ef9943efc1.png +0 -0
- package/assets/screenshots/self-host/instance-databases.dark.17e36475132c.png +0 -0
- package/assets/screenshots/self-host/instance-databases.light.6bd31df9f812.png +0 -0
- package/assets/screenshots/self-host/instance-health.dark.7ddc9725c6e5.png +0 -0
- package/assets/screenshots/self-host/instance-health.light.5d8697f0135a.png +0 -0
- package/assets/screenshots/self-host/instance-import-check.dark.b54f53b17e5e.png +0 -0
- package/assets/screenshots/self-host/instance-import-check.light.b33217f8efdf.png +0 -0
- package/assets/screenshots/self-host/instance-members.dark.3f319a2912d7.png +0 -0
- package/assets/screenshots/self-host/instance-members.light.3f90be8b0556.png +0 -0
- package/assets/screenshots/self-host/instance-operators.dark.fb0fcc88cc66.png +0 -0
- package/assets/screenshots/self-host/instance-operators.light.038f3f725bec.png +0 -0
- package/assets/screenshots/self-host/instance-tenants.dark.1f2501ef99c1.png +0 -0
- package/assets/screenshots/self-host/instance-tenants.light.9c1b997a9f5b.png +0 -0
- package/assets/screenshots/self-host/instance-triggers.dark.2c3cffed2649.png +0 -0
- package/assets/screenshots/self-host/instance-triggers.light.b0a06ee78d65.png +0 -0
- package/assets/screenshots/start/basics-finding-your-way.dark.05cc7d67b47c.png +0 -0
- package/assets/screenshots/start/basics-finding-your-way.light.45790efbcb57.png +0 -0
- package/assets/screenshots/start/tut-approve-step.dark.dc691e002e9e.png +0 -0
- package/assets/screenshots/start/tut-approve-step.light.9c219b4d2d1a.png +0 -0
- package/assets/screenshots/start/visit-notes-filtered.dark.f26ec0b4168c.png +0 -0
- package/assets/screenshots/start/visit-notes-filtered.light.841ac7004f1c.png +0 -0
- package/dist/assets/screenshots/administer/access-changes.dark.5b3255fafe5c.png +0 -0
- package/dist/assets/screenshots/administer/access-changes.light.cff6913107a3.png +0 -0
- package/dist/assets/screenshots/administer/access-end-users.dark.c0d4e526952b.png +0 -0
- package/dist/assets/screenshots/administer/access-end-users.light.b3368747a4d3.png +0 -0
- package/dist/assets/screenshots/administer/access-groups.dark.bff155b79a2c.png +0 -0
- package/dist/assets/screenshots/administer/sso-audit-filters.dark.b6a4dc01aa2c.png +0 -0
- package/dist/assets/screenshots/administer/sso-audit-filters.light.1a295f8a94ff.png +0 -0
- package/dist/assets/screenshots/administer/sso-provider-setup.light.b7e337ee30fb.png +0 -0
- package/dist/assets/screenshots/administer/sso-workers-pools.dark.2270cb13aaab.png +0 -0
- package/dist/assets/screenshots/administer/sso-workers-pools.light.1efebb29f50c.png +0 -0
- package/dist/assets/screenshots/console/account-sessions.dark.678e11711e06.png +0 -0
- package/dist/assets/screenshots/console/account-sessions.light.d742e8f3d3d1.png +0 -0
- package/dist/assets/screenshots/console/configure-alerts-default.dark.425955f71c50.png +0 -0
- package/dist/assets/screenshots/console/configure-connections.dark.7b64ffab4c8c.png +0 -0
- package/dist/assets/screenshots/console/dashboard-resource.light.55b36abe8e0e.png +0 -0
- package/dist/assets/screenshots/console/extensions-editor.dark.ebb816369d53.png +0 -0
- package/dist/assets/screenshots/console/flow-editor.dark.caab11f209cb.png +0 -0
- package/dist/assets/screenshots/console/flow-editor.light.bfc7e6b366dc.png +0 -0
- package/dist/assets/screenshots/console/operate-approvals.light.36987d0a4c62.png +0 -0
- package/dist/assets/screenshots/console/operate-cancel-by-age.dark.2786b42ecfbe.png +0 -0
- package/dist/assets/screenshots/console/operate-cancel-by-age.light.8ef6601ebbe7.png +0 -0
- package/dist/assets/screenshots/console/operate-events.dark.7067e88d771e.png +0 -0
- package/dist/assets/screenshots/console/operate-events.light.b58a8c7f0b04.png +0 -0
- package/dist/assets/screenshots/console/operate-run-failed.dark.eb8c52a9fcf7.png +0 -0
- package/dist/assets/screenshots/console/operate-runs.dark.ae45d93820b3.png +0 -0
- package/dist/assets/screenshots/console/page-editor.light.2023b176d1a0.png +0 -0
- package/dist/assets/screenshots/console/queries-editor.dark.b0ef383c3b90.png +0 -0
- package/dist/assets/screenshots/console/queries-editor.light.8e413390ad34.png +0 -0
- package/dist/assets/screenshots/console/queries-parameters.light.9bca851e025c.png +0 -0
- package/dist/assets/screenshots/console/table-definition.light.ff11cce13c18.png +0 -0
- package/dist/assets/screenshots/console/table-help.dark.bc35e748426c.png +0 -0
- package/dist/assets/screenshots/console/table-help.light.fb1b109ee396.png +0 -0
- package/dist/assets/screenshots/console/table-rows-filtered.dark.6fab42faa122.png +0 -0
- package/dist/assets/screenshots/console/table-rows-filtered.light.aa9881d95f4d.png +0 -0
- package/dist/assets/screenshots/console/table-rows.dark.4ce02d5478c9.png +0 -0
- package/dist/assets/screenshots/console/table-rows.light.a1f7d91a9e77.png +0 -0
- package/dist/assets/screenshots/console/tut-visit-mix.dark.724c62999f95.png +0 -0
- package/dist/assets/screenshots/console/widgets-phone-page.dark.386738c3e5fb.png +0 -0
- package/dist/assets/screenshots/docs/draft-conflict.dark.894a4f116020.png +0 -0
- package/dist/assets/screenshots/docs/draft-conflict.light.c5187649da9a.png +0 -0
- package/dist/assets/screenshots/docs/page-details-type.dark.26fda0943a41.png +0 -0
- package/dist/assets/screenshots/self-host/extensions-component-kit.dark.95cf642b62b6.png +0 -0
- package/dist/assets/screenshots/self-host/extensions-component-kit.light.d4d7ae43474d.png +0 -0
- package/dist/assets/screenshots/self-host/instance-audit.dark.eabb7e1545a2.png +0 -0
- package/dist/assets/screenshots/self-host/instance-audit.light.e0704c3e2f3c.png +0 -0
- package/dist/assets/screenshots/self-host/instance-branding.dark.65706ba2f266.png +0 -0
- package/dist/assets/screenshots/self-host/instance-branding.light.53ef9943efc1.png +0 -0
- package/dist/assets/screenshots/self-host/instance-databases.dark.17e36475132c.png +0 -0
- package/dist/assets/screenshots/self-host/instance-databases.light.6bd31df9f812.png +0 -0
- package/dist/assets/screenshots/self-host/instance-health.dark.7ddc9725c6e5.png +0 -0
- package/dist/assets/screenshots/self-host/instance-health.light.5d8697f0135a.png +0 -0
- package/dist/assets/screenshots/self-host/instance-import-check.dark.b54f53b17e5e.png +0 -0
- package/dist/assets/screenshots/self-host/instance-import-check.light.b33217f8efdf.png +0 -0
- package/dist/assets/screenshots/self-host/instance-members.dark.3f319a2912d7.png +0 -0
- package/dist/assets/screenshots/self-host/instance-members.light.3f90be8b0556.png +0 -0
- package/dist/assets/screenshots/self-host/instance-operators.dark.fb0fcc88cc66.png +0 -0
- package/dist/assets/screenshots/self-host/instance-operators.light.038f3f725bec.png +0 -0
- package/dist/assets/screenshots/self-host/instance-tenants.dark.1f2501ef99c1.png +0 -0
- package/dist/assets/screenshots/self-host/instance-tenants.light.9c1b997a9f5b.png +0 -0
- package/dist/assets/screenshots/self-host/instance-triggers.dark.2c3cffed2649.png +0 -0
- package/dist/assets/screenshots/self-host/instance-triggers.light.b0a06ee78d65.png +0 -0
- package/dist/assets/screenshots/start/basics-finding-your-way.dark.05cc7d67b47c.png +0 -0
- package/dist/assets/screenshots/start/basics-finding-your-way.light.45790efbcb57.png +0 -0
- package/dist/assets/screenshots/start/tut-approve-step.dark.dc691e002e9e.png +0 -0
- package/dist/assets/screenshots/start/tut-approve-step.light.9c219b4d2d1a.png +0 -0
- package/dist/assets/screenshots/start/visit-notes-filtered.dark.f26ec0b4168c.png +0 -0
- package/dist/assets/screenshots/start/visit-notes-filtered.light.841ac7004f1c.png +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"path":"develop/how-to/apps/write-an-app","title":"Write an app as code","tree":{"type":"root","v":1,"children":[{"type":"heading","depth":2,"id":"write-an-app-as-code","children":[{"type":"text","value":"Write an app as code","line":7}],"line":7},{"type":"paragraph","children":[{"type":"text","value":"By the end you will have an app in a tenant's repository that reads a table and starts a script, deployed to a dev workspace, with a binding that lets a group of end users open it.","line":9}],"line":9},{"type":"heading","depth":2,"id":"before-you-start","children":[{"type":"text","value":"Before you start","line":11}],"line":11},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"A tenant repository (","line":13},{"type":"inlineCode","value":"volvel init","line":13},{"type":"text","value":" makes one) and the CLI signed in to the instance (","line":13},{"type":"inlineCode","value":"volvel login","line":13},{"type":"text","value":"). See ","line":13},{"type":"link","href":"../../reference/cli","children":[{"type":"text","value":"the CLI reference","line":13}],"line":13},{"type":"text","value":".","line":13}],"line":13},{"type":"listItem","children":[{"type":"text","value":"A dev workspace to deploy to, and ","line":14},{"type":"inlineCode","value":"bundle:write","line":14},{"type":"text","value":" there. A deploy stops before it uploads anything if it would delete console resources the repository has no file for, so use a workspace you can spare while you try this. A deploy also deletes what an earlier deploy of a repository made and this repository no longer defines, and it does not ask first: the output lists each as ","line":14},{"type":"inlineCode","value":"deleted","line":14},{"type":"text","value":", so deploy to a workspace whose other repository you do not need.","line":14}],"line":14},{"type":"listItem","children":[{"type":"text","value":"Node.js, and these in the repository's ","line":15},{"type":"inlineCode","value":"package.json","line":15},{"type":"text","value":": ","line":15},{"type":"inlineCode","value":"@volvel/sdk","line":15},{"type":"text","value":", ","line":15},{"type":"inlineCode","value":"@volvel/app","line":15},{"type":"text","value":", ","line":15},{"type":"inlineCode","value":"@volvel/ui","line":15},{"type":"text","value":", ","line":15},{"type":"inlineCode","value":"react","line":15},{"type":"text","value":" and ","line":15},{"type":"inlineCode","value":"react-dom","line":15},{"type":"text","value":" as dependencies, and ","line":15},{"type":"inlineCode","value":"vite","line":15},{"type":"text","value":", ","line":15},{"type":"inlineCode","value":"@vitejs/plugin-react","line":15},{"type":"text","value":", ","line":15},{"type":"inlineCode","value":"@tailwindcss/vite","line":15},{"type":"text","value":" and ","line":15},{"type":"inlineCode","value":"tailwindcss","line":15},{"type":"text","value":" as development dependencies. Without Vite the build stops and says to install it.","line":15}],"line":15},{"type":"listItem","children":[{"type":"text","value":"The table and the script the app uses. This page uses a table ","line":16},{"type":"inlineCode","value":"visits","line":16},{"type":"text","value":" and a script ","line":16},{"type":"inlineCode","value":"check-in","line":16},{"type":"text","value":", which are in the first step.","line":16}],"line":16},{"type":"listItem","children":[{"type":"text","value":"Fernhill is set up: see ","line":17},{"type":"link","href":"../../../start/how-to/example/set-up-the-fernhill-example","children":[{"type":"text","value":"Set up the Fernhill example","line":17}],"line":17},{"type":"text","value":".","line":17}],"line":17}],"line":13},{"type":"heading","depth":2,"id":"steps","children":[{"type":"text","value":"Steps","line":19}],"line":19},{"type":"component","name":"steps","form":"container","props":{},"children":[{"type":"list","ordered":true,"children":[{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Define what the app uses. The app reads ","line":22},{"type":"inlineCode","value":"visits","line":22},{"type":"text","value":" and starts ","line":22},{"type":"inlineCode","value":"check-in","line":22},{"type":"text","value":". The table is a file in the console's folder, ","line":22},{"type":"inlineCode","value":"platform/visits.table.yaml","line":22},{"type":"text","value":". The script is code, in ","line":22},{"type":"inlineCode","value":"src/index.ts","line":22},{"type":"text","value":"; it lists the table in ","line":22},{"type":"inlineCode","value":"tables","line":22},{"type":"text","value":", or its writes are refused with \"This needs a declared use of the table\".","line":22}],"line":22},{"type":"code","value":"schemaVersion: 1\nbody:\n description: Pets that have been checked in.\n columns:\n pet: { type: text, required: true }\n seen: { type: boolean, default: false }","lang":"yaml","meta":"title=platform/visits.table.yaml","line":24},{"type":"code","value":"import { defineApp, defineScript, z } from \"@volvel/sdk\";\n\nexport const checkIn = defineScript({\n path: \"check-in\",\n description: \"Adds a visit for a pet and says it is seen.\",\n input: z.object({ pet: z.string() }),\n output: z.object({ id: z.string() }),\n tables: [\"visits\"],\n async run(input, ctx) {\n const row = await ctx.table(\"visits\").insert({ pet: input.pet, seen: true });\n return { id: row.id };\n },\n});","lang":"ts","meta":"title=src/index.ts","line":33}],"line":22},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Declare the app. ","line":49},{"type":"inlineCode","value":"path","line":49},{"type":"text","value":" is part of its address. ","line":49},{"type":"inlineCode","value":"source","line":49},{"type":"text","value":" is the folder that holds its ","line":49},{"type":"inlineCode","value":"index.html","line":49},{"type":"text","value":". ","line":49},{"type":"inlineCode","value":"reads","line":49},{"type":"text","value":" lists the tables the app's code reads, so that whoever shares the app can see what it reaches.","line":49}],"line":49},{"type":"code","value":"export const desk = defineApp({\n path: \"desk\",\n title: \"Desk\",\n description: \"Check pets in.\",\n source: \"apps/desk\",\n reads: [\"visits\"],\n});","lang":"ts","meta":"title=src/index.ts","line":51},{"type":"paragraph","children":[{"type":"text","value":"An app has exactly one of ","line":61},{"type":"inlineCode","value":"source","line":61},{"type":"text","value":", ","line":61},{"type":"inlineCode","value":"interface","line":61},{"type":"text","value":" and ","line":61},{"type":"inlineCode","value":"docs","line":61},{"type":"text","value":"; ","line":61},{"type":"inlineCode","value":"defineApp","line":61},{"type":"text","value":" throws if it has none or more than one. ","line":61},{"type":"inlineCode","value":"title","line":61},{"type":"text","value":" is at most 100 characters. ","line":61},{"type":"inlineCode","value":"reads","line":61},{"type":"text","value":" lists at most 100 paths. ","line":61},{"type":"inlineCode","value":"entry","line":61},{"type":"text","value":" (default ","line":61},{"type":"inlineCode","value":"index.html","line":61},{"type":"text","value":") names the page inside the built app, and ","line":61},{"type":"inlineCode","value":"fallback","line":61},{"type":"text","value":" (default ","line":61},{"type":"inlineCode","value":"true","line":61},{"type":"text","value":") lets an address that names no file answer the page, for an app that routes in the browser.","line":61}],"line":61}],"line":49},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Make the folder ","line":63},{"type":"inlineCode","value":"apps/desk","line":63},{"type":"text","value":" with three files and one shared declaration. The page's own folder holds ","line":63},{"type":"inlineCode","value":"index.html","line":63},{"type":"text","value":", ","line":63},{"type":"inlineCode","value":"main.tsx","line":63},{"type":"text","value":" and ","line":63},{"type":"inlineCode","value":"styles.css","line":63},{"type":"text","value":". ","line":63},{"type":"inlineCode","value":"apps/env.d.ts","line":63},{"type":"text","value":" says that a stylesheet may be imported.","line":63}],"line":63},{"type":"component","name":"file-tree","form":"container","props":{},"children":[{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"apps","line":66},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"env.d.ts","line":67}],"line":67},{"type":"listItem","children":[{"type":"text","value":"desk","line":68},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"index.html","line":69}],"line":69},{"type":"listItem","children":[{"type":"text","value":"main.tsx","line":70}],"line":70},{"type":"listItem","children":[{"type":"text","value":"styles.css","line":71}],"line":71}],"line":69}],"line":68}],"line":67}],"line":66},{"type":"listItem","children":[{"type":"text","value":"src","line":72},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"index.ts","line":73}],"line":73}],"line":73}],"line":72},{"type":"listItem","children":[{"type":"text","value":"package.json","line":74}],"line":74}],"line":66}],"line":65,"endLine":75},{"type":"code","value":"<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <title>Desk</title>\n </head>\n <body>\n <div id=\"app\"></div>\n <script type=\"module\" src=\"./main.tsx\"></script>\n </body>\n</html>","lang":"html","meta":"title=apps/desk/index.html","line":77},{"type":"code","value":"@import \"@volvel/ui/tokens.css\";\n@source \"./\";","lang":"css","meta":"title=apps/desk/styles.css","line":92},{"type":"code","value":"declare module \"*.css\";","lang":"ts","meta":"title=apps/env.d.ts","line":97}],"line":63},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Write the page. Import the table's types as types only, from ","line":101},{"type":"inlineCode","value":"@volvel/sdk","line":101},{"type":"text","value":", so that none of the repository's server code reaches the browser. ","line":101},{"type":"inlineCode","value":"TableOf<\"visits\">","line":101},{"type":"text","value":" is typed by ","line":101},{"type":"inlineCode","value":".platform/volvel-env.d.ts","line":101},{"type":"text","value":", which ","line":101},{"type":"inlineCode","value":"volvel build","line":101},{"type":"text","value":" writes. ","line":101},{"type":"inlineCode","value":"useQuery","line":101},{"type":"text","value":" loads rows, and ","line":101},{"type":"inlineCode","value":"runScript","line":101},{"type":"text","value":" starts the script as the person using the app. ","line":101},{"type":"link","href":"../../reference/apps/app-client","children":[{"type":"text","value":"The app client","line":101}],"line":101},{"type":"text","value":" lists everything ","line":101},{"type":"inlineCode","value":"@volvel/app","line":101},{"type":"text","value":" gives you.","line":101}],"line":101},{"type":"code","value":"import { runScript, table, useQuery } from \"@volvel/app\";\nimport type { TableOf } from \"@volvel/sdk\";\nimport { Button, PageShell, TextField } from \"@volvel/ui\";\nimport { useState } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport \"./styles.css\";\n\nfunction Desk() {\n const found = useQuery(() => table<TableOf<\"visits\">>(\"visits\").find({ sort: [\"-created_at\"] }));\n const [pet, setPet] = useState(\"\");\n return (\n <PageShell title=\"Desk\">\n <TextField label=\"Pet\" value={pet} onChange={setPet} />\n <Button\n onClick={async () => {\n await runScript(\"check-in\", { pet });\n setPet(\"\");\n found.reload();\n }}\n >\n Check in\n </Button>\n <ul>\n {(found.data ?? []).map((row) => (\n <li key={row.id}>{row.pet}</li>\n ))}\n </ul>\n </PageShell>\n );\n}\n\ncreateRoot(document.getElementById(\"app\") as HTMLElement).render(<Desk />);","lang":"tsx","meta":"title=apps/desk/main.tsx","line":103}],"line":101},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Check the build. The command compiles the app with the repository's own Vite and lists its files.","line":138}],"line":138},{"type":"code","value":"volvel build","lang":"bash","line":140},{"type":"code","value":"Bundle fce0d864feb4, 757 KB of code, SDK 0.5.0\n table visits\n script check-in\n app desk (6 files, 686 KB)","lang":"text","line":144}],"line":138},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Say who may open the app. Staff whose role lets them read the workspace need no binding. For end users, bind a role that holds ","line":151},{"type":"inlineCode","value":"app:read","line":151},{"type":"text","value":" at the app, and bind the tables and scripts it uses too: a binding at the app gives no table. ","line":151},{"type":"inlineCode","value":"portal_user","line":151},{"type":"text","value":" holds ","line":151},{"type":"inlineCode","value":"app:read","line":151},{"type":"text","value":", ","line":151},{"type":"inlineCode","value":"data:read","line":151},{"type":"text","value":" and ","line":151},{"type":"inlineCode","value":"data:write","line":151},{"type":"text","value":"; ","line":151},{"type":"inlineCode","value":"portal_reader","line":151},{"type":"text","value":" holds ","line":151},{"type":"inlineCode","value":"app:read","line":151},{"type":"text","value":" and ","line":151},{"type":"inlineCode","value":"data:read","line":151},{"type":"text","value":". To start a script or a flow, the role must hold ","line":151},{"type":"inlineCode","value":"run:write","line":151},{"type":"text","value":" or ","line":151},{"type":"inlineCode","value":"flow_run:write","line":151},{"type":"text","value":", which no built-in portal role does, so the repository defines one, ","line":151},{"type":"inlineCode","value":"starts_runs","line":151},{"type":"text","value":".","line":151}],"line":151},{"type":"paragraph","children":[{"type":"text","value":"These are three files in the console's folder, ","line":153},{"type":"inlineCode","value":"platform/","line":153},{"type":"text","value":". They are YAML because nothing in the code imports them. A binding names the role by its name, the principal, and the resource it binds at by its path.","line":153}],"line":153},{"type":"code","value":"schemaVersion: 1\nbody:\n role: portal_user\n principal:\n type: end_user_group\n key: front-desk\n resource: desk","lang":"yaml","meta":"title=platform/access/desk-app.binding.yaml","line":155},{"type":"code","value":"schemaVersion: 1\nbody:\n role: portal_user\n principal:\n type: end_user_group\n key: front-desk\n resource: visits","lang":"yaml","meta":"title=platform/access/desk-visits.binding.yaml","line":165},{"type":"code","value":"schemaVersion: 1\nbody:\n name: starts_runs\n description: Starts a script or a flow it is bound at.\n permissions:\n - run:write\n - flow_run:write","lang":"yaml","meta":"title=platform/roles/starts-runs.role.yaml","line":175},{"type":"code","value":"schemaVersion: 1\nbody:\n role: starts_runs\n principal:\n type: end_user_group\n key: front-desk\n resource: check-in","lang":"yaml","meta":"title=platform/access/desk-check-in.binding.yaml","line":185},{"type":"paragraph","children":[{"type":"text","value":"A group is named by its ","line":195},{"type":"inlineCode","value":"key","line":195},{"type":"text","value":", which stays when the group is renamed. The other principals are ","line":195},{"type":"inlineCode","value":"member","line":195},{"type":"text","value":" (by email), ","line":195},{"type":"inlineCode","value":"group","line":195},{"type":"text","value":", ","line":195},{"type":"inlineCode","value":"service_account","line":195},{"type":"text","value":", ","line":195},{"type":"inlineCode","value":"end_user","line":195},{"type":"text","value":" (by email), ","line":195},{"type":"inlineCode","value":"end_user_group","line":195},{"type":"text","value":", ","line":195},{"type":"inlineCode","value":"end_users","line":195},{"type":"text","value":" (every signed-in end user) and ","line":195},{"type":"inlineCode","value":"anonymous","line":195},{"type":"text","value":" (anyone, signed in or not). ","line":195},{"type":"link","href":"../../explanation/apps/app-access","children":[{"type":"text","value":"How access to an app works","line":195}],"line":195},{"type":"text","value":" says what each one gives.","line":195}],"line":195}],"line":151},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Deploy to the dev workspace.","line":197}],"line":197},{"type":"code","value":"volvel deploy --tenant fernhill --workspace apps-docs","lang":"bash","line":199},{"type":"code","value":"App files: 6, 4 new.\nDeployed version 1 to apps-docs (dev): 7 created, 0 updated, 0 deleted, 0 unchanged.","lang":"text","line":203},{"type":"paragraph","children":[{"type":"text","value":"The command uploads only the files the instance does not already hold, six at a time, and says how many were new.","line":208}],"line":208}],"line":197}],"line":22}],"line":21,"endLine":209},{"type":"heading","depth":2,"id":"the-result","children":[{"type":"text","value":"The result","line":211}],"line":211},{"type":"paragraph","children":[{"type":"text","value":"The app is in ","line":213},{"type":"strong","children":[{"type":"text","value":"Build","line":213}],"line":213},{"type":"text","value":", then ","line":213},{"type":"strong","children":[{"type":"text","value":"Apps","line":213}],"line":213},{"type":"text","value":", with the tag ","line":213},{"type":"strong","children":[{"type":"text","value":"Repository","line":213}],"line":213},{"type":"text","value":", its address, and, in ","line":213},{"type":"strong","children":[{"type":"text","value":"Open to","line":213}],"line":213},{"type":"text","value":", the group the binding names, tagged ","line":213},{"type":"strong","children":[{"type":"text","value":"From repository","line":213}],"line":213},{"type":"text","value":" in the Share sheet. Its address is ","line":213},{"type":"inlineCode","value":"/apps/<tenant>/<workspace>/<app>/","line":213},{"type":"text","value":" on the instance's address for apps.","line":213}],"line":213},{"type":"paragraph","children":[{"type":"text","value":"A repository app is served only where the instance has an address for apps. If it has none, the ","line":215},{"type":"strong","children":[{"type":"text","value":"Apps","line":215}],"line":215},{"type":"text","value":" screen says so and the app answers 503. ","line":215},{"type":"inlineCode","value":"APPS_URL","line":215},{"type":"text","value":" is the setting that gives it one. Apps made in the App Builder and sites of documentation are served either way.","line":215}],"line":215},{"type":"heading","depth":2,"id":"what-the-build-checks","children":[{"type":"text","value":"What the build checks","line":217}],"line":217},{"type":"table","align":[null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Check","line":219}]},{"type":"tableCell","children":[{"type":"text","value":"Rule","line":219}]}],"line":219},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"Source","line":221}]},{"type":"tableCell","children":[{"type":"text","value":"The app's ","line":221},{"type":"inlineCode","value":"source","line":221},{"type":"text","value":" is inside the repository and holds ","line":221},{"type":"inlineCode","value":"index.html","line":221},{"type":"text","value":".","line":221}]}],"line":221},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"Plugins","line":222}]},{"type":"tableCell","children":[{"type":"text","value":"The React and Tailwind plugins load for you. If the app folder has its own ","line":222},{"type":"inlineCode","value":"vite.config.ts","line":222},{"type":"text","value":", ","line":222},{"type":"inlineCode","value":".js","line":222},{"type":"text","value":", ","line":222},{"type":"inlineCode","value":".mjs","line":222},{"type":"text","value":" or ","line":222},{"type":"inlineCode","value":".mts","line":222},{"type":"text","value":", that file is used instead and you load them yourself. The build uses a ","line":222},{"type":"inlineCode","value":"base","line":222},{"type":"text","value":" of ","line":222},{"type":"inlineCode","value":"./","line":222},{"type":"text","value":", in production mode, so the same files are served under a path and at a hostname's root.","line":222}]}],"line":222},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"File names","line":223}]},{"type":"tableCell","children":[{"type":"text","value":"Each part of a file's path is made of letters, digits and ","line":223},{"type":"inlineCode","value":". _ @ ~ -","line":223},{"type":"text","value":", and starts with a letter, a digit, or one ","line":223},{"type":"inlineCode","value":"_","line":223},{"type":"text","value":" or ","line":223},{"type":"inlineCode","value":".","line":223},{"type":"text","value":" (so ","line":223},{"type":"inlineCode","value":".well-known/assetlinks.json","line":223},{"type":"text","value":" and ","line":223},{"type":"inlineCode","value":"_commonjsHelpers-1a2b.js","line":223},{"type":"text","value":" are allowed). A path is at most 500 characters. A path that starts with ","line":223},{"type":"inlineCode","value":"_/","line":223},{"type":"text","value":", a part that is ","line":223},{"type":"inlineCode","value":".","line":223},{"type":"text","value":" or ","line":223},{"type":"inlineCode","value":"..","line":223},{"type":"text","value":", spaces and accents are refused. The error names the file and says to rename it in ","line":223},{"type":"inlineCode","value":"public/","line":223},{"type":"text","value":", or in the build's ","line":223},{"type":"inlineCode","value":"rollupOptions.output","line":223},{"type":"text","value":".","line":223}]}],"line":223},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"Entry","line":224}]},{"type":"tableCell","children":[{"type":"text","value":"The entry file is among the files. Nothing is under ","line":224},{"type":"inlineCode","value":"_/","line":224},{"type":"text","value":". No file appears twice.","line":224}]}],"line":224},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"Size","line":225}]},{"type":"tableCell","children":[{"type":"text","value":"A file is at most 25 MB. A bundle lists at most 5,000 files and is at most 20 MB of JSON.","line":225}]}],"line":225}],"line":219},{"type":"paragraph","children":[{"type":"text","value":"Files that no deployable version names any more are removed a week after the deploy that stopped naming them. A version older than a week is deployed again by uploading its files again, which ","line":227},{"type":"inlineCode","value":"volvel deploy","line":227},{"type":"text","value":" and ","line":227},{"type":"inlineCode","value":"volvel promote","line":227},{"type":"text","value":" do for you.","line":227}],"line":227},{"type":"heading","depth":2,"id":"if-it-does-not-work","children":[{"type":"text","value":"If it does not work","line":229}],"line":229},{"type":"table","align":[null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"What you see","line":231}]},{"type":"tableCell","children":[{"type":"text","value":"Why and what to do","line":231}]}],"line":231},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"\"This repository defines an app, which is built with Vite. Install it: add vite and @vitejs/plugin-react to devDependencies.\"","line":233}]},{"type":"tableCell","children":[{"type":"text","value":"Add them and install.","line":233}]}],"line":233},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"\"the app \"desk\" needs a source, an interface or docs, and only one of them.\"","line":234}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"defineApp","line":234},{"type":"text","value":" was given none or several of ","line":234},{"type":"inlineCode","value":"source","line":234},{"type":"text","value":", ","line":234},{"type":"inlineCode","value":"interface","line":234},{"type":"text","value":" and ","line":234},{"type":"inlineCode","value":"docs","line":234},{"type":"text","value":".","line":234}]}],"line":234},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"The build names a file and says to rename it.","line":235}]},{"type":"tableCell","children":[{"type":"text","value":"A name the app cannot be served under: see the file names row above.","line":235}]}],"line":235},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"The deploy stops and lists console resources it would delete.","line":236}]},{"type":"tableCell","children":[{"type":"text","value":"The workspace holds resources the repository has no file for. Name each one with ","line":236},{"type":"inlineCode","value":"--allow-delete <path>","line":236},{"type":"text","value":", or add the file.","line":236}]}],"line":236},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"The app opens and the table is empty, or the page says it may not read.","line":237}]},{"type":"tableCell","children":[{"type":"text","value":"The group has the app and no binding at the table. Add the second binding in step 6.","line":237}]}],"line":237},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"\"Sign in to start a script\" in the page.","line":238}]},{"type":"tableCell","children":[{"type":"text","value":"The person is not signed in. See ","line":238},{"type":"link","href":"../../explanation/apps/app-access","children":[{"type":"text","value":"How access to an app works","line":238}],"line":238},{"type":"text","value":".","line":238}]}],"line":238}],"line":231},{"type":"heading","depth":2,"id":"related","children":[{"type":"text","value":"Related","line":240}],"line":240},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"link","href":"run-an-app-while-you-write-it","children":[{"type":"text","value":"Run an app while you write it","line":242}],"line":242}],"line":242},{"type":"listItem","children":[{"type":"link","href":"../../reference/apps/app-client","children":[{"type":"text","value":"The app client","line":243}],"line":243}],"line":243},{"type":"listItem","children":[{"type":"link","href":"../../reference/apps/content-policy","children":[{"type":"text","value":"What an app may load","line":244}],"line":244}],"line":244},{"type":"listItem","children":[{"type":"link","href":"../../../console/how-to/apps/share-an-app","children":[{"type":"text","value":"Share an app","line":245}],"line":245}],"line":245}],"line":242}]},"description":"Put an app in a tenant's repository with defineApp, build it with Vite, deploy it to a dev workspace and say who may open it with YAML bindings."}
|
|
1
|
+
{"path":"develop/how-to/apps/write-an-app","title":"Write an app as code","tree":{"type":"root","v":1,"children":[{"type":"heading","depth":2,"id":"write-an-app-as-code","children":[{"type":"text","value":"Write an app as code","line":7}],"line":7},{"type":"paragraph","children":[{"type":"text","value":"By the end you will have an app in a tenant's repository that reads a table and starts a script, deployed to a dev workspace, with a binding that lets a group of end users open it.","line":9}],"line":9},{"type":"heading","depth":2,"id":"before-you-start","children":[{"type":"text","value":"Before you start","line":11}],"line":11},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"A tenant repository (","line":13},{"type":"inlineCode","value":"volvel init","line":13},{"type":"text","value":" makes one) and the CLI signed in to the instance (","line":13},{"type":"inlineCode","value":"volvel login","line":13},{"type":"text","value":"). See ","line":13},{"type":"link","href":"../../reference/cli","children":[{"type":"text","value":"the CLI reference","line":13}],"line":13},{"type":"text","value":".","line":13}],"line":13},{"type":"listItem","children":[{"type":"text","value":"A dev workspace to deploy to, and ","line":14},{"type":"inlineCode","value":"bundle:write","line":14},{"type":"text","value":" there. A deploy stops before it uploads anything if it would delete console resources the repository has no file for, so use a workspace you can spare while you try this. A deploy also deletes what an earlier deploy of a repository made and this repository no longer defines, and it does not ask first: the output lists each as ","line":14},{"type":"inlineCode","value":"deleted","line":14},{"type":"text","value":", so deploy to a workspace whose other repository you do not need.","line":14}],"line":14},{"type":"listItem","children":[{"type":"text","value":"Node.js, and these in the repository's ","line":15},{"type":"inlineCode","value":"package.json","line":15},{"type":"text","value":": ","line":15},{"type":"inlineCode","value":"@volvel/sdk","line":15},{"type":"text","value":", ","line":15},{"type":"inlineCode","value":"@volvel/app","line":15},{"type":"text","value":", ","line":15},{"type":"inlineCode","value":"@volvel/ui","line":15},{"type":"text","value":", ","line":15},{"type":"inlineCode","value":"react","line":15},{"type":"text","value":" and ","line":15},{"type":"inlineCode","value":"react-dom","line":15},{"type":"text","value":" as dependencies, and ","line":15},{"type":"inlineCode","value":"vite","line":15},{"type":"text","value":", ","line":15},{"type":"inlineCode","value":"@vitejs/plugin-react","line":15},{"type":"text","value":", ","line":15},{"type":"inlineCode","value":"@tailwindcss/vite","line":15},{"type":"text","value":" and ","line":15},{"type":"inlineCode","value":"tailwindcss","line":15},{"type":"text","value":" as development dependencies. Without Vite the build stops and says to install it.","line":15}],"line":15},{"type":"listItem","children":[{"type":"text","value":"The table and the script the app uses. This page uses a table ","line":16},{"type":"inlineCode","value":"visits","line":16},{"type":"text","value":" and a script ","line":16},{"type":"inlineCode","value":"check-in","line":16},{"type":"text","value":", which are in the first step.","line":16}],"line":16},{"type":"listItem","children":[{"type":"text","value":"Fernhill is set up: see ","line":17},{"type":"link","href":"../../../start/how-to/example/set-up-the-fernhill-example","children":[{"type":"text","value":"Set up the Fernhill example","line":17}],"line":17},{"type":"text","value":".","line":17}],"line":17}],"line":13},{"type":"heading","depth":2,"id":"steps","children":[{"type":"text","value":"Steps","line":19}],"line":19},{"type":"component","name":"steps","form":"container","props":{},"children":[{"type":"list","ordered":true,"children":[{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Define what the app uses. The app reads ","line":22},{"type":"inlineCode","value":"visits","line":22},{"type":"text","value":" and starts ","line":22},{"type":"inlineCode","value":"check-in","line":22},{"type":"text","value":". The table is a file in the console's folder, ","line":22},{"type":"inlineCode","value":"platform/visits.table.yaml","line":22},{"type":"text","value":". The script is code, in ","line":22},{"type":"inlineCode","value":"src/index.ts","line":22},{"type":"text","value":"; it lists the table in ","line":22},{"type":"inlineCode","value":"tables","line":22},{"type":"text","value":", or its writes are refused with \"This needs a declared use of the table\".","line":22}],"line":22},{"type":"code","value":"schemaVersion: 1\nbody:\n description: Pets that have been checked in.\n columns:\n pet: { type: text, required: true }\n seen: { type: boolean, default: false }","lang":"yaml","meta":"title=platform/visits.table.yaml","line":24},{"type":"code","value":"import { defineApp, defineScript, z } from \"@volvel/sdk\";\n\nexport const checkIn = defineScript({\n path: \"check-in\",\n description: \"Adds a visit for a pet and says it is seen.\",\n input: z.object({ pet: z.string() }),\n output: z.object({ id: z.string() }),\n tables: [\"visits\"],\n async run(input, ctx) {\n const row = await ctx.table(\"visits\").insert({ pet: input.pet, seen: true });\n return { id: row.id };\n },\n});","lang":"ts","meta":"title=src/index.ts","line":33}],"line":22},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Declare the app. ","line":49},{"type":"inlineCode","value":"path","line":49},{"type":"text","value":" is part of its address. ","line":49},{"type":"inlineCode","value":"source","line":49},{"type":"text","value":" is the folder that holds its ","line":49},{"type":"inlineCode","value":"index.html","line":49},{"type":"text","value":". ","line":49},{"type":"inlineCode","value":"reads","line":49},{"type":"text","value":" lists the tables the app's code reads, so that whoever shares the app can see what it reaches.","line":49}],"line":49},{"type":"code","value":"export const desk = defineApp({\n path: \"desk\",\n title: \"Desk\",\n description: \"Check pets in.\",\n source: \"apps/desk\",\n reads: [\"visits\"],\n});","lang":"ts","meta":"title=src/index.ts","line":51},{"type":"paragraph","children":[{"type":"text","value":"An app has exactly one of ","line":61},{"type":"inlineCode","value":"source","line":61},{"type":"text","value":", ","line":61},{"type":"inlineCode","value":"interface","line":61},{"type":"text","value":" and ","line":61},{"type":"inlineCode","value":"docs","line":61},{"type":"text","value":"; ","line":61},{"type":"inlineCode","value":"defineApp","line":61},{"type":"text","value":" throws if it has none or more than one. ","line":61},{"type":"inlineCode","value":"title","line":61},{"type":"text","value":" is at most 100 characters. ","line":61},{"type":"inlineCode","value":"reads","line":61},{"type":"text","value":" lists at most 100 paths. ","line":61},{"type":"inlineCode","value":"entry","line":61},{"type":"text","value":" (default ","line":61},{"type":"inlineCode","value":"index.html","line":61},{"type":"text","value":") names the page inside the built app, and ","line":61},{"type":"inlineCode","value":"fallback","line":61},{"type":"text","value":" (default ","line":61},{"type":"inlineCode","value":"true","line":61},{"type":"text","value":") lets an address that names no file answer the page, for an app that routes in the browser.","line":61}],"line":61}],"line":49},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Make the folder ","line":63},{"type":"inlineCode","value":"apps/desk","line":63},{"type":"text","value":" with three files and one shared declaration. The page's own folder holds ","line":63},{"type":"inlineCode","value":"index.html","line":63},{"type":"text","value":", ","line":63},{"type":"inlineCode","value":"main.tsx","line":63},{"type":"text","value":" and ","line":63},{"type":"inlineCode","value":"styles.css","line":63},{"type":"text","value":". ","line":63},{"type":"inlineCode","value":"apps/env.d.ts","line":63},{"type":"text","value":" says that a stylesheet may be imported.","line":63}],"line":63},{"type":"component","name":"file-tree","form":"container","props":{},"children":[{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"apps","line":66},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"env.d.ts","line":67}],"line":67},{"type":"listItem","children":[{"type":"text","value":"desk","line":68},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"index.html","line":69}],"line":69},{"type":"listItem","children":[{"type":"text","value":"main.tsx","line":70}],"line":70},{"type":"listItem","children":[{"type":"text","value":"styles.css","line":71}],"line":71}],"line":69}],"line":68}],"line":67}],"line":66},{"type":"listItem","children":[{"type":"text","value":"src","line":72},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"index.ts","line":73}],"line":73}],"line":73}],"line":72},{"type":"listItem","children":[{"type":"text","value":"package.json","line":74}],"line":74}],"line":66}],"line":65,"endLine":75},{"type":"code","value":"<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <title>Desk</title>\n </head>\n <body>\n <div id=\"app\"></div>\n <script type=\"module\" src=\"./main.tsx\"></script>\n </body>\n</html>","lang":"html","meta":"title=apps/desk/index.html","line":77},{"type":"code","value":"@import \"@volvel/ui/tokens.css\";\n@source \"./\";","lang":"css","meta":"title=apps/desk/styles.css","line":92},{"type":"code","value":"declare module \"*.css\";","lang":"ts","meta":"title=apps/env.d.ts","line":97}],"line":63},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Write the page. Import the table's types as types only, from ","line":101},{"type":"inlineCode","value":"@volvel/sdk","line":101},{"type":"text","value":", so that none of the repository's server code reaches the browser. ","line":101},{"type":"inlineCode","value":"TableOf<\"visits\">","line":101},{"type":"text","value":" is typed by ","line":101},{"type":"inlineCode","value":".platform/volvel-env.d.ts","line":101},{"type":"text","value":", which ","line":101},{"type":"inlineCode","value":"volvel build","line":101},{"type":"text","value":" writes. ","line":101},{"type":"inlineCode","value":"useQuery","line":101},{"type":"text","value":" loads rows, and ","line":101},{"type":"inlineCode","value":"runScript","line":101},{"type":"text","value":" starts the script as the person using the app. ","line":101},{"type":"link","href":"../../reference/apps/app-client","children":[{"type":"text","value":"The app client","line":101}],"line":101},{"type":"text","value":" lists everything ","line":101},{"type":"inlineCode","value":"@volvel/app","line":101},{"type":"text","value":" gives you.","line":101}],"line":101},{"type":"code","value":"import { runScript, table, useQuery } from \"@volvel/app\";\nimport type { TableOf } from \"@volvel/sdk\";\nimport { Button, PageShell, TextField } from \"@volvel/ui\";\nimport { useState } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport \"./styles.css\";\n\nfunction Desk() {\n const found = useQuery(() => table<TableOf<\"visits\">>(\"visits\").find({ sort: [\"-created_at\"] }));\n const [pet, setPet] = useState(\"\");\n return (\n <PageShell title=\"Desk\">\n <TextField label=\"Pet\" value={pet} onChange={setPet} />\n <Button\n onClick={async () => {\n await runScript(\"check-in\", { pet });\n setPet(\"\");\n found.reload();\n }}\n >\n Check in\n </Button>\n <ul>\n {(found.data ?? []).map((row) => (\n <li key={row.id}>{row.pet}</li>\n ))}\n </ul>\n </PageShell>\n );\n}\n\ncreateRoot(document.getElementById(\"app\") as HTMLElement).render(<Desk />);","lang":"tsx","meta":"title=apps/desk/main.tsx","line":103}],"line":101},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Check the build. The command compiles the app with the repository's own Vite and lists its files.","line":138}],"line":138},{"type":"code","value":"volvel build","lang":"bash","line":140},{"type":"code","value":"Bundle fce0d864feb4, 757 KB of code, SDK 0.5.0\n table visits\n script check-in\n app desk (6 files, 686 KB)","lang":"text","line":144}],"line":138},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Say who may open the app. Staff whose role lets them read the workspace need no binding. For end users, bind a role that holds ","line":151},{"type":"inlineCode","value":"app:read","line":151},{"type":"text","value":" at the app, and bind the tables and scripts it uses too: a binding at the app gives no table. ","line":151},{"type":"inlineCode","value":"portal_user","line":151},{"type":"text","value":" holds ","line":151},{"type":"inlineCode","value":"app:read","line":151},{"type":"text","value":", ","line":151},{"type":"inlineCode","value":"data:read","line":151},{"type":"text","value":" and ","line":151},{"type":"inlineCode","value":"data:write","line":151},{"type":"text","value":"; ","line":151},{"type":"inlineCode","value":"portal_reader","line":151},{"type":"text","value":" holds ","line":151},{"type":"inlineCode","value":"app:read","line":151},{"type":"text","value":" and ","line":151},{"type":"inlineCode","value":"data:read","line":151},{"type":"text","value":". To start a script or a flow, the role must hold ","line":151},{"type":"inlineCode","value":"run:write","line":151},{"type":"text","value":" or ","line":151},{"type":"inlineCode","value":"flow_run:write","line":151},{"type":"text","value":", which no built-in portal role does, so the repository defines one, ","line":151},{"type":"inlineCode","value":"starts_runs","line":151},{"type":"text","value":".","line":151}],"line":151},{"type":"paragraph","children":[{"type":"text","value":"These are three files in the console's folder, ","line":153},{"type":"inlineCode","value":"platform/","line":153},{"type":"text","value":". They are YAML because nothing in the code imports them. A binding names the role by its name, the principal, and the resource it binds at by its path.","line":153}],"line":153},{"type":"code","value":"schemaVersion: 1\nbody:\n role: portal_user\n principal:\n type: end_user_group\n key: front-desk\n resource: desk","lang":"yaml","meta":"title=platform/access/desk-app.binding.yaml","line":155},{"type":"code","value":"schemaVersion: 1\nbody:\n role: portal_user\n principal:\n type: end_user_group\n key: front-desk\n resource: visits","lang":"yaml","meta":"title=platform/access/desk-visits.binding.yaml","line":165},{"type":"code","value":"schemaVersion: 1\nbody:\n name: starts_runs\n description: Starts a script or a flow it is bound at.\n permissions:\n - run:write\n - flow_run:write","lang":"yaml","meta":"title=platform/roles/starts-runs.role.yaml","line":175},{"type":"code","value":"schemaVersion: 1\nbody:\n role: starts_runs\n principal:\n type: end_user_group\n key: front-desk\n resource: check-in","lang":"yaml","meta":"title=platform/access/desk-check-in.binding.yaml","line":185},{"type":"paragraph","children":[{"type":"text","value":"A group is named by its ","line":195},{"type":"inlineCode","value":"key","line":195},{"type":"text","value":", which stays when the group is renamed. The other principals are ","line":195},{"type":"inlineCode","value":"member","line":195},{"type":"text","value":" (by email), ","line":195},{"type":"inlineCode","value":"group","line":195},{"type":"text","value":", ","line":195},{"type":"inlineCode","value":"service_account","line":195},{"type":"text","value":", ","line":195},{"type":"inlineCode","value":"end_user","line":195},{"type":"text","value":" (by email), ","line":195},{"type":"inlineCode","value":"end_user_group","line":195},{"type":"text","value":", ","line":195},{"type":"inlineCode","value":"end_users","line":195},{"type":"text","value":" (every signed-in end user) and ","line":195},{"type":"inlineCode","value":"anonymous","line":195},{"type":"text","value":" (anyone, signed in or not). ","line":195},{"type":"link","href":"../../explanation/apps/app-access","children":[{"type":"text","value":"How access to an app works","line":195}],"line":195},{"type":"text","value":" says what each one gives.","line":195}],"line":195}],"line":151},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Deploy to the dev workspace.","line":197}],"line":197},{"type":"code","value":"volvel deploy --tenant fernhill --workspace apps-docs","lang":"bash","line":199},{"type":"code","value":"App files: 6, 4 new.\nDeployed version 1 to apps-docs (dev): 7 created, 0 updated, 0 deleted, 0 unchanged.","lang":"text","line":203},{"type":"paragraph","children":[{"type":"text","value":"The command uploads only the files the instance does not already hold, six at a time, and says how many were new.","line":208}],"line":208}],"line":197}],"line":22}],"line":21,"endLine":209},{"type":"heading","depth":2,"id":"the-result","children":[{"type":"text","value":"The result","line":211}],"line":211},{"type":"paragraph","children":[{"type":"text","value":"The app is in ","line":213},{"type":"strong","children":[{"type":"text","value":"Build","line":213}],"line":213},{"type":"text","value":", then ","line":213},{"type":"strong","children":[{"type":"text","value":"Apps","line":213}],"line":213},{"type":"text","value":", with the tag ","line":213},{"type":"strong","children":[{"type":"text","value":"Repository","line":213}],"line":213},{"type":"text","value":", its address, and, in ","line":213},{"type":"strong","children":[{"type":"text","value":"Open to","line":213}],"line":213},{"type":"text","value":", the group the binding names, tagged ","line":213},{"type":"strong","children":[{"type":"text","value":"From repository","line":213}],"line":213},{"type":"text","value":" in the Share sheet. Its address is ","line":213},{"type":"inlineCode","value":"/apps/<tenant>/<workspace>/<app>/","line":213},{"type":"text","value":" on the instance's address for apps.","line":213}],"line":213},{"type":"paragraph","children":[{"type":"text","value":"A repository app is served at the console's address, or at ","line":215},{"type":"inlineCode","value":"APPS_URL","line":215},{"type":"text","value":" when the operator set one. Every page is served sandboxed: it has no origin of its own, so it has no cookie, no ","line":215},{"type":"inlineCode","value":"localStorage","line":215},{"type":"text","value":" or ","line":215},{"type":"inlineCode","value":"sessionStorage","line":215},{"type":"text","value":", and cannot read another page. It acts with a token the instance puts in the page. What an app remembered in the browser, such as a chosen tab, is forgotten on reload. See ","line":215},{"type":"link","href":"../../explanation/apps/app-access","children":[{"type":"text","value":"How access to an app works","line":215}],"line":215},{"type":"text","value":".","line":215}],"line":215},{"type":"heading","depth":2,"id":"what-the-build-checks","children":[{"type":"text","value":"What the build checks","line":217}],"line":217},{"type":"table","align":[null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Check","line":219}]},{"type":"tableCell","children":[{"type":"text","value":"Rule","line":219}]}],"line":219},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"Source","line":221}]},{"type":"tableCell","children":[{"type":"text","value":"The app's ","line":221},{"type":"inlineCode","value":"source","line":221},{"type":"text","value":" is inside the repository and holds ","line":221},{"type":"inlineCode","value":"index.html","line":221},{"type":"text","value":".","line":221}]}],"line":221},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"Plugins","line":222}]},{"type":"tableCell","children":[{"type":"text","value":"The React and Tailwind plugins load for you. If the app folder has its own ","line":222},{"type":"inlineCode","value":"vite.config.ts","line":222},{"type":"text","value":", ","line":222},{"type":"inlineCode","value":".js","line":222},{"type":"text","value":", ","line":222},{"type":"inlineCode","value":".mjs","line":222},{"type":"text","value":" or ","line":222},{"type":"inlineCode","value":".mts","line":222},{"type":"text","value":", that file is used instead and you load them yourself. The build uses a ","line":222},{"type":"inlineCode","value":"base","line":222},{"type":"text","value":" of ","line":222},{"type":"inlineCode","value":"./","line":222},{"type":"text","value":", in production mode, so the same files are served under a path and at a hostname's root.","line":222}]}],"line":222},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"File names","line":223}]},{"type":"tableCell","children":[{"type":"text","value":"Each part of a file's path is made of letters, digits and ","line":223},{"type":"inlineCode","value":". _ @ ~ -","line":223},{"type":"text","value":", and starts with a letter, a digit, or one ","line":223},{"type":"inlineCode","value":"_","line":223},{"type":"text","value":" or ","line":223},{"type":"inlineCode","value":".","line":223},{"type":"text","value":" (so ","line":223},{"type":"inlineCode","value":".well-known/assetlinks.json","line":223},{"type":"text","value":" and ","line":223},{"type":"inlineCode","value":"_commonjsHelpers-1a2b.js","line":223},{"type":"text","value":" are allowed). A path is at most 500 characters. A path that starts with ","line":223},{"type":"inlineCode","value":"_/","line":223},{"type":"text","value":", a part that is ","line":223},{"type":"inlineCode","value":".","line":223},{"type":"text","value":" or ","line":223},{"type":"inlineCode","value":"..","line":223},{"type":"text","value":", spaces and accents are refused. The error names the file and says to rename it in ","line":223},{"type":"inlineCode","value":"public/","line":223},{"type":"text","value":", or in the build's ","line":223},{"type":"inlineCode","value":"rollupOptions.output","line":223},{"type":"text","value":".","line":223}]}],"line":223},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"Entry","line":224}]},{"type":"tableCell","children":[{"type":"text","value":"The entry file is among the files. Nothing is under ","line":224},{"type":"inlineCode","value":"_/","line":224},{"type":"text","value":". No file appears twice.","line":224}]}],"line":224},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"Size","line":225}]},{"type":"tableCell","children":[{"type":"text","value":"A file is at most 25 MB. A bundle lists at most 5,000 files and is at most 20 MB of JSON.","line":225}]}],"line":225}],"line":219},{"type":"paragraph","children":[{"type":"text","value":"Files that no deployable version names any more are removed a week after the deploy that stopped naming them. A version older than a week is deployed again by uploading its files again, which ","line":227},{"type":"inlineCode","value":"volvel deploy","line":227},{"type":"text","value":" and ","line":227},{"type":"inlineCode","value":"volvel promote","line":227},{"type":"text","value":" do for you.","line":227}],"line":227},{"type":"heading","depth":2,"id":"if-it-does-not-work","children":[{"type":"text","value":"If it does not work","line":229}],"line":229},{"type":"table","align":[null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"What you see","line":231}]},{"type":"tableCell","children":[{"type":"text","value":"Why and what to do","line":231}]}],"line":231},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"\"This repository defines an app, which is built with Vite. Install it: add vite and @vitejs/plugin-react to devDependencies.\"","line":233}]},{"type":"tableCell","children":[{"type":"text","value":"Add them and install.","line":233}]}],"line":233},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"\"the app \"desk\" needs a source, an interface or docs, and only one of them.\"","line":234}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"defineApp","line":234},{"type":"text","value":" was given none or several of ","line":234},{"type":"inlineCode","value":"source","line":234},{"type":"text","value":", ","line":234},{"type":"inlineCode","value":"interface","line":234},{"type":"text","value":" and ","line":234},{"type":"inlineCode","value":"docs","line":234},{"type":"text","value":".","line":234}]}],"line":234},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"The build names a file and says to rename it.","line":235}]},{"type":"tableCell","children":[{"type":"text","value":"A name the app cannot be served under: see the file names row above.","line":235}]}],"line":235},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"The deploy stops and lists console resources it would delete.","line":236}]},{"type":"tableCell","children":[{"type":"text","value":"The workspace holds resources the repository has no file for. Name each one with ","line":236},{"type":"inlineCode","value":"--allow-delete <path>","line":236},{"type":"text","value":", or add the file.","line":236}]}],"line":236},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"The app opens and the table is empty, or the page says it may not read.","line":237}]},{"type":"tableCell","children":[{"type":"text","value":"The group has the app and no binding at the table. Add the second binding in step 6.","line":237}]}],"line":237},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"text","value":"\"Sign in to start a script\" in the page.","line":238}]},{"type":"tableCell","children":[{"type":"text","value":"The person is not signed in. See ","line":238},{"type":"link","href":"../../explanation/apps/app-access","children":[{"type":"text","value":"How access to an app works","line":238}],"line":238},{"type":"text","value":".","line":238}]}],"line":238}],"line":231},{"type":"heading","depth":2,"id":"related","children":[{"type":"text","value":"Related","line":240}],"line":240},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"link","href":"run-an-app-while-you-write-it","children":[{"type":"text","value":"Run an app while you write it","line":242}],"line":242}],"line":242},{"type":"listItem","children":[{"type":"link","href":"../../reference/apps/app-client","children":[{"type":"text","value":"The app client","line":243}],"line":243}],"line":243},{"type":"listItem","children":[{"type":"link","href":"../../reference/apps/content-policy","children":[{"type":"text","value":"What an app may load","line":244}],"line":244}],"line":244},{"type":"listItem","children":[{"type":"link","href":"../../../console/how-to/apps/share-an-app","children":[{"type":"text","value":"Share an app","line":245}],"line":245}],"line":245}],"line":242}]},"description":"Put an app in a tenant's repository with defineApp, build it with Vite, deploy it to a dev workspace and say who may open it with YAML bindings."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"path":"develop/how-to/cli/install-from-source","title":"Run the command line from a checkout","tree":{"type":"root","v":1,"children":[{"type":"heading","depth":2,"id":"run-the-command-line-from-a-checkout","children":[{"type":"text","value":"Run the command line from a checkout","line":7}],"line":7},{"type":"paragraph","children":[{"type":"text","value":"By the end the checkout's own ","line":9},{"type":"inlineCode","value":"volvel","line":9},{"type":"text","value":" runs from any folder, as the ","line":9},{"type":"inlineCode","value":"volvel","line":9},{"type":"text","value":" alias, and you can build and deploy the repository's examples with it.","line":9}],"line":9},{"type":"paragraph","children":[{"type":"text","value":"This page is for working on Volvel itself, or for trying the CLI before there is a release. To use the CLI in your own repository, ","line":11},{"type":"link","href":"install-the-cli","children":[{"type":"text","value":"install it","line":11}],"line":11},{"type":"text","value":".","line":11}],"line":11},{"type":"heading","depth":2,"id":"before-you-start","children":[{"type":"text","value":"Before you start","line":13}],"line":13},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"A checkout of the Volvel repository.","line":15}],"line":15},{"type":"listItem","children":[{"type":"text","value":"Node
|
|
1
|
+
{"path":"develop/how-to/cli/install-from-source","title":"Run the command line from a checkout","tree":{"type":"root","v":1,"children":[{"type":"heading","depth":2,"id":"run-the-command-line-from-a-checkout","children":[{"type":"text","value":"Run the command line from a checkout","line":7}],"line":7},{"type":"paragraph","children":[{"type":"text","value":"By the end the checkout's own ","line":9},{"type":"inlineCode","value":"volvel","line":9},{"type":"text","value":" runs from any folder, as the ","line":9},{"type":"inlineCode","value":"volvel","line":9},{"type":"text","value":" alias, and you can build and deploy the repository's examples with it.","line":9}],"line":9},{"type":"paragraph","children":[{"type":"text","value":"This page is for working on Volvel itself, or for trying the CLI before there is a release. To use the CLI in your own repository, ","line":11},{"type":"link","href":"install-the-cli","children":[{"type":"text","value":"install it","line":11}],"line":11},{"type":"text","value":".","line":11}],"line":11},{"type":"heading","depth":2,"id":"before-you-start","children":[{"type":"text","value":"Before you start","line":13}],"line":13},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"A checkout of the Volvel repository.","line":15}],"line":15},{"type":"listItem","children":[{"type":"text","value":"Node 26 or later and pnpm 9.15, the versions in the repository's ","line":16},{"type":"inlineCode","value":"package.json","line":16},{"type":"text","value":" (","line":16},{"type":"inlineCode","value":"engines","line":16},{"type":"text","value":" and ","line":16},{"type":"inlineCode","value":"packageManager","line":16},{"type":"text","value":").","line":16}],"line":16},{"type":"listItem","children":[{"type":"text","value":"The setup for working on the instance itself (Docker, the database, ","line":17},{"type":"inlineCode","value":"pnpm dev","line":17},{"type":"text","value":") is in the repository's ","line":17},{"type":"inlineCode","value":"CONTRIBUTING.md","line":17},{"type":"text","value":". You do not need it to run the CLI. You do need an instance to sign in to: the steps use one you already have.","line":17}],"line":17}],"line":15},{"type":"heading","depth":2,"id":"run-it-from-the-checkout","children":[{"type":"text","value":"Run it from the checkout","line":19}],"line":19},{"type":"component","name":"steps","form":"container","props":{},"children":[{"type":"list","ordered":true,"children":[{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"In the checkout, install and build:","line":22}],"line":22},{"type":"code","value":"pnpm install\npnpm build","lang":"bash","line":24},{"type":"paragraph","children":[{"type":"inlineCode","value":"pnpm build","line":29},{"type":"text","value":" makes ","line":29},{"type":"inlineCode","value":"packages/cli/dist/bin.js","line":29},{"type":"text","value":", the file the ","line":29},{"type":"inlineCode","value":"volvel","line":29},{"type":"text","value":" command runs.","line":29}],"line":29}],"line":22},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Make ","line":30},{"type":"inlineCode","value":"volvel","line":30},{"type":"text","value":" a name for it in your shell. From the checkout:","line":30}],"line":30},{"type":"code","value":"alias volvel=\"node $PWD/packages/cli/dist/bin.js\"","lang":"bash","line":32},{"type":"paragraph","children":[{"type":"text","value":"Put the line in your shell's startup file to keep it.","line":36}],"line":36}],"line":30},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Check it:","line":37}],"line":37},{"type":"code","value":"volvel --version","lang":"bash","line":39},{"type":"code","value":"volvel 0.5.0","lang":"text","line":43}],"line":37},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Sign in, with a key made under ","line":46},{"type":"strong","children":[{"type":"text","value":"Account","line":46}],"line":46},{"type":"text","value":" in the console, and build an example:","line":46}],"line":46},{"type":"code","value":"volvel login --url <your instance> --token <api key>\ncd examples/acme\nvolvel build","lang":"bash","line":48},{"type":"paragraph","children":[{"type":"inlineCode","value":"volvel build","line":54},{"type":"text","value":" lists what the repository holds and writes ","line":54},{"type":"inlineCode","value":".platform/bundle.json","line":54},{"type":"text","value":". The examples take the SDK of the checkout through pnpm's workspace. A repository of your own, outside the checkout, takes it from ","line":54},{"type":"link","href":"install-the-cli","children":[{"type":"text","value":"tarballs","line":54}],"line":54},{"type":"text","value":".","line":54}],"line":54}],"line":46}],"line":22}],"line":21,"endLine":55},{"type":"heading","depth":2,"id":"the-result","children":[{"type":"text","value":"The result","line":57}],"line":57},{"type":"paragraph","children":[{"type":"inlineCode","value":"volvel","line":59},{"type":"text","value":" runs the code of the checkout: after a change to ","line":59},{"type":"inlineCode","value":"packages/cli/src","line":59},{"type":"text","value":", run ","line":59},{"type":"inlineCode","value":"pnpm build","line":59},{"type":"text","value":" (or ","line":59},{"type":"inlineCode","value":"tsc -b","line":59},{"type":"text","value":") again and the alias runs the new code. ","line":59},{"type":"inlineCode","value":"volvel --version","line":59},{"type":"text","value":" prints the version of ","line":59},{"type":"inlineCode","value":"packages/cli/package.json","line":59},{"type":"text","value":".","line":59}],"line":59},{"type":"heading","depth":2,"id":"if-it-does-not-work","children":[{"type":"text","value":"If it does not work","line":61}],"line":61},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"strong","children":[{"type":"inlineCode","value":"Cannot find module .../packages/cli/dist/bin.js","line":63},{"type":"text","value":".","line":63}],"line":63},{"type":"text","value":" The checkout is not built. Run ","line":63},{"type":"inlineCode","value":"pnpm build","line":63},{"type":"text","value":".","line":63}],"line":63},{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"An example says the SDK cannot be found.","line":64}],"line":64},{"type":"text","value":" Run ","line":64},{"type":"inlineCode","value":"pnpm install","line":64},{"type":"text","value":" in the checkout's root, so that pnpm links the workspace's packages into the examples.","line":64}],"line":64},{"type":"listItem","children":[{"type":"text","value":"To send an example to a workspace, see ","line":65},{"type":"link","href":"deploy-a-repository","children":[{"type":"text","value":"Deploy a repository","line":65}],"line":65},{"type":"text","value":".","line":65}],"line":65}],"line":63}]},"description":"Build the Volvel repository and run its CLI from the checkout, with no install, to try the repository's own examples."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"path":"develop/how-to/cli/install-the-cli","title":"Install the command line","tree":{"type":"root","v":1,"children":[{"type":"heading","depth":2,"id":"install-the-command-line","children":[{"type":"text","value":"Install the command line","line":7}],"line":7},{"type":"paragraph","children":[{"type":"text","value":"By the end ","line":9},{"type":"inlineCode","value":"volvel --version","line":9},{"type":"text","value":" prints a version and a repository you start can import ","line":9},{"type":"inlineCode","value":"@volvel/sdk","line":9},{"type":"text","value":".","line":9}],"line":9},{"type":"component","name":"alert","form":"container","props":{"type":"info"},"children":[{"type":"paragraph","children":[{"type":"text","value":"The ","line":12},{"type":"inlineCode","value":"@volvel","line":12},{"type":"text","value":" packages are on npm from 0.6.0, the first public release. The command that installs the CLI is ","line":12},{"type":"inlineCode","value":"npm install --global @volvel/cli","line":12},{"type":"text","value":". To run what is in a checkout of the repository instead, install from tarballs, as the last steps below do. Everything after the install step is the same either way.","line":12}],"line":12}],"label":"From npm, since 0.6.0","line":11,"endLine":13},{"type":"heading","depth":2,"id":"before-you-start","children":[{"type":"text","value":"Before you start","line":15}],"line":15},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"Node 24 or later. The repository's ","line":17},{"type":"inlineCode","value":".nvmrc","line":17},{"type":"text","value":" says 24 and its ","line":17},{"type":"inlineCode","value":"package.json","line":17},{"type":"text","value":" says ","line":17},{"type":"inlineCode","value":"\"node\": \">=24\"","line":17},{"type":"text","value":".","line":17}],"line":17},{"type":"listItem","children":[{"type":"text","value":"npm, which comes with Node.","line":18}],"line":18},{"type":"listItem","children":[{"type":"text","value":"Only to install from tarballs: a checkout of the Volvel repository, built. If you do not have one, follow ","line":19},{"type":"link","href":"install-from-source","children":[{"type":"text","value":"Install from source","line":19}],"line":19},{"type":"text","value":" first and come back for the tarballs.","line":19}],"line":19}],"line":17},{"type":"heading","depth":2,"id":"install-from-npm","children":[{"type":"text","value":"Install from npm","line":21}],"line":21},{"type":"code","value":"npm install --global @volvel/cli\nvolvel --version","lang":"bash","line":23},{"type":"paragraph","children":[{"type":"text","value":"The package is ","line":28},{"type":"inlineCode","value":"@volvel/cli","line":28},{"type":"text","value":" on npm. A repository gets the SDK from its own ","line":28},{"type":"inlineCode","value":"package.json","line":28},{"type":"text","value":". ","line":28},{"type":"inlineCode","value":"volvel init","line":28},{"type":"text","value":" writes the dependency ","line":28},{"type":"inlineCode","value":"@volvel/sdk","line":28},{"type":"text","value":" at ","line":28},{"type":"inlineCode","value":"^0.5.0","line":28},{"type":"text","value":", and ","line":28},{"type":"inlineCode","value":"npm install","line":28},{"type":"text","value":" in the repository fetches it.","line":28}],"line":28},{"type":"heading","depth":2,"id":"install-from-tarballs","children":[{"type":"text","value":"Install from tarballs","line":30}],"line":30},{"type":"paragraph","children":[{"type":"text","value":"Use this to run the code of a checkout, for example one you changed. It is not needed for a release. The CLI has one runtime dependency, ","line":32},{"type":"inlineCode","value":"esbuild","line":32},{"type":"text","value":", which npm fetches from the registry as it does for any package. The SDK depends on ","line":32},{"type":"inlineCode","value":"@volvel/widgets","line":32},{"type":"text","value":", so pack that too.","line":32}],"line":32},{"type":"component","name":"steps","form":"container","props":{},"children":[{"type":"list","ordered":true,"children":[{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"In the checkout, build everything once: ","line":35},{"type":"inlineCode","value":"pnpm build","line":35},{"type":"text","value":". The CLI's packing step needs the files that draw an interface, which ","line":35},{"type":"inlineCode","value":"pnpm build","line":35},{"type":"text","value":" makes.","line":35}],"line":35}],"line":35},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Make a folder for the tarballs, then pack the three packages into it. The folder is yours to name; ","line":36},{"type":"inlineCode","value":"~/volvel-tarballs","line":36},{"type":"text","value":" is used here.","line":36}],"line":36},{"type":"code","value":"mkdir -p ~/volvel-tarballs\n(cd packages/cli && pnpm pack --pack-destination ~/volvel-tarballs)\n(cd packages/sdk && pnpm pack --pack-destination ~/volvel-tarballs)\n(cd packages/widget-sdk && pnpm pack --pack-destination ~/volvel-tarballs)","lang":"bash","line":38},{"type":"paragraph","children":[{"type":"text","value":"The folder holds ","line":45},{"type":"inlineCode","value":"volvel-cli-0.5.0.tgz","line":45},{"type":"text","value":", ","line":45},{"type":"inlineCode","value":"volvel-sdk-0.5.0.tgz","line":45},{"type":"text","value":" and ","line":45},{"type":"inlineCode","value":"volvel-widgets-0.5.0.tgz","line":45},{"type":"text","value":".","line":45}],"line":45}],"line":36},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Install the CLI from its tarball, away from the checkout:","line":46}],"line":46},{"type":"code","value":"npm install --global ~/volvel-tarballs/volvel-cli-0.5.0.tgz","lang":"bash","line":48},{"type":"paragraph","children":[{"type":"text","value":"npm adds the CLI and ","line":52},{"type":"inlineCode","value":"esbuild","line":52},{"type":"text","value":", with the binary of ","line":52},{"type":"inlineCode","value":"esbuild","line":52},{"type":"text","value":" for your platform.","line":52}],"line":52}],"line":46},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Check it runs:","line":53}],"line":53},{"type":"code","value":"volvel --version","lang":"bash","line":55},{"type":"code","value":"volvel 0.5.0","lang":"text","line":59}],"line":53},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"For each repository you start, install the SDK from its tarballs in place of the registry:","line":62}],"line":62},{"type":"code","value":"npm install ~/volvel-tarballs/volvel-sdk-0.5.0.tgz ~/volvel-tarballs/volvel-widgets-0.5.0.tgz","lang":"bash","line":64},{"type":"paragraph","children":[{"type":"text","value":"npm rewrites the two dependencies in the repository's ","line":68},{"type":"inlineCode","value":"package.json","line":68},{"type":"text","value":" to ","line":68},{"type":"inlineCode","value":"file:","line":68},{"type":"text","value":" paths. Change them back to the registry's version to use a release.","line":68}],"line":68}],"line":62}],"line":35}],"line":34,"endLine":69},{"type":"heading","depth":2,"id":"the-result","children":[{"type":"text","value":"The result","line":71}],"line":71},{"type":"paragraph","children":[{"type":"inlineCode","value":"volvel","line":73},{"type":"text","value":" is on your path, and ","line":73},{"type":"inlineCode","value":"volvel --help","line":73},{"type":"text","value":" lists the commands. The command line keeps what it saves in ","line":73},{"type":"inlineCode","value":"$XDG_CONFIG_HOME/volvel/","line":73},{"type":"text","value":", or ","line":73},{"type":"inlineCode","value":"~/.config/volvel/","line":73},{"type":"text","value":" when that variable is not set; the next step is to ","line":73},{"type":"link","href":"../../tutorials/cli/quickstart","children":[{"type":"text","value":"sign in and deploy","line":73}],"line":73},{"type":"text","value":".","line":73}],"line":73},{"type":"heading","depth":2,"id":"if-it-does-not-work","children":[{"type":"text","value":"If it does not work","line":75}],"line":75},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"strong","children":[{"type":"inlineCode","value":"volvel: command not found","line":77},{"type":"text","value":".","line":77}],"line":77},{"type":"text","value":" npm's global folder is not on your ","line":77},{"type":"inlineCode","value":"PATH","line":77},{"type":"text","value":". ","line":77},{"type":"inlineCode","value":"npm config get prefix","line":77},{"type":"text","value":" names the folder; its ","line":77},{"type":"inlineCode","value":"bin","line":77},{"type":"text","value":" folder must be on the path.","line":77}],"line":77},{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"npm cannot find ","line":78},{"type":"inlineCode","value":"@volvel/cli","line":78},{"type":"text","value":" or ","line":78},{"type":"inlineCode","value":"@volvel/sdk","line":78},{"type":"text","value":".","line":78}],"line":78},{"type":"text","value":" The name is misspelled, or the version asked for is below 0.6.0: nothing was published before it. To run a checkout, install from the tarballs above.","line":78}],"line":78},{"type":"listItem","children":[{"type":"strong","children":[{"type":"inlineCode","value":"npm install","line":79},{"type":"text","value":" of the SDK tarball fails on ","line":79},{"type":"inlineCode","value":"@volvel/widgets","line":79},{"type":"text","value":".","line":79}],"line":79},{"type":"text","value":" The SDK names the widgets package at its own version, ","line":79},{"type":"inlineCode","value":"0.5.0","line":79},{"type":"text","value":". Install the widgets tarball in the same command, as step 5 does.","line":79}],"line":79},{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"\"This repository defines an app, which is built with Vite. Install it: add vite and @vitejs/plugin-react to devDependencies.\"","line":80}],"line":80},{"type":"text","value":" A repository that defines an app made of files loads Vite from its own dependencies, not from the CLI. Add them there.","line":80}],"line":80}],"line":77},{"type":"paragraph","children":[{"type":"text","value":"See ","line":82},{"type":"link","href":"../../reference/cli","children":[{"type":"text","value":"the command reference","line":82}],"line":82},{"type":"text","value":" for every command.","line":82}],"line":82}]},"description":"Install the volvel command and the SDK a repository is written against, and check that the command runs."}
|
|
1
|
+
{"path":"develop/how-to/cli/install-the-cli","title":"Install the command line","tree":{"type":"root","v":1,"children":[{"type":"heading","depth":2,"id":"install-the-command-line","children":[{"type":"text","value":"Install the command line","line":7}],"line":7},{"type":"paragraph","children":[{"type":"text","value":"By the end ","line":9},{"type":"inlineCode","value":"volvel --version","line":9},{"type":"text","value":" prints a version and a repository you start can import ","line":9},{"type":"inlineCode","value":"@volvel/sdk","line":9},{"type":"text","value":".","line":9}],"line":9},{"type":"component","name":"alert","form":"container","props":{"type":"info"},"children":[{"type":"paragraph","children":[{"type":"text","value":"The ","line":12},{"type":"inlineCode","value":"@volvel","line":12},{"type":"text","value":" packages are on npm from 0.6.0, the first public release. The command that installs the CLI is ","line":12},{"type":"inlineCode","value":"npm install --global @volvel/cli","line":12},{"type":"text","value":". To run what is in a checkout of the repository instead, install from tarballs, as the last steps below do. Everything after the install step is the same either way.","line":12}],"line":12}],"label":"From npm, since 0.6.0","line":11,"endLine":13},{"type":"heading","depth":2,"id":"before-you-start","children":[{"type":"text","value":"Before you start","line":15}],"line":15},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"Node 26 or later. The repository's ","line":17},{"type":"inlineCode","value":".nvmrc","line":17},{"type":"text","value":" says 26 and its ","line":17},{"type":"inlineCode","value":"package.json","line":17},{"type":"text","value":" says ","line":17},{"type":"inlineCode","value":"\"node\": \">=26\"","line":17},{"type":"text","value":".","line":17}],"line":17},{"type":"listItem","children":[{"type":"text","value":"npm, which comes with Node.","line":18}],"line":18},{"type":"listItem","children":[{"type":"text","value":"Only to install from tarballs: a checkout of the Volvel repository, built. If you do not have one, follow ","line":19},{"type":"link","href":"install-from-source","children":[{"type":"text","value":"Install from source","line":19}],"line":19},{"type":"text","value":" first and come back for the tarballs.","line":19}],"line":19}],"line":17},{"type":"heading","depth":2,"id":"install-from-npm","children":[{"type":"text","value":"Install from npm","line":21}],"line":21},{"type":"code","value":"npm install --global @volvel/cli\nvolvel --version","lang":"bash","line":23},{"type":"paragraph","children":[{"type":"text","value":"The package is ","line":28},{"type":"inlineCode","value":"@volvel/cli","line":28},{"type":"text","value":" on npm. A repository gets the SDK from its own ","line":28},{"type":"inlineCode","value":"package.json","line":28},{"type":"text","value":". ","line":28},{"type":"inlineCode","value":"volvel init","line":28},{"type":"text","value":" writes the dependency ","line":28},{"type":"inlineCode","value":"@volvel/sdk","line":28},{"type":"text","value":" at ","line":28},{"type":"inlineCode","value":"^0.5.0","line":28},{"type":"text","value":", and ","line":28},{"type":"inlineCode","value":"npm install","line":28},{"type":"text","value":" in the repository fetches it.","line":28}],"line":28},{"type":"heading","depth":2,"id":"install-from-tarballs","children":[{"type":"text","value":"Install from tarballs","line":30}],"line":30},{"type":"paragraph","children":[{"type":"text","value":"Use this to run the code of a checkout, for example one you changed. It is not needed for a release. The CLI has one runtime dependency, ","line":32},{"type":"inlineCode","value":"esbuild","line":32},{"type":"text","value":", which npm fetches from the registry as it does for any package. The SDK depends on ","line":32},{"type":"inlineCode","value":"@volvel/widgets","line":32},{"type":"text","value":", so pack that too.","line":32}],"line":32},{"type":"component","name":"steps","form":"container","props":{},"children":[{"type":"list","ordered":true,"children":[{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"In the checkout, build everything once: ","line":35},{"type":"inlineCode","value":"pnpm build","line":35},{"type":"text","value":". The CLI's packing step needs the files that draw an interface, which ","line":35},{"type":"inlineCode","value":"pnpm build","line":35},{"type":"text","value":" makes.","line":35}],"line":35}],"line":35},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Make a folder for the tarballs, then pack the three packages into it. The folder is yours to name; ","line":36},{"type":"inlineCode","value":"~/volvel-tarballs","line":36},{"type":"text","value":" is used here.","line":36}],"line":36},{"type":"code","value":"mkdir -p ~/volvel-tarballs\n(cd packages/cli && pnpm pack --pack-destination ~/volvel-tarballs)\n(cd packages/sdk && pnpm pack --pack-destination ~/volvel-tarballs)\n(cd packages/widget-sdk && pnpm pack --pack-destination ~/volvel-tarballs)","lang":"bash","line":38},{"type":"paragraph","children":[{"type":"text","value":"The folder holds ","line":45},{"type":"inlineCode","value":"volvel-cli-0.5.0.tgz","line":45},{"type":"text","value":", ","line":45},{"type":"inlineCode","value":"volvel-sdk-0.5.0.tgz","line":45},{"type":"text","value":" and ","line":45},{"type":"inlineCode","value":"volvel-widgets-0.5.0.tgz","line":45},{"type":"text","value":".","line":45}],"line":45}],"line":36},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Install the CLI from its tarball, away from the checkout:","line":46}],"line":46},{"type":"code","value":"npm install --global ~/volvel-tarballs/volvel-cli-0.5.0.tgz","lang":"bash","line":48},{"type":"paragraph","children":[{"type":"text","value":"npm adds the CLI and ","line":52},{"type":"inlineCode","value":"esbuild","line":52},{"type":"text","value":", with the binary of ","line":52},{"type":"inlineCode","value":"esbuild","line":52},{"type":"text","value":" for your platform.","line":52}],"line":52}],"line":46},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Check it runs:","line":53}],"line":53},{"type":"code","value":"volvel --version","lang":"bash","line":55},{"type":"code","value":"volvel 0.5.0","lang":"text","line":59}],"line":53},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"For each repository you start, install the SDK from its tarballs in place of the registry:","line":62}],"line":62},{"type":"code","value":"npm install ~/volvel-tarballs/volvel-sdk-0.5.0.tgz ~/volvel-tarballs/volvel-widgets-0.5.0.tgz","lang":"bash","line":64},{"type":"paragraph","children":[{"type":"text","value":"npm rewrites the two dependencies in the repository's ","line":68},{"type":"inlineCode","value":"package.json","line":68},{"type":"text","value":" to ","line":68},{"type":"inlineCode","value":"file:","line":68},{"type":"text","value":" paths. Change them back to the registry's version to use a release.","line":68}],"line":68}],"line":62}],"line":35}],"line":34,"endLine":69},{"type":"heading","depth":2,"id":"the-result","children":[{"type":"text","value":"The result","line":71}],"line":71},{"type":"paragraph","children":[{"type":"inlineCode","value":"volvel","line":73},{"type":"text","value":" is on your path, and ","line":73},{"type":"inlineCode","value":"volvel --help","line":73},{"type":"text","value":" lists the commands. The command line keeps what it saves in ","line":73},{"type":"inlineCode","value":"$XDG_CONFIG_HOME/volvel/","line":73},{"type":"text","value":", or ","line":73},{"type":"inlineCode","value":"~/.config/volvel/","line":73},{"type":"text","value":" when that variable is not set; the next step is to ","line":73},{"type":"link","href":"../../tutorials/cli/quickstart","children":[{"type":"text","value":"sign in and deploy","line":73}],"line":73},{"type":"text","value":".","line":73}],"line":73},{"type":"heading","depth":2,"id":"if-it-does-not-work","children":[{"type":"text","value":"If it does not work","line":75}],"line":75},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"strong","children":[{"type":"inlineCode","value":"volvel: command not found","line":77},{"type":"text","value":".","line":77}],"line":77},{"type":"text","value":" npm's global folder is not on your ","line":77},{"type":"inlineCode","value":"PATH","line":77},{"type":"text","value":". ","line":77},{"type":"inlineCode","value":"npm config get prefix","line":77},{"type":"text","value":" names the folder; its ","line":77},{"type":"inlineCode","value":"bin","line":77},{"type":"text","value":" folder must be on the path.","line":77}],"line":77},{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"npm cannot find ","line":78},{"type":"inlineCode","value":"@volvel/cli","line":78},{"type":"text","value":" or ","line":78},{"type":"inlineCode","value":"@volvel/sdk","line":78},{"type":"text","value":".","line":78}],"line":78},{"type":"text","value":" The name is misspelled, or the version asked for is below 0.6.0: nothing was published before it. To run a checkout, install from the tarballs above.","line":78}],"line":78},{"type":"listItem","children":[{"type":"strong","children":[{"type":"inlineCode","value":"npm install","line":79},{"type":"text","value":" of the SDK tarball fails on ","line":79},{"type":"inlineCode","value":"@volvel/widgets","line":79},{"type":"text","value":".","line":79}],"line":79},{"type":"text","value":" The SDK names the widgets package at its own version, ","line":79},{"type":"inlineCode","value":"0.5.0","line":79},{"type":"text","value":". Install the widgets tarball in the same command, as step 5 does.","line":79}],"line":79},{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"\"This repository defines an app, which is built with Vite. Install it: add vite and @vitejs/plugin-react to devDependencies.\"","line":80}],"line":80},{"type":"text","value":" A repository that defines an app made of files loads Vite from its own dependencies, not from the CLI. Add them there.","line":80}],"line":80}],"line":77},{"type":"paragraph","children":[{"type":"text","value":"See ","line":82},{"type":"link","href":"../../reference/cli","children":[{"type":"text","value":"the command reference","line":82}],"line":82},{"type":"text","value":" for every command.","line":82}],"line":82}]},"description":"Install the volvel command and the SDK a repository is written against, and check that the command runs."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"path":"develop/how-to/cli/test-a-script","title":"Test a script without an instance","tree":{"type":"root","v":1,"children":[{"type":"heading","depth":2,"id":"test-a-script-without-an-instance","children":[{"type":"text","value":"Test a script without an instance","line":7}],"line":7},{"type":"paragraph","children":[{"type":"text","value":"By the end a test runs a script with the same checks a worker applies, against fakes you give it, and reads what the script returned, logged, published and tagged.","line":9}],"line":9},{"type":"heading","depth":2,"id":"before-you-start","children":[{"type":"text","value":"Before you start","line":11}],"line":11},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"The repository's dependencies are installed, so ","line":13},{"type":"inlineCode","value":"@volvel/sdk","line":13},{"type":"text","value":" resolves. The testing tools are a subpath of it: ","line":13},{"type":"inlineCode","value":"@volvel/sdk/testing","line":13},{"type":"text","value":".","line":13}],"line":13},{"type":"listItem","children":[{"type":"text","value":"A test runner. The SDK does not bring one. This page uses Node's own, which on Node 24 runs TypeScript files as they are.","line":14}],"line":14},{"type":"listItem","children":[{"type":"text","value":"This is separate from ","line":15},{"type":"inlineCode","value":"volvel run","line":15},{"type":"text","value":". ","line":15},{"type":"inlineCode","value":"volvel run","line":15},{"type":"text","value":" runs your script with your real connections and secrets from ","line":15},{"type":"inlineCode","value":".platform/local.json","line":15},{"type":"text","value":", and has no tables. A test runs with fakes, offline.","line":15}],"line":15}],"line":13},{"type":"heading","depth":2,"id":"write-the-test","children":[{"type":"text","value":"Write the test","line":17}],"line":17},{"type":"component","name":"steps","form":"container","props":{},"children":[{"type":"list","ordered":true,"children":[{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Make ","line":20},{"type":"inlineCode","value":"test/hello.test.ts","line":20},{"type":"text","value":" next to ","line":20},{"type":"inlineCode","value":"src/","line":20},{"type":"text","value":". Import the script from ","line":20},{"type":"inlineCode","value":"src/index.ts","line":20},{"type":"text","value":" and ","line":20},{"type":"inlineCode","value":"runScript","line":20},{"type":"text","value":" from the testing subpath:","line":20}],"line":20},{"type":"code","value":"import assert from \"node:assert/strict\";\nimport { test } from \"node:test\";\nimport { runScript } from \"@volvel/sdk/testing\";\nimport { hello } from \"../src/index.ts\";\n\ntest(\"hello opens with the workspace's greeting\", async () => {\n const { output, logs } = await runScript(\n hello,\n { name: \"Ada\" },\n { variables: { greeting: \"Good evening\" } },\n );\n assert.deepEqual(output, { greeting: \"Good evening, Ada\" });\n assert.equal(logs[0]?.message, \"Saying hello\");\n});\n\ntest(\"hello refuses input that is not a name\", async () => {\n await assert.rejects(runScript(hello, { name: 7 }), /does not match its schema/);\n});\n\ntest(\"a variable the test gives no value for is said to be missing\", async () => {\n await assert.rejects(runScript(hello, {}), /no stand-in/);\n});","lang":"ts","meta":"title=\"test/hello.test.ts\"","line":22},{"type":"paragraph","children":[{"type":"inlineCode","value":"runScript(script, input, options)","line":47},{"type":"text","value":" checks the input against the script's ","line":47},{"type":"inlineCode","value":"input","line":47},{"type":"text","value":" schema and the output against its ","line":47},{"type":"inlineCode","value":"output","line":47},{"type":"text","value":" schema. It holds the script to what its definition declares: a connection, secret, variable, table, source or event the script did not list is refused, as ","line":47},{"type":"inlineCode","value":"The script did not declare the secret \"other\". Add it to the script's definition.","line":47},{"type":"text","value":" One it listed and the test gave no fake for is ","line":47},{"type":"inlineCode","value":"The variable \"greeting\" has no stand-in in this test. Give one under variables.","line":47}],"line":47}],"line":20},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Run it:","line":48}],"line":48},{"type":"code","value":"node --test \"test/**/*.test.ts\"","lang":"bash","line":50},{"type":"code","value":"✔ hello opens with the workspace's greeting (3.6064ms)\n✔ hello refuses input that is not a name (1.1158ms)\n✔ a variable the test gives no value for is said to be missing (0.4228ms)\nℹ tests 3\nℹ pass 3\nℹ fail 0","lang":"text","line":54},{"type":"paragraph","children":[{"type":"text","value":"The quotation marks stop the shell from expanding the pattern; Node does.","line":63}],"line":63}],"line":48},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Give a script more to talk to. ","line":64},{"type":"inlineCode","value":"options","line":64},{"type":"text","value":" takes, all optional:","line":64}],"line":64},{"type":"table","align":[null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Option","line":66}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":66}]}],"line":66},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"connections","line":68}]},{"type":"tableCell","children":[{"type":"text","value":"A fake client for each connection, by the connection's path.","line":68}]}],"line":68},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"groups","line":69}]},{"type":"tableCell","children":[{"type":"text","value":"The members of each connection group: the group's path, then each member's key, with ","line":69},{"type":"inlineCode","value":"client","line":69},{"type":"text","value":" and ","line":69},{"type":"inlineCode","value":"label","line":69},{"type":"text","value":".","line":69}]}],"line":69},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"secrets","line":70},{"type":"text","value":", ","line":70},{"type":"inlineCode","value":"variables","line":70}]},{"type":"tableCell","children":[{"type":"text","value":"Values, by name and by path.","line":70}]}],"line":70},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"tables","line":71}]},{"type":"tableCell","children":[{"type":"text","value":"A table by its path: either an object that stands in for it, or an array of rows to start from.","line":71}]}],"line":71},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"sources","line":72}]},{"type":"tableCell","children":[{"type":"text","value":"A data source's tables, by the source's path and then the table's name, as for ","line":72},{"type":"inlineCode","value":"tables","line":72},{"type":"text","value":".","line":72}]}],"line":72},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"startedBy","line":73},{"type":"text","value":", ","line":73},{"type":"inlineCode","value":"trigger","line":73},{"type":"text","value":", ","line":73},{"type":"inlineCode","value":"attempt","line":73},{"type":"text","value":", ","line":73},{"type":"inlineCode","value":"signal","line":73}]},{"type":"tableCell","children":[{"type":"text","value":"What ","line":73},{"type":"inlineCode","value":"ctx.run","line":73},{"type":"text","value":" and ","line":73},{"type":"inlineCode","value":"ctx.signal","line":73},{"type":"text","value":" say. The defaults are the system, a trigger of type ","line":73},{"type":"inlineCode","value":"test","line":73},{"type":"text","value":", attempt 1 and a signal that is not aborted.","line":73}]}],"line":73}],"line":66},{"type":"paragraph","children":[{"type":"inlineCode","value":"memoryTable(rows)","line":75},{"type":"text","value":" makes a table that holds its rows in memory. It is the fake for ","line":75},{"type":"inlineCode","value":"tables","line":75},{"type":"text","value":", and its ","line":75},{"type":"inlineCode","value":"rows","line":75},{"type":"text","value":" list is what the script left in it, to assert on. ","line":75},{"type":"inlineCode","value":"testContext(options, declared)","line":75},{"type":"text","value":" makes the context alone, for code that you call with a context of your own.","line":75}],"line":75}],"line":64}],"line":20}],"line":19,"endLine":76},{"type":"heading","depth":2,"id":"the-result","children":[{"type":"text","value":"The result","line":78}],"line":78},{"type":"paragraph","children":[{"type":"inlineCode","value":"runScript","line":80},{"type":"text","value":" returns ","line":80},{"type":"inlineCode","value":"{ output, logs, events, tags, files }","line":80},{"type":"text","value":": what the script returned, each log line with its level and fields, each event it published, the tags it set and the files it stored. Nothing leaves the process.","line":80}],"line":80},{"type":"heading","depth":2,"id":"if-it-does-not-work","children":[{"type":"text","value":"If it does not work","line":82}],"line":82},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"Node cannot find ","line":84},{"type":"inlineCode","value":"@volvel/sdk","line":84},{"type":"text","value":".","line":84}],"line":84},{"type":"text","value":" The repository's dependencies are not installed. Run ","line":84},{"type":"inlineCode","value":"npm install","line":84},{"type":"text","value":" in it; see ","line":84},{"type":"link","href":"install-the-cli","children":[{"type":"text","value":"Install the command line","line":84}],"line":84},{"type":"text","value":" for the tarballs until there is a release.","line":84}],"line":84},{"type":"listItem","children":[{"type":"strong","children":[{"type":"inlineCode","value":"The script's input does not match its schema","line":85},{"type":"text","value":".","line":85}],"line":85},{"type":"text","value":" The test's input is not what the script's ","line":85},{"type":"inlineCode","value":"input","line":85},{"type":"text","value":" accepts.","line":85}],"line":85},{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"A test of a script that calls a connector's real API.","line":86}],"line":86},{"type":"text","value":" The connection's fake is yours to write: an object with the methods the script calls. ","line":86},{"type":"inlineCode","value":"runScript","line":86},{"type":"text","value":" does not call the network for you.","line":86}],"line":86},{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"The test passes, and the deployed script fails.","line":87}],"line":87},{"type":"text","value":" A fake agrees with what you wrote, not with the instance. Try the script in a dev workspace with ","line":87},{"type":"link","href":"run-a-script-on-the-instance","children":[{"type":"text","value":"Run a script on the instance","line":87}],"line":87},{"type":"text","value":".","line":87}],"line":87}],"line":84}]},"description":"Run a script in a unit test with fakes for its connections, secrets, variables and tables, using @volvel/sdk/testing."}
|
|
1
|
+
{"path":"develop/how-to/cli/test-a-script","title":"Test a script without an instance","tree":{"type":"root","v":1,"children":[{"type":"heading","depth":2,"id":"test-a-script-without-an-instance","children":[{"type":"text","value":"Test a script without an instance","line":7}],"line":7},{"type":"paragraph","children":[{"type":"text","value":"By the end a test runs a script with the same checks a worker applies, against fakes you give it, and reads what the script returned, logged, published and tagged.","line":9}],"line":9},{"type":"heading","depth":2,"id":"before-you-start","children":[{"type":"text","value":"Before you start","line":11}],"line":11},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"text","value":"The repository's dependencies are installed, so ","line":13},{"type":"inlineCode","value":"@volvel/sdk","line":13},{"type":"text","value":" resolves. The testing tools are a subpath of it: ","line":13},{"type":"inlineCode","value":"@volvel/sdk/testing","line":13},{"type":"text","value":".","line":13}],"line":13},{"type":"listItem","children":[{"type":"text","value":"A test runner. The SDK does not bring one. This page uses Node's own, which on Node 26 runs TypeScript files as they are.","line":14}],"line":14},{"type":"listItem","children":[{"type":"text","value":"This is separate from ","line":15},{"type":"inlineCode","value":"volvel run","line":15},{"type":"text","value":". ","line":15},{"type":"inlineCode","value":"volvel run","line":15},{"type":"text","value":" runs your script with your real connections and secrets from ","line":15},{"type":"inlineCode","value":".platform/local.json","line":15},{"type":"text","value":", and has no tables. A test runs with fakes, offline.","line":15}],"line":15}],"line":13},{"type":"heading","depth":2,"id":"write-the-test","children":[{"type":"text","value":"Write the test","line":17}],"line":17},{"type":"component","name":"steps","form":"container","props":{},"children":[{"type":"list","ordered":true,"children":[{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Make ","line":20},{"type":"inlineCode","value":"test/hello.test.ts","line":20},{"type":"text","value":" next to ","line":20},{"type":"inlineCode","value":"src/","line":20},{"type":"text","value":". Import the script from ","line":20},{"type":"inlineCode","value":"src/index.ts","line":20},{"type":"text","value":" and ","line":20},{"type":"inlineCode","value":"runScript","line":20},{"type":"text","value":" from the testing subpath:","line":20}],"line":20},{"type":"code","value":"import assert from \"node:assert/strict\";\nimport { test } from \"node:test\";\nimport { runScript } from \"@volvel/sdk/testing\";\nimport { hello } from \"../src/index.ts\";\n\ntest(\"hello opens with the workspace's greeting\", async () => {\n const { output, logs } = await runScript(\n hello,\n { name: \"Ada\" },\n { variables: { greeting: \"Good evening\" } },\n );\n assert.deepEqual(output, { greeting: \"Good evening, Ada\" });\n assert.equal(logs[0]?.message, \"Saying hello\");\n});\n\ntest(\"hello refuses input that is not a name\", async () => {\n await assert.rejects(runScript(hello, { name: 7 }), /does not match its schema/);\n});\n\ntest(\"a variable the test gives no value for is said to be missing\", async () => {\n await assert.rejects(runScript(hello, {}), /no stand-in/);\n});","lang":"ts","meta":"title=\"test/hello.test.ts\"","line":22},{"type":"paragraph","children":[{"type":"inlineCode","value":"runScript(script, input, options)","line":47},{"type":"text","value":" checks the input against the script's ","line":47},{"type":"inlineCode","value":"input","line":47},{"type":"text","value":" schema and the output against its ","line":47},{"type":"inlineCode","value":"output","line":47},{"type":"text","value":" schema. It holds the script to what its definition declares: a connection, secret, variable, table, source or event the script did not list is refused, as ","line":47},{"type":"inlineCode","value":"The script did not declare the secret \"other\". Add it to the script's definition.","line":47},{"type":"text","value":" One it listed and the test gave no fake for is ","line":47},{"type":"inlineCode","value":"The variable \"greeting\" has no stand-in in this test. Give one under variables.","line":47}],"line":47}],"line":20},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Run it:","line":48}],"line":48},{"type":"code","value":"node --test \"test/**/*.test.ts\"","lang":"bash","line":50},{"type":"code","value":"✔ hello opens with the workspace's greeting (3.6064ms)\n✔ hello refuses input that is not a name (1.1158ms)\n✔ a variable the test gives no value for is said to be missing (0.4228ms)\nℹ tests 3\nℹ pass 3\nℹ fail 0","lang":"text","line":54},{"type":"paragraph","children":[{"type":"text","value":"The quotation marks stop the shell from expanding the pattern; Node does.","line":63}],"line":63}],"line":48},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"text","value":"Give a script more to talk to. ","line":64},{"type":"inlineCode","value":"options","line":64},{"type":"text","value":" takes, all optional:","line":64}],"line":64},{"type":"table","align":[null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Option","line":66}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":66}]}],"line":66},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"connections","line":68}]},{"type":"tableCell","children":[{"type":"text","value":"A fake client for each connection, by the connection's path.","line":68}]}],"line":68},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"groups","line":69}]},{"type":"tableCell","children":[{"type":"text","value":"The members of each connection group: the group's path, then each member's key, with ","line":69},{"type":"inlineCode","value":"client","line":69},{"type":"text","value":" and ","line":69},{"type":"inlineCode","value":"label","line":69},{"type":"text","value":".","line":69}]}],"line":69},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"secrets","line":70},{"type":"text","value":", ","line":70},{"type":"inlineCode","value":"variables","line":70}]},{"type":"tableCell","children":[{"type":"text","value":"Values, by name and by path.","line":70}]}],"line":70},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"tables","line":71}]},{"type":"tableCell","children":[{"type":"text","value":"A table by its path: either an object that stands in for it, or an array of rows to start from.","line":71}]}],"line":71},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"sources","line":72}]},{"type":"tableCell","children":[{"type":"text","value":"A data source's tables, by the source's path and then the table's name, as for ","line":72},{"type":"inlineCode","value":"tables","line":72},{"type":"text","value":".","line":72}]}],"line":72},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"startedBy","line":73},{"type":"text","value":", ","line":73},{"type":"inlineCode","value":"trigger","line":73},{"type":"text","value":", ","line":73},{"type":"inlineCode","value":"attempt","line":73},{"type":"text","value":", ","line":73},{"type":"inlineCode","value":"signal","line":73}]},{"type":"tableCell","children":[{"type":"text","value":"What ","line":73},{"type":"inlineCode","value":"ctx.run","line":73},{"type":"text","value":" and ","line":73},{"type":"inlineCode","value":"ctx.signal","line":73},{"type":"text","value":" say. The defaults are the system, a trigger of type ","line":73},{"type":"inlineCode","value":"test","line":73},{"type":"text","value":", attempt 1 and a signal that is not aborted.","line":73}]}],"line":73}],"line":66},{"type":"paragraph","children":[{"type":"inlineCode","value":"memoryTable(rows)","line":75},{"type":"text","value":" makes a table that holds its rows in memory. It is the fake for ","line":75},{"type":"inlineCode","value":"tables","line":75},{"type":"text","value":", and its ","line":75},{"type":"inlineCode","value":"rows","line":75},{"type":"text","value":" list is what the script left in it, to assert on. ","line":75},{"type":"inlineCode","value":"testContext(options, declared)","line":75},{"type":"text","value":" makes the context alone, for code that you call with a context of your own.","line":75}],"line":75}],"line":64}],"line":20}],"line":19,"endLine":76},{"type":"heading","depth":2,"id":"the-result","children":[{"type":"text","value":"The result","line":78}],"line":78},{"type":"paragraph","children":[{"type":"inlineCode","value":"runScript","line":80},{"type":"text","value":" returns ","line":80},{"type":"inlineCode","value":"{ output, logs, events, tags, files }","line":80},{"type":"text","value":": what the script returned, each log line with its level and fields, each event it published, the tags it set and the files it stored. Nothing leaves the process.","line":80}],"line":80},{"type":"heading","depth":2,"id":"if-it-does-not-work","children":[{"type":"text","value":"If it does not work","line":82}],"line":82},{"type":"list","ordered":false,"children":[{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"Node cannot find ","line":84},{"type":"inlineCode","value":"@volvel/sdk","line":84},{"type":"text","value":".","line":84}],"line":84},{"type":"text","value":" The repository's dependencies are not installed. Run ","line":84},{"type":"inlineCode","value":"npm install","line":84},{"type":"text","value":" in it; see ","line":84},{"type":"link","href":"install-the-cli","children":[{"type":"text","value":"Install the command line","line":84}],"line":84},{"type":"text","value":" for the tarballs until there is a release.","line":84}],"line":84},{"type":"listItem","children":[{"type":"strong","children":[{"type":"inlineCode","value":"The script's input does not match its schema","line":85},{"type":"text","value":".","line":85}],"line":85},{"type":"text","value":" The test's input is not what the script's ","line":85},{"type":"inlineCode","value":"input","line":85},{"type":"text","value":" accepts.","line":85}],"line":85},{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"A test of a script that calls a connector's real API.","line":86}],"line":86},{"type":"text","value":" The connection's fake is yours to write: an object with the methods the script calls. ","line":86},{"type":"inlineCode","value":"runScript","line":86},{"type":"text","value":" does not call the network for you.","line":86}],"line":86},{"type":"listItem","children":[{"type":"strong","children":[{"type":"text","value":"The test passes, and the deployed script fails.","line":87}],"line":87},{"type":"text","value":" A fake agrees with what you wrote, not with the instance. Try the script in a dev workspace with ","line":87},{"type":"link","href":"run-a-script-on-the-instance","children":[{"type":"text","value":"Run a script on the instance","line":87}],"line":87},{"type":"text","value":".","line":87}],"line":87}],"line":84}]},"description":"Run a script in a unit test with fakes for its connections, secrets, variables and tables, using @volvel/sdk/testing."}
|