@wix/himalaya-cli 0.1790.0 → 0.1791.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
CHANGED
|
@@ -4411,6 +4411,7 @@ var init_himi_package = __esm({
|
|
|
4411
4411
|
var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
|
|
4412
4412
|
var init_icon_catalog_generated = __esm({
|
|
4413
4413
|
"../../core/ts/src/icon-catalog.generated.ts"() {
|
|
4414
|
+
"use strict";
|
|
4414
4415
|
init_define_HHP_CATALOG();
|
|
4415
4416
|
ICON_VIEW_BOX = 24;
|
|
4416
4417
|
ICON_STROKE_WIDTH = 2;
|
|
@@ -42161,6 +42162,7 @@ function shouldRevealError(args) {
|
|
|
42161
42162
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
|
|
42162
42163
|
var init_validation = __esm({
|
|
42163
42164
|
"../../core/ts/src/validation.ts"() {
|
|
42165
|
+
"use strict";
|
|
42164
42166
|
init_define_HHP_CATALOG();
|
|
42165
42167
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
42166
42168
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
@@ -253248,6 +253250,11 @@ async function runStoreHandoff(pos, flags, io2, deps = {}) {
|
|
|
253248
253250
|
const asked = (text19(flags.scope) ?? "read").split(",").map((s5) => s5.trim()).filter(Boolean);
|
|
253249
253251
|
const scope3 = handoff ? void 0 : normalizeRelopsScope(platform === "android" ? [...asked, ...RELOPS_ANDROID_SCOPES] : asked);
|
|
253250
253252
|
if (!handoff && !scope3) throw new UsageError6(`--scope is "read" or "read,submit" (allowed: ${RELOPS_SCOPES.join(", ")}; every scope needs read)`);
|
|
253253
|
+
const poolPackage = text19(flags["pool-package"]);
|
|
253254
|
+
if (flags["pool-package"] !== void 0 && (handoff || platform !== "android")) throw new UsageError6("--pool-package is for `store relops request --platform android`");
|
|
253255
|
+
if (flags["pool-package"] !== void 0 && (!poolPackage || !isAndroidPackageName(poolPackage) || isWixPackageName(poolPackage) || hasStorePackagePrefix(poolPackage))) {
|
|
253256
|
+
throw new UsageError6(`--pool-package needs your own Google Play package: a valid name, outside Wix's namespaces and not ${STORE_PACKAGE_PREFIX}.* (a ${STORE_PACKAGE_PREFIX}.* package is saved with himi store app set)`);
|
|
253257
|
+
}
|
|
253251
253258
|
const appleAppIds = (text19(flags["apple-app-id"]) ?? "").split(",").map((s5) => s5.trim()).filter(Boolean);
|
|
253252
253259
|
if (appleAppIds.some((id) => !/^[0-9]{6,20}$/.test(id))) throw new UsageError6("--apple-app-id is the App Store Connect app id (digits)");
|
|
253253
253260
|
if (!handoff && appleAppIds.length) throw new UsageError6("--apple-app-id is for `store handoff`");
|
|
@@ -253265,7 +253272,7 @@ async function runStoreHandoff(pos, flags, io2, deps = {}) {
|
|
|
253265
253272
|
session = owner.session;
|
|
253266
253273
|
}
|
|
253267
253274
|
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
253268
|
-
if (!handoff) return await requestConsent({ app: app2, site, scope: scope3, session, flags, io: io2, deps, fetchImpl });
|
|
253275
|
+
if (!handoff) return await requestConsent({ app: app2, site, scope: scope3, ...poolPackage ? { poolPackage } : {}, session, flags, io: io2, deps, fetchImpl });
|
|
253269
253276
|
const built = await buildLocalHandoff({ dir, file: file2, appleAppIds, deps, io: io2 });
|
|
253270
253277
|
if (!built.ok) return fail9(io2, built.code, built.error, built.extra);
|
|
253271
253278
|
const { bundle, summary: summary2 } = built;
|
|
@@ -253348,10 +253355,11 @@ async function requestConsent(o2) {
|
|
|
253348
253355
|
const ask4 = o2.deps.ask === void 0 ? process.stdin.isTTY && process.stderr.isTTY ? ttyAsk2() : void 0 : o2.deps.ask ?? void 0;
|
|
253349
253356
|
if (!ask4) return fail9(io2, "confirmation_required", "this grants Wix Release Operations staff access to the app; confirm at a terminal, or pass --yes", { app: app2, site, scope: scope3 });
|
|
253350
253357
|
io2.error(`This lets Wix Release Operations staff ${scope3.map((s5) => SCOPE_WORDS[s5]).join(", and ")} \u2014 for app ${app2} on site ${site}.`);
|
|
253358
|
+
if (o2.poolPackage) io2.error(`It also names ${o2.poolPackage}, your own Google Play app, as the one Wix's closed-test pool may test for this app.`);
|
|
253351
253359
|
const answer = (await ask4(`Type the app id (${app2}) or "yes" to agree:`)).trim();
|
|
253352
253360
|
if (answer !== app2 && answer.toLowerCase() !== "yes") return fail9(io2, "consent_declined", "not confirmed; nothing was recorded", { app: app2, site });
|
|
253353
253361
|
}
|
|
253354
|
-
const r3 = await recordRelopsConsent({ app: app2, site, scope: scope3, session: o2.session, fetchImpl: o2.fetchImpl });
|
|
253362
|
+
const r3 = await recordRelopsConsent({ app: app2, site, scope: scope3, ...o2.poolPackage ? { poolPackage: o2.poolPackage } : {}, session: o2.session, fetchImpl: o2.fetchImpl });
|
|
253355
253363
|
if (!r3.ok) return fail9(io2, "consent_failed", r3.error, r3.extra);
|
|
253356
253364
|
io2.log(JSON.stringify({ ok: true, ...r3.consent }));
|
|
253357
253365
|
return 0;
|
|
@@ -253360,13 +253368,13 @@ async function recordRelopsConsent(o2) {
|
|
|
253360
253368
|
const { app: app2, site, scope: scope3 } = o2;
|
|
253361
253369
|
let r3;
|
|
253362
253370
|
try {
|
|
253363
|
-
r3 = await postPlane(o2.session, RELOPS_CONSENT_PATH, { app: app2, site, scope: scope3 }, o2.fetchImpl);
|
|
253371
|
+
r3 = await postPlane(o2.session, RELOPS_CONSENT_PATH, { app: app2, site, scope: scope3, ...o2.poolPackage ? { poolPackage: o2.poolPackage } : {} }, o2.fetchImpl);
|
|
253364
253372
|
} catch {
|
|
253365
253373
|
return { ok: false, error: "could not reach the publishing service; nothing was recorded", extra: { next: "check your network and himi login, then run this again" } };
|
|
253366
253374
|
}
|
|
253367
253375
|
if (r3.status !== 201 || typeof r3.body.consentId !== "string") return { ok: false, error: "the publishing service did not record the consent", extra: planeRefusal(r3) };
|
|
253368
253376
|
const b3 = r3.body;
|
|
253369
|
-
return { ok: true, consent: { consentId: b3.consentId, msid: b3.msid ?? site, appId: b3.appId ?? app2, ...typeof b3.accountId === "string" ? { accountId: b3.accountId } : {}, at: b3.at, scope: b3.scope ?? scope3 } };
|
|
253377
|
+
return { ok: true, consent: { consentId: b3.consentId, msid: b3.msid ?? site, appId: b3.appId ?? app2, ...typeof b3.accountId === "string" ? { accountId: b3.accountId } : {}, at: b3.at, scope: b3.scope ?? scope3, ...typeof b3.poolPackage === "string" ? { poolPackage: b3.poolPackage } : {} } };
|
|
253370
253378
|
}
|
|
253371
253379
|
var STORE_HANDOFF_USAGE, STORE_HANDOFF_PATH, RELOPS_CONSENT_PATH, STORE_HANDOFF_CODES, text19, SITE_RE5, UsageError6, PARAM_ALLOW, MAX_TEXT3, MAX_LIST, isObj5, clean, num4, def, lc2, postPlane, SCOPE_WORDS;
|
|
253372
253380
|
var init_store_handoff = __esm({
|
|
@@ -253375,7 +253383,8 @@ var init_store_handoff = __esm({
|
|
|
253375
253383
|
init_store_handoff_bundle();
|
|
253376
253384
|
init_store_host();
|
|
253377
253385
|
init_store_google_host();
|
|
253378
|
-
|
|
253386
|
+
init_containers_builder();
|
|
253387
|
+
STORE_HANDOFF_USAGE = "himi store handoff [--dir <app>] [--app <id> --site <msid>] [--apple-app-id <id>[,<id>]] [--out <file> | --dry-run] | himi store relops request [--dir <app>] [--app <id> --site <msid>] [--platform ios|android [--pool-package <package>]] [--scope read|read,submit] [--yes]";
|
|
253379
253388
|
STORE_HANDOFF_PATH = "/v1/admin/site/store-handoff";
|
|
253380
253389
|
RELOPS_CONSENT_PATH = "/v1/admin/site/relops-consent";
|
|
253381
253390
|
STORE_HANDOFF_CODES = [
|
|
@@ -1113,7 +1113,7 @@ these codes. None of them prints a token.
|
|
|
1113
1113
|
|
|
1114
1114
|
## `himi store handoff` and `himi store relops request` codes
|
|
1115
1115
|
|
|
1116
|
-
Both print one JSON envelope: the result on stdout (`ok: true`, with `handoffId` or `consentId`), or a failure on
|
|
1116
|
+
Both print one JSON envelope: the result on stdout (`ok: true`, with `handoffId` or `consentId`, and `poolPackage` when one was named), or a failure on
|
|
1117
1117
|
stderr with one of these codes. A refusal from the publishing service keeps its own code in `planeCode` and its HTTP
|
|
1118
1118
|
`status`.
|
|
1119
1119
|
|
|
@@ -1129,7 +1129,7 @@ stderr with one of these codes. A refusal from the publishing service keeps its
|
|
|
1129
1129
|
| `bundle_contains_secret` | Something secret-shaped survived the clean-up, so the bundle was not sent. |
|
|
1130
1130
|
| `confirmation_required` | `relops request` without a terminal needs `--yes`. Nothing was sent. |
|
|
1131
1131
|
| `consent_declined` | You did not confirm at the terminal. Nothing was sent. |
|
|
1132
|
-
| `handoff_failed` / `consent_failed` | The publishing service refused or could not be reached; `planeCode` and `status` say which. |
|
|
1132
|
+
| `handoff_failed` / `consent_failed` | The publishing service refused or could not be reached; `planeCode` and `status` say which (`invalid_pool_package`: the `--pool-package` name was refused). |
|
|
1133
1133
|
|
|
1134
1134
|
## `himi store relops request|end --platform android --seat-email` and `himi store google create-app` codes
|
|
1135
1135
|
|
|
@@ -240,7 +240,12 @@ with no deploy. Add and status need the owner's
|
|
|
240
240
|
`play-console` consent under 90 days (403 `relops_consent_required`); **end and teardown need no consent** (they only
|
|
241
241
|
cancel Himi's own entries, which reduces exposure, so RelOps can always end). Add holds at most `HIMI_POOL_MAX_ACTIVE`
|
|
242
242
|
(default 5) open entries (429 `store_pool_full`), reserved atomically on the index row before the service is called.
|
|
243
|
-
The package is
|
|
243
|
+
The package is never taken from the request: it is the Containers app's saved `himi.*` package for the site the app
|
|
244
|
+
holds, or, for an owner-signed app with none, the `poolPackage` the owner named in their live `play-console` consent
|
|
245
|
+
(`himi store relops request --platform android --pool-package <package>`; 400 `invalid_pool_package` for a Wix-reserved, `himi.*`
|
|
246
|
+
or malformed name, or without `play-console`). The add answers `packageSource: store-app | owner-consent`, the row keeps
|
|
247
|
+
both, and the audit line carries the package. End and the sweep use the row's package; the sweep cancels an
|
|
248
|
+
owner-consent row (`app_unclaimed`) once the owner's live consent no longer names that package.
|
|
244
249
|
|
|
245
250
|
Himi's own table lives in cloudStore (`himi/store-pool/<app>/<msid>` plus the index row `himi/store-pool/index`): package,
|
|
246
251
|
msid, addedBy, addedAt, deadline (addedAt + 21 days), state `adding | active | ending | archived | stuck | failed`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1791.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": [
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"artifactId": "himalaya-cli"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"falconPackageHash": "
|
|
85
|
+
"falconPackageHash": "b1e4f6b29f897edb559a3eeda5db714e028eebc3941ef7a1defdef70"
|
|
86
86
|
}
|