@hyperfixi/core 2.9.0 → 2.9.2

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.
Files changed (65) hide show
  1. package/dist/ast-utils/index.js +905 -882
  2. package/dist/ast-utils/index.mjs +905 -882
  3. package/dist/bundle-generator/index.js +6 -0
  4. package/dist/bundle-generator/index.mjs +6 -0
  5. package/dist/bundle-generator/parser-templates.d.ts +1 -1
  6. package/dist/chunks/{bridge-D9JLmPkk.js → bridge-DwtNLKK3.js} +2 -2
  7. package/dist/chunks/browser-modular-6HT1r2AH.js +2 -0
  8. package/dist/chunks/feature-eventsource-Bxg_UNZo.js +2 -0
  9. package/dist/chunks/feature-sockets-CcTxD5sT.js +2 -0
  10. package/dist/chunks/feature-webworker-DoqZ0Grg.js +2 -0
  11. package/dist/chunks/{index-6DUg7Qjm.js → index-B8jwvuj_.js} +2 -2
  12. package/dist/commands/index.js +299 -184
  13. package/dist/commands/index.mjs +299 -184
  14. package/dist/hyperfixi-browser-classic-i18n.js +1 -1
  15. package/dist/hyperfixi-browser-minimal.js +1 -1
  16. package/dist/hyperfixi-browser-standard.js +1 -1
  17. package/dist/hyperfixi-browser.js +1 -1
  18. package/dist/hyperfixi-classic-i18n.js +1 -1
  19. package/dist/hyperfixi-hx-v4.js +1 -1
  20. package/dist/hyperfixi-hx.js +1 -1
  21. package/dist/hyperfixi-hybrid-complete.js +1 -1
  22. package/dist/hyperfixi-hybrid-hx.js +1 -1
  23. package/dist/hyperfixi-minimal.js +1 -1
  24. package/dist/hyperfixi-multilingual.js +1 -1
  25. package/dist/hyperfixi-standard.js +1 -1
  26. package/dist/hyperfixi.js +1 -1
  27. package/dist/hyperfixi.mjs +1 -1
  28. package/dist/index.js +1731 -1474
  29. package/dist/index.min.js +1 -1
  30. package/dist/index.mjs +1731 -1474
  31. package/dist/lokascript-browser-classic-i18n.js +1 -1
  32. package/dist/lokascript-browser-minimal.js +1 -1
  33. package/dist/lokascript-browser-standard.js +1 -1
  34. package/dist/lokascript-browser.js +1 -1
  35. package/dist/lokascript-hybrid-complete.js +1 -1
  36. package/dist/lokascript-hybrid-hx.js +1 -1
  37. package/dist/lokascript-multilingual.js +1 -1
  38. package/dist/lsp-metadata.js +5 -5
  39. package/dist/lsp-metadata.mjs +5 -5
  40. package/dist/metadata.js +25 -25
  41. package/dist/metadata.mjs +25 -25
  42. package/dist/multilingual/index.js +17 -17
  43. package/dist/multilingual/index.mjs +17 -17
  44. package/dist/parser/command-parsers/utility-commands.d.ts +2 -1
  45. package/dist/parser/full-parser.js +286 -178
  46. package/dist/parser/full-parser.mjs +286 -178
  47. package/dist/parser/hybrid/index.js +3 -0
  48. package/dist/parser/hybrid/index.mjs +3 -0
  49. package/dist/parser/hybrid/parser-core.js +3 -0
  50. package/dist/parser/hybrid/parser-core.mjs +3 -0
  51. package/dist/parser/hybrid-parser.js +3 -0
  52. package/dist/parser/hybrid-parser.mjs +3 -0
  53. package/dist/parser/parser.d.ts +1 -0
  54. package/dist/reference/index.js +2 -0
  55. package/dist/reference/index.mjs +2 -0
  56. package/dist/registry/index.js +286 -178
  57. package/dist/registry/index.mjs +286 -178
  58. package/dist/runtime/runtime-base.d.ts +2 -1
  59. package/dist/types/base-types.d.ts +3 -0
  60. package/dist/types/core.d.ts +1 -0
  61. package/package.json +6 -6
  62. package/dist/chunks/browser-modular-CPiVQXM0.js +0 -2
  63. package/dist/chunks/feature-eventsource-BpZvPy_K.js +0 -2
  64. package/dist/chunks/feature-sockets-CrYvjZ4j.js +0 -2
  65. package/dist/chunks/feature-webworker-BSYguEIW.js +0 -2
@@ -421,6 +421,9 @@ class HybridParser {
421
421
  if (cmdMap[normalized]) {
422
422
  return cmdMap[normalized]();
423
423
  }
424
+ if (this.match('catch', 'finally')) {
425
+ throw new Error(`'${this.peek().value}' needs the full parser (use hyperfixi.js)`);
426
+ }
424
427
  if (!this.isAtEnd() && !this.match('then', 'and', 'end', 'else')) {
425
428
  this.advance();
426
429
  }
@@ -419,6 +419,9 @@ class HybridParser {
419
419
  if (cmdMap[normalized]) {
420
420
  return cmdMap[normalized]();
421
421
  }
422
+ if (this.match('catch', 'finally')) {
423
+ throw new Error(`'${this.peek().value}' needs the full parser (use hyperfixi.js)`);
424
+ }
422
425
  if (!this.isAtEnd() && !this.match('then', 'and', 'end', 'else')) {
423
426
  this.advance();
424
427
  }
@@ -415,6 +415,9 @@ class HybridParser {
415
415
  if (cmdMap[normalized]) {
416
416
  return cmdMap[normalized]();
417
417
  }
418
+ if (this.match('catch', 'finally')) {
419
+ throw new Error(`'${this.peek().value}' needs the full parser (use hyperfixi.js)`);
420
+ }
418
421
  if (!this.isAtEnd() && !this.match('then', 'and', 'end', 'else')) {
419
422
  this.advance();
420
423
  }
@@ -413,6 +413,9 @@ class HybridParser {
413
413
  if (cmdMap[normalized]) {
414
414
  return cmdMap[normalized]();
415
415
  }
416
+ if (this.match('catch', 'finally')) {
417
+ throw new Error(`'${this.peek().value}' needs the full parser (use hyperfixi.js)`);
418
+ }
416
419
  if (!this.isAtEnd() && !this.match('then', 'and', 'end', 'else')) {
417
420
  this.advance();
418
421
  }
@@ -421,6 +421,9 @@ class HybridParser {
421
421
  if (cmdMap[normalized]) {
422
422
  return cmdMap[normalized]();
423
423
  }
424
+ if (this.match('catch', 'finally')) {
425
+ throw new Error(`'${this.peek().value}' needs the full parser (use hyperfixi.js)`);
426
+ }
424
427
  if (!this.isAtEnd() && !this.match('then', 'and', 'end', 'else')) {
425
428
  this.advance();
426
429
  }
@@ -419,6 +419,9 @@ class HybridParser {
419
419
  if (cmdMap[normalized]) {
420
420
  return cmdMap[normalized]();
421
421
  }
422
+ if (this.match('catch', 'finally')) {
423
+ throw new Error(`'${this.peek().value}' needs the full parser (use hyperfixi.js)`);
424
+ }
422
425
  if (!this.isAtEnd() && !this.match('then', 'and', 'end', 'else')) {
423
426
  this.advance();
424
427
  }
@@ -61,6 +61,7 @@ export declare class Parser {
61
61
  private parseConstructorCall;
62
62
  private parseTopLevelInitBlock;
63
63
  private parseDefFeature;
64
+ private parseErrorAndFinallyBlocks;
64
65
  private parseEventNameWithNamespace;
65
66
  private static readonly PSEUDO_COMMAND_PREPOSITIONS;
66
67
  private callExprToCommandNode;
@@ -176,6 +176,8 @@ const commands = {
176
176
  availability: 'hybrid',
177
177
  examples: [
178
178
  'fetch /api/data as json',
179
+ 'fetch https://example.com/api as json',
180
+ 'fetch /api/${id} as json',
179
181
  'fetch /api/users as html',
180
182
  'fetch /api/submit with method:"POST"',
181
183
  ],
@@ -174,6 +174,8 @@ const commands = {
174
174
  availability: 'hybrid',
175
175
  examples: [
176
176
  'fetch /api/data as json',
177
+ 'fetch https://example.com/api as json',
178
+ 'fetch /api/${id} as json',
177
179
  'fetch /api/users as html',
178
180
  'fetch /api/submit with method:"POST"',
179
181
  ],