@synopackageland/cli 0.4.1 → 0.5.3
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/README.md +7 -3
- package/dist/authorization-sdk.d.ts +5 -0
- package/dist/authorization-sdk.js +5 -0
- package/dist/build-spk/delete-app-data.d.ts +27 -7
- package/dist/build-spk/delete-app-data.js +35 -34
- package/dist/build-spk/dsm-arch.d.ts +6 -1
- package/dist/build-spk/dsm-arch.js +25 -1
- package/dist/build-spk/dsm-version.d.ts +14 -0
- package/dist/build-spk/dsm-version.js +47 -0
- package/dist/build-spk/gateway.d.ts +31 -0
- package/dist/build-spk/gateway.js +55 -0
- package/dist/build-spk/generator.d.ts +5 -0
- package/dist/build-spk/generator.js +103 -107
- package/dist/build-spk/install-wizard.d.ts +20 -0
- package/dist/build-spk/install-wizard.js +76 -0
- package/dist/build-spk/native-lifecycle.d.ts +5 -0
- package/dist/build-spk/native-lifecycle.js +12 -2
- package/dist/build-spk/resource-worker.d.ts +9 -4
- package/dist/build-spk/resource-worker.js +15 -6
- package/dist/build-spk/share-combobox.d.ts +3 -0
- package/dist/build-spk/share-combobox.js +27 -0
- package/dist/build-spk/uninstall-wizard.d.ts +14 -0
- package/dist/build-spk/uninstall-wizard.js +33 -0
- package/dist/build-spk/wizard-i18n.d.ts +18 -0
- package/dist/build-spk/wizard-i18n.js +38 -0
- package/dist/build-spk/wizard-messages.d.ts +388 -0
- package/dist/build-spk/wizard-messages.js +387 -0
- package/dist/cli.js +132 -32
- package/dist/compose/analyze.d.ts +20 -0
- package/dist/compose/analyze.js +75 -11
- package/dist/contract/validate.js +33 -1
- package/dist/contract/web-launch.d.ts +22 -0
- package/dist/contract/web-launch.js +37 -0
- package/dist/deploy/deploy.d.ts +3 -0
- package/dist/deploy/deploy.js +11 -2
- package/dist/error-registry.js +62 -3
- package/dist/host/dsm-port-profile.d.ts +1 -1
- package/dist/host/dsm-port-profile.js +1 -1
- package/dist/host/open-url.d.ts +2 -0
- package/dist/host/open-url.js +4 -1
- package/dist/images/pin.d.ts +52 -0
- package/dist/images/pin.js +249 -0
- package/dist/init.d.ts +27 -3
- package/dist/init.js +126 -16
- package/dist/inspect.d.ts +3 -0
- package/dist/inspect.js +15 -3
- package/dist/standalone/authorization-window.d.ts +2 -0
- package/dist/standalone/authorization-window.js +28 -0
- package/dist/standalone/authorization.d.ts +48 -0
- package/dist/standalone/authorization.js +116 -0
- package/dist/standalone/background.d.ts +21 -0
- package/dist/standalone/background.js +52 -0
- package/dist/standalone/binary.d.ts +1 -0
- package/dist/standalone/binary.js +1 -1
- package/dist/standalone/build.d.ts +2 -0
- package/dist/standalone/build.js +54 -10
- package/dist/standalone/dsm-window.js +10 -3
- package/dist/standalone/helper-inventory.d.ts +15 -0
- package/dist/standalone/helper-inventory.js +9 -0
- package/dist/standalone/helper.d.ts +1 -0
- package/dist/standalone/helper.js +29 -11
- package/dist/standalone/host-adapter.d.ts +1 -1
- package/dist/standalone/host-adapter.js +33 -15
- package/dist/standalone/host-file-navigation.d.ts +7 -0
- package/dist/standalone/host-file-navigation.js +172 -0
- package/dist/standalone/inspect-helper.js +21 -6
- package/dist/standalone/inspect-spk.d.ts +1 -1
- package/dist/standalone/inspect-spk.js +211 -7
- package/dist/standalone/job-diagnostics.d.ts +1 -0
- package/dist/standalone/job-diagnostics.js +49 -0
- package/dist/standalone/lifecycle-helper.d.ts +1 -1
- package/dist/standalone/lifecycle-helper.js +2 -2
- package/dist/standalone/lifecycle.d.ts +1 -1
- package/dist/standalone/lifecycle.js +14 -4
- package/dist/standalone/manifest.d.ts +15 -2
- package/dist/standalone/manifest.js +37 -6
- package/dist/standalone/native-layout.d.ts +74 -0
- package/dist/standalone/native-layout.js +318 -0
- package/dist/standalone/resource.d.ts +11 -0
- package/dist/standalone/resource.js +13 -0
- package/dist/standalone/root-ops.d.ts +2 -0
- package/dist/standalone/root-ops.js +10 -0
- package/dist/standalone/root-window.d.ts +3 -1
- package/dist/standalone/root-window.js +156 -38
- package/dist/standalone/shared-folder.d.ts +39 -0
- package/dist/standalone/shared-folder.js +141 -0
- package/dist/standalone/spk.d.ts +4 -0
- package/dist/standalone/spk.js +47 -3
- package/dist/standalone/worker-contract-json.d.ts +8 -0
- package/dist/standalone/worker-contract-json.js +141 -0
- package/dist/standalone/worker-contract.d.ts +189 -0
- package/dist/standalone/worker-contract.js +175 -0
- package/dist/standalone/worker-registry.d.ts +40 -0
- package/dist/standalone/worker-registry.js +167 -0
- package/dist/templates/_authorization/main.go +104 -0
- package/dist/templates/_authorization/main_test.go +35 -0
- package/dist/templates/_daemon/go.mod +2 -0
- package/dist/templates/_gateway/auth.go +101 -0
- package/dist/templates/_gateway/auth_test.go +216 -0
- package/dist/templates/_gateway/cgi.go +133 -0
- package/dist/templates/_gateway/cgi_test.go +156 -0
- package/dist/templates/_gateway/csrf.go +73 -0
- package/dist/templates/_gateway/csrf_test.go +155 -0
- package/dist/templates/_gateway/directory.go +108 -0
- package/dist/templates/_gateway/directory_test.go +202 -0
- package/dist/templates/_gateway/gateway.go +412 -0
- package/dist/templates/_gateway/gateway_test.go +676 -0
- package/dist/templates/_gateway/go.mod +3 -0
- package/dist/templates/_gateway/groups.go +66 -0
- package/dist/templates/_gateway/main.go +45 -0
- package/dist/templates/binary/synology-app.yaml +1 -1
- package/dist/templates/compose-import/compose.yaml +1 -1
- package/dist/templates/compose-import/synology-app.yaml +1 -1
- package/dist/templates/hello-files/compose.yaml +1 -1
- package/dist/templates/hello-files/synology-app.yaml +1 -1
- package/dist/templates/native-go/README.md +118 -5
- package/dist/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +3 -1
- package/dist/templates/native-go/backend/cmd/app/main.go +25 -6
- package/dist/templates/native-go/backend/cmd/app/sdk_main.go +62 -0
- package/dist/templates/native-go/backend/cmd/background-worker/main.go +38 -0
- package/dist/templates/native-go/backend/cmd/helper/main.go +27 -1
- package/dist/templates/native-go/backend/cmd/helper/sdk_registry.go +19 -0
- package/dist/templates/native-go/backend/go.mod +5 -3
- package/dist/templates/native-go/backend/go.sum +4 -4
- package/dist/templates/native-go/backend/internal/api/registry.go +17 -6
- package/dist/templates/native-go/backend/internal/api/server.go +7 -1
- package/dist/templates/native-go/backend/internal/app/authorization_none.go +5 -0
- package/dist/templates/native-go/backend/internal/app/background.go +270 -0
- package/dist/templates/native-go/backend/internal/app/background_none.go +8 -0
- package/dist/templates/native-go/backend/internal/app/background_owner.go +59 -0
- package/dist/templates/native-go/backend/internal/app/background_owner_test.go +145 -0
- package/dist/templates/native-go/backend/internal/app/background_schedule.go +74 -0
- package/dist/templates/native-go/backend/internal/app/background_schedule_test.go +62 -0
- package/dist/templates/native-go/backend/internal/app/background_test.go +346 -0
- package/dist/templates/native-go/backend/internal/app/integration_state.go +16 -0
- package/dist/templates/native-go/backend/internal/app/migrations.go +41 -0
- package/dist/templates/native-go/backend/internal/app/migrations_test.go +41 -0
- package/dist/templates/native-go/backend/internal/app/nas_cgi_artifact_test.go +8 -0
- package/dist/templates/native-go/backend/internal/app/routes.go +22 -5
- package/dist/templates/native-go/backend/internal/app/routes_test.go +20 -3
- package/dist/templates/native-go/backend/internal/app/sdk_jobs.go +70 -0
- package/dist/templates/native-go/backend/internal/app/sdk_jobs_test.go +116 -0
- package/dist/templates/native-go/backend/internal/app/sdk_routes.go +177 -0
- package/dist/templates/native-go/backend/internal/app/session_files.go +15 -0
- package/dist/templates/native-go/backend/internal/app/session_files_test.go +26 -0
- package/dist/templates/native-go/backend/internal/app/shared_folder.go +144 -0
- package/dist/templates/native-go/backend/internal/app/shared_folder_test.go +158 -0
- package/dist/templates/native-go/backend/internal/background/access.go +57 -0
- package/dist/templates/native-go/backend/internal/background/owner_test.go +126 -0
- package/dist/templates/native-go/backend/internal/background/runner.go +185 -0
- package/dist/templates/native-go/backend/internal/background/runner_test.go +209 -0
- package/dist/templates/native-go/backend/internal/background/schedule.go +300 -0
- package/dist/templates/native-go/backend/internal/background/schedule_test.go +335 -0
- package/dist/templates/native-go/backend/internal/background/store.go +807 -0
- package/dist/templates/native-go/backend/internal/background/store_test.go +407 -0
- package/dist/templates/native-go/backend/internal/datamigrate/migrate.go +191 -0
- package/dist/templates/native-go/backend/internal/datamigrate/migrate_test.go +177 -0
- package/dist/templates/native-go/backend/internal/filestation/browse_test.go +67 -0
- package/dist/templates/native-go/backend/internal/filestation/client.go +251 -0
- package/dist/templates/native-go/backend/internal/filestation/client_test.go +155 -0
- package/dist/templates/native-go/backend/internal/filestation/doc.go +4 -0
- package/dist/templates/native-go/backend/internal/filestation/read_file_test.go +90 -0
- package/dist/templates/native-go/backend/internal/filestation/repository.go +207 -0
- package/dist/templates/native-go/backend/internal/filestation/repository_test.go +104 -0
- package/dist/templates/native-go/backend/internal/filestation/sdk_session.go +241 -0
- package/dist/templates/native-go/backend/internal/filestation/sdk_session_test.go +183 -0
- package/dist/templates/native-go/backend/internal/filestation/service.go +254 -0
- package/dist/templates/native-go/backend/internal/filestation/service_test.go +94 -0
- package/dist/templates/native-go/backend/internal/filestation/session_semantics_test.go +383 -0
- package/dist/templates/native-go/backend/internal/filestation/write.go +72 -0
- package/dist/templates/native-go/backend/internal/filestation/write_test.go +123 -0
- package/dist/templates/native-go/backend/internal/helper/background_proof.go +163 -0
- package/dist/templates/native-go/backend/internal/helper/background_proof_contract.go +46 -0
- package/dist/templates/native-go/backend/internal/helper/background_proof_test.go +161 -0
- package/dist/templates/native-go/backend/internal/helper/data_contract.go +3 -0
- package/dist/templates/native-go/backend/internal/helper/data_protocol.go +3 -0
- package/dist/templates/native-go/backend/internal/helper/data_protocol_test.go +1 -1
- package/dist/templates/native-go/backend/internal/helper/grant_authority.go +3 -0
- package/dist/templates/native-go/backend/internal/helper/grant_authority_test.go +1 -1
- package/dist/templates/native-go/backend/internal/helper/grant_repository_linux.go +2 -1
- package/dist/templates/native-go/backend/internal/helper/grant_repository_linux_test.go +4 -3
- package/dist/templates/native-go/backend/internal/helper/grant_snapshot.go +3 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/bindings.go +48 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/contract_test.go +436 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/decode.go +185 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/digest.go +55 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/registry.go +85 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/registry_test.go +73 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/result.go +53 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/stub.go +8 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/testdata/input-digests.json +127 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/types.go +234 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/types_test.go +29 -0
- package/dist/templates/native-go/backend/internal/helper/jobcontract/validate.go +462 -0
- package/dist/templates/native-go/backend/internal/helper/legacy_authority_schema_linux_test.go +34 -0
- package/dist/templates/native-go/backend/internal/helper/legacy_authority_schema_test.go +6 -0
- package/dist/templates/native-go/backend/internal/helper/management.go +86 -0
- package/dist/templates/native-go/backend/internal/helper/observation.go +42 -2
- package/dist/templates/native-go/backend/internal/helper/observation_health_test.go +13 -1
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic.go +56 -10
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_linux_test.go +6 -0
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_writer.go +40 -0
- package/dist/templates/native-go/backend/internal/helper/process_linux.go +3 -0
- package/dist/templates/native-go/backend/internal/helper/purge.go +115 -0
- package/dist/templates/native-go/backend/internal/helper/purge_test.go +59 -0
- package/dist/templates/native-go/backend/internal/helper/query_deadline_linux_test.go +115 -0
- package/dist/templates/native-go/backend/internal/helper/query_pending_diagnostic_test.go +254 -0
- package/dist/templates/native-go/backend/internal/helper/relaxed_invalidation.go +3 -0
- package/dist/templates/native-go/backend/internal/helper/revoke.go +109 -0
- package/dist/templates/native-go/backend/internal/helper/revoke_test.go +121 -0
- package/dist/templates/native-go/backend/internal/helper/s1r_actor_races_linux_test.go +23 -4
- package/dist/templates/native-go/backend/internal/helper/sdk_assembly_linux.go +51 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_attach.go +83 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_attach_contract.go +32 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_attach_test.go +184 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_authority_schema_test.go +6 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_background_authority.go +832 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_background_authority_test.go +714 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_background_invalidation.go +218 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_background_lease.go +218 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_background_snapshot.go +110 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_background_store_linux_test.go +261 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_background_store_test.go +58 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_bindings.go +60 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_data_contract.go +251 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_data_protocol.go +424 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_dispatch_absence_test.go +51 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_display.go +488 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_display_contract.go +121 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_display_test.go +459 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_grant_authority.go +559 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_grant_repository_linux.go +417 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_grant_snapshot.go +94 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_history.go +80 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_history_test.go +76 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_job.go +697 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_job_child_linux.go +309 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_job_contract.go +122 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_job_linux_test.go +159 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_job_process_linux.go +327 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_job_test.go +501 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_job_vm_linux_test.go +343 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_journal.go +77 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_journal_linux.go +244 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_journal_linux_test.go +295 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_journal_test.go +71 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_picker_test.go +50 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_process_linux.go +184 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_public_vm_linux_test.go +129 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_relaxed_invalidation.go +242 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_rpc.go +299 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_rpc_contract.go +70 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_rpc_test.go +135 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_server_linux.go +161 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_session.go +677 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_session_contract.go +72 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_session_fence_test.go +215 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_session_test.go +475 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_supervisor_frame.go +78 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_supervisor_linux.go +414 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_transport.go +79 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_transport_linux.go +82 -0
- package/dist/templates/native-go/backend/internal/helper/sdk_transport_test.go +64 -0
- package/dist/templates/native-go/backend/internal/helper/server_linux.go +14 -2
- package/dist/templates/native-go/backend/internal/helper/stale_management_linux_test.go +126 -0
- package/dist/templates/native-go/backend/internal/helper/stale_management_test.go +122 -0
- package/dist/templates/native-go/backend/internal/helper/startup_diagnostic.go +68 -0
- package/dist/templates/native-go/backend/internal/helper/startup_diagnostic_linux_test.go +126 -0
- package/dist/templates/native-go/backend/internal/helper/startup_diagnostic_test.go +117 -0
- package/dist/templates/native-go/backend/internal/helper/status.go +22 -13
- package/dist/templates/native-go/backend/internal/helper/status_test.go +45 -0
- package/dist/templates/native-go/backend/internal/helper/supervision.go +1 -1
- package/dist/templates/native-go/backend/internal/helper/supervisor_frame.go +3 -0
- package/dist/templates/native-go/backend/internal/helper/supervisor_linux.go +6 -2
- package/dist/templates/native-go/backend/internal/helper/unit_connection_test.go +22 -4
- package/dist/templates/native-go/backend/internal/helper/unit_linux.go +7 -3
- package/dist/templates/native-go/backend/internal/helper/unit_query_linux.go +5 -1
- package/dist/templates/native-go/backend/internal/helper/write_files_linux.go +7 -4
- package/dist/templates/native-go/backend/internal/helper/write_files_linux_test.go +26 -0
- package/dist/templates/native-go/dsm-package.yaml +2 -2
- package/dist/templates/native-go-authorization/backend/internal/app/authorization.go +298 -0
- package/dist/templates/native-go-authorization/backend/internal/app/authorization_test.go +96 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/AuthorizationGate.vue +89 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/de.json +36 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/en.json +36 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/es.json +36 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/fr.json +36 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/index.ts +15 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/it.json +36 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/ja.json +36 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/ko.json +36 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/zh-CN.json +36 -0
- package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/zh-TW.json +36 -0
- package/dist/templates/native-go-authorization/frontend/test/authorization-preview.html +14 -0
- package/dist/templates/native-go-authorization/frontend/test/authorization.test.ts +59 -0
- package/dist/templates/native-go-background/BACKGROUND.md +111 -0
- package/dist/templates/native-go-background/backend/internal/app/background_on.go +7 -0
- package/dist/templates/native-go-background/backend/internal/app/background_routes_test.go +32 -0
- package/dist/templates/native-go-background/frontend/src/background/BackgroundPanel.vue +178 -0
- package/dist/templates/native-go-background/frontend/src/background/i18n/de.json +83 -0
- package/dist/templates/native-go-background/frontend/src/background/i18n/en.json +83 -0
- package/dist/templates/native-go-background/frontend/src/background/i18n/es.json +83 -0
- package/dist/templates/native-go-background/frontend/src/background/i18n/fr.json +83 -0
- package/dist/templates/native-go-background/frontend/src/background/i18n/it.json +83 -0
- package/dist/templates/native-go-background/frontend/src/background/i18n/ja.json +83 -0
- package/dist/templates/native-go-background/frontend/src/background/i18n/ko.json +83 -0
- package/dist/templates/native-go-background/frontend/src/background/i18n/zh-CN.json +83 -0
- package/dist/templates/native-go-background/frontend/src/background/i18n/zh-TW.json +83 -0
- package/dist/templates/native-go-background/frontend/src/background/i18n.ts +19 -0
- package/dist/templates/native-go-background/frontend/src/background/picker-provider.ts +13 -0
- package/dist/templates/native-go-background/frontend/test/background.test.ts +179 -0
- package/dist/templates/native-go-integration/backend/internal/app/personal.go +2 -2
- package/dist/templates/native-go-integration/backend/internal/app/personal_test.go +37 -0
- package/dist/templates/native-go-vue/README.md +38 -7
- package/dist/templates/native-go-vue/frontend/DESIGN.md +15 -3
- package/dist/templates/native-go-vue/frontend/README-JOBS.md +75 -0
- package/dist/templates/native-go-vue/frontend/README-M2.md +64 -0
- package/dist/templates/native-go-vue/frontend/package-lock.json +5 -4
- package/dist/templates/native-go-vue/frontend/package.json +1 -1
- package/dist/templates/native-go-vue/frontend/src/App.vue +39 -11
- package/dist/templates/native-go-vue/frontend/src/M2App.vue +57 -0
- package/dist/templates/native-go-vue/frontend/src/SDKApp.vue +203 -0
- package/dist/templates/native-go-vue/frontend/src/context.ts +3 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/InteractiveJobForm.vue +70 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/JobsAdminPanel.vue +33 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/JobsPanel.vue +135 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/connected-provider.ts +179 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/de.json +62 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/en.json +62 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/es.json +62 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/fr.json +62 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/it.json +62 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/ja.json +62 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/ko.json +62 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/zh-CN.json +62 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/zh-TW.json +62 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n.ts +15 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/mock-provider.ts +67 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/provider.ts +60 -0
- package/dist/templates/native-go-vue/frontend/src/jobs/validate.ts +44 -0
- package/dist/templates/native-go-vue/frontend/src/m2-main.ts +21 -0
- package/dist/templates/native-go-vue/frontend/src/m2-style.css +7 -0
- package/dist/templates/native-go-vue/frontend/src/nas/M2Files.vue +94 -0
- package/dist/templates/native-go-vue/frontend/src/nas/M2PathPicker.vue +70 -0
- package/dist/templates/native-go-vue/frontend/src/nas/M2Settings.vue +69 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/de.json +56 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/en.json +56 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/es.json +56 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/fr.json +56 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/it.json +56 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/ja.json +56 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/ko.json +56 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-CN.json +56 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-TW.json +56 -0
- package/dist/templates/native-go-vue/frontend/src/nas/m2-contract.ts +33 -0
- package/dist/templates/native-go-vue/frontend/src/nas/m2-i18n.ts +24 -0
- package/dist/templates/native-go-vue/frontend/src/nas/m2-provider.ts +104 -0
- package/dist/templates/native-go-vue/frontend/src/nas/use-m2-request.ts +18 -0
- package/dist/templates/native-go-vue/frontend/src/sdk-main.ts +39 -0
- package/dist/templates/native-go-vue/frontend/src/shell/AppShell.vue +48 -0
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/de.json +10 -0
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/en.json +10 -0
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/es.json +10 -0
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/fr.json +10 -0
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/it.json +10 -0
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/ja.json +10 -0
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/ko.json +10 -0
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +10 -0
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +10 -0
- package/dist/templates/native-go-vue/frontend/src/shell/i18n.ts +17 -0
- package/dist/templates/native-go-vue/frontend/src/shell/pages.ts +34 -0
- package/dist/templates/native-go-vue/frontend/src/style.css +2 -6
- package/dist/templates/native-go-vue/frontend/test/apps.test.ts +21 -0
- package/dist/templates/native-go-vue/frontend/test/jobs-connected.test.ts +163 -0
- package/dist/templates/native-go-vue/frontend/test/jobs-preview.html +22 -0
- package/dist/templates/native-go-vue/frontend/test/jobs.test.ts +176 -0
- package/dist/templates/native-go-vue/frontend/test/m2-preview.html +27 -0
- package/dist/templates/native-go-vue/frontend/test/m2-provider.test.ts +87 -0
- package/dist/templates/native-go-vue/frontend/test/m2-ui.test.ts +209 -0
- package/dist/templates/native-go-vue/frontend/test/native-controls.test.ts +27 -0
- package/dist/templates/native-go-vue/frontend/test/picker-wire.test.ts +110 -0
- package/dist/templates/native-go-vue/frontend/test/shell-preview.html +19 -0
- package/dist/templates/native-go-vue/frontend/test/shell-sdk.test.ts +73 -0
- package/dist/templates/native-go-vue/frontend/test/shell-ui.test.ts +114 -0
- package/dist/templates/native-go-vue/frontend/test/shell.test.ts +45 -0
- package/dist/templates/native-go-vue/frontend/vite.config.ts +2 -2
- package/dist/types.d.ts +1 -1
- package/dist/validate.js +6 -3
- package/package.json +5 -2
- package/schema/synology-app.schema.json +19 -0
- package/skills/reference/create.md +6 -2
- package/templates/_authorization/main.go +104 -0
- package/templates/_authorization/main_test.go +35 -0
- package/templates/_daemon/go.mod +2 -0
- package/templates/_gateway/auth.go +101 -0
- package/templates/_gateway/auth_test.go +216 -0
- package/templates/_gateway/cgi.go +133 -0
- package/templates/_gateway/cgi_test.go +156 -0
- package/templates/_gateway/csrf.go +73 -0
- package/templates/_gateway/csrf_test.go +155 -0
- package/templates/_gateway/directory.go +108 -0
- package/templates/_gateway/directory_test.go +202 -0
- package/templates/_gateway/gateway.go +412 -0
- package/templates/_gateway/gateway_test.go +676 -0
- package/templates/_gateway/go.mod +3 -0
- package/templates/_gateway/groups.go +66 -0
- package/templates/_gateway/main.go +45 -0
- package/templates/binary/synology-app.yaml +1 -1
- package/templates/compose-import/compose.yaml +1 -1
- package/templates/compose-import/synology-app.yaml +1 -1
- package/templates/hello-files/compose.yaml +1 -1
- package/templates/hello-files/synology-app.yaml +1 -1
- package/templates/native-go/README.md +118 -5
- package/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +3 -1
- package/templates/native-go/backend/cmd/app/main.go +25 -6
- package/templates/native-go/backend/cmd/app/sdk_main.go +62 -0
- package/templates/native-go/backend/cmd/background-worker/main.go +38 -0
- package/templates/native-go/backend/cmd/helper/main.go +27 -1
- package/templates/native-go/backend/cmd/helper/sdk_registry.go +19 -0
- package/templates/native-go/backend/go.mod +5 -3
- package/templates/native-go/backend/go.sum +4 -4
- package/templates/native-go/backend/internal/api/registry.go +17 -6
- package/templates/native-go/backend/internal/api/server.go +7 -1
- package/templates/native-go/backend/internal/app/authorization_none.go +5 -0
- package/templates/native-go/backend/internal/app/background.go +270 -0
- package/templates/native-go/backend/internal/app/background_none.go +8 -0
- package/templates/native-go/backend/internal/app/background_owner.go +59 -0
- package/templates/native-go/backend/internal/app/background_owner_test.go +145 -0
- package/templates/native-go/backend/internal/app/background_schedule.go +74 -0
- package/templates/native-go/backend/internal/app/background_schedule_test.go +62 -0
- package/templates/native-go/backend/internal/app/background_test.go +346 -0
- package/templates/native-go/backend/internal/app/integration_state.go +16 -0
- package/templates/native-go/backend/internal/app/migrations.go +41 -0
- package/templates/native-go/backend/internal/app/migrations_test.go +41 -0
- package/templates/native-go/backend/internal/app/nas_cgi_artifact_test.go +8 -0
- package/templates/native-go/backend/internal/app/routes.go +22 -5
- package/templates/native-go/backend/internal/app/routes_test.go +20 -3
- package/templates/native-go/backend/internal/app/sdk_jobs.go +70 -0
- package/templates/native-go/backend/internal/app/sdk_jobs_test.go +116 -0
- package/templates/native-go/backend/internal/app/sdk_routes.go +177 -0
- package/templates/native-go/backend/internal/app/session_files.go +15 -0
- package/templates/native-go/backend/internal/app/session_files_test.go +26 -0
- package/templates/native-go/backend/internal/app/shared_folder.go +144 -0
- package/templates/native-go/backend/internal/app/shared_folder_test.go +158 -0
- package/templates/native-go/backend/internal/background/access.go +57 -0
- package/templates/native-go/backend/internal/background/owner_test.go +126 -0
- package/templates/native-go/backend/internal/background/runner.go +185 -0
- package/templates/native-go/backend/internal/background/runner_test.go +209 -0
- package/templates/native-go/backend/internal/background/schedule.go +300 -0
- package/templates/native-go/backend/internal/background/schedule_test.go +335 -0
- package/templates/native-go/backend/internal/background/store.go +807 -0
- package/templates/native-go/backend/internal/background/store_test.go +407 -0
- package/templates/native-go/backend/internal/datamigrate/migrate.go +191 -0
- package/templates/native-go/backend/internal/datamigrate/migrate_test.go +177 -0
- package/templates/native-go/backend/internal/filestation/browse_test.go +67 -0
- package/templates/native-go/backend/internal/filestation/client.go +251 -0
- package/templates/native-go/backend/internal/filestation/client_test.go +155 -0
- package/templates/native-go/backend/internal/filestation/doc.go +4 -0
- package/templates/native-go/backend/internal/filestation/read_file_test.go +90 -0
- package/templates/native-go/backend/internal/filestation/repository.go +207 -0
- package/templates/native-go/backend/internal/filestation/repository_test.go +104 -0
- package/templates/native-go/backend/internal/filestation/sdk_session.go +241 -0
- package/templates/native-go/backend/internal/filestation/sdk_session_test.go +183 -0
- package/templates/native-go/backend/internal/filestation/service.go +254 -0
- package/templates/native-go/backend/internal/filestation/service_test.go +94 -0
- package/templates/native-go/backend/internal/filestation/session_semantics_test.go +383 -0
- package/templates/native-go/backend/internal/filestation/write.go +72 -0
- package/templates/native-go/backend/internal/filestation/write_test.go +123 -0
- package/templates/native-go/backend/internal/helper/background_proof.go +163 -0
- package/templates/native-go/backend/internal/helper/background_proof_contract.go +46 -0
- package/templates/native-go/backend/internal/helper/background_proof_test.go +161 -0
- package/templates/native-go/backend/internal/helper/data_contract.go +3 -0
- package/templates/native-go/backend/internal/helper/data_protocol.go +3 -0
- package/templates/native-go/backend/internal/helper/data_protocol_test.go +1 -1
- package/templates/native-go/backend/internal/helper/grant_authority.go +3 -0
- package/templates/native-go/backend/internal/helper/grant_authority_test.go +1 -1
- package/templates/native-go/backend/internal/helper/grant_repository_linux.go +2 -1
- package/templates/native-go/backend/internal/helper/grant_repository_linux_test.go +4 -3
- package/templates/native-go/backend/internal/helper/grant_snapshot.go +3 -0
- package/templates/native-go/backend/internal/helper/jobcontract/bindings.go +48 -0
- package/templates/native-go/backend/internal/helper/jobcontract/contract_test.go +436 -0
- package/templates/native-go/backend/internal/helper/jobcontract/decode.go +185 -0
- package/templates/native-go/backend/internal/helper/jobcontract/digest.go +55 -0
- package/templates/native-go/backend/internal/helper/jobcontract/registry.go +85 -0
- package/templates/native-go/backend/internal/helper/jobcontract/registry_test.go +73 -0
- package/templates/native-go/backend/internal/helper/jobcontract/result.go +53 -0
- package/templates/native-go/backend/internal/helper/jobcontract/stub.go +8 -0
- package/templates/native-go/backend/internal/helper/jobcontract/testdata/input-digests.json +127 -0
- package/templates/native-go/backend/internal/helper/jobcontract/types.go +234 -0
- package/templates/native-go/backend/internal/helper/jobcontract/types_test.go +29 -0
- package/templates/native-go/backend/internal/helper/jobcontract/validate.go +462 -0
- package/templates/native-go/backend/internal/helper/legacy_authority_schema_linux_test.go +34 -0
- package/templates/native-go/backend/internal/helper/legacy_authority_schema_test.go +6 -0
- package/templates/native-go/backend/internal/helper/management.go +86 -0
- package/templates/native-go/backend/internal/helper/observation.go +42 -2
- package/templates/native-go/backend/internal/helper/observation_health_test.go +13 -1
- package/templates/native-go/backend/internal/helper/observer_diagnostic.go +56 -10
- package/templates/native-go/backend/internal/helper/observer_diagnostic_linux_test.go +6 -0
- package/templates/native-go/backend/internal/helper/observer_diagnostic_writer.go +40 -0
- package/templates/native-go/backend/internal/helper/process_linux.go +3 -0
- package/templates/native-go/backend/internal/helper/purge.go +115 -0
- package/templates/native-go/backend/internal/helper/purge_test.go +59 -0
- package/templates/native-go/backend/internal/helper/query_deadline_linux_test.go +115 -0
- package/templates/native-go/backend/internal/helper/query_pending_diagnostic_test.go +254 -0
- package/templates/native-go/backend/internal/helper/relaxed_invalidation.go +3 -0
- package/templates/native-go/backend/internal/helper/revoke.go +109 -0
- package/templates/native-go/backend/internal/helper/revoke_test.go +121 -0
- package/templates/native-go/backend/internal/helper/s1r_actor_races_linux_test.go +23 -4
- package/templates/native-go/backend/internal/helper/sdk_assembly_linux.go +51 -0
- package/templates/native-go/backend/internal/helper/sdk_attach.go +83 -0
- package/templates/native-go/backend/internal/helper/sdk_attach_contract.go +32 -0
- package/templates/native-go/backend/internal/helper/sdk_attach_test.go +184 -0
- package/templates/native-go/backend/internal/helper/sdk_authority_schema_test.go +6 -0
- package/templates/native-go/backend/internal/helper/sdk_background_authority.go +832 -0
- package/templates/native-go/backend/internal/helper/sdk_background_authority_test.go +714 -0
- package/templates/native-go/backend/internal/helper/sdk_background_invalidation.go +218 -0
- package/templates/native-go/backend/internal/helper/sdk_background_lease.go +218 -0
- package/templates/native-go/backend/internal/helper/sdk_background_snapshot.go +110 -0
- package/templates/native-go/backend/internal/helper/sdk_background_store_linux_test.go +261 -0
- package/templates/native-go/backend/internal/helper/sdk_background_store_test.go +58 -0
- package/templates/native-go/backend/internal/helper/sdk_bindings.go +60 -0
- package/templates/native-go/backend/internal/helper/sdk_data_contract.go +251 -0
- package/templates/native-go/backend/internal/helper/sdk_data_protocol.go +424 -0
- package/templates/native-go/backend/internal/helper/sdk_dispatch_absence_test.go +51 -0
- package/templates/native-go/backend/internal/helper/sdk_display.go +488 -0
- package/templates/native-go/backend/internal/helper/sdk_display_contract.go +121 -0
- package/templates/native-go/backend/internal/helper/sdk_display_test.go +459 -0
- package/templates/native-go/backend/internal/helper/sdk_grant_authority.go +559 -0
- package/templates/native-go/backend/internal/helper/sdk_grant_repository_linux.go +417 -0
- package/templates/native-go/backend/internal/helper/sdk_grant_snapshot.go +94 -0
- package/templates/native-go/backend/internal/helper/sdk_history.go +80 -0
- package/templates/native-go/backend/internal/helper/sdk_history_test.go +76 -0
- package/templates/native-go/backend/internal/helper/sdk_job.go +697 -0
- package/templates/native-go/backend/internal/helper/sdk_job_child_linux.go +309 -0
- package/templates/native-go/backend/internal/helper/sdk_job_contract.go +122 -0
- package/templates/native-go/backend/internal/helper/sdk_job_linux_test.go +159 -0
- package/templates/native-go/backend/internal/helper/sdk_job_process_linux.go +327 -0
- package/templates/native-go/backend/internal/helper/sdk_job_test.go +501 -0
- package/templates/native-go/backend/internal/helper/sdk_job_vm_linux_test.go +343 -0
- package/templates/native-go/backend/internal/helper/sdk_journal.go +77 -0
- package/templates/native-go/backend/internal/helper/sdk_journal_linux.go +244 -0
- package/templates/native-go/backend/internal/helper/sdk_journal_linux_test.go +295 -0
- package/templates/native-go/backend/internal/helper/sdk_journal_test.go +71 -0
- package/templates/native-go/backend/internal/helper/sdk_picker_test.go +50 -0
- package/templates/native-go/backend/internal/helper/sdk_process_linux.go +184 -0
- package/templates/native-go/backend/internal/helper/sdk_public_vm_linux_test.go +129 -0
- package/templates/native-go/backend/internal/helper/sdk_relaxed_invalidation.go +242 -0
- package/templates/native-go/backend/internal/helper/sdk_rpc.go +299 -0
- package/templates/native-go/backend/internal/helper/sdk_rpc_contract.go +70 -0
- package/templates/native-go/backend/internal/helper/sdk_rpc_test.go +135 -0
- package/templates/native-go/backend/internal/helper/sdk_server_linux.go +161 -0
- package/templates/native-go/backend/internal/helper/sdk_session.go +677 -0
- package/templates/native-go/backend/internal/helper/sdk_session_contract.go +72 -0
- package/templates/native-go/backend/internal/helper/sdk_session_fence_test.go +215 -0
- package/templates/native-go/backend/internal/helper/sdk_session_test.go +475 -0
- package/templates/native-go/backend/internal/helper/sdk_supervisor_frame.go +78 -0
- package/templates/native-go/backend/internal/helper/sdk_supervisor_linux.go +414 -0
- package/templates/native-go/backend/internal/helper/sdk_transport.go +79 -0
- package/templates/native-go/backend/internal/helper/sdk_transport_linux.go +82 -0
- package/templates/native-go/backend/internal/helper/sdk_transport_test.go +64 -0
- package/templates/native-go/backend/internal/helper/server_linux.go +14 -2
- package/templates/native-go/backend/internal/helper/stale_management_linux_test.go +126 -0
- package/templates/native-go/backend/internal/helper/stale_management_test.go +122 -0
- package/templates/native-go/backend/internal/helper/startup_diagnostic.go +68 -0
- package/templates/native-go/backend/internal/helper/startup_diagnostic_linux_test.go +126 -0
- package/templates/native-go/backend/internal/helper/startup_diagnostic_test.go +117 -0
- package/templates/native-go/backend/internal/helper/status.go +22 -13
- package/templates/native-go/backend/internal/helper/status_test.go +45 -0
- package/templates/native-go/backend/internal/helper/supervision.go +1 -1
- package/templates/native-go/backend/internal/helper/supervisor_frame.go +3 -0
- package/templates/native-go/backend/internal/helper/supervisor_linux.go +6 -2
- package/templates/native-go/backend/internal/helper/unit_connection_test.go +22 -4
- package/templates/native-go/backend/internal/helper/unit_linux.go +7 -3
- package/templates/native-go/backend/internal/helper/unit_query_linux.go +5 -1
- package/templates/native-go/backend/internal/helper/write_files_linux.go +7 -4
- package/templates/native-go/backend/internal/helper/write_files_linux_test.go +26 -0
- package/templates/native-go/dsm-package.yaml +2 -2
- package/templates/native-go-authorization/backend/internal/app/authorization.go +298 -0
- package/templates/native-go-authorization/backend/internal/app/authorization_test.go +96 -0
- package/templates/native-go-authorization/frontend/src/authorization/AuthorizationGate.vue +89 -0
- package/templates/native-go-authorization/frontend/src/authorization/i18n/de.json +36 -0
- package/templates/native-go-authorization/frontend/src/authorization/i18n/en.json +36 -0
- package/templates/native-go-authorization/frontend/src/authorization/i18n/es.json +36 -0
- package/templates/native-go-authorization/frontend/src/authorization/i18n/fr.json +36 -0
- package/templates/native-go-authorization/frontend/src/authorization/i18n/index.ts +15 -0
- package/templates/native-go-authorization/frontend/src/authorization/i18n/it.json +36 -0
- package/templates/native-go-authorization/frontend/src/authorization/i18n/ja.json +36 -0
- package/templates/native-go-authorization/frontend/src/authorization/i18n/ko.json +36 -0
- package/templates/native-go-authorization/frontend/src/authorization/i18n/zh-CN.json +36 -0
- package/templates/native-go-authorization/frontend/src/authorization/i18n/zh-TW.json +36 -0
- package/templates/native-go-authorization/frontend/test/authorization-preview.html +14 -0
- package/templates/native-go-authorization/frontend/test/authorization.test.ts +59 -0
- package/templates/native-go-background/BACKGROUND.md +111 -0
- package/templates/native-go-background/backend/internal/app/background_on.go +7 -0
- package/templates/native-go-background/backend/internal/app/background_routes_test.go +32 -0
- package/templates/native-go-background/frontend/src/background/BackgroundPanel.vue +178 -0
- package/templates/native-go-background/frontend/src/background/i18n/de.json +83 -0
- package/templates/native-go-background/frontend/src/background/i18n/en.json +83 -0
- package/templates/native-go-background/frontend/src/background/i18n/es.json +83 -0
- package/templates/native-go-background/frontend/src/background/i18n/fr.json +83 -0
- package/templates/native-go-background/frontend/src/background/i18n/it.json +83 -0
- package/templates/native-go-background/frontend/src/background/i18n/ja.json +83 -0
- package/templates/native-go-background/frontend/src/background/i18n/ko.json +83 -0
- package/templates/native-go-background/frontend/src/background/i18n/zh-CN.json +83 -0
- package/templates/native-go-background/frontend/src/background/i18n/zh-TW.json +83 -0
- package/templates/native-go-background/frontend/src/background/i18n.ts +19 -0
- package/templates/native-go-background/frontend/src/background/picker-provider.ts +13 -0
- package/templates/native-go-background/frontend/test/background.test.ts +179 -0
- package/templates/native-go-integration/backend/internal/app/personal.go +2 -2
- package/templates/native-go-integration/backend/internal/app/personal_test.go +37 -0
- package/templates/native-go-vue/README.md +38 -7
- package/templates/native-go-vue/frontend/DESIGN.md +15 -3
- package/templates/native-go-vue/frontend/README-JOBS.md +75 -0
- package/templates/native-go-vue/frontend/README-M2.md +64 -0
- package/templates/native-go-vue/frontend/package-lock.json +5 -4
- package/templates/native-go-vue/frontend/package.json +1 -1
- package/templates/native-go-vue/frontend/src/App.vue +39 -11
- package/templates/native-go-vue/frontend/src/M2App.vue +57 -0
- package/templates/native-go-vue/frontend/src/SDKApp.vue +203 -0
- package/templates/native-go-vue/frontend/src/context.ts +3 -0
- package/templates/native-go-vue/frontend/src/jobs/InteractiveJobForm.vue +70 -0
- package/templates/native-go-vue/frontend/src/jobs/JobsAdminPanel.vue +33 -0
- package/templates/native-go-vue/frontend/src/jobs/JobsPanel.vue +135 -0
- package/templates/native-go-vue/frontend/src/jobs/connected-provider.ts +179 -0
- package/templates/native-go-vue/frontend/src/jobs/i18n/de.json +62 -0
- package/templates/native-go-vue/frontend/src/jobs/i18n/en.json +62 -0
- package/templates/native-go-vue/frontend/src/jobs/i18n/es.json +62 -0
- package/templates/native-go-vue/frontend/src/jobs/i18n/fr.json +62 -0
- package/templates/native-go-vue/frontend/src/jobs/i18n/it.json +62 -0
- package/templates/native-go-vue/frontend/src/jobs/i18n/ja.json +62 -0
- package/templates/native-go-vue/frontend/src/jobs/i18n/ko.json +62 -0
- package/templates/native-go-vue/frontend/src/jobs/i18n/zh-CN.json +62 -0
- package/templates/native-go-vue/frontend/src/jobs/i18n/zh-TW.json +62 -0
- package/templates/native-go-vue/frontend/src/jobs/i18n.ts +15 -0
- package/templates/native-go-vue/frontend/src/jobs/mock-provider.ts +67 -0
- package/templates/native-go-vue/frontend/src/jobs/provider.ts +60 -0
- package/templates/native-go-vue/frontend/src/jobs/validate.ts +44 -0
- package/templates/native-go-vue/frontend/src/m2-main.ts +21 -0
- package/templates/native-go-vue/frontend/src/m2-style.css +7 -0
- package/templates/native-go-vue/frontend/src/nas/M2Files.vue +94 -0
- package/templates/native-go-vue/frontend/src/nas/M2PathPicker.vue +70 -0
- package/templates/native-go-vue/frontend/src/nas/M2Settings.vue +69 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/de.json +56 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/en.json +56 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/es.json +56 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/fr.json +56 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/it.json +56 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/ja.json +56 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/ko.json +56 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-CN.json +56 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-TW.json +56 -0
- package/templates/native-go-vue/frontend/src/nas/m2-contract.ts +33 -0
- package/templates/native-go-vue/frontend/src/nas/m2-i18n.ts +24 -0
- package/templates/native-go-vue/frontend/src/nas/m2-provider.ts +104 -0
- package/templates/native-go-vue/frontend/src/nas/use-m2-request.ts +18 -0
- package/templates/native-go-vue/frontend/src/sdk-main.ts +39 -0
- package/templates/native-go-vue/frontend/src/shell/AppShell.vue +48 -0
- package/templates/native-go-vue/frontend/src/shell/i18n/de.json +10 -0
- package/templates/native-go-vue/frontend/src/shell/i18n/en.json +10 -0
- package/templates/native-go-vue/frontend/src/shell/i18n/es.json +10 -0
- package/templates/native-go-vue/frontend/src/shell/i18n/fr.json +10 -0
- package/templates/native-go-vue/frontend/src/shell/i18n/it.json +10 -0
- package/templates/native-go-vue/frontend/src/shell/i18n/ja.json +10 -0
- package/templates/native-go-vue/frontend/src/shell/i18n/ko.json +10 -0
- package/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +10 -0
- package/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +10 -0
- package/templates/native-go-vue/frontend/src/shell/i18n.ts +17 -0
- package/templates/native-go-vue/frontend/src/shell/pages.ts +34 -0
- package/templates/native-go-vue/frontend/src/style.css +2 -6
- package/templates/native-go-vue/frontend/test/apps.test.ts +21 -0
- package/templates/native-go-vue/frontend/test/jobs-connected.test.ts +163 -0
- package/templates/native-go-vue/frontend/test/jobs-preview.html +22 -0
- package/templates/native-go-vue/frontend/test/jobs.test.ts +176 -0
- package/templates/native-go-vue/frontend/test/m2-preview.html +27 -0
- package/templates/native-go-vue/frontend/test/m2-provider.test.ts +87 -0
- package/templates/native-go-vue/frontend/test/m2-ui.test.ts +209 -0
- package/templates/native-go-vue/frontend/test/native-controls.test.ts +27 -0
- package/templates/native-go-vue/frontend/test/picker-wire.test.ts +110 -0
- package/templates/native-go-vue/frontend/test/shell-preview.html +19 -0
- package/templates/native-go-vue/frontend/test/shell-sdk.test.ts +73 -0
- package/templates/native-go-vue/frontend/test/shell-ui.test.ts +114 -0
- package/templates/native-go-vue/frontend/test/shell.test.ts +45 -0
- package/templates/native-go-vue/frontend/vite.config.ts +2 -2
- package/dist/templates/hello-web/compose.yaml +0 -21
- package/dist/templates/hello-web/html/app.js +0 -1
- package/dist/templates/hello-web/html/index.html +0 -13
- package/dist/templates/hello-web/synology-app.yaml +0 -13
- package/dist/templates/hello-web-page/compose.yaml +0 -21
- package/dist/templates/hello-web-page/html/app.js +0 -1
- package/dist/templates/hello-web-page/html/index.html +0 -13
- package/dist/templates/hello-web-page/synology-app.yaml +0 -13
- package/templates/hello-web/compose.yaml +0 -21
- package/templates/hello-web/html/app.js +0 -1
- package/templates/hello-web/html/index.html +0 -13
- package/templates/hello-web/synology-app.yaml +0 -13
- package/templates/hello-web-page/compose.yaml +0 -21
- package/templates/hello-web-page/html/app.js +0 -1
- package/templates/hello-web-page/html/index.html +0 -13
- package/templates/hello-web-page/synology-app.yaml +0 -13
|
@@ -5,15 +5,21 @@ import { createHash } from "node:crypto";
|
|
|
5
5
|
import * as tar from "tar";
|
|
6
6
|
import { parseDocument, Scalar } from "yaml";
|
|
7
7
|
import { loadContract, collectInstallParameters } from "../contract/load.js";
|
|
8
|
-
import { renderDsmWindowConfig, resolvedWebLaunch, trustedAppEntryPath, } from "../contract/web-launch.js";
|
|
8
|
+
import { renderDsmWindowConfig, resolvedWebLaunch, trustedAppEntryPath, usesAuthGateway, } from "../contract/web-launch.js";
|
|
9
|
+
import { buildGatewayBinary, gatewayConfig, writeGatewayPayload } from "./gateway.js";
|
|
9
10
|
import { classifyComposeRoute, loadCompose } from "../compose/analyze.js";
|
|
10
11
|
import { scanComposePrivilege } from "../compose/privilege.js";
|
|
11
12
|
import { validateProject } from "../validate.js";
|
|
12
13
|
import { writeDsmWindowIcons, writePackageCenterIcons } from "./dsm-icons.js";
|
|
13
14
|
import { infoArchValue } from "./dsm-arch.js";
|
|
15
|
+
import { assertContainerMinDsm, resolveMinDsm } from "./dsm-version.js";
|
|
14
16
|
import { createReproducibleTar } from "./reproducible-archive.js";
|
|
15
17
|
import { copyProjectNotices } from "./notices.js";
|
|
16
18
|
import { renderDeleteAppDataBlock } from "./delete-app-data.js";
|
|
19
|
+
import { renderUninstallWizardFiles } from "./uninstall-wizard.js";
|
|
20
|
+
import { renderInstallWizardFiles } from "./install-wizard.js";
|
|
21
|
+
import { renderWizardFiles, writeWizardUiFiles } from "./wizard-i18n.js";
|
|
22
|
+
import { sharedFolderCombobox } from "./share-combobox.js";
|
|
17
23
|
import { loadNative } from "../native/load.js";
|
|
18
24
|
import { materializeNativePayload } from "./native-payload.js";
|
|
19
25
|
import { renderNativePostinst, renderNativePrivilege, renderNativeStartStopStatus, renderNativePostuninst, renderNativePreuninst, } from "./native-lifecycle.js";
|
|
@@ -53,8 +59,14 @@ export async function buildSpk(options) {
|
|
|
53
59
|
if (options.spkVersion) {
|
|
54
60
|
contract.version = options.spkVersion;
|
|
55
61
|
}
|
|
62
|
+
if (options.minDsm !== undefined) {
|
|
63
|
+
contract.os_min_ver = resolveMinDsm(options.minDsm);
|
|
64
|
+
}
|
|
56
65
|
const nativePath = options.project.nativePath ?? join(options.project.root, "native.yaml");
|
|
57
66
|
const isNative = existsSync(nativePath);
|
|
67
|
+
if (!isNative && options.minDsm !== undefined) {
|
|
68
|
+
assertContainerMinDsm(String(contract.os_min_ver));
|
|
69
|
+
}
|
|
58
70
|
if (isNative) {
|
|
59
71
|
if (!options.archFamily) {
|
|
60
72
|
return { ok: false, errors: ["NATIVE_ARCH_FAMILY_REQUIRED"] };
|
|
@@ -74,10 +86,7 @@ export async function buildSpk(options) {
|
|
|
74
86
|
mkdirSync(join(staging, "conf"), { recursive: true });
|
|
75
87
|
writeFileSync(join(staging, "conf", "privilege"), renderNativePrivilege(), "utf8");
|
|
76
88
|
writeFileSync(join(staging, "privilege"), renderNativePrivilege(), "utf8");
|
|
77
|
-
|
|
78
|
-
writeFileSync(join(staging, "WIZARD_UIFILES", INSTALL_UIFILE), JSON.stringify(renderInstallWizard(contract, undefined), null, 2), "utf8");
|
|
79
|
-
writeFileSync(join(staging, "WIZARD_UIFILES", UPGRADE_UIFILE), JSON.stringify(renderUpgradeWizard(contract, undefined), null, 2), "utf8");
|
|
80
|
-
writeFileSync(join(staging, "WIZARD_UIFILES", UNINSTALL_UIFILE), JSON.stringify(renderUninstallWizard(), null, 2), "utf8");
|
|
89
|
+
writeWizards(staging, contract, undefined, "native");
|
|
81
90
|
mkdirSync(join(staging, "scripts"), { recursive: true });
|
|
82
91
|
for (const name of SCRIPT_NAMES) {
|
|
83
92
|
const scriptPath = join(staging, "scripts", name);
|
|
@@ -109,9 +118,6 @@ export async function buildSpk(options) {
|
|
|
109
118
|
copyFileSync(nativePath, join(packageDir, "native.yaml"));
|
|
110
119
|
chmodSync(join(staging, "INFO"), FILE_MODE);
|
|
111
120
|
chmodSync(join(staging, "privilege"), FILE_MODE);
|
|
112
|
-
chmodSync(join(staging, "WIZARD_UIFILES", INSTALL_UIFILE), FILE_MODE);
|
|
113
|
-
chmodSync(join(staging, "WIZARD_UIFILES", UPGRADE_UIFILE), FILE_MODE);
|
|
114
|
-
chmodSync(join(staging, "WIZARD_UIFILES", UNINSTALL_UIFILE), FILE_MODE);
|
|
115
121
|
chmodSync(join(packageDir, "synology-app.yaml"), FILE_MODE);
|
|
116
122
|
chmodSync(join(packageDir, "native.yaml"), FILE_MODE);
|
|
117
123
|
const outputPath = options.outputPath ??
|
|
@@ -135,25 +141,44 @@ export async function buildSpk(options) {
|
|
|
135
141
|
return { ok: false, errors: ["COMPOSE_ROUTE_UNSUPPORTED"] };
|
|
136
142
|
}
|
|
137
143
|
const rwEligibility = route.eligibility;
|
|
144
|
+
const gateway = rwEligibility?.adminport !== undefined && usesAuthGateway(contract)
|
|
145
|
+
? gatewayConfig(contract, rwEligibility.adminport)
|
|
146
|
+
: undefined;
|
|
147
|
+
if (gateway && !options.archFamily) {
|
|
148
|
+
return { ok: false, errors: ["GATEWAY_ARCH_FAMILY_REQUIRED"] };
|
|
149
|
+
}
|
|
138
150
|
const isDynamicRoute = route?.route === "dynamic";
|
|
139
151
|
const isResourceWorkerRoute = route?.route === "static-zero-config" ||
|
|
140
152
|
isDynamicRoute;
|
|
141
153
|
const staging = mkdtempSync(join(tmpdir(), "syno-spk-"));
|
|
154
|
+
const gatewayWork = mkdtempSync(join(tmpdir(), "syno-gateway-"));
|
|
142
155
|
try {
|
|
156
|
+
let gatewayBinary;
|
|
157
|
+
if (gateway) {
|
|
158
|
+
const built = buildGatewayBinary({
|
|
159
|
+
packageId: String(contract.package),
|
|
160
|
+
arch: options.archFamily,
|
|
161
|
+
config: gateway,
|
|
162
|
+
work: gatewayWork,
|
|
163
|
+
run: options.gatewayRun,
|
|
164
|
+
});
|
|
165
|
+
if ("error" in built) {
|
|
166
|
+
console.error(built.detail);
|
|
167
|
+
return { ok: false, errors: [built.error] };
|
|
168
|
+
}
|
|
169
|
+
gatewayBinary = built.binary;
|
|
170
|
+
}
|
|
143
171
|
writeFileSync(join(staging, "INFO"), renderInfo(contract, options.archFamily, isResourceWorkerRoute), "utf8");
|
|
144
172
|
writePackageCenterIcons(staging);
|
|
145
173
|
mkdirSync(join(staging, "conf"), { recursive: true });
|
|
146
174
|
writeFileSync(join(staging, "conf", "privilege"), renderPrivilege(), "utf8");
|
|
147
175
|
writeFileSync(join(staging, "privilege"), renderPrivilege(), "utf8");
|
|
148
176
|
if (isResourceWorkerRoute) {
|
|
149
|
-
const resourceConfig = renderResourceConfig(contract, rwEligibility);
|
|
177
|
+
const resourceConfig = renderResourceConfig(contract, rwEligibility, parsedCompose.compose);
|
|
150
178
|
writeFileSync(join(staging, "conf", "resource"), resourceConfig, "utf8");
|
|
151
179
|
chmodSync(join(staging, "conf", "resource"), FILE_MODE);
|
|
152
180
|
}
|
|
153
|
-
|
|
154
|
-
writeFileSync(join(staging, "WIZARD_UIFILES", INSTALL_UIFILE), JSON.stringify(renderInstallWizard(contract, parsedCompose?.compose), null, 2), "utf8");
|
|
155
|
-
writeFileSync(join(staging, "WIZARD_UIFILES", UPGRADE_UIFILE), JSON.stringify(renderUpgradeWizard(contract, parsedCompose?.compose), null, 2), "utf8");
|
|
156
|
-
writeFileSync(join(staging, "WIZARD_UIFILES", UNINSTALL_UIFILE), JSON.stringify(renderUninstallWizard(), null, 2), "utf8");
|
|
181
|
+
writeWizards(staging, contract, parsedCompose?.compose, "container");
|
|
157
182
|
mkdirSync(join(staging, "scripts"), { recursive: true });
|
|
158
183
|
for (const name of SCRIPT_NAMES) {
|
|
159
184
|
const scriptPath = join(staging, "scripts", name);
|
|
@@ -215,11 +240,11 @@ export async function buildSpk(options) {
|
|
|
215
240
|
writeFileSync(join(uiDir, "config"), renderDsmWindowConfig(contract), "utf8");
|
|
216
241
|
writeDsmWindowIcons(uiDir);
|
|
217
242
|
}
|
|
243
|
+
if (gateway && gatewayBinary) {
|
|
244
|
+
writeGatewayPayload(join(staging, "package"), gatewayBinary, gateway);
|
|
245
|
+
}
|
|
218
246
|
chmodSync(join(staging, "INFO"), FILE_MODE);
|
|
219
247
|
chmodSync(join(staging, "privilege"), FILE_MODE);
|
|
220
|
-
chmodSync(join(staging, "WIZARD_UIFILES", INSTALL_UIFILE), FILE_MODE);
|
|
221
|
-
chmodSync(join(staging, "WIZARD_UIFILES", UPGRADE_UIFILE), FILE_MODE);
|
|
222
|
-
chmodSync(join(staging, "WIZARD_UIFILES", UNINSTALL_UIFILE), FILE_MODE);
|
|
223
248
|
chmodSync(join(staging, "package", "compose.yaml"), FILE_MODE);
|
|
224
249
|
chmodSync(join(staging, "package", "synology-app.yaml"), FILE_MODE);
|
|
225
250
|
if (contract.adminport !== undefined && resolvedWebLaunch(contract) === "dsm-window") {
|
|
@@ -232,6 +257,7 @@ export async function buildSpk(options) {
|
|
|
232
257
|
}
|
|
233
258
|
finally {
|
|
234
259
|
rmSync(staging, { recursive: true, force: true });
|
|
260
|
+
rmSync(gatewayWork, { recursive: true, force: true });
|
|
235
261
|
}
|
|
236
262
|
}
|
|
237
263
|
function quoteInfo(value) {
|
|
@@ -252,19 +278,21 @@ function renderInfo(contract, archFamily, isResourceWorker = false) {
|
|
|
252
278
|
add("maintainer", String(contract.maintainer));
|
|
253
279
|
add("arch", archFamily === undefined ? "noarch" : infoArchValue(archFamily));
|
|
254
280
|
add("os_min_ver", String(contract.os_min_ver));
|
|
281
|
+
const viaGateway = isResourceWorker && usesAuthGateway(contract);
|
|
255
282
|
if (isResourceWorker) {
|
|
256
283
|
// DSM reports Container Manager as "not ready" through the package
|
|
257
284
|
// dependency gate even while pkgctl-ContainerManager is running. The
|
|
258
285
|
// docker-project worker itself remains the authoritative live prerequisite
|
|
259
286
|
// (ContainerManager >= 1432); keep only the reliable Web Station package
|
|
260
287
|
// dependency here so a valid resource-worker SPK can reach acquisition.
|
|
261
|
-
|
|
288
|
+
// A gateway package has no Web Station portal, so it does not depend on it.
|
|
289
|
+
if (contract.adminport !== undefined && !viaGateway) {
|
|
262
290
|
add("install_dep_packages", "WebStation");
|
|
263
291
|
}
|
|
264
292
|
}
|
|
265
293
|
add("startable", "yes");
|
|
266
294
|
const launch = resolvedWebLaunch(contract);
|
|
267
|
-
if (contract.adminprotocol) {
|
|
295
|
+
if (contract.adminprotocol && !viaGateway) {
|
|
268
296
|
add("adminprotocol", String(contract.adminprotocol));
|
|
269
297
|
}
|
|
270
298
|
if (launch === "new-page" || launch === "dsm-window") {
|
|
@@ -289,6 +317,10 @@ function renderInfo(contract, archFamily, isResourceWorker = false) {
|
|
|
289
317
|
add("dsmuidir", "ui");
|
|
290
318
|
add("dsmappname", String(contract.package));
|
|
291
319
|
}
|
|
320
|
+
else if (viaGateway) {
|
|
321
|
+
// The gateway CGI is served from ui/ even when the App opens in a new page.
|
|
322
|
+
add("dsmuidir", "ui");
|
|
323
|
+
}
|
|
292
324
|
return `${lines.join("\n")}\n`;
|
|
293
325
|
}
|
|
294
326
|
function renderPrivilege() {
|
|
@@ -298,15 +330,6 @@ function renderPrivilege() {
|
|
|
298
330
|
},
|
|
299
331
|
}, null, 2)}\n`;
|
|
300
332
|
}
|
|
301
|
-
const SHARED_FOLDER_MOUNT_CONSENT = "此 App 會用你在這台 NAS 選的資料夾;整顆應用都看得到。Shared Folder Mount 是整個 App Instance 的 container access:能打開這個 App 的使用者,容器裡的程式都看得到該 Share,即使該使用者在 File Station 看不到。這不是逐使用者 DSM ACL。檔案權限取決於容器服務帳號;App 必須自行實作使用者授權。";
|
|
302
|
-
const HOMES_MOUNT_CONSENT = "此 App 會使用這台 NAS 已啟用的 User Home;整顆應用的容器都看得到,容器路徑由 Compose 決定。這不是逐使用者 DSM ACL;檔案權限取決於容器服務帳號;App 必須自行實作使用者授權。";
|
|
303
|
-
const POSIX_ALL_SHARES_MAX_WARNING = "此 App 會使用安裝當下這台 NAS 的全部 Shared Folder(App-wide,不依個別 DSM ACL);容器內可讀(或讀寫,依 Compose 模式)所有這些資料夾的檔案。安裝後新建的共用資料夾不會自動加入。Package Center 無法提供安裝當下的 Shared Folder 清單快照;要以全部 Share 安裝,請用 CLI `synopkgland deploy`,由 CLI 以管理員權限列舉全部 Share 並寫入快照。由管理員決定是否安裝。";
|
|
304
|
-
const POSIX_ALL_SHARES_UPGRADE_NOTICE = "升級會保留既有快照(安裝當下由 CLI 列舉的全部 Shared Folder);變更掛載範圍只能由 CLI 明確提供(`synopkgland deploy`)。Package Center 升級不會改動現有快照。";
|
|
305
|
-
const DSM_USER_RUN_AS_CONSENT = "寫進 Share 的新檔在 File Station 顯示為你選的那位 DSM 使用者。點開此 App 的人共用這個磁碟身分,不是逐登入 ACL。";
|
|
306
|
-
const DSM_USER_UPGRADE_CONSENT = "升級時更換 Container Run-as 不會 chown Share 上的舊檔;只有升級後寫入的新檔才會使用新的磁碟身分。";
|
|
307
|
-
const UPGRADE_VALUE_REUSE_DESC = "留空=沿用目前設定";
|
|
308
|
-
const SHARED_FOLDER_RW_UPGRADE_CONSENT = "此版本把 Share 掛載改為讀寫;容器可讀取並寫入你選的 Share,不再是唯讀。";
|
|
309
|
-
const APP_OWN_SPACE_CONSENT = "此 App 只用 App 自己的空間。";
|
|
310
333
|
function volumeSources(compose) {
|
|
311
334
|
return volumeMounts(compose).map((mount) => mount.source);
|
|
312
335
|
}
|
|
@@ -389,8 +412,7 @@ function injectPosixAllSharesMarkers(composeContent, contract) {
|
|
|
389
412
|
}
|
|
390
413
|
return output.join("\n");
|
|
391
414
|
}
|
|
392
|
-
|
|
393
|
-
function renderInstallWizard(contract, compose) {
|
|
415
|
+
function renderInstallWizard(t, contract, compose) {
|
|
394
416
|
const items = [];
|
|
395
417
|
const params = collectInstallParameters(contract);
|
|
396
418
|
const hasSharedFolder = params.some((item) => item.param.type === "shared_folder");
|
|
@@ -398,27 +420,27 @@ function renderInstallWizard(contract, compose) {
|
|
|
398
420
|
const hasDsmUser = params.some((item) => item.param.type === "dsm_user");
|
|
399
421
|
if (compose && scanComposePrivilege(compose).length > 0) {
|
|
400
422
|
items.push({
|
|
401
|
-
desc:
|
|
423
|
+
desc: t("consent.privilege"),
|
|
402
424
|
});
|
|
403
425
|
}
|
|
404
426
|
if (hasSharedFolder) {
|
|
405
427
|
items.push({
|
|
406
|
-
desc:
|
|
428
|
+
desc: t("consent.sharedFolder"),
|
|
407
429
|
});
|
|
408
430
|
}
|
|
409
431
|
if (hasHomes) {
|
|
410
432
|
items.push({
|
|
411
|
-
desc:
|
|
433
|
+
desc: t("consent.homes"),
|
|
412
434
|
});
|
|
413
435
|
}
|
|
414
436
|
if (hasDsmUser) {
|
|
415
437
|
items.push({
|
|
416
|
-
desc:
|
|
438
|
+
desc: t("consent.dsmUser"),
|
|
417
439
|
});
|
|
418
440
|
}
|
|
419
441
|
if (!hasSharedFolder && (!compose || composeUsesOnlyAppSpace(compose))) {
|
|
420
442
|
items.push({
|
|
421
|
-
desc:
|
|
443
|
+
desc: t("consent.appOwnSpace"),
|
|
422
444
|
});
|
|
423
445
|
}
|
|
424
446
|
for (const { name, param } of params) {
|
|
@@ -428,7 +450,7 @@ function renderInstallWizard(contract, compose) {
|
|
|
428
450
|
if (param.type === "string") {
|
|
429
451
|
items.push({
|
|
430
452
|
type: "textfield",
|
|
431
|
-
desc:
|
|
453
|
+
desc: t("param.install", { name }),
|
|
432
454
|
subitems: [{
|
|
433
455
|
key: name,
|
|
434
456
|
desc: name,
|
|
@@ -441,7 +463,7 @@ function renderInstallWizard(contract, compose) {
|
|
|
441
463
|
if (param.type === "boolean") {
|
|
442
464
|
items.push({
|
|
443
465
|
type: "multiselect",
|
|
444
|
-
desc:
|
|
466
|
+
desc: t("param.install", { name }),
|
|
445
467
|
subitems: [{ key: name, desc: name, defaultValue: param.default ?? false }],
|
|
446
468
|
});
|
|
447
469
|
continue;
|
|
@@ -449,36 +471,13 @@ function renderInstallWizard(contract, compose) {
|
|
|
449
471
|
if (param.type === "secret") {
|
|
450
472
|
items.push({
|
|
451
473
|
type: "password",
|
|
452
|
-
desc:
|
|
474
|
+
desc: t("param.install", { name }),
|
|
453
475
|
subitems: [{ key: name, desc: name, validator: { allowBlank: false } }],
|
|
454
476
|
});
|
|
455
477
|
continue;
|
|
456
478
|
}
|
|
457
479
|
if (param.type === "shared_folder") {
|
|
458
|
-
items.push(
|
|
459
|
-
type: "combobox",
|
|
460
|
-
desc: `Shared Folder: ${name}`,
|
|
461
|
-
subitems: [{
|
|
462
|
-
key: name,
|
|
463
|
-
desc: name,
|
|
464
|
-
displayField: "name",
|
|
465
|
-
valueField: "name",
|
|
466
|
-
editable: false,
|
|
467
|
-
forceSelection: true,
|
|
468
|
-
autoSelect: false,
|
|
469
|
-
mode: "remote",
|
|
470
|
-
api_store: {
|
|
471
|
-
api: "SYNO.Core.Share",
|
|
472
|
-
method: "list",
|
|
473
|
-
version: 1,
|
|
474
|
-
baseParams: { limit: -1, offset: 0 },
|
|
475
|
-
root: "shares",
|
|
476
|
-
idProperty: "name",
|
|
477
|
-
fields: ["name"],
|
|
478
|
-
},
|
|
479
|
-
validator: { allowBlank: false },
|
|
480
|
-
}],
|
|
481
|
-
});
|
|
480
|
+
items.push(sharedFolderCombobox(t, name));
|
|
482
481
|
continue;
|
|
483
482
|
}
|
|
484
483
|
if (param.type === "posix_all_shares") {
|
|
@@ -493,14 +492,14 @@ function renderInstallWizard(contract, compose) {
|
|
|
493
492
|
// ALL_SHARES and no CHANGE_ALL_SHARES.
|
|
494
493
|
items.push({
|
|
495
494
|
type: "textblock",
|
|
496
|
-
desc:
|
|
495
|
+
desc: t("consent.posixAllShares"),
|
|
497
496
|
});
|
|
498
497
|
continue;
|
|
499
498
|
}
|
|
500
499
|
if (param.type === "dsm_user") {
|
|
501
500
|
items.push({
|
|
502
501
|
type: "combobox",
|
|
503
|
-
desc:
|
|
502
|
+
desc: t("param.runAs", { name }),
|
|
504
503
|
subitems: [{
|
|
505
504
|
key: name,
|
|
506
505
|
desc: name,
|
|
@@ -525,18 +524,20 @@ function renderInstallWizard(contract, compose) {
|
|
|
525
524
|
}
|
|
526
525
|
}
|
|
527
526
|
return [{
|
|
528
|
-
step_title: "
|
|
527
|
+
step_title: t("install.step"),
|
|
529
528
|
items,
|
|
530
529
|
}];
|
|
531
530
|
}
|
|
532
|
-
function renderUpgradeWizard(contract, compose) {
|
|
533
|
-
const installWizard = renderInstallWizard(contract, compose);
|
|
531
|
+
function renderUpgradeWizard(t, contract, compose) {
|
|
532
|
+
const installWizard = renderInstallWizard(t, contract, compose);
|
|
534
533
|
const params = collectInstallParameters(contract);
|
|
535
534
|
// Every type whose value must survive an upgrade the administrator did not
|
|
536
535
|
// deliberately change. Two mechanisms are needed because DSM renders them
|
|
537
536
|
// differently: a control that can be left blank just allows blank, while one
|
|
538
537
|
// that always carries a value needs an explicit "change this" gate.
|
|
539
|
-
// - dsm_user :
|
|
538
|
+
// - dsm_user : blank in some layouts, but measured on DSM 7.4-90069 with
|
|
539
|
+
// Shared Folder controls beside it to come up pre-filled with a
|
|
540
|
+
// Shared Folder name, so it needs the same explicit gate
|
|
540
541
|
// - string : blank once the new version's default is withheld (A44)
|
|
541
542
|
// - shared_folder : DSM prefills the first store row
|
|
542
543
|
// - boolean : a checkbox has no blank state at all
|
|
@@ -551,7 +552,7 @@ function renderUpgradeWizard(contract, compose) {
|
|
|
551
552
|
param.type === "string" ||
|
|
552
553
|
param.type === "boolean")
|
|
553
554
|
.map(({ name, param }) => [name, param.type]));
|
|
554
|
-
const needsChangeGate = (type) => type === "shared_folder" || type === "boolean";
|
|
555
|
+
const needsChangeGate = (type) => type === "shared_folder" || type === "dsm_user" || type === "boolean";
|
|
555
556
|
const upgradeItems = installWizard[0].items.flatMap((item) => {
|
|
556
557
|
if (!Array.isArray(item.subitems)) {
|
|
557
558
|
return [item];
|
|
@@ -581,20 +582,24 @@ function renderUpgradeWizard(contract, compose) {
|
|
|
581
582
|
}
|
|
582
583
|
const control = {
|
|
583
584
|
...item,
|
|
584
|
-
desc:
|
|
585
|
+
desc: t("upgrade.reuseDesc", { desc: String(item.desc ?? "") }),
|
|
585
586
|
subitems,
|
|
586
587
|
};
|
|
587
588
|
const changeControls = reuseKeys
|
|
588
589
|
.filter((key) => needsChangeGate(upgradeReuseTypes.get(key)))
|
|
589
590
|
.map((key) => {
|
|
590
591
|
const type = upgradeReuseTypes.get(key);
|
|
591
|
-
const label = type === "shared_folder"
|
|
592
|
+
const label = type === "shared_folder"
|
|
593
|
+
? t("label.sharedFolder")
|
|
594
|
+
: type === "dsm_user"
|
|
595
|
+
? t("label.runAs")
|
|
596
|
+
: key;
|
|
592
597
|
return {
|
|
593
598
|
type: "multiselect",
|
|
594
|
-
desc:
|
|
599
|
+
desc: t("upgrade.changeDesc", { label }),
|
|
595
600
|
subitems: [{
|
|
596
601
|
key: `CHANGE_${key}`,
|
|
597
|
-
desc:
|
|
602
|
+
desc: t("upgrade.changeSub", { label }),
|
|
598
603
|
defaultValue: false,
|
|
599
604
|
}],
|
|
600
605
|
};
|
|
@@ -616,23 +621,23 @@ function renderUpgradeWizard(contract, compose) {
|
|
|
616
621
|
.map((item) => item.name);
|
|
617
622
|
if (posixAllSharesNames.length > 0) {
|
|
618
623
|
upgradeConsent.push({
|
|
619
|
-
desc:
|
|
624
|
+
desc: t("upgrade.posixNotice"),
|
|
620
625
|
});
|
|
621
626
|
}
|
|
622
627
|
if (hasReadWriteSharedFolder) {
|
|
623
628
|
upgradeConsent.push({
|
|
624
|
-
desc:
|
|
629
|
+
desc: t("upgrade.sharedFolderRw"),
|
|
625
630
|
});
|
|
626
631
|
}
|
|
627
632
|
if (hasDsmUser && hasSharedFolder) {
|
|
628
633
|
upgradeConsent.push({
|
|
629
|
-
desc:
|
|
634
|
+
desc: t("upgrade.dsmUser"),
|
|
630
635
|
});
|
|
631
636
|
}
|
|
632
637
|
if (upgradeConsent.length === 0) {
|
|
633
638
|
return [{
|
|
634
639
|
...installWizard[0],
|
|
635
|
-
step_title: "
|
|
640
|
+
step_title: t("upgrade.step"),
|
|
636
641
|
items: upgradeItems,
|
|
637
642
|
}];
|
|
638
643
|
}
|
|
@@ -642,30 +647,18 @@ function renderUpgradeWizard(contract, compose) {
|
|
|
642
647
|
items.splice(insertAt, 0, ...upgradeConsent);
|
|
643
648
|
return [{
|
|
644
649
|
...installWizard[0],
|
|
645
|
-
step_title: "
|
|
650
|
+
step_title: t("upgrade.step"),
|
|
646
651
|
items,
|
|
647
652
|
}];
|
|
648
653
|
}
|
|
649
|
-
function
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
type: "multiselect",
|
|
658
|
-
desc: "Delete App Data",
|
|
659
|
-
subitems: [
|
|
660
|
-
{
|
|
661
|
-
key: "delete_app_data",
|
|
662
|
-
desc: "Delete App Data",
|
|
663
|
-
defaultValue: false,
|
|
664
|
-
},
|
|
665
|
-
],
|
|
666
|
-
},
|
|
667
|
-
],
|
|
668
|
-
}];
|
|
654
|
+
function writeWizards(staging, contract, compose, kind) {
|
|
655
|
+
const install = renderInstallWizardFiles(String(contract.package), (t) => renderInstallWizard(t, contract, compose));
|
|
656
|
+
writeWizardUiFiles(staging, {
|
|
657
|
+
...install.static,
|
|
658
|
+
...install.dynamic,
|
|
659
|
+
...renderWizardFiles(UPGRADE_UIFILE, (t) => renderUpgradeWizard(t, contract, compose)),
|
|
660
|
+
...renderUninstallWizardFiles(String(contract.package), kind),
|
|
661
|
+
});
|
|
669
662
|
}
|
|
670
663
|
function renderDynamicPreinstMaterializer(contract) {
|
|
671
664
|
const allParams = collectInstallParameters(contract);
|
|
@@ -728,7 +721,7 @@ function renderDynamicPreinstMaterializer(contract) {
|
|
|
728
721
|
// which is true, so the gate silently always reused the canonical value.
|
|
729
722
|
const usesUpgradeChangeGate = sharedFolderParams.length > 0 ||
|
|
730
723
|
posixAllSharesParams.length > 0 ||
|
|
731
|
-
collectInstallParameters(contract).some(({ param }) => param.type === "boolean");
|
|
724
|
+
collectInstallParameters(contract).some(({ param }) => param.type === "boolean" || param.type === "dsm_user");
|
|
732
725
|
if (usesUpgradeChangeGate) {
|
|
733
726
|
lines.push("upgrade_change_enabled() {", " normalized=\"$(printf '%s' \"$1\" | LC_ALL=C tr '[:upper:]' '[:lower:]')\"", " case \"$normalized\" in", " true|1|yes|on) return 0 ;;", " *) return 1 ;;", " esac", "}");
|
|
734
727
|
}
|
|
@@ -788,7 +781,9 @@ function renderDynamicPreinstMaterializer(contract) {
|
|
|
788
781
|
if (dsmUserParam) {
|
|
789
782
|
const name = dsmUserParam.name;
|
|
790
783
|
const rawUserVar = "D54_RAW_USER_" + name;
|
|
791
|
-
|
|
784
|
+
// Like the Shared Folder gate: on UPGRADE the submitted user only counts when
|
|
785
|
+
// CHANGE_<name> is ticked, because the control is not reliably blank.
|
|
786
|
+
lines.push(` if [ "$STATUS" = "UPGRADE" ] && upgrade_change_enabled "\${CHANGE_${name}:-}"; then`, ` if [ "\${${name}+x}" = x ] && [ -n "\${${name}}" ]; then`, ` ${rawUserVar}="\${${name}}"`, " else", ` die "missing required dsm user parameter ${name}"`, " fi", ' elif [ "$STATUS" = "UPGRADE" ] && [ -f "$CANONICAL_ENV" ] && [ ! -L "$CANONICAL_ENV" ] && ' +
|
|
792
787
|
`${rawUserVar}="$(read_env_value "$CANONICAL_ENV" "${name}")"; then`, " :", ` elif [ "\${${name}+x}" = x ]; then`, ` ${rawUserVar}="\${${name}}"`, " else", ` die "missing required dsm user parameter ${name}"`, " fi", ` resolved_user_info="$(resolve_dsm_user "$${rawUserVar}")"`, " set -- $resolved_user_info", ` ${name}_UID="$1"`, ` ${name}_GID="$2"`, " shift 2 || true", ` ${name}_GROUPS="$*"`, ` rewrite_group_add "${name}" "$${name}_GROUPS" "$PROJECT/docker-compose.yml"`);
|
|
793
788
|
}
|
|
794
789
|
lines.push(' append_env "SYNOPKG_PKGVAR" "$PLATFORM_PKGVAR"', ' append_env "SYNO_APP_SECRETS_DIR" "$PLATFORM_SECRETS"');
|
|
@@ -890,16 +885,17 @@ function renderManagedScript(name, contract, nativeContext, isResourceWorker = f
|
|
|
890
885
|
return renderHeadlessResourceMarker();
|
|
891
886
|
}
|
|
892
887
|
if (name === "postuninst") {
|
|
893
|
-
const projectRoot = isDynamicRoute ? 'PROJECT="${SYNOPKG_PKGDEST}/compose"\n' : "";
|
|
894
|
-
const deleteRoots =
|
|
895
|
-
|
|
896
|
-
:
|
|
888
|
+
const projectRoot = isDynamicRoute ? 'PROJECT="${SYNOPKG_PKGDEST:-}/compose"\n' : "";
|
|
889
|
+
const deleteRoots = [
|
|
890
|
+
{ variable: "PKGVAR", area: "appdata" },
|
|
891
|
+
{ variable: "PKGHOME", area: "apphome" },
|
|
892
|
+
...(isDynamicRoute ? [{ variable: "PROJECT", area: "appstore" }] : []),
|
|
893
|
+
];
|
|
897
894
|
return `#!/bin/sh
|
|
898
895
|
set -eu
|
|
899
|
-
PKGVAR="\${SYNOPKG_PKGVAR}"
|
|
900
|
-
PKGHOME="\${SYNOPKG_PKGHOME}"
|
|
901
|
-
|
|
902
|
-
${projectRoot}${renderDeleteAppDataBlock(deleteRoots)}exit 0
|
|
896
|
+
PKGVAR="\${SYNOPKG_PKGVAR:-}"
|
|
897
|
+
PKGHOME="\${SYNOPKG_PKGHOME:-}"
|
|
898
|
+
${projectRoot}${renderDeleteAppDataBlock(String(contract.package), deleteRoots)}exit 0
|
|
903
899
|
`;
|
|
904
900
|
}
|
|
905
901
|
return `#!/bin/sh\nexit 0\n`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Translate } from "./wizard-i18n.js";
|
|
2
|
+
/** One step of a DSM install wizard; `items` are rendered verbatim as JSON. */
|
|
3
|
+
export interface InstallWizardStep {
|
|
4
|
+
step_title: string;
|
|
5
|
+
items: Array<Record<string, unknown>>;
|
|
6
|
+
}
|
|
7
|
+
/** The static JSON wizard per locale, and the dynamic script per locale. */
|
|
8
|
+
export interface InstallWizardFiles {
|
|
9
|
+
static: Record<string, string>;
|
|
10
|
+
dynamic: Record<string, string>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Builds the static `<base>` wizard files and one dynamic `<base>.sh` script
|
|
14
|
+
* per locale from the same render function. The static files stay for DSM
|
|
15
|
+
* versions and flows that do not run the dynamic script; both carry the same
|
|
16
|
+
* items, and only the dynamic one adds the reuse notice when data exists.
|
|
17
|
+
*/
|
|
18
|
+
export declare function renderInstallWizardFiles(packageName: string, render: (t: Translate) => InstallWizardStep[]): InstallWizardFiles;
|
|
19
|
+
/** The native-go install step: no parameters, only the app-space consent. */
|
|
20
|
+
export declare function renderNativeInstallWizard(t: Translate): InstallWizardStep[];
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { DSM_LANGS, LOCALES } from "../standalone/i18n.js";
|
|
2
|
+
import { renderWizardFiles, translator } from "./wizard-i18n.js";
|
|
3
|
+
const BASE = "install_uifile";
|
|
4
|
+
function shellQuote(value) {
|
|
5
|
+
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
6
|
+
}
|
|
7
|
+
function localeName(locale, suffix) {
|
|
8
|
+
return locale === "en" ? `${BASE}${suffix}` : `${BASE}_${DSM_LANGS[locale]}${suffix}`;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The install wizard the administrator would otherwise never see: DSM keeps
|
|
12
|
+
* `@appdata` after an uninstall, so a reinstall silently inherits the old
|
|
13
|
+
* settings and generated secrets. This notice says so and how to start clean.
|
|
14
|
+
*/
|
|
15
|
+
function withReuseNotice(steps, packageName, t) {
|
|
16
|
+
const notice = { desc: t("install.reuseData", { package: packageName }) };
|
|
17
|
+
const [first, ...rest] = steps;
|
|
18
|
+
if (!first) {
|
|
19
|
+
return [{ step_title: t("install.step"), items: [notice] }];
|
|
20
|
+
}
|
|
21
|
+
return [{ ...first, items: [notice, ...first.items] }, ...rest];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A dynamic install wizard script. It only reads: `SYNOPKG_PKGDEST_VOL` when
|
|
25
|
+
* DSM already knows the target volume, otherwise every `/volume*` (the volume
|
|
26
|
+
* is chosen after the wizard on some flows). The wizard JSON is written to
|
|
27
|
+
* `SYNOPKG_TEMP_LOGFILE`, DSM's documented channel, or stdout without it.
|
|
28
|
+
*/
|
|
29
|
+
function renderDynamicScript(packageName, withData, withoutData) {
|
|
30
|
+
return `#!/bin/sh
|
|
31
|
+
# Generated by synopkgland. Read-only: it checks whether this package already
|
|
32
|
+
# has App Data on a volume, then prints the install wizard for this language.
|
|
33
|
+
pkg=${shellQuote(packageName)}
|
|
34
|
+
existing=
|
|
35
|
+
for root in \${SYNOPKG_PKGDEST_VOL:-} /volume*; do
|
|
36
|
+
if [ -n "$root" ] && [ -d "$root/@appdata/$pkg" ]; then
|
|
37
|
+
existing=1
|
|
38
|
+
break
|
|
39
|
+
fi
|
|
40
|
+
done
|
|
41
|
+
if [ -n "\${SYNOPKG_TEMP_LOGFILE:-}" ]; then
|
|
42
|
+
exec > "$SYNOPKG_TEMP_LOGFILE"
|
|
43
|
+
fi
|
|
44
|
+
if [ -n "$existing" ]; then
|
|
45
|
+
cat <<'SYNOPKGLAND_WIZARD'
|
|
46
|
+
${withData}
|
|
47
|
+
SYNOPKGLAND_WIZARD
|
|
48
|
+
else
|
|
49
|
+
cat <<'SYNOPKGLAND_WIZARD'
|
|
50
|
+
${withoutData}
|
|
51
|
+
SYNOPKGLAND_WIZARD
|
|
52
|
+
fi
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Builds the static `<base>` wizard files and one dynamic `<base>.sh` script
|
|
57
|
+
* per locale from the same render function. The static files stay for DSM
|
|
58
|
+
* versions and flows that do not run the dynamic script; both carry the same
|
|
59
|
+
* items, and only the dynamic one adds the reuse notice when data exists.
|
|
60
|
+
*/
|
|
61
|
+
export function renderInstallWizardFiles(packageName, render) {
|
|
62
|
+
const staticFiles = renderWizardFiles(BASE, render);
|
|
63
|
+
const dynamic = {};
|
|
64
|
+
for (const locale of LOCALES) {
|
|
65
|
+
const t = translator(locale);
|
|
66
|
+
const steps = render(t);
|
|
67
|
+
const withData = JSON.stringify(withReuseNotice(steps, packageName, t), null, 2);
|
|
68
|
+
const withoutData = JSON.stringify(steps, null, 2);
|
|
69
|
+
dynamic[localeName(locale, ".sh")] = renderDynamicScript(packageName, withData, withoutData);
|
|
70
|
+
}
|
|
71
|
+
return { static: staticFiles, dynamic };
|
|
72
|
+
}
|
|
73
|
+
/** The native-go install step: no parameters, only the app-space consent. */
|
|
74
|
+
export function renderNativeInstallWizard(t) {
|
|
75
|
+
return [{ step_title: t("install.step"), items: [{ desc: t("consent.appOwnSpace") }] }];
|
|
76
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { NativeConfig } from "../native/types.js";
|
|
2
|
+
import { type DeleteRoot } from "./delete-app-data.js";
|
|
3
|
+
/** `@appdata` and `@apphome`; `@appconf` stays because no template writes there. */
|
|
4
|
+
export declare const NATIVE_DELETE_ROOTS: readonly DeleteRoot[];
|
|
2
5
|
export interface NativeLifecycleInput {
|
|
3
6
|
packageIdentity: string;
|
|
4
7
|
config: NativeConfig;
|
|
@@ -49,3 +52,5 @@ export declare function renderNativePreuninst(input: NativeLifecycleInput): stri
|
|
|
49
52
|
* package user on uninstall; deleting a system account is not this script's job.
|
|
50
53
|
*/
|
|
51
54
|
export declare function renderNativePostuninst(input: NativeLifecycleInput): string;
|
|
55
|
+
/** The postuninst every native runtime shares: only the package name differs. */
|
|
56
|
+
export declare function renderPackagePostuninst(pkg: string): string;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { renderDeleteAppDataBlock } from "./delete-app-data.js";
|
|
2
|
+
/** `@appdata` and `@apphome`; `@appconf` stays because no template writes there. */
|
|
3
|
+
export const NATIVE_DELETE_ROOTS = [
|
|
4
|
+
{ variable: "PKGVAR", area: "appdata" },
|
|
5
|
+
{ variable: "PKGHOME", area: "apphome" },
|
|
6
|
+
];
|
|
2
7
|
/**
|
|
3
8
|
* Escapes a literal string for safe inclusion in POSIX `/bin/sh` single quotes.
|
|
4
9
|
* A single quote is represented as `'\''` (close single quote, literal escaped single quote, reopen single quote).
|
|
@@ -192,11 +197,16 @@ exit 0
|
|
|
192
197
|
* package user on uninstall; deleting a system account is not this script's job.
|
|
193
198
|
*/
|
|
194
199
|
export function renderNativePostuninst(input) {
|
|
195
|
-
|
|
200
|
+
return renderPackagePostuninst(input.packageIdentity);
|
|
201
|
+
}
|
|
202
|
+
/** The postuninst every native runtime shares: only the package name differs. */
|
|
203
|
+
export function renderPackagePostuninst(pkg) {
|
|
196
204
|
const pkgVarFallback = `\${SYNOPKG_PKGVAR:-/var/packages/${pkg}/var}`;
|
|
205
|
+
const pkgHomeFallback = `\${SYNOPKG_PKGHOME:-/var/packages/${pkg}/home}`;
|
|
197
206
|
return `#!/bin/sh
|
|
198
207
|
set -eu
|
|
199
208
|
PKGVAR="${pkgVarFallback}"
|
|
200
|
-
${
|
|
209
|
+
PKGHOME="${pkgHomeFallback}"
|
|
210
|
+
${renderDeleteAppDataBlock(pkg, NATIVE_DELETE_ROOTS)}exit 0
|
|
201
211
|
`;
|
|
202
212
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import type { AppContract } from "../types.js";
|
|
2
|
-
import type
|
|
1
|
+
import type { AppContract, ComposeDocument } from "../types.js";
|
|
2
|
+
import { type ResourceWorkerEligibility } from "../compose/analyze.js";
|
|
3
3
|
export { classifyComposeRoute, resourceWorkerEligibility, type ComposeRoute, type ComposeRouteClassification, type ResourceWorkerEligibility, type ResourceWorkerIneligibleReason, } from "../compose/analyze.js";
|
|
4
4
|
export declare function composeProjectName(packageId: string): string;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* `forcePull` re-resolves every image tag on install, which can move an image
|
|
7
|
+
* shared with other containers. Digest-pinned images cannot move, so it is only
|
|
8
|
+
* needed (and kept, to preserve upgrade behaviour) while a tag is unpinned.
|
|
9
|
+
*/
|
|
10
|
+
export declare function renderDockerProjectResource(packageId: string, projectPath?: string, forcePull?: boolean): Record<string, unknown>;
|
|
6
11
|
export declare function renderWebserviceResource(contract: AppContract, adminport: number): Record<string, unknown>;
|
|
7
|
-
export declare function renderResourceConfig(contract: AppContract, eligibility: ResourceWorkerEligibility): string;
|
|
12
|
+
export declare function renderResourceConfig(contract: AppContract, eligibility: ResourceWorkerEligibility, compose: ComposeDocument): string;
|
|
8
13
|
/**
|
|
9
14
|
* Renders the lifecycle control script for the Docker Project resource-worker
|
|
10
15
|
* route. ContainerManager owns the actual project start/stop operation through
|