@harrylabsj/kiwi-merchant-cloud 0.12.0 → 0.12.2

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 (50) hide show
  1. package/app/cloud/bootstrap.d.ts +2 -0
  2. package/app/cloud/bootstrap.js +93 -10
  3. package/app/cloud/bootstrap.js.map +1 -1
  4. package/app/cloud/catalog-client.d.ts +2 -0
  5. package/app/cloud/catalog-client.js +5 -1
  6. package/app/cloud/catalog-client.js.map +1 -1
  7. package/app/cloud/connect-service.d.ts +153 -0
  8. package/app/cloud/connect-service.js +897 -0
  9. package/app/cloud/connect-service.js.map +1 -0
  10. package/app/cloud/file-listing-publication.d.ts +105 -0
  11. package/app/cloud/file-listing-publication.js +436 -0
  12. package/app/cloud/file-listing-publication.js.map +1 -0
  13. package/app/cloud/merchant-connect.d.ts +19 -13
  14. package/app/cloud/merchant-connect.js +43 -284
  15. package/app/cloud/merchant-connect.js.map +1 -1
  16. package/app/cloud-sample/products.json +3 -3
  17. package/app/http/merchant-management/api.d.ts +23 -1
  18. package/app/http/merchant-management/api.js +141 -1
  19. package/app/http/merchant-management/api.js.map +1 -1
  20. package/app/http/merchant-management/page.d.ts +4 -1
  21. package/app/http/merchant-management/page.js +126 -7
  22. package/app/http/merchant-management/page.js.map +1 -1
  23. package/build-manifest.json +116 -86
  24. package/node_modules/@hono/node-server/dist/early-hints.cjs +1 -1
  25. package/node_modules/@hono/node-server/dist/early-hints.mjs +1 -1
  26. package/node_modules/@hono/node-server/dist/index.cjs +41 -19
  27. package/node_modules/@hono/node-server/dist/index.mjs +42 -20
  28. package/node_modules/@hono/node-server/dist/serve-static.cjs +1 -0
  29. package/node_modules/@hono/node-server/dist/serve-static.d.cts +2 -1
  30. package/node_modules/@hono/node-server/dist/serve-static.d.mts +2 -1
  31. package/node_modules/@hono/node-server/dist/serve-static.mjs +1 -0
  32. package/node_modules/@hono/node-server/package.json +3 -2
  33. package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +1 -1
  34. package/node_modules/hono/dist/cjs/jsx/utils.js +1 -1
  35. package/node_modules/hono/dist/cjs/middleware/combine/index.js +3 -1
  36. package/node_modules/hono/dist/cjs/middleware/etag/index.js +2 -2
  37. package/node_modules/hono/dist/cjs/middleware/language/language.js +1 -1
  38. package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +1 -0
  39. package/node_modules/hono/dist/jsx/utils.js +1 -1
  40. package/node_modules/hono/dist/middleware/combine/index.js +3 -1
  41. package/node_modules/hono/dist/middleware/etag/index.js +2 -2
  42. package/node_modules/hono/dist/middleware/serve-static/index.js +1 -0
  43. package/node_modules/hono/package.json +2 -2
  44. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +19 -18
  45. package/node_modules/yaml/browser/dist/nodes/Alias.js +25 -23
  46. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +19 -18
  47. package/node_modules/yaml/dist/nodes/Alias.js +25 -23
  48. package/node_modules/yaml/package.json +1 -1
  49. package/package.json +2 -2
  50. package/runtime-package.json +2 -2
@@ -45,38 +45,40 @@ class Alias extends Node.NodeBase {
45
45
  if (node.anchor === this.source)
46
46
  found = node;
47
47
  }
48
+ if (found && ctx) {
49
+ const { anchors, doc, maxAliasCount } = ctx;
50
+ let data = anchors.get(found);
51
+ if (!data) {
52
+ // Resolve anchors for Node.prototype.toJS()
53
+ toJS.toJS(found, null, ctx);
54
+ data = anchors.get(found);
55
+ }
56
+ /* istanbul ignore if */
57
+ if (data?.res === undefined) {
58
+ const msg = 'This should not happen: Alias anchor was not resolved?';
59
+ throw new ReferenceError(msg);
60
+ }
61
+ if (maxAliasCount >= 0) {
62
+ data.count += 1;
63
+ if (data.aliasCount === 0)
64
+ data.aliasCount = getAliasCount(doc, found, anchors);
65
+ if (data.count * data.aliasCount > maxAliasCount) {
66
+ const msg = 'Excessive alias count indicates a resource exhaustion attack';
67
+ throw new ReferenceError(msg);
68
+ }
69
+ }
70
+ }
48
71
  return found;
49
72
  }
50
73
  toJSON(_arg, ctx) {
51
74
  if (!ctx)
52
75
  return { source: this.source };
53
- const { anchors, doc, maxAliasCount } = ctx;
54
- const source = this.resolve(doc, ctx);
76
+ const source = this.resolve(ctx.doc, ctx);
55
77
  if (!source) {
56
78
  const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
57
79
  throw new ReferenceError(msg);
58
80
  }
59
- let data = anchors.get(source);
60
- if (!data) {
61
- // Resolve anchors for Node.prototype.toJS()
62
- toJS.toJS(source, null, ctx);
63
- data = anchors.get(source);
64
- }
65
- /* istanbul ignore if */
66
- if (data?.res === undefined) {
67
- const msg = 'This should not happen: Alias anchor was not resolved?';
68
- throw new ReferenceError(msg);
69
- }
70
- if (maxAliasCount >= 0) {
71
- data.count += 1;
72
- if (data.aliasCount === 0)
73
- data.aliasCount = getAliasCount(doc, source, anchors);
74
- if (data.count * data.aliasCount > maxAliasCount) {
75
- const msg = 'Excessive alias count indicates a resource exhaustion attack';
76
- throw new ReferenceError(msg);
77
- }
78
- }
79
- return data.res;
81
+ return ctx.anchors.get(source).res;
80
82
  }
81
83
  toString(ctx, _onComment, _onChompKeep) {
82
84
  const src = `*${this.source}`;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yaml",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "license": "ISC",
5
5
  "author": "Eemeli Aro <eemeli@gmail.com>",
6
6
  "funding": "https://github.com/sponsors/eemeli",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harrylabsj/kiwi-merchant-cloud",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "Kiwi merchant cloud runtime package",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "@simplewebauthn/server": "14.0.2",
27
27
  "ajv": "8.20.0",
28
28
  "ajv-formats": "3.0.1",
29
- "yaml": "2.9.0"
29
+ "yaml": "2.9.1"
30
30
  },
31
31
  "bundleDependencies": [
32
32
  "@modelcontextprotocol/sdk",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harrylabsj/kiwi-cloud-runtime",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -15,7 +15,7 @@
15
15
  "@simplewebauthn/server": "14.0.2",
16
16
  "ajv": "8.20.0",
17
17
  "ajv-formats": "3.0.1",
18
- "yaml": "2.9.0"
18
+ "yaml": "2.9.1"
19
19
  },
20
20
  "engines": {
21
21
  "node": ">=22.5.0"