@objectstack/runtime 3.0.9 → 3.0.10

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,5 +1,5 @@
1
1
 
2
- > @objectstack/runtime@3.0.9 build /home/runner/work/spec/spec/packages/runtime
2
+ > @objectstack/runtime@3.0.10 build /home/runner/work/spec/spec/packages/runtime
3
3
  > tsup --config ../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- CJS dist/index.cjs 53.97 KB
14
- CJS dist/index.cjs.map 116.68 KB
15
- CJS ⚡️ Build success in 141ms
16
- ESM dist/index.js 52.09 KB
17
- ESM dist/index.js.map 116.61 KB
18
- ESM ⚡️ Build success in 143ms
13
+ ESM dist/index.js 52.28 KB
14
+ ESM dist/index.js.map 117.25 KB
15
+ ESM ⚡️ Build success in 178ms
16
+ CJS dist/index.cjs 54.16 KB
17
+ CJS dist/index.cjs.map 117.31 KB
18
+ CJS ⚡️ Build success in 166ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 7223ms
20
+ DTS ⚡️ Build success in 6341ms
21
21
  DTS dist/index.d.ts 20.49 KB
22
22
  DTS dist/index.d.cts 20.49 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @objectstack/runtime
2
2
 
3
+ ## 3.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d1e5d31]
8
+ - @objectstack/spec@3.0.10
9
+ - @objectstack/core@3.0.10
10
+ - @objectstack/rest@3.0.10
11
+ - @objectstack/types@3.0.10
12
+
3
13
  ## 3.0.9
4
14
 
5
15
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -486,7 +486,11 @@ var HttpDispatcher = class {
486
486
  }
487
487
  if (parts.length === 2 && m === "GET") {
488
488
  const id = parts[1];
489
- const result = await broker.call("data.get", { object: objectName, id, ...query }, { request: context.request });
489
+ const { select, expand } = query || {};
490
+ const allowedParams = {};
491
+ if (select != null) allowedParams.select = select;
492
+ if (expand != null) allowedParams.expand = expand;
493
+ const result = await broker.call("data.get", { object: objectName, id, ...allowedParams }, { request: context.request });
490
494
  return { handled: true, response: this.success(result) };
491
495
  }
492
496
  if (parts.length === 2 && m === "PATCH") {
@@ -501,7 +505,7 @@ var HttpDispatcher = class {
501
505
  }
502
506
  } else {
503
507
  if (m === "GET") {
504
- const result = await broker.call("data.query", { object: objectName, filters: query }, { request: context.request });
508
+ const result = await broker.call("data.query", { object: objectName, query }, { request: context.request });
505
509
  return { handled: true, response: this.success(result) };
506
510
  }
507
511
  if (m === "POST") {
@@ -922,8 +926,8 @@ var HttpDispatcher = class {
922
926
  if (endpoint.objectParams) {
923
927
  const { object, operation } = endpoint.objectParams;
924
928
  if (operation === "find") {
925
- const result = await broker.call("data.query", { object, filters: query }, { request: context.request });
926
- return { handled: true, response: this.success(result.data, { count: result.count }) };
929
+ const result = await broker.call("data.query", { object, query }, { request: context.request });
930
+ return { handled: true, response: this.success(result.records, { total: result.total }) };
927
931
  }
928
932
  if (operation === "get" && query.id) {
929
933
  const result = await broker.call("data.get", { object, id: query.id }, { request: context.request });