create-leo-app 0.7.3 → 0.8.4

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 (280) hide show
  1. package/README.md +3 -3
  2. package/dist/index.mjs +38 -38
  3. package/package.json +5 -7
  4. package/template-extension/package.json +4 -4
  5. package/template-nextjs-ts/package.json +9 -9
  6. package/template-node/package.json +2 -2
  7. package/template-node-ts/package.json +5 -5
  8. package/template-offline-public-transaction-ts/package.json +5 -5
  9. package/template-react-leo/README.md +3 -8
  10. package/template-react-leo/package.json +23 -23
  11. package/template-react-leo/vite.config.js +2 -1
  12. package/template-react-managed-worker/README.md +1 -3
  13. package/template-react-managed-worker/package.json +22 -22
  14. package/template-react-managed-worker/vite.config.js +2 -1
  15. package/template-react-ts/README.md +3 -8
  16. package/template-react-ts/package.json +28 -28
  17. package/template-react-ts/vite.config.ts +2 -1
  18. package/template-vanilla/main.js +1 -1
  19. package/template-vanilla/package.json +3 -3
  20. package/template-vanilla/vite.config.js +3 -1
  21. package/template-nextjs-ts/node_modules/@types/node/LICENSE +0 -21
  22. package/template-nextjs-ts/node_modules/@types/node/README.md +0 -15
  23. package/template-nextjs-ts/node_modules/@types/node/assert/strict.d.ts +0 -8
  24. package/template-nextjs-ts/node_modules/@types/node/assert.d.ts +0 -1040
  25. package/template-nextjs-ts/node_modules/@types/node/async_hooks.d.ts +0 -541
  26. package/template-nextjs-ts/node_modules/@types/node/buffer.d.ts +0 -2301
  27. package/template-nextjs-ts/node_modules/@types/node/child_process.d.ts +0 -1544
  28. package/template-nextjs-ts/node_modules/@types/node/cluster.d.ts +0 -578
  29. package/template-nextjs-ts/node_modules/@types/node/console.d.ts +0 -452
  30. package/template-nextjs-ts/node_modules/@types/node/constants.d.ts +0 -19
  31. package/template-nextjs-ts/node_modules/@types/node/crypto.d.ts +0 -4524
  32. package/template-nextjs-ts/node_modules/@types/node/dgram.d.ts +0 -596
  33. package/template-nextjs-ts/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  34. package/template-nextjs-ts/node_modules/@types/node/dns/promises.d.ts +0 -476
  35. package/template-nextjs-ts/node_modules/@types/node/dns.d.ts +0 -864
  36. package/template-nextjs-ts/node_modules/@types/node/dom-events.d.ts +0 -124
  37. package/template-nextjs-ts/node_modules/@types/node/domain.d.ts +0 -170
  38. package/template-nextjs-ts/node_modules/@types/node/events.d.ts +0 -931
  39. package/template-nextjs-ts/node_modules/@types/node/fs/promises.d.ts +0 -1245
  40. package/template-nextjs-ts/node_modules/@types/node/fs.d.ts +0 -4317
  41. package/template-nextjs-ts/node_modules/@types/node/globals.d.ts +0 -503
  42. package/template-nextjs-ts/node_modules/@types/node/globals.global.d.ts +0 -1
  43. package/template-nextjs-ts/node_modules/@types/node/http.d.ts +0 -1908
  44. package/template-nextjs-ts/node_modules/@types/node/http2.d.ts +0 -2418
  45. package/template-nextjs-ts/node_modules/@types/node/https.d.ts +0 -550
  46. package/template-nextjs-ts/node_modules/@types/node/index.d.ts +0 -89
  47. package/template-nextjs-ts/node_modules/@types/node/inspector.d.ts +0 -3696
  48. package/template-nextjs-ts/node_modules/@types/node/module.d.ts +0 -315
  49. package/template-nextjs-ts/node_modules/@types/node/net.d.ts +0 -999
  50. package/template-nextjs-ts/node_modules/@types/node/os.d.ts +0 -495
  51. package/template-nextjs-ts/node_modules/@types/node/package.json +0 -217
  52. package/template-nextjs-ts/node_modules/@types/node/path.d.ts +0 -191
  53. package/template-nextjs-ts/node_modules/@types/node/perf_hooks.d.ts +0 -934
  54. package/template-nextjs-ts/node_modules/@types/node/process.d.ts +0 -1879
  55. package/template-nextjs-ts/node_modules/@types/node/punycode.d.ts +0 -117
  56. package/template-nextjs-ts/node_modules/@types/node/querystring.d.ts +0 -153
  57. package/template-nextjs-ts/node_modules/@types/node/readline/promises.d.ts +0 -150
  58. package/template-nextjs-ts/node_modules/@types/node/readline.d.ts +0 -540
  59. package/template-nextjs-ts/node_modules/@types/node/repl.d.ts +0 -430
  60. package/template-nextjs-ts/node_modules/@types/node/sea.d.ts +0 -153
  61. package/template-nextjs-ts/node_modules/@types/node/stream/consumers.d.ts +0 -12
  62. package/template-nextjs-ts/node_modules/@types/node/stream/promises.d.ts +0 -83
  63. package/template-nextjs-ts/node_modules/@types/node/stream/web.d.ts +0 -521
  64. package/template-nextjs-ts/node_modules/@types/node/stream.d.ts +0 -1707
  65. package/template-nextjs-ts/node_modules/@types/node/string_decoder.d.ts +0 -67
  66. package/template-nextjs-ts/node_modules/@types/node/test.d.ts +0 -1874
  67. package/template-nextjs-ts/node_modules/@types/node/timers/promises.d.ts +0 -97
  68. package/template-nextjs-ts/node_modules/@types/node/timers.d.ts +0 -240
  69. package/template-nextjs-ts/node_modules/@types/node/tls.d.ts +0 -1217
  70. package/template-nextjs-ts/node_modules/@types/node/trace_events.d.ts +0 -197
  71. package/template-nextjs-ts/node_modules/@types/node/tty.d.ts +0 -208
  72. package/template-nextjs-ts/node_modules/@types/node/url.d.ts +0 -952
  73. package/template-nextjs-ts/node_modules/@types/node/util.d.ts +0 -2298
  74. package/template-nextjs-ts/node_modules/@types/node/v8.d.ts +0 -808
  75. package/template-nextjs-ts/node_modules/@types/node/vm.d.ts +0 -924
  76. package/template-nextjs-ts/node_modules/@types/node/wasi.d.ts +0 -181
  77. package/template-nextjs-ts/node_modules/@types/node/worker_threads.d.ts +0 -694
  78. package/template-nextjs-ts/node_modules/@types/node/zlib.d.ts +0 -539
  79. package/template-react-ts/node_modules/@types/node/LICENSE +0 -21
  80. package/template-react-ts/node_modules/@types/node/README.md +0 -15
  81. package/template-react-ts/node_modules/@types/node/assert/strict.d.ts +0 -8
  82. package/template-react-ts/node_modules/@types/node/assert.d.ts +0 -1040
  83. package/template-react-ts/node_modules/@types/node/async_hooks.d.ts +0 -541
  84. package/template-react-ts/node_modules/@types/node/buffer.d.ts +0 -2301
  85. package/template-react-ts/node_modules/@types/node/child_process.d.ts +0 -1544
  86. package/template-react-ts/node_modules/@types/node/cluster.d.ts +0 -578
  87. package/template-react-ts/node_modules/@types/node/console.d.ts +0 -452
  88. package/template-react-ts/node_modules/@types/node/constants.d.ts +0 -19
  89. package/template-react-ts/node_modules/@types/node/crypto.d.ts +0 -4524
  90. package/template-react-ts/node_modules/@types/node/dgram.d.ts +0 -596
  91. package/template-react-ts/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  92. package/template-react-ts/node_modules/@types/node/dns/promises.d.ts +0 -476
  93. package/template-react-ts/node_modules/@types/node/dns.d.ts +0 -864
  94. package/template-react-ts/node_modules/@types/node/dom-events.d.ts +0 -124
  95. package/template-react-ts/node_modules/@types/node/domain.d.ts +0 -170
  96. package/template-react-ts/node_modules/@types/node/events.d.ts +0 -931
  97. package/template-react-ts/node_modules/@types/node/fs/promises.d.ts +0 -1245
  98. package/template-react-ts/node_modules/@types/node/fs.d.ts +0 -4317
  99. package/template-react-ts/node_modules/@types/node/globals.d.ts +0 -503
  100. package/template-react-ts/node_modules/@types/node/globals.global.d.ts +0 -1
  101. package/template-react-ts/node_modules/@types/node/http.d.ts +0 -1908
  102. package/template-react-ts/node_modules/@types/node/http2.d.ts +0 -2418
  103. package/template-react-ts/node_modules/@types/node/https.d.ts +0 -550
  104. package/template-react-ts/node_modules/@types/node/index.d.ts +0 -89
  105. package/template-react-ts/node_modules/@types/node/inspector.d.ts +0 -3696
  106. package/template-react-ts/node_modules/@types/node/module.d.ts +0 -315
  107. package/template-react-ts/node_modules/@types/node/net.d.ts +0 -999
  108. package/template-react-ts/node_modules/@types/node/os.d.ts +0 -495
  109. package/template-react-ts/node_modules/@types/node/package.json +0 -217
  110. package/template-react-ts/node_modules/@types/node/path.d.ts +0 -191
  111. package/template-react-ts/node_modules/@types/node/perf_hooks.d.ts +0 -934
  112. package/template-react-ts/node_modules/@types/node/process.d.ts +0 -1879
  113. package/template-react-ts/node_modules/@types/node/punycode.d.ts +0 -117
  114. package/template-react-ts/node_modules/@types/node/querystring.d.ts +0 -153
  115. package/template-react-ts/node_modules/@types/node/readline/promises.d.ts +0 -150
  116. package/template-react-ts/node_modules/@types/node/readline.d.ts +0 -540
  117. package/template-react-ts/node_modules/@types/node/repl.d.ts +0 -430
  118. package/template-react-ts/node_modules/@types/node/sea.d.ts +0 -153
  119. package/template-react-ts/node_modules/@types/node/stream/consumers.d.ts +0 -12
  120. package/template-react-ts/node_modules/@types/node/stream/promises.d.ts +0 -83
  121. package/template-react-ts/node_modules/@types/node/stream/web.d.ts +0 -521
  122. package/template-react-ts/node_modules/@types/node/stream.d.ts +0 -1707
  123. package/template-react-ts/node_modules/@types/node/string_decoder.d.ts +0 -67
  124. package/template-react-ts/node_modules/@types/node/test.d.ts +0 -1874
  125. package/template-react-ts/node_modules/@types/node/timers/promises.d.ts +0 -97
  126. package/template-react-ts/node_modules/@types/node/timers.d.ts +0 -240
  127. package/template-react-ts/node_modules/@types/node/tls.d.ts +0 -1217
  128. package/template-react-ts/node_modules/@types/node/trace_events.d.ts +0 -197
  129. package/template-react-ts/node_modules/@types/node/tty.d.ts +0 -208
  130. package/template-react-ts/node_modules/@types/node/url.d.ts +0 -952
  131. package/template-react-ts/node_modules/@types/node/util.d.ts +0 -2298
  132. package/template-react-ts/node_modules/@types/node/v8.d.ts +0 -808
  133. package/template-react-ts/node_modules/@types/node/vm.d.ts +0 -924
  134. package/template-react-ts/node_modules/@types/node/wasi.d.ts +0 -181
  135. package/template-react-ts/node_modules/@types/node/worker_threads.d.ts +0 -694
  136. package/template-react-ts/node_modules/@types/node/zlib.d.ts +0 -539
  137. package/template-react-ts/node_modules/diff/CONTRIBUTING.md +0 -39
  138. package/template-react-ts/node_modules/diff/LICENSE +0 -31
  139. package/template-react-ts/node_modules/diff/README.md +0 -207
  140. package/template-react-ts/node_modules/diff/dist/diff.js +0 -1585
  141. package/template-react-ts/node_modules/diff/dist/diff.min.js +0 -38
  142. package/template-react-ts/node_modules/diff/lib/convert/dmp.js +0 -32
  143. package/template-react-ts/node_modules/diff/lib/convert/xml.js +0 -42
  144. package/template-react-ts/node_modules/diff/lib/diff/array.js +0 -45
  145. package/template-react-ts/node_modules/diff/lib/diff/base.js +0 -304
  146. package/template-react-ts/node_modules/diff/lib/diff/character.js +0 -37
  147. package/template-react-ts/node_modules/diff/lib/diff/css.js +0 -41
  148. package/template-react-ts/node_modules/diff/lib/diff/json.js +0 -163
  149. package/template-react-ts/node_modules/diff/lib/diff/line.js +0 -89
  150. package/template-react-ts/node_modules/diff/lib/diff/sentence.js +0 -41
  151. package/template-react-ts/node_modules/diff/lib/diff/word.js +0 -107
  152. package/template-react-ts/node_modules/diff/lib/index.es6.js +0 -1519
  153. package/template-react-ts/node_modules/diff/lib/index.js +0 -216
  154. package/template-react-ts/node_modules/diff/lib/patch/apply.js +0 -243
  155. package/template-react-ts/node_modules/diff/lib/patch/create.js +0 -247
  156. package/template-react-ts/node_modules/diff/lib/patch/merge.js +0 -609
  157. package/template-react-ts/node_modules/diff/lib/patch/parse.js +0 -156
  158. package/template-react-ts/node_modules/diff/lib/util/array.js +0 -32
  159. package/template-react-ts/node_modules/diff/lib/util/distance-iterator.js +0 -57
  160. package/template-react-ts/node_modules/diff/lib/util/params.js +0 -24
  161. package/template-react-ts/node_modules/diff/package.json +0 -73
  162. package/template-react-ts/node_modules/diff/release-notes.md +0 -261
  163. package/template-react-ts/node_modules/diff/runtime.js +0 -3
  164. package/template-react-ts/node_modules/ts-node/LICENSE +0 -21
  165. package/template-react-ts/node_modules/ts-node/README.md +0 -1442
  166. package/template-react-ts/node_modules/ts-node/child-loader.mjs +0 -8
  167. package/template-react-ts/node_modules/ts-node/dist/bin-cwd.d.ts +0 -2
  168. package/template-react-ts/node_modules/ts-node/dist/bin-cwd.js +0 -6
  169. package/template-react-ts/node_modules/ts-node/dist/bin-cwd.js.map +0 -1
  170. package/template-react-ts/node_modules/ts-node/dist/bin-esm.d.ts +0 -2
  171. package/template-react-ts/node_modules/ts-node/dist/bin-esm.js +0 -6
  172. package/template-react-ts/node_modules/ts-node/dist/bin-esm.js.map +0 -1
  173. package/template-react-ts/node_modules/ts-node/dist/bin-script-deprecated.d.ts +0 -2
  174. package/template-react-ts/node_modules/ts-node/dist/bin-script-deprecated.js +0 -7
  175. package/template-react-ts/node_modules/ts-node/dist/bin-script-deprecated.js.map +0 -1
  176. package/template-react-ts/node_modules/ts-node/dist/bin-script.d.ts +0 -2
  177. package/template-react-ts/node_modules/ts-node/dist/bin-script.js +0 -6
  178. package/template-react-ts/node_modules/ts-node/dist/bin-script.js.map +0 -1
  179. package/template-react-ts/node_modules/ts-node/dist/bin-transpile.d.ts +0 -2
  180. package/template-react-ts/node_modules/ts-node/dist/bin-transpile.js +0 -6
  181. package/template-react-ts/node_modules/ts-node/dist/bin-transpile.js.map +0 -1
  182. package/template-react-ts/node_modules/ts-node/dist/bin.d.ts +0 -11
  183. package/template-react-ts/node_modules/ts-node/dist/bin.js +0 -581
  184. package/template-react-ts/node_modules/ts-node/dist/bin.js.map +0 -1
  185. package/template-react-ts/node_modules/ts-node/dist/child/argv-payload.d.ts +0 -1
  186. package/template-react-ts/node_modules/ts-node/dist/child/argv-payload.js +0 -19
  187. package/template-react-ts/node_modules/ts-node/dist/child/argv-payload.js.map +0 -1
  188. package/template-react-ts/node_modules/ts-node/dist/child/child-entrypoint.d.ts +0 -1
  189. package/template-react-ts/node_modules/ts-node/dist/child/child-entrypoint.js +0 -24
  190. package/template-react-ts/node_modules/ts-node/dist/child/child-entrypoint.js.map +0 -1
  191. package/template-react-ts/node_modules/ts-node/dist/child/child-loader.d.ts +0 -1
  192. package/template-react-ts/node_modules/ts-node/dist/child/child-loader.js +0 -32
  193. package/template-react-ts/node_modules/ts-node/dist/child/child-loader.js.map +0 -1
  194. package/template-react-ts/node_modules/ts-node/dist/child/child-require.d.ts +0 -7
  195. package/template-react-ts/node_modules/ts-node/dist/child/child-require.js +0 -22
  196. package/template-react-ts/node_modules/ts-node/dist/child/child-require.js.map +0 -1
  197. package/template-react-ts/node_modules/ts-node/dist/child/spawn-child.d.ts +0 -1
  198. package/template-react-ts/node_modules/ts-node/dist/child/spawn-child.js +0 -49
  199. package/template-react-ts/node_modules/ts-node/dist/child/spawn-child.js.map +0 -1
  200. package/template-react-ts/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts +0 -1
  201. package/template-react-ts/node_modules/ts-node/dist/cjs-resolve-hooks.js +0 -29
  202. package/template-react-ts/node_modules/ts-node/dist/cjs-resolve-hooks.js.map +0 -1
  203. package/template-react-ts/node_modules/ts-node/dist/configuration.d.ts +0 -1
  204. package/template-react-ts/node_modules/ts-node/dist/configuration.js +0 -308
  205. package/template-react-ts/node_modules/ts-node/dist/configuration.js.map +0 -1
  206. package/template-react-ts/node_modules/ts-node/dist/esm.d.ts +0 -53
  207. package/template-react-ts/node_modules/ts-node/dist/esm.js +0 -228
  208. package/template-react-ts/node_modules/ts-node/dist/esm.js.map +0 -1
  209. package/template-react-ts/node_modules/ts-node/dist/file-extensions.d.ts +0 -1
  210. package/template-react-ts/node_modules/ts-node/dist/file-extensions.js +0 -133
  211. package/template-react-ts/node_modules/ts-node/dist/file-extensions.js.map +0 -1
  212. package/template-react-ts/node_modules/ts-node/dist/index.d.ts +0 -332
  213. package/template-react-ts/node_modules/ts-node/dist/index.js +0 -953
  214. package/template-react-ts/node_modules/ts-node/dist/index.js.map +0 -1
  215. package/template-react-ts/node_modules/ts-node/dist/module-type-classifier.d.ts +0 -1
  216. package/template-react-ts/node_modules/ts-node/dist/module-type-classifier.js +0 -64
  217. package/template-react-ts/node_modules/ts-node/dist/module-type-classifier.js.map +0 -1
  218. package/template-react-ts/node_modules/ts-node/dist/node-module-type-classifier.d.ts +0 -1
  219. package/template-react-ts/node_modules/ts-node/dist/node-module-type-classifier.js +0 -39
  220. package/template-react-ts/node_modules/ts-node/dist/node-module-type-classifier.js.map +0 -1
  221. package/template-react-ts/node_modules/ts-node/dist/repl.d.ts +0 -78
  222. package/template-react-ts/node_modules/ts-node/dist/repl.js +0 -561
  223. package/template-react-ts/node_modules/ts-node/dist/repl.js.map +0 -1
  224. package/template-react-ts/node_modules/ts-node/dist/resolver-functions.d.ts +0 -1
  225. package/template-react-ts/node_modules/ts-node/dist/resolver-functions.js +0 -143
  226. package/template-react-ts/node_modules/ts-node/dist/resolver-functions.js.map +0 -1
  227. package/template-react-ts/node_modules/ts-node/dist/transpilers/swc.d.ts +0 -11
  228. package/template-react-ts/node_modules/ts-node/dist/transpilers/swc.js +0 -218
  229. package/template-react-ts/node_modules/ts-node/dist/transpilers/swc.js.map +0 -1
  230. package/template-react-ts/node_modules/ts-node/dist/transpilers/types.d.ts +0 -35
  231. package/template-react-ts/node_modules/ts-node/dist/transpilers/types.js +0 -3
  232. package/template-react-ts/node_modules/ts-node/dist/transpilers/types.js.map +0 -1
  233. package/template-react-ts/node_modules/ts-node/dist/ts-compiler-types.d.ts +0 -63
  234. package/template-react-ts/node_modules/ts-node/dist/ts-compiler-types.js +0 -3
  235. package/template-react-ts/node_modules/ts-node/dist/ts-compiler-types.js.map +0 -1
  236. package/template-react-ts/node_modules/ts-node/dist/ts-internals.d.ts +0 -6
  237. package/template-react-ts/node_modules/ts-node/dist/ts-internals.js +0 -321
  238. package/template-react-ts/node_modules/ts-node/dist/ts-internals.js.map +0 -1
  239. package/template-react-ts/node_modules/ts-node/dist/ts-transpile-module.d.ts +0 -1
  240. package/template-react-ts/node_modules/ts-node/dist/ts-transpile-module.js +0 -100
  241. package/template-react-ts/node_modules/ts-node/dist/ts-transpile-module.js.map +0 -1
  242. package/template-react-ts/node_modules/ts-node/dist/tsconfig-schema.d.ts +0 -13
  243. package/template-react-ts/node_modules/ts-node/dist/tsconfig-schema.js +0 -3
  244. package/template-react-ts/node_modules/ts-node/dist/tsconfig-schema.js.map +0 -1
  245. package/template-react-ts/node_modules/ts-node/dist/tsconfigs.d.ts +0 -1
  246. package/template-react-ts/node_modules/ts-node/dist/tsconfigs.js +0 -36
  247. package/template-react-ts/node_modules/ts-node/dist/tsconfigs.js.map +0 -1
  248. package/template-react-ts/node_modules/ts-node/dist/util.d.ts +0 -4
  249. package/template-react-ts/node_modules/ts-node/dist/util.js +0 -175
  250. package/template-react-ts/node_modules/ts-node/dist/util.js.map +0 -1
  251. package/template-react-ts/node_modules/ts-node/dist-raw/NODE-LICENSE.md +0 -24
  252. package/template-react-ts/node_modules/ts-node/dist-raw/README.md +0 -36
  253. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-constants.js +0 -4
  254. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-errors.js +0 -82
  255. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js +0 -89
  256. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js +0 -593
  257. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js +0 -106
  258. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js +0 -962
  259. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js +0 -44
  260. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-repl-await.js +0 -254
  261. package/template-react-ts/node_modules/ts-node/dist-raw/node-internalBinding-fs.js +0 -58
  262. package/template-react-ts/node_modules/ts-node/dist-raw/node-nativemodule.js +0 -9
  263. package/template-react-ts/node_modules/ts-node/dist-raw/node-options.js +0 -103
  264. package/template-react-ts/node_modules/ts-node/dist-raw/node-primordials.js +0 -37
  265. package/template-react-ts/node_modules/ts-node/dist-raw/runmain-hack.js +0 -9
  266. package/template-react-ts/node_modules/ts-node/esm/transpile-only.mjs +0 -8
  267. package/template-react-ts/node_modules/ts-node/esm.mjs +0 -8
  268. package/template-react-ts/node_modules/ts-node/node10/tsconfig.json +0 -3
  269. package/template-react-ts/node_modules/ts-node/node12/tsconfig.json +0 -3
  270. package/template-react-ts/node_modules/ts-node/node14/tsconfig.json +0 -3
  271. package/template-react-ts/node_modules/ts-node/node16/tsconfig.json +0 -3
  272. package/template-react-ts/node_modules/ts-node/package.json +0 -182
  273. package/template-react-ts/node_modules/ts-node/register/files.js +0 -3
  274. package/template-react-ts/node_modules/ts-node/register/index.js +0 -1
  275. package/template-react-ts/node_modules/ts-node/register/transpile-only.js +0 -3
  276. package/template-react-ts/node_modules/ts-node/register/type-check.js +0 -3
  277. package/template-react-ts/node_modules/ts-node/transpilers/swc-experimental.js +0 -1
  278. package/template-react-ts/node_modules/ts-node/transpilers/swc.js +0 -1
  279. package/template-react-ts/node_modules/ts-node/tsconfig.schema.json +0 -183
  280. package/template-react-ts/node_modules/ts-node/tsconfig.schemastore-schema.json +0 -1326
@@ -1,175 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.versionGteLt = exports.once = exports.getBasePathForProjectLocalDependencyResolution = exports.createProjectLocalResolveHelper = exports.attemptRequireWithV8CompileCache = exports.cachedLookup = exports.hasOwnProperty = exports.normalizeSlashes = exports.parse = exports.split = exports.assign = exports.yn = exports.createRequire = void 0;
5
- const module_1 = require("module");
6
- const ynModule = require("yn");
7
- const path_1 = require("path");
8
- /** @internal */
9
- exports.createRequire = (_a = module_1.createRequire !== null && module_1.createRequire !== void 0 ? module_1.createRequire : module_1.createRequireFromPath) !== null && _a !== void 0 ? _a : require('create-require');
10
- /**
11
- * Wrapper around yn module that returns `undefined` instead of `null`.
12
- * This is implemented by yn v4, but we're staying on v3 to avoid v4's node 10 requirement.
13
- * @internal
14
- */
15
- function yn(value) {
16
- var _a;
17
- return (_a = ynModule(value)) !== null && _a !== void 0 ? _a : undefined;
18
- }
19
- exports.yn = yn;
20
- /**
21
- * Like `Object.assign`, but ignores `undefined` properties.
22
- *
23
- * @internal
24
- */
25
- function assign(initialValue, ...sources) {
26
- for (const source of sources) {
27
- for (const key of Object.keys(source)) {
28
- const value = source[key];
29
- if (value !== undefined)
30
- initialValue[key] = value;
31
- }
32
- }
33
- return initialValue;
34
- }
35
- exports.assign = assign;
36
- /**
37
- * Split a string array of values
38
- * and remove empty strings from the resulting array.
39
- * @internal
40
- */
41
- function split(value) {
42
- return typeof value === 'string'
43
- ? value.split(/ *, */g).filter((v) => v !== '')
44
- : undefined;
45
- }
46
- exports.split = split;
47
- /**
48
- * Parse a string as JSON.
49
- * @internal
50
- */
51
- function parse(value) {
52
- return typeof value === 'string' ? JSON.parse(value) : undefined;
53
- }
54
- exports.parse = parse;
55
- const directorySeparator = '/';
56
- const backslashRegExp = /\\/g;
57
- /**
58
- * Replace backslashes with forward slashes.
59
- * @internal
60
- */
61
- function normalizeSlashes(value) {
62
- return value.replace(backslashRegExp, directorySeparator);
63
- }
64
- exports.normalizeSlashes = normalizeSlashes;
65
- /**
66
- * Safe `hasOwnProperty`
67
- * @internal
68
- */
69
- function hasOwnProperty(object, property) {
70
- return Object.prototype.hasOwnProperty.call(object, property);
71
- }
72
- exports.hasOwnProperty = hasOwnProperty;
73
- /**
74
- * Cached fs operation wrapper.
75
- */
76
- function cachedLookup(fn) {
77
- const cache = new Map();
78
- return (arg) => {
79
- if (!cache.has(arg)) {
80
- const v = fn(arg);
81
- cache.set(arg, v);
82
- return v;
83
- }
84
- return cache.get(arg);
85
- };
86
- }
87
- exports.cachedLookup = cachedLookup;
88
- /**
89
- * @internal
90
- * Require something with v8-compile-cache, which should make subsequent requires faster.
91
- * Do lots of error-handling so that, worst case, we require without the cache, and users are not blocked.
92
- */
93
- function attemptRequireWithV8CompileCache(requireFn, specifier) {
94
- try {
95
- const v8CC = require('v8-compile-cache-lib').install();
96
- try {
97
- return requireFn(specifier);
98
- }
99
- finally {
100
- v8CC === null || v8CC === void 0 ? void 0 : v8CC.uninstall();
101
- }
102
- }
103
- catch (e) {
104
- return requireFn(specifier);
105
- }
106
- }
107
- exports.attemptRequireWithV8CompileCache = attemptRequireWithV8CompileCache;
108
- /**
109
- * Helper to discover dependencies relative to a user's project, optionally
110
- * falling back to relative to ts-node. This supports global installations of
111
- * ts-node, for example where someone does `#!/usr/bin/env -S ts-node --swc` and
112
- * we need to fallback to a global install of @swc/core
113
- * @internal
114
- */
115
- function createProjectLocalResolveHelper(localDirectory) {
116
- return function projectLocalResolveHelper(specifier, fallbackToTsNodeRelative) {
117
- return require.resolve(specifier, {
118
- paths: fallbackToTsNodeRelative
119
- ? [localDirectory, __dirname]
120
- : [localDirectory],
121
- });
122
- };
123
- }
124
- exports.createProjectLocalResolveHelper = createProjectLocalResolveHelper;
125
- /**
126
- * Used as a reminder of all the factors we must consider when finding project-local dependencies and when a config file
127
- * on disk may or may not exist.
128
- * @internal
129
- */
130
- function getBasePathForProjectLocalDependencyResolution(configFilePath, projectSearchDirOption, projectOption, cwdOption) {
131
- var _a;
132
- if (configFilePath != null)
133
- return (0, path_1.dirname)(configFilePath);
134
- return (_a = projectSearchDirOption !== null && projectSearchDirOption !== void 0 ? projectSearchDirOption : projectOption) !== null && _a !== void 0 ? _a : cwdOption;
135
- // TODO technically breaks if projectOption is path to a file, not a directory,
136
- // and we attempt to resolve relative specifiers. By the time we resolve relative specifiers,
137
- // should have configFilePath, so not reach this codepath.
138
- }
139
- exports.getBasePathForProjectLocalDependencyResolution = getBasePathForProjectLocalDependencyResolution;
140
- /** @internal */
141
- function once(fn) {
142
- let value;
143
- let ran = false;
144
- function onceFn(...args) {
145
- if (ran)
146
- return value;
147
- value = fn(...args);
148
- ran = true;
149
- return value;
150
- }
151
- return onceFn;
152
- }
153
- exports.once = once;
154
- /** @internal */
155
- function versionGteLt(version, gteRequirement, ltRequirement) {
156
- const [major, minor, patch, extra] = parse(version);
157
- const [gteMajor, gteMinor, gtePatch] = parse(gteRequirement);
158
- const isGte = major > gteMajor ||
159
- (major === gteMajor &&
160
- (minor > gteMinor || (minor === gteMinor && patch >= gtePatch)));
161
- let isLt = true;
162
- if (ltRequirement) {
163
- const [ltMajor, ltMinor, ltPatch] = parse(ltRequirement);
164
- isLt =
165
- major < ltMajor ||
166
- (major === ltMajor &&
167
- (minor < ltMinor || (minor === ltMinor && patch < ltPatch)));
168
- }
169
- return isGte && isLt;
170
- function parse(requirement) {
171
- return requirement.split(/[\.-]/).map((s) => parseInt(s, 10));
172
- }
173
- }
174
- exports.versionGteLt = versionGteLt;
175
- //# sourceMappingURL=util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n createRequire as nodeCreateRequire,\n createRequireFromPath as nodeCreateRequireFromPath,\n} from 'module';\nimport type _createRequire from 'create-require';\nimport * as ynModule from 'yn';\nimport { dirname } from 'path';\n\n/** @internal */\nexport const createRequire =\n nodeCreateRequire ??\n nodeCreateRequireFromPath ??\n (require('create-require') as typeof _createRequire);\n\n/**\n * Wrapper around yn module that returns `undefined` instead of `null`.\n * This is implemented by yn v4, but we're staying on v3 to avoid v4's node 10 requirement.\n * @internal\n */\nexport function yn(value: string | undefined) {\n return ynModule(value) ?? undefined;\n}\n\n/**\n * Like `Object.assign`, but ignores `undefined` properties.\n *\n * @internal\n */\nexport function assign<T extends object>(\n initialValue: T,\n ...sources: Array<T>\n): T {\n for (const source of sources) {\n for (const key of Object.keys(source)) {\n const value = (source as any)[key];\n if (value !== undefined) (initialValue as any)[key] = value;\n }\n }\n return initialValue;\n}\n\n/**\n * Split a string array of values\n * and remove empty strings from the resulting array.\n * @internal\n */\nexport function split(value: string | undefined) {\n return typeof value === 'string'\n ? value.split(/ *, */g).filter((v) => v !== '')\n : undefined;\n}\n\n/**\n * Parse a string as JSON.\n * @internal\n */\nexport function parse(value: string | undefined): object | undefined {\n return typeof value === 'string' ? JSON.parse(value) : undefined;\n}\n\nconst directorySeparator = '/';\nconst backslashRegExp = /\\\\/g;\n/**\n * Replace backslashes with forward slashes.\n * @internal\n */\nexport function normalizeSlashes(value: string): string {\n return value.replace(backslashRegExp, directorySeparator);\n}\n\n/**\n * Safe `hasOwnProperty`\n * @internal\n */\nexport function hasOwnProperty(object: any, property: string): boolean {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\n/**\n * Cached fs operation wrapper.\n */\nexport function cachedLookup<T, R>(fn: (arg: T) => R): (arg: T) => R {\n const cache = new Map<T, R>();\n\n return (arg: T): R => {\n if (!cache.has(arg)) {\n const v = fn(arg);\n cache.set(arg, v);\n return v;\n }\n return cache.get(arg)!;\n };\n}\n\n/**\n * @internal\n * Require something with v8-compile-cache, which should make subsequent requires faster.\n * Do lots of error-handling so that, worst case, we require without the cache, and users are not blocked.\n */\nexport function attemptRequireWithV8CompileCache(\n requireFn: typeof require,\n specifier: string\n) {\n try {\n const v8CC = (\n require('v8-compile-cache-lib') as typeof import('v8-compile-cache-lib')\n ).install();\n try {\n return requireFn(specifier);\n } finally {\n v8CC?.uninstall();\n }\n } catch (e) {\n return requireFn(specifier);\n }\n}\n\n/**\n * Helper to discover dependencies relative to a user's project, optionally\n * falling back to relative to ts-node. This supports global installations of\n * ts-node, for example where someone does `#!/usr/bin/env -S ts-node --swc` and\n * we need to fallback to a global install of @swc/core\n * @internal\n */\nexport function createProjectLocalResolveHelper(localDirectory: string) {\n return function projectLocalResolveHelper(\n specifier: string,\n fallbackToTsNodeRelative: boolean\n ) {\n return require.resolve(specifier, {\n paths: fallbackToTsNodeRelative\n ? [localDirectory, __dirname]\n : [localDirectory],\n });\n };\n}\n/** @internal */\nexport type ProjectLocalResolveHelper = ReturnType<\n typeof createProjectLocalResolveHelper\n>;\n\n/**\n * Used as a reminder of all the factors we must consider when finding project-local dependencies and when a config file\n * on disk may or may not exist.\n * @internal\n */\nexport function getBasePathForProjectLocalDependencyResolution(\n configFilePath: string | undefined,\n projectSearchDirOption: string | undefined,\n projectOption: string | undefined,\n cwdOption: string\n) {\n if (configFilePath != null) return dirname(configFilePath);\n return projectSearchDirOption ?? projectOption ?? cwdOption;\n // TODO technically breaks if projectOption is path to a file, not a directory,\n // and we attempt to resolve relative specifiers. By the time we resolve relative specifiers,\n // should have configFilePath, so not reach this codepath.\n}\n\n/** @internal */\nexport function once<Fn extends (...args: any[]) => any>(fn: Fn) {\n let value: ReturnType<Fn>;\n let ran = false;\n function onceFn(...args: Parameters<Fn>): ReturnType<Fn> {\n if (ran) return value;\n value = fn(...args);\n ran = true;\n return value;\n }\n return onceFn;\n}\n\n/** @internal */\nexport function versionGteLt(\n version: string,\n gteRequirement: string,\n ltRequirement?: string\n) {\n const [major, minor, patch, extra] = parse(version);\n const [gteMajor, gteMinor, gtePatch] = parse(gteRequirement);\n const isGte =\n major > gteMajor ||\n (major === gteMajor &&\n (minor > gteMinor || (minor === gteMinor && patch >= gtePatch)));\n let isLt = true;\n if (ltRequirement) {\n const [ltMajor, ltMinor, ltPatch] = parse(ltRequirement);\n isLt =\n major < ltMajor ||\n (major === ltMajor &&\n (minor < ltMinor || (minor === ltMinor && patch < ltPatch)));\n }\n return isGte && isLt;\n\n function parse(requirement: string) {\n return requirement.split(/[\\.-]/).map((s) => parseInt(s, 10));\n }\n}\n"]}
@@ -1,24 +0,0 @@
1
- This directory contains portions of Node.js source code which is licensed as follows:
2
-
3
- ---
4
-
5
- Copyright Joyent, Inc. and other Node contributors.
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a
8
- copy of this software and associated documentation files (the
9
- "Software"), to deal in the Software without restriction, including
10
- without limitation the rights to use, copy, modify, merge, publish,
11
- distribute, sublicense, and/or sell copies of the Software, and to permit
12
- persons to whom the Software is furnished to do so, subject to the
13
- following conditions:
14
-
15
- The above copyright notice and this permission notice shall be included
16
- in all copies or substantial portions of the Software.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
21
- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
22
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
23
- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
24
- USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,36 +0,0 @@
1
- The `dist-raw` directory contains JS sources that are distributed verbatim, not compiled nor typechecked via TS.
2
-
3
- To implement ESM support, we unfortunately must duplicate some of node's built-in functionality that is not
4
- exposed via an API. We have copy-pasted the necessary code from https://github.com/nodejs/node/tree/master/lib
5
- then modified it to suite our needs.
6
-
7
- Formatting may be intentionally bad to keep the diff as small as possible, to make it easier to merge
8
- upstream changes and understand our modifications. For example, when we need to wrap node's source code
9
- in a factory function, we will not indent the function body, to avoid whitespace changes in the diff.
10
-
11
- One obvious problem with this approach: the code has been pulled from one version of node, whereas users of ts-node
12
- run multiple versions of node.
13
- Users running node 12 may see that ts-node behaves like node 14, for example.
14
-
15
- ## `raw` directory
16
-
17
- Within the `raw` directory, we keep unmodified copies of the node source files. This allows us to use diffing tools to
18
- compare files in `raw` to those in `dist-raw`, which will highlight all of the changes we have made. Hopefully, these
19
- changes are as minimal as possible.
20
-
21
- ## Naming convention
22
-
23
- Not used consistently, but the idea is:
24
-
25
- `node-<directory>(...-<directory>)-<filename>.js`
26
-
27
- `node-internal-errors.js` -> `github.com/nodejs/node/blob/TAG/lib/internal/errors.js`
28
-
29
- So, take the path within node's `lib/` directory, and replace slashes with hyphens.
30
-
31
- In the `raw` directory, files are suffixed with the version number or revision from which
32
- they were downloaded.
33
-
34
- If they have a `stripped` suffix, this means they have large chunks of code deleted, but no other modifications.
35
- This is useful when diffing. Sometimes our `dist-raw` files only have a small part of a much larger node source file.
36
- It is easier to diff `raw/*-stripped.js` against `dist-raw/*.js`.
@@ -1,4 +0,0 @@
1
- // Copied from https://github.com/nodejs/node/blob/master/lib/internal/constants.js
2
- module.exports = {
3
- CHAR_FORWARD_SLASH: 47, /* / */
4
- };
@@ -1,82 +0,0 @@
1
- 'use strict';
2
-
3
- const path = require('path');
4
-
5
- exports.codes = {
6
- ERR_INPUT_TYPE_NOT_ALLOWED: createErrorCtor(joinArgs('ERR_INPUT_TYPE_NOT_ALLOWED')),
7
- ERR_INVALID_ARG_VALUE: createErrorCtor(joinArgs('ERR_INVALID_ARG_VALUE')),
8
- ERR_INVALID_MODULE_SPECIFIER: createErrorCtor(joinArgs('ERR_INVALID_MODULE_SPECIFIER')),
9
- ERR_INVALID_PACKAGE_CONFIG: createErrorCtor(joinArgs('ERR_INVALID_PACKAGE_CONFIG')),
10
- ERR_INVALID_PACKAGE_TARGET: createErrorCtor(joinArgs('ERR_INVALID_PACKAGE_TARGET')),
11
- ERR_MANIFEST_DEPENDENCY_MISSING: createErrorCtor(joinArgs('ERR_MANIFEST_DEPENDENCY_MISSING')),
12
- ERR_MODULE_NOT_FOUND: createErrorCtor((path, base, type = 'package') => {
13
- return `Cannot find ${type} '${path}' imported from ${base}`
14
- }),
15
- ERR_PACKAGE_IMPORT_NOT_DEFINED: createErrorCtor(joinArgs('ERR_PACKAGE_IMPORT_NOT_DEFINED')),
16
- ERR_PACKAGE_PATH_NOT_EXPORTED: createErrorCtor(joinArgs('ERR_PACKAGE_PATH_NOT_EXPORTED')),
17
- ERR_UNSUPPORTED_DIR_IMPORT: createErrorCtor(joinArgs('ERR_UNSUPPORTED_DIR_IMPORT')),
18
- ERR_UNSUPPORTED_ESM_URL_SCHEME: createErrorCtor(joinArgs('ERR_UNSUPPORTED_ESM_URL_SCHEME')),
19
- ERR_UNKNOWN_FILE_EXTENSION: createErrorCtor(joinArgs('ERR_UNKNOWN_FILE_EXTENSION')),
20
- }
21
-
22
- function joinArgs(name) {
23
- return (...args) => {
24
- return [name, ...args].join(' ')
25
- }
26
- }
27
-
28
- function createErrorCtor(errorMessageCreator) {
29
- return class CustomError extends Error {
30
- constructor(...args) {
31
- super(errorMessageCreator(...args))
32
- }
33
- }
34
- }
35
- exports.createErrRequireEsm = createErrRequireEsm;
36
-
37
- // Native ERR_REQUIRE_ESM Error is declared here:
38
- // https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L1294-L1313
39
- // Error class factory is implemented here:
40
- // function E: https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L323-L341
41
- // function makeNodeErrorWithCode: https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L251-L278
42
- // The code below should create an error that matches the native error as closely as possible.
43
- // Third-party libraries which attempt to catch the native ERR_REQUIRE_ESM should recognize our imitation error.
44
- function createErrRequireEsm(filename, parentPath, packageJsonPath) {
45
- const code = 'ERR_REQUIRE_ESM'
46
- const err = new Error(getErrRequireEsmMessage(filename, parentPath, packageJsonPath))
47
- // Set `name` to be used in stack trace, generate stack trace with that name baked in, then re-declare the `name` field.
48
- // This trick is copied from node's source.
49
- err.name = `Error [${ code }]`
50
- err.stack
51
- Object.defineProperty(err, 'name', {
52
- value: 'Error',
53
- enumerable: false,
54
- writable: true,
55
- configurable: true
56
- })
57
- err.code = code
58
- return err
59
- }
60
-
61
- // Copy-pasted from https://github.com/nodejs/node/blob/b533fb3508009e5f567cc776daba8fbf665386a6/lib/internal/errors.js#L1293-L1311
62
- // so that our error message is identical to the native message.
63
- function getErrRequireEsmMessage(filename, parentPath = null, packageJsonPath = null) {
64
- const ext = path.extname(filename)
65
- let msg = `Must use import to load ES Module: ${filename}`;
66
- if (parentPath && packageJsonPath) {
67
- const path = require('path');
68
- const basename = path.basename(filename) === path.basename(parentPath) ?
69
- filename : path.basename(filename);
70
- msg +=
71
- '\nrequire() of ES modules is not supported.\nrequire() of ' +
72
- `${filename} ${parentPath ? `from ${parentPath} ` : ''}` +
73
- `is an ES module file as it is a ${ext} file whose nearest parent ` +
74
- `package.json contains "type": "module" which defines all ${ext} ` +
75
- 'files in that package scope as ES modules.\nInstead ' +
76
- 'change the requiring code to use ' +
77
- 'import(), or remove "type": "module" from ' +
78
- `${packageJsonPath}.\n`;
79
- return msg;
80
- }
81
- return msg;
82
- }
@@ -1,89 +0,0 @@
1
- // Copied from https://github.com/nodejs/node/blob/v17.0.1/lib/internal/modules/cjs/helpers.js
2
-
3
- 'use strict';
4
-
5
- const {
6
- ArrayPrototypeForEach,
7
- ObjectDefineProperty,
8
- ObjectPrototypeHasOwnProperty,
9
- SafeSet,
10
- StringPrototypeIncludes,
11
- StringPrototypeStartsWith,
12
- } = require('./node-primordials');
13
-
14
- const { getOptionValue } = require('./node-options');
15
- const userConditions = getOptionValue('--conditions');
16
-
17
- const noAddons = getOptionValue('--no-addons');
18
- const addonConditions = noAddons ? [] : ['node-addons'];
19
-
20
- // TODO: Use this set when resolving pkg#exports conditions in loader.js.
21
- const cjsConditions = new SafeSet([
22
- 'require',
23
- 'node',
24
- ...addonConditions,
25
- ...userConditions,
26
- ]);
27
-
28
- /**
29
- * @param {any} object
30
- * @param {string} [dummyModuleName]
31
- * @return {void}
32
- */
33
- function addBuiltinLibsToObject(object, dummyModuleName) {
34
- // Make built-in modules available directly (loaded lazily).
35
- const Module = require('module').Module;
36
- const { builtinModules } = Module;
37
-
38
- // To require built-in modules in user-land and ignore modules whose
39
- // `canBeRequiredByUsers` is false. So we create a dummy module object and not
40
- // use `require()` directly.
41
- const dummyModule = new Module(dummyModuleName);
42
-
43
- ArrayPrototypeForEach(builtinModules, (name) => {
44
- // Neither add underscored modules, nor ones that contain slashes (e.g.,
45
- // 'fs/promises') or ones that are already defined.
46
- if (StringPrototypeStartsWith(name, '_') ||
47
- StringPrototypeIncludes(name, '/') ||
48
- ObjectPrototypeHasOwnProperty(object, name)) {
49
- return;
50
- }
51
- // Goals of this mechanism are:
52
- // - Lazy loading of built-in modules
53
- // - Having all built-in modules available as non-enumerable properties
54
- // - Allowing the user to re-assign these variables as if there were no
55
- // pre-existing globals with the same name.
56
-
57
- const setReal = (val) => {
58
- // Deleting the property before re-assigning it disables the
59
- // getter/setter mechanism.
60
- delete object[name];
61
- object[name] = val;
62
- };
63
-
64
- ObjectDefineProperty(object, name, {
65
- get: () => {
66
- // Node 12 hack; remove when we drop node12 support
67
- const lib = (dummyModule.require || require)(name);
68
-
69
- // Disable the current getter/setter and set up a new
70
- // non-enumerable property.
71
- delete object[name];
72
- ObjectDefineProperty(object, name, {
73
- get: () => lib,
74
- set: setReal,
75
- configurable: true,
76
- enumerable: false
77
- });
78
-
79
- return lib;
80
- },
81
- set: setReal,
82
- configurable: true,
83
- enumerable: false
84
- });
85
- });
86
- }
87
-
88
- exports.addBuiltinLibsToObject = addBuiltinLibsToObject;
89
- exports.cjsConditions = cjsConditions;