@wix/himalaya-cli 0.889.0 → 0.890.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 +21 -10
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -5241,6 +5241,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
|
|
|
5241
5241
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
5242
5242
|
var init_bindings = __esm({
|
|
5243
5243
|
"../../core/ts/src/bindings.ts"() {
|
|
5244
|
+
"use strict";
|
|
5244
5245
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
5245
5246
|
BINDING_SIGIL_RE = new RegExp(
|
|
5246
5247
|
`^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -50649,12 +50650,21 @@ var ServeCliClient = class {
|
|
|
50649
50650
|
* One probe costs one extra request only for files that were already going to fail. */
|
|
50650
50651
|
async telemetrySend(events) {
|
|
50651
50652
|
const post = (batch) => this.request("telemetry", "POST", "/v1/telemetry/ingest", { body: batch, headers: this.telHeaders() });
|
|
50653
|
+
const settle = (r, posted) => {
|
|
50654
|
+
const j = r.json && typeof r.json === "object" ? r.json : null;
|
|
50655
|
+
const n = (k) => typeof j?.[k] === "number" ? j[k] : 0;
|
|
50656
|
+
const counted = typeof j?.accepted === "number";
|
|
50657
|
+
const accounted = n("accepted") + n("dropped") + n("failed");
|
|
50658
|
+
const lost = n("dropped") + n("failed") + (counted ? Math.max(0, posted - accounted) : 0);
|
|
50659
|
+
if (lost === 0) return r;
|
|
50660
|
+
return { ...r, ok: false, json: { ...j ?? {}, ok: false } };
|
|
50661
|
+
};
|
|
50652
50662
|
const first = await post(events);
|
|
50653
|
-
if (first.status !== 413 || events.length <= 1) return first;
|
|
50663
|
+
if (first.status !== 413 || events.length <= 1) return settle(first, events.length);
|
|
50654
50664
|
const body = first.json;
|
|
50655
|
-
if (!body || body.error !== "batch_too_large") return first;
|
|
50665
|
+
if (!body || body.error !== "batch_too_large") return settle(first, events.length);
|
|
50656
50666
|
const limit = typeof body.limit === "number" && Number.isInteger(body.limit) && body.limit > 0 ? body.limit : null;
|
|
50657
|
-
if (limit === null || limit >= events.length) return first;
|
|
50667
|
+
if (limit === null || limit >= events.length) return settle(first, events.length);
|
|
50658
50668
|
const totals = { accepted: 0, dropped: 0, failed: 0 };
|
|
50659
50669
|
const add = (r) => {
|
|
50660
50670
|
const j = r.json;
|
|
@@ -50670,16 +50680,17 @@ var ServeCliClient = class {
|
|
|
50670
50680
|
last = await post(chunk);
|
|
50671
50681
|
add(last);
|
|
50672
50682
|
if (!last.ok) {
|
|
50673
|
-
return
|
|
50683
|
+
return settle(
|
|
50684
|
+
{ ...last, json: { ...last.json ?? {}, ...totals, batched: { limit, sent, ...totals, failedAt: i } } },
|
|
50685
|
+
events.length
|
|
50686
|
+
);
|
|
50674
50687
|
}
|
|
50675
50688
|
sent += chunk.length;
|
|
50676
50689
|
}
|
|
50677
|
-
|
|
50678
|
-
|
|
50679
|
-
|
|
50680
|
-
|
|
50681
|
-
json: { ...last.json ?? {}, ...totals, batched: { limit, sent, ...totals } }
|
|
50682
|
-
};
|
|
50690
|
+
return settle(
|
|
50691
|
+
{ ...last, json: { ...last.json ?? {}, ...totals, batched: { limit, sent, ...totals } } },
|
|
50692
|
+
events.length
|
|
50693
|
+
);
|
|
50683
50694
|
}
|
|
50684
50695
|
telemetrySummary(app) {
|
|
50685
50696
|
return this.request("telemetry", "GET", `/v1/telemetry/summary?app=${encodeURIComponent(app)}`, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.890.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": "a989578e8ead1d0d6b5b71b50fbe43bb6406e5ff92239965cd6ce4eb"
|
|
68
68
|
}
|