{"_id":"@crabnebula/plugin-ota-updater","_rev":"5-8926d77b94ac3ba3905f0a7c846be32e","name":"@crabnebula/plugin-ota-updater","dist-tags":{"latest":"2.0.1"},"versions":{"2.0.0-rc.0":{"name":"@crabnebula/plugin-ota-updater","version":"2.0.0-rc.0","license":"PolyForm-Noncommercial-1.0.0","_id":"@crabnebula/plugin-ota-updater@2.0.0-rc.0","maintainers":[{"name":"amr-crabnebula","email":"amr@crabnebula.dev"},{"name":"tillmann-crabnebula","email":"tillmann_admin@crabnebula.dev"},{"name":"crabnebula-npm","email":"npm-admin@crabnebula.dev"},{"name":"lucasfernog-crabnebula","email":"lucas@crabnebula.dev"}],"contributors":[{"name":"CrabNebula Ltd."}],"homepage":"https://github.com/crabnebula-dev/tauri-plugin-ota-updater#readme","bugs":{"url":"https://github.com/crabnebula-dev/tauri-plugin-ota-updater/issues"},"dist":{"shasum":"1f34f5fac2e020533ec94848f63cdd5d4b4388dd","tarball":"https://registry.npmjs.org/@crabnebula/plugin-ota-updater/-/plugin-ota-updater-2.0.0-rc.0.tgz","fileCount":5,"integrity":"sha512-IveZilG2Td25kwjXUAyvzoUsTd4Hut4RCNTePZQ9bGUHC8oByKMiA07MwYiap7b0tPNmqQ2M+3kFkAKW6KZgOQ==","signatures":[{"sig":"MEUCIQDAxVM3cQ48EQANQWQYDMJS7Ei6Ek5eC8VLKXUMRRk2CwIgMBAQnqHRccE/BJSu0yFT8NaqueKMSkaD+Y6keYXeo50=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4353},"main":"./dist-js/index.cjs","type":"module","types":"./dist-js/index.d.ts","module":"./dist-js/index.js","exports":{"types":"./dist-js/index.d.ts","import":"./dist-js/index.js","require":"./dist-js/index.cjs"},"gitHead":"9ee9163f113231ea08bc1e897ac81edbcefae0b6","scripts":{"build":"rollup -c"},"_npmUser":{"name":"crabnebula-npm","email":"npm-admin@crabnebula.dev"},"repository":{"url":"git+https://github.com/crabnebula-dev/tauri-plugin-ota-updater.git","type":"git"},"_npmVersion":"10.8.1","description":"This plugin provides over-the-air (OTA) updates for the Web assets of a Tauri app.","directories":{},"_nodeVersion":"20.16.0","dependencies":{"@tauri-apps/api":"2.0.0-rc.2"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.56.0","rollup":"4.9.6","covector":"^0.10.2","prettier":"3.2.2","typescript":"5.3.3","eslint-plugin-n":"16.6.2","eslint-plugin-import":"2.29.1","@rollup/plugin-terser":"0.4.4","eslint-plugin-promise":"6.1.1","eslint-config-prettier":"9.1.0","eslint-plugin-security":"2.1.0","@rollup/plugin-typescript":"11.1.6","@typescript-eslint/parser":"6.20.0","@rollup/plugin-node-resolve":"15.2.3","@typescript-eslint/eslint-plugin":"6.20.0","eslint-config-standard-with-typescript":"43.0.1"},"_npmOperationalInternal":{"tmp":"tmp/plugin-ota-updater_2.0.0-rc.0_1724855323214_0.45077681768145705","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@crabnebula/plugin-ota-updater","version":"2.0.0","license":"PolyForm-Noncommercial-1.0.0","_id":"@crabnebula/plugin-ota-updater@2.0.0","maintainers":[{"name":"amr-crabnebula","email":"amr@crabnebula.dev"},{"name":"tillmann-crabnebula","email":"tillmann_admin@crabnebula.dev"},{"name":"crabnebula-npm","email":"npm-admin@crabnebula.dev"},{"name":"lucasfernog-crabnebula","email":"lucas@crabnebula.dev"}],"contributors":[{"name":"CrabNebula Ltd."}],"homepage":"https://github.com/crabnebula-dev/tauri-plugin-ota-updater#readme","bugs":{"url":"https://github.com/crabnebula-dev/tauri-plugin-ota-updater/issues"},"dist":{"shasum":"172b03a29565182a6f3d3144d2565524a3486925","tarball":"https://registry.npmjs.org/@crabnebula/plugin-ota-updater/-/plugin-ota-updater-2.0.0.tgz","fileCount":5,"integrity":"sha512-va3m0zgHoUSiL2mmaM/e8aqllnBaHnALYB3GxNRnDo00qGW/uy015OPsNEIGd7Sc9E4InFJ63QnsC7y/3MPD3A==","signatures":[{"sig":"MEQCIGKqkulWUkQD4mOM2830CcsG9B/4ZrybDq+jU3QNeqPQAiAgtyvFJyZbQOkuFnvKbu1vHzcijkiV1vQ12G0XYnFY8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5661},"main":"./dist-js/index.cjs","type":"module","types":"./dist-js/index.d.ts","module":"./dist-js/index.js","exports":{"types":"./dist-js/index.d.ts","import":"./dist-js/index.js","require":"./dist-js/index.cjs"},"gitHead":"361f765a1530ef19069e0c6c19b89a3d5c89ab2e","scripts":{"build":"rollup -c"},"_npmUser":{"name":"crabnebula-npm","email":"npm-admin@crabnebula.dev"},"repository":{"url":"git+https://github.com/crabnebula-dev/tauri-plugin-ota-updater.git","type":"git"},"_npmVersion":"10.8.2","description":"This plugin provides over-the-air (OTA) updates for the Web assets of a Tauri app.","directories":{},"_nodeVersion":"20.17.0","dependencies":{"@tauri-apps/api":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.56.0","rollup":"4.9.6","covector":"^0.10.2","prettier":"3.2.2","typescript":"5.3.3","eslint-plugin-n":"16.6.2","eslint-plugin-import":"2.29.1","@rollup/plugin-terser":"0.4.4","eslint-plugin-promise":"6.1.1","eslint-config-prettier":"9.1.0","eslint-plugin-security":"2.1.0","@rollup/plugin-typescript":"11.1.6","@typescript-eslint/parser":"6.20.0","@rollup/plugin-node-resolve":"15.2.3","@typescript-eslint/eslint-plugin":"6.20.0","eslint-config-standard-with-typescript":"43.0.1"},"_npmOperationalInternal":{"tmp":"tmp/plugin-ota-updater_2.0.0_1728178151542_0.2895377289872343","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@crabnebula/plugin-ota-updater","version":"2.0.1","repository":{"type":"git","url":"git+https://github.com/crabnebula-dev/tauri-plugin-ota-updater.git"},"homepage":"https://github.com/crabnebula-dev/tauri-plugin-ota-updater#readme","bugs":{"url":"https://github.com/crabnebula-dev/tauri-plugin-ota-updater/issues"},"contributors":[{"name":"CrabNebula Ltd."}],"license":"PolyForm-Noncommercial-1.0.0","type":"module","types":"./dist-js/index.d.ts","main":"./dist-js/index.cjs","module":"./dist-js/index.js","exports":{"types":"./dist-js/index.d.ts","import":"./dist-js/index.js","require":"./dist-js/index.cjs"},"scripts":{"build":"rollup -c"},"dependencies":{"@tauri-apps/api":"2.0.0"},"devDependencies":{"@rollup/plugin-node-resolve":"15.2.3","@rollup/plugin-terser":"0.4.4","@rollup/plugin-typescript":"11.1.6","@typescript-eslint/eslint-plugin":"6.20.0","@typescript-eslint/parser":"6.20.0","covector":"^0.10.2","eslint":"8.56.0","eslint-config-prettier":"9.1.0","eslint-config-standard-with-typescript":"43.0.1","eslint-plugin-import":"2.29.1","eslint-plugin-n":"16.6.2","eslint-plugin-promise":"6.1.1","eslint-plugin-security":"2.1.0","prettier":"3.2.2","rollup":"4.9.6","typescript":"5.3.3"},"_id":"@crabnebula/plugin-ota-updater@2.0.1","gitHead":"86b99c4d7d5ec5eaffc2f8fd34132dbd094c47e7","description":"This plugin provides over-the-air (OTA) updates for the Web assets of a Tauri app.","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-uXYEVH/qanTRlCOuWZc29oEv3JFiZWWHh25x31k+1f5S56RbJd0FW1RQxkYQNThwXx3u2wHK8G5Zashj9SZLFQ==","shasum":"cff09f723065ab9548148c7d0cc755ec1338059c","tarball":"https://registry.npmjs.org/@crabnebula/plugin-ota-updater/-/plugin-ota-updater-2.0.1.tgz","fileCount":5,"unpackedSize":5661,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC3Gb4HSymviY86NJcc0hmRQErAedZuctJhJ1ftZhJCPAIgeH5xOnCRxI+q9+jCcPV/psCQk9cZfwMUSDIel7D7kZE="}]},"_npmUser":{"name":"crabnebula-npm","email":"npm-admin@crabnebula.dev"},"directories":{},"maintainers":[{"name":"crabnebula-npm","email":"npm-admin@crabnebula.dev"},{"name":"lucasfernog-crabnebula","email":"lucas@crabnebula.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-ota-updater_2.0.1_1753284787353_0.4550716059042763"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-28T14:28:43.117Z","modified":"2025-07-23T15:33:07.824Z","2.0.0-rc.0":"2024-08-28T14:28:43.444Z","2.0.0":"2024-10-06T01:29:11.698Z","2.0.1":"2025-07-23T15:33:07.578Z"},"bugs":{"url":"https://github.com/crabnebula-dev/tauri-plugin-ota-updater/issues"},"license":"PolyForm-Noncommercial-1.0.0","homepage":"https://github.com/crabnebula-dev/tauri-plugin-ota-updater#readme","repository":{"type":"git","url":"git+https://github.com/crabnebula-dev/tauri-plugin-ota-updater.git"},"description":"This plugin provides over-the-air (OTA) updates for the Web assets of a Tauri app.","contributors":[{"name":"CrabNebula Ltd."}],"maintainers":[{"name":"crabnebula-npm","email":"npm-admin@crabnebula.dev"},{"name":"lucasfernog-crabnebula","email":"lucas@crabnebula.dev"}],"readme":"# Over-the-air (OTA) Updater\n\nThis plugin provides over-the-air (OTA) updates for the Web assets of a Tauri app.\n\nIt leverages the [CrabNebula Cloud](https://crabnebula.dev/cloud/) to ship the assets.\n\n## Install\n\n_This plugin requires a Rust version of at least **1.75**_\n\nThere are three general methods of installation that we can recommend.\n\n1. Use crates.io and npm (easiest, and requires you to trust that our publishing pipeline worked)\n2. Pull sources directly from Github using git tags / revision hashes (most secure)\n3. Git submodule install this repo in your tauri project and then use file protocol to ingest the source (most secure, but inconvenient to use)\n\nInstall the Core plugin by adding the following to your `Cargo.toml` file:\n\n`src-tauri/Cargo.toml`\n\n```toml\n[dependencies]\ntauri-plugin-ota-updater = \"2.0.0-rc\"\n```\n\nYou can install the JavaScript Guest bindings using your preferred JavaScript package manager:\n\n```sh\npnpm add @crabnebula/plugin-ota-updater\n# or\nnpm add @crabnebula/plugin-ota-updater\n# or\nyarn add @crabnebula/plugin-ota-updater\n```\n\n## Configuration\n\nYou need a signing key to sign the update bundle. This ensures the integrity of your code can be checked at runtime.\nTo generate a new signing key run the `generate-keypair` command:\n\n```sh\nnpx @crabnebula/ota-updater generate-keypair\n```\n\nSafely store the private key and DO NOT share it with anyone. It will be required to distribute updates later.\n\nThe plugin must be configured with the signing public key and CrabNebula Cloud org/app slug pair:\n\n```json\n{\n    \"plugins\": {\n        \"ota-updater\": {\n            \"orgSlug\": \"my-org\",\n            \"appSlug\": \"my-app\",\n            \"pubkey\": \"<insert-public-key-here>\"\n        }\n    }\n}\n```\n\nTo be able to use the updater from the frontend of your application you need to enable the default permission of the plugin in your capability ( e.g. `capabilities/default.json`):\n\n```json\n{\n...\n  \"permissions\": [\n    \"ota-updater:default\"\n  ]\n...\n}\n```\n\n## Distributing Updates\n\nTo distribute updates, build your frontend assets and then run the `upload` command\nproviding the private key and a CrabNebula Cloud API key as environment variables:\n\n```sh\nexport PRIVATE_KEY=<insert-private-key-here>\nexport CN_API_KEY=<insert api-key-here>\nnpx @crabnebula/ota-updater upload\n```\n\n## Usage\n\nFirst you need to register the core plugin with Tauri:\n\n`src-tauri/src/main.rs`\n\n```rust\nfn main() {\n    let context = tauri::generate_context!();\n\n    let (ota_plugin, context) = tauri_plugin_ota_updater::init(context);\n\n    tauri::Builder::default()\n        .plugin(ota_plugin)\n        .run(context)\n        .expect(\"error while running tauri application\");\n}\n```\n\nAfterwards all the plugin's APIs are available through the JavaScript guest bindings:\n\n```javascript\nimport { check } from \"@crabnebula/plugin-ota-updater\";\nconst update = await check()\nif (update) {\n    await update.apply()\n    location.reload()\n}\n```\n\n## License\n\nCode: (c) 2023 - Present - CrabNebula Ltd.\n\nPolyForm-Noncommercial-1.0.0\n","readmeFilename":"README.md"}