@wix/himalaya-cli 0.1163.0 → 0.1165.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +32 -7
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -6783,6 +6783,7 @@ function walk(node, registry, path2, out2) {
6783
6783
  var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS;
6784
6784
  var init_tokens = __esm({
6785
6785
  "../../core/ts/src/tokens.ts"() {
6786
+ "use strict";
6786
6787
  SYSTEM_FONT_FAMILY = "$system";
6787
6788
  TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
6788
6789
  COLOR_TOKEN_PROPS = {
@@ -6833,7 +6834,6 @@ function resolveTranslation(value, catalog, sourceCatalog) {
6833
6834
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
6834
6835
  var init_bindings = __esm({
6835
6836
  "../../core/ts/src/bindings.ts"() {
6836
- "use strict";
6837
6837
  BINDING_SIGILS = ["service", "flag", "item", "t"];
6838
6838
  BINDING_SIGIL_RE = new RegExp(
6839
6839
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -71366,7 +71366,8 @@ var crawl_look_exports = {};
71366
71366
  __export(crawl_look_exports, {
71367
71367
  PAGE_EVAL: () => PAGE_EVAL,
71368
71368
  copyFromEval: () => copyFromEval,
71369
- createPlaywrightBrowser: () => createPlaywrightBrowser
71369
+ createPlaywrightBrowser: () => createPlaywrightBrowser,
71370
+ navigated: () => navigated
71370
71371
  });
71371
71372
  function patternOf(hay) {
71372
71373
  const h = hay.toLowerCase();
@@ -71477,6 +71478,34 @@ async function toPlaywrightCookies(setCookies, url) {
71477
71478
  }
71478
71479
  return out2;
71479
71480
  }
71481
+ function isTimeout(e) {
71482
+ const err = e;
71483
+ return err?.name === "TimeoutError" || /^page\.goto: Timeout \d+ms exceeded/.test(err?.message ?? "");
71484
+ }
71485
+ async function navigated(page, url, isEntry2) {
71486
+ const committedTo = () => {
71487
+ try {
71488
+ const at2 = new URL(page.url());
71489
+ const want = new URL(url);
71490
+ return at2.origin === want.origin && at2.pathname.replace(/\/$/, "") === want.pathname.replace(/\/$/, "") && at2.search === want.search;
71491
+ } catch {
71492
+ return false;
71493
+ }
71494
+ };
71495
+ try {
71496
+ await page.goto(url, { waitUntil: "domcontentloaded", timeout: 15e3 });
71497
+ return true;
71498
+ } catch (e) {
71499
+ if (committedTo()) return true;
71500
+ if (!isEntry2 || !isTimeout(e)) return false;
71501
+ }
71502
+ try {
71503
+ await page.goto(url, { waitUntil: "commit", timeout: 3e4 });
71504
+ return true;
71505
+ } catch {
71506
+ return committedTo();
71507
+ }
71508
+ }
71480
71509
  async function createPlaywrightBrowser(load = () => import("playwright"), siteFetch = guardedSiteFetch, pin = realPin) {
71481
71510
  const screenshots = [];
71482
71511
  let pw;
@@ -71601,11 +71630,7 @@ async function createPlaywrightBrowser(load = () => import("playwright"), siteFe
71601
71630
  const url = queue.shift();
71602
71631
  if (seen.has(url)) continue;
71603
71632
  seen.add(url);
71604
- try {
71605
- await page.goto(url, { waitUntil: "domcontentloaded", timeout: 15e3 });
71606
- } catch {
71607
- continue;
71608
- }
71633
+ if (!await navigated(page, url, url === siteUrl)) continue;
71609
71634
  const title = await page.title();
71610
71635
  let evaled;
71611
71636
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1163.0",
3
+ "version": "0.1165.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": [
@@ -67,5 +67,5 @@
67
67
  "artifactId": "himalaya-cli"
68
68
  }
69
69
  },
70
- "falconPackageHash": "efbdec15e5b9c09d41f6b28844709584bc9a749b54bcbefaed0bf52e"
70
+ "falconPackageHash": "cd26e82becca60af6adbc06b0a62daef4285bcf17127592281de4ad3"
71
71
  }