@aeriajs/compiler 0.0.81 → 0.0.82

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.
package/dist/parser.js CHANGED
@@ -249,14 +249,18 @@ export const parse = (tokens) => {
249
249
  }
250
250
  if ('$ref' in property) {
251
251
  switch (attributeName) {
252
- case 'purge':
253
252
  case 'inline': {
254
253
  property[attributeName] = consumeBoolean();
255
254
  return;
256
255
  }
256
+ case 'populate': {
257
+ property[attributeName] = match(TokenType.Boolean)
258
+ ? consumeBoolean()
259
+ : parseArray([TokenType.Identifier]).value;
260
+ return;
261
+ }
257
262
  case 'select':
258
263
  case 'form':
259
- case 'populate':
260
264
  case 'indexes': {
261
265
  property[attributeName] = parseArray([TokenType.Identifier]).value;
262
266
  return;
package/dist/semantic.js CHANGED
@@ -24,7 +24,7 @@ const collectionHasProperty = async (collection, propName, options = {}) => {
24
24
  };
25
25
  export const analyze = async (ast, options, errors = []) => {
26
26
  const checkCollectionForeignProperties = async (foreignCollection, property, attributeName) => {
27
- if (!property[attributeName]) {
27
+ if (!Array.isArray(property[attributeName])) {
28
28
  return;
29
29
  }
30
30
  for (const foreignPropName of property[attributeName]) {
@@ -51,7 +51,7 @@ export const analyze = async (ast, options, errors = []) => {
51
51
  }
52
52
  };
53
53
  const checkObjectLocalProperties = async (node, attributeName) => {
54
- if (!('properties' in node.property) || !node.property[attributeName]) {
54
+ if (!('properties' in node.property) || !Array.isArray(node.property[attributeName])) {
55
55
  return;
56
56
  }
57
57
  for (const index in node.property[attributeName]) {
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type ArrayProperties<T> = keyof {
2
- [P in Extract<keyof T, string> as NonNullable<T[P]> extends string[] | readonly string[] ? P : never]: never;
2
+ [P in Extract<keyof T, string> as NonNullable<T[P]> extends string[] | readonly string[] | boolean ? P : never]: never;
3
3
  };
4
4
  export declare const DEFAULT_EXPORT_SYMBOLS: {
5
5
  count: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aeriajs/compiler",
3
3
  "type": "module",
4
- "version": "0.0.81",
4
+ "version": "0.0.82",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "dist"
22
22
  ],
23
23
  "peerDependencies": {
24
- "@aeriajs/common": "^0.0.167",
25
- "@aeriajs/types": "^0.0.140"
24
+ "@aeriajs/common": "^0.0.168",
25
+ "@aeriajs/types": "^0.0.141"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@aeriajs/common": "link:../common",