@spotlightjs/spotlight 4.11.4 → 4.11.5

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 (173) hide show
  1. package/dist/_virtual/ajv.js +6 -3
  2. package/dist/_virtual/ajv2.js +13 -0
  3. package/dist/_virtual/index.js +6 -3
  4. package/dist/_virtual/index10.js +3 -3
  5. package/dist/_virtual/index11.js +3 -3
  6. package/dist/_virtual/index12.js +13 -0
  7. package/dist/_virtual/index2.js +3 -3
  8. package/dist/_virtual/index3.js +3 -3
  9. package/dist/_virtual/index4.js +3 -3
  10. package/dist/_virtual/index5.js +3 -3
  11. package/dist/_virtual/index6.js +3 -3
  12. package/dist/_virtual/index7.js +3 -3
  13. package/dist/_virtual/index8.js +3 -3
  14. package/dist/_virtual/index9.js +3 -3
  15. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +1 -1
  16. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +1 -1
  17. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +3 -3
  18. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js +203 -194
  19. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js.map +1 -1
  20. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js +47 -47
  21. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js.map +1 -1
  22. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js +77 -69
  23. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js.map +1 -1
  24. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js +78 -81
  25. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js.map +1 -1
  26. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js +145 -136
  27. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js.map +1 -1
  28. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js +692 -685
  29. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js.map +1 -1
  30. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js +143 -135
  31. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -1
  32. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js +122 -116
  33. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js.map +1 -1
  34. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js +216 -214
  35. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js.map +1 -1
  36. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js +43 -35
  37. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js.map +1 -1
  38. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js +19 -11
  39. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js.map +1 -1
  40. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js +149 -144
  41. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js.map +1 -1
  42. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js +31 -25
  43. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js.map +1 -1
  44. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js +164 -160
  45. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js.map +1 -1
  46. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js +23 -17
  47. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -1
  48. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js +7 -10
  49. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -1
  50. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js +174 -173
  51. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -1
  52. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js +5 -7
  53. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -1
  54. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js +21 -28
  55. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js.map +1 -1
  56. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js +11 -15
  57. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -1
  58. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js +5 -7
  59. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -1
  60. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js +571 -570
  61. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js.map +1 -1
  62. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json.js +3 -17
  63. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json.js.map +1 -1
  64. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +4 -236
  65. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -1
  66. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js +16 -7
  67. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js.map +1 -1
  68. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js +27 -18
  69. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -1
  70. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js +16 -7
  71. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js.map +1 -1
  72. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js.map +1 -1
  73. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +55 -48
  74. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -1
  75. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +104 -99
  76. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -1
  77. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +30 -22
  78. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -1
  79. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +20 -12
  80. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -1
  81. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -88
  82. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -1
  83. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +94 -88
  84. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -1
  85. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js +71 -64
  86. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -1
  87. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js +67 -74
  88. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -1
  89. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js +60 -54
  90. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -1
  91. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +41 -36
  92. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -1
  93. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js +34 -26
  94. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -1
  95. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -53
  96. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -1
  97. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +73 -67
  98. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -1
  99. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +20 -12
  100. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -1
  101. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +61 -55
  102. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -1
  103. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +46 -39
  104. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -1
  105. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +21 -13
  106. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -1
  107. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js +132 -129
  108. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js.map +1 -1
  109. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js +17 -8
  110. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -1
  111. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js +27 -20
  112. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -1
  113. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js +121 -118
  114. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -1
  115. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -100
  116. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
  117. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +15 -9
  118. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -1
  119. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js +30 -26
  120. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -1
  121. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js +84 -76
  122. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -1
  123. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js +16 -8
  124. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -1
  125. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js +24 -18
  126. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -1
  127. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js +33 -27
  128. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -1
  129. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js +53 -47
  130. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -1
  131. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js +52 -53
  132. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -1
  133. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +32 -24
  134. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -1
  135. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +37 -31
  136. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -1
  137. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +35 -27
  138. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -1
  139. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +32 -24
  140. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -1
  141. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +31 -23
  142. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -1
  143. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +41 -35
  144. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -1
  145. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js +80 -74
  146. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -1
  147. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +71 -66
  148. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -1
  149. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +34 -27
  150. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js.map +1 -1
  151. package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js +250 -245
  152. package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js.map +1 -1
  153. package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js +201 -175
  154. package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js.map +1 -1
  155. package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js +267 -259
  156. package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js.map +1 -1
  157. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +83 -78
  158. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js.map +1 -1
  159. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.1.13/node_modules/zod-to-json-schema/dist/esm/Options.js +1 -1
  160. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.1.13/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -1
  161. package/dist/node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/util.js +1 -1
  162. package/dist/node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/util.js.map +1 -1
  163. package/dist/sentry-config.js +2 -2
  164. package/dist/server/cli/run.js +2 -2
  165. package/dist/server/cli.js +2 -2
  166. package/dist/server/mcp/mcp.js +2 -2
  167. package/dist/ui/assets/index.js +61 -70
  168. package/dist/ui/assets/index2.js +1 -1
  169. package/dist/ui/assets/instrumentation.js +18 -18
  170. package/dist/ui/assets/main.css +1 -1
  171. package/dist/ui/assets/main.js +1 -1
  172. package/dist/ui/assets/serverTimingMeta.js +23 -30
  173. package/package.json +4 -4
@@ -2,239 +2,241 @@
2
2
  !(function() {
3
3
  try {
4
4
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "8e3f4f5f-d0f0-498e-9e58-a356e092a888", e._sentryDebugIdIdentifier = "sentry-dbid-8e3f4f5f-d0f0-498e-9e58-a356e092a888");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0a66a7c4-0248-4474-b828-532f3c5b8911", e._sentryDebugIdIdentifier = "sentry-dbid-0a66a7c4-0248-4474-b828-532f3c5b8911");
6
6
  } catch (e2) {
7
7
  }
8
8
  })();
9
- import { __exports as compile } from "../../../../../../../_virtual/index4.js";
10
- import "./codegen/index.js";
9
+ import { __exports as compile } from "../../../../../../../_virtual/index6.js";
10
+ import { __require as requireCodegen } from "./codegen/index.js";
11
11
  import { __require as requireValidation_error } from "../runtime/validation_error.js";
12
- import "./names.js";
13
- import "./resolve.js";
14
- import "./util.js";
12
+ import { __require as requireNames } from "./names.js";
13
+ import { __require as requireResolve } from "./resolve.js";
14
+ import { __require as requireUtil } from "./util.js";
15
15
  import { __require as requireValidate } from "./validate/index.js";
16
- import { __exports as resolve$1 } from "../../../../../../../_virtual/resolve.js";
17
- import { __exports as codegen } from "../../../../../../../_virtual/index.js";
18
- import { __exports as names } from "../../../../../../../_virtual/names.js";
19
- import { __exports as util } from "../../../../../../../_virtual/util.js";
20
- Object.defineProperty(compile, "__esModule", { value: true });
21
- compile.resolveSchema = compile.getCompilingSchema = compile.resolveRef = compile.compileSchema = compile.SchemaEnv = void 0;
22
- const codegen_1 = codegen;
23
- const validation_error_1 = requireValidation_error();
24
- const names_1 = names;
25
- const resolve_1 = resolve$1;
26
- const util_1 = util;
27
- const validate_1 = requireValidate();
28
- class SchemaEnv {
29
- constructor(env) {
30
- var _a;
31
- this.refs = {};
32
- this.dynamicAnchors = {};
33
- let schema;
34
- if (typeof env.schema == "object")
35
- schema = env.schema;
36
- this.schema = env.schema;
37
- this.schemaId = env.schemaId;
38
- this.root = env.root || this;
39
- this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
40
- this.schemaPath = env.schemaPath;
41
- this.localRefs = env.localRefs;
42
- this.meta = env.meta;
43
- this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
44
- this.refs = {};
45
- }
46
- }
47
- compile.SchemaEnv = SchemaEnv;
48
- function compileSchema(sch) {
49
- const _sch = getCompilingSchema.call(this, sch);
50
- if (_sch)
51
- return _sch;
52
- const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId);
53
- const { es5, lines } = this.opts.code;
54
- const { ownProperties } = this.opts;
55
- const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
56
- let _ValidationError;
57
- if (sch.$async) {
58
- _ValidationError = gen.scopeValue("Error", {
59
- ref: validation_error_1.default,
60
- code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default`
61
- });
16
+ var hasRequiredCompile;
17
+ function requireCompile() {
18
+ if (hasRequiredCompile) return compile;
19
+ hasRequiredCompile = 1;
20
+ Object.defineProperty(compile, "__esModule", { value: true });
21
+ compile.resolveSchema = compile.getCompilingSchema = compile.resolveRef = compile.compileSchema = compile.SchemaEnv = void 0;
22
+ const codegen_1 = /* @__PURE__ */ requireCodegen();
23
+ const validation_error_1 = /* @__PURE__ */ requireValidation_error();
24
+ const names_1 = /* @__PURE__ */ requireNames();
25
+ const resolve_1 = /* @__PURE__ */ requireResolve();
26
+ const util_1 = /* @__PURE__ */ requireUtil();
27
+ const validate_1 = /* @__PURE__ */ requireValidate();
28
+ class SchemaEnv {
29
+ constructor(env) {
30
+ var _a;
31
+ this.refs = {};
32
+ this.dynamicAnchors = {};
33
+ let schema;
34
+ if (typeof env.schema == "object")
35
+ schema = env.schema;
36
+ this.schema = env.schema;
37
+ this.schemaId = env.schemaId;
38
+ this.root = env.root || this;
39
+ this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
40
+ this.schemaPath = env.schemaPath;
41
+ this.localRefs = env.localRefs;
42
+ this.meta = env.meta;
43
+ this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
44
+ this.refs = {};
45
+ }
62
46
  }
63
- const validateName = gen.scopeName("validate");
64
- sch.validateName = validateName;
65
- const schemaCxt = {
66
- gen,
67
- allErrors: this.opts.allErrors,
68
- data: names_1.default.data,
69
- parentData: names_1.default.parentData,
70
- parentDataProperty: names_1.default.parentDataProperty,
71
- dataNames: [names_1.default.data],
72
- dataPathArr: [codegen_1.nil],
73
- // TODO can its length be used as dataLevel if nil is removed?
74
- dataLevel: 0,
75
- dataTypes: [],
76
- definedProperties: /* @__PURE__ */ new Set(),
77
- topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }),
78
- validateName,
79
- ValidationError: _ValidationError,
80
- schema: sch.schema,
81
- schemaEnv: sch,
82
- rootId,
83
- baseId: sch.baseId || rootId,
84
- schemaPath: codegen_1.nil,
85
- errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"),
86
- errorPath: (0, codegen_1._)`""`,
87
- opts: this.opts,
88
- self: this
89
- };
90
- let sourceCode;
91
- try {
92
- this._compilations.add(sch);
93
- (0, validate_1.validateFunctionCode)(schemaCxt);
94
- gen.optimize(this.opts.code.optimize);
95
- const validateCode = gen.toString();
96
- sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;
97
- if (this.opts.code.process)
98
- sourceCode = this.opts.code.process(sourceCode, sch);
99
- const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
100
- const validate = makeValidate(this, this.scope.get());
101
- this.scope.value(validateName, { ref: validate });
102
- validate.errors = null;
103
- validate.schema = sch.schema;
104
- validate.schemaEnv = sch;
105
- if (sch.$async)
106
- validate.$async = true;
107
- if (this.opts.code.source === true) {
108
- validate.source = { validateName, validateCode, scopeValues: gen._values };
47
+ compile.SchemaEnv = SchemaEnv;
48
+ function compileSchema(sch) {
49
+ const _sch = getCompilingSchema.call(this, sch);
50
+ if (_sch)
51
+ return _sch;
52
+ const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId);
53
+ const { es5, lines } = this.opts.code;
54
+ const { ownProperties } = this.opts;
55
+ const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
56
+ let _ValidationError;
57
+ if (sch.$async) {
58
+ _ValidationError = gen.scopeValue("Error", {
59
+ ref: validation_error_1.default,
60
+ code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default`
61
+ });
109
62
  }
110
- if (this.opts.unevaluated) {
111
- const { props, items } = schemaCxt;
112
- validate.evaluated = {
113
- props: props instanceof codegen_1.Name ? void 0 : props,
114
- items: items instanceof codegen_1.Name ? void 0 : items,
115
- dynamicProps: props instanceof codegen_1.Name,
116
- dynamicItems: items instanceof codegen_1.Name
117
- };
118
- if (validate.source)
119
- validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);
63
+ const validateName = gen.scopeName("validate");
64
+ sch.validateName = validateName;
65
+ const schemaCxt = {
66
+ gen,
67
+ allErrors: this.opts.allErrors,
68
+ data: names_1.default.data,
69
+ parentData: names_1.default.parentData,
70
+ parentDataProperty: names_1.default.parentDataProperty,
71
+ dataNames: [names_1.default.data],
72
+ dataPathArr: [codegen_1.nil],
73
+ // TODO can its length be used as dataLevel if nil is removed?
74
+ dataLevel: 0,
75
+ dataTypes: [],
76
+ definedProperties: /* @__PURE__ */ new Set(),
77
+ topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }),
78
+ validateName,
79
+ ValidationError: _ValidationError,
80
+ schema: sch.schema,
81
+ schemaEnv: sch,
82
+ rootId,
83
+ baseId: sch.baseId || rootId,
84
+ schemaPath: codegen_1.nil,
85
+ errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"),
86
+ errorPath: (0, codegen_1._)`""`,
87
+ opts: this.opts,
88
+ self: this
89
+ };
90
+ let sourceCode;
91
+ try {
92
+ this._compilations.add(sch);
93
+ (0, validate_1.validateFunctionCode)(schemaCxt);
94
+ gen.optimize(this.opts.code.optimize);
95
+ const validateCode = gen.toString();
96
+ sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;
97
+ if (this.opts.code.process)
98
+ sourceCode = this.opts.code.process(sourceCode, sch);
99
+ const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
100
+ const validate = makeValidate(this, this.scope.get());
101
+ this.scope.value(validateName, { ref: validate });
102
+ validate.errors = null;
103
+ validate.schema = sch.schema;
104
+ validate.schemaEnv = sch;
105
+ if (sch.$async)
106
+ validate.$async = true;
107
+ if (this.opts.code.source === true) {
108
+ validate.source = { validateName, validateCode, scopeValues: gen._values };
109
+ }
110
+ if (this.opts.unevaluated) {
111
+ const { props, items } = schemaCxt;
112
+ validate.evaluated = {
113
+ props: props instanceof codegen_1.Name ? void 0 : props,
114
+ items: items instanceof codegen_1.Name ? void 0 : items,
115
+ dynamicProps: props instanceof codegen_1.Name,
116
+ dynamicItems: items instanceof codegen_1.Name
117
+ };
118
+ if (validate.source)
119
+ validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);
120
+ }
121
+ sch.validate = validate;
122
+ return sch;
123
+ } catch (e) {
124
+ delete sch.validate;
125
+ delete sch.validateName;
126
+ if (sourceCode)
127
+ this.logger.error("Error compiling schema, function code:", sourceCode);
128
+ throw e;
129
+ } finally {
130
+ this._compilations.delete(sch);
120
131
  }
121
- sch.validate = validate;
122
- return sch;
123
- } catch (e) {
124
- delete sch.validate;
125
- delete sch.validateName;
126
- if (sourceCode)
127
- this.logger.error("Error compiling schema, function code:", sourceCode);
128
- throw e;
129
- } finally {
130
- this._compilations.delete(sch);
131
132
  }
132
- }
133
- compile.compileSchema = compileSchema;
134
- function resolveRef(root, baseId, ref) {
135
- var _a;
136
- ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
137
- const schOrFunc = root.refs[ref];
138
- if (schOrFunc)
139
- return schOrFunc;
140
- let _sch = resolve.call(this, root, ref);
141
- if (_sch === void 0) {
142
- const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
143
- const { schemaId } = this.opts;
144
- if (schema)
145
- _sch = new SchemaEnv({ schema, schemaId, root, baseId });
133
+ compile.compileSchema = compileSchema;
134
+ function resolveRef(root, baseId, ref) {
135
+ var _a;
136
+ ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
137
+ const schOrFunc = root.refs[ref];
138
+ if (schOrFunc)
139
+ return schOrFunc;
140
+ let _sch = resolve.call(this, root, ref);
141
+ if (_sch === void 0) {
142
+ const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
143
+ const { schemaId } = this.opts;
144
+ if (schema)
145
+ _sch = new SchemaEnv({ schema, schemaId, root, baseId });
146
+ }
147
+ if (_sch === void 0)
148
+ return;
149
+ return root.refs[ref] = inlineOrCompile.call(this, _sch);
146
150
  }
147
- if (_sch === void 0)
148
- return;
149
- return root.refs[ref] = inlineOrCompile.call(this, _sch);
150
- }
151
- compile.resolveRef = resolveRef;
152
- function inlineOrCompile(sch) {
153
- if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
154
- return sch.schema;
155
- return sch.validate ? sch : compileSchema.call(this, sch);
156
- }
157
- function getCompilingSchema(schEnv) {
158
- for (const sch of this._compilations) {
159
- if (sameSchemaEnv(sch, schEnv))
160
- return sch;
151
+ compile.resolveRef = resolveRef;
152
+ function inlineOrCompile(sch) {
153
+ if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
154
+ return sch.schema;
155
+ return sch.validate ? sch : compileSchema.call(this, sch);
161
156
  }
162
- }
163
- compile.getCompilingSchema = getCompilingSchema;
164
- function sameSchemaEnv(s1, s2) {
165
- return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
166
- }
167
- function resolve(root, ref) {
168
- let sch;
169
- while (typeof (sch = this.refs[ref]) == "string")
170
- ref = sch;
171
- return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
172
- }
173
- function resolveSchema(root, ref) {
174
- const p = this.opts.uriResolver.parse(ref);
175
- const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
176
- let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0);
177
- if (Object.keys(root.schema).length > 0 && refPath === baseId) {
178
- return getJsonPointer.call(this, p, root);
157
+ function getCompilingSchema(schEnv) {
158
+ for (const sch of this._compilations) {
159
+ if (sameSchemaEnv(sch, schEnv))
160
+ return sch;
161
+ }
179
162
  }
180
- const id = (0, resolve_1.normalizeId)(refPath);
181
- const schOrRef = this.refs[id] || this.schemas[id];
182
- if (typeof schOrRef == "string") {
183
- const sch = resolveSchema.call(this, root, schOrRef);
184
- if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object")
185
- return;
186
- return getJsonPointer.call(this, p, sch);
163
+ compile.getCompilingSchema = getCompilingSchema;
164
+ function sameSchemaEnv(s1, s2) {
165
+ return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
187
166
  }
188
- if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object")
189
- return;
190
- if (!schOrRef.validate)
191
- compileSchema.call(this, schOrRef);
192
- if (id === (0, resolve_1.normalizeId)(ref)) {
193
- const { schema } = schOrRef;
194
- const { schemaId } = this.opts;
195
- const schId = schema[schemaId];
196
- if (schId)
197
- baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
198
- return new SchemaEnv({ schema, schemaId, root, baseId });
167
+ function resolve(root, ref) {
168
+ let sch;
169
+ while (typeof (sch = this.refs[ref]) == "string")
170
+ ref = sch;
171
+ return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
199
172
  }
200
- return getJsonPointer.call(this, p, schOrRef);
201
- }
202
- compile.resolveSchema = resolveSchema;
203
- const PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([
204
- "properties",
205
- "patternProperties",
206
- "enum",
207
- "dependencies",
208
- "definitions"
209
- ]);
210
- function getJsonPointer(parsedRef, { baseId, schema, root }) {
211
- var _a;
212
- if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/")
213
- return;
214
- for (const part of parsedRef.fragment.slice(1).split("/")) {
215
- if (typeof schema === "boolean")
216
- return;
217
- const partSchema = schema[(0, util_1.unescapeFragment)(part)];
218
- if (partSchema === void 0)
173
+ function resolveSchema(root, ref) {
174
+ const p = this.opts.uriResolver.parse(ref);
175
+ const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
176
+ let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0);
177
+ if (Object.keys(root.schema).length > 0 && refPath === baseId) {
178
+ return getJsonPointer.call(this, p, root);
179
+ }
180
+ const id = (0, resolve_1.normalizeId)(refPath);
181
+ const schOrRef = this.refs[id] || this.schemas[id];
182
+ if (typeof schOrRef == "string") {
183
+ const sch = resolveSchema.call(this, root, schOrRef);
184
+ if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object")
185
+ return;
186
+ return getJsonPointer.call(this, p, sch);
187
+ }
188
+ if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object")
219
189
  return;
220
- schema = partSchema;
221
- const schId = typeof schema === "object" && schema[this.opts.schemaId];
222
- if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
223
- baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
190
+ if (!schOrRef.validate)
191
+ compileSchema.call(this, schOrRef);
192
+ if (id === (0, resolve_1.normalizeId)(ref)) {
193
+ const { schema } = schOrRef;
194
+ const { schemaId } = this.opts;
195
+ const schId = schema[schemaId];
196
+ if (schId)
197
+ baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
198
+ return new SchemaEnv({ schema, schemaId, root, baseId });
224
199
  }
200
+ return getJsonPointer.call(this, p, schOrRef);
225
201
  }
226
- let env;
227
- if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
228
- const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
229
- env = resolveSchema.call(this, root, $ref);
202
+ compile.resolveSchema = resolveSchema;
203
+ const PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([
204
+ "properties",
205
+ "patternProperties",
206
+ "enum",
207
+ "dependencies",
208
+ "definitions"
209
+ ]);
210
+ function getJsonPointer(parsedRef, { baseId, schema, root }) {
211
+ var _a;
212
+ if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/")
213
+ return;
214
+ for (const part of parsedRef.fragment.slice(1).split("/")) {
215
+ if (typeof schema === "boolean")
216
+ return;
217
+ const partSchema = schema[(0, util_1.unescapeFragment)(part)];
218
+ if (partSchema === void 0)
219
+ return;
220
+ schema = partSchema;
221
+ const schId = typeof schema === "object" && schema[this.opts.schemaId];
222
+ if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
223
+ baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
224
+ }
225
+ }
226
+ let env;
227
+ if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
228
+ const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
229
+ env = resolveSchema.call(this, root, $ref);
230
+ }
231
+ const { schemaId } = this.opts;
232
+ env = env || new SchemaEnv({ schema, schemaId, root, baseId });
233
+ if (env.schema !== env.root.schema)
234
+ return env;
235
+ return void 0;
230
236
  }
231
- const { schemaId } = this.opts;
232
- env = env || new SchemaEnv({ schema, schemaId, root, baseId });
233
- if (env.schema !== env.root.schema)
234
- return env;
235
- return void 0;
237
+ return compile;
236
238
  }
237
239
  export {
238
- compile as default
240
+ requireCompile as __require
239
241
  };
240
242
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst validation_error_1 = require(\"../runtime/validation_error\");\nconst names_1 = require(\"./names\");\nconst resolve_1 = require(\"./resolve\");\nconst util_1 = require(\"./util\");\nconst validate_1 = require(\"./validate\");\nclass SchemaEnv {\n constructor(env) {\n var _a;\n this.refs = {};\n this.dynamicAnchors = {};\n let schema;\n if (typeof env.schema == \"object\")\n schema = env.schema;\n this.schema = env.schema;\n this.schemaId = env.schemaId;\n this.root = env.root || this;\n this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || \"$id\"]);\n this.schemaPath = env.schemaPath;\n this.localRefs = env.localRefs;\n this.meta = env.meta;\n this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;\n this.refs = {};\n }\n}\nexports.SchemaEnv = SchemaEnv;\n// let codeSize = 0\n// let nodeCount = 0\n// Compiles schema in SchemaEnv\nfunction compileSchema(sch) {\n // TODO refactor - remove compilations\n const _sch = getCompilingSchema.call(this, sch);\n if (_sch)\n return _sch;\n const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); // TODO if getFullPath removed 1 tests fails\n const { es5, lines } = this.opts.code;\n const { ownProperties } = this.opts;\n const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });\n let _ValidationError;\n if (sch.$async) {\n _ValidationError = gen.scopeValue(\"Error\", {\n ref: validation_error_1.default,\n code: (0, codegen_1._) `require(\"ajv/dist/runtime/validation_error\").default`,\n });\n }\n const validateName = gen.scopeName(\"validate\");\n sch.validateName = validateName;\n const schemaCxt = {\n gen,\n allErrors: this.opts.allErrors,\n data: names_1.default.data,\n parentData: names_1.default.parentData,\n parentDataProperty: names_1.default.parentDataProperty,\n dataNames: [names_1.default.data],\n dataPathArr: [codegen_1.nil], // TODO can its length be used as dataLevel if nil is removed?\n dataLevel: 0,\n dataTypes: [],\n definedProperties: new Set(),\n topSchemaRef: gen.scopeValue(\"schema\", this.opts.code.source === true\n ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) }\n : { ref: sch.schema }),\n validateName,\n ValidationError: _ValidationError,\n schema: sch.schema,\n schemaEnv: sch,\n rootId,\n baseId: sch.baseId || rootId,\n schemaPath: codegen_1.nil,\n errSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n errorPath: (0, codegen_1._) `\"\"`,\n opts: this.opts,\n self: this,\n };\n let sourceCode;\n try {\n this._compilations.add(sch);\n (0, validate_1.validateFunctionCode)(schemaCxt);\n gen.optimize(this.opts.code.optimize);\n // gen.optimize(1)\n const validateCode = gen.toString();\n sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;\n // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))\n if (this.opts.code.process)\n sourceCode = this.opts.code.process(sourceCode, sch);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode)\n const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);\n const validate = makeValidate(this, this.scope.get());\n this.scope.value(validateName, { ref: validate });\n validate.errors = null;\n validate.schema = sch.schema;\n validate.schemaEnv = sch;\n if (sch.$async)\n validate.$async = true;\n if (this.opts.code.source === true) {\n validate.source = { validateName, validateCode, scopeValues: gen._values };\n }\n if (this.opts.unevaluated) {\n const { props, items } = schemaCxt;\n validate.evaluated = {\n props: props instanceof codegen_1.Name ? undefined : props,\n items: items instanceof codegen_1.Name ? undefined : items,\n dynamicProps: props instanceof codegen_1.Name,\n dynamicItems: items instanceof codegen_1.Name,\n };\n if (validate.source)\n validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);\n }\n sch.validate = validate;\n return sch;\n }\n catch (e) {\n delete sch.validate;\n delete sch.validateName;\n if (sourceCode)\n this.logger.error(\"Error compiling schema, function code:\", sourceCode);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode, this.opts)\n throw e;\n }\n finally {\n this._compilations.delete(sch);\n }\n}\nexports.compileSchema = compileSchema;\nfunction resolveRef(root, baseId, ref) {\n var _a;\n ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);\n const schOrFunc = root.refs[ref];\n if (schOrFunc)\n return schOrFunc;\n let _sch = resolve.call(this, root, ref);\n if (_sch === undefined) {\n const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv\n const { schemaId } = this.opts;\n if (schema)\n _sch = new SchemaEnv({ schema, schemaId, root, baseId });\n }\n if (_sch === undefined)\n return;\n return (root.refs[ref] = inlineOrCompile.call(this, _sch));\n}\nexports.resolveRef = resolveRef;\nfunction inlineOrCompile(sch) {\n if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))\n return sch.schema;\n return sch.validate ? sch : compileSchema.call(this, sch);\n}\n// Index of schema compilation in the currently compiled list\nfunction getCompilingSchema(schEnv) {\n for (const sch of this._compilations) {\n if (sameSchemaEnv(sch, schEnv))\n return sch;\n }\n}\nexports.getCompilingSchema = getCompilingSchema;\nfunction sameSchemaEnv(s1, s2) {\n return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;\n}\n// resolve and compile the references ($ref)\n// TODO returns AnySchemaObject (if the schema can be inlined) or validation function\nfunction resolve(root, // information about the root schema for the current schema\nref // reference to resolve\n) {\n let sch;\n while (typeof (sch = this.refs[ref]) == \"string\")\n ref = sch;\n return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);\n}\n// Resolve schema, its root and baseId\nfunction resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it\nref // reference to resolve\n) {\n const p = this.opts.uriResolver.parse(ref);\n const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);\n let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);\n // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests\n if (Object.keys(root.schema).length > 0 && refPath === baseId) {\n return getJsonPointer.call(this, p, root);\n }\n const id = (0, resolve_1.normalizeId)(refPath);\n const schOrRef = this.refs[id] || this.schemas[id];\n if (typeof schOrRef == \"string\") {\n const sch = resolveSchema.call(this, root, schOrRef);\n if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== \"object\")\n return;\n return getJsonPointer.call(this, p, sch);\n }\n if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== \"object\")\n return;\n if (!schOrRef.validate)\n compileSchema.call(this, schOrRef);\n if (id === (0, resolve_1.normalizeId)(ref)) {\n const { schema } = schOrRef;\n const { schemaId } = this.opts;\n const schId = schema[schemaId];\n if (schId)\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n return new SchemaEnv({ schema, schemaId, root, baseId });\n }\n return getJsonPointer.call(this, p, schOrRef);\n}\nexports.resolveSchema = resolveSchema;\nconst PREVENT_SCOPE_CHANGE = new Set([\n \"properties\",\n \"patternProperties\",\n \"enum\",\n \"dependencies\",\n \"definitions\",\n]);\nfunction getJsonPointer(parsedRef, { baseId, schema, root }) {\n var _a;\n if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== \"/\")\n return;\n for (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n if (typeof schema === \"boolean\")\n return;\n const partSchema = schema[(0, util_1.unescapeFragment)(part)];\n if (partSchema === undefined)\n return;\n schema = partSchema;\n // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?\n const schId = typeof schema === \"object\" && schema[this.opts.schemaId];\n if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n }\n }\n let env;\n if (typeof schema != \"boolean\" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {\n const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);\n env = resolveSchema.call(this, root, $ref);\n }\n // even though resolution failed we need to return SchemaEnv to throw exception\n // so that compileAsync loads missing schema.\n const { schemaId } = this.opts;\n env = env || new SchemaEnv({ schema, schemaId, root, baseId });\n if (env.schema !== env.root.schema)\n return env;\n return undefined;\n}\n//# sourceMappingURL=index.js.map"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5"],"m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AAY,OAAO,KAAK,KAAK,QAAQ;AACrE,QAAI,CAAC,qBAAqB,IAAI,IAAI,KAAK,OAAO;AAC1C,gBAAS,GAAI,UAAU,YAAY,KAAK,KAAK,aAAa,QAAQ,KAAK;AAAA,IACnF;AAAA,EACA;AACI,MAAI;AACJ,MAAI,OAAO,UAAU,aAAa,OAAO,QAAQ,KAAK,OAAO,sBAAsB,QAAQ,KAAK,KAAK,GAAG;AACpG,UAAM,WAAW,UAAU,YAAY,KAAK,KAAK,aAAa,QAAQ,OAAO,IAAI;AACjF,UAAM,cAAc,KAAK,MAAM,MAAM,IAAI;AAAA,EACjD;AAGI,QAAM,EAAE,aAAa,KAAK;AAC1B,QAAM,OAAO,IAAI,UAAU,EAAE,QAAQ,UAAU,MAAM,QAAQ;AAC7D,MAAI,IAAI,WAAW,IAAI,KAAK;AACxB,WAAO;AACX,SAAO;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;\nconst codegen_1 = require(\"./codegen\");\nconst validation_error_1 = require(\"../runtime/validation_error\");\nconst names_1 = require(\"./names\");\nconst resolve_1 = require(\"./resolve\");\nconst util_1 = require(\"./util\");\nconst validate_1 = require(\"./validate\");\nclass SchemaEnv {\n constructor(env) {\n var _a;\n this.refs = {};\n this.dynamicAnchors = {};\n let schema;\n if (typeof env.schema == \"object\")\n schema = env.schema;\n this.schema = env.schema;\n this.schemaId = env.schemaId;\n this.root = env.root || this;\n this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || \"$id\"]);\n this.schemaPath = env.schemaPath;\n this.localRefs = env.localRefs;\n this.meta = env.meta;\n this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;\n this.refs = {};\n }\n}\nexports.SchemaEnv = SchemaEnv;\n// let codeSize = 0\n// let nodeCount = 0\n// Compiles schema in SchemaEnv\nfunction compileSchema(sch) {\n // TODO refactor - remove compilations\n const _sch = getCompilingSchema.call(this, sch);\n if (_sch)\n return _sch;\n const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); // TODO if getFullPath removed 1 tests fails\n const { es5, lines } = this.opts.code;\n const { ownProperties } = this.opts;\n const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });\n let _ValidationError;\n if (sch.$async) {\n _ValidationError = gen.scopeValue(\"Error\", {\n ref: validation_error_1.default,\n code: (0, codegen_1._) `require(\"ajv/dist/runtime/validation_error\").default`,\n });\n }\n const validateName = gen.scopeName(\"validate\");\n sch.validateName = validateName;\n const schemaCxt = {\n gen,\n allErrors: this.opts.allErrors,\n data: names_1.default.data,\n parentData: names_1.default.parentData,\n parentDataProperty: names_1.default.parentDataProperty,\n dataNames: [names_1.default.data],\n dataPathArr: [codegen_1.nil], // TODO can its length be used as dataLevel if nil is removed?\n dataLevel: 0,\n dataTypes: [],\n definedProperties: new Set(),\n topSchemaRef: gen.scopeValue(\"schema\", this.opts.code.source === true\n ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) }\n : { ref: sch.schema }),\n validateName,\n ValidationError: _ValidationError,\n schema: sch.schema,\n schemaEnv: sch,\n rootId,\n baseId: sch.baseId || rootId,\n schemaPath: codegen_1.nil,\n errSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n errorPath: (0, codegen_1._) `\"\"`,\n opts: this.opts,\n self: this,\n };\n let sourceCode;\n try {\n this._compilations.add(sch);\n (0, validate_1.validateFunctionCode)(schemaCxt);\n gen.optimize(this.opts.code.optimize);\n // gen.optimize(1)\n const validateCode = gen.toString();\n sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;\n // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))\n if (this.opts.code.process)\n sourceCode = this.opts.code.process(sourceCode, sch);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode)\n const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);\n const validate = makeValidate(this, this.scope.get());\n this.scope.value(validateName, { ref: validate });\n validate.errors = null;\n validate.schema = sch.schema;\n validate.schemaEnv = sch;\n if (sch.$async)\n validate.$async = true;\n if (this.opts.code.source === true) {\n validate.source = { validateName, validateCode, scopeValues: gen._values };\n }\n if (this.opts.unevaluated) {\n const { props, items } = schemaCxt;\n validate.evaluated = {\n props: props instanceof codegen_1.Name ? undefined : props,\n items: items instanceof codegen_1.Name ? undefined : items,\n dynamicProps: props instanceof codegen_1.Name,\n dynamicItems: items instanceof codegen_1.Name,\n };\n if (validate.source)\n validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);\n }\n sch.validate = validate;\n return sch;\n }\n catch (e) {\n delete sch.validate;\n delete sch.validateName;\n if (sourceCode)\n this.logger.error(\"Error compiling schema, function code:\", sourceCode);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode, this.opts)\n throw e;\n }\n finally {\n this._compilations.delete(sch);\n }\n}\nexports.compileSchema = compileSchema;\nfunction resolveRef(root, baseId, ref) {\n var _a;\n ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);\n const schOrFunc = root.refs[ref];\n if (schOrFunc)\n return schOrFunc;\n let _sch = resolve.call(this, root, ref);\n if (_sch === undefined) {\n const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv\n const { schemaId } = this.opts;\n if (schema)\n _sch = new SchemaEnv({ schema, schemaId, root, baseId });\n }\n if (_sch === undefined)\n return;\n return (root.refs[ref] = inlineOrCompile.call(this, _sch));\n}\nexports.resolveRef = resolveRef;\nfunction inlineOrCompile(sch) {\n if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))\n return sch.schema;\n return sch.validate ? sch : compileSchema.call(this, sch);\n}\n// Index of schema compilation in the currently compiled list\nfunction getCompilingSchema(schEnv) {\n for (const sch of this._compilations) {\n if (sameSchemaEnv(sch, schEnv))\n return sch;\n }\n}\nexports.getCompilingSchema = getCompilingSchema;\nfunction sameSchemaEnv(s1, s2) {\n return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;\n}\n// resolve and compile the references ($ref)\n// TODO returns AnySchemaObject (if the schema can be inlined) or validation function\nfunction resolve(root, // information about the root schema for the current schema\nref // reference to resolve\n) {\n let sch;\n while (typeof (sch = this.refs[ref]) == \"string\")\n ref = sch;\n return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);\n}\n// Resolve schema, its root and baseId\nfunction resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it\nref // reference to resolve\n) {\n const p = this.opts.uriResolver.parse(ref);\n const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);\n let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);\n // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests\n if (Object.keys(root.schema).length > 0 && refPath === baseId) {\n return getJsonPointer.call(this, p, root);\n }\n const id = (0, resolve_1.normalizeId)(refPath);\n const schOrRef = this.refs[id] || this.schemas[id];\n if (typeof schOrRef == \"string\") {\n const sch = resolveSchema.call(this, root, schOrRef);\n if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== \"object\")\n return;\n return getJsonPointer.call(this, p, sch);\n }\n if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== \"object\")\n return;\n if (!schOrRef.validate)\n compileSchema.call(this, schOrRef);\n if (id === (0, resolve_1.normalizeId)(ref)) {\n const { schema } = schOrRef;\n const { schemaId } = this.opts;\n const schId = schema[schemaId];\n if (schId)\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n return new SchemaEnv({ schema, schemaId, root, baseId });\n }\n return getJsonPointer.call(this, p, schOrRef);\n}\nexports.resolveSchema = resolveSchema;\nconst PREVENT_SCOPE_CHANGE = new Set([\n \"properties\",\n \"patternProperties\",\n \"enum\",\n \"dependencies\",\n \"definitions\",\n]);\nfunction getJsonPointer(parsedRef, { baseId, schema, root }) {\n var _a;\n if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== \"/\")\n return;\n for (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n if (typeof schema === \"boolean\")\n return;\n const partSchema = schema[(0, util_1.unescapeFragment)(part)];\n if (partSchema === undefined)\n return;\n schema = partSchema;\n // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?\n const schId = typeof schema === \"object\" && schema[this.opts.schemaId];\n if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n }\n }\n let env;\n if (typeof schema != \"boolean\" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {\n const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);\n env = resolveSchema.call(this, root, $ref);\n }\n // even though resolution failed we need to return SchemaEnv to throw exception\n // so that compileAsync loads missing schema.\n const { schemaId } = this.opts;\n env = env || new SchemaEnv({ schema, schemaId, root, baseId });\n if (env.schema !== env.root.schema)\n return env;\n return undefined;\n}\n//# sourceMappingURL=index.js.map"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5"],"mappings":";;;;;;;;;;;;;;;;;;;AACA,SAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM;AAC5D,UAAA,gBAAwB,QAAA,qBAA6B,QAAA,aAAqB,wBAAwB,QAAA,YAAoB;AACtH,QAAM,YAAYA,+BAAA;AAClB,QAAM,qBAAqBC,wCAAA;AAC3B,QAAM,UAAUC,6BAAA;AAChB,QAAM,YAAYC,+BAAA;AAClB,QAAM,SAASC,4BAAA;AACf,Q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QAAQ,KAAK,OAAO,sBAAsB,QAAQ,KAAK,KAAK,GAAG;AACpG,YAAM,WAAW,UAAU,YAAY,KAAK,KAAK,aAAa,QAAQ,OAAO,IAAI;AACjF,YAAM,cAAc,KAAK,MAAM,MAAM,IAAI;AAAA,IACjD;AAGI,UAAM,EAAE,aAAa,KAAK;AAC1B,UAAM,OAAO,IAAI,UAAU,EAAE,QAAQ,UAAU,MAAM,QAAQ;AAC7D,QAAI,IAAI,WAAW,IAAI,KAAK;AACxB,aAAO;AACX,WAAO;AAAA,EACX;;;","x_google_ignoreList":[0]}
@@ -2,43 +2,51 @@
2
2
  !(function() {
3
3
  try {
4
4
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b389f475-8dd1-480e-81d9-77262bbfc256", e._sentryDebugIdIdentifier = "sentry-dbid-b389f475-8dd1-480e-81d9-77262bbfc256");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "02d819d3-c2e6-46f7-a738-f514904123f3", e._sentryDebugIdIdentifier = "sentry-dbid-02d819d3-c2e6-46f7-a738-f514904123f3");
6
6
  } catch (e2) {
7
7
  }
8
8
  })();
9
- import { __exports as names$1 } from "../../../../../../../_virtual/names.js";
10
- import "./codegen/index.js";
11
- import { __exports as codegen } from "../../../../../../../_virtual/index.js";
12
- Object.defineProperty(names$1, "__esModule", { value: true });
13
- const codegen_1 = codegen;
14
- const names = {
15
- // validation function arguments
16
- data: new codegen_1.Name("data"),
17
- // data passed to validation function
18
- // args passed from referencing schema
19
- valCxt: new codegen_1.Name("valCxt"),
20
- // validation/data context - should not be used directly, it is destructured to the names below
21
- instancePath: new codegen_1.Name("instancePath"),
22
- parentData: new codegen_1.Name("parentData"),
23
- parentDataProperty: new codegen_1.Name("parentDataProperty"),
24
- rootData: new codegen_1.Name("rootData"),
25
- // root data - same as the data passed to the first/top validation function
26
- dynamicAnchors: new codegen_1.Name("dynamicAnchors"),
27
- // used to support recursiveRef and dynamicRef
28
- // function scoped variables
29
- vErrors: new codegen_1.Name("vErrors"),
30
- // null or array of validation errors
31
- errors: new codegen_1.Name("errors"),
32
- // counter of validation errors
33
- this: new codegen_1.Name("this"),
34
- // "globals"
35
- self: new codegen_1.Name("self"),
36
- scope: new codegen_1.Name("scope"),
37
- // JTD serialize/parse name for JSON string and position
38
- json: new codegen_1.Name("json"),
39
- jsonPos: new codegen_1.Name("jsonPos"),
40
- jsonLen: new codegen_1.Name("jsonLen"),
41
- jsonPart: new codegen_1.Name("jsonPart")
9
+ import { __exports as names } from "../../../../../../../_virtual/names.js";
10
+ import { __require as requireCodegen } from "./codegen/index.js";
11
+ var hasRequiredNames;
12
+ function requireNames() {
13
+ if (hasRequiredNames) return names;
14
+ hasRequiredNames = 1;
15
+ Object.defineProperty(names, "__esModule", { value: true });
16
+ const codegen_1 = /* @__PURE__ */ requireCodegen();
17
+ const names$1 = {
18
+ // validation function arguments
19
+ data: new codegen_1.Name("data"),
20
+ // data passed to validation function
21
+ // args passed from referencing schema
22
+ valCxt: new codegen_1.Name("valCxt"),
23
+ // validation/data context - should not be used directly, it is destructured to the names below
24
+ instancePath: new codegen_1.Name("instancePath"),
25
+ parentData: new codegen_1.Name("parentData"),
26
+ parentDataProperty: new codegen_1.Name("parentDataProperty"),
27
+ rootData: new codegen_1.Name("rootData"),
28
+ // root data - same as the data passed to the first/top validation function
29
+ dynamicAnchors: new codegen_1.Name("dynamicAnchors"),
30
+ // used to support recursiveRef and dynamicRef
31
+ // function scoped variables
32
+ vErrors: new codegen_1.Name("vErrors"),
33
+ // null or array of validation errors
34
+ errors: new codegen_1.Name("errors"),
35
+ // counter of validation errors
36
+ this: new codegen_1.Name("this"),
37
+ // "globals"
38
+ self: new codegen_1.Name("self"),
39
+ scope: new codegen_1.Name("scope"),
40
+ // JTD serialize/parse name for JSON string and position
41
+ json: new codegen_1.Name("json"),
42
+ jsonPos: new codegen_1.Name("jsonPos"),
43
+ jsonLen: new codegen_1.Name("jsonLen"),
44
+ jsonPart: new codegen_1.Name("jsonPart")
45
+ };
46
+ names.default = names$1;
47
+ return names;
48
+ }
49
+ export {
50
+ requireNames as __require
42
51
  };
43
- names$1.default = names;
44
52
  //# sourceMappingURL=names.js.map