@wix/himalaya-cli 0.876.0 → 0.877.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.
@@ -1,4 +1,9 @@
1
1
  // ../../stdlib/wix-sdk/portfolio/src/index.ts
2
+ function pagingQuery(limit, cursor) {
3
+ const parts = [`paging.limit=${encodeURIComponent(String(limit))}`];
4
+ if (cursor) parts.push(`paging.cursor=${encodeURIComponent(cursor)}`);
5
+ return parts.join("&");
6
+ }
2
7
  function wixCall(method, path, body) {
3
8
  if (!globalThis.himalaya?.wixApi) {
4
9
  return Promise.reject(new Error("@himalaya/wix-portfolio: host did not install the wixApi bridge"));
@@ -6,22 +11,13 @@ function wixCall(method, path, body) {
6
11
  return globalThis.himalaya.wixApi.call(method, path, body);
7
12
  }
8
13
  function listProjects(limit = 100, cursor) {
9
- const q = new URLSearchParams();
10
- q.set("paging.limit", String(limit));
11
- if (cursor) q.set("paging.cursor", cursor);
12
- return wixCall("GET", `/portfolio/v1/projects?${q.toString()}`);
14
+ return wixCall("GET", `/portfolio/v1/projects?${pagingQuery(limit, cursor)}`);
13
15
  }
14
16
  function listCollections(limit = 100, cursor) {
15
- const q = new URLSearchParams();
16
- q.set("paging.limit", String(limit));
17
- if (cursor) q.set("paging.cursor", cursor);
18
- return wixCall("GET", `/portfolio/v1/collections?${q.toString()}`);
17
+ return wixCall("GET", `/portfolio/v1/collections?${pagingQuery(limit, cursor)}`);
19
18
  }
20
19
  function listProjectItems(projectId, limit = 100, cursor) {
21
- const q = new URLSearchParams();
22
- q.set("paging.limit", String(limit));
23
- if (cursor) q.set("paging.cursor", cursor);
24
- return wixCall("GET", `/portfolio/v1/projects/${encodeURIComponent(projectId)}/items?${q.toString()}`);
20
+ return wixCall("GET", `/portfolio/v1/projects/${encodeURIComponent(projectId)}/items?${pagingQuery(limit, cursor)}`);
25
21
  }
26
22
  export {
27
23
  listCollections,
package/dist/cli.mjs CHANGED
@@ -5241,7 +5241,6 @@ 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";
5245
5244
  BINDING_SIGILS = ["service", "flag", "item", "t"];
5246
5245
  BINDING_SIGIL_RE = new RegExp(
5247
5246
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -27400,6 +27399,7 @@ function shouldRevealError(args) {
27400
27399
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
27401
27400
  var init_validation = __esm({
27402
27401
  "../../core/ts/src/validation.ts"() {
27402
+ "use strict";
27403
27403
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
27404
27404
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
27405
27405
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -30823,6 +30823,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
30823
30823
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
30824
30824
  var init_worker_subtree = __esm({
30825
30825
  "../../core/ts/src/worker-subtree.ts"() {
30826
+ "use strict";
30826
30827
  init_worker_subtree_safe_types_generated();
30827
30828
  WORKER_SUBTREE_CEILINGS = Object.freeze({
30828
30829
  maxEncodedBytes: 65536,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.876.0",
3
+ "version": "0.877.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": [
@@ -63,5 +63,5 @@
63
63
  "artifactId": "himalaya-cli"
64
64
  }
65
65
  },
66
- "falconPackageHash": "7be3e709d4d0bff872e0d278fffa17c9757247f0260fdd291e4d2f1a"
66
+ "falconPackageHash": "165e76dc8fe6c80270e34398c2070b203234e75c6e6b748b88abb286"
67
67
  }