@ws-test-realm/admin-kit
v0.2.7-ng16
Published
Workflow CLI + scaffolding for Wiresphere admin-modules workspaces (Angular 16 + native-federation line). Ships `ws-init-workspace`, `ws-modules` (build+deploy driver), `ws-generate-module`/`ws-drop-module`, `ws-wire-host`, `ws-wire-pom`, `ws-sync-paths`,
Readme
@moodia/ws-schematics-remotes
Provisional Node CLI for building federated admin remotes. Wraps an
already-built lib dist into a <id>/{federation.json, remote/*} layout
that drops directly into the admin federation controller's serving
directory or into a jar for jar-served deployment.
Install (local, until published)
cd /Users/ph/projects/ws-admin/ws-schematics-remotes
npm install
npm linkws-pack-remote is now available globally.
Use
# from the workspace root (e.g. runtime-admin-modules)
npx ng build crm # produce dist/crm
ws-pack-remote --project projects/crm --workspace . # produce dist/admin-remotes/crm/Output:
dist/admin-remotes/crm/
federation.json
remote/
remoteEntry.js
*.jsDeploy with a single rsync:
rsync -a --delete dist/admin-remotes/crm/ \
/Users/ph/projects/wpm/ws-fiddle/scripts/ext-admin-remotes/crm/Identity defaults (no config required)
| field | default |
| ------------- | -------------------------- |
| id | path.basename(--project) |
| hostId | "admin" |
| remoteName | camelCase(id) + "Module" |
| exposes | "./Module" |
| displayName | id |
Override any of these via CLI flags. For rare cases where convention
isn't enough, drop a pack.config.json in the project root — see below.
CLI
ws-pack-remote
--project <path> required: lib project root
--workspace <path> required: workspace root (resolves dist/<lib>)
[--out <dir>] default: <workspace>/dist/admin-remotes
[--id <id>]
[--host <hostId>]
[--remote-name <s>]
[--exposes <key>]
[--display-name <s>]
[--config <file>] alt path to pack.config.jsonpack.config.json (optional escape hatch)
Used only when convention can't capture intent (id ≠ dir name, project- specific shared overrides, non-default hostId). Every field optional:
{
"id": "crm",
"hostId": "admin",
"remoteName": "crmModule",
"exposes": "./Module",
"displayName": "crm",
"sharedExtras": {
"<package>": { "singleton": true, "requiredVersion": false }
}
}Identity precedence: CLI > pack.config.json > defaults.
