{"_id":"@ba-sharks/platform-bootstrapper","_rev":"2-6b282f42895e431c1ae48b167bbe65ba","name":"@ba-sharks/platform-bootstrapper","dist-tags":{"latest":"2.6.1"},"versions":{"2.3.1":{"name":"@ba-sharks/platform-bootstrapper","version":"2.3.1","license":"PolyForm-Noncommercial-1.0.0","_id":"@ba-sharks/platform-bootstrapper@2.3.1","maintainers":[{"name":"germanp-ba","email":"german.paniagua@bluealba.com"}],"PAE":"^2.3.1","dist":{"shasum":"86cb55a2a7779005955206f9bfffac78b35bccfc","tarball":"https://registry.npmjs.org/@ba-sharks/platform-bootstrapper/-/platform-bootstrapper-2.3.1.tgz","fileCount":10,"integrity":"sha512-QDABJN7W/qYlCzN6ERpY37wTCVFqfo23e4ktRiVNey4jwoqlpuJbBrhfllJ0Wgp4AVWV66nURm9WPv3bUQReUQ==","signatures":[{"sig":"MEYCIQCqLi2L6jyLDPunfi+1L0QyydaUIi5cdsYVOBfFjv1twQIhAN1h14QrUfMYkL74URcfCLX8Sj+dg1wgti5Ok+2JF7Os","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13401},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=22"},"private":false,"scripts":{"dev":"tsc --watch","lint":"biome check","build":"tsc","coverage":"echo tests","lint:fix":"biome check --write"},"_npmUser":{"name":"germanp-ba","email":"german.paniagua@bluealba.com"},"_npmVersion":"11.6.2","description":"Reusable Platform Bootstrap with configurable data path and UI parameters","directories":{},"_nodeVersion":"22.21.1","dependencies":{"pino":"^10.1.0","convict":"^6.2.4","express":"^4.21.0","lodash.merge":"^4.6.2","@bluealba/pae-core":"5.0.0","@bluealba/pae-bootstrap-lib":"2.1.1"},"publishConfig":{"access":"public","@ba-sharks:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^22.19.11","@types/convict":"^6.1.6","@types/express":"^4.17.17","@changesets/cli":"^2.29.7","@types/lodash.merge":"^4.6.9"},"_npmOperationalInternal":{"tmp":"tmp/platform-bootstrapper_2.3.1_1771614732171_0.6777405306615534","host":"s3://npm-registry-packages-npm-production"}},"2.6.1":{"name":"@ba-sharks/platform-bootstrapper","version":"2.6.1","PAE":"^2.6.1","description":"Reusable Platform Bootstrap with configurable data path and UI parameters","main":"dist/index.js","types":"dist/index.d.ts","private":false,"license":"PolyForm-Noncommercial-1.0.0","scripts":{"build":"tsc","dev":"tsc --watch","lint":"biome check","lint:fix":"biome check --write","coverage":"echo tests"},"dependencies":{"@bluealba/pae-bootstrap-lib":"2.1.3","@bluealba/pae-core":"5.1.0","convict":"^6.2.4","express":"^4.21.0","lodash.merge":"^4.6.2","pino":"^10.1.0"},"devDependencies":{"@changesets/cli":"^2.29.7","@types/convict":"^6.1.6","@types/express":"^4.17.17","@types/lodash.merge":"^4.6.9","@types/node":"^22.19.11"},"engines":{"node":">=22"},"publishConfig":{"@ba-sharks:registry":"https://registry.npmjs.org/","access":"public"},"gitHead":"d42e7294b814ed56abf001d672cbff8e8f2604ca","_id":"@ba-sharks/platform-bootstrapper@2.6.1","_nodeVersion":"22.21.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-+gE20KKzTyL2F7+oHLX9KoSIFYmrm4cp+X5RaYZfoNTq87SdW0Vw1CKBfyN7k7zSVWlOJmYCC5g77EV/DPAxig==","shasum":"09f97f12edf075921a04e168635a7d1970c01e77","tarball":"https://registry.npmjs.org/@ba-sharks/platform-bootstrapper/-/platform-bootstrapper-2.6.1.tgz","fileCount":10,"unpackedSize":13401,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDtu1BwSQ2djw1giNdL2P6+dmqzxxLAVy52UGMRyICmNQIhAOfKt2AYXl4zR0pIArws0fwKwV8UEGU/owefM3dOvW9s"}]},"_npmUser":{"name":"germanp-ba","email":"german.paniagua@bluealba.com"},"directories":{},"maintainers":[{"name":"germanp-ba","email":"german.paniagua@bluealba.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/platform-bootstrapper_2.6.1_1771949399554_0.3405985363610624"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-20T19:12:12.064Z","modified":"2026-02-24T16:09:59.879Z","2.3.1":"2026-02-20T19:12:12.307Z","2.6.1":"2026-02-24T16:09:59.749Z"},"license":"PolyForm-Noncommercial-1.0.0","description":"Reusable Platform Bootstrap with configurable data path and UI parameters","maintainers":[{"name":"germanp-ba","email":"german.paniagua@bluealba.com"}],"readme":"# @sharks/platform-bootstrapper\n\nReusable PAE (Platform Application Engine) bootstrap library with configurable data path and UI parameters.\n\n## Installation\n\n```bash\nnpm install @sharks/platform-bootstrapper\n```\n\n## Usage\n\n```typescript\nimport { join } from 'node:path';\nimport { bootstrapApp } from '@bluealba/platform-bootstrapper';\n\nimport { name, version } from '../package.json';\n\nbootstrapApp({\n  dataPath: join(process.cwd(), 'src', 'data'),\n  packageName: name,\n  packageVersion: version,\n});\n```\n\nThis starts an Express server on the configured port, waits a configurable delay, then synchronizes the platform using the provided data path.\n\n### Health check\n\nThe server exposes a health endpoint at `GET /health` that returns `{ \"healthy\": \"ok\" }`.\n\n## API\n\n### `bootstrapApp(config: BootstrapAppConfig): Express`\n\nCreates and starts the bootstrap application.\n\n| Parameter        | Type       | Required | Description                                              |\n| ---------------- | ---------- | -------- | -------------------------------------------------------- |\n| `dataPath`       | `string`   | Yes      | Absolute path to the data folder with bootstrap config   |\n| `packageName`    | `string`   | Yes      | Package name used for logging                            |\n| `packageVersion` | `string`   | Yes      | Package version used for logging                         |\n| `excludeModules` | `string[]` | No       | Module names to exclude from bootstrapping (default `[]`)|\n\n## Environment Variables\n\n| Variable                | Default       | Description                                                                 |\n| ----------------------- | ------------- | --------------------------------------------------------------------------- |\n| `PORT`                  | `3303`        | Port the server listens on                                                  |\n| `WAIT_TIME`             | `1000`        | Milliseconds to wait before starting the bootstrap sync                     |\n| `CATALOG_OVERRIDES_FILE`| `\"\"`          | Path to a JSON file with module overrides (merged by module name)           |\n| `SYNC_STRATEGY`         | `\"\"`          | Set to `DESTRUCTIVE` to use destructive sync strategy                       |\n| `UI_MODULE_NAME`        | `\"\"`          | Module name that receives `UI_CONFIG_*` environment variables               |\n| `SERVICE_ACCESS_NAME`   | `\"bootstrap\"` | Module owner name used for scoped platform access                           |\n\n### Module overrides via `CATALOG_OVERRIDES_FILE`\n\nPoint `CATALOG_OVERRIDES_FILE` to a JSON file containing an array of partial module objects. Each entry is deep-merged into the matching module by `name`:\n\n```json\n[\n  {\n    \"name\": \"my-module\",\n    \"ui\": {\n      \"url\": \"http://localhost:3000\"\n    }\n  }\n]\n```\n\n### UI config injection via `UI_CONFIG_*`\n\nAny environment variable matching `UI_CONFIG_<KEY>` is parsed as JSON and injected into `ui.customProps.config.<KEY>` of the module identified by `UI_MODULE_NAME`.\n\n```bash\nUI_MODULE_NAME=shell-app\nUI_CONFIG_apiUrl='\"https://api.example.com\"'\nUI_CONFIG_featureFlags='{\"darkMode\":true}'\n```\n\n## Requirements\n\n- Node.js >= 22\n\n## License\n\nPolyForm Noncommercial 1.0.0\n","readmeFilename":"README.md"}