create-leo-app 0.7.3 → 0.8.2

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 (279) 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/package.json +3 -3
  19. package/template-vanilla/vite.config.js +3 -1
  20. package/template-nextjs-ts/node_modules/@types/node/LICENSE +0 -21
  21. package/template-nextjs-ts/node_modules/@types/node/README.md +0 -15
  22. package/template-nextjs-ts/node_modules/@types/node/assert/strict.d.ts +0 -8
  23. package/template-nextjs-ts/node_modules/@types/node/assert.d.ts +0 -1040
  24. package/template-nextjs-ts/node_modules/@types/node/async_hooks.d.ts +0 -541
  25. package/template-nextjs-ts/node_modules/@types/node/buffer.d.ts +0 -2301
  26. package/template-nextjs-ts/node_modules/@types/node/child_process.d.ts +0 -1544
  27. package/template-nextjs-ts/node_modules/@types/node/cluster.d.ts +0 -578
  28. package/template-nextjs-ts/node_modules/@types/node/console.d.ts +0 -452
  29. package/template-nextjs-ts/node_modules/@types/node/constants.d.ts +0 -19
  30. package/template-nextjs-ts/node_modules/@types/node/crypto.d.ts +0 -4524
  31. package/template-nextjs-ts/node_modules/@types/node/dgram.d.ts +0 -596
  32. package/template-nextjs-ts/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  33. package/template-nextjs-ts/node_modules/@types/node/dns/promises.d.ts +0 -476
  34. package/template-nextjs-ts/node_modules/@types/node/dns.d.ts +0 -864
  35. package/template-nextjs-ts/node_modules/@types/node/dom-events.d.ts +0 -124
  36. package/template-nextjs-ts/node_modules/@types/node/domain.d.ts +0 -170
  37. package/template-nextjs-ts/node_modules/@types/node/events.d.ts +0 -931
  38. package/template-nextjs-ts/node_modules/@types/node/fs/promises.d.ts +0 -1245
  39. package/template-nextjs-ts/node_modules/@types/node/fs.d.ts +0 -4317
  40. package/template-nextjs-ts/node_modules/@types/node/globals.d.ts +0 -503
  41. package/template-nextjs-ts/node_modules/@types/node/globals.global.d.ts +0 -1
  42. package/template-nextjs-ts/node_modules/@types/node/http.d.ts +0 -1908
  43. package/template-nextjs-ts/node_modules/@types/node/http2.d.ts +0 -2418
  44. package/template-nextjs-ts/node_modules/@types/node/https.d.ts +0 -550
  45. package/template-nextjs-ts/node_modules/@types/node/index.d.ts +0 -89
  46. package/template-nextjs-ts/node_modules/@types/node/inspector.d.ts +0 -3696
  47. package/template-nextjs-ts/node_modules/@types/node/module.d.ts +0 -315
  48. package/template-nextjs-ts/node_modules/@types/node/net.d.ts +0 -999
  49. package/template-nextjs-ts/node_modules/@types/node/os.d.ts +0 -495
  50. package/template-nextjs-ts/node_modules/@types/node/package.json +0 -217
  51. package/template-nextjs-ts/node_modules/@types/node/path.d.ts +0 -191
  52. package/template-nextjs-ts/node_modules/@types/node/perf_hooks.d.ts +0 -934
  53. package/template-nextjs-ts/node_modules/@types/node/process.d.ts +0 -1879
  54. package/template-nextjs-ts/node_modules/@types/node/punycode.d.ts +0 -117
  55. package/template-nextjs-ts/node_modules/@types/node/querystring.d.ts +0 -153
  56. package/template-nextjs-ts/node_modules/@types/node/readline/promises.d.ts +0 -150
  57. package/template-nextjs-ts/node_modules/@types/node/readline.d.ts +0 -540
  58. package/template-nextjs-ts/node_modules/@types/node/repl.d.ts +0 -430
  59. package/template-nextjs-ts/node_modules/@types/node/sea.d.ts +0 -153
  60. package/template-nextjs-ts/node_modules/@types/node/stream/consumers.d.ts +0 -12
  61. package/template-nextjs-ts/node_modules/@types/node/stream/promises.d.ts +0 -83
  62. package/template-nextjs-ts/node_modules/@types/node/stream/web.d.ts +0 -521
  63. package/template-nextjs-ts/node_modules/@types/node/stream.d.ts +0 -1707
  64. package/template-nextjs-ts/node_modules/@types/node/string_decoder.d.ts +0 -67
  65. package/template-nextjs-ts/node_modules/@types/node/test.d.ts +0 -1874
  66. package/template-nextjs-ts/node_modules/@types/node/timers/promises.d.ts +0 -97
  67. package/template-nextjs-ts/node_modules/@types/node/timers.d.ts +0 -240
  68. package/template-nextjs-ts/node_modules/@types/node/tls.d.ts +0 -1217
  69. package/template-nextjs-ts/node_modules/@types/node/trace_events.d.ts +0 -197
  70. package/template-nextjs-ts/node_modules/@types/node/tty.d.ts +0 -208
  71. package/template-nextjs-ts/node_modules/@types/node/url.d.ts +0 -952
  72. package/template-nextjs-ts/node_modules/@types/node/util.d.ts +0 -2298
  73. package/template-nextjs-ts/node_modules/@types/node/v8.d.ts +0 -808
  74. package/template-nextjs-ts/node_modules/@types/node/vm.d.ts +0 -924
  75. package/template-nextjs-ts/node_modules/@types/node/wasi.d.ts +0 -181
  76. package/template-nextjs-ts/node_modules/@types/node/worker_threads.d.ts +0 -694
  77. package/template-nextjs-ts/node_modules/@types/node/zlib.d.ts +0 -539
  78. package/template-react-ts/node_modules/@types/node/LICENSE +0 -21
  79. package/template-react-ts/node_modules/@types/node/README.md +0 -15
  80. package/template-react-ts/node_modules/@types/node/assert/strict.d.ts +0 -8
  81. package/template-react-ts/node_modules/@types/node/assert.d.ts +0 -1040
  82. package/template-react-ts/node_modules/@types/node/async_hooks.d.ts +0 -541
  83. package/template-react-ts/node_modules/@types/node/buffer.d.ts +0 -2301
  84. package/template-react-ts/node_modules/@types/node/child_process.d.ts +0 -1544
  85. package/template-react-ts/node_modules/@types/node/cluster.d.ts +0 -578
  86. package/template-react-ts/node_modules/@types/node/console.d.ts +0 -452
  87. package/template-react-ts/node_modules/@types/node/constants.d.ts +0 -19
  88. package/template-react-ts/node_modules/@types/node/crypto.d.ts +0 -4524
  89. package/template-react-ts/node_modules/@types/node/dgram.d.ts +0 -596
  90. package/template-react-ts/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  91. package/template-react-ts/node_modules/@types/node/dns/promises.d.ts +0 -476
  92. package/template-react-ts/node_modules/@types/node/dns.d.ts +0 -864
  93. package/template-react-ts/node_modules/@types/node/dom-events.d.ts +0 -124
  94. package/template-react-ts/node_modules/@types/node/domain.d.ts +0 -170
  95. package/template-react-ts/node_modules/@types/node/events.d.ts +0 -931
  96. package/template-react-ts/node_modules/@types/node/fs/promises.d.ts +0 -1245
  97. package/template-react-ts/node_modules/@types/node/fs.d.ts +0 -4317
  98. package/template-react-ts/node_modules/@types/node/globals.d.ts +0 -503
  99. package/template-react-ts/node_modules/@types/node/globals.global.d.ts +0 -1
  100. package/template-react-ts/node_modules/@types/node/http.d.ts +0 -1908
  101. package/template-react-ts/node_modules/@types/node/http2.d.ts +0 -2418
  102. package/template-react-ts/node_modules/@types/node/https.d.ts +0 -550
  103. package/template-react-ts/node_modules/@types/node/index.d.ts +0 -89
  104. package/template-react-ts/node_modules/@types/node/inspector.d.ts +0 -3696
  105. package/template-react-ts/node_modules/@types/node/module.d.ts +0 -315
  106. package/template-react-ts/node_modules/@types/node/net.d.ts +0 -999
  107. package/template-react-ts/node_modules/@types/node/os.d.ts +0 -495
  108. package/template-react-ts/node_modules/@types/node/package.json +0 -217
  109. package/template-react-ts/node_modules/@types/node/path.d.ts +0 -191
  110. package/template-react-ts/node_modules/@types/node/perf_hooks.d.ts +0 -934
  111. package/template-react-ts/node_modules/@types/node/process.d.ts +0 -1879
  112. package/template-react-ts/node_modules/@types/node/punycode.d.ts +0 -117
  113. package/template-react-ts/node_modules/@types/node/querystring.d.ts +0 -153
  114. package/template-react-ts/node_modules/@types/node/readline/promises.d.ts +0 -150
  115. package/template-react-ts/node_modules/@types/node/readline.d.ts +0 -540
  116. package/template-react-ts/node_modules/@types/node/repl.d.ts +0 -430
  117. package/template-react-ts/node_modules/@types/node/sea.d.ts +0 -153
  118. package/template-react-ts/node_modules/@types/node/stream/consumers.d.ts +0 -12
  119. package/template-react-ts/node_modules/@types/node/stream/promises.d.ts +0 -83
  120. package/template-react-ts/node_modules/@types/node/stream/web.d.ts +0 -521
  121. package/template-react-ts/node_modules/@types/node/stream.d.ts +0 -1707
  122. package/template-react-ts/node_modules/@types/node/string_decoder.d.ts +0 -67
  123. package/template-react-ts/node_modules/@types/node/test.d.ts +0 -1874
  124. package/template-react-ts/node_modules/@types/node/timers/promises.d.ts +0 -97
  125. package/template-react-ts/node_modules/@types/node/timers.d.ts +0 -240
  126. package/template-react-ts/node_modules/@types/node/tls.d.ts +0 -1217
  127. package/template-react-ts/node_modules/@types/node/trace_events.d.ts +0 -197
  128. package/template-react-ts/node_modules/@types/node/tty.d.ts +0 -208
  129. package/template-react-ts/node_modules/@types/node/url.d.ts +0 -952
  130. package/template-react-ts/node_modules/@types/node/util.d.ts +0 -2298
  131. package/template-react-ts/node_modules/@types/node/v8.d.ts +0 -808
  132. package/template-react-ts/node_modules/@types/node/vm.d.ts +0 -924
  133. package/template-react-ts/node_modules/@types/node/wasi.d.ts +0 -181
  134. package/template-react-ts/node_modules/@types/node/worker_threads.d.ts +0 -694
  135. package/template-react-ts/node_modules/@types/node/zlib.d.ts +0 -539
  136. package/template-react-ts/node_modules/diff/CONTRIBUTING.md +0 -39
  137. package/template-react-ts/node_modules/diff/LICENSE +0 -31
  138. package/template-react-ts/node_modules/diff/README.md +0 -207
  139. package/template-react-ts/node_modules/diff/dist/diff.js +0 -1585
  140. package/template-react-ts/node_modules/diff/dist/diff.min.js +0 -38
  141. package/template-react-ts/node_modules/diff/lib/convert/dmp.js +0 -32
  142. package/template-react-ts/node_modules/diff/lib/convert/xml.js +0 -42
  143. package/template-react-ts/node_modules/diff/lib/diff/array.js +0 -45
  144. package/template-react-ts/node_modules/diff/lib/diff/base.js +0 -304
  145. package/template-react-ts/node_modules/diff/lib/diff/character.js +0 -37
  146. package/template-react-ts/node_modules/diff/lib/diff/css.js +0 -41
  147. package/template-react-ts/node_modules/diff/lib/diff/json.js +0 -163
  148. package/template-react-ts/node_modules/diff/lib/diff/line.js +0 -89
  149. package/template-react-ts/node_modules/diff/lib/diff/sentence.js +0 -41
  150. package/template-react-ts/node_modules/diff/lib/diff/word.js +0 -107
  151. package/template-react-ts/node_modules/diff/lib/index.es6.js +0 -1519
  152. package/template-react-ts/node_modules/diff/lib/index.js +0 -216
  153. package/template-react-ts/node_modules/diff/lib/patch/apply.js +0 -243
  154. package/template-react-ts/node_modules/diff/lib/patch/create.js +0 -247
  155. package/template-react-ts/node_modules/diff/lib/patch/merge.js +0 -609
  156. package/template-react-ts/node_modules/diff/lib/patch/parse.js +0 -156
  157. package/template-react-ts/node_modules/diff/lib/util/array.js +0 -32
  158. package/template-react-ts/node_modules/diff/lib/util/distance-iterator.js +0 -57
  159. package/template-react-ts/node_modules/diff/lib/util/params.js +0 -24
  160. package/template-react-ts/node_modules/diff/package.json +0 -73
  161. package/template-react-ts/node_modules/diff/release-notes.md +0 -261
  162. package/template-react-ts/node_modules/diff/runtime.js +0 -3
  163. package/template-react-ts/node_modules/ts-node/LICENSE +0 -21
  164. package/template-react-ts/node_modules/ts-node/README.md +0 -1442
  165. package/template-react-ts/node_modules/ts-node/child-loader.mjs +0 -8
  166. package/template-react-ts/node_modules/ts-node/dist/bin-cwd.d.ts +0 -2
  167. package/template-react-ts/node_modules/ts-node/dist/bin-cwd.js +0 -6
  168. package/template-react-ts/node_modules/ts-node/dist/bin-cwd.js.map +0 -1
  169. package/template-react-ts/node_modules/ts-node/dist/bin-esm.d.ts +0 -2
  170. package/template-react-ts/node_modules/ts-node/dist/bin-esm.js +0 -6
  171. package/template-react-ts/node_modules/ts-node/dist/bin-esm.js.map +0 -1
  172. package/template-react-ts/node_modules/ts-node/dist/bin-script-deprecated.d.ts +0 -2
  173. package/template-react-ts/node_modules/ts-node/dist/bin-script-deprecated.js +0 -7
  174. package/template-react-ts/node_modules/ts-node/dist/bin-script-deprecated.js.map +0 -1
  175. package/template-react-ts/node_modules/ts-node/dist/bin-script.d.ts +0 -2
  176. package/template-react-ts/node_modules/ts-node/dist/bin-script.js +0 -6
  177. package/template-react-ts/node_modules/ts-node/dist/bin-script.js.map +0 -1
  178. package/template-react-ts/node_modules/ts-node/dist/bin-transpile.d.ts +0 -2
  179. package/template-react-ts/node_modules/ts-node/dist/bin-transpile.js +0 -6
  180. package/template-react-ts/node_modules/ts-node/dist/bin-transpile.js.map +0 -1
  181. package/template-react-ts/node_modules/ts-node/dist/bin.d.ts +0 -11
  182. package/template-react-ts/node_modules/ts-node/dist/bin.js +0 -581
  183. package/template-react-ts/node_modules/ts-node/dist/bin.js.map +0 -1
  184. package/template-react-ts/node_modules/ts-node/dist/child/argv-payload.d.ts +0 -1
  185. package/template-react-ts/node_modules/ts-node/dist/child/argv-payload.js +0 -19
  186. package/template-react-ts/node_modules/ts-node/dist/child/argv-payload.js.map +0 -1
  187. package/template-react-ts/node_modules/ts-node/dist/child/child-entrypoint.d.ts +0 -1
  188. package/template-react-ts/node_modules/ts-node/dist/child/child-entrypoint.js +0 -24
  189. package/template-react-ts/node_modules/ts-node/dist/child/child-entrypoint.js.map +0 -1
  190. package/template-react-ts/node_modules/ts-node/dist/child/child-loader.d.ts +0 -1
  191. package/template-react-ts/node_modules/ts-node/dist/child/child-loader.js +0 -32
  192. package/template-react-ts/node_modules/ts-node/dist/child/child-loader.js.map +0 -1
  193. package/template-react-ts/node_modules/ts-node/dist/child/child-require.d.ts +0 -7
  194. package/template-react-ts/node_modules/ts-node/dist/child/child-require.js +0 -22
  195. package/template-react-ts/node_modules/ts-node/dist/child/child-require.js.map +0 -1
  196. package/template-react-ts/node_modules/ts-node/dist/child/spawn-child.d.ts +0 -1
  197. package/template-react-ts/node_modules/ts-node/dist/child/spawn-child.js +0 -49
  198. package/template-react-ts/node_modules/ts-node/dist/child/spawn-child.js.map +0 -1
  199. package/template-react-ts/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts +0 -1
  200. package/template-react-ts/node_modules/ts-node/dist/cjs-resolve-hooks.js +0 -29
  201. package/template-react-ts/node_modules/ts-node/dist/cjs-resolve-hooks.js.map +0 -1
  202. package/template-react-ts/node_modules/ts-node/dist/configuration.d.ts +0 -1
  203. package/template-react-ts/node_modules/ts-node/dist/configuration.js +0 -308
  204. package/template-react-ts/node_modules/ts-node/dist/configuration.js.map +0 -1
  205. package/template-react-ts/node_modules/ts-node/dist/esm.d.ts +0 -53
  206. package/template-react-ts/node_modules/ts-node/dist/esm.js +0 -228
  207. package/template-react-ts/node_modules/ts-node/dist/esm.js.map +0 -1
  208. package/template-react-ts/node_modules/ts-node/dist/file-extensions.d.ts +0 -1
  209. package/template-react-ts/node_modules/ts-node/dist/file-extensions.js +0 -133
  210. package/template-react-ts/node_modules/ts-node/dist/file-extensions.js.map +0 -1
  211. package/template-react-ts/node_modules/ts-node/dist/index.d.ts +0 -332
  212. package/template-react-ts/node_modules/ts-node/dist/index.js +0 -953
  213. package/template-react-ts/node_modules/ts-node/dist/index.js.map +0 -1
  214. package/template-react-ts/node_modules/ts-node/dist/module-type-classifier.d.ts +0 -1
  215. package/template-react-ts/node_modules/ts-node/dist/module-type-classifier.js +0 -64
  216. package/template-react-ts/node_modules/ts-node/dist/module-type-classifier.js.map +0 -1
  217. package/template-react-ts/node_modules/ts-node/dist/node-module-type-classifier.d.ts +0 -1
  218. package/template-react-ts/node_modules/ts-node/dist/node-module-type-classifier.js +0 -39
  219. package/template-react-ts/node_modules/ts-node/dist/node-module-type-classifier.js.map +0 -1
  220. package/template-react-ts/node_modules/ts-node/dist/repl.d.ts +0 -78
  221. package/template-react-ts/node_modules/ts-node/dist/repl.js +0 -561
  222. package/template-react-ts/node_modules/ts-node/dist/repl.js.map +0 -1
  223. package/template-react-ts/node_modules/ts-node/dist/resolver-functions.d.ts +0 -1
  224. package/template-react-ts/node_modules/ts-node/dist/resolver-functions.js +0 -143
  225. package/template-react-ts/node_modules/ts-node/dist/resolver-functions.js.map +0 -1
  226. package/template-react-ts/node_modules/ts-node/dist/transpilers/swc.d.ts +0 -11
  227. package/template-react-ts/node_modules/ts-node/dist/transpilers/swc.js +0 -218
  228. package/template-react-ts/node_modules/ts-node/dist/transpilers/swc.js.map +0 -1
  229. package/template-react-ts/node_modules/ts-node/dist/transpilers/types.d.ts +0 -35
  230. package/template-react-ts/node_modules/ts-node/dist/transpilers/types.js +0 -3
  231. package/template-react-ts/node_modules/ts-node/dist/transpilers/types.js.map +0 -1
  232. package/template-react-ts/node_modules/ts-node/dist/ts-compiler-types.d.ts +0 -63
  233. package/template-react-ts/node_modules/ts-node/dist/ts-compiler-types.js +0 -3
  234. package/template-react-ts/node_modules/ts-node/dist/ts-compiler-types.js.map +0 -1
  235. package/template-react-ts/node_modules/ts-node/dist/ts-internals.d.ts +0 -6
  236. package/template-react-ts/node_modules/ts-node/dist/ts-internals.js +0 -321
  237. package/template-react-ts/node_modules/ts-node/dist/ts-internals.js.map +0 -1
  238. package/template-react-ts/node_modules/ts-node/dist/ts-transpile-module.d.ts +0 -1
  239. package/template-react-ts/node_modules/ts-node/dist/ts-transpile-module.js +0 -100
  240. package/template-react-ts/node_modules/ts-node/dist/ts-transpile-module.js.map +0 -1
  241. package/template-react-ts/node_modules/ts-node/dist/tsconfig-schema.d.ts +0 -13
  242. package/template-react-ts/node_modules/ts-node/dist/tsconfig-schema.js +0 -3
  243. package/template-react-ts/node_modules/ts-node/dist/tsconfig-schema.js.map +0 -1
  244. package/template-react-ts/node_modules/ts-node/dist/tsconfigs.d.ts +0 -1
  245. package/template-react-ts/node_modules/ts-node/dist/tsconfigs.js +0 -36
  246. package/template-react-ts/node_modules/ts-node/dist/tsconfigs.js.map +0 -1
  247. package/template-react-ts/node_modules/ts-node/dist/util.d.ts +0 -4
  248. package/template-react-ts/node_modules/ts-node/dist/util.js +0 -175
  249. package/template-react-ts/node_modules/ts-node/dist/util.js.map +0 -1
  250. package/template-react-ts/node_modules/ts-node/dist-raw/NODE-LICENSE.md +0 -24
  251. package/template-react-ts/node_modules/ts-node/dist-raw/README.md +0 -36
  252. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-constants.js +0 -4
  253. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-errors.js +0 -82
  254. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js +0 -89
  255. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js +0 -593
  256. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js +0 -106
  257. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js +0 -962
  258. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js +0 -44
  259. package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-repl-await.js +0 -254
  260. package/template-react-ts/node_modules/ts-node/dist-raw/node-internalBinding-fs.js +0 -58
  261. package/template-react-ts/node_modules/ts-node/dist-raw/node-nativemodule.js +0 -9
  262. package/template-react-ts/node_modules/ts-node/dist-raw/node-options.js +0 -103
  263. package/template-react-ts/node_modules/ts-node/dist-raw/node-primordials.js +0 -37
  264. package/template-react-ts/node_modules/ts-node/dist-raw/runmain-hack.js +0 -9
  265. package/template-react-ts/node_modules/ts-node/esm/transpile-only.mjs +0 -8
  266. package/template-react-ts/node_modules/ts-node/esm.mjs +0 -8
  267. package/template-react-ts/node_modules/ts-node/node10/tsconfig.json +0 -3
  268. package/template-react-ts/node_modules/ts-node/node12/tsconfig.json +0 -3
  269. package/template-react-ts/node_modules/ts-node/node14/tsconfig.json +0 -3
  270. package/template-react-ts/node_modules/ts-node/node16/tsconfig.json +0 -3
  271. package/template-react-ts/node_modules/ts-node/package.json +0 -182
  272. package/template-react-ts/node_modules/ts-node/register/files.js +0 -3
  273. package/template-react-ts/node_modules/ts-node/register/index.js +0 -1
  274. package/template-react-ts/node_modules/ts-node/register/transpile-only.js +0 -3
  275. package/template-react-ts/node_modules/ts-node/register/type-check.js +0 -3
  276. package/template-react-ts/node_modules/ts-node/transpilers/swc-experimental.js +0 -1
  277. package/template-react-ts/node_modules/ts-node/transpilers/swc.js +0 -1
  278. package/template-react-ts/node_modules/ts-node/tsconfig.schema.json +0 -183
  279. package/template-react-ts/node_modules/ts-node/tsconfig.schemastore-schema.json +0 -1326
@@ -1,321 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEmitScriptTarget = exports.getUseDefineForClassFields = exports.getPatternFromSpec = exports.createTsInternals = void 0;
4
- const path_1 = require("path");
5
- const util_1 = require("./util");
6
- /** @internal */
7
- exports.createTsInternals = (0, util_1.cachedLookup)(createTsInternalsUncached);
8
- /**
9
- * Given a reference to the TS compiler, return some TS internal functions that we
10
- * could not or did not want to grab off the `ts` object.
11
- * These have been copy-pasted from TS's source and tweaked as necessary.
12
- *
13
- * NOTE: This factory returns *only* functions which need a reference to the TS
14
- * compiler. Other functions do not need a reference to the TS compiler so are
15
- * exported directly from this file.
16
- */
17
- function createTsInternalsUncached(_ts) {
18
- const ts = _ts;
19
- /**
20
- * Copied from:
21
- * https://github.com/microsoft/TypeScript/blob/v4.3.2/src/compiler/commandLineParser.ts#L2821-L2846
22
- */
23
- function getExtendsConfigPath(extendedConfig, host, basePath, errors, createDiagnostic) {
24
- extendedConfig = (0, util_1.normalizeSlashes)(extendedConfig);
25
- if (isRootedDiskPath(extendedConfig) ||
26
- startsWith(extendedConfig, './') ||
27
- startsWith(extendedConfig, '../')) {
28
- let extendedConfigPath = getNormalizedAbsolutePath(extendedConfig, basePath);
29
- if (!host.fileExists(extendedConfigPath) &&
30
- !endsWith(extendedConfigPath, ts.Extension.Json)) {
31
- extendedConfigPath = `${extendedConfigPath}.json`;
32
- if (!host.fileExists(extendedConfigPath)) {
33
- errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
34
- return undefined;
35
- }
36
- }
37
- return extendedConfigPath;
38
- }
39
- // If the path isn't a rooted or relative path, resolve like a module
40
- const tsGte5_3_0 = (0, util_1.versionGteLt)(ts.version, '5.3.0');
41
- const resolved = ts.nodeModuleNameResolver(extendedConfig, combinePaths(basePath, 'tsconfig.json'), { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host,
42
- /*cache*/ undefined,
43
- /*projectRefs*/ undefined,
44
- /*conditionsOrIsConfigLookup*/ tsGte5_3_0 ? undefined : true,
45
- /*isConfigLookup*/ tsGte5_3_0 ? true : undefined);
46
- if (resolved.resolvedModule) {
47
- return resolved.resolvedModule.resolvedFileName;
48
- }
49
- errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
50
- return undefined;
51
- }
52
- return { getExtendsConfigPath };
53
- }
54
- // These functions have alternative implementation to avoid copying too much from TS
55
- function isRootedDiskPath(path) {
56
- return (0, path_1.isAbsolute)(path);
57
- }
58
- function combinePaths(path, ...paths) {
59
- return (0, util_1.normalizeSlashes)((0, path_1.resolve)(path, ...paths.filter((path) => path)));
60
- }
61
- function getNormalizedAbsolutePath(fileName, currentDirectory) {
62
- return (0, util_1.normalizeSlashes)(currentDirectory != null
63
- ? (0, path_1.resolve)(currentDirectory, fileName)
64
- : (0, path_1.resolve)(fileName));
65
- }
66
- function startsWith(str, prefix) {
67
- return str.lastIndexOf(prefix, 0) === 0;
68
- }
69
- function endsWith(str, suffix) {
70
- const expectedPos = str.length - suffix.length;
71
- return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
72
- }
73
- // Reserved characters, forces escaping of any non-word (or digit), non-whitespace character.
74
- // It may be inefficient (we could just match (/[-[\]{}()*+?.,\\^$|#\s]/g), but this is future
75
- // proof.
76
- const reservedCharacterPattern = /[^\w\s\/]/g;
77
- /**
78
- * @internal
79
- * See also: getRegularExpressionForWildcard, which seems to do almost the same thing
80
- */
81
- function getPatternFromSpec(spec, basePath) {
82
- const pattern = spec && getSubPatternFromSpec(spec, basePath, excludeMatcher);
83
- return pattern && `^(${pattern})${'($|/)'}`;
84
- }
85
- exports.getPatternFromSpec = getPatternFromSpec;
86
- function getSubPatternFromSpec(spec, basePath, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter, }) {
87
- let subpattern = '';
88
- let hasWrittenComponent = false;
89
- const components = getNormalizedPathComponents(spec, basePath);
90
- const lastComponent = last(components);
91
- // getNormalizedPathComponents includes the separator for the root component.
92
- // We need to remove to create our regex correctly.
93
- components[0] = removeTrailingDirectorySeparator(components[0]);
94
- if (isImplicitGlob(lastComponent)) {
95
- components.push('**', '*');
96
- }
97
- let optionalCount = 0;
98
- for (let component of components) {
99
- if (component === '**') {
100
- subpattern += doubleAsteriskRegexFragment;
101
- }
102
- else {
103
- if (hasWrittenComponent) {
104
- subpattern += directorySeparator;
105
- }
106
- subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter);
107
- }
108
- hasWrittenComponent = true;
109
- }
110
- while (optionalCount > 0) {
111
- subpattern += ')?';
112
- optionalCount--;
113
- }
114
- return subpattern;
115
- }
116
- const directoriesMatcher = {
117
- singleAsteriskRegexFragment: '[^/]*',
118
- /**
119
- * Regex for the ** wildcard. Matches any num of subdirectories. When used for including
120
- * files or directories, does not match subdirectories that start with a . character
121
- */
122
- doubleAsteriskRegexFragment: `(/[^/.][^/]*)*?`,
123
- replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment),
124
- };
125
- const excludeMatcher = {
126
- singleAsteriskRegexFragment: '[^/]*',
127
- doubleAsteriskRegexFragment: '(/.+?)?',
128
- replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment),
129
- };
130
- function getNormalizedPathComponents(path, currentDirectory) {
131
- return reducePathComponents(getPathComponents(path, currentDirectory));
132
- }
133
- function getPathComponents(path, currentDirectory = '') {
134
- path = combinePaths(currentDirectory, path);
135
- return pathComponents(path, getRootLength(path));
136
- }
137
- function reducePathComponents(components) {
138
- if (!some(components))
139
- return [];
140
- const reduced = [components[0]];
141
- for (let i = 1; i < components.length; i++) {
142
- const component = components[i];
143
- if (!component)
144
- continue;
145
- if (component === '.')
146
- continue;
147
- if (component === '..') {
148
- if (reduced.length > 1) {
149
- if (reduced[reduced.length - 1] !== '..') {
150
- reduced.pop();
151
- continue;
152
- }
153
- }
154
- else if (reduced[0])
155
- continue;
156
- }
157
- reduced.push(component);
158
- }
159
- return reduced;
160
- }
161
- function getRootLength(path) {
162
- const rootLength = getEncodedRootLength(path);
163
- return rootLength < 0 ? ~rootLength : rootLength;
164
- }
165
- function getEncodedRootLength(path) {
166
- if (!path)
167
- return 0;
168
- const ch0 = path.charCodeAt(0);
169
- // POSIX or UNC
170
- if (ch0 === 47 /* CharacterCodes.slash */ || ch0 === 92 /* CharacterCodes.backslash */) {
171
- if (path.charCodeAt(1) !== ch0)
172
- return 1; // POSIX: "/" (or non-normalized "\")
173
- const p1 = path.indexOf(ch0 === 47 /* CharacterCodes.slash */ ? directorySeparator : altDirectorySeparator, 2);
174
- if (p1 < 0)
175
- return path.length; // UNC: "//server" or "\\server"
176
- return p1 + 1; // UNC: "//server/" or "\\server\"
177
- }
178
- // DOS
179
- if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* CharacterCodes.colon */) {
180
- const ch2 = path.charCodeAt(2);
181
- if (ch2 === 47 /* CharacterCodes.slash */ || ch2 === 92 /* CharacterCodes.backslash */)
182
- return 3; // DOS: "c:/" or "c:\"
183
- if (path.length === 2)
184
- return 2; // DOS: "c:" (but not "c:d")
185
- }
186
- // URL
187
- const schemeEnd = path.indexOf(urlSchemeSeparator);
188
- if (schemeEnd !== -1) {
189
- const authorityStart = schemeEnd + urlSchemeSeparator.length;
190
- const authorityEnd = path.indexOf(directorySeparator, authorityStart);
191
- if (authorityEnd !== -1) {
192
- // URL: "file:///", "file://server/", "file://server/path"
193
- // For local "file" URLs, include the leading DOS volume (if present).
194
- // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a
195
- // special case interpreted as "the machine from which the URL is being interpreted".
196
- const scheme = path.slice(0, schemeEnd);
197
- const authority = path.slice(authorityStart, authorityEnd);
198
- if (scheme === 'file' &&
199
- (authority === '' || authority === 'localhost') &&
200
- isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {
201
- const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
202
- if (volumeSeparatorEnd !== -1) {
203
- if (path.charCodeAt(volumeSeparatorEnd) === 47 /* CharacterCodes.slash */) {
204
- // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/"
205
- return ~(volumeSeparatorEnd + 1);
206
- }
207
- if (volumeSeparatorEnd === path.length) {
208
- // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a"
209
- // but not "file:///c:d" or "file:///c%3ad"
210
- return ~volumeSeparatorEnd;
211
- }
212
- }
213
- }
214
- return ~(authorityEnd + 1); // URL: "file://server/", "http://server/"
215
- }
216
- return ~path.length; // URL: "file://server", "http://server"
217
- }
218
- // relative
219
- return 0;
220
- }
221
- function ensureTrailingDirectorySeparator(path) {
222
- if (!hasTrailingDirectorySeparator(path)) {
223
- return path + directorySeparator;
224
- }
225
- return path;
226
- }
227
- function hasTrailingDirectorySeparator(path) {
228
- return (path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)));
229
- }
230
- function isAnyDirectorySeparator(charCode) {
231
- return (charCode === 47 /* CharacterCodes.slash */ || charCode === 92 /* CharacterCodes.backslash */);
232
- }
233
- function removeTrailingDirectorySeparator(path) {
234
- if (hasTrailingDirectorySeparator(path)) {
235
- return path.substr(0, path.length - 1);
236
- }
237
- return path;
238
- }
239
- const directorySeparator = '/';
240
- const altDirectorySeparator = '\\';
241
- const urlSchemeSeparator = '://';
242
- function isVolumeCharacter(charCode) {
243
- return ((charCode >= 97 /* CharacterCodes.a */ && charCode <= 122 /* CharacterCodes.z */) ||
244
- (charCode >= 65 /* CharacterCodes.A */ && charCode <= 90 /* CharacterCodes.Z */));
245
- }
246
- function getFileUrlVolumeSeparatorEnd(url, start) {
247
- const ch0 = url.charCodeAt(start);
248
- if (ch0 === 58 /* CharacterCodes.colon */)
249
- return start + 1;
250
- if (ch0 === 37 /* CharacterCodes.percent */ &&
251
- url.charCodeAt(start + 1) === 51 /* CharacterCodes._3 */) {
252
- const ch2 = url.charCodeAt(start + 2);
253
- if (ch2 === 97 /* CharacterCodes.a */ || ch2 === 65 /* CharacterCodes.A */)
254
- return start + 3;
255
- }
256
- return -1;
257
- }
258
- function some(array, predicate) {
259
- if (array) {
260
- if (predicate) {
261
- for (const v of array) {
262
- if (predicate(v)) {
263
- return true;
264
- }
265
- }
266
- }
267
- else {
268
- return array.length > 0;
269
- }
270
- }
271
- return false;
272
- }
273
- function pathComponents(path, rootLength) {
274
- const root = path.substring(0, rootLength);
275
- const rest = path.substring(rootLength).split(directorySeparator);
276
- if (rest.length && !lastOrUndefined(rest))
277
- rest.pop();
278
- return [root, ...rest];
279
- }
280
- function lastOrUndefined(array) {
281
- return array.length === 0 ? undefined : array[array.length - 1];
282
- }
283
- function last(array) {
284
- // Debug.assert(array.length !== 0);
285
- return array[array.length - 1];
286
- }
287
- function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
288
- return match === '*'
289
- ? singleAsteriskRegexFragment
290
- : match === '?'
291
- ? '[^/]'
292
- : '\\' + match;
293
- }
294
- /**
295
- * An "includes" path "foo" is implicitly a glob "foo/** /*" (without the space) if its last component has no extension,
296
- * and does not contain any glob characters itself.
297
- */
298
- function isImplicitGlob(lastPathComponent) {
299
- return !/[.*?]/.test(lastPathComponent);
300
- }
301
- const ts_ScriptTarget_ES5 = 1;
302
- const ts_ScriptTarget_ES2022 = 9;
303
- const ts_ScriptTarget_ESNext = 99;
304
- const ts_ModuleKind_Node16 = 100;
305
- const ts_ModuleKind_NodeNext = 199;
306
- // https://github.com/microsoft/TypeScript/blob/fc418a2e611c88cf9afa0115ff73490b2397d311/src/compiler/utilities.ts#L8761
307
- function getUseDefineForClassFields(compilerOptions) {
308
- return compilerOptions.useDefineForClassFields === undefined
309
- ? getEmitScriptTarget(compilerOptions) >= ts_ScriptTarget_ES2022
310
- : compilerOptions.useDefineForClassFields;
311
- }
312
- exports.getUseDefineForClassFields = getUseDefineForClassFields;
313
- // https://github.com/microsoft/TypeScript/blob/fc418a2e611c88cf9afa0115ff73490b2397d311/src/compiler/utilities.ts#L8556
314
- function getEmitScriptTarget(compilerOptions) {
315
- var _a;
316
- return ((_a = compilerOptions.target) !== null && _a !== void 0 ? _a : ((compilerOptions.module === ts_ModuleKind_Node16 && ts_ScriptTarget_ES2022) ||
317
- (compilerOptions.module === ts_ModuleKind_NodeNext && ts_ScriptTarget_ESNext) ||
318
- ts_ScriptTarget_ES5));
319
- }
320
- exports.getEmitScriptTarget = getEmitScriptTarget;
321
- //# sourceMappingURL=ts-internals.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ts-internals.js","sourceRoot":"","sources":["../src/ts-internals.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAC3C,iCAAsE;AAItE,gBAAgB;AACH,QAAA,iBAAiB,GAAG,IAAA,mBAAY,EAAC,yBAAyB,CAAC,CAAC;AACzE;;;;;;;;GAQG;AACH,SAAS,yBAAyB,CAAC,GAAa;IAC9C,MAAM,EAAE,GAAG,GAA4B,CAAC;IACxC;;;OAGG;IACH,SAAS,oBAAoB,CAC3B,cAAsB,EACtB,IAAyB,EACzB,QAAgB,EAChB,MAAgC,EAChC,gBAGmB;QAEnB,cAAc,GAAG,IAAA,uBAAgB,EAAC,cAAc,CAAC,CAAC;QAClD,IACE,gBAAgB,CAAC,cAAc,CAAC;YAChC,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC;YAChC,UAAU,CAAC,cAAc,EAAE,KAAK,CAAC,E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AC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC;AACD,SAAS,wBAAwB,CAC/B,KAAa,EACb,2BAAmC;IAEnC,OAAO,KAAK,KAAK,GAAG;QAClB,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,KAAK,KAAK,GAAG;YACf,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC;AACnB,CAAC;AACD;;;GAGG;AACH,SAAS,cAAc,CAAC,iBAAyB;IAC/C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AACnC,wHAAwH;AACxH,SAAgB,0BAA0B,CAAC,eAAoC;IAC7E,OAAO,eAAe,CAAC,uBAAuB,KAAK,SAAS;QAC1D,CAAC,CAAC,mBAAmB,CAAC,eAAe,CAAC,IAAI,sBAAsB;QAChE,CAAC,CAAC,eAAe,CAAC,uBAAuB,CAAC;AAC9C,CAAC;AAJD,gEAIC;AAED,wHAAwH;AACxH,SAAgB,mBAAmB,CAAC,eAGnC;;IACC,OAAO,CACL,MAAA,eAAe,CAAC,MAAM,mCACtB,CAAC,CAAC,eAAe,CAAC,MAAM,KAAK,oBAAoB,IAAI,sBAAsB,CAAC;QAC1E,CAAC,eAAe,CAAC,MAAM,KAAK,sBAAsB,IAAI,sBAAsB,CAAC;QAC7E,mBAAmB,CAAC,CACvB,CAAC;AACJ,CAAC;AAVD,kDAUC","sourcesContent":["import { isAbsolute, resolve } from 'path';\nimport { cachedLookup, normalizeSlashes, versionGteLt } from './util';\nimport type * as _ts from 'typescript';\nimport type { TSCommon, TSInternal } from './ts-compiler-types';\n\n/** @internal */\nexport const createTsInternals = cachedLookup(createTsInternalsUncached);\n/**\n * Given a reference to the TS compiler, return some TS internal functions that we\n * could not or did not want to grab off the `ts` object.\n * These have been copy-pasted from TS's source and tweaked as necessary.\n *\n * NOTE: This factory returns *only* functions which need a reference to the TS\n * compiler. Other functions do not need a reference to the TS compiler so are\n * exported directly from this file.\n */\nfunction createTsInternalsUncached(_ts: TSCommon) {\n const ts = _ts as TSCommon & TSInternal;\n /**\n * Copied from:\n * https://github.com/microsoft/TypeScript/blob/v4.3.2/src/compiler/commandLineParser.ts#L2821-L2846\n */\n function getExtendsConfigPath(\n extendedConfig: string,\n host: _ts.ParseConfigHost,\n basePath: string,\n errors: _ts.Push<_ts.Diagnostic>,\n createDiagnostic: (\n message: _ts.DiagnosticMessage,\n arg1?: string\n ) => _ts.Diagnostic\n ) {\n extendedConfig = normalizeSlashes(extendedConfig);\n if (\n isRootedDiskPath(extendedConfig) ||\n startsWith(extendedConfig, './') ||\n startsWith(extendedConfig, '../')\n ) {\n let extendedConfigPath = getNormalizedAbsolutePath(\n extendedConfig,\n basePath\n );\n if (\n !host.fileExists(extendedConfigPath) &&\n !endsWith(extendedConfigPath, ts.Extension.Json)\n ) {\n extendedConfigPath = `${extendedConfigPath}.json`;\n if (!host.fileExists(extendedConfigPath)) {\n errors.push(\n createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig)\n );\n return undefined;\n }\n }\n return extendedConfigPath;\n }\n // If the path isn't a rooted or relative path, resolve like a module\n const tsGte5_3_0 = versionGteLt(ts.version, '5.3.0');\n const resolved = ts.nodeModuleNameResolver(\n extendedConfig,\n combinePaths(basePath, 'tsconfig.json'),\n { moduleResolution: ts.ModuleResolutionKind.NodeJs },\n host,\n /*cache*/ undefined,\n /*projectRefs*/ undefined,\n /*conditionsOrIsConfigLookup*/ tsGte5_3_0 ? undefined : true,\n /*isConfigLookup*/ tsGte5_3_0 ? true : undefined\n );\n if (resolved.resolvedModule) {\n return resolved.resolvedModule.resolvedFileName;\n }\n errors.push(\n createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig)\n );\n return undefined;\n }\n\n return { getExtendsConfigPath };\n}\n\n// These functions have alternative implementation to avoid copying too much from TS\nfunction isRootedDiskPath(path: string) {\n return isAbsolute(path);\n}\nfunction combinePaths(path: string, ...paths: (string | undefined)[]): string {\n return normalizeSlashes(\n resolve(path, ...(paths.filter((path) => path) as string[]))\n );\n}\nfunction getNormalizedAbsolutePath(\n fileName: string,\n currentDirectory: string | undefined\n) {\n return normalizeSlashes(\n currentDirectory != null\n ? resolve(currentDirectory!, fileName)\n : resolve(fileName)\n );\n}\n\nfunction startsWith(str: string, prefix: string): boolean {\n return str.lastIndexOf(prefix, 0) === 0;\n}\n\nfunction endsWith(str: string, suffix: string): boolean {\n const expectedPos = str.length - suffix.length;\n return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;\n}\n// Reserved characters, forces escaping of any non-word (or digit), non-whitespace character.\n// It may be inefficient (we could just match (/[-[\\]{}()*+?.,\\\\^$|#\\s]/g), but this is future\n// proof.\nconst reservedCharacterPattern = /[^\\w\\s\\/]/g;\n\n/**\n * @internal\n * See also: getRegularExpressionForWildcard, which seems to do almost the same thing\n */\nexport function getPatternFromSpec(spec: string, basePath: string) {\n const pattern = spec && getSubPatternFromSpec(spec, basePath, excludeMatcher);\n return pattern && `^(${pattern})${'($|/)'}`;\n}\nfunction getSubPatternFromSpec(\n spec: string,\n basePath: string,\n {\n singleAsteriskRegexFragment,\n doubleAsteriskRegexFragment,\n replaceWildcardCharacter,\n }: WildcardMatcher\n): string {\n let subpattern = '';\n let hasWrittenComponent = false;\n const components = getNormalizedPathComponents(spec, basePath);\n const lastComponent = last(components);\n\n // getNormalizedPathComponents includes the separator for the root component.\n // We need to remove to create our regex correctly.\n components[0] = removeTrailingDirectorySeparator(components[0]);\n\n if (isImplicitGlob(lastComponent)) {\n components.push('**', '*');\n }\n\n let optionalCount = 0;\n for (let component of components) {\n if (component === '**') {\n subpattern += doubleAsteriskRegexFragment;\n } else {\n if (hasWrittenComponent) {\n subpattern += directorySeparator;\n }\n subpattern += component.replace(\n reservedCharacterPattern,\n replaceWildcardCharacter\n );\n }\n\n hasWrittenComponent = true;\n }\n\n while (optionalCount > 0) {\n subpattern += ')?';\n optionalCount--;\n }\n\n return subpattern;\n}\ninterface WildcardMatcher {\n singleAsteriskRegexFragment: string;\n doubleAsteriskRegexFragment: string;\n replaceWildcardCharacter: (match: string) => string;\n}\nconst directoriesMatcher: WildcardMatcher = {\n singleAsteriskRegexFragment: '[^/]*',\n /**\n * Regex for the ** wildcard. Matches any num of subdirectories. When used for including\n * files or directories, does not match subdirectories that start with a . character\n */\n doubleAsteriskRegexFragment: `(/[^/.][^/]*)*?`,\n replaceWildcardCharacter: (match) =>\n replaceWildcardCharacter(\n match,\n directoriesMatcher.singleAsteriskRegexFragment\n ),\n};\nconst excludeMatcher: WildcardMatcher = {\n singleAsteriskRegexFragment: '[^/]*',\n doubleAsteriskRegexFragment: '(/.+?)?',\n replaceWildcardCharacter: (match) =>\n replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment),\n};\nfunction getNormalizedPathComponents(\n path: string,\n currentDirectory: string | undefined\n) {\n return reducePathComponents(getPathComponents(path, currentDirectory));\n}\nfunction getPathComponents(path: string, currentDirectory = '') {\n path = combinePaths(currentDirectory, path);\n return pathComponents(path, getRootLength(path));\n}\nfunction reducePathComponents(components: readonly string[]) {\n if (!some(components)) return [];\n const reduced = [components[0]];\n for (let i = 1; i < components.length; i++) {\n const component = components[i];\n if (!component) continue;\n if (component === '.') continue;\n if (component === '..') {\n if (reduced.length > 1) {\n if (reduced[reduced.length - 1] !== '..') {\n reduced.pop();\n continue;\n }\n } else if (reduced[0]) continue;\n }\n reduced.push(component);\n }\n return reduced;\n}\nfunction getRootLength(path: string) {\n const rootLength = getEncodedRootLength(path);\n return rootLength < 0 ? ~rootLength : rootLength;\n}\nfunction getEncodedRootLength(path: string): number {\n if (!path) return 0;\n const ch0 = path.charCodeAt(0);\n\n // POSIX or UNC\n if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) {\n if (path.charCodeAt(1) !== ch0) return 1; // POSIX: \"/\" (or non-normalized \"\\\")\n\n const p1 = path.indexOf(\n ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator,\n 2\n );\n if (p1 < 0) return path.length; // UNC: \"//server\" or \"\\\\server\"\n\n return p1 + 1; // UNC: \"//server/\" or \"\\\\server\\\"\n }\n\n // DOS\n if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) {\n const ch2 = path.charCodeAt(2);\n if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash)\n return 3; // DOS: \"c:/\" or \"c:\\\"\n if (path.length === 2) return 2; // DOS: \"c:\" (but not \"c:d\")\n }\n\n // URL\n const schemeEnd = path.indexOf(urlSchemeSeparator);\n if (schemeEnd !== -1) {\n const authorityStart = schemeEnd + urlSchemeSeparator.length;\n const authorityEnd = path.indexOf(directorySeparator, authorityStart);\n if (authorityEnd !== -1) {\n // URL: \"file:///\", \"file://server/\", \"file://server/path\"\n // For local \"file\" URLs, include the leading DOS volume (if present).\n // Per https://www.ietf.org/rfc/rfc1738.txt, a host of \"\" or \"localhost\" is a\n // special case interpreted as \"the machine from which the URL is being interpreted\".\n const scheme = path.slice(0, schemeEnd);\n const authority = path.slice(authorityStart, authorityEnd);\n if (\n scheme === 'file' &&\n (authority === '' || authority === 'localhost') &&\n isVolumeCharacter(path.charCodeAt(authorityEnd + 1))\n ) {\n const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(\n path,\n authorityEnd + 2\n );\n if (volumeSeparatorEnd !== -1) {\n if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) {\n // URL: \"file:///c:/\", \"file://localhost/c:/\", \"file:///c%3a/\", \"file://localhost/c%3a/\"\n return ~(volumeSeparatorEnd + 1);\n }\n if (volumeSeparatorEnd === path.length) {\n // URL: \"file:///c:\", \"file://localhost/c:\", \"file:///c$3a\", \"file://localhost/c%3a\"\n // but not \"file:///c:d\" or \"file:///c%3ad\"\n return ~volumeSeparatorEnd;\n }\n }\n }\n return ~(authorityEnd + 1); // URL: \"file://server/\", \"http://server/\"\n }\n return ~path.length; // URL: \"file://server\", \"http://server\"\n }\n\n // relative\n return 0;\n}\nfunction ensureTrailingDirectorySeparator(path: string) {\n if (!hasTrailingDirectorySeparator(path)) {\n return path + directorySeparator;\n }\n\n return path;\n}\nfunction hasTrailingDirectorySeparator(path: string) {\n return (\n path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1))\n );\n}\nfunction isAnyDirectorySeparator(charCode: number): boolean {\n return (\n charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash\n );\n}\nfunction removeTrailingDirectorySeparator(path: string) {\n if (hasTrailingDirectorySeparator(path)) {\n return path.substr(0, path.length - 1);\n }\n\n return path;\n}\nconst directorySeparator = '/';\nconst altDirectorySeparator = '\\\\';\nconst urlSchemeSeparator = '://';\nfunction isVolumeCharacter(charCode: number) {\n return (\n (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) ||\n (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z)\n );\n}\nfunction getFileUrlVolumeSeparatorEnd(url: string, start: number) {\n const ch0 = url.charCodeAt(start);\n if (ch0 === CharacterCodes.colon) return start + 1;\n if (\n ch0 === CharacterCodes.percent &&\n url.charCodeAt(start + 1) === CharacterCodes._3\n ) {\n const ch2 = url.charCodeAt(start + 2);\n if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3;\n }\n return -1;\n}\nfunction some<T>(array: readonly T[] | undefined): array is readonly T[];\nfunction some<T>(\n array: readonly T[] | undefined,\n predicate: (value: T) => boolean\n): boolean;\nfunction some<T>(\n array: readonly T[] | undefined,\n predicate?: (value: T) => boolean\n): boolean {\n if (array) {\n if (predicate) {\n for (const v of array) {\n if (predicate(v)) {\n return true;\n }\n }\n } else {\n return array.length > 0;\n }\n }\n return false;\n}\n/* @internal */\nconst enum CharacterCodes {\n _3 = 0x33,\n a = 0x61,\n z = 0x7a,\n A = 0x41,\n Z = 0x5a,\n asterisk = 0x2a, // *\n backslash = 0x5c, // \\\n colon = 0x3a, // :\n percent = 0x25, // %\n question = 0x3f, // ?\n slash = 0x2f, // /\n}\nfunction pathComponents(path: string, rootLength: number) {\n const root = path.substring(0, rootLength);\n const rest = path.substring(rootLength).split(directorySeparator);\n if (rest.length && !lastOrUndefined(rest)) rest.pop();\n return [root, ...rest];\n}\nfunction lastOrUndefined<T>(array: readonly T[]): T | undefined {\n return array.length === 0 ? undefined : array[array.length - 1];\n}\nfunction last<T>(array: readonly T[]): T {\n // Debug.assert(array.length !== 0);\n return array[array.length - 1];\n}\nfunction replaceWildcardCharacter(\n match: string,\n singleAsteriskRegexFragment: string\n) {\n return match === '*'\n ? singleAsteriskRegexFragment\n : match === '?'\n ? '[^/]'\n : '\\\\' + match;\n}\n/**\n * An \"includes\" path \"foo\" is implicitly a glob \"foo/** /*\" (without the space) if its last component has no extension,\n * and does not contain any glob characters itself.\n */\nfunction isImplicitGlob(lastPathComponent: string): boolean {\n return !/[.*?]/.test(lastPathComponent);\n}\n\nconst ts_ScriptTarget_ES5 = 1;\nconst ts_ScriptTarget_ES2022 = 9;\nconst ts_ScriptTarget_ESNext = 99;\nconst ts_ModuleKind_Node16 = 100;\nconst ts_ModuleKind_NodeNext = 199;\n// https://github.com/microsoft/TypeScript/blob/fc418a2e611c88cf9afa0115ff73490b2397d311/src/compiler/utilities.ts#L8761\nexport function getUseDefineForClassFields(compilerOptions: _ts.CompilerOptions): boolean {\n return compilerOptions.useDefineForClassFields === undefined\n ? getEmitScriptTarget(compilerOptions) >= ts_ScriptTarget_ES2022\n : compilerOptions.useDefineForClassFields;\n}\n\n// https://github.com/microsoft/TypeScript/blob/fc418a2e611c88cf9afa0115ff73490b2397d311/src/compiler/utilities.ts#L8556\nexport function getEmitScriptTarget(compilerOptions: {\n module?: _ts.CompilerOptions['module'];\n target?: _ts.CompilerOptions['target'];\n}): _ts.ScriptTarget {\n return (\n compilerOptions.target ??\n ((compilerOptions.module === ts_ModuleKind_Node16 && ts_ScriptTarget_ES2022) ||\n (compilerOptions.module === ts_ModuleKind_NodeNext && ts_ScriptTarget_ESNext) ||\n ts_ScriptTarget_ES5)\n );\n}\n"]}
@@ -1,100 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createTsTranspileModule = void 0;
4
- /** @internal */
5
- function createTsTranspileModule(ts, transpileOptions) {
6
- const { createProgram, createSourceFile, getDefaultCompilerOptions, getImpliedNodeFormatForFile, fixupCompilerOptions, transpileOptionValueCompilerOptions, getNewLineCharacter, fileExtensionIs, normalizePath, Debug, toPath, getSetExternalModuleIndicator, getEntries, addRange, hasProperty, getEmitScriptTarget, getDirectoryPath, } = ts;
7
- const compilerOptionsDiagnostics = [];
8
- const options = transpileOptions.compilerOptions
9
- ? fixupCompilerOptions(transpileOptions.compilerOptions, compilerOptionsDiagnostics)
10
- : {};
11
- // mix in default options
12
- const defaultOptions = getDefaultCompilerOptions();
13
- for (const key in defaultOptions) {
14
- if (hasProperty(defaultOptions, key) && options[key] === undefined) {
15
- options[key] = defaultOptions[key];
16
- }
17
- }
18
- for (const option of transpileOptionValueCompilerOptions) {
19
- options[option.name] = option.transpileOptionValue;
20
- }
21
- // transpileModule does not write anything to disk so there is no need to verify that there are no conflicts between input and output paths.
22
- options.suppressOutputPathCheck = true;
23
- // Filename can be non-ts file.
24
- options.allowNonTsExtensions = true;
25
- const newLine = getNewLineCharacter(options);
26
- // Create a compilerHost object to allow the compiler to read and write files
27
- const compilerHost = {
28
- getSourceFile: (fileName) => fileName === normalizePath(inputFileName) ? sourceFile : undefined,
29
- writeFile: (name, text) => {
30
- if (fileExtensionIs(name, '.map')) {
31
- Debug.assertEqual(sourceMapText, undefined, 'Unexpected multiple source map outputs, file:', name);
32
- sourceMapText = text;
33
- }
34
- else {
35
- Debug.assertEqual(outputText, undefined, 'Unexpected multiple outputs, file:', name);
36
- outputText = text;
37
- }
38
- },
39
- getDefaultLibFileName: () => 'lib.d.ts',
40
- useCaseSensitiveFileNames: () => true,
41
- getCanonicalFileName: (fileName) => fileName,
42
- getCurrentDirectory: () => '',
43
- getNewLine: () => newLine,
44
- fileExists: (fileName) => fileName === inputFileName || fileName === packageJsonFileName,
45
- readFile: (fileName) => fileName === packageJsonFileName ? `{"type": "${_packageJsonType}"}` : '',
46
- directoryExists: () => true,
47
- getDirectories: () => [],
48
- };
49
- let inputFileName;
50
- let packageJsonFileName;
51
- let _packageJsonType;
52
- let sourceFile;
53
- let outputText;
54
- let sourceMapText;
55
- return transpileModule;
56
- function transpileModule(input, transpileOptions2, packageJsonType = 'commonjs') {
57
- // if jsx is specified then treat file as .tsx
58
- inputFileName =
59
- transpileOptions2.fileName ||
60
- (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx
61
- ? 'module.tsx'
62
- : 'module.ts');
63
- packageJsonFileName = getDirectoryPath(inputFileName) + '/package.json';
64
- _packageJsonType = packageJsonType;
65
- sourceFile = createSourceFile(inputFileName, input, {
66
- languageVersion: getEmitScriptTarget(options),
67
- impliedNodeFormat: getImpliedNodeFormatForFile(toPath(inputFileName, '', compilerHost.getCanonicalFileName),
68
- /*cache*/ undefined, compilerHost, options),
69
- setExternalModuleIndicator: getSetExternalModuleIndicator(options),
70
- });
71
- if (transpileOptions2.moduleName) {
72
- sourceFile.moduleName = transpileOptions2.moduleName;
73
- }
74
- if (transpileOptions2.renamedDependencies) {
75
- sourceFile.renamedDependencies = new Map(getEntries(transpileOptions2.renamedDependencies));
76
- }
77
- // Output
78
- outputText = undefined;
79
- sourceMapText = undefined;
80
- const program = createProgram([inputFileName], options, compilerHost);
81
- const diagnostics = compilerOptionsDiagnostics.slice();
82
- if (transpileOptions.reportDiagnostics) {
83
- addRange(
84
- /*to*/ diagnostics,
85
- /*from*/ program.getSyntacticDiagnostics(sourceFile));
86
- addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics());
87
- }
88
- // Emit
89
- program.emit(
90
- /*targetSourceFile*/ undefined,
91
- /*writeFile*/ undefined,
92
- /*cancellationToken*/ undefined,
93
- /*emitOnlyDtsFiles*/ undefined, transpileOptions.transformers);
94
- if (outputText === undefined)
95
- return Debug.fail('Output generation failed');
96
- return { outputText, diagnostics, sourceMapText };
97
- }
98
- }
99
- exports.createTsTranspileModule = createTsTranspileModule;
100
- //# sourceMappingURL=ts-transpile-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ts-transpile-module.js","sourceRoot":"","sources":["../src/ts-transpile-module.ts"],"names":[],"mappings":";;;AAUA,gBAAgB;AAChB,SAAgB,uBAAuB,CACrC,EAAY,EACZ,gBAGC;IAED,MAAM,EACJ,aAAa,EACb,gBAAgB,EAChB,yBAAyB,EACzB,2BAA2B,EAC3B,oBAAoB,EACpB,mCAAmC,EACnC,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,KAAK,EACL,MAAM,EACN,6BAA6B,EAC7B,UAAU,EACV,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,gBAAgB,GACjB,GAAG,EAAS,CAAC;IAEd,MAAM,0BAA0B,GAAiB,EAAE,CAAC;IAEpD,MAAM,OAAO,GAAoB,gBAAgB,CAAC,eAAe;QAC/D,CAAC,CAAC,oBAAoB,CAClB,gBAAgB,CAAC,eAAe,EAChC,0BAA0B,CAC3B;QACH,CAAC,CAAC,EAAE,CAAC;IAEP,yBAAyB;IACzB,MAAM,cAAc,GAAG,yBAAyB,EAAE,CAAC;IACnD,KAAK,MAAM,GAAG,IAAI,cAAc,EAAE;QAChC,IAAI,WAAW,CAAC,cAAc,EAAE,GAAG,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;YAClE,OAAO,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;SACpC;KACF;IAED,KAAK,MAAM,MAAM,IAAI,mCA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CAClD,CAAC;SACH;QAED,SAAS;QACT,UAAU,GAAG,SAAS,CAAC;QACvB,aAAa,GAAG,SAAS,CAAC;QAE1B,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;QAEtE,MAAM,WAAW,GAAG,0BAA0B,CAAC,KAAK,EAAE,CAAC;QAEvD,IAAI,gBAAgB,CAAC,iBAAiB,EAAE;YACtC,QAAQ;YACN,MAAM,CAAC,WAAW;YAClB,QAAQ,CAAC,OAAO,CAAC,uBAAuB,CAAC,UAAU,CAAC,CACrD,CAAC;YACF,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;SACxE;QACD,OAAO;QACP,OAAO,CAAC,IAAI;QACV,oBAAoB,CAAC,SAAS;QAC9B,aAAa,CAAC,SAAS;QACvB,qBAAqB,CAAC,SAAS;QAC/B,oBAAoB,CAAC,SAAS,EAC9B,gBAAgB,CAAC,YAAY,CAC9B,CAAC;QAEF,IAAI,UAAU,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QAE5E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;IACpD,CAAC;AACH,CAAC;AArKD,0DAqKC","sourcesContent":["import type {\n CompilerHost,\n CompilerOptions,\n Diagnostic,\n SourceFile,\n TranspileOptions,\n TranspileOutput,\n} from 'typescript';\nimport type { TSCommon } from './ts-compiler-types';\n\n/** @internal */\nexport function createTsTranspileModule(\n ts: TSCommon,\n transpileOptions: Pick<\n TranspileOptions,\n 'compilerOptions' | 'reportDiagnostics' | 'transformers'\n >\n) {\n const {\n createProgram,\n createSourceFile,\n getDefaultCompilerOptions,\n getImpliedNodeFormatForFile,\n fixupCompilerOptions,\n transpileOptionValueCompilerOptions,\n getNewLineCharacter,\n fileExtensionIs,\n normalizePath,\n Debug,\n toPath,\n getSetExternalModuleIndicator,\n getEntries,\n addRange,\n hasProperty,\n getEmitScriptTarget,\n getDirectoryPath,\n } = ts as any;\n\n const compilerOptionsDiagnostics: Diagnostic[] = [];\n\n const options: CompilerOptions = transpileOptions.compilerOptions\n ? fixupCompilerOptions(\n transpileOptions.compilerOptions,\n compilerOptionsDiagnostics\n )\n : {};\n\n // mix in default options\n const defaultOptions = getDefaultCompilerOptions();\n for (const key in defaultOptions) {\n if (hasProperty(defaultOptions, key) && options[key] === undefined) {\n options[key] = defaultOptions[key];\n }\n }\n\n for (const option of transpileOptionValueCompilerOptions) {\n options[option.name] = option.transpileOptionValue;\n }\n\n // transpileModule does not write anything to disk so there is no need to verify that there are no conflicts between input and output paths.\n options.suppressOutputPathCheck = true;\n\n // Filename can be non-ts file.\n options.allowNonTsExtensions = true;\n\n const newLine = getNewLineCharacter(options);\n // Create a compilerHost object to allow the compiler to read and write files\n const compilerHost: CompilerHost = {\n getSourceFile: (fileName) =>\n fileName === normalizePath(inputFileName) ? sourceFile : undefined,\n writeFile: (name, text) => {\n if (fileExtensionIs(name, '.map')) {\n Debug.assertEqual(\n sourceMapText,\n undefined,\n 'Unexpected multiple source map outputs, file:',\n name\n );\n sourceMapText = text;\n } else {\n Debug.assertEqual(\n outputText,\n undefined,\n 'Unexpected multiple outputs, file:',\n name\n );\n outputText = text;\n }\n },\n getDefaultLibFileName: () => 'lib.d.ts',\n useCaseSensitiveFileNames: () => true,\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: () => '',\n getNewLine: () => newLine,\n fileExists: (fileName): boolean =>\n fileName === inputFileName || fileName === packageJsonFileName,\n readFile: (fileName) =>\n fileName === packageJsonFileName ? `{\"type\": \"${_packageJsonType}\"}` : '',\n directoryExists: () => true,\n getDirectories: () => [],\n };\n\n let inputFileName: string;\n let packageJsonFileName: string;\n let _packageJsonType: 'module' | 'commonjs';\n let sourceFile: SourceFile;\n let outputText: string | undefined;\n let sourceMapText: string | undefined;\n\n return transpileModule;\n\n function transpileModule(\n input: string,\n transpileOptions2: Pick<\n TranspileOptions,\n 'fileName' | 'moduleName' | 'renamedDependencies'\n >,\n packageJsonType: 'module' | 'commonjs' = 'commonjs'\n ): TranspileOutput {\n // if jsx is specified then treat file as .tsx\n inputFileName =\n transpileOptions2.fileName ||\n (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx\n ? 'module.tsx'\n : 'module.ts');\n packageJsonFileName = getDirectoryPath(inputFileName) + '/package.json';\n _packageJsonType = packageJsonType;\n\n sourceFile = createSourceFile(inputFileName, input, {\n languageVersion: getEmitScriptTarget(options),\n impliedNodeFormat: getImpliedNodeFormatForFile(\n toPath(inputFileName, '', compilerHost.getCanonicalFileName),\n /*cache*/ undefined,\n compilerHost,\n options\n ),\n setExternalModuleIndicator: getSetExternalModuleIndicator(options),\n });\n if (transpileOptions2.moduleName) {\n sourceFile.moduleName = transpileOptions2.moduleName;\n }\n\n if (transpileOptions2.renamedDependencies) {\n (sourceFile as any).renamedDependencies = new Map(\n getEntries(transpileOptions2.renamedDependencies)\n );\n }\n\n // Output\n outputText = undefined;\n sourceMapText = undefined;\n\n const program = createProgram([inputFileName], options, compilerHost);\n\n const diagnostics = compilerOptionsDiagnostics.slice();\n\n if (transpileOptions.reportDiagnostics) {\n addRange(\n /*to*/ diagnostics,\n /*from*/ program.getSyntacticDiagnostics(sourceFile)\n );\n addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics());\n }\n // Emit\n program.emit(\n /*targetSourceFile*/ undefined,\n /*writeFile*/ undefined,\n /*cancellationToken*/ undefined,\n /*emitOnlyDtsFiles*/ undefined,\n transpileOptions.transformers\n );\n\n if (outputText === undefined) return Debug.fail('Output generation failed');\n\n return { outputText, diagnostics, sourceMapText };\n }\n}\n"]}
@@ -1,13 +0,0 @@
1
- import type { TsConfigOptions } from './index';
2
- /**
3
- * tsconfig schema which includes "ts-node" options.
4
- * @allOf [{"$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json"}]
5
- */
6
- export interface TsConfigSchema {
7
- /**
8
- * ts-node options. See also: https://typestrong.org/ts-node/docs/configuration
9
- *
10
- * ts-node offers TypeScript execution and REPL for node.js, with source map support.
11
- */
12
- 'ts-node': TsConfigOptions;
13
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=tsconfig-schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tsconfig-schema.js","sourceRoot":"","sources":["../src/tsconfig-schema.ts"],"names":[],"mappings":"","sourcesContent":["import type { TsConfigOptions } from './index';\n\n/*\n * This interface exists solely for generating a JSON schema for tsconfig.json.\n * We do *not* extend the compiler's tsconfig interface. Instead we handle that\n * on a schema level, via \"allOf\", so we pull in the same schema that VSCode\n * already uses.\n */\n/**\n * tsconfig schema which includes \"ts-node\" options.\n * @allOf [{\"$ref\": \"https://schemastore.azurewebsites.net/schemas/json/tsconfig.json\"}]\n */\nexport interface TsConfigSchema {\n /**\n * ts-node options. See also: https://typestrong.org/ts-node/docs/configuration\n *\n * ts-node offers TypeScript execution and REPL for node.js, with source map support.\n */\n 'ts-node': TsConfigOptions;\n}\n"]}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDefaultTsconfigJsonForNodeVersion = void 0;
4
- const nodeMajor = parseInt(process.versions.node.split('.')[0], 10);
5
- /**
6
- * return parsed JSON of the bundled @tsconfig/bases config appropriate for the
7
- * running version of nodejs
8
- * @internal
9
- */
10
- function getDefaultTsconfigJsonForNodeVersion(ts) {
11
- const tsInternal = ts;
12
- if (nodeMajor >= 16) {
13
- const config = require('@tsconfig/node16/tsconfig.json');
14
- if (configCompatible(config))
15
- return config;
16
- }
17
- if (nodeMajor >= 14) {
18
- const config = require('@tsconfig/node14/tsconfig.json');
19
- if (configCompatible(config))
20
- return config;
21
- }
22
- if (nodeMajor >= 12) {
23
- const config = require('@tsconfig/node12/tsconfig.json');
24
- if (configCompatible(config))
25
- return config;
26
- }
27
- return require('@tsconfig/node10/tsconfig.json');
28
- // Verify that tsconfig target and lib options are compatible with TypeScript compiler
29
- function configCompatible(config) {
30
- return (typeof ts.ScriptTarget[config.compilerOptions.target.toUpperCase()] === 'number' &&
31
- tsInternal.libs &&
32
- config.compilerOptions.lib.every((lib) => tsInternal.libs.includes(lib)));
33
- }
34
- }
35
- exports.getDefaultTsconfigJsonForNodeVersion = getDefaultTsconfigJsonForNodeVersion;
36
- //# sourceMappingURL=tsconfigs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tsconfigs.js","sourceRoot":"","sources":["../src/tsconfigs.ts"],"names":[],"mappings":";;;AAEA,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACpE;;;;GAIG;AACH,SAAgB,oCAAoC,CAAC,EAAY;IAC/D,MAAM,UAAU,GAAG,EAAuB,CAAC;IAC3C,IAAI,SAAS,IAAI,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACzD,IAAI,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;KAC7C;IACD,IAAI,SAAS,IAAI,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACzD,IAAI,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;KAC7C;IACD,IAAI,SAAS,IAAI,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACzD,IAAI,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;KAC7C;IACD,OAAO,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAEjD,sFAAsF;IACtF,SAAS,gBAAgB,CAAC,MAKzB;QACC,OAAO,CACL,OAAQ,EAAE,CAAC,YAAoB,CAC7B,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,EAAE,CAC5C,KAAK,QAAQ;YACd,UAAU,CAAC,IAAI;YACf,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,IAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAC1E,CAAC;IACJ,CAAC;AACH,CAAC;AA/BD,oFA+BC","sourcesContent":["import type { TSCommon, TSInternal } from './ts-compiler-types';\n\nconst nodeMajor = parseInt(process.versions.node.split('.')[0], 10);\n/**\n * return parsed JSON of the bundled @tsconfig/bases config appropriate for the\n * running version of nodejs\n * @internal\n */\nexport function getDefaultTsconfigJsonForNodeVersion(ts: TSCommon): any {\n const tsInternal = ts as any as TSInternal;\n if (nodeMajor >= 16) {\n const config = require('@tsconfig/node16/tsconfig.json');\n if (configCompatible(config)) return config;\n }\n if (nodeMajor >= 14) {\n const config = require('@tsconfig/node14/tsconfig.json');\n if (configCompatible(config)) return config;\n }\n if (nodeMajor >= 12) {\n const config = require('@tsconfig/node12/tsconfig.json');\n if (configCompatible(config)) return config;\n }\n return require('@tsconfig/node10/tsconfig.json');\n\n // Verify that tsconfig target and lib options are compatible with TypeScript compiler\n function configCompatible(config: {\n compilerOptions: {\n lib: string[];\n target: string;\n };\n }) {\n return (\n typeof (ts.ScriptTarget as any)[\n config.compilerOptions.target.toUpperCase()\n ] === 'number' &&\n tsInternal.libs &&\n config.compilerOptions.lib.every((lib) => tsInternal.libs!.includes(lib))\n );\n }\n}\n"]}
@@ -1,4 +0,0 @@
1
- /**
2
- * Cached fs operation wrapper.
3
- */
4
- export declare function cachedLookup<T, R>(fn: (arg: T) => R): (arg: T) => R;