@synopackageland/cli 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +124 -0
- package/README.md +26 -4
- package/dist/add.js +4 -17
- package/dist/authorization-sdk.d.ts +0 -1
- package/dist/authorization-sdk.js +0 -1
- package/dist/build-spk/gateway.js +2 -2
- package/dist/build-spk/notices.js +12 -8
- package/dist/capability-overlays.d.ts +15 -0
- package/dist/capability-overlays.js +18 -0
- package/dist/cli-version.d.ts +2 -0
- package/dist/cli-version.js +3 -0
- package/dist/cli.js +3 -1
- package/dist/error-registry.js +12 -4
- package/dist/info.js +2 -1
- package/dist/init.js +52 -58
- package/dist/reproducible.js +1 -1
- package/dist/runtime/delegate-contract.d.ts +15 -0
- package/dist/runtime/delegate-contract.js +2 -0
- package/dist/runtime/executor-build.d.ts +15 -1
- package/dist/runtime/executor-build.js +42 -11
- package/dist/runtime/executor-digests.json +13 -0
- package/dist/runtime/executor-inspect.d.ts +1 -0
- package/dist/runtime/executor-inspect.js +5 -2
- package/dist/runtime/executor-policy.d.ts +3 -1
- package/dist/runtime/executor-policy.js +7 -2
- package/dist/runtime/executor-source.d.ts +21 -0
- package/dist/runtime/executor-source.js +35 -0
- package/dist/runtime/executor-tasks.d.ts +5 -2
- package/dist/runtime/executor-tasks.js +6 -4
- package/dist/runtime/sdk-source.d.ts +31 -0
- package/dist/runtime/sdk-source.js +92 -0
- package/dist/standalone/api-permissions.d.ts +4 -1
- package/dist/standalone/api-permissions.js +10 -18
- package/dist/standalone/build.d.ts +1 -0
- package/dist/standalone/build.js +11 -4
- package/dist/standalone/daemon.js +2 -2
- package/dist/standalone/dsm-window.js +2 -2
- package/dist/standalone/manifest.d.ts +5 -2
- package/dist/standalone/manifest.js +9 -3
- package/dist/standalone/root-window.d.ts +1 -1
- package/dist/standalone/root-window.js +0 -1
- package/dist/standalone/sdk-check.d.ts +9 -0
- package/dist/standalone/sdk-check.js +43 -0
- package/dist/standalone/spk.js +1 -1
- package/dist/template-paths.d.ts +7 -2
- package/dist/template-paths.js +18 -6
- package/package.json +13 -3
- package/dist/templates/_executor/README.md +0 -318
- package/dist/templates/_executor/anchor.go +0 -156
- package/dist/templates/_executor/anchor_test.go +0 -161
- package/dist/templates/_executor/apppriv_review_test.go +0 -28
- package/dist/templates/_executor/auth_presence_review_test.go +0 -38
- package/dist/templates/_executor/cancel_contract_test.go +0 -236
- package/dist/templates/_executor/cmd/lifecycle/main.go +0 -42
- package/dist/templates/_executor/cookie_review_test.go +0 -27
- package/dist/templates/_executor/copy.go +0 -64
- package/dist/templates/_executor/copy_test.go +0 -88
- package/dist/templates/_executor/digest_review_test.go +0 -120
- package/dist/templates/_executor/directories.go +0 -40
- package/dist/templates/_executor/dsm.go +0 -369
- package/dist/templates/_executor/dsm_test.go +0 -290
- package/dist/templates/_executor/executor.go +0 -735
- package/dist/templates/_executor/executor_test.go +0 -314
- package/dist/templates/_executor/go.mod +0 -5
- package/dist/templates/_executor/identity.go +0 -74
- package/dist/templates/_executor/identity_kernel_linux_test.go +0 -60
- package/dist/templates/_executor/identity_linux.go +0 -82
- package/dist/templates/_executor/identity_security_test.go +0 -43
- package/dist/templates/_executor/internal/lifecycle/lifecycle.go +0 -95
- package/dist/templates/_executor/internal/lifecycle/lifecycle_test.go +0 -232
- package/dist/templates/_executor/internal/taskscript/boot.sh +0 -31
- package/dist/templates/_executor/internal/taskscript/cmd/main.go +0 -19
- package/dist/templates/_executor/internal/taskscript/control.sh +0 -31
- package/dist/templates/_executor/internal/taskscript/tasks.go +0 -44
- package/dist/templates/_executor/json_review_test.go +0 -40
- package/dist/templates/_executor/lifecycle_test.go +0 -97
- package/dist/templates/_executor/link_linux.go +0 -28
- package/dist/templates/_executor/long_running_test.go +0 -530
- package/dist/templates/_executor/main.go +0 -576
- package/dist/templates/_executor/managed.go +0 -117
- package/dist/templates/_executor/managed_test.go +0 -137
- package/dist/templates/_executor/move_linux.go +0 -490
- package/dist/templates/_executor/move_linux_test.go +0 -460
- package/dist/templates/_executor/move_validation.go +0 -46
- package/dist/templates/_executor/move_validation_test.go +0 -187
- package/dist/templates/_executor/operations.go +0 -926
- package/dist/templates/_executor/path_test.go +0 -35
- package/dist/templates/_executor/pid.go +0 -37
- package/dist/templates/_executor/pid_test.go +0 -113
- package/dist/templates/_executor/platform_linux.go +0 -187
- package/dist/templates/_executor/platform_linux_test.go +0 -191
- package/dist/templates/_executor/platform_other.go +0 -76
- package/dist/templates/_executor/process.go +0 -142
- package/dist/templates/_executor/purge_log.go +0 -18
- package/dist/templates/_executor/records.go +0 -242
- package/dist/templates/_executor/scope_cancel_contract_test.go +0 -91
- package/dist/templates/_executor/scope_client.go +0 -37
- package/dist/templates/_executor/scope_contract.go +0 -12
- package/dist/templates/_executor/selected_scope.go +0 -146
- package/dist/templates/_executor/selected_scope_test.go +0 -186
- package/dist/templates/_executor/socket_linux_test.go +0 -46
- package/dist/templates/_executor/status_disabled_test.go +0 -33
- package/dist/templates/_executor/store.go +0 -91
- package/dist/templates/_executor/supervise.go +0 -109
- package/dist/templates/_executor/supervise_test.go +0 -130
- package/dist/templates/_executor/task_race_review_test.go +0 -47
- package/dist/templates/_executor/tasks.go +0 -320
- package/dist/templates/_executor/tasks_dsm71_test.go +0 -114
- package/dist/templates/_executor/tasks_review_test.go +0 -43
- package/dist/templates/_executor/tasks_test.go +0 -223
- package/dist/templates/_executor/testdata/evidence/cleanup.json +0 -24
- package/dist/templates/_executor/testdata/evidence/final-smoke.jsonl +0 -9
- package/dist/templates/_executor/testdata/evidence/kernel-acl.json +0 -6
- package/dist/templates/_executor/testdata/evidence/linux-tests.log +0 -123
- package/dist/templates/_executor/testdata/evidence/live.jsonl +0 -23
- package/dist/templates/_executor/testdata/evidence/storage.json +0 -90
- package/dist/templates/_executor/testdata/evidence/validation.json +0 -55
- package/dist/templates/_executor/testdata/live_probe.py +0 -98
- package/dist/templates/_executor/upgrade_watch_test.go +0 -244
- package/dist/templates/_executor/watch.go +0 -164
- package/dist/templates/_executor/watch_test.go +0 -291
- package/dist/templates/_executor/write_review_linux_test.go +0 -87
- package/dist/templates/_shared/AGENTS.md +0 -146
- package/dist/templates/_shared/CLAUDE.md +0 -1
- package/dist/templates/_shared/third-party-notices.mjs +0 -51
- package/dist/templates/binary/LICENSES/GO-LICENSE +0 -27
- package/dist/templates/binary/LICENSES/GO-PATENTS +0 -22
- package/dist/templates/binary/dsm-package.yaml +0 -46
- package/dist/templates/binary/example/main.go +0 -16
- package/dist/templates/binary/gitignore +0 -2
- package/dist/templates/binary/i18n/messages/de.json +0 -4
- package/dist/templates/binary/i18n/messages/en.json +0 -4
- package/dist/templates/binary/i18n/messages/es.json +0 -4
- package/dist/templates/binary/i18n/messages/fr.json +0 -4
- package/dist/templates/binary/i18n/messages/it.json +0 -4
- package/dist/templates/binary/i18n/messages/ja.json +0 -4
- package/dist/templates/binary/i18n/messages/ko.json +0 -4
- package/dist/templates/binary/i18n/messages/zh-CN.json +0 -4
- package/dist/templates/binary/i18n/messages/zh-TW.json +0 -4
- package/dist/templates/binary/ui/app.css +0 -4
- package/dist/templates/binary/ui/app.js +0 -32
- package/dist/templates/compose/compose.yaml +0 -8
- package/dist/templates/compose/synology-app.yaml +0 -16
- package/dist/templates/native-authorization/AuthorizationGate.vue +0 -91
- package/dist/templates/native-authorization/i18n/de.json +0 -37
- package/dist/templates/native-authorization/i18n/en.json +0 -37
- package/dist/templates/native-authorization/i18n/es.json +0 -37
- package/dist/templates/native-authorization/i18n/fr.json +0 -37
- package/dist/templates/native-authorization/i18n/index.ts +0 -15
- package/dist/templates/native-authorization/i18n/it.json +0 -37
- package/dist/templates/native-authorization/i18n/ja.json +0 -37
- package/dist/templates/native-authorization/i18n/ko.json +0 -37
- package/dist/templates/native-authorization/i18n/zh-CN.json +0 -37
- package/dist/templates/native-authorization/i18n/zh-TW.json +0 -37
- package/dist/templates/native-go/README.md +0 -459
- package/dist/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +0 -61
- package/dist/templates/native-go/backend/cmd/app/main.go +0 -95
- package/dist/templates/native-go/backend/cmd/background-worker/main.go +0 -38
- package/dist/templates/native-go/backend/go.mod +0 -9
- package/dist/templates/native-go/backend/go.sum +0 -4
- package/dist/templates/native-go/backend/internal/api/cgi_framing_test.go +0 -32
- package/dist/templates/native-go/backend/internal/api/cookie_review_test.go +0 -28
- package/dist/templates/native-go/backend/internal/api/deadline_test.go +0 -114
- package/dist/templates/native-go/backend/internal/api/dsm-session.go +0 -54
- package/dist/templates/native-go/backend/internal/api/dsm-session_test.go +0 -51
- package/dist/templates/native-go/backend/internal/api/entry_test.go +0 -47
- package/dist/templates/native-go/backend/internal/api/errors.go +0 -47
- package/dist/templates/native-go/backend/internal/api/permissions.go +0 -161
- package/dist/templates/native-go/backend/internal/api/permissions.json +0 -5
- package/dist/templates/native-go/backend/internal/api/permissions_test.go +0 -113
- package/dist/templates/native-go/backend/internal/api/policy_fixture_test.go +0 -8
- package/dist/templates/native-go/backend/internal/api/registry.go +0 -142
- package/dist/templates/native-go/backend/internal/api/registry_test.go +0 -344
- package/dist/templates/native-go/backend/internal/api/resource_limits_test.go +0 -87
- package/dist/templates/native-go/backend/internal/api/sdk-permissions.json +0 -59
- package/dist/templates/native-go/backend/internal/api/sdk_policy_test.go +0 -31
- package/dist/templates/native-go/backend/internal/api/server.go +0 -305
- package/dist/templates/native-go/backend/internal/api/testdata/permissions-cases.json +0 -172
- package/dist/templates/native-go/backend/internal/app/background.go +0 -249
- package/dist/templates/native-go/backend/internal/app/background_none.go +0 -8
- package/dist/templates/native-go/backend/internal/app/background_owner.go +0 -38
- package/dist/templates/native-go/backend/internal/app/background_owner_test.go +0 -163
- package/dist/templates/native-go/backend/internal/app/background_schedule.go +0 -69
- package/dist/templates/native-go/backend/internal/app/background_schedule_test.go +0 -62
- package/dist/templates/native-go/backend/internal/app/background_test.go +0 -320
- package/dist/templates/native-go/backend/internal/app/delegate_config.go +0 -57
- package/dist/templates/native-go/backend/internal/app/delegate_config_test.go +0 -28
- package/dist/templates/native-go/backend/internal/app/delegate_none.go +0 -5
- package/dist/templates/native-go/backend/internal/app/identity.go +0 -20
- package/dist/templates/native-go/backend/internal/app/identity_test.go +0 -15
- package/dist/templates/native-go/backend/internal/app/migrations.go +0 -41
- package/dist/templates/native-go/backend/internal/app/migrations_test.go +0 -41
- package/dist/templates/native-go/backend/internal/app/portal.go +0 -30
- package/dist/templates/native-go/backend/internal/app/portal_test.go +0 -55
- package/dist/templates/native-go/backend/internal/app/root_none.go +0 -9
- package/dist/templates/native-go/backend/internal/app/routes.go +0 -137
- package/dist/templates/native-go/backend/internal/app/routes_test.go +0 -165
- package/dist/templates/native-go/backend/internal/app/session_files.go +0 -9
- package/dist/templates/native-go/backend/internal/app/session_files_test.go +0 -14
- package/dist/templates/native-go/backend/internal/app/shared_folder.go +0 -144
- package/dist/templates/native-go/backend/internal/app/shared_folder_test.go +0 -158
- package/dist/templates/native-go/backend/internal/background/access.go +0 -57
- package/dist/templates/native-go/backend/internal/background/lock_test.go +0 -131
- package/dist/templates/native-go/backend/internal/background/owner_test.go +0 -118
- package/dist/templates/native-go/backend/internal/background/runner.go +0 -185
- package/dist/templates/native-go/backend/internal/background/runner_test.go +0 -209
- package/dist/templates/native-go/backend/internal/background/schedule.go +0 -336
- package/dist/templates/native-go/backend/internal/background/schedule_test.go +0 -368
- package/dist/templates/native-go/backend/internal/background/store.go +0 -825
- package/dist/templates/native-go/backend/internal/background/store_test.go +0 -365
- package/dist/templates/native-go/backend/internal/datamigrate/migrate.go +0 -191
- package/dist/templates/native-go/backend/internal/datamigrate/migrate_test.go +0 -177
- package/dist/templates/native-go/backend/internal/dsm/admin.go +0 -76
- package/dist/templates/native-go/backend/internal/dsm/admin_linux.go +0 -110
- package/dist/templates/native-go/backend/internal/dsm/admin_linux_test.go +0 -105
- package/dist/templates/native-go/backend/internal/dsm/admin_other.go +0 -15
- package/dist/templates/native-go/backend/internal/dsm/admin_test.go +0 -67
- package/dist/templates/native-go/backend/internal/dsm/apppriv.go +0 -30
- package/dist/templates/native-go/backend/internal/dsm/auth.go +0 -94
- package/dist/templates/native-go/backend/internal/dsm/auth_test.go +0 -159
- package/dist/templates/native-go/backend/internal/dsm/bridge_file.go +0 -75
- package/dist/templates/native-go/backend/internal/dsm/bridge_file_test.go +0 -57
- package/dist/templates/native-go/backend/internal/dsm/entry.go +0 -177
- package/dist/templates/native-go/backend/internal/dsm/entry_test.go +0 -315
- package/dist/templates/native-go/backend/internal/dsm/native/admin-aarch64.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/admin-armv7.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/admin-x86_64.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/admin_check.c +0 -28
- package/dist/templates/native-go/backend/internal/dsm/native/apppriv-aarch64.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/apppriv-armv7.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/apppriv-x86_64.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/apppriv_check.c +0 -33
- package/dist/templates/native-go/backend/internal/dsm/native/build.sh +0 -18
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/GLIBC-NOTICES.txt +0 -400
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/LGPL-2.1.txt +0 -501
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/SOURCE.txt +0 -5
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/ZIG-MIT.txt +0 -21
- package/dist/templates/native-go/backend/internal/dsm/native/provenance.json +0 -18
- package/dist/templates/native-go/backend/internal/filestation/browse_test.go +0 -67
- package/dist/templates/native-go/backend/internal/filestation/check_permission.go +0 -71
- package/dist/templates/native-go/backend/internal/filestation/check_permission_test.go +0 -77
- package/dist/templates/native-go/backend/internal/filestation/client.go +0 -337
- package/dist/templates/native-go/backend/internal/filestation/client_test.go +0 -155
- package/dist/templates/native-go/backend/internal/filestation/doc.go +0 -4
- package/dist/templates/native-go/backend/internal/filestation/download_dsm71_test.go +0 -82
- package/dist/templates/native-go/backend/internal/filestation/http.go +0 -70
- package/dist/templates/native-go/backend/internal/filestation/http_test.go +0 -188
- package/dist/templates/native-go/backend/internal/filestation/operations_test.go +0 -206
- package/dist/templates/native-go/backend/internal/filestation/read_file_test.go +0 -89
- package/dist/templates/native-go/backend/internal/filestation/sdk_policy_test.go +0 -39
- package/dist/templates/native-go/backend/internal/filestation/service.go +0 -254
- package/dist/templates/native-go/backend/internal/filestation/service_test.go +0 -74
- package/dist/templates/native-go/backend/internal/filestation/upload_stream.go +0 -76
- package/dist/templates/native-go/backend/internal/filestation/upload_stream_test.go +0 -77
- package/dist/templates/native-go/backend/internal/filestation/write.go +0 -32
- package/dist/templates/native-go/backend/internal/filestation/write_test.go +0 -124
- package/dist/templates/native-go/backend/internal/identity/README.md +0 -59
- package/dist/templates/native-go/backend/internal/identity/dsm.go +0 -115
- package/dist/templates/native-go/backend/internal/identity/http.go +0 -291
- package/dist/templates/native-go/backend/internal/identity/identity_test.go +0 -530
- package/dist/templates/native-go/backend/internal/identity/service.go +0 -159
- package/dist/templates/native-go/backend/internal/identity/store.go +0 -109
- package/dist/templates/native-go/backend/internal/jsonlimits/limits.go +0 -48
- package/dist/templates/native-go/backend/internal/jsonlimits/limits_test.go +0 -52
- package/dist/templates/native-go/backend/internal/portal/portal.go +0 -138
- package/dist/templates/native-go/backend/internal/portal/portal_test.go +0 -89
- package/dist/templates/native-go/dsm-package.yaml +0 -71
- package/dist/templates/native-go/gitignore +0 -1
- package/dist/templates/native-go/i18n/glossary.json +0 -663
- package/dist/templates/native-go/i18n/messages/de.json +0 -29
- package/dist/templates/native-go/i18n/messages/en.json +0 -29
- package/dist/templates/native-go/i18n/messages/es.json +0 -29
- package/dist/templates/native-go/i18n/messages/fr.json +0 -29
- package/dist/templates/native-go/i18n/messages/it.json +0 -29
- package/dist/templates/native-go/i18n/messages/ja.json +0 -29
- package/dist/templates/native-go/i18n/messages/ko.json +0 -29
- package/dist/templates/native-go/i18n/messages/zh-CN.json +0 -29
- package/dist/templates/native-go/i18n/messages/zh-TW.json +0 -29
- package/dist/templates/native-go/ui/app.css +0 -45
- package/dist/templates/native-go/ui/app.js +0 -111
- package/dist/templates/native-go-delegate/DELEGATE.md +0 -263
- package/dist/templates/native-go-delegate/backend/cmd/background-worker/main.go +0 -48
- package/dist/templates/native-go-delegate/backend/internal/app/delegate.go +0 -25
- package/dist/templates/native-go-delegate/backend/internal/app/delegate_on.go +0 -5
- package/dist/templates/native-go-delegate/backend/internal/app/delegate_routes_test.go +0 -31
- package/dist/templates/native-go-delegate/backend/internal/background/delegate_review_test.go +0 -174
- package/dist/templates/native-go-delegate/backend/internal/background/delegated.go +0 -277
- package/dist/templates/native-go-delegate/backend/internal/background/delegated_moves.go +0 -270
- package/dist/templates/native-go-delegate/backend/internal/background/delegated_test.go +0 -34
- package/dist/templates/native-go-delegate/backend/internal/delegate/admission_recovery_test.go +0 -410
- package/dist/templates/native-go-delegate/backend/internal/delegate/busy_review_test.go +0 -15
- package/dist/templates/native-go-delegate/backend/internal/delegate/cancel_contract_test.go +0 -95
- package/dist/templates/native-go-delegate/backend/internal/delegate/client.go +0 -151
- package/dist/templates/native-go-delegate/backend/internal/delegate/client_test.go +0 -214
- package/dist/templates/native-go-delegate/backend/internal/delegate/destination.go +0 -110
- package/dist/templates/native-go-delegate/backend/internal/delegate/destination_state.go +0 -117
- package/dist/templates/native-go-delegate/backend/internal/delegate/destination_state_test.go +0 -60
- package/dist/templates/native-go-delegate/backend/internal/delegate/destination_test.go +0 -116
- package/dist/templates/native-go-delegate/backend/internal/delegate/example.go +0 -81
- package/dist/templates/native-go-delegate/backend/internal/delegate/example_test.go +0 -91
- package/dist/templates/native-go-delegate/backend/internal/delegate/executor_contract_test.go +0 -511
- package/dist/templates/native-go-delegate/backend/internal/delegate/files.go +0 -132
- package/dist/templates/native-go-delegate/backend/internal/delegate/long_running_routes.go +0 -92
- package/dist/templates/native-go-delegate/backend/internal/delegate/long_running_routes_test.go +0 -99
- package/dist/templates/native-go-delegate/backend/internal/delegate/move.go +0 -348
- package/dist/templates/native-go-delegate/backend/internal/delegate/move_test.go +0 -351
- package/dist/templates/native-go-delegate/backend/internal/delegate/operations_list.go +0 -65
- package/dist/templates/native-go-delegate/backend/internal/delegate/operations_list_test.go +0 -114
- package/dist/templates/native-go-delegate/backend/internal/delegate/retry.go +0 -106
- package/dist/templates/native-go-delegate/backend/internal/delegate/retry_test.go +0 -143
- package/dist/templates/native-go-delegate/backend/internal/delegate/service.go +0 -364
- package/dist/templates/native-go-delegate/backend/internal/delegate/service_test.go +0 -318
- package/dist/templates/native-go-delegate/backend/internal/delegate/staging.go +0 -121
- package/dist/templates/native-go-delegate/backend/internal/delegate/status_disabled_test.go +0 -51
- package/dist/templates/native-go-delegate/backend/internal/delegate/testdata/executor_contract.txt +0 -112
- package/dist/templates/native-go-delegate/backend/internal/delegate/transient_contract_test.go +0 -137
- package/dist/templates/native-go-delegate/backend/internal/delegate/wait_cancel_test.go +0 -101
- package/dist/templates/native-go-delegate/backend/internal/delegate/worker.go +0 -225
- package/dist/templates/native-go-delegate/backend/internal/filestation/files.go +0 -43
- package/dist/templates/native-go-delegate/backend/internal/filestation/files_test.go +0 -59
- package/dist/templates/native-go-delegate/frontend/src/CapabilityPanels.vue +0 -37
- package/dist/templates/native-go-delegate/frontend/src/delegate/BackgroundSavePanel.vue +0 -113
- package/dist/templates/native-go-delegate/frontend/src/delegate/DelegatePanel.vue +0 -70
- package/dist/templates/native-go-delegate/frontend/src/delegate/copy.ts +0 -8
- package/dist/templates/native-go-delegate/frontend/src/delegate/i18n/waiting.json +0 -11
- package/dist/templates/native-go-delegate/frontend/test/background-save.test.ts +0 -121
- package/dist/templates/native-go-delegate/frontend/test/delegate.test.ts +0 -145
- package/dist/templates/native-go-delegate/frontend/test/scope-settings.test.ts +0 -49
- package/dist/templates/native-go-delegate/test-frontend.sh +0 -12
- package/dist/templates/native-go-delegate/test.sh +0 -18
- package/dist/templates/native-go-jobs/BACKGROUND.md +0 -108
- package/dist/templates/native-go-jobs/backend/internal/app/background_on.go +0 -7
- package/dist/templates/native-go-jobs/backend/internal/app/background_routes_test.go +0 -90
- package/dist/templates/native-go-jobs/frontend/src/background/BackgroundPanel.vue +0 -170
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/de.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/en.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/es.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/fr.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/it.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/ja.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/ko.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/zh-CN.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/zh-TW.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n.ts +0 -19
- package/dist/templates/native-go-jobs/frontend/src/background/picker-provider.ts +0 -12
- package/dist/templates/native-go-jobs/frontend/src/background/request-key.ts +0 -5
- package/dist/templates/native-go-jobs/frontend/test/background.test.ts +0 -205
- package/dist/templates/native-go-root-ops/backend/internal/app/executor.go +0 -140
- package/dist/templates/native-go-root-ops/backend/internal/app/executor_test.go +0 -117
- package/dist/templates/native-go-root-ops/root/whoami.sh +0 -3
- package/dist/templates/native-go-vue/README.md +0 -47
- package/dist/templates/native-go-vue/frontend/DESIGN.md +0 -61
- package/dist/templates/native-go-vue/frontend/package-lock.json +0 -2530
- package/dist/templates/native-go-vue/frontend/package.json +0 -6
- package/dist/templates/native-go-vue/frontend/src/App.vue +0 -96
- package/dist/templates/native-go-vue/frontend/src/CapabilityPanels.vue +0 -6
- package/dist/templates/native-go-vue/frontend/src/context.ts +0 -78
- package/dist/templates/native-go-vue/frontend/src/delegate/ExecutorSettings.vue +0 -70
- package/dist/templates/native-go-vue/frontend/src/delegate/catalogs.ts +0 -11
- package/dist/templates/native-go-vue/frontend/src/delegate/copy.test.ts +0 -12
- package/dist/templates/native-go-vue/frontend/src/delegate/copy.ts +0 -4
- package/dist/templates/native-go-vue/frontend/src/delegate/executor-settings.test.ts +0 -23
- package/dist/templates/native-go-vue/frontend/src/delegate/executor-setup.ts +0 -24
- package/dist/templates/native-go-vue/frontend/src/delegate/facade.test.ts +0 -100
- package/dist/templates/native-go-vue/frontend/src/delegate/facade.ts +0 -85
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/de.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/en.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/es.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/fr.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/it.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/ja.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/ko.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/de.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/en.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/es.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/fr.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/it.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/ja.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/ko.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-CN.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-TW.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/zh-CN.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/zh-TW.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/long-running.ts +0 -57
- package/dist/templates/native-go-vue/frontend/src/delegate/save-copy.test.ts +0 -12
- package/dist/templates/native-go-vue/frontend/src/delegate/save-copy.ts +0 -24
- package/dist/templates/native-go-vue/frontend/src/delegate/scoped-picker.test.ts +0 -12
- package/dist/templates/native-go-vue/frontend/src/delegate/scoped-picker.ts +0 -21
- package/dist/templates/native-go-vue/frontend/src/files/FileBrowser.vue +0 -131
- package/dist/templates/native-go-vue/frontend/src/files/FilesPage.vue +0 -35
- package/dist/templates/native-go-vue/frontend/src/files/files.test.ts +0 -100
- package/dist/templates/native-go-vue/frontend/src/files/provider.test.ts +0 -48
- package/dist/templates/native-go-vue/frontend/src/files/transfers.test.ts +0 -27
- package/dist/templates/native-go-vue/frontend/src/files/transfers.ts +0 -25
- package/dist/templates/native-go-vue/frontend/src/i18n/de.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/en.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/es.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/fr.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/it.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/ja.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/ko.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/zh-CN.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/zh-TW.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n.ts +0 -13
- package/dist/templates/native-go-vue/frontend/src/identity/DESIGN.md +0 -46
- package/dist/templates/native-go-vue/frontend/src/identity/LoginPage.vue +0 -78
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/de.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/en.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/es.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/fr.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/it.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/ja.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/ko.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/zh-CN.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/zh-TW.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n.ts +0 -14
- package/dist/templates/native-go-vue/frontend/src/identity/login.test.ts +0 -32
- package/dist/templates/native-go-vue/frontend/src/identity/session.test.ts +0 -33
- package/dist/templates/native-go-vue/frontend/src/identity/session.ts +0 -74
- package/dist/templates/native-go-vue/frontend/src/main.ts +0 -32
- package/dist/templates/native-go-vue/frontend/src/nas/NasPicker.vue +0 -42
- package/dist/templates/native-go-vue/frontend/src/nas/contract.ts +0 -12
- package/dist/templates/native-go-vue/frontend/src/nas/destination.test.ts +0 -48
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/de.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/en.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/es.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/fr.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/it.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/ja.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/ko.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/zh-CN.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/zh-TW.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n.ts +0 -2
- package/dist/templates/native-go-vue/frontend/src/nas/locale.ts +0 -24
- package/dist/templates/native-go-vue/frontend/src/nas/provider.ts +0 -50
- package/dist/templates/native-go-vue/frontend/src/nas/use-request.ts +0 -18
- package/dist/templates/native-go-vue/frontend/src/portal/PortalSettings.vue +0 -39
- package/dist/templates/native-go-vue/frontend/src/shell/AppShell.vue +0 -48
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/de.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/en.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/es.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/fr.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/it.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/ja.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/ko.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n.ts +0 -17
- package/dist/templates/native-go-vue/frontend/src/shell/pages.ts +0 -15
- package/dist/templates/native-go-vue/frontend/src/style.css +0 -27
- package/dist/templates/native-go-vue/frontend/test/apps.test.ts +0 -57
- package/dist/templates/native-go-vue/frontend/test/native-controls.test.ts +0 -27
- package/dist/templates/native-go-vue/frontend/test/portal-settings.test.ts +0 -71
- package/dist/templates/native-go-vue/frontend/test/shell-i18n.test.ts +0 -50
- package/dist/templates/native-go-vue/frontend/test/shell-ui.test.ts +0 -20
- package/dist/templates/native-go-vue/frontend/test/shell.test.ts +0 -30
- package/dist/templates/native-go-vue/frontend/tsconfig.json +0 -1
- package/dist/templates/native-go-vue/frontend/vite.config.ts +0 -10
- package/dist/templates/native-go-vue/gitignore +0 -2
- package/templates/_daemon/fixture_linux_test.go +0 -15
- package/templates/_daemon/fixture_other_test.go +0 -7
- package/templates/_daemon/go.mod +0 -5
- package/templates/_daemon/main.go +0 -611
- package/templates/_daemon/main_test.go +0 -315
- package/templates/_daemon/process_linux.go +0 -55
- package/templates/_daemon/process_linux_test.go +0 -161
- package/templates/_daemon/process_other.go +0 -14
- package/templates/_daemon/testdata/child.go +0 -44
- package/templates/_executor/README.md +0 -318
- package/templates/_executor/anchor.go +0 -156
- package/templates/_executor/anchor_test.go +0 -161
- package/templates/_executor/apppriv_review_test.go +0 -28
- package/templates/_executor/auth_presence_review_test.go +0 -38
- package/templates/_executor/cancel_contract_test.go +0 -236
- package/templates/_executor/cmd/lifecycle/main.go +0 -42
- package/templates/_executor/cookie_review_test.go +0 -27
- package/templates/_executor/copy.go +0 -64
- package/templates/_executor/copy_test.go +0 -88
- package/templates/_executor/digest_review_test.go +0 -120
- package/templates/_executor/directories.go +0 -40
- package/templates/_executor/dsm.go +0 -369
- package/templates/_executor/dsm_test.go +0 -290
- package/templates/_executor/executor.go +0 -735
- package/templates/_executor/executor_test.go +0 -314
- package/templates/_executor/go.mod +0 -5
- package/templates/_executor/identity.go +0 -74
- package/templates/_executor/identity_kernel_linux_test.go +0 -60
- package/templates/_executor/identity_linux.go +0 -82
- package/templates/_executor/identity_security_test.go +0 -43
- package/templates/_executor/internal/lifecycle/lifecycle.go +0 -95
- package/templates/_executor/internal/lifecycle/lifecycle_test.go +0 -232
- package/templates/_executor/internal/taskscript/boot.sh +0 -31
- package/templates/_executor/internal/taskscript/cmd/main.go +0 -19
- package/templates/_executor/internal/taskscript/control.sh +0 -31
- package/templates/_executor/internal/taskscript/tasks.go +0 -44
- package/templates/_executor/json_review_test.go +0 -40
- package/templates/_executor/lifecycle_test.go +0 -97
- package/templates/_executor/link_linux.go +0 -28
- package/templates/_executor/long_running_test.go +0 -530
- package/templates/_executor/main.go +0 -576
- package/templates/_executor/managed.go +0 -117
- package/templates/_executor/managed_test.go +0 -137
- package/templates/_executor/move_linux.go +0 -490
- package/templates/_executor/move_linux_test.go +0 -460
- package/templates/_executor/move_validation.go +0 -46
- package/templates/_executor/move_validation_test.go +0 -187
- package/templates/_executor/operations.go +0 -926
- package/templates/_executor/path_test.go +0 -35
- package/templates/_executor/pid.go +0 -37
- package/templates/_executor/pid_test.go +0 -113
- package/templates/_executor/platform_linux.go +0 -187
- package/templates/_executor/platform_linux_test.go +0 -191
- package/templates/_executor/platform_other.go +0 -76
- package/templates/_executor/process.go +0 -142
- package/templates/_executor/purge_log.go +0 -18
- package/templates/_executor/records.go +0 -242
- package/templates/_executor/scope_cancel_contract_test.go +0 -91
- package/templates/_executor/scope_client.go +0 -37
- package/templates/_executor/scope_contract.go +0 -12
- package/templates/_executor/selected_scope.go +0 -146
- package/templates/_executor/selected_scope_test.go +0 -186
- package/templates/_executor/socket_linux_test.go +0 -46
- package/templates/_executor/status_disabled_test.go +0 -33
- package/templates/_executor/store.go +0 -91
- package/templates/_executor/supervise.go +0 -109
- package/templates/_executor/supervise_test.go +0 -130
- package/templates/_executor/task_race_review_test.go +0 -47
- package/templates/_executor/tasks.go +0 -320
- package/templates/_executor/tasks_dsm71_test.go +0 -114
- package/templates/_executor/tasks_review_test.go +0 -43
- package/templates/_executor/tasks_test.go +0 -223
- package/templates/_executor/testdata/evidence/cleanup.json +0 -24
- package/templates/_executor/testdata/evidence/final-smoke.jsonl +0 -9
- package/templates/_executor/testdata/evidence/kernel-acl.json +0 -6
- package/templates/_executor/testdata/evidence/linux-tests.log +0 -123
- package/templates/_executor/testdata/evidence/live.jsonl +0 -23
- package/templates/_executor/testdata/evidence/storage.json +0 -90
- package/templates/_executor/testdata/evidence/validation.json +0 -55
- package/templates/_executor/testdata/live_probe.py +0 -98
- package/templates/_executor/upgrade_watch_test.go +0 -244
- package/templates/_executor/watch.go +0 -164
- package/templates/_executor/watch_test.go +0 -291
- package/templates/_executor/write_review_linux_test.go +0 -87
- package/templates/_gateway/auth.go +0 -101
- package/templates/_gateway/auth_test.go +0 -216
- package/templates/_gateway/cgi.go +0 -133
- package/templates/_gateway/cgi_test.go +0 -156
- package/templates/_gateway/csrf.go +0 -73
- package/templates/_gateway/csrf_test.go +0 -155
- package/templates/_gateway/directory.go +0 -108
- package/templates/_gateway/directory_test.go +0 -202
- package/templates/_gateway/gateway.go +0 -412
- package/templates/_gateway/gateway_test.go +0 -676
- package/templates/_gateway/go.mod +0 -5
- package/templates/_gateway/groups.go +0 -66
- package/templates/_gateway/main.go +0 -45
- package/templates/_shared/AGENTS.md +0 -146
- package/templates/_shared/CLAUDE.md +0 -1
- package/templates/_shared/GO-LICENSE +0 -27
- package/templates/_shared/GO-PATENTS +0 -22
- package/templates/_shared/LICENSES/TEMPLATE.txt +0 -21
- package/templates/_shared/third-party-notices.mjs +0 -51
- package/templates/binary/LICENSES/GO-LICENSE +0 -27
- package/templates/binary/LICENSES/GO-PATENTS +0 -22
- package/templates/binary/dsm-package.yaml +0 -46
- package/templates/binary/example/main.go +0 -16
- package/templates/binary/gitignore +0 -2
- package/templates/binary/i18n/messages/de.json +0 -4
- package/templates/binary/i18n/messages/en.json +0 -4
- package/templates/binary/i18n/messages/es.json +0 -4
- package/templates/binary/i18n/messages/fr.json +0 -4
- package/templates/binary/i18n/messages/it.json +0 -4
- package/templates/binary/i18n/messages/ja.json +0 -4
- package/templates/binary/i18n/messages/ko.json +0 -4
- package/templates/binary/i18n/messages/zh-CN.json +0 -4
- package/templates/binary/i18n/messages/zh-TW.json +0 -4
- package/templates/binary/ui/app.css +0 -4
- package/templates/binary/ui/app.js +0 -32
- package/templates/compose/compose.yaml +0 -8
- package/templates/compose/synology-app.yaml +0 -16
- package/templates/native-authorization/AuthorizationGate.vue +0 -91
- package/templates/native-authorization/i18n/de.json +0 -37
- package/templates/native-authorization/i18n/en.json +0 -37
- package/templates/native-authorization/i18n/es.json +0 -37
- package/templates/native-authorization/i18n/fr.json +0 -37
- package/templates/native-authorization/i18n/index.ts +0 -15
- package/templates/native-authorization/i18n/it.json +0 -37
- package/templates/native-authorization/i18n/ja.json +0 -37
- package/templates/native-authorization/i18n/ko.json +0 -37
- package/templates/native-authorization/i18n/zh-CN.json +0 -37
- package/templates/native-authorization/i18n/zh-TW.json +0 -37
- package/templates/native-go/README.md +0 -459
- package/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +0 -61
- package/templates/native-go/backend/cmd/app/main.go +0 -95
- package/templates/native-go/backend/cmd/background-worker/main.go +0 -38
- package/templates/native-go/backend/go.mod +0 -9
- package/templates/native-go/backend/go.sum +0 -4
- package/templates/native-go/backend/internal/api/cgi_framing_test.go +0 -32
- package/templates/native-go/backend/internal/api/cookie_review_test.go +0 -28
- package/templates/native-go/backend/internal/api/deadline_test.go +0 -114
- package/templates/native-go/backend/internal/api/dsm-session.go +0 -54
- package/templates/native-go/backend/internal/api/dsm-session_test.go +0 -51
- package/templates/native-go/backend/internal/api/entry_test.go +0 -47
- package/templates/native-go/backend/internal/api/errors.go +0 -47
- package/templates/native-go/backend/internal/api/permissions.go +0 -161
- package/templates/native-go/backend/internal/api/permissions.json +0 -5
- package/templates/native-go/backend/internal/api/permissions_test.go +0 -113
- package/templates/native-go/backend/internal/api/policy_fixture_test.go +0 -8
- package/templates/native-go/backend/internal/api/registry.go +0 -142
- package/templates/native-go/backend/internal/api/registry_test.go +0 -344
- package/templates/native-go/backend/internal/api/resource_limits_test.go +0 -87
- package/templates/native-go/backend/internal/api/sdk-permissions.json +0 -59
- package/templates/native-go/backend/internal/api/sdk_policy_test.go +0 -31
- package/templates/native-go/backend/internal/api/server.go +0 -305
- package/templates/native-go/backend/internal/api/testdata/permissions-cases.json +0 -172
- package/templates/native-go/backend/internal/app/background.go +0 -249
- package/templates/native-go/backend/internal/app/background_none.go +0 -8
- package/templates/native-go/backend/internal/app/background_owner.go +0 -38
- package/templates/native-go/backend/internal/app/background_owner_test.go +0 -163
- package/templates/native-go/backend/internal/app/background_schedule.go +0 -69
- package/templates/native-go/backend/internal/app/background_schedule_test.go +0 -62
- package/templates/native-go/backend/internal/app/background_test.go +0 -320
- package/templates/native-go/backend/internal/app/delegate_config.go +0 -57
- package/templates/native-go/backend/internal/app/delegate_config_test.go +0 -28
- package/templates/native-go/backend/internal/app/delegate_none.go +0 -5
- package/templates/native-go/backend/internal/app/identity.go +0 -20
- package/templates/native-go/backend/internal/app/identity_test.go +0 -15
- package/templates/native-go/backend/internal/app/migrations.go +0 -41
- package/templates/native-go/backend/internal/app/migrations_test.go +0 -41
- package/templates/native-go/backend/internal/app/portal.go +0 -30
- package/templates/native-go/backend/internal/app/portal_test.go +0 -55
- package/templates/native-go/backend/internal/app/root_none.go +0 -9
- package/templates/native-go/backend/internal/app/routes.go +0 -137
- package/templates/native-go/backend/internal/app/routes_test.go +0 -165
- package/templates/native-go/backend/internal/app/session_files.go +0 -9
- package/templates/native-go/backend/internal/app/session_files_test.go +0 -14
- package/templates/native-go/backend/internal/app/shared_folder.go +0 -144
- package/templates/native-go/backend/internal/app/shared_folder_test.go +0 -158
- package/templates/native-go/backend/internal/background/access.go +0 -57
- package/templates/native-go/backend/internal/background/lock_test.go +0 -131
- package/templates/native-go/backend/internal/background/owner_test.go +0 -118
- package/templates/native-go/backend/internal/background/runner.go +0 -185
- package/templates/native-go/backend/internal/background/runner_test.go +0 -209
- package/templates/native-go/backend/internal/background/schedule.go +0 -336
- package/templates/native-go/backend/internal/background/schedule_test.go +0 -368
- package/templates/native-go/backend/internal/background/store.go +0 -825
- package/templates/native-go/backend/internal/background/store_test.go +0 -365
- package/templates/native-go/backend/internal/datamigrate/migrate.go +0 -191
- package/templates/native-go/backend/internal/datamigrate/migrate_test.go +0 -177
- package/templates/native-go/backend/internal/dsm/admin.go +0 -76
- package/templates/native-go/backend/internal/dsm/admin_linux.go +0 -110
- package/templates/native-go/backend/internal/dsm/admin_linux_test.go +0 -105
- package/templates/native-go/backend/internal/dsm/admin_other.go +0 -15
- package/templates/native-go/backend/internal/dsm/admin_test.go +0 -67
- package/templates/native-go/backend/internal/dsm/apppriv.go +0 -30
- package/templates/native-go/backend/internal/dsm/auth.go +0 -94
- package/templates/native-go/backend/internal/dsm/auth_test.go +0 -159
- package/templates/native-go/backend/internal/dsm/bridge_file.go +0 -75
- package/templates/native-go/backend/internal/dsm/bridge_file_test.go +0 -57
- package/templates/native-go/backend/internal/dsm/entry.go +0 -177
- package/templates/native-go/backend/internal/dsm/entry_test.go +0 -315
- package/templates/native-go/backend/internal/dsm/native/admin-aarch64.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/admin-armv7.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/admin-x86_64.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/admin_check.c +0 -28
- package/templates/native-go/backend/internal/dsm/native/apppriv-aarch64.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/apppriv-armv7.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/apppriv-x86_64.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/apppriv_check.c +0 -33
- package/templates/native-go/backend/internal/dsm/native/build.sh +0 -18
- package/templates/native-go/backend/internal/dsm/native/licenses/GLIBC-NOTICES.txt +0 -400
- package/templates/native-go/backend/internal/dsm/native/licenses/LGPL-2.1.txt +0 -501
- package/templates/native-go/backend/internal/dsm/native/licenses/SOURCE.txt +0 -5
- package/templates/native-go/backend/internal/dsm/native/licenses/ZIG-MIT.txt +0 -21
- package/templates/native-go/backend/internal/dsm/native/provenance.json +0 -18
- package/templates/native-go/backend/internal/filestation/browse_test.go +0 -67
- package/templates/native-go/backend/internal/filestation/check_permission.go +0 -71
- package/templates/native-go/backend/internal/filestation/check_permission_test.go +0 -77
- package/templates/native-go/backend/internal/filestation/client.go +0 -337
- package/templates/native-go/backend/internal/filestation/client_test.go +0 -155
- package/templates/native-go/backend/internal/filestation/doc.go +0 -4
- package/templates/native-go/backend/internal/filestation/download_dsm71_test.go +0 -82
- package/templates/native-go/backend/internal/filestation/http.go +0 -70
- package/templates/native-go/backend/internal/filestation/http_test.go +0 -188
- package/templates/native-go/backend/internal/filestation/operations_test.go +0 -206
- package/templates/native-go/backend/internal/filestation/read_file_test.go +0 -89
- package/templates/native-go/backend/internal/filestation/sdk_policy_test.go +0 -39
- package/templates/native-go/backend/internal/filestation/service.go +0 -254
- package/templates/native-go/backend/internal/filestation/service_test.go +0 -74
- package/templates/native-go/backend/internal/filestation/upload_stream.go +0 -76
- package/templates/native-go/backend/internal/filestation/upload_stream_test.go +0 -77
- package/templates/native-go/backend/internal/filestation/write.go +0 -32
- package/templates/native-go/backend/internal/filestation/write_test.go +0 -124
- package/templates/native-go/backend/internal/identity/README.md +0 -59
- package/templates/native-go/backend/internal/identity/dsm.go +0 -115
- package/templates/native-go/backend/internal/identity/http.go +0 -291
- package/templates/native-go/backend/internal/identity/identity_test.go +0 -530
- package/templates/native-go/backend/internal/identity/service.go +0 -159
- package/templates/native-go/backend/internal/identity/store.go +0 -109
- package/templates/native-go/backend/internal/jsonlimits/limits.go +0 -48
- package/templates/native-go/backend/internal/jsonlimits/limits_test.go +0 -52
- package/templates/native-go/backend/internal/portal/portal.go +0 -138
- package/templates/native-go/backend/internal/portal/portal_test.go +0 -89
- package/templates/native-go/dsm-package.yaml +0 -71
- package/templates/native-go/gitignore +0 -1
- package/templates/native-go/i18n/glossary.json +0 -663
- package/templates/native-go/i18n/messages/de.json +0 -29
- package/templates/native-go/i18n/messages/en.json +0 -29
- package/templates/native-go/i18n/messages/es.json +0 -29
- package/templates/native-go/i18n/messages/fr.json +0 -29
- package/templates/native-go/i18n/messages/it.json +0 -29
- package/templates/native-go/i18n/messages/ja.json +0 -29
- package/templates/native-go/i18n/messages/ko.json +0 -29
- package/templates/native-go/i18n/messages/zh-CN.json +0 -29
- package/templates/native-go/i18n/messages/zh-TW.json +0 -29
- package/templates/native-go/ui/app.css +0 -45
- package/templates/native-go/ui/app.js +0 -111
- package/templates/native-go-delegate/DELEGATE.md +0 -263
- package/templates/native-go-delegate/backend/cmd/background-worker/main.go +0 -48
- package/templates/native-go-delegate/backend/internal/app/delegate.go +0 -25
- package/templates/native-go-delegate/backend/internal/app/delegate_on.go +0 -5
- package/templates/native-go-delegate/backend/internal/app/delegate_routes_test.go +0 -31
- package/templates/native-go-delegate/backend/internal/background/delegate_review_test.go +0 -174
- package/templates/native-go-delegate/backend/internal/background/delegated.go +0 -277
- package/templates/native-go-delegate/backend/internal/background/delegated_moves.go +0 -270
- package/templates/native-go-delegate/backend/internal/background/delegated_test.go +0 -34
- package/templates/native-go-delegate/backend/internal/delegate/admission_recovery_test.go +0 -410
- package/templates/native-go-delegate/backend/internal/delegate/busy_review_test.go +0 -15
- package/templates/native-go-delegate/backend/internal/delegate/cancel_contract_test.go +0 -95
- package/templates/native-go-delegate/backend/internal/delegate/client.go +0 -151
- package/templates/native-go-delegate/backend/internal/delegate/client_test.go +0 -214
- package/templates/native-go-delegate/backend/internal/delegate/destination.go +0 -110
- package/templates/native-go-delegate/backend/internal/delegate/destination_state.go +0 -117
- package/templates/native-go-delegate/backend/internal/delegate/destination_state_test.go +0 -60
- package/templates/native-go-delegate/backend/internal/delegate/destination_test.go +0 -116
- package/templates/native-go-delegate/backend/internal/delegate/example.go +0 -81
- package/templates/native-go-delegate/backend/internal/delegate/example_test.go +0 -91
- package/templates/native-go-delegate/backend/internal/delegate/executor_contract_test.go +0 -511
- package/templates/native-go-delegate/backend/internal/delegate/files.go +0 -132
- package/templates/native-go-delegate/backend/internal/delegate/long_running_routes.go +0 -92
- package/templates/native-go-delegate/backend/internal/delegate/long_running_routes_test.go +0 -99
- package/templates/native-go-delegate/backend/internal/delegate/move.go +0 -348
- package/templates/native-go-delegate/backend/internal/delegate/move_test.go +0 -351
- package/templates/native-go-delegate/backend/internal/delegate/operations_list.go +0 -65
- package/templates/native-go-delegate/backend/internal/delegate/operations_list_test.go +0 -114
- package/templates/native-go-delegate/backend/internal/delegate/retry.go +0 -106
- package/templates/native-go-delegate/backend/internal/delegate/retry_test.go +0 -143
- package/templates/native-go-delegate/backend/internal/delegate/service.go +0 -364
- package/templates/native-go-delegate/backend/internal/delegate/service_test.go +0 -318
- package/templates/native-go-delegate/backend/internal/delegate/staging.go +0 -121
- package/templates/native-go-delegate/backend/internal/delegate/status_disabled_test.go +0 -51
- package/templates/native-go-delegate/backend/internal/delegate/testdata/executor_contract.txt +0 -112
- package/templates/native-go-delegate/backend/internal/delegate/transient_contract_test.go +0 -137
- package/templates/native-go-delegate/backend/internal/delegate/wait_cancel_test.go +0 -101
- package/templates/native-go-delegate/backend/internal/delegate/worker.go +0 -225
- package/templates/native-go-delegate/backend/internal/filestation/files.go +0 -43
- package/templates/native-go-delegate/backend/internal/filestation/files_test.go +0 -59
- package/templates/native-go-delegate/frontend/src/CapabilityPanels.vue +0 -37
- package/templates/native-go-delegate/frontend/src/delegate/BackgroundSavePanel.vue +0 -113
- package/templates/native-go-delegate/frontend/src/delegate/DelegatePanel.vue +0 -70
- package/templates/native-go-delegate/frontend/src/delegate/copy.ts +0 -8
- package/templates/native-go-delegate/frontend/src/delegate/i18n/waiting.json +0 -11
- package/templates/native-go-delegate/frontend/test/background-save.test.ts +0 -121
- package/templates/native-go-delegate/frontend/test/delegate.test.ts +0 -145
- package/templates/native-go-delegate/frontend/test/scope-settings.test.ts +0 -49
- package/templates/native-go-delegate/test-frontend.sh +0 -12
- package/templates/native-go-delegate/test.sh +0 -18
- package/templates/native-go-jobs/BACKGROUND.md +0 -108
- package/templates/native-go-jobs/backend/internal/app/background_on.go +0 -7
- package/templates/native-go-jobs/backend/internal/app/background_routes_test.go +0 -90
- package/templates/native-go-jobs/frontend/src/background/BackgroundPanel.vue +0 -170
- package/templates/native-go-jobs/frontend/src/background/i18n/de.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/en.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/es.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/fr.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/it.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/ja.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/ko.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/zh-CN.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/zh-TW.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n.ts +0 -19
- package/templates/native-go-jobs/frontend/src/background/picker-provider.ts +0 -12
- package/templates/native-go-jobs/frontend/src/background/request-key.ts +0 -5
- package/templates/native-go-jobs/frontend/test/background.test.ts +0 -205
- package/templates/native-go-root-ops/backend/internal/app/executor.go +0 -140
- package/templates/native-go-root-ops/backend/internal/app/executor_test.go +0 -117
- package/templates/native-go-root-ops/root/whoami.sh +0 -3
- package/templates/native-go-vue/README.md +0 -47
- package/templates/native-go-vue/frontend/DESIGN.md +0 -61
- package/templates/native-go-vue/frontend/package-lock.json +0 -2530
- package/templates/native-go-vue/frontend/package.json +0 -6
- package/templates/native-go-vue/frontend/src/App.vue +0 -96
- package/templates/native-go-vue/frontend/src/CapabilityPanels.vue +0 -6
- package/templates/native-go-vue/frontend/src/context.ts +0 -78
- package/templates/native-go-vue/frontend/src/delegate/ExecutorSettings.vue +0 -70
- package/templates/native-go-vue/frontend/src/delegate/catalogs.ts +0 -11
- package/templates/native-go-vue/frontend/src/delegate/copy.test.ts +0 -12
- package/templates/native-go-vue/frontend/src/delegate/copy.ts +0 -4
- package/templates/native-go-vue/frontend/src/delegate/executor-settings.test.ts +0 -23
- package/templates/native-go-vue/frontend/src/delegate/executor-setup.ts +0 -24
- package/templates/native-go-vue/frontend/src/delegate/facade.test.ts +0 -100
- package/templates/native-go-vue/frontend/src/delegate/facade.ts +0 -85
- package/templates/native-go-vue/frontend/src/delegate/i18n/de.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/en.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/es.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/fr.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/it.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/ja.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/ko.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/de.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/en.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/es.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/fr.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/it.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/ja.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/ko.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-CN.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-TW.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/zh-CN.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/zh-TW.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/long-running.ts +0 -57
- package/templates/native-go-vue/frontend/src/delegate/save-copy.test.ts +0 -12
- package/templates/native-go-vue/frontend/src/delegate/save-copy.ts +0 -24
- package/templates/native-go-vue/frontend/src/delegate/scoped-picker.test.ts +0 -12
- package/templates/native-go-vue/frontend/src/delegate/scoped-picker.ts +0 -21
- package/templates/native-go-vue/frontend/src/files/FileBrowser.vue +0 -131
- package/templates/native-go-vue/frontend/src/files/FilesPage.vue +0 -35
- package/templates/native-go-vue/frontend/src/files/files.test.ts +0 -100
- package/templates/native-go-vue/frontend/src/files/provider.test.ts +0 -48
- package/templates/native-go-vue/frontend/src/files/transfers.test.ts +0 -27
- package/templates/native-go-vue/frontend/src/files/transfers.ts +0 -25
- package/templates/native-go-vue/frontend/src/i18n/de.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/en.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/es.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/fr.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/it.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/ja.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/ko.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/zh-CN.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/zh-TW.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n.ts +0 -13
- package/templates/native-go-vue/frontend/src/identity/DESIGN.md +0 -46
- package/templates/native-go-vue/frontend/src/identity/LoginPage.vue +0 -78
- package/templates/native-go-vue/frontend/src/identity/i18n/de.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/en.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/es.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/fr.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/it.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/ja.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/ko.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/zh-CN.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/zh-TW.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n.ts +0 -14
- package/templates/native-go-vue/frontend/src/identity/login.test.ts +0 -32
- package/templates/native-go-vue/frontend/src/identity/session.test.ts +0 -33
- package/templates/native-go-vue/frontend/src/identity/session.ts +0 -74
- package/templates/native-go-vue/frontend/src/main.ts +0 -32
- package/templates/native-go-vue/frontend/src/nas/NasPicker.vue +0 -42
- package/templates/native-go-vue/frontend/src/nas/contract.ts +0 -12
- package/templates/native-go-vue/frontend/src/nas/destination.test.ts +0 -48
- package/templates/native-go-vue/frontend/src/nas/i18n/files/de.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/en.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/es.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/fr.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/it.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/ja.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/ko.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/zh-CN.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/zh-TW.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n.ts +0 -2
- package/templates/native-go-vue/frontend/src/nas/locale.ts +0 -24
- package/templates/native-go-vue/frontend/src/nas/provider.ts +0 -50
- package/templates/native-go-vue/frontend/src/nas/use-request.ts +0 -18
- package/templates/native-go-vue/frontend/src/portal/PortalSettings.vue +0 -39
- package/templates/native-go-vue/frontend/src/shell/AppShell.vue +0 -48
- package/templates/native-go-vue/frontend/src/shell/i18n/de.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/en.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/es.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/fr.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/it.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/ja.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/ko.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n.ts +0 -17
- package/templates/native-go-vue/frontend/src/shell/pages.ts +0 -15
- package/templates/native-go-vue/frontend/src/style.css +0 -27
- package/templates/native-go-vue/frontend/test/apps.test.ts +0 -57
- package/templates/native-go-vue/frontend/test/native-controls.test.ts +0 -27
- package/templates/native-go-vue/frontend/test/portal-settings.test.ts +0 -71
- package/templates/native-go-vue/frontend/test/shell-i18n.test.ts +0 -50
- package/templates/native-go-vue/frontend/test/shell-ui.test.ts +0 -20
- package/templates/native-go-vue/frontend/test/shell.test.ts +0 -30
- package/templates/native-go-vue/frontend/tsconfig.json +0 -1
- package/templates/native-go-vue/frontend/vite.config.ts +0 -10
- package/templates/native-go-vue/gitignore +0 -2
- /package/{dist/templates/_daemon → assets/go/daemon}/fixture_linux_test.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/fixture_other_test.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/go.mod +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/main.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/main_test.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/process_linux.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/process_linux_test.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/process_other.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/testdata/child.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/auth.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/auth_test.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/cgi.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/cgi_test.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/csrf.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/csrf_test.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/directory.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/directory_test.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/gateway.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/gateway_test.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/go.mod +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/groups.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/main.go +0 -0
- /package/{dist/templates/_shared → assets/licenses}/GO-LICENSE +0 -0
- /package/{dist/templates/_shared → assets/licenses}/GO-PATENTS +0 -0
- /package/{dist/templates/_shared/LICENSES → assets/licenses}/TEMPLATE.txt +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "NAS 資料夾 — File Station",
|
|
3
|
-
"ownPermissions": "操作使用你自己的 DSM 工作階段與 File Station 即時權限。",
|
|
4
|
-
"choose": "選擇資料夾",
|
|
5
|
-
"confirm": "確認選取",
|
|
6
|
-
"refresh": "重新整理資料夾",
|
|
7
|
-
"loading": "載入中…",
|
|
8
|
-
"emptyFolder": "此資料夾是空的。",
|
|
9
|
-
"roots": "資料夾",
|
|
10
|
-
"back": "返回",
|
|
11
|
-
"select": "選取 {name}",
|
|
12
|
-
"open": "開啟 {name}",
|
|
13
|
-
"selected": "已選取:{name}",
|
|
14
|
-
"cancel": "取消",
|
|
15
|
-
"close": "關閉",
|
|
16
|
-
"loadMore": "載入更多",
|
|
17
|
-
"errorSession": "DSM 工作階段已失效。請重新登入 DSM,再重新整理資料夾。",
|
|
18
|
-
"errorDenied": "沒有權限存取此檔案或資料夾。請選擇其他資料夾。",
|
|
19
|
-
"errorNotFound": "檔案或資料夾已不存在。請重新整理清單。",
|
|
20
|
-
"errorConflict": "已有同名檔案或資料夾。請使用其他名稱。",
|
|
21
|
-
"errorUncertain": "操作可能已完成。請重新整理選取或目的資料夾並確認結果,再決定是否重新送出。",
|
|
22
|
-
"errorInvalid": "資料夾、檔名或請求無效。請檢查輸入後重試。",
|
|
23
|
-
"errorUnavailable": "File Station 無法使用,或此套件未提供工作階段 adapter。請稍後重新整理。",
|
|
24
|
-
"errorCanceled": "請求已取消。請重新整理後繼續。",
|
|
25
|
-
"errorTimeout": "請求逾時。請重新整理清單後繼續。",
|
|
26
|
-
"metadata": "資訊",
|
|
27
|
-
"fileKind": "檔案",
|
|
28
|
-
"directoryKind": "資料夾",
|
|
29
|
-
"nameColumn": "名稱",
|
|
30
|
-
"kindColumn": "類型",
|
|
31
|
-
"sizeColumn": "位元組",
|
|
32
|
-
"selectAction": "選取",
|
|
33
|
-
"chooseFile": "選擇檔案",
|
|
34
|
-
"expand": "展開 {name}",
|
|
35
|
-
"collapse": "收合 {name}",
|
|
36
|
-
"upload": "上傳",
|
|
37
|
-
"download": "下載",
|
|
38
|
-
"uploaded": "檔案已上傳。",
|
|
39
|
-
"errorDSM": "請在同一主機名稱登入 DSM,以存取 NAS 檔案。只有 App 登入無法使用 File Station。",
|
|
40
|
-
"errorUploadSize": "請選擇一個不超過 16 GB 的檔案。"
|
|
41
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type {UiLocale} from '@synopackageland/ui'
|
|
2
|
-
import en from './i18n/files/en.json'
|
|
3
|
-
import zhTW from './i18n/files/zh-TW.json'
|
|
4
|
-
import zhCN from './i18n/files/zh-CN.json'
|
|
5
|
-
import ja from './i18n/files/ja.json'
|
|
6
|
-
import ko from './i18n/files/ko.json'
|
|
7
|
-
import de from './i18n/files/de.json'
|
|
8
|
-
import fr from './i18n/files/fr.json'
|
|
9
|
-
import es from './i18n/files/es.json'
|
|
10
|
-
import it from './i18n/files/it.json'
|
|
11
|
-
export type NasCopy=typeof en
|
|
12
|
-
export const nasCatalogs:Record<string,NasCopy>={en,'zh-TW':zhTW,'zh-CN':zhCN,ja,ko,de,fr,es,it}
|
|
13
|
-
const aliases:Record<string,string>={enu:'en',cht:'zh-TW',chs:'zh-CN',jpn:'ja',krn:'ko',ger:'de',fre:'fr',spn:'es',ita:'it'}
|
|
14
|
-
/** The built-in UI locale (shared by these catalogs and the UI's own text) for a DSM or BCP-47 language tag. */
|
|
15
|
-
export function uiLocale(locale:string):UiLocale{
|
|
16
|
-
const normalized=locale.replaceAll('_','-')
|
|
17
|
-
return ([aliases[normalized]??normalized,normalized.split('-')[0]!].find(key=>key in nasCatalogs)??'en') as UiLocale
|
|
18
|
-
}
|
|
19
|
-
export function nasCopy(locale:string):NasCopy{return nasCatalogs[uiLocale(locale)]!}
|
|
20
|
-
export function nasErrorCopy(error:unknown,copy:NasCopy):string{
|
|
21
|
-
const code=(error as {code?:string})?.code
|
|
22
|
-
const keys:Record<string,keyof NasCopy>={session_required:'errorSession',dsm_session_required:'errorDSM',upload_size_required:'errorUploadSize',denied:'errorDenied',not_found:'errorNotFound',conflict:'errorConflict','commit-uncertain':'errorUncertain','invalid-request':'errorInvalid',canceled:'errorCanceled',timeout:'errorTimeout'}
|
|
23
|
-
return copy[keys[code??'']??'errorUnavailable']
|
|
24
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import {createFileTransfers} from '../files/transfers'
|
|
2
|
-
import type {Context} from '../context'
|
|
3
|
-
import type {NasEntry,NasPage,NasProvider} from './contract'
|
|
4
|
-
|
|
5
|
-
function refuse(code='unavailable'):never{throw {code}}
|
|
6
|
-
function record(v:unknown):Record<string,unknown>{if(!v||typeof v!=='object'||Array.isArray(v))refuse();return v as Record<string,unknown>}
|
|
7
|
-
const integer=(v:unknown):v is number=>typeof v==='number'&&Number.isSafeInteger(v)&&v>=0
|
|
8
|
-
function entry(value:unknown):NasEntry{
|
|
9
|
-
const v=record(value),additional=record(v.additional??{})
|
|
10
|
-
if(typeof v.name!=='string'||typeof v.path!=='string'||typeof v.isdir!=='boolean'||(additional.size!==undefined&&!integer(additional.size)))refuse()
|
|
11
|
-
// Display DSM's response without guessing permissions from path prefixes.
|
|
12
|
-
return {name:v.name,path:v.path,isDir:v.isdir,...(additional.size===undefined?{}:{bytes:additional.size as number})}
|
|
13
|
-
}
|
|
14
|
-
function page(value:unknown,offset:number,limit:number):NasPage{
|
|
15
|
-
const v=record(value),raw=v.shares??v.files
|
|
16
|
-
if(!Array.isArray(raw)||raw.length>limit||!integer(v.total)||v.offset!==offset||offset+raw.length>v.total)refuse()
|
|
17
|
-
const entries=raw.map(entry),next=offset+entries.length
|
|
18
|
-
if(next<v.total&&!entries.length)refuse()
|
|
19
|
-
return {entries,total:v.total,offset,...(next<v.total?{nextOffset:next}:{})}
|
|
20
|
-
}
|
|
21
|
-
export function createNasProvider(ctx:Pick<Context,'call'|'files'>):NasProvider{
|
|
22
|
-
let disposed=false
|
|
23
|
-
const life=new AbortController()
|
|
24
|
-
const transfers=ctx.files?createFileTransfers(ctx.files):undefined
|
|
25
|
-
async function request(method:string,params:Record<string,unknown>,signal:AbortSignal,mutation=false):Promise<unknown>{
|
|
26
|
-
if(disposed||signal.aborted)refuse('canceled')
|
|
27
|
-
let cleanup=()=>{}
|
|
28
|
-
const stop=new Promise<never>((_,reject)=>{
|
|
29
|
-
const abort=()=>reject({code:mutation?'commit-uncertain':'canceled'})
|
|
30
|
-
const timer=setTimeout(()=>reject({code:mutation?'commit-uncertain':'timeout'}),22000)
|
|
31
|
-
signal.addEventListener('abort',abort,{once:true});life.signal.addEventListener('abort',abort,{once:true})
|
|
32
|
-
cleanup=()=>{clearTimeout(timer);signal.removeEventListener('abort',abort);life.signal.removeEventListener('abort',abort)}
|
|
33
|
-
})
|
|
34
|
-
try{return await Promise.race([ctx.call(method,params),stop])}
|
|
35
|
-
catch(e){
|
|
36
|
-
const code=(e as {code?:unknown})?.code
|
|
37
|
-
if([407,408,'407','408','denied'].includes(code as string|number))refuse('denied')
|
|
38
|
-
const allowed=['session_required','dsm_session_required','auth_unavailable','denied','not_found','conflict','invalid-request','unavailable','unknown_method','unsupported','commit-uncertain','canceled','timeout']
|
|
39
|
-
refuse(typeof code==='string'&&allowed.includes(code)?code:mutation?'commit-uncertain':'unavailable')
|
|
40
|
-
}finally{cleanup()}
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
...(transfers?{upload:transfers.upload,download:transfers.download}:{}),
|
|
44
|
-
async shares(offset,signal){return page(await request('nas.files.shares',{offset},signal),offset,100)},
|
|
45
|
-
async list(path,options,signal){const offset=options.offset??0,limit=options.limit??100;return page(await request('nas.files.list',{path,...options,offset,limit},signal),offset,limit)},
|
|
46
|
-
async info(path,signal){return entry(await request('nas.files.info',{path},signal))},
|
|
47
|
-
async createFolder(parent,name,signal){const v=record(await request('nas.files.create_folder',{parent,name},signal,true));if(v.created!==true)refuse('commit-uncertain')},
|
|
48
|
-
dispose(){disposed=true;life.abort();transfers?.dispose()},
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {onBeforeUnmount,ref} from 'vue'
|
|
2
|
-
|
|
3
|
-
// The provider owns the 22 s bound (backend handlers are bounded to 20 s).
|
|
4
|
-
// Local cancellation suppresses late display updates, never promises rollback.
|
|
5
|
-
export function useNasRequest(){
|
|
6
|
-
const busy=ref(false),error=ref<unknown>()
|
|
7
|
-
let disposed=false,generation=0,active:AbortController|undefined
|
|
8
|
-
function cancel(){generation++;active?.abort();active=undefined;busy.value=false;error.value=undefined}
|
|
9
|
-
async function run<T>(fn:(signal:AbortSignal)=>Promise<T>):Promise<T|undefined>{
|
|
10
|
-
if(disposed||busy.value)return
|
|
11
|
-
const version=++generation,controller=new AbortController();active=controller;busy.value=true;error.value=undefined
|
|
12
|
-
try{const value=await fn(controller.signal);return !disposed&&version===generation?value:undefined}
|
|
13
|
-
catch(e){if(!disposed&&version===generation)error.value=e;return undefined}
|
|
14
|
-
finally{if(!disposed&&version===generation){busy.value=false;active=undefined}}
|
|
15
|
-
}
|
|
16
|
-
onBeforeUnmount(()=>{disposed=true;cancel()})
|
|
17
|
-
return {busy,error,run,cancel}
|
|
18
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {onBeforeUnmount,onMounted,ref} from 'vue'
|
|
3
|
-
import {Button,Callout,Form,FormActions,FormItem,Input,Link,SettingsSection} from '@synopackageland/ui'
|
|
4
|
-
import type {PortalAccess,PortalStatus} from '../context'
|
|
5
|
-
// SDK text in DSM's language comes with ctx.portal; DSM decides who may change the alias.
|
|
6
|
-
const props=defineProps<{portal:PortalAccess}>()
|
|
7
|
-
const m=props.portal.messages
|
|
8
|
-
const status=ref<PortalStatus>(),alias=ref(''),busy=ref(false),error=ref('')
|
|
9
|
-
let disposed=false
|
|
10
|
-
function show(next:PortalStatus){if(disposed)return;status.value=next;alias.value=next.alias||next.defaultAlias}
|
|
11
|
-
async function run(change:()=>Promise<PortalStatus>){
|
|
12
|
-
if(busy.value)return
|
|
13
|
-
busy.value=true;error.value=''
|
|
14
|
-
try{show(await change())}
|
|
15
|
-
catch(e){if(!disposed)error.value=m[(e as {code?:string})?.code||'']||m.portal_unavailable}
|
|
16
|
-
finally{if(!disposed)busy.value=false}
|
|
17
|
-
}
|
|
18
|
-
onMounted(()=>void props.portal.status().then(show))
|
|
19
|
-
onBeforeUnmount(()=>{disposed=true})
|
|
20
|
-
</script>
|
|
21
|
-
<template>
|
|
22
|
-
<SettingsSection v-if="status" :title="m.title" :collapsible="false" :aria-busy="busy">
|
|
23
|
-
<p v-if="status.state==='active'">{{ m.link }} <Link :href="status.url" external>{{ status.url }}</Link></p>
|
|
24
|
-
<template v-if="status.canManage">
|
|
25
|
-
<p v-if="status.state!=='active'">{{ m.inactive }}</p>
|
|
26
|
-
<Form @submit.prevent="run(()=>portal.apply(alias))">
|
|
27
|
-
<FormItem :label="m.alias" label-for="portal-alias"><Input id="portal-alias" v-model="alias" maxlength="64" autocomplete="off" :disabled="busy" /></FormItem>
|
|
28
|
-
<FormActions>
|
|
29
|
-
<Button type="submit" variant="primary" :disabled="busy">{{ m.apply }}</Button>
|
|
30
|
-
<Button v-if="status.state==='active'" variant="secondary" :disabled="busy" @click="run(()=>portal.disable())">{{ m.disable }}</Button>
|
|
31
|
-
</FormActions>
|
|
32
|
-
</Form>
|
|
33
|
-
<Button variant="secondary" @click="portal.openControlPanel()">{{ m.advanced }}</Button>
|
|
34
|
-
</template>
|
|
35
|
-
<Button v-else-if="status.controlPanel" variant="secondary" @click="portal.openControlPanel()">{{ m.controlPanel }}</Button>
|
|
36
|
-
<p v-else-if="status.state!=='active'">{{ m.askAdmin }}</p>
|
|
37
|
-
<Callout v-if="error" tone="danger"><span role="alert">{{ error }}</span></Callout>
|
|
38
|
-
</SettingsSection>
|
|
39
|
-
</template>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
// DSM-style shell: a fixed left navigation and one right-hand page with a
|
|
3
|
-
// header. Pages stay mounted (v-show) so provider leases and job polling keep
|
|
4
|
-
// running while the user moves between them.
|
|
5
|
-
import {computed, type Component} from 'vue'
|
|
6
|
-
import {AppLayout, AppSidebar, PageContent, PageHeader, type AppSidebarGroup} from '@synopackageland/ui'
|
|
7
|
-
import {Info, Timer} from '@lucide/vue'
|
|
8
|
-
import {shellCopy} from './i18n'
|
|
9
|
-
import type {ShellPage} from './pages'
|
|
10
|
-
|
|
11
|
-
const props = defineProps<{
|
|
12
|
-
locale: string
|
|
13
|
-
modelValue: ShellPage
|
|
14
|
-
pages: readonly ShellPage[]
|
|
15
|
-
description?: string
|
|
16
|
-
}>()
|
|
17
|
-
const emit = defineEmits<{'update:modelValue': [value: ShellPage]}>()
|
|
18
|
-
const copy = computed(() => shellCopy(props.locale))
|
|
19
|
-
const icons: Record<ShellPage, Component> = {status:Info,background:Timer}
|
|
20
|
-
const groups = computed<AppSidebarGroup[]>(() => [{
|
|
21
|
-
items: props.pages.map(page => ({key:page,label:copy.value[page],icon:icons[page]})),
|
|
22
|
-
}])
|
|
23
|
-
const title = computed(() => copy.value[props.modelValue] ?? copy.value.status)
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<AppLayout class="app-shell" min-height="0" wide-layout="window">
|
|
28
|
-
<template #sidebar>
|
|
29
|
-
<AppSidebar :model-value="modelValue" :groups="groups" @update:model-value="emit('update:modelValue', $event as ShellPage)" />
|
|
30
|
-
</template>
|
|
31
|
-
<PageContent class="app-page">
|
|
32
|
-
<PageHeader :title="title" :description="description">
|
|
33
|
-
<template #actions><slot name="actions" /></template>
|
|
34
|
-
</PageHeader>
|
|
35
|
-
<div class="app-page-content"><slot /></div>
|
|
36
|
-
</PageContent>
|
|
37
|
-
</AppLayout>
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
<style scoped>
|
|
41
|
-
/* The library clips AppLayout at window height; the page body scrolls while
|
|
42
|
-
the sidebar keeps its own height. Modeled on syno-reclaim's AppShell. */
|
|
43
|
-
.app-shell { height: 100%; min-width: 0; grid-template-rows: minmax(0, 1fr); }
|
|
44
|
-
.app-shell :deep(> div) { min-height: 0; }
|
|
45
|
-
.app-shell :deep(main) { display: flex; flex-direction: column; overflow: hidden; }
|
|
46
|
-
.app-page { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
|
|
47
|
-
.app-page-content { padding-bottom: var(--ui-space-6, 24px); }
|
|
48
|
-
</style>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import en from './i18n/en.json'
|
|
2
|
-
import zhTW from './i18n/zh-TW.json'
|
|
3
|
-
import zhCN from './i18n/zh-CN.json'
|
|
4
|
-
import ja from './i18n/ja.json'
|
|
5
|
-
import ko from './i18n/ko.json'
|
|
6
|
-
import de from './i18n/de.json'
|
|
7
|
-
import fr from './i18n/fr.json'
|
|
8
|
-
import es from './i18n/es.json'
|
|
9
|
-
import it from './i18n/it.json'
|
|
10
|
-
|
|
11
|
-
export type ShellCopy = typeof en
|
|
12
|
-
export const shellCatalogs: Record<string, ShellCopy> = {en,'zh-TW':zhTW,'zh-CN':zhCN,ja,ko,de,fr,es,it}
|
|
13
|
-
const aliases: Record<string,string> = {enu:'en',cht:'zh-TW',chs:'zh-CN',jpn:'ja',krn:'ko',ger:'de',fre:'fr',spn:'es',ita:'it'}
|
|
14
|
-
export function shellCopy(locale: string): ShellCopy {
|
|
15
|
-
const normalized = locale.replaceAll('_','-')
|
|
16
|
-
return shellCatalogs[aliases[normalized] ?? normalized] ?? shellCatalogs[normalized.split('-')[0]!] ?? en
|
|
17
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// The DSM-style shell shows one sidebar entry per feature that this build
|
|
2
|
-
// actually provides. The manifest is resolved at build time, so the entries
|
|
3
|
-
// here are driven by runtime feature flags rather than by the YAML itself.
|
|
4
|
-
export type ShellPage = 'status' | 'background'
|
|
5
|
-
export interface ShellFeatureFlags {background?: boolean}
|
|
6
|
-
const ORDER: readonly ShellPage[] = ['status','background']
|
|
7
|
-
|
|
8
|
-
export function shellPages(features: ShellFeatureFlags): ShellPage[] {
|
|
9
|
-
return ORDER.filter(page => page === 'status' || features[page] === true)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** Keeps a selection that still exists; otherwise the first page wins. */
|
|
13
|
-
export function activePage(current: ShellPage | undefined, pages: readonly ShellPage[]): ShellPage {
|
|
14
|
-
return current !== undefined && pages.includes(current) ? current : (pages[0] ?? 'status')
|
|
15
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
.dsmapp-vue-root {height: 100%; min-height: 0; width: 100%; overflow: hidden;}
|
|
2
|
-
[data-ui-app] .integration-app {padding: 0 var(--ui-page-padding-x, 16px); color: var(--ui-text); font-family: var(--ui-font-sans); font-size: 13px; line-height: 1.5;}
|
|
3
|
-
[data-ui-app] .integration-app section {margin-top: var(--ui-space-4, 16px);}
|
|
4
|
-
[data-ui-app] .integration-status h2 {font-size: 15px; font-weight: 600; margin: 0;}
|
|
5
|
-
[data-ui-app] .integration-status p {margin: 6px 0;}
|
|
6
|
-
[data-ui-app] .integration-status dl {display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0;}
|
|
7
|
-
[data-ui-app] .integration-status dt, [data-ui-app] .integration-help {color: var(--ui-text);}
|
|
8
|
-
[data-ui-app] .integration-status dd {margin: 0;}
|
|
9
|
-
[data-ui-app] .integration-actions {display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;}
|
|
10
|
-
[data-ui-app] .integration-notice {color: var(--ui-text);}
|
|
11
|
-
[data-ui-app] .nas-summary {display: grid; grid-template-columns: minmax(6ch, max-content) minmax(0, 1fr); gap: var(--ui-space-2, 8px) var(--ui-space-4, 16px);}
|
|
12
|
-
[data-ui-app] .nas-summary dd {margin: 0; overflow-wrap: anywhere;}
|
|
13
|
-
[data-ui-app] .nas-breadcrumb {display: flex; flex-wrap: wrap; gap: var(--ui-space-2, 8px); margin-block: var(--ui-space-3, 12px);}
|
|
14
|
-
[data-ui-app] .nas-browser {display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ui-space-3, 12px);}
|
|
15
|
-
[data-ui-app] .nas-tree {display: none;}
|
|
16
|
-
[data-ui-app] .nas-folder-list {min-width: 0; overflow: auto;}
|
|
17
|
-
[data-ui-app] .nas-folder-name {white-space: normal; overflow-wrap: anywhere; text-align: start;}
|
|
18
|
-
[data-ui-app] .nas-folder-action {white-space: normal; max-width: 100%;}
|
|
19
|
-
[data-ui-app] .nas-picker {max-height: 55vh; overflow: auto; overflow-wrap: anywhere;}
|
|
20
|
-
[data-ui-app] .nas-grants {list-style: none; padding: 0;}
|
|
21
|
-
[data-ui-app] .nas-grants > li {padding-block: var(--ui-space-4, 16px); border-bottom: 1px solid var(--ui-border);}
|
|
22
|
-
[data-ui-app] .nas-grant-heading {display: flex; align-items: start; justify-content: space-between; gap: var(--ui-space-3, 12px);}
|
|
23
|
-
[data-ui-app] .nas-grant-heading strong {overflow-wrap: anywhere;}
|
|
24
|
-
@media (min-width: 960px) {
|
|
25
|
-
[data-ui-app] .nas-browser {grid-template-columns: minmax(8ch, 1fr) minmax(0, 3fr);}
|
|
26
|
-
[data-ui-app] .nas-tree {display: block; overflow: auto;}
|
|
27
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
import {expect,test,vi} from 'vitest'
|
|
3
|
-
import {nextTick} from 'vue'
|
|
4
|
-
import {mount} from '../src/main'
|
|
5
|
-
import type {Context} from '../src/context'
|
|
6
|
-
async function settle(){for(let i=0;i<16;i++){await Promise.resolve();await nextTick()}}
|
|
7
|
-
function fixture(id:string){
|
|
8
|
-
const reopen:Array<()=>void>=[]
|
|
9
|
-
const call=vi.fn(async(method:string)=>{
|
|
10
|
-
if(method==='app.status')return {package:id,version:'1',user:'admin',admin:true}
|
|
11
|
-
if(method==='greeting.get')return {text:'Hello '+id}
|
|
12
|
-
if(method==='greeting.set')return {}
|
|
13
|
-
throw {code:'unknown_method'}
|
|
14
|
-
})
|
|
15
|
-
const ctx={locale:'en',call,reopen(fn:()=>void){reopen.push(fn);return ()=>{}}} as Context
|
|
16
|
-
const root=document.createElement('div');document.body.append(root)
|
|
17
|
-
const app=mount(root,ctx)
|
|
18
|
-
return {root,app,call,reopen,ctx,close(){app.unmount();root.remove()}}
|
|
19
|
-
}
|
|
20
|
-
test('independent mounts load and save their own package greeting',async()=>{
|
|
21
|
-
const a=fixture('Alpha'),b=fixture('Beta')
|
|
22
|
-
try{
|
|
23
|
-
await settle()
|
|
24
|
-
expect(a.root.textContent).toContain('Alpha');expect(a.root.textContent).not.toContain('Beta')
|
|
25
|
-
expect((a.root.querySelector('textarea') as HTMLTextAreaElement).value).toBe('Hello Alpha')
|
|
26
|
-
;[...a.root.querySelectorAll('button')].find(n=>n.textContent==='Save')!.click();await settle()
|
|
27
|
-
expect(a.call).toHaveBeenCalledWith('greeting.set',{text:'Hello Alpha'})
|
|
28
|
-
expect(b.call.mock.calls.some(([method])=>method==='greeting.set')).toBe(false)
|
|
29
|
-
const count=b.call.mock.calls.length;a.reopen.forEach(fn=>fn());await settle()
|
|
30
|
-
expect(b.call.mock.calls).toHaveLength(count)
|
|
31
|
-
a.app.unmount();const stopped=a.call.mock.calls.length;a.reopen.forEach(fn=>fn());await settle()
|
|
32
|
-
expect(a.call.mock.calls).toHaveLength(stopped)
|
|
33
|
-
}finally{a.close();b.close()}
|
|
34
|
-
})
|
|
35
|
-
test('failed status loading offers a retry and releases the mounting class',async()=>{
|
|
36
|
-
const f=fixture('Failure')
|
|
37
|
-
try{
|
|
38
|
-
await settle();f.call.mockRejectedValue({code:'auth_unavailable'});f.reopen.forEach(fn=>fn());await settle()
|
|
39
|
-
expect(f.root.textContent).toContain('DSM authentication is unavailable')
|
|
40
|
-
expect(f.root.querySelector('button')?.disabled).toBe(false)
|
|
41
|
-
f.app.unmount();expect(f.root.classList.contains('dsmapp-vue-root')).toBe(false)
|
|
42
|
-
}finally{f.close()}
|
|
43
|
-
})
|
|
44
|
-
test('a portal app shows the Application Portal section on the status page',async()=>{
|
|
45
|
-
const without=fixture('Plain')
|
|
46
|
-
const f=fixture('Portal')
|
|
47
|
-
try{
|
|
48
|
-
await settle();expect(without.root.textContent).not.toContain('Application Portal')
|
|
49
|
-
f.app.unmount()
|
|
50
|
-
const status={state:'active',alias:'portal',url:'https://nas.example/portal/',canManage:false,controlPanel:false,defaultAlias:'portal'} as const
|
|
51
|
-
f.ctx.portal={messages:{title:'Application Portal',link:'Direct link:'},status:vi.fn(async()=>status),apply:vi.fn(),disable:vi.fn(),openControlPanel:vi.fn(),mountPanel:vi.fn()}
|
|
52
|
-
const app=mount(f.root,f.ctx);await settle()
|
|
53
|
-
expect(f.root.textContent).toContain('Application Portal')
|
|
54
|
-
expect(f.root.querySelector('a[href="https://nas.example/portal/"]')).not.toBeNull()
|
|
55
|
-
app.unmount()
|
|
56
|
-
}finally{without.close();f.root.remove()}
|
|
57
|
-
})
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {readdirSync,readFileSync} from 'node:fs'
|
|
2
|
-
import {join} from 'node:path'
|
|
3
|
-
import {expect,test} from 'vitest'
|
|
4
|
-
const root=join(__dirname,'../src')
|
|
5
|
-
const sources=(dir:string):string[]=>readdirSync(dir,{withFileTypes:true}).flatMap(e=>e.isDirectory()?sources(join(dir,e.name)):e.name.endsWith('.vue')?[join(dir,e.name)]:[])
|
|
6
|
-
const template=(file:string)=>readFileSync(file,'utf8').replace(/<script[\s\S]*?<\/script>/g,'').replace(/<style[\s\S]*?<\/style>/g,'')
|
|
7
|
-
const uses=(file:string,tag:string)=>new RegExp(`<${tag}[\\s>/]`).test(template(file))
|
|
8
|
-
// The template ships @synopackageland/ui controls only; a native form control
|
|
9
|
-
// means a missing UI component, which is a UI gap to report, not to paper over.
|
|
10
|
-
test.each(['select','option','textarea','label','input','a'])('no vue template renders a native <%s>',tag=>{
|
|
11
|
-
expect(sources(root).filter(file=>uses(file,tag))).toEqual([])
|
|
12
|
-
})
|
|
13
|
-
// Form direction and the control id come from the UI: `direction="auto"` stacks labels in a
|
|
14
|
-
// narrow package window, and a control inside a FormItem binds its id/ARIA by itself.
|
|
15
|
-
test('FormItem controls rely on the UI auto layout and id binding',()=>{
|
|
16
|
-
const items=sources(root).filter(file=>uses(file,'FormItem'))
|
|
17
|
-
expect(items.length).toBeGreaterThan(0)
|
|
18
|
-
expect(items.filter(file=>/direction="vertical"|field\.controlId|#default="\{field\}"/.test(template(file)))).toEqual([])
|
|
19
|
-
})
|
|
20
|
-
// UI built-in text follows the Provider locale (nine locales), so every app root sets it once and no
|
|
21
|
-
// component repeats a per-control locale or download label.
|
|
22
|
-
test('app roots set the UI locale once and components do not translate UI text themselves',()=>{
|
|
23
|
-
const roots=sources(root).filter(file=>uses(file,'AppRoot'))
|
|
24
|
-
expect(roots.length).toBeGreaterThan(0)
|
|
25
|
-
expect(roots.filter(file=>!uses(file,'ConfigProvider'))).toEqual([])
|
|
26
|
-
expect(sources(root).filter(file=>/download-label|external-label|<FilePicker[^>]*:locale=/.test(template(file)))).toEqual([])
|
|
27
|
-
})
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
import {expect,test,vi} from 'vitest'
|
|
3
|
-
import {createApp,h,nextTick} from 'vue'
|
|
4
|
-
import {AppRoot} from '@synopackageland/ui'
|
|
5
|
-
import PortalSettings from '../src/portal/PortalSettings.vue'
|
|
6
|
-
import type {PortalAccess,PortalStatus} from '../src/context'
|
|
7
|
-
|
|
8
|
-
const messages={title:'Application Portal',link:'Direct link:',inactive:'Not active.',askAdmin:'Ask an administrator',alias:'Alias',apply:'Apply',disable:'Turn off',advanced:'Advanced',controlPanel:'Open Control Panel',portal_alias_in_use:'Alias in use',portal_unavailable:'DSM refused'}
|
|
9
|
-
const base:PortalStatus={state:'inactive',canManage:false,controlPanel:false,defaultAlias:'my-app'}
|
|
10
|
-
function access(status:PortalStatus,overrides:Partial<PortalAccess>={}):PortalAccess{
|
|
11
|
-
return {messages,status:vi.fn(async()=>status),apply:vi.fn(async()=>status),disable:vi.fn(async()=>status),openControlPanel:vi.fn(),mountPanel:vi.fn(),...overrides}
|
|
12
|
-
}
|
|
13
|
-
async function mount(portal:PortalAccess){
|
|
14
|
-
const root=document.createElement('div');document.body.append(root)
|
|
15
|
-
const app=createApp({render:()=>h(AppRoot,{},()=>h(PortalSettings,{portal}))})
|
|
16
|
-
app.mount(root);await nextTick();await nextTick();await new Promise(r=>setTimeout(r));await nextTick()
|
|
17
|
-
return {root,unmount(){app.unmount();root.remove()}}
|
|
18
|
-
}
|
|
19
|
-
const buttons=(root:HTMLElement)=>[...root.querySelectorAll('button')].map(b=>b.textContent?.trim())
|
|
20
|
-
|
|
21
|
-
test('an ordinary user sees the active link and nothing to change',async()=>{
|
|
22
|
-
const {root,unmount}=await mount(access({...base,state:'active',alias:'my-app',url:'https://nas.example/my-app/'}))
|
|
23
|
-
try{
|
|
24
|
-
expect(root.querySelector('a')?.getAttribute('href')).toBe('https://nas.example/my-app/')
|
|
25
|
-
expect(root.querySelector('input')).toBeNull();expect(root.querySelector('button')).toBeNull()
|
|
26
|
-
}finally{unmount()}
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
test('an ordinary user without an active alias is asked to contact an administrator',async()=>{
|
|
30
|
-
const {root,unmount}=await mount(access({...base,state:'unavailable'}))
|
|
31
|
-
try{
|
|
32
|
-
expect(root.textContent).toContain('Ask an administrator')
|
|
33
|
-
expect(root.querySelector('a,input,button')).toBeNull()
|
|
34
|
-
}finally{unmount()}
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
test('an administrator applies the prefilled alias and sees DSM refusals as portal text',async()=>{
|
|
38
|
-
const apply=vi.fn(async()=>Promise.reject({code:'portal_alias_in_use'}))
|
|
39
|
-
const portal=access({...base,canManage:true},{apply})
|
|
40
|
-
const {root,unmount}=await mount(portal)
|
|
41
|
-
try{
|
|
42
|
-
const input=root.querySelector('input')!
|
|
43
|
-
expect(input.value).toBe('my-app')
|
|
44
|
-
root.querySelector('form')!.dispatchEvent(new Event('submit',{cancelable:true}))
|
|
45
|
-
await new Promise(r=>setTimeout(r));await nextTick()
|
|
46
|
-
expect(apply).toHaveBeenCalledWith('my-app')
|
|
47
|
-
expect(root.querySelector('[role="alert"]')?.textContent).toContain('Alias in use')
|
|
48
|
-
;[...root.querySelectorAll('button')].find(b=>b.textContent?.includes('Advanced'))!.click()
|
|
49
|
-
expect(portal.openControlPanel).toHaveBeenCalled()
|
|
50
|
-
}finally{unmount()}
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
test('an administrator turns an active alias off',async()=>{
|
|
54
|
-
const portal=access({...base,state:'active',alias:'my-app',url:'https://nas.example/my-app/',canManage:true})
|
|
55
|
-
const {root,unmount}=await mount(portal)
|
|
56
|
-
try{
|
|
57
|
-
expect(root.querySelector('a')?.getAttribute('href')).toBe('https://nas.example/my-app/')
|
|
58
|
-
;[...root.querySelectorAll('button')].find(b=>b.textContent?.includes('Turn off'))!.click()
|
|
59
|
-
await nextTick()
|
|
60
|
-
expect(portal.disable).toHaveBeenCalled()
|
|
61
|
-
}finally{unmount()}
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
test('an administrator without DSM portal support gets only the Control Panel shortcut',async()=>{
|
|
65
|
-
const portal=access({...base,state:'unavailable',controlPanel:true})
|
|
66
|
-
const {root,unmount}=await mount(portal)
|
|
67
|
-
try{
|
|
68
|
-
expect(root.querySelector('input')).toBeNull()
|
|
69
|
-
expect(buttons(root)).toEqual(['Open Control Panel'])
|
|
70
|
-
}finally{unmount()}
|
|
71
|
-
})
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
// @vitest-environment-options {"url":"https://nas.test"}
|
|
3
|
-
import {expect,test,vi} from 'vitest'
|
|
4
|
-
import {nextTick} from 'vue'
|
|
5
|
-
import {mount} from '../src/main'
|
|
6
|
-
import type {Context} from '../src/context'
|
|
7
|
-
import {appCopy} from '../src/i18n'
|
|
8
|
-
import {identityCopy} from '../src/identity/i18n'
|
|
9
|
-
async function settle(){for(let i=0;i<20;i++){await Promise.resolve();await nextTick()}}
|
|
10
|
-
const buttons=(root:HTMLElement)=>[...root.querySelectorAll('button')].map(b=>b.textContent?.trim())
|
|
11
|
-
function start(locale:string,call:(method:string)=>Promise<unknown>){
|
|
12
|
-
const ctx={locale,call:vi.fn(call),reopen(){return ()=>{}}} as unknown as Context
|
|
13
|
-
const root=document.createElement('div');document.body.append(root)
|
|
14
|
-
const app=mount(root,ctx)
|
|
15
|
-
return {root,close(){app.unmount();root.remove()}}
|
|
16
|
-
}
|
|
17
|
-
test('the status page and its errors follow the DSM language',async()=>{
|
|
18
|
-
const copy=appCopy('ger')
|
|
19
|
-
const {root,close}=start('de',async method=>{
|
|
20
|
-
if(method==='app.status')return {package:'Pkg',version:'1',user:'admin',admin:true}
|
|
21
|
-
if(method==='greeting.get')throw {code:'admin_required'}
|
|
22
|
-
throw {code:'unknown_method'}
|
|
23
|
-
})
|
|
24
|
-
try{
|
|
25
|
-
await settle()
|
|
26
|
-
expect(buttons(root)).toContain(copy.refresh)
|
|
27
|
-
expect(root.textContent).toContain(copy.statusTitle)
|
|
28
|
-
expect(root.textContent).toContain(copy.greeting)
|
|
29
|
-
expect(root.textContent).toContain(copy.errors.admin_required)
|
|
30
|
-
expect(root.querySelector('[aria-label]')?.getAttribute('aria-label')).not.toBe('Package settings')
|
|
31
|
-
}finally{close()}
|
|
32
|
-
})
|
|
33
|
-
test('unknown failures name the code in the DSM language',()=>{
|
|
34
|
-
expect(appCopy('ja').errors.request_failed).toContain('{code}')
|
|
35
|
-
})
|
|
36
|
-
test('the sign-in page and its session notices follow the DSM language',async()=>{
|
|
37
|
-
const copy=identityCopy('jpn')
|
|
38
|
-
const {root,close}=start('ja',async method=>{
|
|
39
|
-
if(method==='identity.status')return {enabled:true}
|
|
40
|
-
if(method==='identity.session')return {user:'alice',uid:'1',expiresAt:new Date(Date.now()-1000).toISOString()}
|
|
41
|
-
throw {code:'session_required'}
|
|
42
|
-
})
|
|
43
|
-
try{
|
|
44
|
-
await settle()
|
|
45
|
-
expect(root.textContent).toContain(copy.title)
|
|
46
|
-
expect(buttons(root)).toEqual(expect.arrayContaining([copy.signIn,copy.continueDSM]))
|
|
47
|
-
expect(root.querySelector('[role="status"]')?.textContent).toBe(copy.notices.expired)
|
|
48
|
-
expect(root.textContent).not.toMatch(/Sign in|Account|Password|session/)
|
|
49
|
-
}finally{close()}
|
|
50
|
-
})
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
import {expect,test,vi} from 'vitest'
|
|
3
|
-
import {createApp,h,nextTick,ref} from 'vue'
|
|
4
|
-
import {AppRoot} from '@synopackageland/ui'
|
|
5
|
-
import AppShell from '../src/shell/AppShell.vue'
|
|
6
|
-
import type {ShellPage} from '../src/shell/pages'
|
|
7
|
-
test('enabled pages use keyboard buttons and share the page header boundary',async()=>{
|
|
8
|
-
const selected=ref<ShellPage>('status')
|
|
9
|
-
const root=document.createElement('div');document.body.append(root)
|
|
10
|
-
const app=createApp({render:()=>h(AppRoot,{},()=>h(AppShell,{locale:'cht',modelValue:selected.value,pages:['status','background'], 'onUpdate:modelValue':(value:ShellPage)=>selected.value=value},()=>h('div',{'data-content':true},'Content')))})
|
|
11
|
-
try{
|
|
12
|
-
app.mount(root);await nextTick()
|
|
13
|
-
const nav=[...root.querySelectorAll<HTMLButtonElement>('[data-nav-item]')]
|
|
14
|
-
expect(nav).toHaveLength(2);expect(nav.every(n=>n.tagName==='BUTTON')).toBe(true)
|
|
15
|
-
nav[1]!.click();await nextTick();expect(selected.value).toBe('background')
|
|
16
|
-
const body=root.querySelector('[data-page-content-body]')!
|
|
17
|
-
expect(body.contains(root.querySelector('h1'))).toBe(true)
|
|
18
|
-
expect(body.contains(root.querySelector('[data-content]'))).toBe(true)
|
|
19
|
-
}finally{app.unmount();root.remove()}
|
|
20
|
-
})
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
import {expect,test} from 'vitest'
|
|
3
|
-
import {activePage,shellPages,type ShellFeatureFlags} from '../src/shell/pages'
|
|
4
|
-
import {shellCatalogs,shellCopy} from '../src/shell/i18n'
|
|
5
|
-
|
|
6
|
-
test('navigation follows the background flag and falls back when unavailable',()=>{
|
|
7
|
-
expect(shellPages({})).toEqual(['status'])
|
|
8
|
-
expect(shellPages({background:true})).toEqual(['status','background'])
|
|
9
|
-
expect(activePage('background',shellPages({}))).toBe('status')
|
|
10
|
-
expect(activePage('background',shellPages({background:true}))).toBe('background')
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
test('nine navigation catalogs stay complete and resolve DSM locale aliases',()=>{
|
|
14
|
-
expect(Object.keys(shellCatalogs)).toEqual(['en','zh-TW','zh-CN','ja','ko','de','fr','es','it'])
|
|
15
|
-
for(const catalog of Object.values(shellCatalogs)){
|
|
16
|
-
expect(Object.keys(catalog).sort()).toEqual(Object.keys(shellCatalogs.en).sort())
|
|
17
|
-
expect(Object.values(catalog).every(value=>typeof value==='string'&&value.trim().length>0)).toBe(true)
|
|
18
|
-
}
|
|
19
|
-
expect(shellCopy('cht')).toEqual(shellCatalogs['zh-TW'])
|
|
20
|
-
expect(shellCopy('zh_CN')).toEqual(shellCatalogs['zh-CN'])
|
|
21
|
-
expect(shellCopy('unknown')).toEqual(shellCatalogs.en)
|
|
22
|
-
expect(Object.values(shellCatalogs).every(catalog=>typeof catalog.background==='string'&&catalog.background.trim().length>0)).toBe(true)
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
test('navigation labels are unique inside every catalog',()=>{
|
|
26
|
-
for(const catalog of Object.values(shellCatalogs)){
|
|
27
|
-
const labels=Object.values(catalog).map(value=>value.trim().toLowerCase())
|
|
28
|
-
expect(new Set(labels).size).toBe(labels.length)
|
|
29
|
-
}
|
|
30
|
-
})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"compilerOptions":{"target":"ES2022","module":"ESNext","moduleResolution":"Bundler","resolveJsonModule":true,"strict":true,"lib":["ES2022","DOM"],"skipLibCheck":true,"types":["vite/client"]},"include":["src/**/*.ts","src/**/*.vue","vite.config.ts"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
|
3
|
-
// @ts-expect-error The shared notice tool is a plain Node module.
|
|
4
|
-
import { writeThirdPartyNotices } from './third-party-notices.mjs'
|
|
5
|
-
export default defineConfig(({command}) => ({
|
|
6
|
-
plugins: [vue(), {name: 'dependency-notices', closeBundle() {writeThirdPartyNotices('.', 'dist/LICENSES', {ui: true})}}],
|
|
7
|
-
// Library mode must replace Vue dependency env guards for the DSM browser.
|
|
8
|
-
define: command === 'build' ? {'process.env.NODE_ENV': JSON.stringify('production')} : {},
|
|
9
|
-
build: {lib: {entry: 'src/main.ts', formats: ['iife'], name: 'DsmVueApp', fileName: () => 'app.js'}, cssCodeSplit: false, rollupOptions: {output: {assetFileNames: 'app.[ext]'}}},
|
|
10
|
-
}))
|