diff --git a/Cargo.lock b/Cargo.lock index cb77c22..73c107c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1987,6 +1987,92 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "spitzli-hosting" +version = "0.1.0" +dependencies = [ + "ed25519-dalek", + "hex", + "serde", + "serde_json", + "spitzli-plugin-kit", + "spitzli-plugin-protocol", + "spitzli-plugin-runtime", + "tokio", + "tokio-postgres", + "tonic", + "url", + "uuid", +] + +[[package]] +name = "spitzli-plugin-kit" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "aes-gcm", + "getrandom 0.2.17", + "hex", + "rustix", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "spitzli-plugin-protocol", + "spitzli-plugin-runtime", + "tokio", + "tokio-postgres", + "tokio-postgres-rustls", + "tonic", + "url", + "uuid", +] + +[[package]] +name = "spitzli-plugin-protocol" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "base64", + "chrono", + "ed25519-dalek", + "jsonschema", + "node-semver", + "regex", + "serde", + "serde_json", + "sha2 0.10.9", + "url", + "uuid", +] + +[[package]] +name = "spitzli-plugin-runtime" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "ed25519-dalek", + "hex", + "hyper-util", + "prost", + "rustix", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "sha2 0.10.9", + "spitzli-plugin-protocol", + "tokio", + "tokio-rustls", + "tokio-stream", + "tonic", + "tonic-prost", + "tonic-prost-build", + "tower", + "url", + "x509-parser", +] + [[package]] name = "spki" version = "0.7.3" @@ -2674,92 +2760,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webdock-hosting" -version = "0.1.0" -dependencies = [ - "ed25519-dalek", - "hex", - "serde", - "serde_json", - "tokio", - "tokio-postgres", - "tonic", - "url", - "uuid", - "webdock-plugin-kit", - "webdock-plugin-protocol", - "webdock-plugin-runtime", -] - -[[package]] -name = "webdock-plugin-kit" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "aes-gcm", - "getrandom 0.2.17", - "hex", - "rustix", - "rustls", - "rustls-pemfile", - "serde", - "serde_json", - "tokio", - "tokio-postgres", - "tokio-postgres-rustls", - "tonic", - "url", - "uuid", - "webdock-plugin-protocol", - "webdock-plugin-runtime", -] - -[[package]] -name = "webdock-plugin-protocol" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "base64", - "chrono", - "ed25519-dalek", - "jsonschema", - "node-semver", - "regex", - "serde", - "serde_json", - "sha2 0.10.9", - "url", - "uuid", -] - -[[package]] -name = "webdock-plugin-runtime" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "ed25519-dalek", - "hex", - "hyper-util", - "prost", - "rustix", - "rustls", - "rustls-pemfile", - "serde", - "serde_json", - "sha2 0.10.9", - "tokio", - "tokio-rustls", - "tokio-stream", - "tonic", - "tonic-prost", - "tonic-prost-build", - "tower", - "url", - "webdock-plugin-protocol", - "x509-parser", -] - [[package]] name = "whoami" version = "2.1.3" diff --git a/Cargo.toml b/Cargo.toml index 74a4e8f..a906a94 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ ["package"] -"name" = "webdock-hosting" +"name" = "spitzli-hosting" "version" = "0.1.0" "edition" = "2024" "rust-version" = "1.94" @@ -22,20 +22,20 @@ "version" = "1" "features" = ["macros", "rt-multi-thread", "signal", "time"] -["dependencies"."webdock-plugin-protocol"] +["dependencies"."spitzli-plugin-protocol"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-plugin-protocol" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-plugin-protocol" -["dependencies"."webdock-plugin-runtime"] +["dependencies"."spitzli-plugin-runtime"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-plugin-runtime" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-plugin-runtime" -["dependencies"."webdock-plugin-kit"] +["dependencies"."spitzli-plugin-kit"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-plugin-kit" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-plugin-kit" ["dependencies"."tonic"] "version" = "0.14.6" diff --git a/Dockerfile b/Dockerfile index d7cd1ea..fa31b54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,15 +6,15 @@ WORKDIR /src COPY . . # Shared only among reviewed Spitzli platform sources; never customer build code. FROM source AS check -RUN --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-registry,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-git,target=/usr/local/cargo/git,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-target,target=/src/target,sharing=locked cargo check --locked --all-targets --jobs 3 && cargo test --locked --all-targets --jobs 3 +RUN --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-registry,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-git,target=/usr/local/cargo/git,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-target,target=/src/target,sharing=locked cargo check --locked --all-targets --jobs 3 && cargo test --locked --all-targets --jobs 3 FROM source AS build -RUN --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-registry,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-git,target=/usr/local/cargo/git,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-target,target=/src/target,sharing=locked cargo build --locked --release --bins --jobs 3 && mkdir /out && install -m 0555 /src/target/release/webdock-hosting /out/webdock-hosting +RUN --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-registry,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-git,target=/usr/local/cargo/git,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-target,target=/src/target,sharing=locked cargo build --locked --release --bins --jobs 3 && mkdir /out && install -m 0555 /src/target/release/spitzli-hosting /out/spitzli-hosting FROM docker.io/library/debian:trixie-slim@sha256:f6b08b09a05725f9431502d3b5714f5c4576e82c1a84fa1debe0c24a7e0c3ec4 COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY LICENSE COMMERCIAL-LICENSING.md NOTICE /usr/share/licenses/spitzli-cloud/ -COPY --from=build --chown=65532:65532 --chmod=0555 /out/webdock-hosting /usr/local/bin/webdock-hosting +COPY --from=build --chown=65532:65532 --chmod=0555 /out/spitzli-hosting /usr/local/bin/spitzli-hosting ENV HOME=/tmp USER 65532:65532 -ENTRYPOINT ["/usr/local/bin/webdock-hosting"] +ENTRYPOINT ["/usr/local/bin/spitzli-hosting"] diff --git a/NAMESPACE-MIGRATION.json b/NAMESPACE-MIGRATION.json new file mode 100644 index 0000000..d4278b0 --- /dev/null +++ b/NAMESPACE-MIGRATION.json @@ -0,0 +1,55 @@ +{ + "baseSource": "8a58e917069ed1ce7c48c99b30d70c5587db564f", + "date": "2026-11-12", + "formatVersion": 1, + "licenseUnchanged": true, + "originalSourceSnapshotRetained": true, + "package": "spitzli-hosting", + "preservedBindingFilesSHA256": { + "COMMERCIAL-LICENSING.md": "5b8832f5014f16e2cf4f7ee295de32760eed20981495d184bd9f1517be256a09", + "EXPORT-PROVENANCE.json": "3efb6ef2d6ed7f974e6ca1181df124a7b58ee448051b58c68ec2234744e685a1", + "LICENSE": "0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0", + "manifest.json": "6d1a78ec4ea33d26edd2b4903d9917282aa0f61a8478aeb74b5cf04da0f62229" + }, + "qualifiedChangedSourceSHA256": { + "Cargo.lock": "69731a0ee7291e59483937abfa9cb9d7f82aeb1d536e08d8ce3ab8afeb01d455", + "Cargo.toml": "9380151c26709cbdaa945b5a6204bb86e9c6d76fdb3c908bd0a3851ebab5cc4e", + "Dockerfile": "78741ceee503ea3e747f531c4e04b89f14e98683c064e2459ba4d53996345b14", + "NOTICE": "4949ccd63735c148d2fd1f1423772d11938087ba0bdbcf4aad81c576bcfa09b8", + "README.md": "ead3fc5de320a229d925c2c17bd63bdbdc735acd2d97916e47a706a3c9bbbdc6", + "scripts/plugin-release/release.mjs": "30462a348f238bc78dab840688199574ad4fc5e9b039310306d6210f4c433890", + "src/lib.rs": "9e42b1c43a0649c4e43fbc7b1add0fbfe9613182bd239da7ccfa3be538afa894", + "src/main.rs": "9d9757c0335e0ee85c462669f50ce9b37c23146b3aead364413256bcd79f6292", + "src/placement.rs": "4432477fa4df55c7107da2f9f2706ba85fc5f439c59680a1c79fb79ec694dd1e", + "src/store.rs": "864310bbee3d21619c8836413ab3987824f151cf2a41290aab9ac20a9e301dbb", + "standalone.json": "a5b4adfa5df4e1e98be939216a8cada4bd95e7d1ce8703d6cac8943b31157156", + "tests/apps.rs": "cea88119d2762105e2e29ef739d5ed66f2503abd3b9997b1686b2f1649b14707", + "tools/manifest-validator/Cargo.lock": "ae2cb28761abf9ce99c9f5c4df246d47d61955a9919907fd222f511d13d84ba6", + "tools/manifest-validator/Cargo.toml": "81aa8724804a7f701f7b312c8851937369409d029071d2034dbd6f535b86df6a", + "tools/manifest-validator/src/main.rs": "bb5f5ab38c63e2c28aa64a329696e923aa747e62de2d058e2de734ada06e72b4", + "ui/index.tsx": "64e25d3d5bf9387e3248a485912c37be5d3a9119c2bd44d3e798af25d1c19144" + }, + "runtimeArtifactsReplaced": false, + "scope": "Rust package/import and binary namespace, host UI import namespace, paired test environment variables and exact SDK pin", + "sdkGit": "https://github.com/spitzli/cloud-plugin-sdk", + "sdkRevision": "8019f3df67dba3fed3083f22635e4725028c1b5e", + "sourceChecks": { + "allRegistryLockfilesPreserved": [ + "Cargo.lock", + "tools/manifest-validator/Cargo.lock" + ], + "format": true, + "releaseContract": true, + "rustLiteralFilesChecked": 6, + "strictClippy": true, + "testsIgnored": 2, + "testsPassed": 4, + "ui": { + "component": "hosting", + "hostConsoleSource": "a9fa78a6264a64a5e3e9405a49d94da189f7638b", + "typecheckPassed": true + } + }, + "version": "0.1.0", + "wireStoredCryptographicAndExternalResourceBindings": "retained for coordinated migration" +} diff --git a/NOTICE b/NOTICE index 8f8f4fb..69c129f 100644 --- a/NOTICE +++ b/NOTICE @@ -1,7 +1,7 @@ -Webdock +Spitzli Cloud Copyright (c) 2026 Spitzli Development and contributors. -Original Webdock code is licensed under AGPL-3.0-only unless separately noted. +Original Spitzli Cloud code is licensed under AGPL-3.0-only unless separately noted. Alternative written licenses may be available from the relevant rights holder. See LICENSE and COMMERCIAL-LICENSING.md. diff --git a/README.md b/README.md index 6a5ab9b..ea1a864 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,6 @@ Placement goes through `plugin.workloads`: each app is one unit of a Secret (its ```sh cargo test --manifest-path Cargo.toml # Disposable loopback PostgreSQL for plugin storage; Core and the cluster are stood in for: -WEBDOCK_HOSTING_PLUGIN_TEST_ADMIN_URL=postgres://… \ +SPITZLI_HOSTING_PLUGIN_TEST_ADMIN_URL=postgres://… \ cargo test --manifest-path Cargo.toml -- --include-ignored ``` diff --git a/scripts/plugin-release/release.mjs b/scripts/plugin-release/release.mjs index 11b4590..4f227e7 100644 --- a/scripts/plugin-release/release.mjs +++ b/scripts/plugin-release/release.mjs @@ -78,7 +78,7 @@ export function validateDockerfile(raw) { export function validateSDKDependencies(dependencies) { const sources = new Set(); - for (const dependency of dependencies.filter(dep => dep.name.startsWith('webdock-'))) { + for (const dependency of dependencies.filter(dep => dep.name.startsWith('spitzli-') || dep.name.startsWith('webdock-'))) { requireValue(typeof dependency.source === 'string' && /\?rev=[a-f0-9]{40}(?:#|$)/.test(dependency.source), 'Every SDK crate must use a reviewed Git revision'); sources.add(dependency.source.split('#')[0]); } diff --git a/src/lib.rs b/src/lib.rs index b509ecd..f5d3a1e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,17 +3,17 @@ //! invoking project before touching it. pub mod placement; pub mod store; -pub use webdock_plugin_kit::seal; +pub use spitzli_plugin_kit::seal; use serde::Deserialize; use serde_json::{Value, json}; +use spitzli_plugin_protocol::{ErrorCode, InvocationClaims, Manifest, PluginError}; +use spitzli_plugin_runtime::ActionHandler; use std::{ collections::HashSet, sync::{Arc, Mutex}, }; use uuid::Uuid; -use webdock_plugin_protocol::{ErrorCode, InvocationClaims, Manifest, PluginError}; -use webdock_plugin_runtime::ActionHandler; type Result = std::result::Result; pub const PLUGIN_ID: &str = "hosting"; diff --git a/src/main.rs b/src/main.rs index 4b27d90..516270b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ //! Hosting plugin runtime over private Unix sockets, with its own storage database. use serde::Deserialize; +use spitzli_plugin_runtime::{self as runtime, HostClient}; use std::{path::PathBuf, process::ExitCode, sync::Arc}; -use webdock_plugin_runtime::{self as runtime, HostClient}; type Error = Box; #[derive(Deserialize)] @@ -15,7 +15,7 @@ struct Configuration { core_peers: Vec, storage_url: String, secret_key_hex: String, - placement: webdock_hosting::placement::PlacementConfig, + placement: spitzli_hosting::placement::PlacementConfig, #[serde(default)] require_digest: bool, } @@ -26,24 +26,24 @@ async fn run() -> Result<(), Error> { return Err("unexpected argument".into()); } let config: Configuration = - serde_json::from_slice(&webdock_plugin_kit::read_file(&path, true)?)?; - let manifest = webdock_plugin_protocol::Manifest::parse(&webdock_plugin_kit::read_file( + serde_json::from_slice(&spitzli_plugin_kit::read_file(&path, true)?)?; + let manifest = spitzli_plugin_protocol::Manifest::parse(&spitzli_plugin_kit::read_file( &config.manifest, false, )?)?; - webdock_hosting::validate_manifest(&manifest)?; - webdock_plugin_kit::loopback(&config.storage_url)?; + spitzli_hosting::validate_manifest(&manifest)?; + spitzli_plugin_kit::loopback(&config.storage_url)?; let client = HostClient::connect_unix(config.core).await?; - let workloads = webdock_hosting::placement::HostWorkloads { + let workloads = spitzli_hosting::placement::HostWorkloads { client: client.clone(), plugin: manifest.id().into(), generation: config.generation, }; - let plugin = webdock_hosting::Plugin::new( - webdock_hosting::store::Store::connect(&config.storage_url).await?, - webdock_hosting::seal::Sealer::new(&config.secret_key_hex)?, - webdock_hosting::placement::Placement::new(Box::new(workloads), config.placement), - webdock_hosting::Settings { + let plugin = spitzli_hosting::Plugin::new( + spitzli_hosting::store::Store::connect(&config.storage_url).await?, + spitzli_hosting::seal::Sealer::new(&config.secret_key_hex)?, + spitzli_hosting::placement::Placement::new(Box::new(workloads), config.placement), + spitzli_hosting::Settings { require_digest: config.require_digest, }, ); @@ -61,7 +61,7 @@ async fn run() -> Result<(), Error> { config.generation, ed25519_dalek::VerifyingKey::from_bytes(&key)?, Arc::new(authority), - Arc::new(webdock_hosting::Handler(plugin)), + Arc::new(spitzli_hosting::Handler(plugin)), )?; let shutdown = async { let _ = tokio::signal::ctrl_c().await; diff --git a/src/placement.rs b/src/placement.rs index 70ec2cb..e5e9ec1 100644 --- a/src/placement.rs +++ b/src/placement.rs @@ -3,10 +3,10 @@ //! the cluster's agent applies the objects and reports readiness, pod problems and recent logs. use serde::Deserialize; use serde_json::{Value, json}; +use spitzli_plugin_protocol::PluginError; use uuid::Uuid; -use webdock_plugin_protocol::PluginError; -pub use webdock_plugin_kit::workloads::{HostWorkloads, Workloads}; +pub use spitzli_plugin_kit::workloads::{HostWorkloads, Workloads}; #[derive(Clone, Debug, Deserialize)] #[serde(rename_all = "camelCase", deny_unknown_fields)] diff --git a/src/store.rs b/src/store.rs index f51a069..8ae9705 100644 --- a/src/store.rs +++ b/src/store.rs @@ -60,7 +60,7 @@ pub struct Store(Client); impl Store { pub async fn connect(url: &str) -> Result { Ok(Self( - webdock_plugin_kit::storage(url, "hosting", MIGRATIONS).await?, + spitzli_plugin_kit::storage(url, "hosting", MIGRATIONS).await?, )) } pub async fn insert(&self, a: &App) -> Result<(), Error> { diff --git a/standalone.json b/standalone.json index 65c4079..5bebb2a 100644 --- a/standalone.json +++ b/standalone.json @@ -1,14 +1,14 @@ { "binaries": [ - "webdock-hosting" + "spitzli-hosting" ], "connectionsOwner": "Core", "coreIntegrationDependencies": [], "coreIntegrationTests": [], - "entrypoint": "webdock-hosting", + "entrypoint": "spitzli-hosting", "lockfileRequiresRegeneration": true, "name": "hosting", - "package": "webdock-hosting", + "package": "spitzli-hosting", "release": { "mode": "native-extension", "protocol": "webdock.plugin.v2", @@ -17,11 +17,11 @@ "version": "0.1.0" }, "sdkDependencies": [ - "webdock-plugin-kit", - "webdock-plugin-protocol", - "webdock-plugin-runtime" + "spitzli-plugin-kit", + "spitzli-plugin-protocol", + "spitzli-plugin-runtime" ], "sdkGit": "https://github.com/spitzli/cloud-plugin-sdk", - "sdkRevision": "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6", + "sdkRevision": "8019f3df67dba3fed3083f22635e4725028c1b5e", "source": "plugins/hosting" } diff --git a/tests/apps.rs b/tests/apps.rs index f8e5b68..dfafe87 100644 --- a/tests/apps.rs +++ b/tests/apps.rs @@ -1,12 +1,12 @@ //! The plugin against a stand-in for Core's `plugin.workloads` calls, with real plugin storage on a -//! disposable local PostgreSQL (`WEBDOCK_HOSTING_PLUGIN_TEST_ADMIN_URL`, loopback). The objects +//! disposable local PostgreSQL (`SPITZLI_HOSTING_PLUGIN_TEST_ADMIN_URL`, loopback). The objects //! themselves run on the local k3s in the live dev stack. use serde_json::{Value, json}; +use spitzli_hosting::{Handler, Plugin, Settings, placement, seal::Sealer, store::Store}; +use spitzli_plugin_protocol::{ErrorCode, InvocationClaims, Manifest, PluginError}; +use spitzli_plugin_runtime::ActionHandler; use std::sync::{Arc, Mutex}; use tokio_postgres::NoTls; -use webdock_hosting::{Handler, Plugin, Settings, placement, seal::Sealer, store::Store}; -use webdock_plugin_protocol::{ErrorCode, InvocationClaims, Manifest, PluginError}; -use webdock_plugin_runtime::ActionHandler; const IMAGE: &str = "nginx:stable-alpine"; @@ -74,7 +74,7 @@ fn config() -> placement::PlacementConfig { fn admin_url() -> url::Url { let url = url::Url::parse( - &std::env::var("WEBDOCK_HOSTING_PLUGIN_TEST_ADMIN_URL").expect("disposable local server"), + &std::env::var("SPITZLI_HOSTING_PLUGIN_TEST_ADMIN_URL").expect("disposable local server"), ) .unwrap(); assert_eq!(url.host_str(), Some("127.0.0.1")); @@ -156,7 +156,7 @@ impl Fixture { #[test] fn shipped_manifest_is_the_reviewed_contract() { - webdock_hosting::validate_manifest( + spitzli_hosting::validate_manifest( &Manifest::parse(include_bytes!("../manifest.json")).unwrap(), ) .unwrap(); @@ -175,7 +175,7 @@ fn image_references_and_environment_are_bounded() { good.to_owned() }; assert!( - webdock_hosting::image_reference(&good, false).is_ok(), + spitzli_hosting::image_reference(&good, false).is_ok(), "{good}" ); } @@ -189,16 +189,16 @@ fn image_references_and_environment_are_bounded() { "nginx;rm", ] { assert!( - webdock_hosting::image_reference(bad, false).is_err(), + spitzli_hosting::image_reference(bad, false).is_err(), "{bad:?}" ); } assert!( - webdock_hosting::image_reference("nginx:stable-alpine", true).is_err(), + spitzli_hosting::image_reference("nginx:stable-alpine", true).is_err(), "production requires a digest" ); let env = - webdock_hosting::environment("# comment\nA=1\n\nDATABASE_URL=postgres://x=y\n").unwrap(); + spitzli_hosting::environment("# comment\nA=1\n\nDATABASE_URL=postgres://x=y\n").unwrap(); assert_eq!( env, vec![ @@ -207,7 +207,7 @@ fn image_references_and_environment_are_bounded() { ] ); for bad in ["NOVALUE", "1A=x", "A-B=x", "A=1\nA=2", "A=\u{1b}x"] { - assert!(webdock_hosting::environment(bad).is_err(), "{bad:?}"); + assert!(spitzli_hosting::environment(bad).is_err(), "{bad:?}"); } } diff --git a/tools/manifest-validator/Cargo.lock b/tools/manifest-validator/Cargo.lock index dd69a41..26ce02b 100644 --- a/tools/manifest-validator/Cargo.lock +++ b/tools/manifest-validator/Cargo.lock @@ -991,6 +991,32 @@ version = "1.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8" +[[package]] +name = "spitzli-plugin-protocol" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "base64", + "chrono", + "ed25519-dalek", + "jsonschema", + "node-semver", + "regex", + "serde", + "serde_json", + "sha2", + "url", + "uuid", +] + +[[package]] +name = "spitzli-registry-manifest-validator" +version = "0.1.0" +dependencies = [ + "serde_json", + "spitzli-plugin-protocol", +] + [[package]] name = "spki" version = "0.7.3" @@ -1239,32 +1265,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "webdock-plugin-protocol" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "base64", - "chrono", - "ed25519-dalek", - "jsonschema", - "node-semver", - "regex", - "serde", - "serde_json", - "sha2", - "url", - "uuid", -] - -[[package]] -name = "webdock-registry-manifest-validator" -version = "0.1.0" -dependencies = [ - "serde_json", - "webdock-plugin-protocol", -] - [[package]] name = "windows-link" version = "0.2.1" diff --git a/tools/manifest-validator/Cargo.toml b/tools/manifest-validator/Cargo.toml index 3d08d68..e4c3b1d 100644 --- a/tools/manifest-validator/Cargo.toml +++ b/tools/manifest-validator/Cargo.toml @@ -1,5 +1,5 @@ ["package"] -"name" = "webdock-registry-manifest-validator" +"name" = "spitzli-registry-manifest-validator" "version" = "0.1.0" "edition" = "2024" "rust-version" = "1.94" @@ -11,10 +11,10 @@ ["dependencies"] "serde_json" = "1" -["dependencies"."webdock-plugin-protocol"] +["dependencies"."spitzli-plugin-protocol"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-plugin-protocol" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-plugin-protocol" ["profile"] diff --git a/tools/manifest-validator/src/main.rs b/tools/manifest-validator/src/main.rs index efb848a..6453517 100644 --- a/tools/manifest-validator/src/main.rs +++ b/tools/manifest-validator/src/main.rs @@ -1,5 +1,5 @@ use std::io::{self, Read, Write}; -use webdock_plugin_protocol::Manifest; +use spitzli_plugin_protocol::Manifest; const MAX_REGISTRY_BYTES: usize = 64 * 1024; diff --git a/ui/index.tsx b/ui/index.tsx index fcd46e2..5af56de 100644 --- a/ui/index.tsx +++ b/ui/index.tsx @@ -1,7 +1,7 @@ // Console UI of the hosting plugin. Bundled by the Console; every call goes through the plugin action API. import { useState, type ReactNode } from "react"; import { z } from "zod"; -import { Failure, Loading, ui, usePluginMutation, usePluginQuery, type PluginUI, type ResourceProps } from "@webdock/plugin-ui"; +import { Failure, Loading, ui, usePluginMutation, usePluginQuery, type PluginUI, type ResourceProps } from "@spitzli/plugin-ui"; const appSchema = z.object({ name: z.string(),