@aeriajs/builtins 0.0.99 → 0.0.100

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.
@@ -23,9 +23,13 @@ export declare const describe: (contextOrPayload: RouteContext | Payload) => Pro
23
23
  });
24
24
  readonly result: undefined;
25
25
  } | {
26
- descriptions: Record<string, Description>;
27
- roles?: string[] | undefined;
28
- auth?: Partial<unknown> | undefined;
29
- router?: any;
26
+ readonly _tag: "Result";
27
+ readonly error: undefined;
28
+ readonly result: {
29
+ descriptions: Record<string, Description>;
30
+ roles?: string[] | undefined;
31
+ auth?: Partial<unknown> | undefined;
32
+ router?: any;
33
+ };
30
34
  }>;
31
35
  export {};
@@ -52,7 +52,7 @@ const describe = async (contextOrPayload) => {
52
52
  result.router = await (0, core_1.getEndpoints)();
53
53
  }
54
54
  if (props.noSerialize || !('response' in contextOrPayload)) {
55
- return result;
55
+ return common_1.Result.result(result);
56
56
  }
57
57
  contextOrPayload.response.setHeader('content-type', 'application/bson');
58
58
  return contextOrPayload.response.end((0, common_1.serialize)(result));
@@ -40,7 +40,7 @@ export const describe = async (contextOrPayload) => {
40
40
  result.router = await getEndpoints();
41
41
  }
42
42
  if (props.noSerialize || !("response" in contextOrPayload)) {
43
- return result;
43
+ return Result.result(result);
44
44
  }
45
45
  contextOrPayload.response.setHeader("content-type", "application/bson");
46
46
  return contextOrPayload.response.end(serialize(result));
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  export * from './collections/index.js';
3
- export * as systemFunctions from './functions/index.js';
3
+ export * as builtinFunctions from './functions/index.js';
4
4
  import { file, tempFile, log, resourceUsage, user } from './collections/index.js';
5
5
  type File = typeof file.item;
6
6
  type TempFile = typeof tempFile.item;
package/dist/index.js CHANGED
@@ -14,9 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.collections = exports.systemFunctions = void 0;
17
+ exports.collections = exports.builtinFunctions = void 0;
18
18
  __exportStar(require("./collections/index.js"), exports);
19
- exports.systemFunctions = require("./functions/index.js");
19
+ exports.builtinFunctions = require("./functions/index.js");
20
20
  const index_js_1 = require("./collections/index.js");
21
21
  exports.collections = {
22
22
  file: index_js_1.file,
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  export * from "./collections/index.mjs";
3
- export * as systemFunctions from "./functions/index.mjs";
3
+ export * as builtinFunctions from "./functions/index.mjs";
4
4
  import {
5
5
  file,
6
6
  tempFile,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/builtins",
3
- "version": "0.0.99",
3
+ "version": "0.0.100",
4
4
  "description": "## Installation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -45,7 +45,7 @@
45
45
  "mongodb": "^6.5.0"
46
46
  },
47
47
  "peerDependencies": {
48
- "@aeriajs/core": "^0.0.99",
48
+ "@aeriajs/core": "^0.0.100",
49
49
  "@aeriajs/common": "^0.0.62",
50
50
  "@aeriajs/entrypoint": "^0.0.64",
51
51
  "@aeriajs/types": "^0.0.58",