@blamejs/blamejs-shop 0.5.12 → 0.5.13

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 (521) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/lib/asset-manifest.json +1 -1
  3. package/lib/vendor/MANIFEST.json +632 -416
  4. package/lib/vendor/blamejs/.clusterfuzzlite/Dockerfile +21 -10
  5. package/lib/vendor/blamejs/.clusterfuzzlite/build.sh +30 -9
  6. package/lib/vendor/blamejs/.github/dependabot.yml +8 -0
  7. package/lib/vendor/blamejs/.github/workflows/actions-lint.yml +3 -3
  8. package/lib/vendor/blamejs/.github/workflows/cflite_batch.yml +7 -2
  9. package/lib/vendor/blamejs/.github/workflows/cflite_pr.yml +7 -2
  10. package/lib/vendor/blamejs/.github/workflows/ci.yml +21 -21
  11. package/lib/vendor/blamejs/.github/workflows/codeql.yml +3 -3
  12. package/lib/vendor/blamejs/.github/workflows/npm-publish.yml +4 -4
  13. package/lib/vendor/blamejs/.github/workflows/release-container.yml +7 -7
  14. package/lib/vendor/blamejs/.github/workflows/scorecard.yml +3 -3
  15. package/lib/vendor/blamejs/.github/workflows/sha-to-tag-verify.yml +1 -1
  16. package/lib/vendor/blamejs/.gitignore +2 -0
  17. package/lib/vendor/blamejs/CHANGELOG.md +122 -0
  18. package/lib/vendor/blamejs/NOTICE +26 -1
  19. package/lib/vendor/blamejs/SECURITY.md +1 -1
  20. package/lib/vendor/blamejs/api-snapshot.json +207 -5
  21. package/lib/vendor/blamejs/docker/keycloak/realm-blamejs-test.json +29 -0
  22. package/lib/vendor/blamejs/examples/wiki/DEPLOY.md +1 -0
  23. package/lib/vendor/blamejs/examples/wiki/lib/build-app.js +31 -0
  24. package/lib/vendor/blamejs/examples/wiki/lib/source-comment-block-validator.js +109 -0
  25. package/lib/vendor/blamejs/examples/wiki/nginx.conf +106 -0
  26. package/lib/vendor/blamejs/examples/wiki/package-lock.json +1 -1
  27. package/lib/vendor/blamejs/examples/wiki/test/e2e.js +92 -0
  28. package/lib/vendor/blamejs/fuzz/asn1-der.fuzz.js +28 -0
  29. package/lib/vendor/blamejs/fuzz/cms-codec.fuzz.js +17 -0
  30. package/lib/vendor/blamejs/fuzz/link-header.fuzz.js +18 -0
  31. package/lib/vendor/blamejs/index.js +6 -0
  32. package/lib/vendor/blamejs/lib/a2a.js +4 -4
  33. package/lib/vendor/blamejs/lib/agent-idempotency.js +18 -2
  34. package/lib/vendor/blamejs/lib/agent-saga.js +36 -8
  35. package/lib/vendor/blamejs/lib/agent-snapshot.js +63 -6
  36. package/lib/vendor/blamejs/lib/app-shutdown.js +23 -20
  37. package/lib/vendor/blamejs/lib/archive-read.js +8 -0
  38. package/lib/vendor/blamejs/lib/archive-tar.js +12 -2
  39. package/lib/vendor/blamejs/lib/arg-parser.js +49 -5
  40. package/lib/vendor/blamejs/lib/asn1-der.js +12 -0
  41. package/lib/vendor/blamejs/lib/audit-sign.js +47 -1
  42. package/lib/vendor/blamejs/lib/audit.js +71 -8
  43. package/lib/vendor/blamejs/lib/auth/ciba.js +14 -2
  44. package/lib/vendor/blamejs/lib/auth/fido-mds3.js +58 -47
  45. package/lib/vendor/blamejs/lib/auth/jwt.js +34 -0
  46. package/lib/vendor/blamejs/lib/auth/oauth.js +90 -13
  47. package/lib/vendor/blamejs/lib/auth/oid4vci.js +20 -17
  48. package/lib/vendor/blamejs/lib/auth/openid-federation.js +214 -23
  49. package/lib/vendor/blamejs/lib/auth/saml.js +38 -20
  50. package/lib/vendor/blamejs/lib/auth/sd-jwt-vc.js +10 -4
  51. package/lib/vendor/blamejs/lib/backup/bundle.js +13 -3
  52. package/lib/vendor/blamejs/lib/backup/index.js +16 -5
  53. package/lib/vendor/blamejs/lib/backup/manifest.js +18 -5
  54. package/lib/vendor/blamejs/lib/base32.js +21 -0
  55. package/lib/vendor/blamejs/lib/break-glass.js +19 -10
  56. package/lib/vendor/blamejs/lib/bundler.js +5 -1
  57. package/lib/vendor/blamejs/lib/cache-status.js +3 -7
  58. package/lib/vendor/blamejs/lib/calendar.js +21 -1
  59. package/lib/vendor/blamejs/lib/cbor.js +12 -1
  60. package/lib/vendor/blamejs/lib/cert.js +29 -11
  61. package/lib/vendor/blamejs/lib/cli.js +94 -24
  62. package/lib/vendor/blamejs/lib/cloud-events.js +2 -2
  63. package/lib/vendor/blamejs/lib/cluster-provider-db.js +13 -3
  64. package/lib/vendor/blamejs/lib/codepoint-class.js +85 -0
  65. package/lib/vendor/blamejs/lib/compliance-ai-act-prohibited.js +8 -4
  66. package/lib/vendor/blamejs/lib/compliance-ai-act-transparency.js +19 -4
  67. package/lib/vendor/blamejs/lib/compliance-ai-act.js +6 -8
  68. package/lib/vendor/blamejs/lib/content-credentials.js +1 -1
  69. package/lib/vendor/blamejs/lib/content-digest.js +2 -1
  70. package/lib/vendor/blamejs/lib/cookies.js +13 -3
  71. package/lib/vendor/blamejs/lib/cose.js +31 -16
  72. package/lib/vendor/blamejs/lib/crypto-field.js +32 -0
  73. package/lib/vendor/blamejs/lib/crypto-oprf.js +11 -2
  74. package/lib/vendor/blamejs/lib/crypto-xwing.js +22 -4
  75. package/lib/vendor/blamejs/lib/crypto.js +314 -19
  76. package/lib/vendor/blamejs/lib/csp.js +11 -3
  77. package/lib/vendor/blamejs/lib/daemon.js +270 -24
  78. package/lib/vendor/blamejs/lib/dark-patterns.js +5 -2
  79. package/lib/vendor/blamejs/lib/db-declare-view.js +2 -2
  80. package/lib/vendor/blamejs/lib/db-query.js +34 -7
  81. package/lib/vendor/blamejs/lib/db.js +18 -6
  82. package/lib/vendor/blamejs/lib/dbsc.js +17 -0
  83. package/lib/vendor/blamejs/lib/dev.js +21 -2
  84. package/lib/vendor/blamejs/lib/dsr.js +157 -102
  85. package/lib/vendor/blamejs/lib/external-db.js +41 -2
  86. package/lib/vendor/blamejs/lib/file-upload.js +25 -7
  87. package/lib/vendor/blamejs/lib/flag-providers.js +27 -15
  88. package/lib/vendor/blamejs/lib/forms.js +113 -27
  89. package/lib/vendor/blamejs/lib/gate-contract.js +23 -10
  90. package/lib/vendor/blamejs/lib/gdpr-ropa.js +8 -1
  91. package/lib/vendor/blamejs/lib/guard-agent-registry.js +1 -1
  92. package/lib/vendor/blamejs/lib/guard-archive.js +2 -2
  93. package/lib/vendor/blamejs/lib/guard-cidr.js +27 -1
  94. package/lib/vendor/blamejs/lib/guard-graphql.js +30 -11
  95. package/lib/vendor/blamejs/lib/guard-html.js +26 -53
  96. package/lib/vendor/blamejs/lib/guard-image.js +24 -5
  97. package/lib/vendor/blamejs/lib/guard-imap-command.js +10 -2
  98. package/lib/vendor/blamejs/lib/guard-jmap.js +19 -3
  99. package/lib/vendor/blamejs/lib/guard-jwt.js +18 -2
  100. package/lib/vendor/blamejs/lib/guard-list-unsubscribe.js +2 -2
  101. package/lib/vendor/blamejs/lib/guard-managesieve-command.js +10 -2
  102. package/lib/vendor/blamejs/lib/guard-markdown.js +11 -24
  103. package/lib/vendor/blamejs/lib/guard-pdf.js +18 -2
  104. package/lib/vendor/blamejs/lib/guard-pop3-command.js +10 -2
  105. package/lib/vendor/blamejs/lib/guard-regex.js +8 -5
  106. package/lib/vendor/blamejs/lib/guard-svg.js +31 -32
  107. package/lib/vendor/blamejs/lib/guard-time.js +1 -1
  108. package/lib/vendor/blamejs/lib/guard-uuid.js +2 -2
  109. package/lib/vendor/blamejs/lib/html-balance.js +3 -3
  110. package/lib/vendor/blamejs/lib/http-client-cache.js +82 -4
  111. package/lib/vendor/blamejs/lib/http-client-cookie-jar.js +16 -1
  112. package/lib/vendor/blamejs/lib/http-client.js +39 -7
  113. package/lib/vendor/blamejs/lib/http-message-signature.js +35 -1
  114. package/lib/vendor/blamejs/lib/i18n-messageformat.js +31 -6
  115. package/lib/vendor/blamejs/lib/i18n.js +35 -21
  116. package/lib/vendor/blamejs/lib/incident-report.js +8 -1
  117. package/lib/vendor/blamejs/lib/ip-utils.js +11 -1
  118. package/lib/vendor/blamejs/lib/json-path.js +23 -1
  119. package/lib/vendor/blamejs/lib/jwk.js +20 -3
  120. package/lib/vendor/blamejs/lib/link-header.js +2 -1
  121. package/lib/vendor/blamejs/lib/log-stream-otlp-grpc.js +5 -1
  122. package/lib/vendor/blamejs/lib/log-stream-otlp.js +5 -1
  123. package/lib/vendor/blamejs/lib/log-stream.js +8 -3
  124. package/lib/vendor/blamejs/lib/mail-auth.js +123 -22
  125. package/lib/vendor/blamejs/lib/mail-bimi.js +1 -1
  126. package/lib/vendor/blamejs/lib/mail-bounce.js +8 -0
  127. package/lib/vendor/blamejs/lib/mail-crypto-pgp.js +46 -10
  128. package/lib/vendor/blamejs/lib/mail-dav.js +22 -3
  129. package/lib/vendor/blamejs/lib/mail-dkim.js +96 -30
  130. package/lib/vendor/blamejs/lib/mail-helo.js +6 -1
  131. package/lib/vendor/blamejs/lib/mail-scan.js +23 -16
  132. package/lib/vendor/blamejs/lib/mail-send-deliver.js +34 -8
  133. package/lib/vendor/blamejs/lib/mail-server-imap.js +3 -4
  134. package/lib/vendor/blamejs/lib/mail-server-managesieve.js +7 -11
  135. package/lib/vendor/blamejs/lib/mail-server-mx.js +93 -7
  136. package/lib/vendor/blamejs/lib/mail-server-registry.js +8 -2
  137. package/lib/vendor/blamejs/lib/mail.js +15 -5
  138. package/lib/vendor/blamejs/lib/metrics.js +268 -63
  139. package/lib/vendor/blamejs/lib/middleware/age-gate.js +7 -1
  140. package/lib/vendor/blamejs/lib/middleware/asyncapi-serve.js +1 -1
  141. package/lib/vendor/blamejs/lib/middleware/body-parser.js +19 -4
  142. package/lib/vendor/blamejs/lib/middleware/bot-guard.js +5 -9
  143. package/lib/vendor/blamejs/lib/middleware/csp-report.js +40 -8
  144. package/lib/vendor/blamejs/lib/middleware/csrf-protect.js +24 -10
  145. package/lib/vendor/blamejs/lib/middleware/dpop.js +10 -5
  146. package/lib/vendor/blamejs/lib/middleware/index.js +6 -1
  147. package/lib/vendor/blamejs/lib/middleware/nel.js +1 -1
  148. package/lib/vendor/blamejs/lib/middleware/openapi-serve.js +1 -1
  149. package/lib/vendor/blamejs/lib/middleware/rate-limit.js +12 -1
  150. package/lib/vendor/blamejs/lib/middleware/require-bound-key.js +1 -1
  151. package/lib/vendor/blamejs/lib/middleware/scim-server.js +1 -1
  152. package/lib/vendor/blamejs/lib/middleware/tus-upload.js +6 -2
  153. package/lib/vendor/blamejs/lib/mtls-ca.js +18 -2
  154. package/lib/vendor/blamejs/lib/network-dns-resolver.js +11 -1
  155. package/lib/vendor/blamejs/lib/network-dns.js +21 -2
  156. package/lib/vendor/blamejs/lib/network-tls.js +69 -7
  157. package/lib/vendor/blamejs/lib/nonce-store.js +9 -1
  158. package/lib/vendor/blamejs/lib/object-store/gcs.js +7 -0
  159. package/lib/vendor/blamejs/lib/object-store/sigv4.js +31 -0
  160. package/lib/vendor/blamejs/lib/observability-otlp-exporter.js +1 -1
  161. package/lib/vendor/blamejs/lib/outbox.js +1 -1
  162. package/lib/vendor/blamejs/lib/parsers/safe-ini.js +9 -1
  163. package/lib/vendor/blamejs/lib/parsers/safe-toml.js +10 -1
  164. package/lib/vendor/blamejs/lib/permissions.js +6 -3
  165. package/lib/vendor/blamejs/lib/pid-probe.js +55 -0
  166. package/lib/vendor/blamejs/lib/pqc-agent.js +8 -1
  167. package/lib/vendor/blamejs/lib/pqc-software.js +3 -3
  168. package/lib/vendor/blamejs/lib/pubsub.js +20 -9
  169. package/lib/vendor/blamejs/lib/queue-local.js +8 -1
  170. package/lib/vendor/blamejs/lib/queue-redis.js +5 -0
  171. package/lib/vendor/blamejs/lib/redact.js +54 -0
  172. package/lib/vendor/blamejs/lib/restore-bundle.js +10 -2
  173. package/lib/vendor/blamejs/lib/restore.js +19 -0
  174. package/lib/vendor/blamejs/lib/retention.js +12 -4
  175. package/lib/vendor/blamejs/lib/router.js +60 -6
  176. package/lib/vendor/blamejs/lib/safe-buffer.js +69 -0
  177. package/lib/vendor/blamejs/lib/safe-decompress.js +8 -2
  178. package/lib/vendor/blamejs/lib/safe-dns.js +25 -20
  179. package/lib/vendor/blamejs/lib/safe-ical.js +7 -3
  180. package/lib/vendor/blamejs/lib/safe-mime.js +12 -1
  181. package/lib/vendor/blamejs/lib/safe-object.js +80 -0
  182. package/lib/vendor/blamejs/lib/safe-path.js +52 -4
  183. package/lib/vendor/blamejs/lib/safe-redirect.js +10 -2
  184. package/lib/vendor/blamejs/lib/safe-schema.js +4 -1
  185. package/lib/vendor/blamejs/lib/safe-sieve.js +33 -1
  186. package/lib/vendor/blamejs/lib/safe-sql.js +88 -0
  187. package/lib/vendor/blamejs/lib/safe-vcard.js +7 -3
  188. package/lib/vendor/blamejs/lib/scheduler.js +8 -1
  189. package/lib/vendor/blamejs/lib/security-assert.js +6 -6
  190. package/lib/vendor/blamejs/lib/self-update-standalone-verifier.js +74 -27
  191. package/lib/vendor/blamejs/lib/self-update.js +517 -87
  192. package/lib/vendor/blamejs/lib/server-timing.js +2 -4
  193. package/lib/vendor/blamejs/lib/session.js +34 -12
  194. package/lib/vendor/blamejs/lib/sql.js +15 -1
  195. package/lib/vendor/blamejs/lib/ssrf-guard.js +52 -0
  196. package/lib/vendor/blamejs/lib/static.js +55 -13
  197. package/lib/vendor/blamejs/lib/storage.js +8 -2
  198. package/lib/vendor/blamejs/lib/subject.js +6 -1
  199. package/lib/vendor/blamejs/lib/tenant-quota.js +52 -13
  200. package/lib/vendor/blamejs/lib/tls-exporter.js +3 -3
  201. package/lib/vendor/blamejs/lib/tsa.js +34 -13
  202. package/lib/vendor/blamejs/lib/uri-template.js +8 -1
  203. package/lib/vendor/blamejs/lib/vault/index.js +13 -0
  204. package/lib/vendor/blamejs/lib/vc.js +44 -5
  205. package/lib/vendor/blamejs/lib/vendor/MANIFEST.json +26 -26
  206. package/lib/vendor/blamejs/lib/vendor/noble-ciphers.cjs +792 -1
  207. package/lib/vendor/blamejs/lib/vendor/noble-curves.cjs +3443 -1
  208. package/lib/vendor/blamejs/lib/vendor/noble-post-quantum.cjs +2737 -1
  209. package/lib/vendor/blamejs/lib/vendor/pki.cjs +39550 -13
  210. package/lib/vendor/blamejs/lib/vendor/public-suffix-list.dat +55 -53
  211. package/lib/vendor/blamejs/lib/vendor/public-suffix-list.data.js +5551 -5554
  212. package/lib/vendor/blamejs/lib/vendor/simplewebauthn-server.cjs +22459 -32
  213. package/lib/vendor/blamejs/lib/watcher.js +89 -17
  214. package/lib/vendor/blamejs/lib/webhook-dispatcher.js +25 -3
  215. package/lib/vendor/blamejs/lib/webhook.js +12 -2
  216. package/lib/vendor/blamejs/lib/ws-client.js +32 -1
  217. package/lib/vendor/blamejs/lib/xml-c14n.js +29 -1
  218. package/lib/vendor/blamejs/oss-fuzz/projects/blamejs/Dockerfile +1 -1
  219. package/lib/vendor/blamejs/package-lock.json +2 -2
  220. package/lib/vendor/blamejs/package.json +1 -1
  221. package/lib/vendor/blamejs/release-notes/v0.16.x.json +1462 -0
  222. package/lib/vendor/blamejs/release-notes/v0.17.0.json +31 -0
  223. package/lib/vendor/blamejs/release-notes/v0.17.1.json +31 -0
  224. package/lib/vendor/blamejs/release-notes/v0.17.10.json +30 -0
  225. package/lib/vendor/blamejs/release-notes/v0.17.11.json +22 -0
  226. package/lib/vendor/blamejs/release-notes/v0.17.12.json +18 -0
  227. package/lib/vendor/blamejs/release-notes/v0.17.13.json +77 -0
  228. package/lib/vendor/blamejs/release-notes/v0.17.14.json +40 -0
  229. package/lib/vendor/blamejs/release-notes/v0.17.15.json +18 -0
  230. package/lib/vendor/blamejs/release-notes/v0.17.16.json +27 -0
  231. package/lib/vendor/blamejs/release-notes/v0.17.17.json +31 -0
  232. package/lib/vendor/blamejs/release-notes/v0.17.18.json +18 -0
  233. package/lib/vendor/blamejs/release-notes/v0.17.19.json +18 -0
  234. package/lib/vendor/blamejs/release-notes/v0.17.2.json +26 -0
  235. package/lib/vendor/blamejs/release-notes/v0.17.20.json +43 -0
  236. package/lib/vendor/blamejs/release-notes/v0.17.21.json +26 -0
  237. package/lib/vendor/blamejs/release-notes/v0.17.22.json +18 -0
  238. package/lib/vendor/blamejs/release-notes/v0.17.3.json +43 -0
  239. package/lib/vendor/blamejs/release-notes/v0.17.4.json +35 -0
  240. package/lib/vendor/blamejs/release-notes/v0.17.5.json +26 -0
  241. package/lib/vendor/blamejs/release-notes/v0.17.6.json +26 -0
  242. package/lib/vendor/blamejs/release-notes/v0.17.7.json +35 -0
  243. package/lib/vendor/blamejs/release-notes/v0.17.8.json +22 -0
  244. package/lib/vendor/blamejs/release-notes/v0.17.9.json +26 -0
  245. package/lib/vendor/blamejs/scripts/validate-source-comment-blocks.js +4 -0
  246. package/lib/vendor/blamejs/scripts/vendor-update.sh +293 -9
  247. package/lib/vendor/blamejs/socket.yml +94 -0
  248. package/lib/vendor/blamejs/test/00-primitives.js +605 -0
  249. package/lib/vendor/blamejs/test/helpers/drivers.js +12 -9
  250. package/lib/vendor/blamejs/test/integration/audit-stack-mysql.test.js +90 -1
  251. package/lib/vendor/blamejs/test/integration/audit-stack-postgres.test.js +122 -1
  252. package/lib/vendor/blamejs/test/integration/data-layer-mysql.test.js +30 -0
  253. package/lib/vendor/blamejs/test/integration/data-layer-pg.test.js +29 -0
  254. package/lib/vendor/blamejs/test/integration/dsr-cluster-mysql.test.js +479 -0
  255. package/lib/vendor/blamejs/test/integration/dsr-cluster-pg.test.js +487 -0
  256. package/lib/vendor/blamejs/test/integration/federation-auth.test.js +313 -5
  257. package/lib/vendor/blamejs/test/integration/mail-dkim.test.js +80 -0
  258. package/lib/vendor/blamejs/test/integration/openid-federation-chain.test.js +275 -0
  259. package/lib/vendor/blamejs/test/integration/webhook-dispatcher-pg.test.js +96 -0
  260. package/lib/vendor/blamejs/test/layer-0-primitives/a2a-tasks.test.js +401 -0
  261. package/lib/vendor/blamejs/test/layer-0-primitives/acme.test.js +1649 -2
  262. package/lib/vendor/blamejs/test/layer-0-primitives/age-gate.test.js +33 -0
  263. package/lib/vendor/blamejs/test/layer-0-primitives/agent-idempotency.test.js +0 -0
  264. package/lib/vendor/blamejs/test/layer-0-primitives/agent-saga.test.js +60 -0
  265. package/lib/vendor/blamejs/test/layer-0-primitives/agent-snapshot.test.js +524 -0
  266. package/lib/vendor/blamejs/test/layer-0-primitives/api-encrypt.test.js +891 -0
  267. package/lib/vendor/blamejs/test/layer-0-primitives/app-shutdown.test.js +128 -1
  268. package/lib/vendor/blamejs/test/layer-0-primitives/archive-adapters.test.js +271 -0
  269. package/lib/vendor/blamejs/test/layer-0-primitives/archive-read.test.js +628 -1
  270. package/lib/vendor/blamejs/test/layer-0-primitives/archive-tar-read.test.js +0 -0
  271. package/lib/vendor/blamejs/test/layer-0-primitives/archive-wrap.test.js +227 -0
  272. package/lib/vendor/blamejs/test/layer-0-primitives/arg-parser.test.js +15 -0
  273. package/lib/vendor/blamejs/test/layer-0-primitives/asn1-der.test.js +73 -0
  274. package/lib/vendor/blamejs/test/layer-0-primitives/atomic-file.test.js +114 -0
  275. package/lib/vendor/blamejs/test/layer-0-primitives/audit-sign-anchor.test.js +141 -0
  276. package/lib/vendor/blamejs/test/layer-0-primitives/audit-tools.test.js +624 -0
  277. package/lib/vendor/blamejs/test/layer-0-primitives/audit.test.js +769 -0
  278. package/lib/vendor/blamejs/test/layer-0-primitives/auth-jwt-defenses.test.js +436 -0
  279. package/lib/vendor/blamejs/test/layer-0-primitives/auth-oauth.test.js +1697 -0
  280. package/lib/vendor/blamejs/test/layer-0-primitives/auth-oid4vp.test.js +495 -0
  281. package/lib/vendor/blamejs/test/layer-0-primitives/auth-password.test.js +500 -0
  282. package/lib/vendor/blamejs/test/layer-0-primitives/auth-saml.test.js +1809 -0
  283. package/lib/vendor/blamejs/test/layer-0-primitives/auth-status-list.test.js +243 -1
  284. package/lib/vendor/blamejs/test/layer-0-primitives/backup-index.test.js +2226 -0
  285. package/lib/vendor/blamejs/test/layer-0-primitives/backup-manifest-signature.test.js +183 -0
  286. package/lib/vendor/blamejs/test/layer-0-primitives/base32.test.js +105 -0
  287. package/lib/vendor/blamejs/test/layer-0-primitives/break-glass.test.js +693 -0
  288. package/lib/vendor/blamejs/test/layer-0-primitives/cache.test.js +603 -0
  289. package/lib/vendor/blamejs/test/layer-0-primitives/calendar.test.js +557 -0
  290. package/lib/vendor/blamejs/test/layer-0-primitives/case-insensitive-security-token-guard.test.js +214 -0
  291. package/lib/vendor/blamejs/test/layer-0-primitives/cbor.test.js +25 -0
  292. package/lib/vendor/blamejs/test/layer-0-primitives/cert.test.js +843 -6
  293. package/lib/vendor/blamejs/test/layer-0-primitives/ciba-authreqid-binding.test.js +77 -2
  294. package/lib/vendor/blamejs/test/layer-0-primitives/ciba.test.js +866 -0
  295. package/lib/vendor/blamejs/test/layer-0-primitives/clear-site-data.test.js +18 -0
  296. package/lib/vendor/blamejs/test/layer-0-primitives/cli-erase.test.js +19 -0
  297. package/lib/vendor/blamejs/test/layer-0-primitives/cli.test.js +2790 -0
  298. package/lib/vendor/blamejs/test/layer-0-primitives/cluster-lease-renewal-ttl.test.js +114 -0
  299. package/lib/vendor/blamejs/test/layer-0-primitives/cluster.test.js +1032 -0
  300. package/lib/vendor/blamejs/test/layer-0-primitives/cms-codec.test.js +575 -0
  301. package/lib/vendor/blamejs/test/layer-0-primitives/codebase-patterns.test.js +739 -1
  302. package/lib/vendor/blamejs/test/layer-0-primitives/codepoint-class.test.js +8 -0
  303. package/lib/vendor/blamejs/test/layer-0-primitives/compliance-ai-act.test.js +194 -0
  304. package/lib/vendor/blamejs/test/layer-0-primitives/compliance-lifecycle-proto-key.test.js +104 -0
  305. package/lib/vendor/blamejs/test/layer-0-primitives/compliance-sanctions.test.js +254 -0
  306. package/lib/vendor/blamejs/test/layer-0-primitives/content-credentials.test.js +613 -3
  307. package/lib/vendor/blamejs/test/layer-0-primitives/cookies.test.js +140 -0
  308. package/lib/vendor/blamejs/test/layer-0-primitives/cose.test.js +407 -0
  309. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-adversarial.test.js +352 -0
  310. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-field-derived-hash.test.js +32 -0
  311. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-field.test.js +575 -0
  312. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-hash-files-parallel.test.js +10 -0
  313. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-hash-stream.test.js +24 -0
  314. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-oprf.test.js +17 -0
  315. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-spki-pin.test.js +183 -0
  316. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-xwing.test.js +48 -0
  317. package/lib/vendor/blamejs/test/layer-0-primitives/crypto.test.js +345 -0
  318. package/lib/vendor/blamejs/test/layer-0-primitives/csp-report.test.js +58 -0
  319. package/lib/vendor/blamejs/test/layer-0-primitives/csv.test.js +48 -0
  320. package/lib/vendor/blamejs/test/layer-0-primitives/daemon.test.js +459 -1
  321. package/lib/vendor/blamejs/test/layer-0-primitives/dark-patterns.test.js +19 -0
  322. package/lib/vendor/blamejs/test/layer-0-primitives/db-query.test.js +1019 -0
  323. package/lib/vendor/blamejs/test/layer-0-primitives/db-raw-residency-gate.test.js +77 -0
  324. package/lib/vendor/blamejs/test/layer-0-primitives/db.test.js +1621 -0
  325. package/lib/vendor/blamejs/test/layer-0-primitives/ddl-change-control.test.js +462 -3
  326. package/lib/vendor/blamejs/test/layer-0-primitives/dnssec.test.js +323 -0
  327. package/lib/vendor/blamejs/test/layer-0-primitives/dpop-middleware-verify.test.js +562 -0
  328. package/lib/vendor/blamejs/test/layer-0-primitives/dsr.test.js +901 -1
  329. package/lib/vendor/blamejs/test/layer-0-primitives/dual-control.test.js +249 -0
  330. package/lib/vendor/blamejs/test/layer-0-primitives/external-db-migrate.test.js +561 -0
  331. package/lib/vendor/blamejs/test/layer-0-primitives/external-db.test.js +1214 -0
  332. package/lib/vendor/blamejs/test/layer-0-primitives/fal.test.js +21 -0
  333. package/lib/vendor/blamejs/test/layer-0-primitives/fedcm-dbsc.test.js +46 -20
  334. package/lib/vendor/blamejs/test/layer-0-primitives/federation-vc-suite.test.js +147 -3
  335. package/lib/vendor/blamejs/test/layer-0-primitives/fido-mds3.test.js +907 -38
  336. package/lib/vendor/blamejs/test/layer-0-primitives/file-upload-content-safety-skip-audit.test.js +29 -0
  337. package/lib/vendor/blamejs/test/layer-0-primitives/file-upload.test.js +1135 -0
  338. package/lib/vendor/blamejs/test/layer-0-primitives/flag.test.js +30 -0
  339. package/lib/vendor/blamejs/test/layer-0-primitives/forms.test.js +747 -0
  340. package/lib/vendor/blamejs/test/layer-0-primitives/gate-contract.test.js +1855 -0
  341. package/lib/vendor/blamejs/test/layer-0-primitives/gdpr-ropa.test.js +30 -0
  342. package/lib/vendor/blamejs/test/layer-0-primitives/guard-archive.test.js +86 -0
  343. package/lib/vendor/blamejs/test/layer-0-primitives/guard-auth.test.js +117 -0
  344. package/lib/vendor/blamejs/test/layer-0-primitives/guard-cidr.test.js +151 -0
  345. package/lib/vendor/blamejs/test/layer-0-primitives/guard-domain.test.js +422 -0
  346. package/lib/vendor/blamejs/test/layer-0-primitives/guard-filename.test.js +424 -0
  347. package/lib/vendor/blamejs/test/layer-0-primitives/{guard-gate-disposition-coverage.test.js → guard-gate-disposition.test.js} +1 -1
  348. package/lib/vendor/blamejs/test/layer-0-primitives/guard-graphql.test.js +340 -0
  349. package/lib/vendor/blamejs/test/layer-0-primitives/guard-html.test.js +29 -0
  350. package/lib/vendor/blamejs/test/layer-0-primitives/guard-idempotency-key.test.js +28 -0
  351. package/lib/vendor/blamejs/test/layer-0-primitives/guard-image.test.js +519 -45
  352. package/lib/vendor/blamejs/test/layer-0-primitives/guard-imap-command.test.js +0 -0
  353. package/lib/vendor/blamejs/test/layer-0-primitives/guard-jmap.test.js +51 -0
  354. package/lib/vendor/blamejs/test/layer-0-primitives/guard-jsonpath.test.js +66 -0
  355. package/lib/vendor/blamejs/test/layer-0-primitives/guard-jwt.test.js +436 -0
  356. package/lib/vendor/blamejs/test/layer-0-primitives/guard-managesieve-command.test.js +25 -0
  357. package/lib/vendor/blamejs/test/layer-0-primitives/guard-markdown.test.js +16 -0
  358. package/lib/vendor/blamejs/test/layer-0-primitives/guard-mime.test.js +86 -0
  359. package/lib/vendor/blamejs/test/layer-0-primitives/guard-oauth.test.js +140 -0
  360. package/lib/vendor/blamejs/test/layer-0-primitives/guard-pdf.test.js +80 -0
  361. package/lib/vendor/blamejs/test/layer-0-primitives/guard-pop3-command.test.js +27 -0
  362. package/lib/vendor/blamejs/test/layer-0-primitives/guard-regex.test.js +99 -0
  363. package/lib/vendor/blamejs/test/layer-0-primitives/guard-shell.test.js +76 -0
  364. package/lib/vendor/blamejs/test/layer-0-primitives/{guard-sql-coverage.test.js → guard-sql.test.js} +3 -3
  365. package/lib/vendor/blamejs/test/layer-0-primitives/guard-svg.test.js +524 -0
  366. package/lib/vendor/blamejs/test/layer-0-primitives/guard-template.test.js +71 -0
  367. package/lib/vendor/blamejs/test/layer-0-primitives/guard-time.test.js +92 -0
  368. package/lib/vendor/blamejs/test/layer-0-primitives/guard-uuid.test.js +86 -0
  369. package/lib/vendor/blamejs/test/layer-0-primitives/html-balance.test.js +38 -0
  370. package/lib/vendor/blamejs/test/layer-0-primitives/http-client-cache-authorization.test.js +347 -0
  371. package/lib/vendor/blamejs/test/layer-0-primitives/http-client-cache.test.js +908 -0
  372. package/lib/vendor/blamejs/test/layer-0-primitives/http-client.test.js +2874 -0
  373. package/lib/vendor/blamejs/test/layer-0-primitives/http-message-signature.test.js +643 -0
  374. package/lib/vendor/blamejs/test/layer-0-primitives/i18n-messageformat.test.js +38 -0
  375. package/lib/vendor/blamejs/test/layer-0-primitives/i18n.test.js +1153 -1
  376. package/lib/vendor/blamejs/test/layer-0-primitives/idempotency-key.test.js +494 -0
  377. package/lib/vendor/blamejs/test/layer-0-primitives/ip-utils.test.js +30 -0
  378. package/lib/vendor/blamejs/test/layer-0-primitives/jsdoc-example-execution.test.js +177 -0
  379. package/lib/vendor/blamejs/test/layer-0-primitives/json-path.test.js +103 -0
  380. package/lib/vendor/blamejs/test/layer-0-primitives/json-schema.test.js +214 -0
  381. package/lib/vendor/blamejs/test/layer-0-primitives/jwk.test.js +41 -0
  382. package/lib/vendor/blamejs/test/layer-0-primitives/jwt-external.test.js +276 -0
  383. package/lib/vendor/blamejs/test/layer-0-primitives/keychain.test.js +0 -0
  384. package/lib/vendor/blamejs/test/layer-0-primitives/log-stream.test.js +241 -0
  385. package/lib/vendor/blamejs/test/layer-0-primitives/log.test.js +106 -0
  386. package/lib/vendor/blamejs/test/layer-0-primitives/mail-agent.test.js +441 -0
  387. package/lib/vendor/blamejs/test/layer-0-primitives/mail-auth.test.js +2136 -4
  388. package/lib/vendor/blamejs/test/layer-0-primitives/mail-bimi.test.js +759 -12
  389. package/lib/vendor/blamejs/test/layer-0-primitives/mail-bounce.test.js +811 -1
  390. package/lib/vendor/blamejs/test/layer-0-primitives/mail-crypto-pgp-experimental.test.js +401 -3
  391. package/lib/vendor/blamejs/test/layer-0-primitives/mail-crypto-pgp.test.js +751 -8
  392. package/lib/vendor/blamejs/test/layer-0-primitives/mail-crypto-smime.test.js +864 -0
  393. package/lib/vendor/blamejs/test/layer-0-primitives/mail-crypto.test.js +110 -0
  394. package/lib/vendor/blamejs/test/layer-0-primitives/mail-dav.test.js +830 -1
  395. package/lib/vendor/blamejs/test/layer-0-primitives/mail-deploy.test.js +635 -86
  396. package/lib/vendor/blamejs/test/layer-0-primitives/mail-dkim.test.js +818 -0
  397. package/lib/vendor/blamejs/test/layer-0-primitives/mail-helo.test.js +27 -0
  398. package/lib/vendor/blamejs/test/layer-0-primitives/mail-scan.test.js +199 -0
  399. package/lib/vendor/blamejs/test/layer-0-primitives/mail-send-deliver.test.js +686 -2
  400. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-imap.test.js +778 -0
  401. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-jmap.test.js +1438 -0
  402. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-managesieve.test.js +449 -6
  403. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-mx.test.js +773 -2
  404. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-pop3.test.js +623 -3
  405. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-rate-limit.test.js +55 -0
  406. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-registry.test.js +13 -0
  407. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-submission.test.js +877 -1
  408. package/lib/vendor/blamejs/test/layer-0-primitives/mail-sieve.test.js +326 -0
  409. package/lib/vendor/blamejs/test/layer-0-primitives/mail-store-fts.test.js +55 -0
  410. package/lib/vendor/blamejs/test/layer-0-primitives/mail-store.test.js +242 -0
  411. package/lib/vendor/blamejs/test/layer-0-primitives/mail.test.js +1596 -2
  412. package/lib/vendor/blamejs/test/layer-0-primitives/mcp.test.js +440 -4
  413. package/lib/vendor/blamejs/test/layer-0-primitives/metrics-snapshot.test.js +89 -0
  414. package/lib/vendor/blamejs/test/layer-0-primitives/metrics.test.js +1230 -0
  415. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-assetlinks.test.js +113 -0
  416. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-body-parser.test.js +1169 -0
  417. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-bot-disclose.test.js +123 -0
  418. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-cookies.test.js +108 -0
  419. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-gpc.test.js +121 -0
  420. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-headers.test.js +163 -0
  421. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-host-allowlist.test.js +154 -0
  422. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-require-content-type.test.js +127 -0
  423. package/lib/vendor/blamejs/test/layer-0-primitives/{middleware-tus-upload-coverage.test.js → middleware-tus-upload.test.js} +45 -0
  424. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-web-app-manifest.test.js +132 -0
  425. package/lib/vendor/blamejs/test/layer-0-primitives/mtls-ca-crl-fingerprint-only.test.js +92 -0
  426. package/lib/vendor/blamejs/test/layer-0-primitives/network-dns-resolver.test.js +65 -0
  427. package/lib/vendor/blamejs/test/layer-0-primitives/network-dns.test.js +1727 -1
  428. package/lib/vendor/blamejs/test/layer-0-primitives/network-nts.test.js +699 -0
  429. package/lib/vendor/blamejs/test/layer-0-primitives/network-smtp-policy.test.js +1181 -0
  430. package/lib/vendor/blamejs/test/layer-0-primitives/network-tls.test.js +1876 -3
  431. package/lib/vendor/blamejs/test/layer-0-primitives/network.test.js +32 -0
  432. package/lib/vendor/blamejs/test/layer-0-primitives/nonce-store-enforce-replay-nonboolean.test.js +81 -0
  433. package/lib/vendor/blamejs/test/layer-0-primitives/ntp-check.test.js +122 -0
  434. package/lib/vendor/blamejs/test/layer-0-primitives/observability-tracing.test.js +378 -0
  435. package/lib/vendor/blamejs/test/layer-0-primitives/observability.test.js +77 -0
  436. package/lib/vendor/blamejs/test/layer-0-primitives/oid4vci.test.js +1016 -0
  437. package/lib/vendor/blamejs/test/layer-0-primitives/openid-federation.test.js +946 -0
  438. package/lib/vendor/blamejs/test/layer-0-primitives/outbox.test.js +818 -0
  439. package/lib/vendor/blamejs/test/layer-0-primitives/own-property-membership-guards.test.js +109 -0
  440. package/lib/vendor/blamejs/test/layer-0-primitives/parsers-safe-toml.test.js +543 -0
  441. package/lib/vendor/blamejs/test/layer-0-primitives/{parsers-safe-yaml-coverage.test.js → parsers-safe-yaml.test.js} +2 -2
  442. package/lib/vendor/blamejs/test/layer-0-primitives/parsers-standalone.test.js +73 -0
  443. package/lib/vendor/blamejs/test/layer-0-primitives/passkey.test.js +649 -0
  444. package/lib/vendor/blamejs/test/layer-0-primitives/permissions.test.js +524 -0
  445. package/lib/vendor/blamejs/test/layer-0-primitives/pqc-agent-curve.test.js +22 -0
  446. package/lib/vendor/blamejs/test/layer-0-primitives/pubsub.test.js +295 -0
  447. package/lib/vendor/blamejs/test/layer-0-primitives/queue-flow-repeat.test.js +36 -0
  448. package/lib/vendor/blamejs/test/layer-0-primitives/queue.test.js +83 -0
  449. package/lib/vendor/blamejs/test/layer-0-primitives/rate-limit-xff-spoofing.test.js +34 -0
  450. package/lib/vendor/blamejs/test/layer-0-primitives/redact.test.js +1031 -0
  451. package/lib/vendor/blamejs/test/layer-0-primitives/request-helpers.test.js +94 -0
  452. package/lib/vendor/blamejs/test/layer-0-primitives/require-bound-key.test.js +401 -0
  453. package/lib/vendor/blamejs/test/layer-0-primitives/restore-empty-manifest-wipe.test.js +154 -0
  454. package/lib/vendor/blamejs/test/layer-0-primitives/retention.test.js +600 -0
  455. package/lib/vendor/blamejs/test/layer-0-primitives/router-host-path-injection.test.js +231 -0
  456. package/lib/vendor/blamejs/test/layer-0-primitives/router-tls0rtt.test.js +21 -0
  457. package/lib/vendor/blamejs/test/layer-0-primitives/router.test.js +1277 -0
  458. package/lib/vendor/blamejs/test/layer-0-primitives/safe-async.test.js +133 -0
  459. package/lib/vendor/blamejs/test/layer-0-primitives/safe-buffer-linear-scans.test.js +14 -0
  460. package/lib/vendor/blamejs/test/layer-0-primitives/safe-buffer.test.js +80 -0
  461. package/lib/vendor/blamejs/test/layer-0-primitives/safe-decompress.test.js +28 -0
  462. package/lib/vendor/blamejs/test/layer-0-primitives/safe-dns.test.js +245 -0
  463. package/lib/vendor/blamejs/test/layer-0-primitives/safe-ical.test.js +32 -0
  464. package/lib/vendor/blamejs/test/layer-0-primitives/safe-ini.test.js +376 -0
  465. package/lib/vendor/blamejs/test/layer-0-primitives/safe-json.test.js +175 -0
  466. package/lib/vendor/blamejs/test/layer-0-primitives/safe-mime.test.js +518 -0
  467. package/lib/vendor/blamejs/test/layer-0-primitives/safe-object.test.js +62 -0
  468. package/lib/vendor/blamejs/test/layer-0-primitives/safe-path.test.js +30 -0
  469. package/lib/vendor/blamejs/test/layer-0-primitives/safe-schema.test.js +104 -0
  470. package/lib/vendor/blamejs/test/layer-0-primitives/safe-sql.test.js +142 -0
  471. package/lib/vendor/blamejs/test/layer-0-primitives/safe-url.test.js +112 -0
  472. package/lib/vendor/blamejs/test/layer-0-primitives/safe-vcard.test.js +26 -0
  473. package/lib/vendor/blamejs/test/layer-0-primitives/scheduler.test.js +157 -0
  474. package/lib/vendor/blamejs/test/layer-0-primitives/scim-server.test.js +396 -0
  475. package/lib/vendor/blamejs/test/layer-0-primitives/sd-jwt-vc.test.js +930 -0
  476. package/lib/vendor/blamejs/test/layer-0-primitives/security-assert.test.js +755 -82
  477. package/lib/vendor/blamejs/test/layer-0-primitives/self-update.test.js +1053 -0
  478. package/lib/vendor/blamejs/test/layer-0-primitives/session-device-binding.test.js +200 -0
  479. package/lib/vendor/blamejs/test/layer-0-primitives/session-strict-binding-missing-failclosed.test.js +110 -0
  480. package/lib/vendor/blamejs/test/layer-0-primitives/sigv4-bucket-ops.test.js +636 -0
  481. package/lib/vendor/blamejs/test/layer-0-primitives/sql-offset-without-limit.test.js +94 -0
  482. package/lib/vendor/blamejs/test/layer-0-primitives/sql.test.js +1190 -0
  483. package/lib/vendor/blamejs/test/layer-0-primitives/ssrf-guard.test.js +21 -0
  484. package/lib/vendor/blamejs/test/layer-0-primitives/static.test.js +850 -0
  485. package/lib/vendor/blamejs/test/layer-0-primitives/storage-presigned-url.test.js +146 -0
  486. package/lib/vendor/blamejs/test/layer-0-primitives/storage.test.js +621 -0
  487. package/lib/vendor/blamejs/test/layer-0-primitives/subject.test.js +47 -0
  488. package/lib/vendor/blamejs/test/layer-0-primitives/template.test.js +582 -0
  489. package/lib/vendor/blamejs/test/layer-0-primitives/tenant-quota.test.js +587 -25
  490. package/lib/vendor/blamejs/test/layer-0-primitives/time.test.js +11 -0
  491. package/lib/vendor/blamejs/test/layer-0-primitives/tsa.test.js +524 -63
  492. package/lib/vendor/blamejs/test/layer-0-primitives/uri-template.test.js +27 -0
  493. package/lib/vendor/blamejs/test/layer-0-primitives/vault-rotate.test.js +866 -0
  494. package/lib/vendor/blamejs/test/layer-0-primitives/vault.test.js +74 -0
  495. package/lib/vendor/blamejs/test/layer-0-primitives/vc.test.js +215 -0
  496. package/lib/vendor/blamejs/test/layer-0-primitives/watcher.test.js +550 -0
  497. package/lib/vendor/blamejs/test/layer-0-primitives/webhook-dispatcher.test.js +388 -0
  498. package/lib/vendor/blamejs/test/layer-0-primitives/webhook.test.js +262 -0
  499. package/lib/vendor/blamejs/test/layer-0-primitives/websocket.test.js +1294 -0
  500. package/lib/vendor/blamejs/test/layer-0-primitives/ws-client.test.js +629 -0
  501. package/lib/vendor/blamejs/test/layer-0-primitives/xml-c14n-attr-normalization.test.js +164 -0
  502. package/lib/vendor/blamejs/test/smoke.js +2 -0
  503. package/package.json +1 -1
  504. package/lib/vendor/blamejs/release-notes/v0.16.0.json +0 -44
  505. package/lib/vendor/blamejs/release-notes/v0.16.1.json +0 -36
  506. package/lib/vendor/blamejs/release-notes/v0.16.2.json +0 -71
  507. package/lib/vendor/blamejs/release-notes/v0.16.3.json +0 -71
  508. package/lib/vendor/blamejs/test/layer-0-primitives/acme-coverage.test.js +0 -441
  509. package/lib/vendor/blamejs/test/layer-0-primitives/auth-oauth-coverage.test.js +0 -482
  510. package/lib/vendor/blamejs/test/layer-0-primitives/auth-saml-coverage.test.js +0 -671
  511. package/lib/vendor/blamejs/test/layer-0-primitives/backup-index-coverage.test.js +0 -690
  512. package/lib/vendor/blamejs/test/layer-0-primitives/cli-coverage.test.js +0 -238
  513. package/lib/vendor/blamejs/test/layer-0-primitives/content-credentials-coverage.test.js +0 -319
  514. package/lib/vendor/blamejs/test/layer-0-primitives/keychain-coverage.test.js +0 -0
  515. package/lib/vendor/blamejs/test/layer-0-primitives/mail-auth-coverage.test.js +0 -437
  516. package/lib/vendor/blamejs/test/layer-0-primitives/mcp-coverage.test.js +0 -443
  517. package/lib/vendor/blamejs/test/layer-0-primitives/metrics-coverage.test.js +0 -395
  518. package/lib/vendor/blamejs/test/layer-0-primitives/network-smtp-policy-coverage.test.js +0 -565
  519. package/lib/vendor/blamejs/test/layer-0-primitives/router-coverage.test.js +0 -592
  520. package/lib/vendor/blamejs/test/layer-0-primitives/sql-coverage.test.js +0 -422
  521. package/lib/vendor/blamejs/test/layer-0-primitives/test-coverage.test.js +0 -573
@@ -0,0 +1,109 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // Copyright (c) blamejs contributors
3
+ "use strict";
4
+ // Own-property membership class.
5
+ //
6
+ // A guard that tests membership in a plain-object table with a bare
7
+ // `TABLE[key]` truthiness read walks the prototype chain: a key that collides
8
+ // with an inherited Object.prototype member — `constructor` is the only
9
+ // all-lowercase data property, so it survives a lowercased key — reads the
10
+ // inherited value as truthy and is misclassified. Depending on the table's
11
+ // meaning this over-rejects (a reserved/forbidden/void table: the key is
12
+ // wrongly refused) or fails open (an allowlist/catalogue: the key wrongly
13
+ // passes). Every case resolves the same way: Object.prototype.hasOwnProperty
14
+ // .call(TABLE, key) so only the table's own keys match. This locks the guard
15
+ // family the campaign has been converting off the truthiness read.
16
+
17
+ var helpers = require("../helpers");
18
+ var check = helpers.check;
19
+ var b = helpers.b;
20
+
21
+ // ---- guardAgentRegistry: a reserved-name table must not flag `constructor` ----
22
+ function testAgentRegistryReservedName() {
23
+ // `constructor` is NOT a framework-reserved name; it must validate on its
24
+ // own merits, not be refused because RESERVED_EXACT["constructor"] inherits
25
+ // the Object constructor. (A genuinely reserved name still throws.)
26
+ var ok = null;
27
+ try { b.guardAgentRegistry.validate({ kind: "register", name: "constructor", agentKind: "mail" }); ok = true; }
28
+ catch (e) { ok = e.code; }
29
+ check("guardAgentRegistry accepts a 'constructor' name (not misflagged reserved)", ok === true);
30
+ }
31
+
32
+ // ---- guardListUnsubscribe: reserved-local-host + dangerous-scheme tables ----
33
+ function testListUnsubscribeReservedHostAndScheme() {
34
+ // A 'constructor' host is not a reserved localhost name — the one-click URI
35
+ // must stay eligible, not be dropped as reserved-local-host.
36
+ var vHost = b.guardListUnsubscribe.validate({
37
+ listUnsubscribe: "<https://constructor/unsub>",
38
+ listUnsubscribePost: "List-Unsubscribe=One-Click",
39
+ });
40
+ check("guardListUnsubscribe does not flag a 'constructor' host as reserved-local-host",
41
+ Array.isArray(vHost.uris) && vHost.uris.length === 1 && vHost.uris[0].oneClickEligible === true);
42
+
43
+ // A 'constructor:' scheme is not on the dangerous-scheme denylist; it must
44
+ // not be auto-refused (a real dangerous scheme still is — below).
45
+ var vScheme = b.guardListUnsubscribe.validate({
46
+ listUnsubscribe: "<constructor:foo>, <https://x.com/u>",
47
+ listUnsubscribePost: "List-Unsubscribe=One-Click",
48
+ });
49
+ check("guardListUnsubscribe does not refuse a 'constructor:' scheme as dangerous",
50
+ vScheme.action === "accept");
51
+
52
+ // Regression guard: a genuinely dangerous scheme is still refused (the
53
+ // own-property change does not weaken the denylist for real entries).
54
+ var vJs = b.guardListUnsubscribe.validate({
55
+ listUnsubscribe: "<javascript:alert(1)>",
56
+ listUnsubscribePost: "List-Unsubscribe=One-Click",
57
+ });
58
+ check("guardListUnsubscribe still refuses a real dangerous scheme (javascript:)",
59
+ vJs.action === "refuse" && vJs.reason.indexOf("always-refused") !== -1);
60
+ }
61
+
62
+ // ---- htmlBalance: the void-element table (open + close paths) ----
63
+ function testHtmlBalanceVoidTable() {
64
+ // `<constructor>` is not a void element: the opening tag must be pushed and
65
+ // matched by its close (balanced), not skipped as void (which orphaned the
66
+ // close). Both the open-path and close-path membership tests are covered.
67
+ check("htmlBalance treats <constructor> as a normal (balanced) element",
68
+ b.htmlBalance.check("<constructor></constructor>") === null);
69
+
70
+ // Regression guard: a real void element is still not pushed (no false
71
+ // unclosed error) and a stray void close is still flagged.
72
+ check("htmlBalance still treats <br> as void (no unclosed error)",
73
+ b.htmlBalance.check("<br>text") === null);
74
+ var voidClose = b.htmlBalance.check("</br>");
75
+ check("htmlBalance still flags a stray void-element close",
76
+ voidClose !== null && voidClose.code === "html/void-close");
77
+ }
78
+
79
+ // ---- mail.bimi: the Tiny-PS forbidden-element table ----
80
+ function testBimiForbiddenTable() {
81
+ function _codes(rv) { return (rv.violations || []).map(function (v) { return v.code || v; }); }
82
+ var svgHead = '<svg version="1.2" baseProfile="tiny-ps" viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">';
83
+ // A <constructor> element is not on the Tiny-PS forbidden list; it must not
84
+ // be flagged element-forbidden via a prototype-member truthiness read.
85
+ var vProto = b.mail.bimi.validateTinyPsSvg(svgHead + "<constructor></constructor></svg>");
86
+ check("mail.bimi does not flag a <constructor> element as forbidden",
87
+ _codes(vProto).indexOf("element-forbidden") === -1);
88
+ // Regression guard: a real forbidden element (<script>) is still flagged.
89
+ var vScript = b.mail.bimi.validateTinyPsSvg(svgHead + "<script>x</script></svg>");
90
+ check("mail.bimi still flags a real forbidden element (<script>)",
91
+ _codes(vScript).indexOf("element-forbidden") !== -1);
92
+ }
93
+
94
+ function run() {
95
+ var before = helpers.getChecks();
96
+ testAgentRegistryReservedName();
97
+ testListUnsubscribeReservedHostAndScheme();
98
+ testHtmlBalanceVoidTable();
99
+ testBimiForbiddenTable();
100
+ if (require.main === module) {
101
+ console.log("OK — own-property membership guards — " + (helpers.getChecks() - before) + " checks");
102
+ }
103
+ }
104
+
105
+ if (require.main === module) {
106
+ try { run(); }
107
+ catch (e) { console.error(e); process.exit(1); }
108
+ }
109
+ module.exports = { run: run };
@@ -0,0 +1,543 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // Copyright (c) blamejs contributors
3
+ "use strict";
4
+ /**
5
+ * b.parsers.toml — error-path, adversarial-input, and defensive-branch
6
+ * coverage.
7
+ *
8
+ * Drives the TOML 1.0 parser (lib/parsers/safe-toml.js) through every
9
+ * branch a happy-path smoke leaves untouched: opt-shape refusals, the
10
+ * resource caps (maxBytes / maxDepth for arrays + inline tables /
11
+ * maxKeys), wrong-input-type rejection, the full string-escape error
12
+ * family, every quoted / literal / multi-line string form, the
13
+ * date-time literal surface (offset → Date, local → ISO string, the
14
+ * bad-datetime rejection), the numeric surface (hex/oct/bin, special
15
+ * floats, integer-overflow, radix errors), the array / inline-table
16
+ * parse errors, the table-header redefinition matrix (array-of-tables,
17
+ * inline-table mutation, define-twice, value-array descent), and the
18
+ * prototype-pollution key guard across bare / quoted / dotted paths.
19
+ *
20
+ * Every assertion runs offline through the public b.parsers.toml.parse
21
+ * consumer path — no private internals, no live backend.
22
+ */
23
+
24
+ var helpers = require("../helpers");
25
+ var b = helpers.b;
26
+ var check = helpers.check;
27
+
28
+ var toml = b.parsers.toml;
29
+
30
+ // Capture the SafeTomlError code from a synchronous parse throw. Returns
31
+ // the literal string "NO-THROW" when parse returns a value, so a missing
32
+ // rejection fails the check loudly rather than silently matching.
33
+ function _code(src, opts) {
34
+ try {
35
+ toml.parse(src, opts);
36
+ return "NO-THROW";
37
+ } catch (e) {
38
+ return (e && e.code) || ("PLAIN:" + (e && e.message));
39
+ }
40
+ }
41
+
42
+ // ---- opt-shape refusals (config-time throw: toml/bad-opt) ----
43
+
44
+ function testBadNumericOpts() {
45
+ // maxBytes / maxDepth / maxKeys must each be a positive finite integer.
46
+ // Infinity / NaN / negative / zero / non-integer all silently lift the
47
+ // DoS cap they enforce, so each is rejected at the entry point.
48
+ check("maxBytes=Infinity → bad-opt", _code("a = 1", { maxBytes: Infinity }) === "toml/bad-opt");
49
+ check("maxBytes=NaN → bad-opt", _code("a = 1", { maxBytes: NaN }) === "toml/bad-opt");
50
+ check("maxBytes=-1 → bad-opt", _code("a = 1", { maxBytes: -1 }) === "toml/bad-opt");
51
+ check("maxBytes=1.5 → bad-opt", _code("a = 1", { maxBytes: 1.5 }) === "toml/bad-opt");
52
+ check("maxBytes=0 → bad-opt", _code("a = 1", { maxBytes: 0 }) === "toml/bad-opt");
53
+ check("maxDepth=Infinity → bad-opt", _code("a = 1", { maxDepth: Infinity }) === "toml/bad-opt");
54
+ check("maxDepth=0 → bad-opt", _code("a = 1", { maxDepth: 0 }) === "toml/bad-opt");
55
+ check("maxDepth=-3 → bad-opt", _code("a = 1", { maxDepth: -3 }) === "toml/bad-opt");
56
+ check("maxKeys=NaN → bad-opt", _code("a = 1", { maxKeys: NaN }) === "toml/bad-opt");
57
+ check("maxKeys=-5 → bad-opt", _code("a = 1", { maxKeys: -5 }) === "toml/bad-opt");
58
+ check("maxKeys=0 → bad-opt", _code("a = 1", { maxKeys: 0 }) === "toml/bad-opt");
59
+ // A large-but-finite opt is accepted (the clamp branch, not the reject
60
+ // branch) — proves the `!== undefined` path applies Math.min clamping
61
+ // rather than throwing.
62
+ var r = toml.parse("a = 1", { maxBytes: b.constants.BYTES.mib(128), maxDepth: 5000, maxKeys: 5_000_000 });
63
+ check("oversize-but-finite opts accepted (clamped)", r.a === 1);
64
+ }
65
+
66
+ // ---- wrong input type / oversize (via safe-buffer.normalizeText) ----
67
+
68
+ function testWrongInputType() {
69
+ check("number input rejected", _code(42) === "toml/wrong-input-type");
70
+ check("object input rejected", _code({ a: 1 }) === "toml/wrong-input-type");
71
+ check("null input rejected", _code(null) === "toml/wrong-input-type");
72
+ check("undefined input rejected", _code(undefined) === "toml/wrong-input-type");
73
+ check("array input rejected", _code([1, 2]) === "toml/wrong-input-type");
74
+ check("boolean input rejected", _code(true) === "toml/wrong-input-type");
75
+ }
76
+
77
+ function testByteInputsParse() {
78
+ // Buffer / Uint8Array are the accepted non-string shapes — they decode
79
+ // as UTF-8 and parse identically to the string form. A BOM prefix is
80
+ // stripped by normalizeText before the parser sees it.
81
+ var fromBuf = toml.parse(Buffer.from("a = 1\n", "utf8"));
82
+ check("Buffer input parses", fromBuf.a === 1);
83
+ var fromU8 = toml.parse(new Uint8Array([0x61, 0x20, 0x3d, 0x20, 0x31])); // "a = 1"
84
+ check("Uint8Array input parses", fromU8.a === 1);
85
+ var withBom = toml.parse("a = 1\n");
86
+ check("leading BOM stripped", withBom.a === 1);
87
+ }
88
+
89
+ function testTooLargeAndKeys() {
90
+ // maxBytes cap on the whole input (toml/too-large from normalizeText).
91
+ check("oversize input → too-large",
92
+ _code("a = \"" + "x".repeat(4000) + "\"", { maxBytes: b.constants.BYTES.kib(1) }) === "toml/too-large");
93
+ // maxKeys cap — the 3rd assignment trips a 2-key ceiling (_bumpKeys).
94
+ check("maxKeys exceeded → too-many-keys",
95
+ _code("a = 1\nb = 2\nc = 3", { maxKeys: 2 }) === "toml/too-many-keys");
96
+ // Inline-table members also count toward maxKeys.
97
+ check("inline-table maxKeys → too-many-keys",
98
+ _code("t = { a = 1, b = 2, c = 3 }", { maxKeys: 2 }) === "toml/too-many-keys");
99
+ }
100
+
101
+ // ---- depth caps: arrays, inline tables, dotted-key header paths ----
102
+
103
+ function testDepthCaps() {
104
+ // Nested value arrays past maxDepth (the _parseArray recursion guard).
105
+ check("array nesting → too-deep",
106
+ _code("a = [[[[1]]]]", { maxDepth: 2 }) === "toml/too-deep");
107
+ // Nested inline tables past maxDepth (the _parseInlineTable guard, an
108
+ // independent recursion path).
109
+ check("inline-table nesting → too-deep",
110
+ _code("a = { b = { c = { d = 1 } } }", { maxDepth: 2 }) === "toml/too-deep");
111
+ // A dotted-key table header with more segments than maxDepth (guards the
112
+ // recursive post-parse normalize walker against stack overflow).
113
+ check("dotted-key header depth → too-deep",
114
+ _code("[a.b.c.d.e]", { maxDepth: 3 }) === "toml/too-deep");
115
+ // Dotted key on a key/value line also caps.
116
+ check("dotted key/value depth → too-deep",
117
+ _code("a.b.c.d.e = 1", { maxDepth: 3 }) === "toml/too-deep");
118
+ }
119
+
120
+ // ---- prototype-pollution key guard, every decode path ----
121
+
122
+ function testPoisonedKeys() {
123
+ check("bare '__proto__' key → poisoned-key", _code("__proto__ = 1") === "toml/poisoned-key");
124
+ check("bare 'constructor' key → poisoned-key", _code("constructor = 1") === "toml/poisoned-key");
125
+ check("bare 'prototype' key → poisoned-key", _code("prototype = 1") === "toml/poisoned-key");
126
+ // Quoted keys that decode to a poisoned name.
127
+ check("double-quoted '__proto__' → poisoned-key", _code('"__proto__" = 1') === "toml/poisoned-key");
128
+ check("single-quoted '__proto__' → poisoned-key", _code("'__proto__' = 1") === "toml/poisoned-key");
129
+ // Poisoned segment as a NON-first dotted-key segment.
130
+ check("dotted 'a.__proto__' → poisoned-key", _code("a.__proto__ = 1") === "toml/poisoned-key");
131
+ // Poisoned segment inside a table header.
132
+ check("table header '[a.constructor]' → poisoned-key", _code("[a.constructor]") === "toml/poisoned-key");
133
+ // Poisoned key inside an inline table.
134
+ check("inline '{ __proto__ = 1 }' → poisoned-key", _code("t = { __proto__ = 1 }") === "toml/poisoned-key");
135
+ // None of the above may have mutated Object.prototype.
136
+ check("Object.prototype not polluted", typeof ({}).polluted === "undefined");
137
+ check("Object.prototype constructor intact", ({}).constructor === Object);
138
+ }
139
+
140
+ // ---- string escape errors (toml/bad-escape) ----
141
+
142
+ function testEscapeErrors() {
143
+ check("bad \\u hex → bad-escape", _code('a = "\\uZZZZ"') === "toml/bad-escape");
144
+ check("short \\u → bad-escape", _code('a = "\\u12"') === "toml/bad-escape");
145
+ check("bad \\U hex → bad-escape", _code('a = "\\UZZZZZZZZ"') === "toml/bad-escape");
146
+ check("short \\U → bad-escape", _code('a = "\\U0001"') === "toml/bad-escape");
147
+ check("\\U past U+10FFFF → bad-escape", _code('a = "\\UFFFFFFFF"') === "toml/bad-escape");
148
+ check("unknown escape → bad-escape", _code('a = "\\q"') === "toml/bad-escape");
149
+ // A backslash escape inside a QUOTED KEY routes through the same decoder.
150
+ check("bad escape in quoted key → bad-escape", _code('"a\\q" = 1') === "toml/bad-escape");
151
+ }
152
+
153
+ function testEscapesDecode() {
154
+ // The full accepted escape set decodes to the intended chars.
155
+ var d = toml.parse('a = "x\\ny\\tz\\\\w\\"q\\r\\b\\f\\/p"');
156
+ check("escape set decodes", d.a === "x\ny\tz\\w\"q\r\b\f/p");
157
+ // \u (BMP) and \U (astral) code points.
158
+ var d2 = toml.parse('a = "\\u0041\\U0001F600"');
159
+ check("\\u + \\U decode", d2.a === "A\u{1F600}");
160
+ // A backslash escape inside a basic quoted KEY decodes.
161
+ var d3 = toml.parse('"a\\tb" = 1');
162
+ check("escape in quoted key decodes", Object.keys(d3)[0] === "a\tb");
163
+ }
164
+
165
+ // ---- quoted / literal string forms + their unterminated errors ----
166
+
167
+ function testStringForms() {
168
+ check("basic string", toml.parse('a = "hello"').a === "hello");
169
+ check("literal string", toml.parse("a = 'C:\\\\path'").a === "C:\\\\path");
170
+ check("empty basic string", toml.parse('a = ""').a === "");
171
+ // Literal quoted key (single-quote key segment).
172
+ var lit = toml.parse("'literal key' = 1");
173
+ check("literal quoted key", lit["literal key"] === 1);
174
+ }
175
+
176
+ function testUnterminatedStrings() {
177
+ check("unterminated basic → unterminated-string",
178
+ _code('a = "no close') === "toml/unterminated-string");
179
+ check("unterminated literal → unterminated-string",
180
+ _code("a = 'no close") === "toml/unterminated-string");
181
+ check("unterminated multi-line basic → unterminated-string",
182
+ _code('a = """no close') === "toml/unterminated-string");
183
+ check("unterminated multi-line literal → unterminated-string",
184
+ _code("a = '''no close") === "toml/unterminated-string");
185
+ // Unterminated quoted KEY (EOF before the closing quote).
186
+ check("unterminated quoted key → bad-key",
187
+ _code('"abc') === "toml/bad-key");
188
+ }
189
+
190
+ function testBadStringChars() {
191
+ // A raw newline inside a single-line basic string is rejected (must use
192
+ // triple-quote for multi-line).
193
+ check("newline in basic string → bad-string",
194
+ _code('a = "line1\nline2"') === "toml/bad-string");
195
+ check("newline in literal string → bad-string",
196
+ _code("a = 'line1\nline2'") === "toml/bad-string");
197
+ // A raw newline inside a quoted KEY.
198
+ check("newline in quoted key → bad-key",
199
+ _code('"ab\ncd" = 1') === "toml/bad-key");
200
+ // An unescaped C0 control char (here a raw NUL) in a basic string.
201
+ check("control char in basic string → bad-string",
202
+ _code('a = "x' + String.fromCharCode(0) + 'y"') === "toml/bad-string");
203
+ }
204
+
205
+ function testMultilineStrings() {
206
+ // Multi-line basic with a leading newline immediately after the opener
207
+ // (that first newline is trimmed).
208
+ var m = toml.parse('a = """\nfirst\nsecond"""');
209
+ check("multi-line basic trims leading newline", m.a === "first\nsecond");
210
+ // Line-ending backslash folds the newline + leading whitespace away.
211
+ var folded = toml.parse('a = """\\\n one \\\n two"""');
212
+ check("line-ending backslash folds whitespace", folded.a === "one two");
213
+ // A line-ending backslash followed by SEVERAL blank lines folds all of
214
+ // them (the inner blank-line-skipping loop, not just one newline).
215
+ var foldedBlank = toml.parse('a = """one \\\n\n\n two"""');
216
+ check("line-ending backslash folds multiple blank lines", foldedBlank.a === "one two");
217
+ // Escape decoding inside multi-line basic.
218
+ var esc = toml.parse('a = """x\\ty"""');
219
+ check("escape inside multi-line basic", esc.a === "x\ty");
220
+ // Multi-line literal preserves everything verbatim (no escape decoding).
221
+ var lit = toml.parse("a = '''\nline\\ttab'''");
222
+ check("multi-line literal verbatim", lit.a === "line\\ttab");
223
+ // Trailing quotes fold into the string (up to two before the closing
224
+ // triple).
225
+ var tq = toml.parse('a = """ends with quote""""');
226
+ check("multi-line basic trailing quote", tq.a === "ends with quote\"");
227
+ }
228
+
229
+ // ---- number surface: integers, floats, radices, special values ----
230
+
231
+ function testNumbers() {
232
+ check("plain integer", toml.parse("a = 42").a === 42);
233
+ check("negative integer", toml.parse("a = -17").a === -17);
234
+ check("underscore integer", toml.parse("a = 1_000_000").a === 1000000);
235
+ check("float with dot", toml.parse("a = 3.14").a === 3.14);
236
+ check("float with exponent", toml.parse("a = 1e3").a === 1000);
237
+ check("float exp sign", toml.parse("a = 1.5E-2").a === 0.015);
238
+ check("hex literal", toml.parse("a = 0xDEAD_beef").a === 0xDEADBEEF);
239
+ check("octal literal", toml.parse("a = 0o755").a === 493);
240
+ check("binary literal", toml.parse("a = 0b1010").a === 10);
241
+ }
242
+
243
+ function testSpecialFloats() {
244
+ check("+inf → +Infinity", toml.parse("a = +inf").a === Infinity);
245
+ check("-inf → -Infinity", toml.parse("a = -inf").a === -Infinity);
246
+ check("bare inf", toml.parse("a = inf").a === Infinity);
247
+ check("+nan → NaN", Number.isNaN(toml.parse("a = +nan").a));
248
+ check("-nan → NaN", Number.isNaN(toml.parse("a = -nan").a));
249
+ check("bare nan → NaN", Number.isNaN(toml.parse("a = nan").a));
250
+ }
251
+
252
+ function testNumberErrors() {
253
+ // Integer overflow (decimal) — TOML mandates 64-bit but a JS Number
254
+ // can't hold it without precision loss, so the parser refuses.
255
+ check("decimal overflow → integer-overflow",
256
+ _code("a = 99999999999999999999") === "toml/integer-overflow");
257
+ // Radix overflow.
258
+ check("hex overflow → integer-overflow",
259
+ _code("a = 0xFFFFFFFFFFFFFFFFFF") === "toml/integer-overflow");
260
+ // Sign on a radix literal is illegal.
261
+ check("sign on hex → bad-number",
262
+ _code("a = -0x1F") === "toml/bad-number");
263
+ // Radix prefix with no digits.
264
+ check("empty digits after 0b → bad-number",
265
+ _code("a = 0b2") === "toml/bad-number");
266
+ // A lone minus with a dot decodes to no number (parseFloat NaN path).
267
+ check("'-.' → bad-number",
268
+ _code("a = -.") === "toml/bad-number");
269
+ // A lone sign.
270
+ check("lone '-' → bad-number",
271
+ _code("a = -") === "toml/bad-number");
272
+ }
273
+
274
+ // ---- date-time literal surface ----
275
+
276
+ function testDateTimes() {
277
+ // Offset date-time → JS Date (and survives _normalize as a Date).
278
+ var off = toml.parse("d = 1979-05-27T07:32:00Z");
279
+ check("offset date-time → Date", off.d instanceof Date);
280
+ check("offset date-time value", off.d.getTime() === Date.UTC(1979, 4, 27, 7, 32, 0));
281
+ var offNum = toml.parse("d = 1979-05-27T00:32:00.999-07:00");
282
+ check("numeric-offset date-time → Date", offNum.d instanceof Date);
283
+ // Space separator variant.
284
+ var offSpace = toml.parse("d = 1979-05-27 07:32:00Z");
285
+ check("space-separated offset date-time → Date", offSpace.d instanceof Date);
286
+ // Local date-time (no offset) stays an ISO string.
287
+ var ldt = toml.parse("d = 1979-05-27T07:32:00");
288
+ check("local date-time → ISO string", ldt.d === "1979-05-27T07:32:00");
289
+ // Local date only.
290
+ var ld = toml.parse("d = 1979-05-27");
291
+ check("local date → string", ld.d === "1979-05-27");
292
+ // Local time only, with fractional seconds.
293
+ var lt = toml.parse("d = 07:32:00.5");
294
+ check("local time → string", lt.d === "07:32:00.5");
295
+ // Fractional seconds on a local date-time.
296
+ var frac = toml.parse("d = 1979-05-27T00:32:00.999999");
297
+ check("fractional local date-time", frac.d === "1979-05-27T00:32:00.999999");
298
+ }
299
+
300
+ function testBadDateTime() {
301
+ // A syntactically date-shaped but semantically invalid offset date-time
302
+ // (month 13) fails the new Date() validity check.
303
+ check("invalid offset date-time → bad-datetime",
304
+ _code("d = 1979-13-01T00:00:00Z") === "toml/bad-datetime");
305
+ }
306
+
307
+ // ---- boolean + array + inline-table happy paths + parse errors ----
308
+
309
+ function testBooleansAndArrays() {
310
+ check("true", toml.parse("a = true").a === true);
311
+ check("false", toml.parse("a = false").a === false);
312
+ var arr = toml.parse("a = [1, 2, 3]");
313
+ check("array parses", Array.isArray(arr.a) && arr.a.length === 3 && arr.a[2] === 3);
314
+ var empty = toml.parse("a = []");
315
+ check("empty array", Array.isArray(empty.a) && empty.a.length === 0);
316
+ // Whitespace, newlines, comments, and a trailing comma inside an array.
317
+ var multi = toml.parse("a = [\n 1, # first\n 2,\n]");
318
+ check("multiline array with comment + trailing comma", multi.a.length === 2 && multi.a[1] === 2);
319
+ var inline = toml.parse("t = { x = 1, y = 2 }");
320
+ check("inline table parses", inline.t.x === 1 && inline.t.y === 2);
321
+ var emptyInline = toml.parse("t = {}");
322
+ check("empty inline table", typeof emptyInline.t === "object" && Object.keys(emptyInline.t).length === 0);
323
+ // Dotted key inside an inline table builds nested structure.
324
+ var dotted = toml.parse("t = { a.b = 1 }");
325
+ check("dotted key in inline table", dotted.t.a.b === 1);
326
+ }
327
+
328
+ function testCollectionErrors() {
329
+ check("array bad separator → bad-array",
330
+ _code("a = [1 2]") === "toml/bad-array");
331
+ check("inline missing '=' → bad-inline-table",
332
+ _code("t = { x 1 }") === "toml/bad-inline-table");
333
+ check("inline trailing comma → bad-inline-table",
334
+ _code("t = { x = 1,}") === "toml/bad-inline-table");
335
+ check("inline bad separator → bad-inline-table",
336
+ _code("t = { x = 1 y = 2 }") === "toml/bad-inline-table");
337
+ }
338
+
339
+ // ---- value-position + structural errors ----
340
+
341
+ function testValueErrors() {
342
+ check("value EOF → expected-value", _code("a =") === "toml/expected-value");
343
+ check("unexpected char → expected-value", _code("a = @") === "toml/expected-value");
344
+ check("missing '=' → bad-kv", _code("a 1") === "toml/bad-kv");
345
+ check("empty key '= 1' → expected-key", _code("= 1") === "toml/expected-key");
346
+ // Trailing junk after a value (no comment, no newline).
347
+ check("trailing junk after value → expected-newline",
348
+ _code("a = 1 junk") === "toml/expected-newline");
349
+ }
350
+
351
+ // ---- table header parsing + the redefinition matrix ----
352
+
353
+ function testTableHeaders() {
354
+ // A single table + a nested super-table auto-vivified by a dotted header.
355
+ var t = toml.parse("[a]\nx = 1\n[a.b]\ny = 2");
356
+ check("nested table headers", t.a.x === 1 && t.a.b.y === 2);
357
+ // A dotted header whose parent does not yet exist auto-vivifies it.
358
+ var t2 = toml.parse("[a.b.c]\nz = 3");
359
+ check("deep auto-vivified header", t2.a.b.c.z === 3);
360
+ // Array-of-tables.
361
+ var aot = toml.parse("[[p]]\nn = 1\n[[p]]\nn = 2");
362
+ check("array of tables", Array.isArray(aot.p) && aot.p.length === 2 && aot.p[1].n === 2);
363
+ // Sub-table under an array-of-tables element (descend into the last elem).
364
+ var aotSub = toml.parse("[[p]]\nn = 1\n[p.detail]\nk = 9");
365
+ check("sub-table under AoT element", aotSub.p[0].detail.k === 9);
366
+ // A comment on the header line is consumed.
367
+ var withComment = toml.parse("[a] # a table\nx = 1");
368
+ check("header with trailing comment", withComment.a.x === 1);
369
+ }
370
+
371
+ function testTableHeaderErrors() {
372
+ check("missing ']' → bad-table-header",
373
+ _code("[a\nx = 1") === "toml/bad-table-header");
374
+ check("missing second ']' in AoT → bad-table-header",
375
+ _code("[[a]\nx = 1") === "toml/bad-table-header");
376
+ // Redefining an existing table.
377
+ check("table defined twice → redefine",
378
+ _code("[a]\n[a]") === "toml/redefine");
379
+ // A key already bound to a scalar cannot become a table.
380
+ check("scalar then table header → redefine",
381
+ _code("a = 1\n[a]") === "toml/redefine");
382
+ // A key bound to a scalar cannot become a sub-table via dotted header.
383
+ check("scalar then dotted header → redefine",
384
+ _code("a = 1\n[a.b]") === "toml/redefine");
385
+ // An array-of-tables name reused as a plain table.
386
+ check("AoT then plain table → redefine",
387
+ _code("[[a]]\n[a]") === "toml/redefine");
388
+ // A plain table name reused as an array-of-tables.
389
+ check("plain table then AoT → redefine",
390
+ _code("[a]\n[[a]]") === "toml/redefine");
391
+ // Descending into a VALUE array (scalar last element) via a header.
392
+ check("descend into value array → redefine",
393
+ _code("a = [1]\n[a.b]") === "toml/redefine");
394
+ // A table header that tries to extend an inline table.
395
+ check("header extends inline table → inline-table-mutated",
396
+ _code("a = { x = 1 }\n[a.b]") === "toml/inline-table-mutated");
397
+ }
398
+
399
+ // ---- key/value redefinition + dotted-key building ----
400
+
401
+ function testKeyValueRedefinition() {
402
+ check("duplicate key → duplicate-key",
403
+ _code("a = 1\na = 2") === "toml/duplicate-key");
404
+ check("dotted redefine scalar as sub-table → redefine",
405
+ _code("a = 1\na.b = 2") === "toml/redefine");
406
+ check("dotted extend inline table → inline-table-mutated",
407
+ _code("a = { x = 1 }\na.y = 2") === "toml/inline-table-mutated");
408
+ // Legal dotted-key building of a nested object across two lines.
409
+ var t = toml.parse("a.b = 1\na.c = 2");
410
+ check("dotted keys build nested object", t.a.b === 1 && t.a.c === 2);
411
+ }
412
+
413
+ // ---- whitespace / comment / blank-line handling in the top-level loop ----
414
+
415
+ function testDocumentStructure() {
416
+ // Leading comment line, blank lines, CRLF line endings.
417
+ var t = toml.parse("# header comment\r\n\r\na = 1\r\nb = 2\r\n");
418
+ check("comments + blanks + CRLF", t.a === 1 && t.b === 2);
419
+ // A document that is only comments + whitespace yields an empty object.
420
+ var empty = toml.parse("# just a comment\n\n \n");
421
+ check("comment-only document → empty object",
422
+ typeof empty === "object" && Object.keys(empty).length === 0);
423
+ // Empty input yields an empty object.
424
+ check("empty input → empty object", Object.keys(toml.parse("")).length === 0);
425
+ // Output is a plain {}-prototype object (normalize strips null-prototype).
426
+ var proto = toml.parse("a = 1");
427
+ check("output has Object.prototype", Object.getPrototypeOf(proto) === Object.prototype);
428
+ // A trailing comment with no newline at EOF is tolerated.
429
+ var trailing = toml.parse("a = 1 # trailing");
430
+ check("trailing comment at EOF", trailing.a === 1);
431
+ }
432
+
433
+ // ---- residual CR/LF, sign, and date-boundary branch arms ----
434
+
435
+ function testResidualBranches() {
436
+ // A line-ending backslash followed by multiple CRLF blank lines folds
437
+ // them all (the CR arm of the inner blank-line loop).
438
+ var foldCrlf = toml.parse('a = """one \\\r\n\r\n two"""');
439
+ check("CRLF multi-blank fold", foldCrlf.a === "one two");
440
+ // A multi-line literal string whose opener is followed by a CRLF trims
441
+ // that leading CRLF.
442
+ var mlLitCrlf = toml.parse("a = '''\r\nverbatim'''");
443
+ check("multi-line literal trims leading CRLF", mlLitCrlf.a === "verbatim");
444
+ // A multi-line literal ending with extra apostrophes folds up to two of
445
+ // them into the value.
446
+ var litTrail = toml.parse("a = '''ends'''''");
447
+ check("multi-line literal trailing quotes", litTrail.a === "ends''");
448
+ // A leading '+' on a plain decimal integer.
449
+ check("+decimal sign", toml.parse("a = +42").a === 42);
450
+ // A bare local date immediately followed by a newline + more content
451
+ // (the date-boundary check sees a truthy non-date char, not EOF).
452
+ var bareDate = toml.parse("d = 1979-05-27\ne = 2");
453
+ check("bare date then newline", bareDate.d === "1979-05-27" && bareDate.e === 2);
454
+ // A date-shaped run trailed by a digit is NOT a date; the leading digits
455
+ // parse as a number and the stray suffix trips the newline expectation.
456
+ check("date-shaped run + trailing digit → expected-newline",
457
+ _code("d = 1979-05-277") === "toml/expected-newline");
458
+ // Trailing spaces on the final line (no closing newline) reach EOF in
459
+ // the top-level loop after whitespace is skipped.
460
+ var trailSpace = toml.parse("a = 1\n ");
461
+ check("trailing spaces at EOF", trailSpace.a === 1);
462
+ // Multi-line basic string whose opener is followed by a CRLF trims that
463
+ // leading CRLF (the CRLF arm of the opener strip).
464
+ var mlBasicCrlf = toml.parse("a = \"\"\"\r\nfirst\"\"\"");
465
+ check("multi-line basic trims leading CRLF", mlBasicCrlf.a === "first");
466
+ // A basic string ending with a lone backslash at EOF: the escape decoder
467
+ // runs with the cursor already at end-of-input (the _advance past-EOF
468
+ // guard) and then rejects the dangling escape.
469
+ check("basic string backslash at EOF → bad-escape",
470
+ _code('a = "x\\') === "toml/bad-escape");
471
+ check("multi-line basic backslash at EOF → bad-escape",
472
+ _code('a = """x\\') === "toml/bad-escape");
473
+ }
474
+
475
+ // ---- error object surface ----
476
+
477
+ function testErrorSurface() {
478
+ try {
479
+ toml.parse("a = @");
480
+ check("error path threw", false);
481
+ } catch (e) {
482
+ check("error is SafeTomlError", e instanceof toml.SafeTomlError);
483
+ check("error marks isSafeTomlError", e.isSafeTomlError === true);
484
+ check("error carries line/col", typeof e.line === "number" && typeof e.col === "number");
485
+ check("error name", e.name === "SafeTomlError");
486
+ }
487
+ // A config-time bad-opt error carries a null line (no source position).
488
+ try {
489
+ toml.parse("a = 1", { maxKeys: 0 });
490
+ check("bad-opt threw", false);
491
+ } catch (e) {
492
+ check("bad-opt error has null line", e.line === null && e.col === null);
493
+ }
494
+ // The public error class defaults its code + null-positions when
495
+ // constructed without them (the operator-facing constructor fallback).
496
+ var bare = new toml.SafeTomlError("plain message");
497
+ check("bare SafeTomlError default code", bare.code === "toml/invalid");
498
+ check("bare SafeTomlError null line/col", bare.line === null && bare.col === null);
499
+ check("bare SafeTomlError message verbatim", bare.message === "plain message");
500
+ }
501
+
502
+ function run() {
503
+ testBadNumericOpts();
504
+ testWrongInputType();
505
+ testByteInputsParse();
506
+ testTooLargeAndKeys();
507
+ testDepthCaps();
508
+ testPoisonedKeys();
509
+ testEscapeErrors();
510
+ testEscapesDecode();
511
+ testStringForms();
512
+ testUnterminatedStrings();
513
+ testBadStringChars();
514
+ testMultilineStrings();
515
+ testNumbers();
516
+ testSpecialFloats();
517
+ testNumberErrors();
518
+ testDateTimes();
519
+ testBadDateTime();
520
+ testBooleansAndArrays();
521
+ testCollectionErrors();
522
+ testValueErrors();
523
+ testTableHeaders();
524
+ testTableHeaderErrors();
525
+ testKeyValueRedefinition();
526
+ testDocumentStructure();
527
+ testResidualBranches();
528
+ testErrorSurface();
529
+ }
530
+
531
+ module.exports = { run: run };
532
+
533
+ // Allow direct execution: `node test/layer-0-primitives/parsers-safe-toml.test.js`
534
+ if (require.main === module) {
535
+ try {
536
+ run();
537
+ console.log("OK — parsers-safe-toml " + helpers.getChecks() + " checks passed");
538
+ process.exit(0);
539
+ } catch (e) {
540
+ console.error(helpers.formatErr(e));
541
+ process.exit(1);
542
+ }
543
+ }
@@ -279,11 +279,11 @@ function run() {
279
279
 
280
280
  module.exports = { run: run };
281
281
 
282
- // Allow direct execution: `node test/layer-0-primitives/parsers-safe-yaml-coverage.test.js`
282
+ // Allow direct execution: `node test/layer-0-primitives/parsers-safe-yaml.test.js`
283
283
  if (require.main === module) {
284
284
  try {
285
285
  run();
286
- console.log("OK — parsers-safe-yaml-coverage " + helpers.getChecks() + " checks passed");
286
+ console.log("OK — parsers-safe-yaml " + helpers.getChecks() + " checks passed");
287
287
  process.exit(0);
288
288
  } catch (e) {
289
289
  console.error(helpers.formatErr(e));