@wix/himalaya-cli 0.875.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:`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.875.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": "ec18219dffbe81ace2bcd7eee3d3b546638087f0b2ea05f6e5b55258"
66
+ "falconPackageHash": "165e76dc8fe6c80270e34398c2070b203234e75c6e6b748b88abb286"
67
67
  }