@zuplo/cli 6.69.3 → 6.69.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 (392) hide show
  1. package/dist/__tests__/integration/confirm-linked-config.integration.test.d.ts +2 -0
  2. package/dist/__tests__/integration/confirm-linked-config.integration.test.d.ts.map +1 -0
  3. package/dist/__tests__/integration/confirm-linked-config.integration.test.js +202 -0
  4. package/dist/__tests__/integration/confirm-linked-config.integration.test.js.map +1 -0
  5. package/dist/__tests__/integration/info.integration.test.js +49 -2
  6. package/dist/__tests__/integration/info.integration.test.js.map +1 -1
  7. package/dist/__tests__/integration/jest-mocks-setup.js +29 -10
  8. package/dist/__tests__/integration/jest-mocks-setup.js.map +1 -1
  9. package/dist/__tests__/integration/linked-config-cascade.integration.test.js +36 -0
  10. package/dist/__tests__/integration/linked-config-cascade.integration.test.js.map +1 -1
  11. package/dist/cmds/custom-domain/index.d.ts.map +1 -1
  12. package/dist/cmds/custom-domain/index.js +6 -10
  13. package/dist/cmds/custom-domain/index.js.map +1 -1
  14. package/dist/cmds/delete.d.ts.map +1 -1
  15. package/dist/cmds/delete.js +2 -0
  16. package/dist/cmds/delete.js.map +1 -1
  17. package/dist/cmds/deploy.d.ts.map +1 -1
  18. package/dist/cmds/deploy.js +2 -0
  19. package/dist/cmds/deploy.js.map +1 -1
  20. package/dist/cmds/link.d.ts.map +1 -1
  21. package/dist/cmds/link.js +2 -0
  22. package/dist/cmds/link.js.map +1 -1
  23. package/dist/cmds/list.d.ts.map +1 -1
  24. package/dist/cmds/list.js +2 -0
  25. package/dist/cmds/list.js.map +1 -1
  26. package/dist/cmds/mtls-certificates/create.d.ts.map +1 -1
  27. package/dist/cmds/mtls-certificates/create.js +2 -0
  28. package/dist/cmds/mtls-certificates/create.js.map +1 -1
  29. package/dist/cmds/mtls-certificates/delete.d.ts.map +1 -1
  30. package/dist/cmds/mtls-certificates/delete.js +2 -0
  31. package/dist/cmds/mtls-certificates/delete.js.map +1 -1
  32. package/dist/cmds/mtls-certificates/describe.d.ts.map +1 -1
  33. package/dist/cmds/mtls-certificates/describe.js +2 -0
  34. package/dist/cmds/mtls-certificates/describe.js.map +1 -1
  35. package/dist/cmds/mtls-certificates/disable.d.ts.map +1 -1
  36. package/dist/cmds/mtls-certificates/disable.js +2 -0
  37. package/dist/cmds/mtls-certificates/disable.js.map +1 -1
  38. package/dist/cmds/mtls-certificates/index.d.ts.map +1 -1
  39. package/dist/cmds/mtls-certificates/index.js +8 -12
  40. package/dist/cmds/mtls-certificates/index.js.map +1 -1
  41. package/dist/cmds/mtls-certificates/list.d.ts.map +1 -1
  42. package/dist/cmds/mtls-certificates/list.js +2 -0
  43. package/dist/cmds/mtls-certificates/list.js.map +1 -1
  44. package/dist/cmds/mtls-certificates/update.d.ts.map +1 -1
  45. package/dist/cmds/mtls-certificates/update.js +2 -0
  46. package/dist/cmds/mtls-certificates/update.js.map +1 -1
  47. package/dist/cmds/open-api/index.d.ts.map +1 -1
  48. package/dist/cmds/open-api/index.js +2 -5
  49. package/dist/cmds/open-api/index.js.map +1 -1
  50. package/dist/cmds/project/index.d.ts.map +1 -1
  51. package/dist/cmds/project/index.js +2 -5
  52. package/dist/cmds/project/index.js.map +1 -1
  53. package/dist/cmds/proxies/index.d.ts +4 -4
  54. package/dist/cmds/proxies/index.d.ts.map +1 -1
  55. package/dist/cmds/proxies/index.js +6 -10
  56. package/dist/cmds/proxies/index.js.map +1 -1
  57. package/dist/cmds/source/index.d.ts.map +1 -1
  58. package/dist/cmds/source/index.js +2 -9
  59. package/dist/cmds/source/index.js.map +1 -1
  60. package/dist/cmds/source/migrate.d.ts +4 -4
  61. package/dist/cmds/source/migrate.d.ts.map +1 -1
  62. package/dist/cmds/source/migrate.js +3 -6
  63. package/dist/cmds/source/migrate.js.map +1 -1
  64. package/dist/cmds/tunnel/index.d.ts.map +1 -1
  65. package/dist/cmds/tunnel/index.js +8 -12
  66. package/dist/cmds/tunnel/index.js.map +1 -1
  67. package/dist/cmds/tunnel/services/index.d.ts.map +1 -1
  68. package/dist/cmds/tunnel/services/index.js +2 -5
  69. package/dist/cmds/tunnel/services/index.js.map +1 -1
  70. package/dist/cmds/variable/create.d.ts.map +1 -1
  71. package/dist/cmds/variable/create.js +2 -0
  72. package/dist/cmds/variable/create.js.map +1 -1
  73. package/dist/cmds/variable/index.d.ts.map +1 -1
  74. package/dist/cmds/variable/index.js +2 -5
  75. package/dist/cmds/variable/index.js.map +1 -1
  76. package/dist/cmds/variable/update.d.ts.map +1 -1
  77. package/dist/cmds/variable/update.js +2 -0
  78. package/dist/cmds/variable/update.js.map +1 -1
  79. package/dist/common/handler.d.ts +4 -1
  80. package/dist/common/handler.d.ts.map +1 -1
  81. package/dist/common/handler.js +11 -2
  82. package/dist/common/handler.js.map +1 -1
  83. package/dist/common/middleware/confirm-linked-config.d.ts +4 -0
  84. package/dist/common/middleware/confirm-linked-config.d.ts.map +1 -0
  85. package/dist/common/middleware/confirm-linked-config.js +30 -0
  86. package/dist/common/middleware/confirm-linked-config.js.map +1 -0
  87. package/dist/common/middleware/get-environment-param.d.ts.map +1 -1
  88. package/dist/common/middleware/get-environment-param.js +2 -18
  89. package/dist/common/middleware/get-environment-param.js.map +1 -1
  90. package/dist/common/utils/build-environment-prompt-choices.d.ts +13 -0
  91. package/dist/common/utils/build-environment-prompt-choices.d.ts.map +1 -0
  92. package/dist/common/utils/build-environment-prompt-choices.js +66 -0
  93. package/dist/common/utils/build-environment-prompt-choices.js.map +1 -0
  94. package/dist/common/utils/build-environment-prompt-choices.test.d.ts +2 -0
  95. package/dist/common/utils/build-environment-prompt-choices.test.d.ts.map +1 -0
  96. package/dist/common/utils/build-environment-prompt-choices.test.js +97 -0
  97. package/dist/common/utils/build-environment-prompt-choices.test.js.map +1 -0
  98. package/dist/common/utils/format-environment-type.d.ts +2 -0
  99. package/dist/common/utils/format-environment-type.d.ts.map +1 -0
  100. package/dist/common/utils/format-environment-type.js +12 -0
  101. package/dist/common/utils/format-environment-type.js.map +1 -0
  102. package/dist/common/utils/format-environment-type.test.d.ts +2 -0
  103. package/dist/common/utils/format-environment-type.test.d.ts.map +1 -0
  104. package/dist/common/utils/format-environment-type.test.js +32 -0
  105. package/dist/common/utils/format-environment-type.test.js.map +1 -0
  106. package/dist/common/utils/pretty-print-environment-prompt.d.ts +1 -4
  107. package/dist/common/utils/pretty-print-environment-prompt.d.ts.map +1 -1
  108. package/dist/common/utils/pretty-print-environment-prompt.js +6 -14
  109. package/dist/common/utils/pretty-print-environment-prompt.js.map +1 -1
  110. package/dist/common/utils/pretty-print-environment-prompt.test.js +15 -17
  111. package/dist/common/utils/pretty-print-environment-prompt.test.js.map +1 -1
  112. package/dist/common/utils/sort-environments-for-prompt.d.ts +5 -0
  113. package/dist/common/utils/sort-environments-for-prompt.d.ts.map +1 -0
  114. package/dist/common/utils/sort-environments-for-prompt.js +27 -0
  115. package/dist/common/utils/sort-environments-for-prompt.js.map +1 -0
  116. package/dist/common/utils/sort-environments-for-prompt.test.d.ts +2 -0
  117. package/dist/common/utils/sort-environments-for-prompt.test.d.ts.map +1 -0
  118. package/dist/common/utils/sort-environments-for-prompt.test.js +82 -0
  119. package/dist/common/utils/sort-environments-for-prompt.test.js.map +1 -0
  120. package/dist/project/info/handler.d.ts.map +1 -1
  121. package/dist/project/info/handler.js +5 -1
  122. package/dist/project/info/handler.js.map +1 -1
  123. package/dist/tsconfig.tsbuildinfo +1 -1
  124. package/node_modules/@fastify/proxy-addr/node_modules/ipaddr.js/README.md +1 -5
  125. package/node_modules/@fastify/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js +1 -1
  126. package/node_modules/@fastify/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js +21 -6
  127. package/node_modules/@fastify/proxy-addr/node_modules/ipaddr.js/package.json +1 -1
  128. package/node_modules/@zuplo/core/index.minified.js +141 -137
  129. package/node_modules/@zuplo/core/package.json +1 -1
  130. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/.github/workflows/ci.yml +1 -1
  131. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/.github/workflows/lock-threads.yml +19 -0
  132. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/LICENSE +1 -3
  133. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/benchmark/bench-cmp-lib.js +60 -44
  134. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/index.js +2 -2
  135. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/package.json +7 -7
  136. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/anyof.test.js +20 -0
  137. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/array.test.js +22 -0
  138. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/debug-mode.test.js +21 -0
  139. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/if-then-else.test.js +72 -0
  140. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/invalidSchema.test.js +20 -0
  141. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/issue-836.test.js +183 -0
  142. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/json-add-comma.test.js +57 -57
  143. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/oneof.test.js +20 -0
  144. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/ref.test.js +31 -0
  145. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/typebox.test.js +1 -1
  146. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/types/{index.test-d.ts → index.tst.ts} +17 -17
  147. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
  148. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
  149. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
  150. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
  151. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +1380 -0
  152. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
  153. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.js +1686 -0
  154. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
  155. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
  156. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
  157. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
  158. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
  159. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.js +11 -0
  160. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
  161. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
  162. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
  163. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +2 -2
  164. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +4 -7
  165. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.d.ts +2 -3
  166. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
  167. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.js +10 -16
  168. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
  169. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  170. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.min.js.map +4 -4
  171. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
  172. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
  173. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
  174. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
  175. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1380 -0
  176. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
  177. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.js +1686 -0
  178. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
  179. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
  180. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
  181. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
  182. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
  183. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.js +11 -0
  184. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
  185. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
  186. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
  187. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.js +11 -0
  188. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
  189. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
  190. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
  191. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +1 -1
  192. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +1 -1
  193. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.d.ts +2 -3
  194. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
  195. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.js +9 -15
  196. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
  197. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
  198. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.min.js.map +4 -4
  199. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
  200. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
  201. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.js +8 -0
  202. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
  203. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -1
  204. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -1
  205. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.d.ts +2 -3
  206. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
  207. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.js +9 -15
  208. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.js.map +1 -1
  209. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  210. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.min.js.map +4 -4
  211. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
  212. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
  213. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +1 -1
  214. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +2 -3
  215. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.d.ts +2 -3
  216. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
  217. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.js +9 -15
  218. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
  219. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
  220. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.min.js.map +4 -4
  221. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
  222. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
  223. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.js +8 -0
  224. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
  225. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
  226. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
  227. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.js +8 -0
  228. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
  229. package/node_modules/@zuplo/editor/node_modules/lru-cache/package.json +44 -16
  230. package/node_modules/@zuplo/graphql/package.json +1 -1
  231. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  232. package/node_modules/@zuplo/otel/package.json +1 -1
  233. package/node_modules/@zuplo/runtime/out/esm/index.js +54 -54
  234. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  235. package/node_modules/@zuplo/runtime/out/types/index.d.ts +4 -0
  236. package/node_modules/@zuplo/runtime/package.json +1 -1
  237. package/node_modules/axios/CHANGELOG.md +32 -6
  238. package/node_modules/axios/README.md +356 -20
  239. package/node_modules/axios/dist/axios.js +1389 -1071
  240. package/node_modules/axios/dist/axios.js.map +1 -1
  241. package/node_modules/axios/dist/axios.min.js +3 -3
  242. package/node_modules/axios/dist/axios.min.js.map +1 -1
  243. package/node_modules/axios/dist/browser/axios.cjs +1486 -1123
  244. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  245. package/node_modules/axios/dist/esm/axios.js +1488 -1124
  246. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  247. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  248. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  249. package/node_modules/axios/dist/node/axios.cjs +1230 -871
  250. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  251. package/node_modules/axios/index.d.cts +25 -13
  252. package/node_modules/axios/index.d.ts +21 -4
  253. package/node_modules/axios/index.js +2 -0
  254. package/node_modules/axios/lib/adapters/adapters.js +4 -2
  255. package/node_modules/axios/lib/adapters/fetch.js +126 -10
  256. package/node_modules/axios/lib/adapters/http.js +178 -59
  257. package/node_modules/axios/lib/adapters/xhr.js +6 -2
  258. package/node_modules/axios/lib/core/Axios.js +7 -3
  259. package/node_modules/axios/lib/core/AxiosError.js +86 -1
  260. package/node_modules/axios/lib/core/AxiosHeaders.js +3 -0
  261. package/node_modules/axios/lib/core/dispatchRequest.js +19 -7
  262. package/node_modules/axios/lib/core/mergeConfig.js +6 -3
  263. package/node_modules/axios/lib/core/settle.js +7 -11
  264. package/node_modules/axios/lib/defaults/index.js +1 -1
  265. package/node_modules/axios/lib/env/data.js +1 -1
  266. package/node_modules/axios/lib/helpers/buildURL.js +1 -1
  267. package/node_modules/axios/lib/helpers/cookies.js +14 -2
  268. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +28 -1
  269. package/node_modules/axios/lib/helpers/formDataToStream.js +1 -1
  270. package/node_modules/axios/lib/helpers/parseProtocol.js +1 -1
  271. package/node_modules/axios/lib/helpers/resolveConfig.js +33 -17
  272. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +26 -1
  273. package/node_modules/axios/lib/helpers/validator.js +1 -1
  274. package/node_modules/axios/lib/utils.js +27 -15
  275. package/node_modules/axios/package.json +17 -24
  276. package/node_modules/fast-uri/.github/workflows/ci.yml +12 -7
  277. package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
  278. package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +1 -1
  279. package/node_modules/fast-uri/LICENSE +1 -3
  280. package/node_modules/fast-uri/README.md +13 -4
  281. package/node_modules/fast-uri/index.js +90 -24
  282. package/node_modules/fast-uri/lib/utils.js +129 -22
  283. package/node_modules/fast-uri/package.json +3 -4
  284. package/node_modules/fast-uri/test/equal.test.js +9 -0
  285. package/node_modules/fast-uri/test/parse.test.js +5 -0
  286. package/node_modules/fast-uri/test/resolve.test.js +9 -0
  287. package/node_modules/fast-uri/test/security-normalization.test.js +39 -0
  288. package/node_modules/fast-uri/test/security.test.js +133 -0
  289. package/node_modules/is-core-module/CHANGELOG.md +244 -113
  290. package/node_modules/is-core-module/README.md +1 -1
  291. package/node_modules/is-core-module/core.json +12 -12
  292. package/node_modules/is-core-module/package.json +5 -5
  293. package/node_modules/is-core-module/test/index.js +101 -0
  294. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
  295. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
  296. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
  297. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
  298. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +1380 -0
  299. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
  300. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.js +1686 -0
  301. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
  302. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
  303. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
  304. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
  305. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
  306. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.js +11 -0
  307. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
  308. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
  309. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
  310. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +2 -2
  311. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +4 -7
  312. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.d.ts +2 -3
  313. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
  314. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.js +10 -16
  315. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
  316. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  317. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.min.js.map +4 -4
  318. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
  319. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
  320. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
  321. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
  322. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1380 -0
  323. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
  324. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.js +1686 -0
  325. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
  326. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
  327. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
  328. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
  329. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
  330. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.js +11 -0
  331. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
  332. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
  333. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
  334. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.js +11 -0
  335. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
  336. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
  337. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
  338. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +1 -1
  339. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +1 -1
  340. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.d.ts +2 -3
  341. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
  342. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.js +9 -15
  343. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
  344. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
  345. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.min.js.map +4 -4
  346. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
  347. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
  348. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.js +8 -0
  349. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
  350. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -1
  351. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -1
  352. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.d.ts +2 -3
  353. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
  354. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.js +9 -15
  355. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.js.map +1 -1
  356. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  357. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.min.js.map +4 -4
  358. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
  359. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
  360. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +1 -1
  361. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +2 -3
  362. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.d.ts +2 -3
  363. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
  364. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.js +9 -15
  365. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
  366. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
  367. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.min.js.map +4 -4
  368. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
  369. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
  370. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.js +8 -0
  371. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
  372. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
  373. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
  374. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.js +8 -0
  375. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
  376. package/node_modules/rimraf/node_modules/lru-cache/package.json +44 -16
  377. package/package.json +6 -6
  378. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/.github/stale.yml +0 -21
  379. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts.map +0 -1
  380. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js.map +0 -1
  381. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.mts.map +0 -1
  382. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.mjs.map +0 -1
  383. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.mts.map +0 -1
  384. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.mjs.map +0 -1
  385. package/node_modules/fast-uri/.github/.stale.yml +0 -21
  386. package/node_modules/fast-uri/.github/tests_checker.yml +0 -8
  387. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts.map +0 -1
  388. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js.map +0 -1
  389. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.mts.map +0 -1
  390. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.mjs.map +0 -1
  391. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.mts.map +0 -1
  392. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.mjs.map +0 -1
@@ -0,0 +1,183 @@
1
+ 'use strict'
2
+
3
+ const { test } = require('node:test')
4
+ const build = require('..')
5
+
6
+ test('external $ref schema should be reused, not inlined at every reference', (t) => {
7
+ t.plan(3)
8
+
9
+ const contactSchema = {
10
+ $id: 'contact.json',
11
+ type: 'object',
12
+ properties: {
13
+ firstName: { type: 'string' },
14
+ lastName: { type: 'string' },
15
+ email: { type: 'string' }
16
+ }
17
+ }
18
+
19
+ // Schema referencing the same external $ref multiple times
20
+ const parentSchema = {
21
+ type: 'object',
22
+ properties: {
23
+ owner: { $ref: 'contact.json' },
24
+ assignee: { $ref: 'contact.json' },
25
+ reporter: { $ref: 'contact.json' }
26
+ }
27
+ }
28
+
29
+ const serializer = build(parentSchema, { schema: { 'contact.json': contactSchema } })
30
+ const code = serializer.toString()
31
+
32
+ // The serialized function should contain extracted anonymous functions
33
+ // rather than inlining the full contact schema at every reference.
34
+ // With the fix, `firstName` appears 0 times in the main serializer body
35
+ // (it is inside the extracted function, which is not included in .toString())
36
+ // or at most 1 time if in a single extracted function.
37
+ const firstNameMatches = code.match(/firstName/g)
38
+ t.assert.ok(firstNameMatches === null || firstNameMatches.length <= 1,
39
+ `firstName should appear at most once (extracted function), got ${firstNameMatches ? firstNameMatches.length : 0}`)
40
+
41
+ // Verify correct serialization
42
+ const data = {
43
+ owner: { firstName: 'John', lastName: 'Doe', email: 'john@example.com' },
44
+ assignee: { firstName: 'Jane', lastName: 'Smith', email: 'jane@example.com' },
45
+ reporter: { firstName: 'Bob', lastName: 'Jones', email: 'bob@example.com' }
46
+ }
47
+
48
+ const output = serializer(data)
49
+ t.assert.doesNotThrow(() => JSON.parse(output))
50
+ t.assert.equal(output, JSON.stringify(data))
51
+ })
52
+
53
+ test('external $ref schema reused with anyOf wrapping', (t) => {
54
+ t.plan(2)
55
+
56
+ const contactSchema = {
57
+ $id: 'contact.json',
58
+ type: 'object',
59
+ properties: {
60
+ firstName: { type: 'string' },
61
+ lastName: { type: 'string' },
62
+ email: { type: 'string' }
63
+ }
64
+ }
65
+
66
+ // Common pattern: anyOf wrapping $ref for polymorphic fields (populated object OR string ID OR null)
67
+ const parentSchema = {
68
+ type: 'object',
69
+ properties: {
70
+ owner: {
71
+ anyOf: [{ type: ['string', 'null'] }, { $ref: 'contact.json' }]
72
+ },
73
+ assignee: {
74
+ anyOf: [{ type: ['string', 'null'] }, { $ref: 'contact.json' }]
75
+ },
76
+ reporter: {
77
+ anyOf: [{ type: ['string', 'null'] }, { $ref: 'contact.json' }]
78
+ }
79
+ }
80
+ }
81
+
82
+ const serializer = build(parentSchema, { schema: { 'contact.json': contactSchema } })
83
+
84
+ // Serialize with populated objects
85
+ const data = {
86
+ owner: { firstName: 'John', lastName: 'Doe', email: 'john@example.com' },
87
+ assignee: { firstName: 'Jane', lastName: 'Smith', email: 'jane@example.com' },
88
+ reporter: { firstName: 'Bob', lastName: 'Jones', email: 'bob@example.com' }
89
+ }
90
+
91
+ const output = serializer(data)
92
+ t.assert.doesNotThrow(() => JSON.parse(output))
93
+ t.assert.equal(output, JSON.stringify(data))
94
+ })
95
+
96
+ test('external $ref schema reused in array items', (t) => {
97
+ t.plan(2)
98
+
99
+ const contactSchema = {
100
+ $id: 'contact.json',
101
+ type: 'object',
102
+ properties: {
103
+ firstName: { type: 'string' },
104
+ lastName: { type: 'string' }
105
+ }
106
+ }
107
+
108
+ const parentSchema = {
109
+ type: 'object',
110
+ properties: {
111
+ contacts: {
112
+ type: 'array',
113
+ items: { $ref: 'contact.json' }
114
+ },
115
+ primary: { $ref: 'contact.json' },
116
+ secondary: { $ref: 'contact.json' }
117
+ }
118
+ }
119
+
120
+ const serializer = build(parentSchema, { schema: { 'contact.json': contactSchema } })
121
+
122
+ const data = {
123
+ contacts: [
124
+ { firstName: 'Alice', lastName: 'Wonder' },
125
+ { firstName: 'Bob', lastName: 'Builder' }
126
+ ],
127
+ primary: { firstName: 'Charlie', lastName: 'Charm' },
128
+ secondary: { firstName: 'Diana', lastName: 'Prince' }
129
+ }
130
+
131
+ const output = serializer(data)
132
+ t.assert.doesNotThrow(() => JSON.parse(output))
133
+ t.assert.equal(output, JSON.stringify(data))
134
+ })
135
+
136
+ test('external array $ref schema should be reused, not inlined at every reference', (t) => {
137
+ t.plan(2)
138
+
139
+ const tagsSchema = {
140
+ $id: 'tags.json',
141
+ type: 'array',
142
+ items: { type: 'string' }
143
+ }
144
+
145
+ const parentSchema = {
146
+ type: 'object',
147
+ properties: {
148
+ a: { $ref: 'tags.json' },
149
+ b: { $ref: 'tags.json' },
150
+ c: { $ref: 'tags.json' }
151
+ }
152
+ }
153
+
154
+ const serializer = build(parentSchema, { schema: { 'tags.json': tagsSchema } })
155
+
156
+ const data = {
157
+ a: ['x', 'y'],
158
+ b: ['z'],
159
+ c: []
160
+ }
161
+
162
+ const output = serializer(data)
163
+ t.assert.doesNotThrow(() => JSON.parse(output))
164
+ t.assert.equal(output, JSON.stringify(data))
165
+ })
166
+
167
+ test('inline anonymous schemas should still be inlined (not extracted)', (t) => {
168
+ t.plan(1)
169
+
170
+ // Inline schemas (no external $ref) should continue to work normally
171
+ const schema = {
172
+ type: 'object',
173
+ properties: {
174
+ a: { type: 'object', properties: { x: { type: 'string' } } },
175
+ b: { type: 'object', properties: { x: { type: 'string' } } }
176
+ }
177
+ }
178
+
179
+ const serializer = build(schema)
180
+ const output = serializer({ a: { x: 'hello' }, b: { x: 'world' } })
181
+
182
+ t.assert.equal(output, '{"a":{"x":"hello"},"b":{"x":"world"}}')
183
+ })
@@ -1,57 +1,57 @@
1
- 'use strict'
2
-
3
- const { test } = require('node:test')
4
- const build = require('..')
5
-
6
- test('additionalProperties: false', (t) => {
7
- t.plan(1)
8
- const stringify = build({
9
- title: 'additionalProperties',
10
- type: 'object',
11
- properties: {
12
- foo: {
13
- type: 'string'
14
- }
15
- },
16
- additionalProperties: false
17
- })
18
-
19
- const obj = { foo: 'a', bar: 'b', baz: 'c' }
20
- t.assert.equal(stringify(obj), '{"foo":"a"}')
21
- })
22
-
23
- test('additionalProperties: {}', (t) => {
24
- t.plan(1)
25
- const stringify = build({
26
- title: 'additionalProperties',
27
- type: 'object',
28
- properties: {
29
- foo: {
30
- type: 'string'
31
- }
32
- },
33
- additionalProperties: {}
34
- })
35
-
36
- const obj = { foo: 'a', bar: 'b', baz: 'c' }
37
- t.assert.equal(stringify(obj), '{"foo":"a","bar":"b","baz":"c"}')
38
- })
39
-
40
- test('additionalProperties: {type: string}', (t) => {
41
- t.plan(1)
42
- const stringify = build({
43
- title: 'additionalProperties',
44
- type: 'object',
45
- properties: {
46
- foo: {
47
- type: 'string'
48
- }
49
- },
50
- additionalProperties: {
51
- type: 'string'
52
- }
53
- })
54
-
55
- const obj = { foo: 'a', bar: 'b', baz: 'c' }
56
- t.assert.equal(stringify(obj), '{"foo":"a","bar":"b","baz":"c"}')
57
- })
1
+ 'use strict'
2
+
3
+ const { test } = require('node:test')
4
+ const build = require('..')
5
+
6
+ test('additionalProperties: false', (t) => {
7
+ t.plan(1)
8
+ const stringify = build({
9
+ title: 'additionalProperties',
10
+ type: 'object',
11
+ properties: {
12
+ foo: {
13
+ type: 'string'
14
+ }
15
+ },
16
+ additionalProperties: false
17
+ })
18
+
19
+ const obj = { foo: 'a', bar: 'b', baz: 'c' }
20
+ t.assert.equal(stringify(obj), '{"foo":"a"}')
21
+ })
22
+
23
+ test('additionalProperties: {}', (t) => {
24
+ t.plan(1)
25
+ const stringify = build({
26
+ title: 'additionalProperties',
27
+ type: 'object',
28
+ properties: {
29
+ foo: {
30
+ type: 'string'
31
+ }
32
+ },
33
+ additionalProperties: {}
34
+ })
35
+
36
+ const obj = { foo: 'a', bar: 'b', baz: 'c' }
37
+ t.assert.equal(stringify(obj), '{"foo":"a","bar":"b","baz":"c"}')
38
+ })
39
+
40
+ test('additionalProperties: {type: string}', (t) => {
41
+ t.plan(1)
42
+ const stringify = build({
43
+ title: 'additionalProperties',
44
+ type: 'object',
45
+ properties: {
46
+ foo: {
47
+ type: 'string'
48
+ }
49
+ },
50
+ additionalProperties: {
51
+ type: 'string'
52
+ }
53
+ })
54
+
55
+ const obj = { foo: 'a', bar: 'b', baz: 'c' }
56
+ t.assert.equal(stringify(obj), '{"foo":"a","bar":"b","baz":"c"}')
57
+ })
@@ -488,3 +488,23 @@ test('all array items does not match oneOf types', (t) => {
488
488
 
489
489
  t.assert.throws(() => stringify({ data: [null, false, true, undefined, [], {}] }))
490
490
  })
491
+
492
+ test('invalid oneOf schema', (t) => {
493
+ t.plan(1)
494
+
495
+ const schema = {
496
+ type: 'object',
497
+ properties: {
498
+ prop: {
499
+ oneOf: 'not array' // invalid, oneOf must be array
500
+ }
501
+ }
502
+ }
503
+
504
+ try {
505
+ build(schema)
506
+ t.assert.fail('Should throw')
507
+ } catch (err) {
508
+ t.assert.ok(err.message.includes('schema is invalid'))
509
+ }
510
+ })
@@ -2044,3 +2044,34 @@ test('ref internal - throw if schema has definition twice with different shape',
2044
2044
  t.assert.equal(err.message, 'There is already another anchor "#uri" in schema "test".')
2045
2045
  }
2046
2046
  })
2047
+
2048
+ test('ref nested', (t) => {
2049
+ t.plan(2)
2050
+
2051
+ const schema = {
2052
+ definitions: {
2053
+ def1: {
2054
+ $ref: '#/definitions/def2'
2055
+ },
2056
+ def2: {
2057
+ type: 'string'
2058
+ }
2059
+ },
2060
+ type: 'object',
2061
+ properties: {
2062
+ str: {
2063
+ $ref: '#/definitions/def1'
2064
+ }
2065
+ }
2066
+ }
2067
+
2068
+ const object = {
2069
+ str: 'test'
2070
+ }
2071
+
2072
+ const stringify = build(schema)
2073
+ const output = stringify(object)
2074
+
2075
+ t.assert.doesNotThrow(() => JSON.parse(output))
2076
+ t.assert.equal(output, '{"str":"test"}')
2077
+ })
@@ -4,7 +4,7 @@ const { test } = require('node:test')
4
4
  const build = require('..')
5
5
 
6
6
  test('nested object in pattern properties for typebox', (t) => {
7
- const { Type } = require('@sinclair/typebox')
7
+ const { Type } = require('typebox')
8
8
 
9
9
  t.plan(1)
10
10
 
@@ -1,7 +1,7 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-unused-vars -- Test using this disabled, see https://github.com/fastify/fast-json-stringify/pull/683
2
2
  import Ajv from 'ajv'
3
3
  import build, { restore, Schema, validLargeArrayMechanisms } from '..'
4
- import { expectError, expectType } from 'tsd'
4
+ import { expect } from 'tstyche'
5
5
 
6
6
  // Number schemas
7
7
  build({
@@ -26,9 +26,10 @@ build({
26
26
  build({
27
27
  type: 'number'
28
28
  }, { rounding: 'trunc' })
29
- expectError(build({
29
+
30
+ expect(build).type.not.toBeCallableWith({
30
31
  type: 'number'
31
- }, { rounding: 'invalid' }))
32
+ }, { rounding: 'invalid' })
32
33
 
33
34
  // String schema
34
35
  build({
@@ -153,7 +154,6 @@ build({
153
154
  })({ something: 'a string', somethingElse: 42 })
154
155
 
155
156
  // String schema with format
156
-
157
157
  build({
158
158
  type: 'string',
159
159
  format: 'date-time'
@@ -181,7 +181,6 @@ str = build({
181
181
  type: 'number'
182
182
  }, { mode: 'standalone' })
183
183
  */
184
-
185
184
  const debugCompiled = build({
186
185
  title: 'default string',
187
186
  type: 'object',
@@ -191,11 +190,12 @@ const debugCompiled = build({
191
190
  }
192
191
  }
193
192
  }, { mode: 'debug' })
194
- expectType<ReturnType<typeof build>>(build.restore(debugCompiled))
195
- expectType<ReturnType<typeof build>>(restore(debugCompiled))
196
193
 
197
- expectType<string[]>(build.validLargeArrayMechanisms)
198
- expectType<string[]>(validLargeArrayMechanisms)
194
+ expect(build.restore(debugCompiled)).type.toBe(build({} as Schema))
195
+ expect(restore(debugCompiled)).type.toBe(build({} as Schema))
196
+
197
+ expect(build.validLargeArrayMechanisms).type.toBe<string[]>()
198
+ expect(validLargeArrayMechanisms).type.toBe<string[]>()
199
199
 
200
200
  /**
201
201
  * Schema inference
@@ -211,10 +211,11 @@ const stringify3 = build({
211
211
  type: 'object',
212
212
  properties: { a: { type: 'string' } },
213
213
  })
214
+
214
215
  stringify3<InferenceSchema>({ id: '123' })
215
216
  stringify3<InferenceSchema>({ a: 123, id: '123' })
216
- expectError(stringify3<InferenceSchema>({ anotherOne: 'bar' }))
217
- expectError(stringify3<Schema>({ a: 'bar' }))
217
+ expect(stringify3<InferenceSchema>).type.not.toBeCallableWith({ anotherOne: 'bar' })
218
+ expect(stringify3<Schema>).type.not.toBeCallableWith({ a: 'bar' })
218
219
 
219
220
  // Without inference
220
221
  const stringify4 = build({
@@ -231,29 +232,28 @@ const stringify5 = build({
231
232
  type: 'string',
232
233
  })
233
234
  stringify5('foo')
234
- expectError(stringify5({ id: '123' }))
235
+ expect(stringify5).type.not.toBeCallableWith({ id: '123' })
235
236
 
236
237
  // Without inference - null type
237
238
  const stringify6 = build({
238
239
  type: 'null',
239
240
  })
240
241
  stringify6(null)
241
- expectError(stringify6('a string'))
242
+ expect(stringify6).type.not.toBeCallableWith('a string')
242
243
 
243
244
  // Without inference - boolean type
244
245
  const stringify7 = build({
245
246
  type: 'boolean',
246
247
  })
247
248
  stringify7(true)
248
- expectError(stringify7('a string'))
249
+ expect(stringify7).type.not.toBeCallableWith('a string')
249
250
 
250
251
  // largeArrayMechanism
251
-
252
252
  build({}, { largeArrayMechanism: 'json-stringify' })
253
253
  build({}, { largeArrayMechanism: 'default' })
254
- expectError(build({} as Schema, { largeArrayMechanism: 'invalid' }))
254
+ expect(build).type.not.toBeCallableWith({} as Schema, { largeArrayMechanism: 'invalid' })
255
255
 
256
256
  build({}, { largeArraySize: 2000 })
257
257
  build({}, { largeArraySize: '2e4' })
258
258
  build({}, { largeArraySize: 2n })
259
- expectError(build({} as Schema, { largeArraySize: ['asdf'] }))
259
+ expect(build).type.not.toBeCallableWith({} as Schema, { largeArraySize: ['asdf'] })
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics-channel-browser.d.ts","sourceRoot":"","sources":["../../../src/diagnostics-channel-browser.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,CAAA;AAGvC,eAAO,MAAM,OAAO,EAAY,OAAO,CAAC,OAAO,CAAC,CAAA;AAChD,eAAO,MAAM,OAAO,EAAY,cAAc,CAAC,OAAO,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics-channel-browser.js","sourceRoot":"","sources":["../../../src/diagnostics-channel-browser.ts"],"names":[],"mappings":";;;AAQA,MAAM,KAAK,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,CAAA;AAC1B,QAAA,OAAO,GAAG,KAAyB,CAAA;AACnC,QAAA,OAAO,GAAG,KAAgC,CAAA","sourcesContent":["// this is used in ESM environments that follow the 'browser' import\n// condition, to avoid even trying to load node:diagnostics_channel\nimport {\n type Channel,\n type TracingChannel,\n} from 'node:diagnostics_channel'\nexport type { TracingChannel, Channel }\n\nconst dummy = { hasSubscribers: false }\nexport const metrics = dummy as Channel<unknown>\nexport const tracing = dummy as TracingChannel<unknown>\n"]}
@@ -0,0 +1,5 @@
1
+ import { type Channel, type TracingChannel } from 'node:diagnostics_channel';
2
+ export type { TracingChannel, Channel };
3
+ export declare const metrics: Channel<unknown>;
4
+ export declare const tracing: TracingChannel<unknown>;
5
+ //# sourceMappingURL=diagnostics-channel-browser.d.ts.map
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tracing = exports.metrics = void 0;
4
+ const dummy = { hasSubscribers: false };
5
+ exports.metrics = dummy;
6
+ exports.tracing = dummy;
7
+ //# sourceMappingURL=diagnostics-channel-browser.js.map