@aeriajs/compiler 0.0.25 → 0.0.26

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.
@@ -87,6 +87,9 @@ const makeTSCollectionSchema = (collectionNode, collectionId) => {
87
87
  case 'search':
88
88
  collectionSchema.description[key] = collectionNode[key];
89
89
  break;
90
+ case 'layout':
91
+ collectionSchema.description[key] = collectionNode[key];
92
+ break;
90
93
  case 'required':
91
94
  collectionSchema.description[key] = collectionNode[key];
92
95
  break;
@@ -82,6 +82,9 @@ const makeTSCollectionSchema = (collectionNode, collectionId) => {
82
82
  case "search":
83
83
  collectionSchema.description[key] = collectionNode[key];
84
84
  break;
85
+ case "layout":
86
+ collectionSchema.description[key] = collectionNode[key];
87
+ break;
85
88
  case "required":
86
89
  collectionSchema.description[key] = collectionNode[key];
87
90
  break;
package/dist/lexer.js CHANGED
@@ -150,7 +150,7 @@ const TOKENS = [
150
150
  type: token_js_1.TokenType.Keyword,
151
151
  matcher: Array.from(keywordsSet),
152
152
  condition: (state, lastToken) => {
153
- if (state.inPropertiesStack.at(-1)) {
153
+ if (state.variableScopeStack.at(-1)) {
154
154
  return false;
155
155
  }
156
156
  if (lastToken && lastToken.type === token_js_1.TokenType.Keyword) {
@@ -190,7 +190,7 @@ const tokenize = function (rawInput) {
190
190
  const tokens = [];
191
191
  const errors = [];
192
192
  const state = {
193
- inPropertiesStack: [],
193
+ variableScopeStack: [],
194
194
  };
195
195
  while (index < input.length) {
196
196
  let hasMatch = false;
@@ -260,6 +260,7 @@ const tokenize = function (rawInput) {
260
260
  };
261
261
  switch (type) {
262
262
  case token_js_1.TokenType.LeftBracket: {
263
+ let variableScope = false;
263
264
  if (lastToken && lastToken.type === token_js_1.TokenType.Keyword) {
264
265
  switch (lastToken.value) {
265
266
  case 'information':
@@ -270,19 +271,17 @@ const tokenize = function (rawInput) {
270
271
  case 'writable':
271
272
  case 'required':
272
273
  case 'properties': {
273
- state.inPropertiesStack.push(true);
274
+ variableScope = true;
274
275
  break;
275
276
  }
276
- default: {
277
- state.inPropertiesStack.push(false);
278
- }
279
277
  }
280
278
  }
279
+ state.variableScopeStack.push(variableScope);
281
280
  break;
282
281
  }
283
282
  case token_js_1.TokenType.RightBracket: {
284
- if (state.inPropertiesStack.length > 0) {
285
- state.inPropertiesStack.pop();
283
+ if (state.variableScopeStack.length > 0) {
284
+ state.variableScopeStack.pop();
286
285
  }
287
286
  break;
288
287
  }
package/dist/lexer.mjs CHANGED
@@ -157,7 +157,7 @@ const TOKENS = [
157
157
  type: TokenType.Keyword,
158
158
  matcher: Array.from(keywordsSet),
159
159
  condition: (state, lastToken) => {
160
- if (state.inPropertiesStack.at(-1)) {
160
+ if (state.variableScopeStack.at(-1)) {
161
161
  return false;
162
162
  }
163
163
  if (lastToken && lastToken.type === TokenType.Keyword) {
@@ -197,7 +197,7 @@ export const tokenize = function(rawInput) {
197
197
  const tokens = [];
198
198
  const errors = [];
199
199
  const state = {
200
- inPropertiesStack: []
200
+ variableScopeStack: []
201
201
  };
202
202
  while (index < input.length) {
203
203
  let hasMatch = false;
@@ -262,6 +262,7 @@ export const tokenize = function(rawInput) {
262
262
  };
263
263
  switch (type) {
264
264
  case TokenType.LeftBracket: {
265
+ let variableScope = false;
265
266
  if (lastToken && lastToken.type === TokenType.Keyword) {
266
267
  switch (lastToken.value) {
267
268
  case "information":
@@ -272,19 +273,17 @@ export const tokenize = function(rawInput) {
272
273
  case "writable":
273
274
  case "required":
274
275
  case "properties": {
275
- state.inPropertiesStack.push(true);
276
+ variableScope = true;
276
277
  break;
277
278
  }
278
- default: {
279
- state.inPropertiesStack.push(false);
280
- }
281
279
  }
282
280
  }
281
+ state.variableScopeStack.push(variableScope);
283
282
  break;
284
283
  }
285
284
  case TokenType.RightBracket: {
286
- if (state.inPropertiesStack.length > 0) {
287
- state.inPropertiesStack.pop();
285
+ if (state.variableScopeStack.length > 0) {
286
+ state.variableScopeStack.pop();
288
287
  }
289
288
  break;
290
289
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/compiler",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",