cdktn 0.23.2 → 0.23.3

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 (363) hide show
  1. package/.jsii +34 -34
  2. package/README.md +1 -1
  3. package/lib/annotations.js +1 -1
  4. package/lib/app.js +1 -1
  5. package/lib/aspect.js +1 -1
  6. package/lib/backends/azurerm-backend.js +2 -2
  7. package/lib/backends/cloud-backend.js +4 -4
  8. package/lib/backends/consul-backend.js +2 -2
  9. package/lib/backends/cos-backend.js +2 -2
  10. package/lib/backends/gcs-backend.js +2 -2
  11. package/lib/backends/http-backend.js +2 -2
  12. package/lib/backends/local-backend.js +2 -2
  13. package/lib/backends/oss-backend.js +2 -2
  14. package/lib/backends/pg-backend.js +2 -2
  15. package/lib/backends/remote-backend.js +4 -4
  16. package/lib/backends/s3-backend.js +2 -2
  17. package/lib/backends/swift-backend.js +2 -2
  18. package/lib/complex-computed-list.js +25 -25
  19. package/lib/errors.d.ts +1 -2
  20. package/lib/errors.js +11 -8
  21. package/lib/functions/terraform-functions.generated.js +1 -1
  22. package/lib/importable-resource.js +1 -1
  23. package/lib/manifest.js +4 -5
  24. package/lib/resource.js +1 -1
  25. package/lib/synthesize/synthesizer.js +4 -5
  26. package/lib/terraform-asset.js +1 -1
  27. package/lib/terraform-backend.js +1 -1
  28. package/lib/terraform-count.js +1 -1
  29. package/lib/terraform-data-resource.js +1 -1
  30. package/lib/terraform-data-source.js +1 -1
  31. package/lib/terraform-dynamic-block.js +2 -2
  32. package/lib/terraform-dynamic-expression.js +2 -2
  33. package/lib/terraform-element.js +1 -1
  34. package/lib/terraform-functions.js +1 -1
  35. package/lib/terraform-hcl-module.js +1 -1
  36. package/lib/terraform-iterator.js +5 -5
  37. package/lib/terraform-local.js +1 -1
  38. package/lib/terraform-module.js +1 -1
  39. package/lib/terraform-operators.js +1 -1
  40. package/lib/terraform-output.js +1 -1
  41. package/lib/terraform-provider.js +1 -1
  42. package/lib/terraform-provisioner.js +1 -1
  43. package/lib/terraform-remote-state.js +1 -1
  44. package/lib/terraform-resource-targets.js +1 -1
  45. package/lib/terraform-resource.js +1 -1
  46. package/lib/terraform-stack.js +1 -1
  47. package/lib/terraform-variable.js +2 -2
  48. package/lib/testing/index.js +7 -8
  49. package/lib/testing/matchers.js +1 -1
  50. package/lib/tokens/lazy.js +4 -4
  51. package/lib/tokens/private/intrinsic.d.ts +0 -5
  52. package/lib/tokens/private/intrinsic.js +2 -9
  53. package/lib/tokens/private/stack-trace.d.ts +6 -0
  54. package/lib/tokens/private/stack-trace.js +14 -1
  55. package/lib/tokens/resolvable.js +4 -4
  56. package/lib/tokens/string-fragments.js +1 -1
  57. package/lib/tokens/token.js +2 -2
  58. package/lib/tsconfig.tsbuildinfo +1 -1
  59. package/lib/upgrade-id-aspect.js +1 -1
  60. package/node_modules/{call-bind-apply-helpers → safe-stable-stringify}/LICENSE +2 -2
  61. package/node_modules/safe-stable-stringify/esm/package.json +4 -0
  62. package/node_modules/safe-stable-stringify/esm/wrapper.d.ts +4 -0
  63. package/node_modules/safe-stable-stringify/esm/wrapper.js +6 -0
  64. package/node_modules/safe-stable-stringify/index.d.ts +22 -0
  65. package/node_modules/safe-stable-stringify/index.js +625 -0
  66. package/node_modules/safe-stable-stringify/package.json +65 -0
  67. package/node_modules/safe-stable-stringify/readme.md +179 -0
  68. package/package.json +5 -6
  69. package/node_modules/call-bind/.eslintignore +0 -1
  70. package/node_modules/call-bind/.eslintrc +0 -16
  71. package/node_modules/call-bind/.github/FUNDING.yml +0 -12
  72. package/node_modules/call-bind/.nycrc +0 -9
  73. package/node_modules/call-bind/CHANGELOG.md +0 -106
  74. package/node_modules/call-bind/LICENSE +0 -21
  75. package/node_modules/call-bind/README.md +0 -64
  76. package/node_modules/call-bind/callBound.js +0 -15
  77. package/node_modules/call-bind/index.js +0 -24
  78. package/node_modules/call-bind/package.json +0 -93
  79. package/node_modules/call-bind/test/callBound.js +0 -54
  80. package/node_modules/call-bind/test/index.js +0 -74
  81. package/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
  82. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
  83. package/node_modules/call-bind-apply-helpers/.nycrc +0 -9
  84. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
  85. package/node_modules/call-bind-apply-helpers/README.md +0 -62
  86. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
  87. package/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
  88. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
  89. package/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
  90. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
  91. package/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
  92. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
  93. package/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
  94. package/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
  95. package/node_modules/call-bind-apply-helpers/index.js +0 -15
  96. package/node_modules/call-bind-apply-helpers/package.json +0 -85
  97. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
  98. package/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
  99. package/node_modules/call-bind-apply-helpers/test/index.js +0 -63
  100. package/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
  101. package/node_modules/call-bound/.eslintrc +0 -13
  102. package/node_modules/call-bound/.github/FUNDING.yml +0 -12
  103. package/node_modules/call-bound/.nycrc +0 -9
  104. package/node_modules/call-bound/CHANGELOG.md +0 -42
  105. package/node_modules/call-bound/LICENSE +0 -21
  106. package/node_modules/call-bound/README.md +0 -53
  107. package/node_modules/call-bound/index.d.ts +0 -94
  108. package/node_modules/call-bound/index.js +0 -19
  109. package/node_modules/call-bound/package.json +0 -99
  110. package/node_modules/call-bound/test/index.js +0 -61
  111. package/node_modules/call-bound/tsconfig.json +0 -10
  112. package/node_modules/define-data-property/.eslintrc +0 -24
  113. package/node_modules/define-data-property/.github/FUNDING.yml +0 -12
  114. package/node_modules/define-data-property/.nycrc +0 -13
  115. package/node_modules/define-data-property/CHANGELOG.md +0 -70
  116. package/node_modules/define-data-property/LICENSE +0 -21
  117. package/node_modules/define-data-property/README.md +0 -67
  118. package/node_modules/define-data-property/index.d.ts +0 -12
  119. package/node_modules/define-data-property/index.js +0 -56
  120. package/node_modules/define-data-property/package.json +0 -106
  121. package/node_modules/define-data-property/test/index.js +0 -392
  122. package/node_modules/define-data-property/tsconfig.json +0 -59
  123. package/node_modules/dunder-proto/.eslintrc +0 -5
  124. package/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
  125. package/node_modules/dunder-proto/.nycrc +0 -13
  126. package/node_modules/dunder-proto/CHANGELOG.md +0 -24
  127. package/node_modules/dunder-proto/LICENSE +0 -21
  128. package/node_modules/dunder-proto/README.md +0 -54
  129. package/node_modules/dunder-proto/get.d.ts +0 -5
  130. package/node_modules/dunder-proto/get.js +0 -30
  131. package/node_modules/dunder-proto/package.json +0 -76
  132. package/node_modules/dunder-proto/set.d.ts +0 -5
  133. package/node_modules/dunder-proto/set.js +0 -35
  134. package/node_modules/dunder-proto/test/get.js +0 -34
  135. package/node_modules/dunder-proto/test/index.js +0 -4
  136. package/node_modules/dunder-proto/test/set.js +0 -50
  137. package/node_modules/dunder-proto/tsconfig.json +0 -9
  138. package/node_modules/es-define-property/.eslintrc +0 -13
  139. package/node_modules/es-define-property/.github/FUNDING.yml +0 -12
  140. package/node_modules/es-define-property/.nycrc +0 -9
  141. package/node_modules/es-define-property/CHANGELOG.md +0 -29
  142. package/node_modules/es-define-property/LICENSE +0 -21
  143. package/node_modules/es-define-property/README.md +0 -49
  144. package/node_modules/es-define-property/index.d.ts +0 -3
  145. package/node_modules/es-define-property/index.js +0 -14
  146. package/node_modules/es-define-property/package.json +0 -81
  147. package/node_modules/es-define-property/test/index.js +0 -56
  148. package/node_modules/es-define-property/tsconfig.json +0 -10
  149. package/node_modules/es-errors/.eslintrc +0 -5
  150. package/node_modules/es-errors/.github/FUNDING.yml +0 -12
  151. package/node_modules/es-errors/CHANGELOG.md +0 -40
  152. package/node_modules/es-errors/LICENSE +0 -21
  153. package/node_modules/es-errors/README.md +0 -55
  154. package/node_modules/es-errors/eval.d.ts +0 -3
  155. package/node_modules/es-errors/eval.js +0 -4
  156. package/node_modules/es-errors/index.d.ts +0 -3
  157. package/node_modules/es-errors/index.js +0 -4
  158. package/node_modules/es-errors/package.json +0 -80
  159. package/node_modules/es-errors/range.d.ts +0 -3
  160. package/node_modules/es-errors/range.js +0 -4
  161. package/node_modules/es-errors/ref.d.ts +0 -3
  162. package/node_modules/es-errors/ref.js +0 -4
  163. package/node_modules/es-errors/syntax.d.ts +0 -3
  164. package/node_modules/es-errors/syntax.js +0 -4
  165. package/node_modules/es-errors/test/index.js +0 -19
  166. package/node_modules/es-errors/tsconfig.json +0 -49
  167. package/node_modules/es-errors/type.d.ts +0 -3
  168. package/node_modules/es-errors/type.js +0 -4
  169. package/node_modules/es-errors/uri.d.ts +0 -3
  170. package/node_modules/es-errors/uri.js +0 -4
  171. package/node_modules/es-object-atoms/.eslintrc +0 -16
  172. package/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
  173. package/node_modules/es-object-atoms/CHANGELOG.md +0 -37
  174. package/node_modules/es-object-atoms/LICENSE +0 -21
  175. package/node_modules/es-object-atoms/README.md +0 -63
  176. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
  177. package/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
  178. package/node_modules/es-object-atoms/ToObject.d.ts +0 -7
  179. package/node_modules/es-object-atoms/ToObject.js +0 -10
  180. package/node_modules/es-object-atoms/index.d.ts +0 -3
  181. package/node_modules/es-object-atoms/index.js +0 -4
  182. package/node_modules/es-object-atoms/isObject.d.ts +0 -3
  183. package/node_modules/es-object-atoms/isObject.js +0 -6
  184. package/node_modules/es-object-atoms/package.json +0 -80
  185. package/node_modules/es-object-atoms/test/index.js +0 -38
  186. package/node_modules/es-object-atoms/tsconfig.json +0 -6
  187. package/node_modules/function-bind/.eslintrc +0 -21
  188. package/node_modules/function-bind/.github/FUNDING.yml +0 -12
  189. package/node_modules/function-bind/.github/SECURITY.md +0 -3
  190. package/node_modules/function-bind/.nycrc +0 -13
  191. package/node_modules/function-bind/CHANGELOG.md +0 -136
  192. package/node_modules/function-bind/LICENSE +0 -20
  193. package/node_modules/function-bind/README.md +0 -46
  194. package/node_modules/function-bind/implementation.js +0 -84
  195. package/node_modules/function-bind/index.js +0 -5
  196. package/node_modules/function-bind/package.json +0 -87
  197. package/node_modules/function-bind/test/.eslintrc +0 -9
  198. package/node_modules/function-bind/test/index.js +0 -252
  199. package/node_modules/get-intrinsic/.eslintrc +0 -42
  200. package/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
  201. package/node_modules/get-intrinsic/.nycrc +0 -9
  202. package/node_modules/get-intrinsic/CHANGELOG.md +0 -186
  203. package/node_modules/get-intrinsic/LICENSE +0 -21
  204. package/node_modules/get-intrinsic/README.md +0 -71
  205. package/node_modules/get-intrinsic/index.js +0 -378
  206. package/node_modules/get-intrinsic/package.json +0 -97
  207. package/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
  208. package/node_modules/get-proto/.eslintrc +0 -10
  209. package/node_modules/get-proto/.github/FUNDING.yml +0 -12
  210. package/node_modules/get-proto/.nycrc +0 -9
  211. package/node_modules/get-proto/CHANGELOG.md +0 -21
  212. package/node_modules/get-proto/LICENSE +0 -21
  213. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
  214. package/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
  215. package/node_modules/get-proto/README.md +0 -50
  216. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
  217. package/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
  218. package/node_modules/get-proto/index.d.ts +0 -5
  219. package/node_modules/get-proto/index.js +0 -27
  220. package/node_modules/get-proto/package.json +0 -81
  221. package/node_modules/get-proto/test/index.js +0 -68
  222. package/node_modules/get-proto/tsconfig.json +0 -9
  223. package/node_modules/gopd/.eslintrc +0 -16
  224. package/node_modules/gopd/.github/FUNDING.yml +0 -12
  225. package/node_modules/gopd/CHANGELOG.md +0 -45
  226. package/node_modules/gopd/LICENSE +0 -21
  227. package/node_modules/gopd/README.md +0 -40
  228. package/node_modules/gopd/gOPD.d.ts +0 -1
  229. package/node_modules/gopd/gOPD.js +0 -4
  230. package/node_modules/gopd/index.d.ts +0 -5
  231. package/node_modules/gopd/index.js +0 -15
  232. package/node_modules/gopd/package.json +0 -77
  233. package/node_modules/gopd/test/index.js +0 -36
  234. package/node_modules/gopd/tsconfig.json +0 -9
  235. package/node_modules/has-property-descriptors/.eslintrc +0 -13
  236. package/node_modules/has-property-descriptors/.github/FUNDING.yml +0 -12
  237. package/node_modules/has-property-descriptors/.nycrc +0 -9
  238. package/node_modules/has-property-descriptors/CHANGELOG.md +0 -35
  239. package/node_modules/has-property-descriptors/LICENSE +0 -21
  240. package/node_modules/has-property-descriptors/README.md +0 -43
  241. package/node_modules/has-property-descriptors/index.js +0 -22
  242. package/node_modules/has-property-descriptors/package.json +0 -77
  243. package/node_modules/has-property-descriptors/test/index.js +0 -57
  244. package/node_modules/has-symbols/.eslintrc +0 -11
  245. package/node_modules/has-symbols/.github/FUNDING.yml +0 -12
  246. package/node_modules/has-symbols/.nycrc +0 -9
  247. package/node_modules/has-symbols/CHANGELOG.md +0 -91
  248. package/node_modules/has-symbols/LICENSE +0 -21
  249. package/node_modules/has-symbols/README.md +0 -46
  250. package/node_modules/has-symbols/index.d.ts +0 -3
  251. package/node_modules/has-symbols/index.js +0 -14
  252. package/node_modules/has-symbols/package.json +0 -111
  253. package/node_modules/has-symbols/shams.d.ts +0 -3
  254. package/node_modules/has-symbols/shams.js +0 -45
  255. package/node_modules/has-symbols/test/index.js +0 -22
  256. package/node_modules/has-symbols/test/shams/core-js.js +0 -29
  257. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
  258. package/node_modules/has-symbols/test/tests.js +0 -58
  259. package/node_modules/has-symbols/tsconfig.json +0 -10
  260. package/node_modules/hasown/.eslintrc +0 -5
  261. package/node_modules/hasown/.github/FUNDING.yml +0 -12
  262. package/node_modules/hasown/.nycrc +0 -13
  263. package/node_modules/hasown/CHANGELOG.md +0 -40
  264. package/node_modules/hasown/LICENSE +0 -21
  265. package/node_modules/hasown/README.md +0 -40
  266. package/node_modules/hasown/index.d.ts +0 -3
  267. package/node_modules/hasown/index.js +0 -8
  268. package/node_modules/hasown/package.json +0 -92
  269. package/node_modules/hasown/tsconfig.json +0 -6
  270. package/node_modules/isarray/LICENSE +0 -21
  271. package/node_modules/isarray/README.md +0 -38
  272. package/node_modules/isarray/index.js +0 -5
  273. package/node_modules/isarray/package.json +0 -48
  274. package/node_modules/json-stable-stringify/.eslintrc +0 -31
  275. package/node_modules/json-stable-stringify/.github/FUNDING.yml +0 -12
  276. package/node_modules/json-stable-stringify/CHANGELOG.md +0 -160
  277. package/node_modules/json-stable-stringify/LICENSE +0 -21
  278. package/node_modules/json-stable-stringify/README.md +0 -157
  279. package/node_modules/json-stable-stringify/example/key_cmp.js +0 -9
  280. package/node_modules/json-stable-stringify/example/nested.js +0 -7
  281. package/node_modules/json-stable-stringify/example/str.js +0 -7
  282. package/node_modules/json-stable-stringify/example/value_cmp.js +0 -12
  283. package/node_modules/json-stable-stringify/index.d.ts +0 -25
  284. package/node_modules/json-stable-stringify/index.js +0 -124
  285. package/node_modules/json-stable-stringify/package.json +0 -88
  286. package/node_modules/json-stable-stringify/test/cmp.js +0 -33
  287. package/node_modules/json-stable-stringify/test/nested.js +0 -48
  288. package/node_modules/json-stable-stringify/test/replacer.js +0 -81
  289. package/node_modules/json-stable-stringify/test/space.js +0 -127
  290. package/node_modules/json-stable-stringify/test/str.js +0 -46
  291. package/node_modules/json-stable-stringify/test/to-json.js +0 -22
  292. package/node_modules/json-stable-stringify/tsconfig.json +0 -10
  293. package/node_modules/jsonify/.eslintrc +0 -21
  294. package/node_modules/jsonify/.github/FUNDING.yml +0 -12
  295. package/node_modules/jsonify/CHANGELOG.md +0 -48
  296. package/node_modules/jsonify/README.md +0 -66
  297. package/node_modules/jsonify/index.js +0 -4
  298. package/node_modules/jsonify/lib/parse.js +0 -261
  299. package/node_modules/jsonify/lib/stringify.js +0 -151
  300. package/node_modules/jsonify/package.json +0 -62
  301. package/node_modules/jsonify/test/parse.js +0 -20
  302. package/node_modules/jsonify/test/stringify.js +0 -18
  303. package/node_modules/math-intrinsics/.eslintrc +0 -16
  304. package/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
  305. package/node_modules/math-intrinsics/CHANGELOG.md +0 -24
  306. package/node_modules/math-intrinsics/LICENSE +0 -21
  307. package/node_modules/math-intrinsics/README.md +0 -50
  308. package/node_modules/math-intrinsics/abs.d.ts +0 -1
  309. package/node_modules/math-intrinsics/abs.js +0 -4
  310. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
  311. package/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
  312. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
  313. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
  314. package/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
  315. package/node_modules/math-intrinsics/constants/maxValue.js +0 -5
  316. package/node_modules/math-intrinsics/floor.d.ts +0 -1
  317. package/node_modules/math-intrinsics/floor.js +0 -4
  318. package/node_modules/math-intrinsics/isFinite.d.ts +0 -3
  319. package/node_modules/math-intrinsics/isFinite.js +0 -12
  320. package/node_modules/math-intrinsics/isInteger.d.ts +0 -3
  321. package/node_modules/math-intrinsics/isInteger.js +0 -16
  322. package/node_modules/math-intrinsics/isNaN.d.ts +0 -1
  323. package/node_modules/math-intrinsics/isNaN.js +0 -6
  324. package/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
  325. package/node_modules/math-intrinsics/isNegativeZero.js +0 -6
  326. package/node_modules/math-intrinsics/max.d.ts +0 -1
  327. package/node_modules/math-intrinsics/max.js +0 -4
  328. package/node_modules/math-intrinsics/min.d.ts +0 -1
  329. package/node_modules/math-intrinsics/min.js +0 -4
  330. package/node_modules/math-intrinsics/mod.d.ts +0 -3
  331. package/node_modules/math-intrinsics/mod.js +0 -9
  332. package/node_modules/math-intrinsics/package.json +0 -86
  333. package/node_modules/math-intrinsics/pow.d.ts +0 -1
  334. package/node_modules/math-intrinsics/pow.js +0 -4
  335. package/node_modules/math-intrinsics/round.d.ts +0 -1
  336. package/node_modules/math-intrinsics/round.js +0 -4
  337. package/node_modules/math-intrinsics/sign.d.ts +0 -3
  338. package/node_modules/math-intrinsics/sign.js +0 -11
  339. package/node_modules/math-intrinsics/test/index.js +0 -192
  340. package/node_modules/math-intrinsics/tsconfig.json +0 -3
  341. package/node_modules/object-keys/.editorconfig +0 -13
  342. package/node_modules/object-keys/.eslintrc +0 -17
  343. package/node_modules/object-keys/.travis.yml +0 -277
  344. package/node_modules/object-keys/CHANGELOG.md +0 -232
  345. package/node_modules/object-keys/LICENSE +0 -21
  346. package/node_modules/object-keys/README.md +0 -76
  347. package/node_modules/object-keys/implementation.js +0 -122
  348. package/node_modules/object-keys/index.js +0 -32
  349. package/node_modules/object-keys/isArguments.js +0 -17
  350. package/node_modules/object-keys/package.json +0 -88
  351. package/node_modules/object-keys/test/index.js +0 -5
  352. package/node_modules/set-function-length/.eslintrc +0 -27
  353. package/node_modules/set-function-length/.github/FUNDING.yml +0 -12
  354. package/node_modules/set-function-length/.nycrc +0 -13
  355. package/node_modules/set-function-length/CHANGELOG.md +0 -70
  356. package/node_modules/set-function-length/LICENSE +0 -21
  357. package/node_modules/set-function-length/README.md +0 -56
  358. package/node_modules/set-function-length/env.d.ts +0 -9
  359. package/node_modules/set-function-length/env.js +0 -25
  360. package/node_modules/set-function-length/index.d.ts +0 -7
  361. package/node_modules/set-function-length/index.js +0 -42
  362. package/node_modules/set-function-length/package.json +0 -102
  363. package/node_modules/set-function-length/tsconfig.json +0 -9
@@ -1,25 +0,0 @@
1
- declare namespace stableStringify {
2
- type Key = string | number;
3
-
4
- type NonArrayNode = Record<Key, unknown>;
5
- type Node = unknown[] | NonArrayNode;
6
-
7
- type Getter = { get(key: Key): unknown };
8
-
9
- type Comparator = (a: { key: string, value: unknown }, b: { key: string, value: unknown }, getter: Getter) => number;
10
-
11
- type StableStringifyOptions = {
12
- cmp?: Comparator;
13
- collapseEmpty?: boolean;
14
- cycles?: boolean;
15
- replacer?: (this: Node, key: Key, value: unknown) => unknown;
16
- space?: string | number;
17
- };
18
- }
19
-
20
- declare function stableStringify(
21
- obj: unknown,
22
- options?: (stableStringify.Comparator & stableStringify.StableStringifyOptions) | stableStringify.StableStringifyOptions,
23
- ): string | undefined;
24
-
25
- export = stableStringify;
@@ -1,124 +0,0 @@
1
- 'use strict';
2
-
3
- /** @type {typeof JSON.stringify} */
4
- var jsonStringify = (typeof JSON !== 'undefined' ? JSON : require('jsonify')).stringify;
5
-
6
- var isArray = require('isarray');
7
- var objectKeys = require('object-keys');
8
- var callBind = require('call-bind');
9
- var callBound = require('call-bound');
10
-
11
- var $join = callBound('Array.prototype.join');
12
- var $indexOf = callBound('Array.prototype.indexOf');
13
- var $splice = callBound('Array.prototype.splice');
14
- var $sort = callBound('Array.prototype.sort');
15
-
16
- /** @type {(n: number, char: string) => string} */
17
- var strRepeat = function repeat(n, char) {
18
- var str = '';
19
- for (var i = 0; i < n; i += 1) {
20
- str += char;
21
- }
22
- return str;
23
- };
24
-
25
- /** @type {(parent: import('.').Node, key: import('.').Key, value: unknown) => unknown} */
26
- var defaultReplacer = function (_parent, _key, value) { return value; };
27
-
28
- /** @type {import('.')} */
29
- module.exports = function stableStringify(obj) {
30
- /** @type {Parameters<import('.')>[1]} */
31
- var opts = arguments.length > 1 ? arguments[1] : void undefined;
32
- var space = (opts && opts.space) || '';
33
- if (typeof space === 'number') { space = strRepeat(space, ' '); }
34
- var cycles = !!opts && typeof opts.cycles === 'boolean' && opts.cycles;
35
- /** @type {undefined | typeof defaultReplacer} */
36
- var replacer = opts && opts.replacer ? callBind(opts.replacer) : defaultReplacer;
37
- if (opts && typeof opts.collapseEmpty !== 'undefined' && typeof opts.collapseEmpty !== 'boolean') {
38
- throw new TypeError('`collapseEmpty` must be a boolean, if provided');
39
- }
40
- var collapseEmpty = !!opts && opts.collapseEmpty;
41
-
42
- var cmpOpt = typeof opts === 'function' ? opts : opts && opts.cmp;
43
- /** @type {undefined | (<T extends import('.').NonArrayNode>(node: T) => (a: Exclude<keyof T, symbol | number>, b: Exclude<keyof T, symbol | number>) => number)} */
44
- var cmp = cmpOpt && function (node) {
45
- // eslint-disable-next-line no-extra-parens
46
- var get = /** @type {NonNullable<typeof cmpOpt>} */ (cmpOpt).length > 2
47
- && /** @type {import('.').Getter['get']} */ function get(k) { return node[k]; };
48
- return function (a, b) {
49
- // eslint-disable-next-line no-extra-parens
50
- return /** @type {NonNullable<typeof cmpOpt>} */ (cmpOpt)(
51
- { key: a, value: node[a] },
52
- { key: b, value: node[b] },
53
- // @ts-expect-error TS doesn't understand the optimization used here
54
- get ? /** @type {import('.').Getter} */ { __proto__: null, get: get } : void undefined
55
- );
56
- };
57
- };
58
-
59
- /** @type {import('.').Node[]} */
60
- var seen = [];
61
- return (/** @type {(parent: import('.').Node, key: string | number, node: unknown, level: number) => string | undefined} */
62
- function stringify(parent, key, node, level) {
63
- var indent = space ? '\n' + strRepeat(level, space) : '';
64
- var colonSeparator = space ? ': ' : ':';
65
-
66
- // eslint-disable-next-line no-extra-parens
67
- if (node && /** @type {{ toJSON?: unknown }} */ (node).toJSON && typeof /** @type {{ toJSON?: unknown }} */ (node).toJSON === 'function') {
68
- // eslint-disable-next-line no-extra-parens
69
- node = /** @type {{ toJSON: Function }} */ (node).toJSON();
70
- }
71
-
72
- node = replacer(parent, key, node);
73
- if (node === undefined) {
74
- return;
75
- }
76
- if (typeof node !== 'object' || node === null) {
77
- return jsonStringify(node);
78
- }
79
-
80
- /** @type {(out: string[], brackets: '[]' | '{}') => string} */
81
- var groupOutput = function (out, brackets) {
82
- return collapseEmpty && out.length === 0
83
- ? brackets
84
- : (brackets === '[]' ? '[' : '{') + $join(out, ',') + indent + (brackets === '[]' ? ']' : '}');
85
- };
86
-
87
- if (isArray(node)) {
88
- var out = [];
89
- for (var i = 0; i < node.length; i++) {
90
- var item = stringify(node, i, node[i], level + 1) || jsonStringify(null);
91
- out[out.length] = indent + space + item;
92
- }
93
- return groupOutput(out, '[]');
94
- }
95
-
96
- if ($indexOf(seen, node) !== -1) {
97
- if (cycles) { return jsonStringify('__cycle__'); }
98
- throw new TypeError('Converting circular structure to JSON');
99
- } else {
100
- seen[seen.length] = /** @type {import('.').NonArrayNode} */ (node);
101
- }
102
-
103
- /** @type {import('.').Key[]} */
104
- // eslint-disable-next-line no-extra-parens
105
- var keys = $sort(objectKeys(node), cmp && cmp(/** @type {import('.').NonArrayNode} */ (node)));
106
- var out = [];
107
- for (var i = 0; i < keys.length; i++) {
108
- var key = keys[i];
109
- // eslint-disable-next-line no-extra-parens
110
- var value = stringify(/** @type {import('.').Node} */ (node), key, /** @type {import('.').NonArrayNode} */ (node)[key], level + 1);
111
-
112
- if (!value) { continue; }
113
-
114
- var keyValue = jsonStringify(key)
115
- + colonSeparator
116
- + value;
117
-
118
- out[out.length] = indent + space + keyValue;
119
- }
120
- $splice(seen, $indexOf(seen, node), 1);
121
- return groupOutput(out, '{}');
122
- }({ '': obj }, '', obj, 0)
123
- );
124
- };
@@ -1,88 +0,0 @@
1
- {
2
- "name": "json-stable-stringify",
3
- "version": "1.3.0",
4
- "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results",
5
- "main": "index.js",
6
- "scripts": {
7
- "prepack": "npmignore --auto --commentLines=autogenerated",
8
- "prepublishOnly": "safe-publish-latest",
9
- "prepublish": "not-in-publish || npm run prepublishOnly",
10
- "lint": "eslint --ext=js,mjs .",
11
- "postlint": "tsc && attw -P",
12
- "pretest": "npm run lint",
13
- "tests-only": "tape 'test/**/*.js'",
14
- "test": "npm run tests-only",
15
- "posttest": "npx npm@'>= 10.2' audit --production",
16
- "version": "auto-changelog && git add CHANGELOG.md",
17
- "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "git://github.com/ljharb/json-stable-stringify.git"
22
- },
23
- "keywords": [
24
- "json",
25
- "stringify",
26
- "deterministic",
27
- "hash",
28
- "sort",
29
- "stable"
30
- ],
31
- "author": {
32
- "name": "James Halliday",
33
- "email": "mail@substack.net",
34
- "url": "http://substack.net"
35
- },
36
- "license": "MIT",
37
- "bugs": {
38
- "url": "https://github.com/ljharb/json-stable-stringify/issues"
39
- },
40
- "homepage": "https://github.com/ljharb/json-stable-stringify",
41
- "funding": {
42
- "url": "https://github.com/sponsors/ljharb"
43
- },
44
- "dependencies": {
45
- "call-bind": "^1.0.8",
46
- "call-bound": "^1.0.4",
47
- "isarray": "^2.0.5",
48
- "jsonify": "^0.0.1",
49
- "object-keys": "^1.1.1"
50
- },
51
- "devDependencies": {
52
- "@arethetypeswrong/cli": "^0.17.4",
53
- "@ljharb/eslint-config": "^21.1.1",
54
- "@ljharb/tsconfig": "^0.3.2",
55
- "@types/call-bind": "^1.0.5",
56
- "@types/isarray": "^2.0.3",
57
- "@types/object-keys": "^1.0.3",
58
- "@types/tape": "^5.8.1",
59
- "auto-changelog": "^2.5.0",
60
- "encoding": "^0.1.13",
61
- "eslint": "=8.8.0",
62
- "in-publish": "^2.0.1",
63
- "npmignore": "^0.3.1",
64
- "safe-publish-latest": "^2.0.0",
65
- "tape": "^5.9.0",
66
- "typescript": "next"
67
- },
68
- "engines": {
69
- "node": ">= 0.4"
70
- },
71
- "testling": {
72
- "files": "test/*.js"
73
- },
74
- "auto-changelog": {
75
- "output": "CHANGELOG.md",
76
- "template": "keepachangelog",
77
- "unreleased": false,
78
- "commitLimit": false,
79
- "backfillLimit": false,
80
- "hideCredit": true
81
- },
82
- "publishConfig": {
83
- "ignore": [
84
- ".github/workflows",
85
- "types"
86
- ]
87
- }
88
- }
@@ -1,33 +0,0 @@
1
- 'use strict';
2
-
3
- var test = require('tape');
4
- var stringify = require('../');
5
-
6
- test('custom comparison function', function (t) {
7
- t.plan(1);
8
- var obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 };
9
- var s = stringify(obj, function (a, b) {
10
- return a.key < b.key ? 1 : -1;
11
- });
12
- t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}');
13
- });
14
-
15
- test('custom comparison function with get', function (t) {
16
- t.plan(2);
17
-
18
- stringify({ a: 1, b: 2 }, /** @type {import('..').Comparator} */ function (_a, _b) { // eslint-disable-line no-unused-vars
19
- t.equal(arguments[2], undefined, 'comparator options not passed when not explicitly requested');
20
- return NaN;
21
- });
22
-
23
- var obj = { c: 8, b: [{ z: 7, y: 6, x: 4, v: 2, '!v': 3 }, 7], a: 3 };
24
- var s = stringify(obj, function (a, b, options) {
25
- var get = options.get;
26
- // @ts-expect-error implicit coercion here is fine
27
- var v1 = (get('!' + a.key) || 0) + a.value;
28
- // @ts-expect-error implicit coercion here is fine
29
- var v2 = (get('!' + b.key) || 0) + b.value;
30
- return v1 - v2;
31
- });
32
- t.equal(s, '{"c":8,"b":[{"!v":3,"x":4,"v":2,"y":6,"z":7},7],"a":3}');
33
- });
@@ -1,48 +0,0 @@
1
- 'use strict';
2
-
3
- var test = require('tape');
4
- var stringify = require('../');
5
-
6
- test('nested', function (t) {
7
- t.plan(1);
8
- var obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 };
9
- t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}');
10
- });
11
-
12
- test('cyclic (default)', function (t) {
13
- t.plan(1);
14
- var one = { a: 1, two: {} };
15
- var two = { a: 2, one: one };
16
- one.two = two;
17
- try {
18
- stringify(one);
19
- } catch (ex) {
20
- if (ex == null) { // eslint-disable-line eqeqeq
21
- t.fail('nullish exception');
22
- } else {
23
- t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON');
24
- }
25
- }
26
- });
27
-
28
- test('cyclic (specifically allowed)', function (t) {
29
- t.plan(1);
30
- var one = { a: 1, two: {} };
31
- var two = { a: 2, one: one };
32
- one.two = two;
33
- t.equal(stringify(one, { cycles: true }), '{"a":1,"two":{"a":2,"one":"__cycle__"}}');
34
- });
35
-
36
- test('repeated non-cyclic value', function (t) {
37
- t.plan(1);
38
- var one = { x: 1 };
39
- var two = { a: one, b: one };
40
- t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}');
41
- });
42
-
43
- test('acyclic but with reused obj-property pointers', function (t) {
44
- t.plan(1);
45
- var x = { a: 1 };
46
- var y = { b: x, c: x };
47
- t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}');
48
- });
@@ -1,81 +0,0 @@
1
- 'use strict';
2
-
3
- var test = require('tape');
4
- var stringify = require('../');
5
-
6
- test('replace root', function (t) {
7
- t.plan(1);
8
-
9
- var obj = { a: 1, b: 2, c: false };
10
- var replacer = function () { return 'one'; };
11
-
12
- t.equal(stringify(obj, { replacer: replacer }), '"one"');
13
- });
14
-
15
- test('replace numbers', function (t) {
16
- t.plan(1);
17
-
18
- var obj = { a: 1, b: 2, c: false };
19
- /** @type {import('..').StableStringifyOptions['replacer']} */
20
- var replacer = function (_key, value) {
21
- if (value === 1) { return 'one'; }
22
- if (value === 2) { return 'two'; }
23
- return value;
24
- };
25
-
26
- t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":false}');
27
- });
28
-
29
- test('replace with object', function (t) {
30
- t.plan(1);
31
-
32
- var obj = { a: 1, b: 2, c: false };
33
- /** @type {import('..').StableStringifyOptions['replacer']} */
34
- var replacer = function (key, value) {
35
- if (key === 'b') { return { d: 1 }; }
36
- if (value === 1) { return 'one'; }
37
- return value;
38
- };
39
-
40
- t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":{"d":"one"},"c":false}');
41
- });
42
-
43
- test('replace with undefined', function (t) {
44
- t.plan(1);
45
-
46
- var obj = { a: 1, b: 2, c: false };
47
- /** @type {import('..').StableStringifyOptions['replacer']} */
48
- var replacer = function (_key, value) {
49
- if (value === false) { return; }
50
- return value;
51
- };
52
-
53
- t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":2}');
54
- });
55
-
56
- test('replace with array', function (t) {
57
- t.plan(1);
58
-
59
- var obj = { a: 1, b: 2, c: false };
60
- /** @type {import('..').StableStringifyOptions['replacer']} */
61
- var replacer = function (key, value) {
62
- if (key === 'b') { return ['one', 'two']; }
63
- return value;
64
- };
65
-
66
- t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":["one","two"],"c":false}');
67
- });
68
-
69
- test('replace array item', function (t) {
70
- t.plan(1);
71
-
72
- var obj = { a: 1, b: 2, c: [1, 2] };
73
- /** @type {import('..').StableStringifyOptions['replacer']} */
74
- var replacer = function (_key, value) {
75
- if (value === 1) { return 'one'; }
76
- if (value === 2) { return 'two'; }
77
- return value;
78
- };
79
-
80
- t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":["one","two"]}');
81
- });
@@ -1,127 +0,0 @@
1
- 'use strict';
2
-
3
- var test = require('tape');
4
- var stringify = require('../');
5
-
6
- // @ts-expect-error node ensures this will never fail
7
- var isNode10OrLess = parseInt(process.version.match(/^v(\d+)\./)[1], 10) <= 10;
8
-
9
- test('space parameter', function (t) {
10
- t.plan(1);
11
- var obj = { one: 1, two: 2 };
12
- t.equal(
13
- stringify(obj, { space: ' ' }),
14
- ''
15
- + '{\n'
16
- + ' "one": 1,\n'
17
- + ' "two": 2\n'
18
- + '}'
19
- );
20
- });
21
-
22
- test('space parameter (with tabs)', function (t) {
23
- t.plan(1);
24
- var obj = { one: 1, two: 2 };
25
- t.equal(
26
- stringify(obj, { space: '\t' }),
27
- ''
28
- + '{\n'
29
- + '\t"one": 1,\n'
30
- + '\t"two": 2\n'
31
- + '}'
32
- );
33
- });
34
-
35
- test('space parameter (with a number)', function (t) {
36
- t.plan(1);
37
- var obj = { one: 1, two: 2 };
38
- t.equal(
39
- stringify(obj, { space: 3 }),
40
- ''
41
- + '{\n'
42
- + ' "one": 1,\n'
43
- + ' "two": 2\n'
44
- + '}'
45
- );
46
- });
47
-
48
- test('space parameter (nested objects)', function (t) {
49
- t.plan(1);
50
- var obj = { one: 1, two: { b: 4, a: [2, 3] } };
51
- t.equal(
52
- stringify(obj, { space: ' ' }),
53
- ''
54
- + '{\n'
55
- + ' "one": 1,\n'
56
- + ' "two": {\n'
57
- + ' "a": [\n'
58
- + ' 2,\n'
59
- + ' 3\n'
60
- + ' ],\n'
61
- + ' "b": 4\n'
62
- + ' }\n'
63
- + '}'
64
- );
65
- });
66
-
67
- test('space parameter (same as native)', function (t) {
68
- t.plan(1);
69
- // for this test, properties need to be in alphabetical order
70
- var obj = { one: 1, two: { a: [2, 3], b: 4 } };
71
- t.equal(
72
- stringify(obj, { space: ' ' }),
73
- JSON.stringify(obj, null, ' ')
74
- );
75
- });
76
-
77
- test('space parameter base empty behavior: empty arrays and objects have added newline and space', function (t) {
78
- t.plan(1);
79
- var obj = { emptyArr: [], emptyObj: {} };
80
- t.equal(
81
- stringify(obj, { space: ' ' }),
82
- '{\n "emptyArr": [\n ],\n "emptyObj": {\n }\n}'
83
- );
84
- });
85
-
86
- test('space parameter, with collapseEmpty: true', function (t) {
87
- t.plan(2);
88
- var obj = { emptyArr: [], emptyObj: {} };
89
-
90
- t['throws'](
91
- // @ts-expect-error
92
- function () { stringify(obj, { collapseEmpty: 'not a boolean' }); },
93
- TypeError
94
- );
95
-
96
- t.equal(
97
- stringify(obj, { collapseEmpty: true, space: ' ' }),
98
- '{\n "emptyArr": [],\n "emptyObj": {}\n}'
99
- );
100
- });
101
-
102
- test('space parameter, on a cmp function', function (t) {
103
- t.plan(3);
104
- var obj = { one: 1, two: 2 };
105
- /** @type {import('..').Comparator & import('../').StableStringifyOptions} */
106
- var cmp = function (a, b) {
107
- return (a < b ? 1 : -1) * (isNode10OrLess ? -1 : 1);
108
- };
109
-
110
- t.equal(
111
- stringify(obj, { space: '\t' }),
112
- '{\n\t"one": 1,\n\t"two": 2\n}',
113
- 'no cmp option (control)'
114
- );
115
- t.equal(
116
- stringify(obj, { cmp: cmp, space: '\t' }),
117
- '{\n\t"two": 2,\n\t"one": 1\n}',
118
- 'cmp option in the object'
119
- );
120
-
121
- cmp.space = '\t';
122
- t.equal(
123
- stringify(obj, cmp),
124
- '{\n\t"two": 2,\n\t"one": 1\n}',
125
- 'cmp passed directly, with space option on it'
126
- );
127
- });
@@ -1,46 +0,0 @@
1
- 'use strict';
2
-
3
- var test = require('tape');
4
- var stringify = require('../');
5
-
6
- test('simple object', function (t) {
7
- t.plan(1);
8
- var obj = { c: 6, b: [4, 5], a: 3, z: null };
9
- t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}');
10
- });
11
-
12
- test('object with undefined', function (t) {
13
- t.plan(1);
14
- var obj = { a: 3, z: undefined };
15
- t.equal(stringify(obj), '{"a":3}');
16
- });
17
-
18
- test('array with undefined', function (t) {
19
- t.plan(1);
20
- var obj = [4, undefined, 6];
21
- t.equal(stringify(obj), '[4,null,6]');
22
- });
23
-
24
- test('object with empty string', function (t) {
25
- t.plan(1);
26
- var obj = { a: 3, z: '' };
27
- t.equal(stringify(obj), '{"a":3,"z":""}');
28
- });
29
-
30
- test('array with empty string', function (t) {
31
- t.plan(1);
32
- var obj = [4, '', 6];
33
- t.equal(stringify(obj), '[4,"",6]');
34
- });
35
-
36
- test('raw string', function (t) {
37
- t.plan(1);
38
- var input = 'raw';
39
- t.equal(stringify(input), '"raw"');
40
- });
41
-
42
- test('raw number', function (t) {
43
- t.plan(1);
44
- var input = 42;
45
- t.equal(stringify(input), '42');
46
- });
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- var test = require('tape');
4
- var stringify = require('../');
5
-
6
- test('toJSON function', function (t) {
7
- t.plan(1);
8
- var obj = { one: 1, two: 2, toJSON: function () { return { one: 1 }; } };
9
- t.equal(stringify(obj), '{"one":1}');
10
- });
11
-
12
- test('toJSON returns string', function (t) {
13
- t.plan(1);
14
- var obj = { one: 1, two: 2, toJSON: function () { return 'one'; } };
15
- t.equal(stringify(obj), '"one"');
16
- });
17
-
18
- test('toJSON returns array', function (t) {
19
- t.plan(1);
20
- var obj = { one: 1, two: 2, toJSON: function () { return ['one']; } };
21
- t.equal(stringify(obj), '["one"]');
22
- });
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "@ljharb/tsconfig",
3
- "compilerOptions": {
4
- "maxNodeModuleJsDepth": 0,
5
- "target": "es2021",
6
- },
7
- "exclude": [
8
- "coverage",
9
- ],
10
- }
@@ -1,21 +0,0 @@
1
- {
2
- "root": true,
3
-
4
- "extends": "@ljharb",
5
-
6
- "rules": {
7
- "complexity": 0,
8
- "consistent-return": 1,
9
- "func-style": [2, "declaration"],
10
- "max-depth": 1,
11
- "max-lines-per-function": 0,
12
- "max-statements": 0,
13
- "multiline-comment-style": 0,
14
- "no-control-regex": 1,
15
- "no-misleading-character-class": 1,
16
- "no-restricted-syntax": 1,
17
- "no-throw-literal": 0,
18
- "no-unmodified-loop-condition": 0,
19
- "sort-keys": 0,
20
- },
21
- }
@@ -1,12 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: [ljharb]
4
- patreon: # Replace with a single Patreon username
5
- open_collective: # Replace with a single Open Collective username
6
- ko_fi: # Replace with a single Ko-fi username
7
- tidelift: npm/jsonify
8
- community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
- liberapay: # Replace with a single Liberapay username
10
- issuehunt: # Replace with a single IssueHunt username
11
- otechie: # Replace with a single Otechie username
12
- custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']