{"_id":"@atlet99/webos-packager-plugin","_rev":"3-09816b0155b9be4146a2e48e10a73d66","name":"@atlet99/webos-packager-plugin","dist-tags":{"latest":"2.1.2"},"versions":{"2.1.0":{"name":"@atlet99/webos-packager-plugin","version":"2.1.0","keywords":["webos","ipk","webpack","plugin","packager"],"author":{"name":"Abdurakhman Rakhmankulov"},"license":"MIT","_id":"@atlet99/webos-packager-plugin@2.1.0","maintainers":[{"name":"atlet99","email":"joha.shadibekov@gmail.com"}],"homepage":"https://github.com/atlet99/webos-packager-plugin#readme","bugs":{"url":"https://github.com/atlet99/webos-packager-plugin/issues"},"dist":{"shasum":"998a42bb70517c4a6c9fafcc8f90f7ddc8b1a2f5","tarball":"https://registry.npmjs.org/@atlet99/webos-packager-plugin/-/webos-packager-plugin-2.1.0.tgz","fileCount":13,"integrity":"sha512-83KanLtdE+1lZrpn52kp35ovvCmXaFM+gVT5WXeND7T+tV/G75vmrniOglBO0Uyzh/OJ5fFooqyGz9jVBwkgLQ==","signatures":[{"sig":"MEUCIAQe513A87Qn4nihOe5ipGl60MueD6iD3WpoYAXSyofmAiEA8Mgc29Hl+ExoI1AC4X5hY1MLgmwnvaSBDEp9id9YKyM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@atlet99%2fwebos-packager-plugin@2.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":22014},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">= 14.10"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"a13fb5fcef5af70829571f1b0f41e84cea3d7199","scripts":{"test":"npm run build && npm run test:regression","build":"tsc","format":"npx --yes prettier@3.3.3 --write .","format:check":"npx --yes prettier@3.3.3 --check .","test:regression":"node test/regression.js"},"_npmUser":{"name":"atlet99","email":"joha.shadibekov@gmail.com"},"repository":{"url":"git+https://github.com/atlet99/webos-packager-plugin.git","type":"git"},"_npmVersion":"10.8.2","description":"Pack applications for webOS on the fly.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"tar-stream":"^3.1.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.22","devDependencies":{"webpack":"^5.88.2","typescript":"^4.9.5","@types/node":"^18.15.11","@types/tar-stream":"^2.2.2"},"_npmOperationalInternal":{"tmp":"tmp/webos-packager-plugin_2.1.0_1773585726515_0.7780565795779695","host":"s3://npm-registry-packages-npm-production"}},"2.1.1":{"name":"@atlet99/webos-packager-plugin","version":"2.1.1","keywords":["webos","ipk","webpack","plugin","packager"],"author":{"name":"Abdurakhman Rakhmankulov"},"license":"MIT","_id":"@atlet99/webos-packager-plugin@2.1.1","maintainers":[{"name":"atlet99","email":"joha.shadibekov@gmail.com"}],"homepage":"https://github.com/atlet99/webos-packager-plugin#readme","bugs":{"url":"https://github.com/atlet99/webos-packager-plugin/issues"},"dist":{"shasum":"404d337fa25ebebf98b48a6e5186d815df4848e2","tarball":"https://registry.npmjs.org/@atlet99/webos-packager-plugin/-/webos-packager-plugin-2.1.1.tgz","fileCount":13,"integrity":"sha512-PV+wQSwqOgE498K4NgyACgZjEKwk372cBfk6OhxZGXHK1UlFmZnTWLI9hSZC6NsYBmuvGtsqJB7feAqsSbkuVg==","signatures":[{"sig":"MEYCIQCCXPeDHDWTZR5kyvC+UYcT4fh/Fm4z7WfzaLizK2KrDwIhAI+whXwGY4dIZAqCpq4L8QgPZjLEfKR9t8SGuRTPpfCu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@atlet99%2fwebos-packager-plugin@2.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":25760},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">= 14.10"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"325a9eef0ddc3eb8e30cacd32857e75bd7206897","scripts":{"test":"npm run build && npm run test:regression","build":"tsc","format":"prettier --write .","format:check":"prettier --check .","format:readme":"prettier --write README.md","test:regression":"node test/regression.js","format:check:readme":"prettier --check README.md"},"_npmUser":{"name":"atlet99","email":"joha.shadibekov@gmail.com"},"repository":{"url":"git+https://github.com/atlet99/webos-packager-plugin.git","type":"git"},"_npmVersion":"10.9.4","description":"Pack applications for webOS on the fly.","directories":{},"_nodeVersion":"22.22.0","dependencies":{"tar-stream":"^3.1.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.22","devDependencies":{"webpack":"^5.88.2","prettier":"^3.3.3","typescript":"^4.9.5","@types/node":"^18.15.11","@types/tar-stream":"^2.2.2"},"_npmOperationalInternal":{"tmp":"tmp/webos-packager-plugin_2.1.1_1773596655321_0.4706882412088813","host":"s3://npm-registry-packages-npm-production"}},"2.1.2":{"name":"@atlet99/webos-packager-plugin","version":"2.1.2","description":"Pack applications for webOS on the fly.","keywords":["webos","ipk","webpack","plugin","packager"],"author":{"name":"Abdurakhman Rakhmankulov"},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js","default":"./dist/index.js"}},"repository":{"type":"git","url":"git+https://github.com/atlet99/webos-packager-plugin.git"},"homepage":"https://github.com/atlet99/webos-packager-plugin#readme","bugs":{"url":"https://github.com/atlet99/webos-packager-plugin/issues"},"maintainers":[{"name":"atlet99","email":"joha.shadibekov@gmail.com"}],"packageManager":"yarn@1.22.22","scripts":{"build":"tsc","format":"prettier --write .","format:readme":"prettier --write README.md","format:check":"prettier --check .","format:check:readme":"prettier --check README.md","pretest":"node -e \"const [maj,min]=process.versions.node.split('.').map(Number); if (maj < 14 || (maj === 14 && min < 10)) { console.error('Node >= 14.10 is required. Run: nvm use 25'); process.exit(1); }\"","test:regression":"node test/regression.js","test:e2e":"node test/e2e.js","test":"npm run build && npm run test:regression && npm run test:e2e"},"publishConfig":{"access":"public"},"engines":{"node":">= 14.10"},"dependencies":{"tar-stream":"^3.1.6"},"devDependencies":{"@types/node":"^18.15.11","@types/tar-stream":"^2.2.2","prettier":"^3.3.3","typescript":"^4.9.5","webpack":"^5.88.2"},"_id":"@atlet99/webos-packager-plugin@2.1.2","gitHead":"51121a1e63fcaba1f378270422811e2627d67228","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-zNILMQ5m7van6KVJrcZa6Rc+Cw1Z219t5oDqFLtxaSxv6kZxBjVIcX/t4+5EmemOgRaMNmkZS9XQntqDElblnw==","shasum":"bf78eded27fb462c53a40818f0616d8345f20a6f","tarball":"https://registry.npmjs.org/@atlet99/webos-packager-plugin/-/webos-packager-plugin-2.1.2.tgz","fileCount":13,"unpackedSize":37045,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@atlet99%2fwebos-packager-plugin@2.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD+Z/RY3b+akhIaSixk2uOUH3FzOdlVMg9J4Gpw3SBkbgIhAImfFKu/dubmMobYrJ2FdeL5dp61RtfDN3B2R9Fp29l3"}]},"_npmUser":{"name":"atlet99","email":"joha.shadibekov@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/webos-packager-plugin_2.1.2_1773601825142_0.9528244947183448"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-15T14:42:06.434Z","modified":"2026-03-15T19:10:25.573Z","2.1.0":"2026-03-15T14:42:06.671Z","2.1.1":"2026-03-15T17:44:15.454Z","2.1.2":"2026-03-15T19:10:25.282Z"},"bugs":{"url":"https://github.com/atlet99/webos-packager-plugin/issues"},"author":{"name":"Abdurakhman Rakhmankulov"},"license":"MIT","homepage":"https://github.com/atlet99/webos-packager-plugin#readme","keywords":["webos","ipk","webpack","plugin","packager"],"repository":{"type":"git","url":"git+https://github.com/atlet99/webos-packager-plugin.git"},"description":"Pack applications for webOS on the fly.","maintainers":[{"name":"atlet99","email":"joha.shadibekov@gmail.com"}],"readme":"![NPM Version](https://img.shields.io/npm/v/%40atlet99%2Fwebos-packager-plugin?style=plastic)\n![GitHub Release](https://img.shields.io/github/v/release/atlet99/webos-packager-plugin)\n![GitHub License](https://img.shields.io/github/license/atlet99/webos-packager-plugin?style=plastic)\n![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/atlet99/webos-packager-plugin?style=plastic)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/atlet99/webos-packager-plugin/npm-publish.yml?style=plastic&label=Publish%20to%20registry)\n![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/w/atlet99/webos-packager-plugin/master?style=plastic)\n\n# @atlet99/webos-packager-plugin\n\nPack webOS IPK files directly from webpack builds.\n\nFork notice: this package is forked from the original\n`@webosbrew/webos-packager-plugin`. Original author and credit: kitsuned (Andrey\nSmirnov).\n\n### Installation\n\n```bash\nnpm i @atlet99/webos-packager-plugin\n```\n\n### What This Library Does\n\nThis package integrates webOS packaging directly into webpack output and emits\n`.ipk` as build artifacts.\n\n`webos-cli` and this library complement each other:\n\n| Topic             | `webos-cli` (`ares-*`)                        | `@atlet99/webos-packager-plugin`         |\n| ----------------- | --------------------------------------------- | ---------------------------------------- |\n| Main usage        | End-to-end app workflow                       | Packaging inside webpack pipeline        |\n| Packaging command | `ares-package ./app ./service`                | webpack plugin/HOC emits `.ipk` asset    |\n| Deploy to device  | `ares-install`, `ares-launch`, `ares-inspect` | Not included                             |\n| Service naming    | Service id should start with app id           | Same rule validated during package build |\n| Build integration | Separate build + package steps                | Single webpack flow                      |\n\n> [!IMPORTANT]\n>\n> This library does not deploy to device/emulator. Use `webos-cli` for install,\n> launch, inspect, and debugging.\n\n### Quick Decision Guide\n\n- Use `WebOSPackagerPlugin` if you have a single webpack config.\n- Use `hoc(...)` if you bundle app + one or more services together.\n- Use `output.template`/`output.variables` when CI controls artifact naming.\n- Use `versionFile` for app/IPK versioning in monorepos.\n\n> [!TIP]\n>\n> Keep IPK versioning (`version`, `versionFile`, env) separate from the\n> library's own `package.json` version.\n\n### Quick Start (HOC)\n\n```typescript\nimport { join } from 'path';\nimport { hoc } from '@atlet99/webos-packager-plugin';\n\nexport default hoc({\n  id: 'com.example.app',\n  version: '1.0.0',\n  options: {\n    emitManifest: true,\n    manifest: {\n      title: 'Example App',\n      description: 'Example description',\n      iconUrl: 'https://example.com/icon.png',\n      sourceUrl: 'https://github.com/atlet99/webos-packager-plugin',\n    },\n  },\n  app: {\n    id: 'com.example.app',\n    mode: 'development',\n    entry: './src/app.js',\n    output: {\n      filename: 'main.js',\n      path: join(__dirname, 'dist/app'),\n    },\n  },\n  services: [\n    {\n      id: 'com.example.app.service',\n      mode: 'development',\n      entry: './src/service.js',\n      output: {\n        filename: 'service.js',\n        path: join(__dirname, 'dist/service'),\n      },\n    },\n  ],\n});\n```\n\n### Quick Start (Plugin)\n\n```typescript\nimport { join } from 'path';\nimport { WebOSPackagerPlugin } from '@atlet99/webos-packager-plugin';\n\nexport default {\n  mode: 'development',\n  entry: './src/app.js',\n  output: {\n    filename: 'main.js',\n    path: join(__dirname, 'dist/app'),\n  },\n  plugins: [\n    new WebOSPackagerPlugin({\n      id: 'com.example.app',\n      version: '1.0.0',\n      type: 'app',\n    }),\n  ],\n};\n```\n\n### Output Naming and Path Rules\n\nYou can keep legacy `filename`, or use `output` for richer control.\n\n```typescript\nnew WebOSPackagerPlugin({\n  id: 'com.example.app',\n  version: '1.0.0',\n  type: 'app',\n  output: {\n    dir: 'artifacts/webos',\n    template: '[id]-[version]-[channel].[ext]',\n    variables: {\n      channel: process.env.CHANNEL ?? 'local',\n    },\n  },\n});\n```\n\nDynamic filename function is also supported:\n\n```typescript\nnew WebOSPackagerPlugin({\n  id: 'com.example.app',\n  version: process.env.RELEASE_VERSION ?? '1.0.0',\n  type: 'app',\n  filename: ({ id, version, ext }) => `releases/${id}_${version}_ci.${ext}`,\n});\n```\n\nAvailable output tokens:\n\n- `[id]`\n- `[version]`\n- `[ext]`\n- `[baseName]`\n- custom keys from `output.variables`\n\n> [!WARNING]\n>\n> Unknown template tokens fail the build intentionally. This prevents publishing\n> artifacts with accidental names.\n\n> [!WARNING]\n>\n> Output path must stay inside webpack output assets. Unsafe values like `../`\n> are rejected.\n\n### Version Source (`.release-version`)\n\nYou can decouple app/IPK versioning from library `package.json`.\n\nVersion priority:\n\n1. `version` option\n2. env var (`RELEASE_VERSION` by default, or custom `versionEnv`)\n3. `versionFile` (for example `.release-version`)\n\n```typescript\nnew WebOSPackagerPlugin({\n  id: 'com.example.app',\n  type: 'app',\n  versionFile: '.release-version',\n});\n```\n\nCustom env key:\n\n```typescript\nnew WebOSPackagerPlugin({\n  id: 'com.example.app',\n  type: 'app',\n  versionEnv: 'APP_RELEASE_VERSION',\n});\n```\n\n> [!IMPORTANT]\n>\n> If you provide `version`, it overrides env and `versionFile`.\n\n> [!WARNING]\n>\n> Version must match `x.y.z`, `x.y.z-suffix`, or `x.y.z-suffix+build`. Invalid\n> values fail fast.\n\n### Scenario: CI Build With Dynamic Artifact Name\n\n```typescript\nnew WebOSPackagerPlugin({\n  id: 'com.example.app',\n  type: 'app',\n  versionFile: '.release-version',\n  output: {\n    dir: 'artifacts/webos',\n    template: '[id]-[version]-[channel].[ext]',\n    variables: {\n      channel: process.env.CHANNEL ?? 'local',\n    },\n  },\n});\n```\n\n### Scenario: Monorepo (3 IPK Builds)\n\n```typescript\nimport { join } from 'path';\nimport { WebOSPackagerPlugin } from '@atlet99/webos-packager-plugin';\n\nconst createConfig = (id: string, entry: string, channel: string) => ({\n  mode: 'production',\n  entry,\n  output: {\n    filename: 'main.js',\n    path: join(__dirname, `dist/${id}`),\n  },\n  plugins: [\n    new WebOSPackagerPlugin({\n      id,\n      version: process.env.RELEASE_VERSION ?? '1.0.0',\n      type: 'app',\n      output: {\n        dir: 'artifacts/ipk',\n        template: '[id]-[version]-[channel].[ext]',\n        variables: { channel },\n      },\n    }),\n  ],\n});\n\nexport default [\n  createConfig('com.example.app.alpha', './packages/alpha/src/app.js', 'alpha'),\n  createConfig('com.example.app.beta', './packages/beta/src/app.js', 'beta'),\n  createConfig('com.example.app.gamma', './packages/gamma/src/app.js', 'gamma'),\n];\n```\n\n> [!TIP]\n>\n> In monorepos, keep one `.release-version` per app package if apps have\n> independent release cycles.\n\n### Common Mistakes\n\n- Service id does not start with app id.\n- Missing app namespace (service-only build).\n- Empty manifest fields while `emitManifest: true`.\n- Using unresolved tokens in `output.template`.\n- Trying to write output with `../`.\n\n> [!WARNING]\n>\n> Service ids must start with app id. For app `com.example.app`, valid service\n> ids look like `com.example.app.svc`.\n\n### Release Flow\n\nPublishing is done by GitHub Actions on tag push.\n\n```bash\nmake tag-release\n```\n\nIf you need to bump version first and open a PR to `master`:\n\n```bash\nmake tag-release VERSION=2.1.1\n```\n\n> [!IMPORTANT]\n>\n> `VERSION=...` flow uses GitHub CLI. If `GH_TOKEN` or `GITHUB_TOKEN` is set in\n> your environment, interactive login is not required. Otherwise run\n> `gh auth login`.\n\nBy default, `AUTO_MERGE=1`: the PR is set to auto-squash after checks pass, then\n`master` is updated and tag creation runs automatically.\n\nTo keep merge manual:\n\n```bash\nmake tag-release VERSION=2.1.1 AUTO_MERGE=0\n```\n\n### Development\n\n```bash\nmake install\nmake verify\n```\n\nUseful commands:\n\n```bash\nmake help\nmake format\nmake format-check\nmake lint-make\nmake test\nmake test-e2e\nmake test-plugin\nmake test-hoc\nmake pack\n```\n\nMakefile linting uses [checkmake](https://github.com/checkmake/checkmake) with\nproject config from `checkmake.ini`. If local `checkmake` is unavailable, the\n`lint-make` target downloads `checkmake` for your current OS/arch\n(`linux|darwin`, `amd64|arm64`) using `CHECKMAKE_VERSION`.\n","readmeFilename":"README.md"}