@synopackageland/cli 0.4.0 → 0.4.1
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/LICENSE +21 -0
- package/README.md +37 -0
- package/dist/build-spk/generator.js +3 -0
- package/dist/build-spk/notices.d.ts +5 -0
- package/dist/build-spk/notices.js +60 -0
- package/dist/cli.js +9 -2
- package/dist/error-registry.js +20 -0
- package/dist/init.d.ts +4 -0
- package/dist/init.js +20 -12
- package/dist/standalone/build.js +3 -1
- package/dist/standalone/daemon.d.ts +23 -0
- package/dist/standalone/daemon.js +114 -0
- package/dist/standalone/dsm-window.d.ts +1 -1
- package/dist/standalone/dsm-window.js +50 -10
- package/dist/standalone/helper-inventory.d.ts +16 -0
- package/dist/standalone/helper-inventory.js +2 -0
- package/dist/standalone/helper.d.ts +2 -12
- package/dist/standalone/helper.js +8 -7
- package/dist/standalone/host-adapter.d.ts +5 -0
- package/dist/standalone/host-adapter.js +148 -0
- package/dist/standalone/host-platform.d.ts +13 -0
- package/dist/standalone/host-platform.js +42 -0
- package/dist/standalone/host-types.d.ts +49 -0
- package/dist/standalone/host-types.js +1 -0
- package/dist/standalone/inspect-helper.d.ts +6 -0
- package/dist/standalone/inspect-helper.js +88 -0
- package/dist/standalone/inspect-spk.d.ts +2 -0
- package/dist/standalone/inspect-spk.js +49 -0
- package/dist/standalone/lifecycle-helper.d.ts +2 -0
- package/dist/standalone/lifecycle-helper.js +12 -0
- package/dist/standalone/lifecycle.d.ts +3 -0
- package/dist/standalone/lifecycle.js +53 -0
- package/dist/standalone/manifest.d.ts +2 -0
- package/dist/standalone/manifest.js +4 -1
- package/dist/standalone/reopen-events.d.ts +2 -0
- package/dist/standalone/reopen-events.js +28 -0
- package/dist/standalone/root-messages.js +9 -0
- package/dist/standalone/root-window.d.ts +4 -3
- package/dist/standalone/root-window.js +17 -5
- package/dist/standalone/spk.d.ts +4 -3
- package/dist/standalone/spk.js +20 -33
- package/dist/template-paths.d.ts +2 -0
- package/dist/template-paths.js +9 -0
- package/dist/templates/_daemon/fixture_linux_test.go +15 -0
- package/dist/templates/_daemon/fixture_other_test.go +7 -0
- package/dist/templates/_daemon/go.mod +3 -0
- package/dist/templates/_daemon/main.go +608 -0
- package/dist/templates/_daemon/main_test.go +242 -0
- package/dist/templates/_daemon/process_linux.go +55 -0
- package/dist/templates/_daemon/process_linux_test.go +161 -0
- package/dist/templates/_daemon/process_other.go +14 -0
- package/dist/templates/_daemon/testdata/child.go +41 -0
- package/dist/templates/_shared/GO-LICENSE +27 -0
- package/dist/templates/_shared/GO-PATENTS +22 -0
- package/dist/templates/_shared/LICENSES/TEMPLATE.txt +21 -0
- package/dist/templates/_shared/notice-overrides/index.json +14 -0
- package/dist/templates/_shared/notice-overrides/utils-0.4.2-LICENSE +21 -0
- package/dist/templates/_shared/notice-overrides/utils-0.5.0-LICENSE +21 -0
- package/dist/templates/_shared/third-party-notices.mjs +51 -0
- package/dist/templates/native-go/README.md +57 -1
- package/dist/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +59 -0
- package/dist/templates/native-go/backend/cmd/dsm-readonly-probe/main_linux.go +46 -0
- package/dist/templates/native-go/backend/go.mod +4 -0
- package/dist/templates/native-go/backend/go.sum +4 -0
- package/dist/templates/native-go/backend/internal/api/binary.go +154 -0
- package/dist/templates/native-go/backend/internal/api/binary_test.go +165 -0
- package/dist/templates/native-go/backend/internal/api/registry.go +14 -4
- package/dist/templates/native-go/backend/internal/api/server.go +4 -0
- package/dist/templates/native-go/backend/internal/app/nas_cgi_artifact_test.go +121 -0
- package/dist/templates/native-go/backend/internal/app/nas_refusal_test.go +46 -0
- package/dist/templates/native-go/backend/internal/app/routes.go +11 -0
- package/dist/templates/native-go/backend/internal/app/routes_test.go +10 -5
- package/dist/templates/native-go/backend/internal/dsmprobe/collector_linux.go +335 -0
- package/dist/templates/native-go/backend/internal/dsmprobe/collector_linux_test.go +41 -0
- package/dist/templates/native-go/backend/internal/dsmprobe/protocol.go +179 -0
- package/dist/templates/native-go/backend/internal/dsmprobe/protocol_test.go +29 -0
- package/dist/templates/native-go/backend/internal/helper/cohort.go +393 -0
- package/dist/templates/native-go/backend/internal/helper/cohort_publication.go +18 -0
- package/dist/templates/native-go/backend/internal/helper/cohort_publication_test.go +105 -0
- package/dist/templates/native-go/backend/internal/helper/cohort_test.go +372 -0
- package/dist/templates/native-go/backend/internal/helper/control.go +226 -21
- package/dist/templates/native-go/backend/internal/helper/control_test.go +10 -2
- package/dist/templates/native-go/backend/internal/helper/data_contract.go +242 -0
- package/dist/templates/native-go/backend/internal/helper/data_contract_test.go +51 -0
- package/dist/templates/native-go/backend/internal/helper/data_decode.go +184 -0
- package/dist/templates/native-go/backend/internal/helper/data_decode_pointer_test.go +30 -0
- package/dist/templates/native-go/backend/internal/helper/data_protocol.go +416 -0
- package/dist/templates/native-go/backend/internal/helper/data_protocol_test.go +449 -0
- package/dist/templates/native-go/backend/internal/helper/dsm_acl_linux.go +139 -0
- package/dist/templates/native-go/backend/internal/helper/dsm_acl_linux_test.go +121 -0
- package/dist/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux.go +95 -0
- package/dist/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux_test.go +56 -0
- package/dist/templates/native-go/backend/internal/helper/dsm_bridge_linux.go +144 -0
- package/dist/templates/native-go/backend/internal/helper/dsm_bridge_linux_test.go +89 -0
- package/dist/templates/native-go/backend/internal/helper/dsm_home_linux.go +107 -0
- package/dist/templates/native-go/backend/internal/helper/dsm_home_linux_test.go +82 -0
- package/dist/templates/native-go/backend/internal/helper/dsm_probe_transport_linux.go +151 -0
- package/dist/templates/native-go/backend/internal/helper/dsm_probe_transport_linux_test.go +66 -0
- package/dist/templates/native-go/backend/internal/helper/grant_authority.go +516 -0
- package/dist/templates/native-go/backend/internal/helper/grant_authority_contract.go +88 -0
- package/dist/templates/native-go/backend/internal/helper/grant_authority_test.go +510 -0
- package/dist/templates/native-go/backend/internal/helper/grant_cohort.go +389 -0
- package/dist/templates/native-go/backend/internal/helper/grant_cohort_test.go +239 -0
- package/dist/templates/native-go/backend/internal/helper/grant_delivery.go +49 -0
- package/dist/templates/native-go/backend/internal/helper/grant_delivery_methods.go +273 -0
- package/dist/templates/native-go/backend/internal/helper/grant_delivery_test.go +322 -0
- package/dist/templates/native-go/backend/internal/helper/grant_operation_contract.go +47 -0
- package/dist/templates/native-go/backend/internal/helper/grant_readonly_test.go +180 -0
- package/dist/templates/native-go/backend/internal/helper/grant_repository_linux.go +415 -0
- package/dist/templates/native-go/backend/internal/helper/grant_repository_linux_test.go +468 -0
- package/dist/templates/native-go/backend/internal/helper/grant_rpc.go +147 -0
- package/dist/templates/native-go/backend/internal/helper/grant_rpc_test.go +51 -0
- package/dist/templates/native-go/backend/internal/helper/grant_snapshot.go +75 -0
- package/dist/templates/native-go/backend/internal/helper/grant_supervisor_linux.go +134 -0
- package/dist/templates/native-go/backend/internal/helper/grant_supervisor_linux_test.go +254 -0
- package/dist/templates/native-go/backend/internal/helper/lease.go +112 -0
- package/dist/templates/native-go/backend/internal/helper/lease_linux.go +44 -0
- package/dist/templates/native-go/backend/internal/helper/lease_other.go +8 -0
- package/dist/templates/native-go/backend/internal/helper/lifecycle.go +234 -0
- package/dist/templates/native-go/backend/internal/helper/lifecycle_test.go +473 -0
- package/dist/templates/native-go/backend/internal/helper/managed_pilot.go +284 -0
- package/dist/templates/native-go/backend/internal/helper/managed_pilot_repository_linux.go +74 -0
- package/dist/templates/native-go/backend/internal/helper/managed_pilot_repository_linux_test.go +40 -0
- package/dist/templates/native-go/backend/internal/helper/managed_pilot_test.go +210 -0
- package/dist/templates/native-go/backend/internal/helper/nas_shipped_refusal_linux_test.go +97 -0
- package/dist/templates/native-go/backend/internal/helper/native_discovery.go +79 -0
- package/dist/templates/native-go/backend/internal/helper/native_identity.go +89 -0
- package/dist/templates/native-go/backend/internal/helper/native_provider.go +159 -0
- package/dist/templates/native-go/backend/internal/helper/native_provider_test.go +421 -0
- package/dist/templates/native-go/backend/internal/helper/observation.go +204 -0
- package/dist/templates/native-go/backend/internal/helper/observation_health_test.go +115 -0
- package/dist/templates/native-go/backend/internal/helper/observation_reload_budget_test.go +117 -0
- package/dist/templates/native-go/backend/internal/helper/observation_test.go +196 -0
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic.go +109 -0
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_linux.go +76 -0
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_linux_test.go +124 -0
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_test.go +98 -0
- package/dist/templates/native-go/backend/internal/helper/operation_bootstrap_linux.go +193 -0
- package/dist/templates/native-go/backend/internal/helper/operation_credentials_linux.go +56 -0
- package/dist/templates/native-go/backend/internal/helper/operation_linux.go +480 -0
- package/dist/templates/native-go/backend/internal/helper/operation_linux_test.go +528 -0
- package/dist/templates/native-go/backend/internal/helper/process_linux.go +11 -1
- package/dist/templates/native-go/backend/internal/helper/publication_test.go +178 -0
- package/dist/templates/native-go/backend/internal/helper/read_stream_cohort_linux_test.go +156 -0
- package/dist/templates/native-go/backend/internal/helper/read_transfer.go +40 -0
- package/dist/templates/native-go/backend/internal/helper/read_transfer_linux.go +109 -0
- package/dist/templates/native-go/backend/internal/helper/read_transfer_linux_test.go +118 -0
- package/dist/templates/native-go/backend/internal/helper/read_transfer_test.go +177 -0
- package/dist/templates/native-go/backend/internal/helper/readonly.go +105 -0
- package/dist/templates/native-go/backend/internal/helper/readonly_admission.go +85 -0
- package/dist/templates/native-go/backend/internal/helper/readonly_cohort_linux_test.go +253 -0
- package/dist/templates/native-go/backend/internal/helper/readonly_linux_test.go +378 -0
- package/dist/templates/native-go/backend/internal/helper/readonly_mount_linux.go +65 -0
- package/dist/templates/native-go/backend/internal/helper/readonly_mount_proxy_linux.go +113 -0
- package/dist/templates/native-go/backend/internal/helper/readonly_operations_linux.go +168 -0
- package/dist/templates/native-go/backend/internal/helper/readonly_resolver_linux.go +241 -0
- package/dist/templates/native-go/backend/internal/helper/readonly_test.go +40 -0
- package/dist/templates/native-go/backend/internal/helper/relaxed_identity.go +252 -0
- package/dist/templates/native-go/backend/internal/helper/relaxed_identity_contract.go +105 -0
- package/dist/templates/native-go/backend/internal/helper/relaxed_identity_test.go +406 -0
- package/dist/templates/native-go/backend/internal/helper/relaxed_invalidation.go +200 -0
- package/dist/templates/native-go/backend/internal/helper/repair.go +132 -0
- package/dist/templates/native-go/backend/internal/helper/repair_test.go +271 -0
- package/dist/templates/native-go/backend/internal/helper/s1r_actor_acl_linux_test.go +303 -0
- package/dist/templates/native-go/backend/internal/helper/s1r_actor_fixture_linux_test.go +184 -0
- package/dist/templates/native-go/backend/internal/helper/s1r_actor_races_linux_test.go +231 -0
- package/dist/templates/native-go/backend/internal/helper/s1r_fixture_contract_linux_test.go +18 -0
- package/dist/templates/native-go/backend/internal/helper/server_linux.go +44 -3
- package/dist/templates/native-go/backend/internal/helper/status.go +74 -11
- package/dist/templates/native-go/backend/internal/helper/status_test.go +83 -0
- package/dist/templates/native-go/backend/internal/helper/supervision.go +28 -5
- package/dist/templates/native-go/backend/internal/helper/supervisor_frame.go +76 -0
- package/dist/templates/native-go/backend/internal/helper/supervisor_frame_linux_test.go +69 -0
- package/dist/templates/native-go/backend/internal/helper/supervisor_frame_test.go +107 -0
- package/dist/templates/native-go/backend/internal/helper/supervisor_linux.go +187 -16
- package/dist/templates/native-go/backend/internal/helper/supervisor_linux_test.go +618 -7
- package/dist/templates/native-go/backend/internal/helper/supervisor_socket_eof_test.go +74 -0
- package/dist/templates/native-go/backend/internal/helper/supervisor_socket_test.go +45 -0
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/create.json +23 -0
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/frames.json +67 -0
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/grant-store.json +52 -0
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/intent.json +20 -0
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/list.json +20 -0
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/publish.json +20 -0
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/read.json +22 -0
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/stat.json +22 -0
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/write-stream.json +22 -0
- package/dist/templates/native-go/backend/internal/helper/unit_connection.go +75 -0
- package/dist/templates/native-go/backend/internal/helper/unit_connection_linux_test.go +135 -0
- package/dist/templates/native-go/backend/internal/helper/unit_connection_test.go +133 -0
- package/dist/templates/native-go/backend/internal/helper/unit_frame_test.go +32 -0
- package/dist/templates/native-go/backend/internal/helper/unit_linux.go +364 -0
- package/dist/templates/native-go/backend/internal/helper/unit_linux_test.go +46 -0
- package/dist/templates/native-go/backend/internal/helper/unit_mechanisms_linux_test.go +217 -0
- package/dist/templates/native-go/backend/internal/helper/unit_padding_linux_test.go +178 -0
- package/dist/templates/native-go/backend/internal/helper/unit_query_linux.go +111 -0
- package/dist/templates/native-go/backend/internal/helper/unit_reload_linux_test.go +372 -0
- package/dist/templates/native-go/backend/internal/helper/unit_reload_sequence_linux_test.go +232 -0
- package/dist/templates/native-go/backend/internal/helper/write.go +77 -0
- package/dist/templates/native-go/backend/internal/helper/write_admission.go +260 -0
- package/dist/templates/native-go/backend/internal/helper/write_admission_test.go +135 -0
- package/dist/templates/native-go/backend/internal/helper/write_cohort_linux_test.go +218 -0
- package/dist/templates/native-go/backend/internal/helper/write_files_linux.go +202 -0
- package/dist/templates/native-go/backend/internal/helper/write_files_linux_test.go +199 -0
- package/dist/templates/native-go/backend/internal/helper/write_intent_linux.go +116 -0
- package/dist/templates/native-go/backend/internal/helper/write_intent_linux_test.go +74 -0
- package/dist/templates/native-go/backend/internal/helper/write_operation_linux.go +245 -0
- package/dist/templates/native-go/backend/internal/helper/write_test.go +53 -0
- package/dist/templates/native-go/ui/app.js +8 -1
- package/dist/templates/native-go-better-auth/node/build.mjs +2 -0
- package/dist/templates/native-go-vue/README.md +115 -1
- package/dist/templates/native-go-vue/frontend/DESIGN.md +1 -1
- package/dist/templates/native-go-vue/frontend/package-lock.json +132 -229
- package/dist/templates/native-go-vue/frontend/package.json +1 -1
- package/dist/templates/native-go-vue/frontend/src/App.vue +33 -6
- package/dist/templates/native-go-vue/frontend/src/context.ts +41 -2
- package/dist/templates/native-go-vue/frontend/src/main.ts +4 -1
- package/dist/templates/native-go-vue/frontend/src/nas/NasGrantSettings.vue +74 -0
- package/dist/templates/native-go-vue/frontend/src/nas/NasPathPicker.vue +106 -0
- package/dist/templates/native-go-vue/frontend/src/nas/NasUnavailable.vue +20 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/de.json +74 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/en.json +74 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/es.json +74 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/fr.json +74 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/it.json +74 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/ja.json +74 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/ko.json +74 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/zh-CN.json +74 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/zh-TW.json +74 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n.ts +38 -0
- package/dist/templates/native-go-vue/frontend/src/nas/mock-provider.ts +119 -0
- package/dist/templates/native-go-vue/frontend/src/nas/provider.ts +59 -0
- package/dist/templates/native-go-vue/frontend/src/nas/use-request.ts +27 -0
- package/dist/templates/native-go-vue/frontend/src/style.css +17 -0
- package/dist/templates/native-go-vue/frontend/test/apps.test.ts +44 -2
- package/dist/templates/native-go-vue/frontend/test/nas-provider.test.ts +81 -0
- package/dist/templates/native-go-vue/frontend/test/nas-request.test.ts +21 -0
- package/dist/templates/native-go-vue/frontend/test/nas-ui.test.ts +261 -0
- package/dist/templates/native-go-vue/frontend/tsconfig.json +1 -1
- package/dist/templates/native-go-vue/frontend/vite.config.ts +6 -4
- package/package.json +3 -2
- package/templates/_daemon/fixture_linux_test.go +15 -0
- package/templates/_daemon/fixture_other_test.go +7 -0
- package/templates/_daemon/go.mod +3 -0
- package/templates/_daemon/main.go +608 -0
- package/templates/_daemon/main_test.go +242 -0
- package/templates/_daemon/process_linux.go +55 -0
- package/templates/_daemon/process_linux_test.go +161 -0
- package/templates/_daemon/process_other.go +14 -0
- package/templates/_daemon/testdata/child.go +41 -0
- package/templates/_shared/GO-LICENSE +27 -0
- package/templates/_shared/GO-PATENTS +22 -0
- package/templates/_shared/LICENSES/TEMPLATE.txt +21 -0
- package/templates/_shared/notice-overrides/index.json +14 -0
- package/templates/_shared/notice-overrides/utils-0.4.2-LICENSE +21 -0
- package/templates/_shared/notice-overrides/utils-0.5.0-LICENSE +21 -0
- package/templates/_shared/third-party-notices.mjs +51 -0
- package/templates/native-go/README.md +57 -1
- package/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +59 -0
- package/templates/native-go/backend/cmd/dsm-readonly-probe/main_linux.go +46 -0
- package/templates/native-go/backend/go.mod +4 -0
- package/templates/native-go/backend/go.sum +4 -0
- package/templates/native-go/backend/internal/api/binary.go +154 -0
- package/templates/native-go/backend/internal/api/binary_test.go +165 -0
- package/templates/native-go/backend/internal/api/registry.go +14 -4
- package/templates/native-go/backend/internal/api/server.go +4 -0
- package/templates/native-go/backend/internal/app/nas_cgi_artifact_test.go +121 -0
- package/templates/native-go/backend/internal/app/nas_refusal_test.go +46 -0
- package/templates/native-go/backend/internal/app/routes.go +11 -0
- package/templates/native-go/backend/internal/app/routes_test.go +10 -5
- package/templates/native-go/backend/internal/dsmprobe/collector_linux.go +335 -0
- package/templates/native-go/backend/internal/dsmprobe/collector_linux_test.go +41 -0
- package/templates/native-go/backend/internal/dsmprobe/protocol.go +179 -0
- package/templates/native-go/backend/internal/dsmprobe/protocol_test.go +29 -0
- package/templates/native-go/backend/internal/helper/cohort.go +393 -0
- package/templates/native-go/backend/internal/helper/cohort_publication.go +18 -0
- package/templates/native-go/backend/internal/helper/cohort_publication_test.go +105 -0
- package/templates/native-go/backend/internal/helper/cohort_test.go +372 -0
- package/templates/native-go/backend/internal/helper/control.go +226 -21
- package/templates/native-go/backend/internal/helper/control_test.go +10 -2
- package/templates/native-go/backend/internal/helper/data_contract.go +242 -0
- package/templates/native-go/backend/internal/helper/data_contract_test.go +51 -0
- package/templates/native-go/backend/internal/helper/data_decode.go +184 -0
- package/templates/native-go/backend/internal/helper/data_decode_pointer_test.go +30 -0
- package/templates/native-go/backend/internal/helper/data_protocol.go +416 -0
- package/templates/native-go/backend/internal/helper/data_protocol_test.go +449 -0
- package/templates/native-go/backend/internal/helper/dsm_acl_linux.go +139 -0
- package/templates/native-go/backend/internal/helper/dsm_acl_linux_test.go +121 -0
- package/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux.go +95 -0
- package/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux_test.go +56 -0
- package/templates/native-go/backend/internal/helper/dsm_bridge_linux.go +144 -0
- package/templates/native-go/backend/internal/helper/dsm_bridge_linux_test.go +89 -0
- package/templates/native-go/backend/internal/helper/dsm_home_linux.go +107 -0
- package/templates/native-go/backend/internal/helper/dsm_home_linux_test.go +82 -0
- package/templates/native-go/backend/internal/helper/dsm_probe_transport_linux.go +151 -0
- package/templates/native-go/backend/internal/helper/dsm_probe_transport_linux_test.go +66 -0
- package/templates/native-go/backend/internal/helper/grant_authority.go +516 -0
- package/templates/native-go/backend/internal/helper/grant_authority_contract.go +88 -0
- package/templates/native-go/backend/internal/helper/grant_authority_test.go +510 -0
- package/templates/native-go/backend/internal/helper/grant_cohort.go +389 -0
- package/templates/native-go/backend/internal/helper/grant_cohort_test.go +239 -0
- package/templates/native-go/backend/internal/helper/grant_delivery.go +49 -0
- package/templates/native-go/backend/internal/helper/grant_delivery_methods.go +273 -0
- package/templates/native-go/backend/internal/helper/grant_delivery_test.go +322 -0
- package/templates/native-go/backend/internal/helper/grant_operation_contract.go +47 -0
- package/templates/native-go/backend/internal/helper/grant_readonly_test.go +180 -0
- package/templates/native-go/backend/internal/helper/grant_repository_linux.go +415 -0
- package/templates/native-go/backend/internal/helper/grant_repository_linux_test.go +468 -0
- package/templates/native-go/backend/internal/helper/grant_rpc.go +147 -0
- package/templates/native-go/backend/internal/helper/grant_rpc_test.go +51 -0
- package/templates/native-go/backend/internal/helper/grant_snapshot.go +75 -0
- package/templates/native-go/backend/internal/helper/grant_supervisor_linux.go +134 -0
- package/templates/native-go/backend/internal/helper/grant_supervisor_linux_test.go +254 -0
- package/templates/native-go/backend/internal/helper/lease.go +112 -0
- package/templates/native-go/backend/internal/helper/lease_linux.go +44 -0
- package/templates/native-go/backend/internal/helper/lease_other.go +8 -0
- package/templates/native-go/backend/internal/helper/lifecycle.go +234 -0
- package/templates/native-go/backend/internal/helper/lifecycle_test.go +473 -0
- package/templates/native-go/backend/internal/helper/managed_pilot.go +284 -0
- package/templates/native-go/backend/internal/helper/managed_pilot_repository_linux.go +74 -0
- package/templates/native-go/backend/internal/helper/managed_pilot_repository_linux_test.go +40 -0
- package/templates/native-go/backend/internal/helper/managed_pilot_test.go +210 -0
- package/templates/native-go/backend/internal/helper/nas_shipped_refusal_linux_test.go +97 -0
- package/templates/native-go/backend/internal/helper/native_discovery.go +79 -0
- package/templates/native-go/backend/internal/helper/native_identity.go +89 -0
- package/templates/native-go/backend/internal/helper/native_provider.go +159 -0
- package/templates/native-go/backend/internal/helper/native_provider_test.go +421 -0
- package/templates/native-go/backend/internal/helper/observation.go +204 -0
- package/templates/native-go/backend/internal/helper/observation_health_test.go +115 -0
- package/templates/native-go/backend/internal/helper/observation_reload_budget_test.go +117 -0
- package/templates/native-go/backend/internal/helper/observation_test.go +196 -0
- package/templates/native-go/backend/internal/helper/observer_diagnostic.go +109 -0
- package/templates/native-go/backend/internal/helper/observer_diagnostic_linux.go +76 -0
- package/templates/native-go/backend/internal/helper/observer_diagnostic_linux_test.go +124 -0
- package/templates/native-go/backend/internal/helper/observer_diagnostic_test.go +98 -0
- package/templates/native-go/backend/internal/helper/operation_bootstrap_linux.go +193 -0
- package/templates/native-go/backend/internal/helper/operation_credentials_linux.go +56 -0
- package/templates/native-go/backend/internal/helper/operation_linux.go +480 -0
- package/templates/native-go/backend/internal/helper/operation_linux_test.go +528 -0
- package/templates/native-go/backend/internal/helper/process_linux.go +11 -1
- package/templates/native-go/backend/internal/helper/publication_test.go +178 -0
- package/templates/native-go/backend/internal/helper/read_stream_cohort_linux_test.go +156 -0
- package/templates/native-go/backend/internal/helper/read_transfer.go +40 -0
- package/templates/native-go/backend/internal/helper/read_transfer_linux.go +109 -0
- package/templates/native-go/backend/internal/helper/read_transfer_linux_test.go +118 -0
- package/templates/native-go/backend/internal/helper/read_transfer_test.go +177 -0
- package/templates/native-go/backend/internal/helper/readonly.go +105 -0
- package/templates/native-go/backend/internal/helper/readonly_admission.go +85 -0
- package/templates/native-go/backend/internal/helper/readonly_cohort_linux_test.go +253 -0
- package/templates/native-go/backend/internal/helper/readonly_linux_test.go +378 -0
- package/templates/native-go/backend/internal/helper/readonly_mount_linux.go +65 -0
- package/templates/native-go/backend/internal/helper/readonly_mount_proxy_linux.go +113 -0
- package/templates/native-go/backend/internal/helper/readonly_operations_linux.go +168 -0
- package/templates/native-go/backend/internal/helper/readonly_resolver_linux.go +241 -0
- package/templates/native-go/backend/internal/helper/readonly_test.go +40 -0
- package/templates/native-go/backend/internal/helper/relaxed_identity.go +252 -0
- package/templates/native-go/backend/internal/helper/relaxed_identity_contract.go +105 -0
- package/templates/native-go/backend/internal/helper/relaxed_identity_test.go +406 -0
- package/templates/native-go/backend/internal/helper/relaxed_invalidation.go +200 -0
- package/templates/native-go/backend/internal/helper/repair.go +132 -0
- package/templates/native-go/backend/internal/helper/repair_test.go +271 -0
- package/templates/native-go/backend/internal/helper/s1r_actor_acl_linux_test.go +303 -0
- package/templates/native-go/backend/internal/helper/s1r_actor_fixture_linux_test.go +184 -0
- package/templates/native-go/backend/internal/helper/s1r_actor_races_linux_test.go +231 -0
- package/templates/native-go/backend/internal/helper/s1r_fixture_contract_linux_test.go +18 -0
- package/templates/native-go/backend/internal/helper/server_linux.go +44 -3
- package/templates/native-go/backend/internal/helper/status.go +74 -11
- package/templates/native-go/backend/internal/helper/status_test.go +83 -0
- package/templates/native-go/backend/internal/helper/supervision.go +28 -5
- package/templates/native-go/backend/internal/helper/supervisor_frame.go +76 -0
- package/templates/native-go/backend/internal/helper/supervisor_frame_linux_test.go +69 -0
- package/templates/native-go/backend/internal/helper/supervisor_frame_test.go +107 -0
- package/templates/native-go/backend/internal/helper/supervisor_linux.go +187 -16
- package/templates/native-go/backend/internal/helper/supervisor_linux_test.go +618 -7
- package/templates/native-go/backend/internal/helper/supervisor_socket_eof_test.go +74 -0
- package/templates/native-go/backend/internal/helper/supervisor_socket_test.go +45 -0
- package/templates/native-go/backend/internal/helper/testdata/protocol2/create.json +23 -0
- package/templates/native-go/backend/internal/helper/testdata/protocol2/frames.json +67 -0
- package/templates/native-go/backend/internal/helper/testdata/protocol2/grant-store.json +52 -0
- package/templates/native-go/backend/internal/helper/testdata/protocol2/intent.json +20 -0
- package/templates/native-go/backend/internal/helper/testdata/protocol2/list.json +20 -0
- package/templates/native-go/backend/internal/helper/testdata/protocol2/publish.json +20 -0
- package/templates/native-go/backend/internal/helper/testdata/protocol2/read.json +22 -0
- package/templates/native-go/backend/internal/helper/testdata/protocol2/stat.json +22 -0
- package/templates/native-go/backend/internal/helper/testdata/protocol2/write-stream.json +22 -0
- package/templates/native-go/backend/internal/helper/unit_connection.go +75 -0
- package/templates/native-go/backend/internal/helper/unit_connection_linux_test.go +135 -0
- package/templates/native-go/backend/internal/helper/unit_connection_test.go +133 -0
- package/templates/native-go/backend/internal/helper/unit_frame_test.go +32 -0
- package/templates/native-go/backend/internal/helper/unit_linux.go +364 -0
- package/templates/native-go/backend/internal/helper/unit_linux_test.go +46 -0
- package/templates/native-go/backend/internal/helper/unit_mechanisms_linux_test.go +217 -0
- package/templates/native-go/backend/internal/helper/unit_padding_linux_test.go +178 -0
- package/templates/native-go/backend/internal/helper/unit_query_linux.go +111 -0
- package/templates/native-go/backend/internal/helper/unit_reload_linux_test.go +372 -0
- package/templates/native-go/backend/internal/helper/unit_reload_sequence_linux_test.go +232 -0
- package/templates/native-go/backend/internal/helper/write.go +77 -0
- package/templates/native-go/backend/internal/helper/write_admission.go +260 -0
- package/templates/native-go/backend/internal/helper/write_admission_test.go +135 -0
- package/templates/native-go/backend/internal/helper/write_cohort_linux_test.go +218 -0
- package/templates/native-go/backend/internal/helper/write_files_linux.go +202 -0
- package/templates/native-go/backend/internal/helper/write_files_linux_test.go +199 -0
- package/templates/native-go/backend/internal/helper/write_intent_linux.go +116 -0
- package/templates/native-go/backend/internal/helper/write_intent_linux_test.go +74 -0
- package/templates/native-go/backend/internal/helper/write_operation_linux.go +245 -0
- package/templates/native-go/backend/internal/helper/write_test.go +53 -0
- package/templates/native-go/ui/app.js +8 -1
- package/templates/native-go-better-auth/node/build.mjs +2 -0
- package/templates/native-go-vue/README.md +115 -1
- package/templates/native-go-vue/frontend/DESIGN.md +1 -1
- package/templates/native-go-vue/frontend/package-lock.json +132 -229
- package/templates/native-go-vue/frontend/package.json +1 -1
- package/templates/native-go-vue/frontend/src/App.vue +33 -6
- package/templates/native-go-vue/frontend/src/context.ts +41 -2
- package/templates/native-go-vue/frontend/src/main.ts +4 -1
- package/templates/native-go-vue/frontend/src/nas/NasGrantSettings.vue +74 -0
- package/templates/native-go-vue/frontend/src/nas/NasPathPicker.vue +106 -0
- package/templates/native-go-vue/frontend/src/nas/NasUnavailable.vue +20 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/de.json +74 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/en.json +74 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/es.json +74 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/fr.json +74 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/it.json +74 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/ja.json +74 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/ko.json +74 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/zh-CN.json +74 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/zh-TW.json +74 -0
- package/templates/native-go-vue/frontend/src/nas/i18n.ts +38 -0
- package/templates/native-go-vue/frontend/src/nas/mock-provider.ts +119 -0
- package/templates/native-go-vue/frontend/src/nas/provider.ts +59 -0
- package/templates/native-go-vue/frontend/src/nas/use-request.ts +27 -0
- package/templates/native-go-vue/frontend/src/style.css +17 -0
- package/templates/native-go-vue/frontend/test/apps.test.ts +44 -2
- package/templates/native-go-vue/frontend/test/nas-provider.test.ts +81 -0
- package/templates/native-go-vue/frontend/test/nas-request.test.ts +21 -0
- package/templates/native-go-vue/frontend/test/nas-ui.test.ts +261 -0
- package/templates/native-go-vue/frontend/tsconfig.json +1 -1
- package/templates/native-go-vue/frontend/vite.config.ts +6 -4
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
package main
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"context"
|
|
5
|
+
"encoding/json"
|
|
6
|
+
"os"
|
|
7
|
+
"os/exec"
|
|
8
|
+
"os/user"
|
|
9
|
+
"path/filepath"
|
|
10
|
+
"runtime"
|
|
11
|
+
"strings"
|
|
12
|
+
"syscall"
|
|
13
|
+
"testing"
|
|
14
|
+
"time"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
func fixture(t *testing.T, mode string) (string, string, string) {
|
|
18
|
+
t.Helper()
|
|
19
|
+
root, err := os.MkdirTemp("/tmp", "c1-runtime-")
|
|
20
|
+
if err != nil {
|
|
21
|
+
t.Fatal(err)
|
|
22
|
+
}
|
|
23
|
+
t.Cleanup(func() { os.RemoveAll(root) })
|
|
24
|
+
dest, data := filepath.Join(root, "target"), filepath.Join(root, "var")
|
|
25
|
+
if err := os.MkdirAll(filepath.Join(dest, "daemon/payload"), 0755); err != nil {
|
|
26
|
+
t.Fatal(err)
|
|
27
|
+
}
|
|
28
|
+
if err := os.Mkdir(data, 0700); err != nil {
|
|
29
|
+
t.Fatal(err)
|
|
30
|
+
}
|
|
31
|
+
control, child := os.Getenv("DAEMON_CONTROL_BIN"), os.Getenv("DAEMON_CHILD_BIN")
|
|
32
|
+
if control == "" {
|
|
33
|
+
control, child = filepath.Join(root, "control"), filepath.Join(root, "child")
|
|
34
|
+
for _, spec := range [][]string{{"build", "-o", control, "."}, {"build", "-o", child, "./testdata/child.go"}} {
|
|
35
|
+
if raw, err := exec.Command("go", spec...).CombinedOutput(); err != nil {
|
|
36
|
+
t.Fatalf("%v: %s", err, raw)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
raw, err := os.ReadFile(child)
|
|
41
|
+
if err != nil {
|
|
42
|
+
t.Fatal(err)
|
|
43
|
+
}
|
|
44
|
+
if err := os.WriteFile(filepath.Join(dest, "daemon/payload/app"), raw, 0755); err != nil {
|
|
45
|
+
t.Fatal(err)
|
|
46
|
+
}
|
|
47
|
+
cfg := config{Package: "DaemonFixture", Exec: "app", Args: []string{"${SYNOPKG_PKGVAR}/a space", "$(touch BAD)'", "${SYNOPKG_PKGDEST}"}, Env: map[string]string{"APP_MODE": mode}, Timeouts: deadlines{Start: 2, Stop: 2, Status: 1}}
|
|
48
|
+
if os.Geteuid() == 0 {
|
|
49
|
+
cfg.Package = "nobody"
|
|
50
|
+
} else {
|
|
51
|
+
u, err := user.Current()
|
|
52
|
+
if err != nil {
|
|
53
|
+
t.Fatal(err)
|
|
54
|
+
}
|
|
55
|
+
cfg.Package = u.Username
|
|
56
|
+
}
|
|
57
|
+
raw, _ = json.Marshal(cfg)
|
|
58
|
+
if err := os.WriteFile(filepath.Join(dest, "daemon/config.json"), raw, 0644); err != nil {
|
|
59
|
+
t.Fatal(err)
|
|
60
|
+
}
|
|
61
|
+
if os.Geteuid() == 0 {
|
|
62
|
+
// Only inside the disposable root VM: run the shipped manager as nobody.
|
|
63
|
+
if runtime.GOOS != "linux" {
|
|
64
|
+
t.Fatal("root fixture requires Linux VM")
|
|
65
|
+
}
|
|
66
|
+
filepath.Walk(root, func(path string, _ os.FileInfo, err error) error {
|
|
67
|
+
if err == nil {
|
|
68
|
+
return os.Chown(path, 65534, 65534)
|
|
69
|
+
}
|
|
70
|
+
return err
|
|
71
|
+
})
|
|
72
|
+
os.Chmod(root, 0755)
|
|
73
|
+
}
|
|
74
|
+
t.Cleanup(func() { runControl(control, "stop", dest, data) })
|
|
75
|
+
return control, dest, data
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
func runControl(control, action, dest, data string) (int, string) {
|
|
79
|
+
ctx, cancel := context.WithTimeout(context.Background(), 8*time.Second)
|
|
80
|
+
defer cancel()
|
|
81
|
+
cmd := exec.CommandContext(ctx, control, action, dest, data)
|
|
82
|
+
cmd.Env = append(os.Environ(), "UNLISTED_SECRET=must-not-leak", "LD_PRELOAD=must-not-leak")
|
|
83
|
+
dropFixtureUser(cmd)
|
|
84
|
+
raw, err := cmd.CombinedOutput()
|
|
85
|
+
if err == nil {
|
|
86
|
+
return 0, string(raw)
|
|
87
|
+
}
|
|
88
|
+
if e, ok := err.(*exec.ExitError); ok {
|
|
89
|
+
return e.ExitCode(), string(raw)
|
|
90
|
+
}
|
|
91
|
+
return -1, err.Error()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
func TestDaemonLifecycle(t *testing.T) {
|
|
95
|
+
control, dest, data := fixture(t, "normal")
|
|
96
|
+
for _, step := range []struct {
|
|
97
|
+
action string
|
|
98
|
+
want int
|
|
99
|
+
}{{"status", 3}, {"stop", 0}, {"start", 0}, {"status", 0}, {"start", 0}, {"restart", 0}, {"stop", 0}, {"stop", 0}, {"status", 3}, {"unknown", 1}} {
|
|
100
|
+
if rc, out := runControl(control, step.action, dest, data); rc != step.want {
|
|
101
|
+
t.Fatalf("%s rc=%d want=%d: %s", step.action, rc, step.want, out)
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
raw, err := os.ReadFile(filepath.Join(data, "daemon/daemon.log"))
|
|
105
|
+
if err != nil {
|
|
106
|
+
t.Fatal(err)
|
|
107
|
+
}
|
|
108
|
+
if strings.Count(string(raw), `"uid":`) != 2 {
|
|
109
|
+
t.Fatalf("duplicate start spawned another child: %s", raw)
|
|
110
|
+
}
|
|
111
|
+
if strings.Contains(string(raw), "must-not-leak") {
|
|
112
|
+
t.Fatalf("ambient environment leaked: %s", raw)
|
|
113
|
+
}
|
|
114
|
+
if !strings.Contains(string(raw), "$(touch BAD)'") || !strings.Contains(string(raw), "/a space") {
|
|
115
|
+
t.Fatalf("argv changed: %s", raw)
|
|
116
|
+
}
|
|
117
|
+
stat, _ := os.Stat(filepath.Join(data, "daemon/daemon.log"))
|
|
118
|
+
if stat.Mode().Perm() != 0600 {
|
|
119
|
+
t.Fatal("log permissions")
|
|
120
|
+
}
|
|
121
|
+
stat, err = os.Stat(filepath.Join(data, "daemon/tmp"))
|
|
122
|
+
if err != nil || stat.Mode().Perm() != 0700 {
|
|
123
|
+
t.Fatal("private TMPDIR missing", err)
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
func TestImmediateExitAndEscalation(t *testing.T) {
|
|
128
|
+
for _, mode := range []string{"exit", "ignore"} {
|
|
129
|
+
t.Run(mode, func(t *testing.T) {
|
|
130
|
+
control, dest, data := fixture(t, mode)
|
|
131
|
+
rc, out := runControl(control, "start", dest, data)
|
|
132
|
+
if mode == "exit" {
|
|
133
|
+
if rc != 1 {
|
|
134
|
+
t.Fatalf("false readiness: %d %s", rc, out)
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
if rc != 0 {
|
|
138
|
+
t.Fatalf("start: %d %s", rc, out)
|
|
139
|
+
}
|
|
140
|
+
if rc, out = runControl(control, "stop", dest, data); rc != 0 {
|
|
141
|
+
t.Fatalf("escalation: %d %s", rc, out)
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if rc, out = runControl(control, "status", dest, data); rc != 3 {
|
|
145
|
+
t.Fatalf("residue: %d %s", rc, out)
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
func TestForeignStateAndRootRefusal(t *testing.T) {
|
|
152
|
+
control, dest, data := fixture(t, "normal")
|
|
153
|
+
if os.Geteuid() == 0 {
|
|
154
|
+
raw, err := exec.Command(control, "start", dest, data).CombinedOutput()
|
|
155
|
+
if err == nil || !strings.Contains(string(raw), "package account") {
|
|
156
|
+
t.Fatalf("root accepted: %s %v", raw, err)
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
os.Mkdir(filepath.Join(data, "daemon"), 0700)
|
|
160
|
+
if os.Geteuid() == 0 {
|
|
161
|
+
os.Chown(filepath.Join(data, "daemon"), 65534, 65534)
|
|
162
|
+
}
|
|
163
|
+
os.Symlink(filepath.Join(data, "victim"), filepath.Join(data, "daemon/daemon.log"))
|
|
164
|
+
if rc, out := runControl(control, "start", dest, data); rc != 1 {
|
|
165
|
+
t.Fatalf("symlink accepted: %d %s", rc, out)
|
|
166
|
+
}
|
|
167
|
+
if _, err := os.Stat(filepath.Join(data, "victim")); !os.IsNotExist(err) {
|
|
168
|
+
t.Fatal("followed log symlink")
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
func TestUninstallCleanup(t *testing.T) {
|
|
173
|
+
for _, mode := range []string{"cleanup", "cleanup-fail", "cleanup-hang"} {
|
|
174
|
+
t.Run(mode, func(t *testing.T) {
|
|
175
|
+
control, dest, data := fixture(t, "normal")
|
|
176
|
+
path := filepath.Join(dest, "daemon/config.json")
|
|
177
|
+
raw, _ := os.ReadFile(path)
|
|
178
|
+
var cfg config
|
|
179
|
+
json.Unmarshal(raw, &cfg)
|
|
180
|
+
cfg.UninstallArgs = []string{mode, "${SYNOPKG_PKGVAR}"}
|
|
181
|
+
raw, _ = json.Marshal(cfg)
|
|
182
|
+
os.WriteFile(path, raw, 0644)
|
|
183
|
+
if rc, out := runControl(control, "start", dest, data); rc != 0 {
|
|
184
|
+
t.Fatalf("start: %d %s", rc, out)
|
|
185
|
+
}
|
|
186
|
+
want := 1
|
|
187
|
+
if mode == "cleanup" {
|
|
188
|
+
want = 0
|
|
189
|
+
}
|
|
190
|
+
if rc, out := runControl(control, "uninstall", dest, data); rc != want {
|
|
191
|
+
t.Fatalf("cleanup rc=%d want=%d: %s", rc, want, out)
|
|
192
|
+
}
|
|
193
|
+
if rc, out := runControl(control, "status", dest, data); rc != 3 {
|
|
194
|
+
t.Fatalf("cleanup must not restart daemon: %d %s", rc, out)
|
|
195
|
+
}
|
|
196
|
+
})
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
func TestPackageAccountIdentity(t *testing.T) {
|
|
201
|
+
control, dest, data := fixture(t, "normal")
|
|
202
|
+
path := filepath.Join(dest, "daemon/config.json")
|
|
203
|
+
raw, _ := os.ReadFile(path)
|
|
204
|
+
var cfg config
|
|
205
|
+
json.Unmarshal(raw, &cfg)
|
|
206
|
+
cfg.Package = "root"
|
|
207
|
+
raw, _ = json.Marshal(cfg)
|
|
208
|
+
os.WriteFile(path, raw, 0644)
|
|
209
|
+
rc, out := runControl(control, "start", dest, data)
|
|
210
|
+
if rc == 0 {
|
|
211
|
+
runControl(control, "stop", dest, data)
|
|
212
|
+
}
|
|
213
|
+
if rc != 1 {
|
|
214
|
+
t.Fatalf("other account accepted: %d %s", rc, out)
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
func TestFIFOInventoryCannotBlockStatus(t *testing.T) {
|
|
219
|
+
control, dest, data := fixture(t, "normal")
|
|
220
|
+
state := filepath.Join(data, "daemon")
|
|
221
|
+
os.Mkdir(state, 0700)
|
|
222
|
+
path := filepath.Join(state, "daemon.pid")
|
|
223
|
+
t.Cleanup(func() { os.Remove(path) })
|
|
224
|
+
if err := syscall.Mkfifo(path, 0600); err != nil {
|
|
225
|
+
t.Fatal(err)
|
|
226
|
+
}
|
|
227
|
+
if os.Geteuid() == 0 {
|
|
228
|
+
os.Chown(state, 65534, 65534)
|
|
229
|
+
os.Chown(path, 65534, 65534)
|
|
230
|
+
}
|
|
231
|
+
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
|
|
232
|
+
defer cancel()
|
|
233
|
+
cmd := exec.CommandContext(ctx, control, "status", dest, data)
|
|
234
|
+
dropFixtureUser(cmd)
|
|
235
|
+
raw, err := cmd.CombinedOutput()
|
|
236
|
+
if ctx.Err() != nil {
|
|
237
|
+
t.Fatal("status blocked on FIFO")
|
|
238
|
+
}
|
|
239
|
+
if e, ok := err.(*exec.ExitError); !ok || e.ExitCode() != 1 {
|
|
240
|
+
t.Fatalf("FIFO status: %s %v", raw, err)
|
|
241
|
+
}
|
|
242
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//go:build linux
|
|
2
|
+
|
|
3
|
+
package main
|
|
4
|
+
|
|
5
|
+
import (
|
|
6
|
+
"errors"
|
|
7
|
+
"net"
|
|
8
|
+
"os"
|
|
9
|
+
"strconv"
|
|
10
|
+
"syscall"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
func childAttributes() *syscall.SysProcAttr { return &syscall.SysProcAttr{Pdeathsig: syscall.SIGKILL} }
|
|
14
|
+
func processBirth(pid int) string {
|
|
15
|
+
raw, err := os.ReadFile("/proc/" + strconv.Itoa(pid) + "/stat")
|
|
16
|
+
if err != nil {
|
|
17
|
+
return ""
|
|
18
|
+
}
|
|
19
|
+
birth, _ := parseBirth(string(raw))
|
|
20
|
+
return birth
|
|
21
|
+
}
|
|
22
|
+
func recordedChildAlive(pid int, birth string) bool {
|
|
23
|
+
raw, err := os.ReadFile("/proc/" + strconv.Itoa(pid) + "/stat")
|
|
24
|
+
if os.IsNotExist(err) {
|
|
25
|
+
return false
|
|
26
|
+
}
|
|
27
|
+
if err != nil {
|
|
28
|
+
return true
|
|
29
|
+
}
|
|
30
|
+
actual, alive := parseBirth(string(raw))
|
|
31
|
+
if actual == "" {
|
|
32
|
+
return true
|
|
33
|
+
}
|
|
34
|
+
return alive && (birth == "" || actual == birth)
|
|
35
|
+
}
|
|
36
|
+
func checkPeer(conn *net.UnixConn, pid int) error {
|
|
37
|
+
fd, err := conn.SyscallConn()
|
|
38
|
+
if err != nil {
|
|
39
|
+
return err
|
|
40
|
+
}
|
|
41
|
+
var peer *syscall.Ucred
|
|
42
|
+
var getErr error
|
|
43
|
+
if err := fd.Control(func(raw uintptr) {
|
|
44
|
+
peer, getErr = syscall.GetsockoptUcred(int(raw), syscall.SOL_SOCKET, syscall.SO_PEERCRED)
|
|
45
|
+
}); err != nil {
|
|
46
|
+
return err
|
|
47
|
+
}
|
|
48
|
+
if getErr != nil {
|
|
49
|
+
return getErr
|
|
50
|
+
}
|
|
51
|
+
if peer.Uid != uint32(os.Geteuid()) || peer.Pid != int32(pid) {
|
|
52
|
+
return errors.New("foreign daemon supervisor")
|
|
53
|
+
}
|
|
54
|
+
return nil
|
|
55
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
//go:build linux
|
|
2
|
+
|
|
3
|
+
package main
|
|
4
|
+
|
|
5
|
+
import (
|
|
6
|
+
"encoding/json"
|
|
7
|
+
"os"
|
|
8
|
+
"os/exec"
|
|
9
|
+
"path/filepath"
|
|
10
|
+
"strconv"
|
|
11
|
+
"sync"
|
|
12
|
+
"syscall"
|
|
13
|
+
"testing"
|
|
14
|
+
"time"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
func waitDead(t *testing.T, pid int, birth string) {
|
|
18
|
+
t.Helper()
|
|
19
|
+
until := time.Now().Add(3 * time.Second)
|
|
20
|
+
for time.Now().Before(until) {
|
|
21
|
+
if !recordedChildAlive(pid, birth) {
|
|
22
|
+
return
|
|
23
|
+
}
|
|
24
|
+
time.Sleep(20 * time.Millisecond)
|
|
25
|
+
}
|
|
26
|
+
t.Fatalf("PID %d remained alive", pid)
|
|
27
|
+
}
|
|
28
|
+
func readFixtureRecord(t *testing.T, data string) record {
|
|
29
|
+
t.Helper()
|
|
30
|
+
raw, err := os.ReadFile(filepath.Join(data, "daemon/daemon.pid"))
|
|
31
|
+
if err != nil {
|
|
32
|
+
t.Fatal(err)
|
|
33
|
+
}
|
|
34
|
+
var r record
|
|
35
|
+
if err := json.Unmarshal(raw, &r); err != nil {
|
|
36
|
+
t.Fatal(err)
|
|
37
|
+
}
|
|
38
|
+
return r
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
func TestLinuxSupervisorDeathAndConcurrentStart(t *testing.T) {
|
|
42
|
+
control, dest, data := fixture(t, "normal")
|
|
43
|
+
var wg sync.WaitGroup
|
|
44
|
+
results := make(chan int, 6)
|
|
45
|
+
for i := 0; i < 6; i++ {
|
|
46
|
+
wg.Add(1)
|
|
47
|
+
go func() { defer wg.Done(); rc, _ := runControl(control, "start", dest, data); results <- rc }()
|
|
48
|
+
}
|
|
49
|
+
wg.Wait()
|
|
50
|
+
close(results)
|
|
51
|
+
for rc := range results {
|
|
52
|
+
if rc != 0 {
|
|
53
|
+
t.Fatalf("concurrent start: %d", rc)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
r := readFixtureRecord(t, data)
|
|
57
|
+
if err := syscall.Kill(r.Supervisor, syscall.SIGKILL); err != nil {
|
|
58
|
+
t.Fatal(err)
|
|
59
|
+
}
|
|
60
|
+
waitDead(t, r.Child, r.Birth)
|
|
61
|
+
if rc, out := runControl(control, "status", dest, data); rc != 1 {
|
|
62
|
+
t.Fatalf("lost-supervisor status: %d %s", rc, out)
|
|
63
|
+
}
|
|
64
|
+
if rc, out := runControl(control, "stop", dest, data); rc != 0 {
|
|
65
|
+
t.Fatalf("retire dead child: %d %s", rc, out)
|
|
66
|
+
}
|
|
67
|
+
if rc, out := runControl(control, "start", dest, data); rc != 0 {
|
|
68
|
+
t.Fatalf("restart after death: %d %s", rc, out)
|
|
69
|
+
}
|
|
70
|
+
if r2 := readFixtureRecord(t, data); r2.Child == r.Child {
|
|
71
|
+
t.Fatal("did not start fresh child")
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
func TestLinuxInventoryNeverSignalsForeignPID(t *testing.T) {
|
|
76
|
+
control, dest, data := fixture(t, "normal")
|
|
77
|
+
if rc, out := runControl(control, "start", dest, data); rc != 0 {
|
|
78
|
+
t.Fatalf("start: %d %s", rc, out)
|
|
79
|
+
}
|
|
80
|
+
r := readFixtureRecord(t, data)
|
|
81
|
+
if rc, out := runControl(control, "stop", dest, data); rc != 0 {
|
|
82
|
+
t.Fatalf("stop: %d %s", rc, out)
|
|
83
|
+
}
|
|
84
|
+
foreign := exec.Command("/bin/sleep", "30")
|
|
85
|
+
if err := foreign.Start(); err != nil {
|
|
86
|
+
t.Fatal(err)
|
|
87
|
+
}
|
|
88
|
+
defer func() { foreign.Process.Kill(); foreign.Wait() }()
|
|
89
|
+
r.Supervisor = foreign.Process.Pid
|
|
90
|
+
r.Child = foreign.Process.Pid
|
|
91
|
+
r.Birth = processBirth(r.Child)
|
|
92
|
+
raw, _ := json.Marshal(r)
|
|
93
|
+
path := filepath.Join(data, "daemon/daemon.pid")
|
|
94
|
+
if err := os.WriteFile(path, raw, 0600); err != nil {
|
|
95
|
+
t.Fatal(err)
|
|
96
|
+
}
|
|
97
|
+
if os.Geteuid() == 0 {
|
|
98
|
+
os.Chown(path, 65534, 65534)
|
|
99
|
+
}
|
|
100
|
+
for _, action := range []string{"stop", "start", "restart"} {
|
|
101
|
+
if rc, out := runControl(control, action, dest, data); rc != 1 {
|
|
102
|
+
t.Fatalf("%s accepted live unwitnessed PID: %d %s", action, rc, out)
|
|
103
|
+
}
|
|
104
|
+
if !recordedChildAlive(r.Child, r.Birth) {
|
|
105
|
+
t.Fatal("signalled inventory PID")
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// A reused numeric PID with a different birth can be retired without killing it.
|
|
109
|
+
r.Birth = "1"
|
|
110
|
+
raw, _ = json.Marshal(r)
|
|
111
|
+
os.WriteFile(path, raw, 0600)
|
|
112
|
+
if rc, out := runControl(control, "stop", dest, data); rc != 0 {
|
|
113
|
+
t.Fatalf("retire reused PID: %d %s", rc, out)
|
|
114
|
+
}
|
|
115
|
+
if !recordedChildAlive(foreign.Process.Pid, processBirth(foreign.Process.Pid)) {
|
|
116
|
+
t.Fatal("killed reused PID")
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
func TestLinuxChildSelfExitAndDeadlines(t *testing.T) {
|
|
121
|
+
control, dest, data := fixture(t, "normal")
|
|
122
|
+
if rc, out := runControl(control, "start", dest, data); rc != 0 {
|
|
123
|
+
t.Fatalf("start: %d %s", rc, out)
|
|
124
|
+
}
|
|
125
|
+
r := readFixtureRecord(t, data)
|
|
126
|
+
if err := syscall.Kill(r.Child, syscall.SIGTERM); err != nil {
|
|
127
|
+
t.Fatal(err)
|
|
128
|
+
}
|
|
129
|
+
waitDead(t, r.Child, r.Birth)
|
|
130
|
+
time.Sleep(100 * time.Millisecond)
|
|
131
|
+
if rc, out := runControl(control, "status", dest, data); rc != 1 {
|
|
132
|
+
t.Fatalf("self exit: %d %s", rc, out)
|
|
133
|
+
}
|
|
134
|
+
control, dest, data = fixture(t, "ignore")
|
|
135
|
+
if rc, out := runControl(control, "start", dest, data); rc != 0 {
|
|
136
|
+
t.Fatalf("start: %d %s", rc, out)
|
|
137
|
+
}
|
|
138
|
+
r = readFixtureRecord(t, data)
|
|
139
|
+
began := time.Now()
|
|
140
|
+
if rc, out := runControl(control, "stop", dest, data); rc != 0 {
|
|
141
|
+
t.Fatalf("stop: %d %s", rc, out)
|
|
142
|
+
}
|
|
143
|
+
if elapsed := time.Since(began); elapsed < time.Second || elapsed > 3*time.Second {
|
|
144
|
+
t.Fatalf("stop deadline: %s", elapsed)
|
|
145
|
+
}
|
|
146
|
+
waitDead(t, r.Child, r.Birth)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
func TestParseLinuxProcBirth(t *testing.T) {
|
|
150
|
+
fields := []string{"S", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "1234"}
|
|
151
|
+
raw := "42 (a ) tricky name)"
|
|
152
|
+
for _, f := range fields {
|
|
153
|
+
raw += " " + f
|
|
154
|
+
}
|
|
155
|
+
if birth, alive := parseBirth(raw); birth != "1234" || !alive {
|
|
156
|
+
t.Fatal(birth, alive)
|
|
157
|
+
}
|
|
158
|
+
if recordedChildAlive(os.Getpid(), strconv.Itoa(os.Getpid())) {
|
|
159
|
+
t.Fatal("different process birth matched")
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//go:build !linux
|
|
2
|
+
|
|
3
|
+
package main
|
|
4
|
+
|
|
5
|
+
import (
|
|
6
|
+
"net"
|
|
7
|
+
"syscall"
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
// Host-only tests exercise lifecycle/quoting; published controllers target Linux.
|
|
11
|
+
func childAttributes() *syscall.SysProcAttr { return &syscall.SysProcAttr{} }
|
|
12
|
+
func processBirth(int) string { return "host-fixture" }
|
|
13
|
+
func recordedChildAlive(pid int, _ string) bool { return syscall.Kill(pid, 0) == nil }
|
|
14
|
+
func checkPeer(*net.UnixConn, int) error { return nil }
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Linux/host fixture: a foreground process; never installed on a NAS.
|
|
2
|
+
package main
|
|
3
|
+
|
|
4
|
+
import (
|
|
5
|
+
"encoding/json"
|
|
6
|
+
"os"
|
|
7
|
+
"os/signal"
|
|
8
|
+
"syscall"
|
|
9
|
+
"time"
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
func main() {
|
|
13
|
+
if len(os.Args) > 1 {
|
|
14
|
+
switch os.Args[1] {
|
|
15
|
+
case "cleanup":
|
|
16
|
+
os.Exit(0)
|
|
17
|
+
case "cleanup-fail":
|
|
18
|
+
os.Exit(2)
|
|
19
|
+
case "cleanup-hang":
|
|
20
|
+
signal.Ignore(syscall.SIGTERM, syscall.SIGINT)
|
|
21
|
+
for {
|
|
22
|
+
time.Sleep(time.Second)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if os.Getenv("APP_MODE") == "exit" {
|
|
27
|
+
os.Exit(2)
|
|
28
|
+
}
|
|
29
|
+
raw, _ := json.Marshal(map[string]any{"uid": os.Geteuid(), "args": os.Args[1:], "env": os.Environ()})
|
|
30
|
+
fmtOutput := append(raw, '\n')
|
|
31
|
+
os.Stdout.Write(fmtOutput)
|
|
32
|
+
if os.Getenv("APP_MODE") == "ignore" {
|
|
33
|
+
signal.Ignore(syscall.SIGTERM, syscall.SIGINT)
|
|
34
|
+
for {
|
|
35
|
+
time.Sleep(time.Second)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
c := make(chan os.Signal, 1)
|
|
39
|
+
signal.Notify(c, syscall.SIGTERM, syscall.SIGINT)
|
|
40
|
+
<-c
|
|
41
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Copyright 2009 The Go Authors.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are
|
|
5
|
+
met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
* Redistributions in binary form must reproduce the above
|
|
10
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
11
|
+
in the documentation and/or other materials provided with the
|
|
12
|
+
distribution.
|
|
13
|
+
* Neither the name of Google LLC nor the names of its
|
|
14
|
+
contributors may be used to endorse or promote products derived from
|
|
15
|
+
this software without specific prior written permission.
|
|
16
|
+
|
|
17
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
18
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
19
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
20
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
21
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
22
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
23
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
24
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
25
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Additional IP Rights Grant (Patents)
|
|
2
|
+
|
|
3
|
+
"This implementation" means the copyrightable works distributed by
|
|
4
|
+
Google as part of the Go project.
|
|
5
|
+
|
|
6
|
+
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
|
7
|
+
no-charge, royalty-free, irrevocable (except as stated in this section)
|
|
8
|
+
patent license to make, have made, use, offer to sell, sell, import,
|
|
9
|
+
transfer and otherwise run, modify and propagate the contents of this
|
|
10
|
+
implementation of Go, where such license applies only to those patent
|
|
11
|
+
claims, both currently owned or controlled by Google and acquired in
|
|
12
|
+
the future, licensable by Google that are necessarily infringed by this
|
|
13
|
+
implementation of Go. This grant does not include claims that would be
|
|
14
|
+
infringed only as a consequence of further modification of this
|
|
15
|
+
implementation. If you or your agent or exclusive licensee institute or
|
|
16
|
+
order or agree to the institution of patent litigation against any
|
|
17
|
+
entity (including a cross-claim or counterclaim in a lawsuit) alleging
|
|
18
|
+
that this implementation of Go or any code incorporated within this
|
|
19
|
+
implementation of Go constitutes direct or contributory patent
|
|
20
|
+
infringement, or inducement of patent infringement, then any patent
|
|
21
|
+
rights granted to you under this License for this implementation of Go
|
|
22
|
+
shall terminate as of the date such litigation is filed.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 synopkgland
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@better-auth/utils@0.4.2": {
|
|
3
|
+
"integrity": "sha512-AUxrvu+HaaODsUyzDxFgwd/8RZ1yZaYo42LXKSrU2oGgR38pS1ij8nqQKNgtTWoYGpNevNXtCfgTy6loHveW9A==",
|
|
4
|
+
"file": "utils-0.4.2-LICENSE",
|
|
5
|
+
"source": "https://github.com/better-auth/utils/blob/ef522888b7b2ff77ca13f0afb476dfae8f297862/LICENSE",
|
|
6
|
+
"provenance": "Release manifests declare MIT but omit license text; retained upstream project license added in commit ef522888b7b2ff77ca13f0afb476dfae8f297862"
|
|
7
|
+
},
|
|
8
|
+
"@better-auth/utils@0.5.0": {
|
|
9
|
+
"integrity": "sha512-BL8W4EfIZFwlu0r54m3v1ztjDhu6dDe/amLTm0xybmbZaNgYUqhD3SjpAsnq0q8YD6/ki4iwIgxJNLP/N3TxiA==",
|
|
10
|
+
"file": "utils-0.5.0-LICENSE",
|
|
11
|
+
"source": "https://github.com/better-auth/utils/blob/ef522888b7b2ff77ca13f0afb476dfae8f297862/LICENSE",
|
|
12
|
+
"provenance": "Release manifests declare MIT but omit license text; retained upstream project license added in commit ef522888b7b2ff77ca13f0afb476dfae8f297862"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 - present, Bereket Engida
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 - present, Bereket Engida
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|