@wix/himalaya-cli 0.915.0 → 0.917.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +26 -0
- package/guides/releasing-with-himi-serve.md +59 -0
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -50953,6 +50953,32 @@ var ServeCliClient = class {
|
|
|
50953
50953
|
revoke(app, integrity2, unrevoke = false) {
|
|
50954
50954
|
return this.request("control", "POST", `/v1/admin/${unrevoke ? "unrevoke" : "revoke"}`, { body: { app, integrity: integrity2 }, headers: this.ctrlHeaders() });
|
|
50955
50955
|
}
|
|
50956
|
+
/**
|
|
50957
|
+
* OPERATOR-ONLY: bind already-published slugs to an account that never claimed them
|
|
50958
|
+
* (POST /v1/admin/registry/backfill).
|
|
50959
|
+
*
|
|
50960
|
+
* `apply` defaults to false and the route rehearses unless it is exactly `true` — there is no
|
|
50961
|
+
* undo (the ownership store exposes no delete or transfer, and `claim` never reassigns), so
|
|
50962
|
+
* the safe outcome is the one you get by forgetting the flag. Omitting `slugs` backfills every
|
|
50963
|
+
* app the release store lists, bounded server-side.
|
|
50964
|
+
*/
|
|
50965
|
+
backfillOwnership(subject, slugs, apply) {
|
|
50966
|
+
return this.request("control", "POST", "/v1/admin/registry/backfill", {
|
|
50967
|
+
body: { subject, ...slugs ? { slugs } : {}, ...apply ? { apply: true } : {} },
|
|
50968
|
+
headers: this.ctrlHeaders()
|
|
50969
|
+
});
|
|
50970
|
+
}
|
|
50971
|
+
/**
|
|
50972
|
+
* Withdraw an app from the serve plane entirely (POST /v1/admin/release/remove).
|
|
50973
|
+
*
|
|
50974
|
+
* Distinct from `revoke`, and the difference matters: revoke is a reversible kill-switch on one
|
|
50975
|
+
* bundle integrity, while this unpublishes the app — which for a template is what "remove it from
|
|
50976
|
+
* the catalog" means. The admin portal's Templates → Manage brokered to this exact route; this is
|
|
50977
|
+
* the same call without the portal in front of it.
|
|
50978
|
+
*/
|
|
50979
|
+
removeRelease(app) {
|
|
50980
|
+
return this.request("control", "POST", "/v1/admin/release/remove", { body: { app }, headers: this.ctrlHeaders() });
|
|
50981
|
+
}
|
|
50956
50982
|
/** Write-through an OTA app-config patch (POST /v1/admin/app-config). */
|
|
50957
50983
|
setAppConfig(app, patch) {
|
|
50958
50984
|
return this.request("control", "POST", "/v1/admin/app-config", { body: { app, patch }, headers: this.ctrlHeaders() });
|
|
@@ -80,6 +80,65 @@ traffic until its gateway route was deleted on 2026-09-05; it now 404s with no r
|
|
|
80
80
|
```
|
|
81
81
|
Kill-switch a bad bundle: `himi-serve release revoke --app <app> --integrity <sri> --target bo --control-token "$TOK"`.
|
|
82
82
|
|
|
83
|
+
### Curating templates
|
|
84
|
+
|
|
85
|
+
A starter template is an app in the reserved `himi-template-<name>` namespace, so it is
|
|
86
|
+
published and promoted like any other. Withdrawing one, or killing it, is addressed by
|
|
87
|
+
**template name** rather than app id — that is what the catalog shows and what
|
|
88
|
+
`himi init --template <name>` takes:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
himi-serve template remove --name <template> --target bo --control-token "$TOK" # withdraw from the catalog
|
|
92
|
+
himi-serve template revoke --name <template> --target bo --control-token "$TOK" # kill-switch its current release
|
|
93
|
+
himi-serve template unrevoke --name <template> --target bo --control-token "$TOK" # lift it again
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
All three also take `--app <appId>` instead of `--name`. That exists for one case: a template
|
|
97
|
+
name may legally begin with `himi-template-` (the name pattern is lowercase alphanumerics and
|
|
98
|
+
inner hyphens), and such a name publishes to a **doubly** prefixed app id — so `--name` cannot
|
|
99
|
+
express it without becoming ambiguous. The CLI refuses the ambiguous form and points at `--app`. `--app` only accepts ids inside the
|
|
100
|
+
reserved namespace: a non-template id is refused, so this group cannot unpublish or
|
|
101
|
+
kill-switch an ordinary app by mistake — use the `release` group for those.
|
|
102
|
+
|
|
103
|
+
`remove` unpublishes the app; `revoke` is the reversible kill-switch, and it resolves the
|
|
104
|
+
bundle integrities from the template's current release manifest so you never paste an SRI. A
|
|
105
|
+
template with no current release, or a release with no bundles, is **refused** rather than
|
|
106
|
+
reported as a successful revocation — a kill-switch that silently switched nothing off is the
|
|
107
|
+
one failure mode worth being loud about.
|
|
108
|
+
|
|
109
|
+
### Attributing already-published apps (operator only)
|
|
110
|
+
|
|
111
|
+
Publishing a release and owning the slug are two different writes, and they have not always
|
|
112
|
+
coincided. A self-serve `himi push` claims the slug for you today, but an app published before
|
|
113
|
+
auto-claiming existed — or published by an operator or CI credential, whose scope already covers
|
|
114
|
+
the slug so it claims nothing on anyone's behalf — has a live release and **no owner**. That owner cannot
|
|
115
|
+
fix it themselves either: `claim` refuses a slug that is already published. `apps backfill` is
|
|
116
|
+
the operator door that binds those slugs to the account that should have them:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
himi-serve apps backfill --subject <accountGuid> --target bo --control-token "$TOK"
|
|
120
|
+
himi-serve apps backfill --subject <accountGuid> --slugs todo,notes --apply --target bo --control-token "$TOK"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**It rehearses unless you pass `--apply`, and there is no undo.** The ownership store has no
|
|
124
|
+
delete and no transfer, and `claim` never reassigns — so a slug bound to the wrong subject stays
|
|
125
|
+
bound, and its real owner gets `slug_taken` from then on. The safe outcome is therefore the one
|
|
126
|
+
you get by forgetting a flag: without `--apply` the route reports exactly what it *would* claim
|
|
127
|
+
and writes nothing. Omitting `--slugs` means every app the release store lists (bounded
|
|
128
|
+
server-side); an empty or valueless `--slugs` is refused rather than read as "everything", and so
|
|
129
|
+
is any argument the command does not recognise — a stray word or a mistyped flag is usually a
|
|
130
|
+
`--slugs` that went missing, and missing is the spelling that means every app.
|
|
131
|
+
|
|
132
|
+
It bypasses exactly one refusal — `slug_published` — and keeps every other: reserved names
|
|
133
|
+
(`wix-*`, `himi-template-*`, the platform names) stay unclaimable, an app someone else already
|
|
134
|
+
owns is reported `slug_taken` rather than moved, and a slug nothing has published is reported
|
|
135
|
+
`not_published` rather than reserved. The backfilled claims do not spend the owner's own
|
|
136
|
+
self-serve quota.
|
|
137
|
+
|
|
138
|
+
The route (`POST /v1/admin/registry/backfill`) is gated on **scope, not role**: a self-serve or
|
|
139
|
+
narrower-than-`*` credential is refused `operator_only_backfill`, which means no cookie caller
|
|
140
|
+
can reach it. That is the difference between a backfill and a land-grab.
|
|
141
|
+
|
|
83
142
|
### Registry visibility (public | unlisted)
|
|
84
143
|
|
|
85
144
|
Whether `GET /v1/apps` (and so the **Himi Player picker**) lists the app is a per-app,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.917.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"artifactId": "himalaya-cli"
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
"falconPackageHash": "
|
|
67
|
+
"falconPackageHash": "7152abeca53488631b587df6f4efc519c4be90f5ad95fb10c94ee27e"
|
|
68
68
|
}
|