@aeriajs/compiler 0.0.51 → 0.0.53

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.
@@ -7,7 +7,7 @@ export declare const ArraySymbol: unique symbol;
7
7
  export type StringifyProperty = unknown | {
8
8
  [UnquotedSymbol]: string;
9
9
  };
10
- export declare const getExposedFunctions: (astFunctions: NonNullable<AST.CollectionNode["functions"]>) => {
10
+ export declare const getExposedFunctions: (functionNodes: AST.FunctionNode[]) => {
11
11
  [k: string]: import("@aeriajs/types").AccessCondition;
12
12
  };
13
13
  export declare const makeASTImports: (ast: AST.Node[], initialImports?: Record<string, Set<string>>, options?: {
@@ -5,10 +5,10 @@ exports.PACKAGE_NAME = 'aeria';
5
5
  exports.MIDDLEWARES_RUNTIME_PATH = '../../../dist/middlewares/index.js';
6
6
  exports.UnquotedSymbol = Symbol('unquoted');
7
7
  exports.ArraySymbol = Symbol('array');
8
- const getExposedFunctions = (astFunctions) => {
9
- return Object.fromEntries(Object.entries(astFunctions).map(([key, value]) => [
10
- key,
11
- value.accessCondition,
8
+ const getExposedFunctions = (functionNodes) => {
9
+ return Object.fromEntries(functionNodes.map((node) => [
10
+ node.name,
11
+ node.accessCondition,
12
12
  ]));
13
13
  };
14
14
  exports.getExposedFunctions = getExposedFunctions;
@@ -3,10 +3,10 @@ export const PACKAGE_NAME = "aeria";
3
3
  export const MIDDLEWARES_RUNTIME_PATH = "../../../dist/middlewares/index.mjs";
4
4
  export const UnquotedSymbol = Symbol("unquoted");
5
5
  export const ArraySymbol = Symbol("array");
6
- export const getExposedFunctions = (astFunctions) => {
7
- return Object.fromEntries(Object.entries(astFunctions).map(([key, value]) => [
8
- key,
9
- value.accessCondition
6
+ export const getExposedFunctions = (functionNodes) => {
7
+ return Object.fromEntries(functionNodes.map((node) => [
8
+ node.name,
9
+ node.accessCondition
10
10
  ]));
11
11
  };
12
12
  export const makeASTImports = (ast, initialImports = {}, options = {
package/dist/compile.js CHANGED
@@ -52,7 +52,7 @@ const postflight = (ast) => {
52
52
  errors.push(new diagnostic_js_1.Diagnostic(`invalid function set "${functionSetName}"`, location));
53
53
  continue;
54
54
  }
55
- Object.assign(node.functions, functionSet.functions);
55
+ node.functions.push(...functionSet.functions);
56
56
  }
57
57
  }
58
58
  }
package/dist/compile.mjs CHANGED
@@ -17,7 +17,7 @@ export const postflight = (ast) => {
17
17
  errors.push(new Diagnostic(`invalid function set "${functionSetName}"`, location));
18
18
  continue;
19
19
  }
20
- Object.assign(node.functions, functionSet.functions);
20
+ node.functions.push(...functionSet.functions);
21
21
  }
22
22
  }
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/compiler",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -21,8 +21,8 @@
21
21
  "dist"
22
22
  ],
23
23
  "peerDependencies": {
24
- "@aeriajs/common": "^0.0.151",
25
- "@aeriajs/types": "^0.0.129"
24
+ "@aeriajs/common": "^0.0.152",
25
+ "@aeriajs/types": "^0.0.130"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@aeriajs/common": "link:../common",