@rife/cli 0.0.6-beta.2 → 0.0.6-beta.21

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 (71) hide show
  1. package/dist/cjs/cli.cjs +25 -0
  2. package/dist/cjs/index.cjs +79 -0
  3. package/dist/cjs/logger.cjs +48 -0
  4. package/dist/cjs/plugin/commander.cjs +66 -0
  5. package/dist/cjs/plugin/config.cjs +109 -0
  6. package/dist/cjs/plugin/index.cjs +79 -0
  7. package/dist/cjs/plugin/package.cjs +71 -0
  8. package/dist/cjs/plugin/release.cjs +129 -0
  9. package/dist/cjs/runner.cjs +141 -0
  10. package/dist/{sync.js → cjs/sync.cjs} +12 -23
  11. package/dist/cjs/util.cjs +67 -0
  12. package/dist/esm/cli.mjs +21 -0
  13. package/dist/esm/index.mjs +6 -0
  14. package/dist/esm/logger.mjs +16 -0
  15. package/dist/esm/plugin/commander.mjs +34 -0
  16. package/dist/esm/plugin/config.mjs +67 -0
  17. package/dist/esm/plugin/index.mjs +6 -0
  18. package/dist/{plugin/package.js → esm/plugin/package.mjs} +10 -13
  19. package/dist/esm/plugin/release.mjs +97 -0
  20. package/dist/esm/runner.mjs +96 -0
  21. package/dist/esm/sync.mjs +46 -0
  22. package/dist/esm/util.mjs +12 -0
  23. package/package.json +29 -27
  24. package/src/cli.ts +23 -19
  25. package/src/index.ts +4 -3
  26. package/src/logger.ts +17 -34
  27. package/src/plugin/commander.ts +51 -44
  28. package/src/plugin/config.ts +26 -9
  29. package/src/plugin/index.ts +1 -1
  30. package/src/plugin/package.ts +0 -3
  31. package/src/plugin/release.ts +113 -32
  32. package/src/runner.ts +134 -88
  33. package/src/sync.ts +63 -63
  34. package/src/util.ts +14 -0
  35. package/dist/build.js +0 -3
  36. package/dist/build.js.map +0 -1
  37. package/dist/cli.js +0 -18
  38. package/dist/cli.js.map +0 -1
  39. package/dist/index.js +0 -7
  40. package/dist/index.js.map +0 -1
  41. package/dist/logger.js +0 -26
  42. package/dist/logger.js.map +0 -1
  43. package/dist/plugin/commander.js +0 -42
  44. package/dist/plugin/commander.js.map +0 -1
  45. package/dist/plugin/compiler/compiler.js +0 -166
  46. package/dist/plugin/compiler/compiler.js.map +0 -1
  47. package/dist/plugin/compiler/index.js +0 -83
  48. package/dist/plugin/compiler/index.js.map +0 -1
  49. package/dist/plugin/compiler/swc.js +0 -47
  50. package/dist/plugin/compiler/swc.js.map +0 -1
  51. package/dist/plugin/compiler/tsc.js +0 -75
  52. package/dist/plugin/compiler/tsc.js.map +0 -1
  53. package/dist/plugin/config.js +0 -61
  54. package/dist/plugin/config.js.map +0 -1
  55. package/dist/plugin/index.js +0 -8
  56. package/dist/plugin/index.js.map +0 -1
  57. package/dist/plugin/package.js.map +0 -1
  58. package/dist/plugin/release.js +0 -32
  59. package/dist/plugin/release.js.map +0 -1
  60. package/dist/pnpmfile.js +0 -153
  61. package/dist/runner.js +0 -53
  62. package/dist/runner.js.map +0 -1
  63. package/dist/sync.js.map +0 -1
  64. package/dist/tsconfig.tsbuildinfo +0 -1
  65. package/src/build.ts +0 -0
  66. package/src/plugin/compiler/compiler.ts +0 -198
  67. package/src/plugin/compiler/index.ts +0 -109
  68. package/src/plugin/compiler/swc.ts +0 -55
  69. package/src/plugin/compiler/tsc.ts +0 -101
  70. package/src/pnpmfile.ts +0 -147
  71. package/src/test/pnpmfile.test.ts +0 -223
@@ -1 +0,0 @@
1
- {"fileNames":["../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.d.ts","../src/build.ts","../../../node_modules/.pnpm/tapable@2.2.1/node_modules/tapable/tapable.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/helpers/typealiases.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/helpers/util.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/zoderror.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/locales/en.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/errors.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/helpers/parseutil.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/helpers/enumutil.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/helpers/errorutil.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/helpers/partialutil.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/standard-schema.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/types.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/external.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.d.ts","../../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/index.d.ts","../../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/core.d.cts","../../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/index.d.cts","../src/logger.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.13.1/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/@types+jsonfile@6.1.4/node_modules/@types/jsonfile/index.d.ts","../../../node_modules/.pnpm/@types+jsonfile@6.1.4/node_modules/@types/jsonfile/utils.d.ts","../../../node_modules/.pnpm/@types+fs-extra@11.0.4/node_modules/@types/fs-extra/index.d.ts","../src/runner.ts","../src/plugin/config.ts","../src/plugin/package.ts","../../../node_modules/.pnpm/commander@10.0.1/node_modules/commander/typings/index.d.ts","../src/plugin/commander.ts","../../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/utils.d.cts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/typescript.d.ts","../src/plugin/compiler/swc.ts","../src/plugin/compiler/tsc.ts","../src/plugin/compiler/compiler.ts","../src/plugin/compiler/index.ts","../src/plugin/index.ts","../src/cli.ts","../src/index.ts","../src/sync.ts","../src/plugin/release.ts"],"fileIdsList":[[103,146,159,196,197,198],[103,146,159,189,196],[103,146],[103,143,146],[103,145,146],[146],[103,146,151,181],[103,146,147,152,158,159,166,178,189],[103,146,147,148,158,166],[98,99,100,103,146],[103,146,149,190],[103,146,150,151,159,167],[103,146,151,178,186],[103,146,152,154,158,166],[103,145,146,153],[103,146,154,155],[103,146,158],[103,146,156,158],[103,145,146,158],[103,146,158,159,160,178,189],[103,146,158,159,160,173,178,181],[103,141,146,194],[103,141,146,154,158,161,166,178,189],[103,146,158,159,161,162,166,178,186,189],[103,146,161,163,178,186,189],[101,102,103,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[103,146,158,164],[103,146,165,189],[103,146,154,158,166,178],[103,146,167],[103,146,168],[103,145,146,169],[103,143,144,145,146,147,148,149,150,151,152,153,154,155,156,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[103,146,171],[103,146,172],[103,146,158,173,174],[103,146,173,175,190,192],[103,146,158,178,179,180,181],[103,146,178,180],[103,146,178,179],[103,146,181],[103,146,182],[103,143,146,178],[103,146,158,184,185],[103,146,184,185],[103,146,151,166,178,186],[103,146,187],[103,146,166,188],[103,146,161,172,189],[103,146,151,190],[103,146,178,191],[103,146,165,192],[103,146,193],[103,146,151,158,160,169,178,189,192,194],[103,146,178,195],[95,103,146],[103,113,117,146,189],[103,113,146,178,189],[103,108,146],[103,110,113,146,186,189],[103,146,166,186],[103,146,196],[103,108,146,196],[103,110,113,146,166,189],[103,105,106,109,112,146,158,178,189],[103,113,120,146],[103,105,111,146],[103,113,134,135,146],[103,109,113,146,181,189,196],[103,134,146,196],[103,107,108,146,196],[103,113,146],[103,107,108,109,110,111,112,113,114,115,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,135,136,137,138,139,140,146],[103,113,128,146],[103,113,120,121,146],[103,111,113,121,122,146],[103,112,146],[103,105,108,113,146],[103,113,117,121,122,146],[103,117,146],[103,111,113,116,146,189],[103,105,110,113,120,146],[103,146,178],[103,108,113,134,146,194,196],[93,103,146],[83,84,103,146],[81,82,83,85,86,91,103,146],[82,83,103,146],[92,103,146],[83,103,146],[81,82,83,86,87,88,89,90,103,146],[81,82,93,103,146],[78,103,146],[78,103,146,200,210,211],[78,97,103,146,200,210,211],[78,96,103,146],[78,103,146,200,203,210],[78,103,146,168,200,205,206,207,208,210],[78,80,103,146,147,200,209,210],[78,103,146,209],[78,103,146,147,168,206,209],[78,103,146,168,200,210],[78,103,146,201,202,204,210],[78,80,103,146,147,168,200,210],[78,80,94,97,103,146,199]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"e12a46ce14b817d4c9e6b2b478956452330bf00c9801b79de46f7a1815b5bd40","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"bab26767638ab3557de12c900f0b91f710c7dc40ee9793d5a27d32c04f0bf646","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"cd74c8275483d3fe0d07a9b4bba28845a8a611f0aa399e961dbd40e5d46dd9ad","impliedFormat":1},{"version":"d3cfde44f8089768ebb08098c96d01ca260b88bccf238d55eee93f1c620ff5a5","impliedFormat":1},{"version":"b542939a35357458e62f8229c2d7578ae888d63d3ab837395d7bb8a3064c205e","impliedFormat":1},{"version":"3a5af4fba7b27b815bb40f52715aedebaa4b371da3e5a664e7e0798c9b638825","impliedFormat":1},{"version":"8485b6da53ec35637d072e516631d25dae53984500de70a6989058f24354666f","impliedFormat":1},{"version":"ebe80346928736532e4a822154eb77f57ef3389dbe2b3ba4e571366a15448ef2","impliedFormat":1},{"version":"49c632082dc8a916353288d3d8b2dc82b3471794249a381d090d960c8ceac908","impliedFormat":1},{"version":"f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","impliedFormat":1},{"version":"71addb585c2db7b8e53dc1b0bcfa58c6c67c6e4fa2b968942046749d66f82e7e","impliedFormat":1},{"version":"c76b0c5727302341d0bdfa2cc2cee4b19ff185b554edb6e8543f0661d8487116","impliedFormat":1},{"version":"25b3f581e12ede11e5739f57a86e8668fbc0124f6649506def306cad2c59d262","impliedFormat":1},{"version":"0320c5b275beb43649be5a818dfa83a2586ae110ac5bbb2c5eb7184e1fe3ca60","impliedFormat":1},{"version":"f5ef066942e4f0bd98200aa6a6694b831e73200c9b3ade77ad0aa2409e8fe1b1","impliedFormat":1},{"version":"b9e99cd94f4166a245f5158f7286c05406e2a4c694619bceb7a4f3519d1d768e","impliedFormat":1},{"version":"5568d7c32e5cf5f35e092649f4e5e168c3114c800b1d7545b7ae5e0415704802","impliedFormat":1},{"version":"1c20c07324915c372d074a627114144edbb43df6f20431df5ccb06aec2c42e3a","impliedFormat":1},{"version":"37979842078c1c99f18bfcb41e0df679b9d949ca9db5823bbc3114bff6f25cc3","impliedFormat":1},{"version":"ee7ede794db8259d2a1ad73b139926ccd21a08ef90d32a8e8d56d30a5f82e5d8","signature":"b04fc18969945d3a73aa07a6e45c3a2e7d9df7070228624c392cc22348076fdd","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"13af9e8fb6757946c48117315866177b95e554d1e773577bb6ca6e40083b6d73","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"d2bc987ae352271d0d615a420dcf98cc886aa16b87fb2b569358c1fe0ca0773d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f550093acc8ad4f64ad1c7e96153615f3351b81919dae5473375b81e1e8f272c","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"86956cc2eb9dd371d6fab493d326a574afedebf76eef3fa7833b8e0d9b52d6f1","affectsGlobalScope":true,"impliedFormat":1},{"version":"19d5f8d3930e9f99aa2c36258bf95abbe5adf7e889e6181872d1cdba7c9a7dd5","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"88bc59b32d0d5b4e5d9632ac38edea23454057e643684c3c0b94511296f2998c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ff5a53a58e756d2661b73ba60ffe274231a4432d21f7a2d0d9e4f6aa99f4283","impliedFormat":1},{"version":"1e289f30a48126935a5d408a91129a13a59c9b0f8c007a816f9f16ef821e144e","impliedFormat":1},{"version":"2ea254f944dfe131df1264d1fb96e4b1f7d110195b21f1f5dbb68fdd394e5518","impliedFormat":1},{"version":"5135bdd72cc05a8192bd2e92f0914d7fc43ee077d1293dc622a049b7035a0afb","impliedFormat":1},{"version":"4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"fcc4b974b1cf7eca347490f11143ab2f5bc3c449b2073eb4d9494f6a16651e75","affectsGlobalScope":true,"impliedFormat":1},{"version":"23459c1915878a7c1e86e8bdb9c187cddd3aea105b8b1dfce512f093c969bc7e","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"1dc73f8854e5c4506131c4d95b3a6c24d0c80336d3758e95110f4c7b5cb16397","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f6f1d54779d0b9ed152b0516b0958cd34889764c1190434bbf18e7a8bb884cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"1cbae62b67f180291d211f0e1045fb923a8ec800cfbf9caa13223d769013dae2","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"92949391eab12082218333a61b9070996f404ad662ff488d48ebb09564963d2b","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","impliedFormat":1},{"version":"5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb094bb347d7df3380299eb69836c2c8758626ecf45917577707c03cf816b6f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"f689c4237b70ae6be5f0e4180e8833f34ace40529d1acc0676ab8fb8f70457d7","impliedFormat":1},{"version":"ae25afbbf1ed5df63a177d67b9048bf7481067f1b8dc9c39212e59db94fc9fc6","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"52a8e7e8a1454b6d1b5ad428efae3870ffc56f2c02d923467f2940c454aa9aec","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1},{"version":"211440ce81e87b3491cdf07155881344b0a61566df6e749acff0be7e8b9d1a07","impliedFormat":1},{"version":"5d9a0b6e6be8dbb259f64037bce02f34692e8c1519f5cd5d467d7fa4490dced4","impliedFormat":1},{"version":"880da0e0f3ebca42f9bd1bc2d3e5e7df33f2619d85f18ee0ed4bd16d1800bc32","impliedFormat":1},{"version":"640527010de6e22a46649df88905a5f5558707bb7a0cc128425f5fdd0a5fb105","signature":"f6842a79f39c2439fc74ce480c8e20b6b5f37d148b74012d096f94374bfe1746","impliedFormat":1},{"version":"052cc26723bf76bb75c29e0c1728474d32a0f5bd2653e3838840096e13618f8f","signature":"3eebd12e27137b361637603df4b7caeb6d8446850c5405ecc2036a539178d79a","impliedFormat":1},{"version":"4884dbcabdc7279e6685dac6796aec2869a3c1002383f636831c0de0b75d5266","signature":"417e112c38dbf839cb3f2e4dc8617920a30a3c6dc7a31d01262b2f68812b531a","impliedFormat":1},{"version":"fe3fd03f6dd87b469b770256897cd1f85e7a259c1a448d80237e47285be0bd2f","impliedFormat":1},{"version":"9584de53984842301e166f6f615bef57c9399122f7e52cac62623cc7e0003a04","signature":"e405238d3cf31513f8453f3180147b2264e33f39b4201a462091c2414b225eca","impliedFormat":1},{"version":"64ba505bb5fea74e9598368153b5d2dafb6888c2698a5b0cef930b28dc257774","impliedFormat":1},{"version":"7f9c8c4fd31e6e0f137ded52f026f97934abcc4624db1c9c8120b91a170798e0","impliedFormat":1},{"version":"97562cc3c30b6a37cd3a21d6adae249bb960dc059a83ea266d54735cfc5eb009","impliedFormat":1},{"version":"abc4694808944e35a3a06749b9f574d7e8617279947bfd42f4ce84a40bfa6f8f","impliedFormat":1},{"version":"a68dcea1680de7dfa7db6bc4417df3296125f7d689afdbc9793b2738eecf418b","signature":"bd22d508cfab8fc7c82cdf2d8feadec164df935b41b393199d1dae62caf848cc","impliedFormat":1},{"version":"da96d31f33667e814cc6a46c2ea12a03f559183486e9621f1f5543515c3121fc","signature":"a2ae22b7cf6dc8e0c81cb501d791241f8fb87d287f07cbfdce100ab75586f2b4","impliedFormat":1},{"version":"2dbdfd2c3bcbc984552e14bffb9842c61464793714252d76a322d5920d24676e","impliedFormat":1},{"version":"9ebcdee2c5c5f3527acfb702b737edafef4995fffb9a971ed613c28327cfd79e","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"840ffa9bebdfc971f8eac49e302a2e0b89264764c8928665e6727da9f94075a1","signature":"2790fdc6dc75448c4209a343262d6dd86ea29910eb91ba8d65cc31da81d44c57","impliedFormat":1},{"version":"8d0cc793a2a65111f206568202408d0131d8e2cb944c2708c03fd8538363bc2c","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"107d26718b77dfca515b3ae0a19f9a360e2907555494121facfe96e6215840ef","signature":"2da6eea82f95962710714a1d3bb621ca3d8409ca75bcbb9bcd2c1c99e0cd1478","impliedFormat":1}],"root":[79,97,[200,202],204,[207,215]],"options":{"allowJs":true,"alwaysStrict":true,"declaration":false,"downlevelIteration":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"jsx":2,"module":100,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"strictPropertyInitialization":false,"target":99,"useUnknownInCatchVariables":false},"referencedMap":[[199,1],[197,2],[198,3],[143,4],[144,4],[145,5],[103,6],[146,7],[147,8],[148,9],[98,3],[101,10],[99,3],[100,3],[149,11],[150,12],[151,13],[152,14],[153,15],[154,16],[155,16],[157,17],[156,18],[158,19],[159,20],[160,21],[142,22],[102,3],[161,23],[162,24],[163,25],[196,26],[164,27],[165,28],[166,29],[167,30],[168,31],[169,32],[170,33],[171,34],[172,35],[173,36],[174,36],[175,37],[176,3],[177,3],[178,38],[180,39],[179,40],[181,41],[182,42],[183,43],[184,44],[185,45],[186,46],[187,47],[188,48],[189,49],[190,50],[191,51],[192,52],[193,53],[194,54],[195,55],[104,3],[203,3],[95,3],[96,56],[205,3],[80,3],[78,3],[76,3],[77,3],[13,3],[15,3],[14,3],[2,3],[16,3],[17,3],[18,3],[19,3],[20,3],[21,3],[22,3],[23,3],[3,3],[24,3],[25,3],[4,3],[26,3],[30,3],[27,3],[28,3],[29,3],[31,3],[32,3],[33,3],[5,3],[34,3],[35,3],[36,3],[37,3],[6,3],[41,3],[38,3],[39,3],[40,3],[42,3],[7,3],[43,3],[48,3],[49,3],[44,3],[45,3],[46,3],[47,3],[8,3],[53,3],[50,3],[51,3],[52,3],[54,3],[9,3],[55,3],[56,3],[57,3],[59,3],[58,3],[60,3],[61,3],[10,3],[62,3],[63,3],[64,3],[11,3],[65,3],[66,3],[67,3],[68,3],[69,3],[1,3],[70,3],[71,3],[12,3],[74,3],[73,3],[72,3],[75,3],[206,3],[120,57],[130,58],[119,57],[140,59],[111,60],[110,61],[139,62],[133,63],[138,64],[113,65],[127,66],[112,67],[136,68],[108,69],[107,62],[137,70],[109,71],[114,72],[115,3],[118,72],[105,3],[141,73],[131,74],[122,75],[123,76],[125,77],[121,78],[124,79],[134,62],[116,80],[117,81],[126,82],[106,83],[129,74],[128,72],[132,3],[135,84],[94,85],[85,86],[92,87],[87,3],[88,3],[86,88],[89,85],[81,3],[82,3],[93,89],[84,90],[90,3],[91,91],[83,92],[79,93],[212,94],[213,95],[97,96],[204,97],[209,98],[210,99],[207,100],[208,101],[201,102],[211,103],[202,104],[215,104],[200,105],[214,93]],"version":"5.7.3"}
package/src/build.ts DELETED
File without changes
@@ -1,198 +0,0 @@
1
- import path from 'path';
2
-
3
- import { colors } from 'consola/utils';
4
- import type * as ts from 'typescript';
5
-
6
- import { swc } from './swc';
7
- import { tsc } from './tsc';
8
- import { Runner } from '../../runner';
9
-
10
- export interface TsxConfig {
11
- /** 默认:swc */
12
- type: 'tsc' | 'swc';
13
-
14
- /** 默认:. */
15
- rootDir: string;
16
-
17
- /** 默认:./dist/ */
18
- outDir: string;
19
-
20
- /** 默认:true */
21
- clean: boolean;
22
-
23
- /** 编译后入口启动文件 */
24
- main?: string;
25
-
26
- options?: any;
27
- }
28
-
29
- const clear = () => {
30
- console.clear();
31
- process.stdout.write('\x1b[3J');
32
- };
33
-
34
- export async function compileTs(
35
- runner: Runner,
36
- tsxConfig: TsxConfig,
37
- { dev, build }: { dev?: boolean; build?: boolean } = { dev: false, build: true },
38
- ) {
39
- const { logger, fs } = runner;
40
- const log = logger.withTag(compileTs.name);
41
- log.debug('tsxConfig %j', tsxConfig);
42
- if (tsxConfig.clean) {
43
- log.info('清空目录 %s', tsxConfig.outDir);
44
- await fs.emptyDir(tsxConfig.outDir);
45
- }
46
- const showProjectName = () => {
47
- clear();
48
- console.log(`${colors.bgBlue(' 项目名称 ')} ${runner.package.name} \n`);
49
- };
50
- if (tsxConfig.type === 'tsc') {
51
- const diagnostics: ts.Diagnostic[] = [];
52
- let perfStart = performance.now();
53
- tsc({
54
- ...tsxConfig,
55
- watch: dev,
56
- onWatchStatusChanged: data => {
57
- switch (data.status) {
58
- case 'startWatch': {
59
- diagnostics.length = 0;
60
- perfStart = performance.now();
61
- break;
62
- }
63
- case 'reCompile': {
64
- diagnostics.length = 0;
65
- perfStart = performance.now();
66
- if (dev) {
67
- // watch 模式下,第二次编译清空一下屏幕
68
- showProjectName();
69
- }
70
- break;
71
- }
72
- case 'error': {
73
- const duration = ((performance.now() - perfStart) / 1000).toFixed(3);
74
- log.error(`类型检查失败,耗时 ${duration} s\n\n%s`, formatDiagnostic(diagnostics));
75
- break;
76
- }
77
- case 'success': {
78
- const duration = ((performance.now() - perfStart) / 1000).toFixed(3);
79
- log.success(`编译成功,耗时 ${duration} s`);
80
- break;
81
- }
82
- default: {
83
- console.log(data);
84
- process.exit(1);
85
- }
86
- }
87
- },
88
- onReportDiagnostic: ({ diagnostic }) => {
89
- diagnostics.push(diagnostic);
90
- },
91
- onEmitDiagnostics: ({ diagnostics }) => {
92
- const duration = ((performance.now() - perfStart) / 1000).toFixed(3);
93
- if (diagnostics.length) {
94
- log.error(`编译失败,耗时 ${duration} s\n\n%s`, formatDiagnostic(diagnostics));
95
- runner.compiler.fail = true;
96
- } else {
97
- log.success(`编译成功,耗时 ${duration} s`);
98
- }
99
- },
100
- });
101
- return;
102
- }
103
- if (tsxConfig.type === 'swc') {
104
- const { promise, resolve } = Promise.withResolvers<void>();
105
- swc({
106
- ...tsxConfig,
107
- watch: dev,
108
- onSuccess: async ({ watch, first, duration }) => {
109
- if (watch && !first) {
110
- // watch 模式下,第二次编译清空一下屏幕
111
- showProjectName();
112
- }
113
- log.success(`编译成功,耗时 ${(duration / 1000).toFixed(3)} s`);
114
- if (dev) {
115
- // 启动文件钩子
116
- runner.compiler.hook.execMain.promise();
117
- }
118
- // 检查类型
119
- await runner.compiler.hook.checkAndEmitType.promise();
120
- resolve();
121
- },
122
- onFail: ({ watch, first, duration, reasons }) => {
123
- if (watch && !first) {
124
- // watch 模式下,第二次编译清空一下屏幕
125
- showProjectName();
126
- }
127
- const message = [...reasons.entries()]
128
- .map(([key, value]) => {
129
- const index = value.indexOf(key);
130
- if (index > -1) {
131
- return value.replace(key, path.resolve(key));
132
- }
133
- return `${value}`;
134
- })
135
- .join('\n');
136
- log.error(`编译失败,耗时 ${(duration / 1000).toFixed(3)} s\n\n%s`, message);
137
- runner.compiler.fail = true;
138
- resolve();
139
- },
140
- });
141
- if (build) {
142
- return promise;
143
- }
144
- return;
145
- }
146
- log.error(`compiler type '${tsxConfig.type}' 不存在`);
147
- process.exit(1);
148
- }
149
-
150
- export function checkAndEmitType() {
151
- const perfStart = performance.now();
152
- const ts: typeof import('typescript') = require('typescript');
153
- const tsConfigPath = path.resolve('tsconfig.json');
154
- // 读取 tsconfig.json 文件
155
- const configFile = ts.readConfigFile(tsConfigPath, ts.sys.readFile);
156
-
157
- // 解析 tsconfig.json 文件
158
- const compilerOptions = ts.parseJsonConfigFileContent(configFile.config, ts.sys, path.dirname(tsConfigPath), {
159
- noEmit: true,
160
- incremental: false,
161
- });
162
- if (compilerOptions.options.declaration === true) {
163
- compilerOptions.options.noEmit = false;
164
- compilerOptions.options.emitDeclarationOnly = true;
165
- }
166
-
167
- // 获取编译器实例
168
- const host = ts.createCompilerHost(compilerOptions.options);
169
- const program = ts.createProgram(compilerOptions.fileNames, compilerOptions.options, host);
170
-
171
- // 执行编译
172
- const emitResult = program.emit();
173
-
174
- // 处理编译结果
175
- const diagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
176
-
177
- const duration = ((performance.now() - perfStart) / 1000).toFixed(3);
178
-
179
- return { diagnostics, duration };
180
- }
181
-
182
- export function formatDiagnostic(diagnostics: readonly ts.Diagnostic[]) {
183
- const ts: typeof import('typescript') = require('typescript');
184
- const { colors }: typeof import('consola/utils') = require('consola/utils');
185
-
186
- return diagnostics
187
- .map(diagnostic => {
188
- const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
189
- if (diagnostic.file) {
190
- const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!);
191
- return `${colors.gray(diagnostic.file.fileName)} ${colors.yellow(`(${line + 1},${character + 1})`)}: ${colors.white(
192
- message,
193
- )}`;
194
- }
195
- return message;
196
- })
197
- .join('\n');
198
- }
@@ -1,109 +0,0 @@
1
- import type { ChildProcess } from 'child_process';
2
-
3
- import { AsyncSeriesHook } from 'tapable';
4
-
5
- import { TsxConfig, checkAndEmitType, compileTs, formatDiagnostic } from './compiler';
6
- import type { Plugin } from '../../runner';
7
-
8
- declare module '../../runner' {
9
- interface Runner {
10
- compiler: {
11
- fail: boolean;
12
- process: ChildProcess | null;
13
- hook: {
14
- checkAndEmitType: AsyncSeriesHook<[]>;
15
- execMain: AsyncSeriesHook<[]>;
16
- };
17
- tsx: TsxConfig;
18
- };
19
- }
20
- }
21
-
22
- export interface pluginCompilerOptions {
23
- tsx?: Partial<TsxConfig>;
24
- less?: {};
25
- }
26
-
27
- export function pluginCompiler(options?: pluginCompilerOptions) {
28
- const plugin: Plugin = {
29
- name: pluginCompiler.name,
30
- apply: runner => {
31
- const { hook, logger, z, tapable } = runner;
32
- const log = logger.withTag(pluginCompiler.name);
33
- const validation = z
34
- .object({
35
- tsx: z
36
- .object({
37
- type: z.enum(['tsc', 'swc']).default('swc'),
38
- rootDir: z.string().trim().min(1).default('.'),
39
- outDir: z.string().trim().min(1).default('./dist/'),
40
- clean: z.boolean().default(true),
41
- main: z.string().trim().optional(),
42
- options: z.object({}).passthrough().optional(),
43
- })
44
- .default({}),
45
- })
46
- .optional()
47
- .default({})
48
- .safeParse(options);
49
-
50
- if (!validation.success) {
51
- log.error('配置错误\n', validation.error.message);
52
- process.exit(1);
53
- }
54
-
55
- runner.compiler = {
56
- fail: false,
57
- process: null,
58
- hook: {
59
- checkAndEmitType: new tapable.AsyncSeriesHook(),
60
- execMain: new tapable.AsyncSeriesHook(),
61
- },
62
- tsx: validation.data.tsx,
63
- };
64
-
65
- hook.dev.tapPromise(pluginCompiler.name, async () => {
66
- const tsxConfig: TsxConfig = validation.data.tsx;
67
- compileTs(runner, tsxConfig, { dev: true });
68
- });
69
-
70
- hook.build.tapPromise(pluginCompiler.name, async () => {
71
- const perfStart = performance.now();
72
- const tsxConfig: TsxConfig = validation.data.tsx;
73
- await compileTs(runner, tsxConfig, { build: true });
74
- const duration = ((performance.now() - perfStart) / 1000).toFixed(3);
75
- if (runner.compiler.fail) {
76
- log.fail(`构建失败,耗时 ${duration} s`);
77
- process.exit(1);
78
- } else {
79
- log.success(`构建成功,耗时 ${duration} s`);
80
- }
81
- });
82
-
83
- runner.compiler.hook.checkAndEmitType.tapPromise(pluginCompiler.name, async () => {
84
- const { diagnostics, duration } = checkAndEmitType();
85
- if (diagnostics.length) {
86
- log.error(`类型检查失败,耗时 ${duration} s\n\n%s`, formatDiagnostic(diagnostics));
87
- runner.compiler.fail = true;
88
- } else {
89
- log.success(`类型检查成功,耗时 ${duration} s`);
90
- }
91
- });
92
-
93
- runner.compiler.hook.execMain.tapPromise(pluginCompiler.name, async () => {
94
- const compiler = runner.compiler;
95
- const { main } = compiler.tsx;
96
- if (!main) {
97
- log.debug('没有指定 main');
98
- return;
99
- }
100
- log.info(`启动文件 node %s`, main);
101
-
102
- const { fork } = require('child_process') as typeof import('child_process');
103
- compiler.process?.kill();
104
- compiler.process = fork(main, { stdio: 'inherit' });
105
- });
106
- },
107
- };
108
- return plugin;
109
- }
@@ -1,55 +0,0 @@
1
- import type { TsxConfig } from './compiler';
2
-
3
- export interface SwcConfig extends TsxConfig {
4
- watch?: boolean;
5
- options?: any;
6
- onSuccess?: (data: { watch: boolean; first: boolean; duration: number }) => any;
7
- onFail?: (data: { watch: boolean; first: boolean; duration: number; reasons: Map<string, string> }) => any;
8
- }
9
-
10
- export async function swc(options: SwcConfig) {
11
- const { watch = false, outDir } = options;
12
- const { swcDir } = require('@swc/cli');
13
-
14
- // https://swc.rs/docs/configuration/swcrc
15
- const swcOptions = {
16
- jsc: {
17
- parser: {
18
- syntax: 'typescript',
19
- },
20
- target: 'esnext',
21
- externalHelpers: true,
22
- },
23
- module: {
24
- type: 'commonjs',
25
- // type: 'es6',
26
- ignoreDynamic: true,
27
- },
28
- sourceMaps: true,
29
- };
30
-
31
- let first = true;
32
-
33
- await swcDir({
34
- cliOptions: {
35
- outDir,
36
- watch,
37
- filenames: ['./src'],
38
- extensions: ['.ts', '.tsx'],
39
- stripLeadingPaths: true,
40
- },
41
- swcOptions,
42
- callbacks: {
43
- onSuccess: ({ duration }: any) => {
44
- options?.onSuccess?.({ watch, first, duration });
45
- first = false;
46
- },
47
- onFail: (e: any) => {
48
- options?.onFail?.({ ...e, watch, first });
49
- // 不退出,下次修复报错后清空屏幕
50
- first = false;
51
- },
52
- onWatchReady: () => {},
53
- },
54
- });
55
- }
@@ -1,101 +0,0 @@
1
- import type { ChildProcess } from 'child_process';
2
- import path from 'path';
3
-
4
- import type * as ts from 'typescript';
5
-
6
- import type { TsxConfig } from './compiler';
7
-
8
- type Status = 'startWatch' | 'reCompile' | 'error' | 'success' | '';
9
- export interface TscConfig extends TsxConfig {
10
- watch?: boolean;
11
- options?: ts.CompilerOptions;
12
- onWatchStatusChanged?: (data: { status: Status; message: string }) => any;
13
- onReportDiagnostic?: (data: { diagnostic: ts.Diagnostic }) => any;
14
- onEmitDiagnostics?: (data: { diagnostics: ts.Diagnostic[] }) => any;
15
- }
16
- export function tsc(config: TscConfig) {
17
- const logger = console;
18
- const ts: typeof import('typescript') = require('typescript');
19
- // https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API#writing-an-incremental-program-watcher
20
-
21
- const rootDir = config.rootDir || '.';
22
-
23
- const formatHost: ts.FormatDiagnosticsHost = {
24
- getCanonicalFileName: path => path,
25
- getCurrentDirectory: ts.sys.getCurrentDirectory,
26
- getNewLine: () => ts.sys.newLine,
27
- };
28
-
29
- function reportDiagnostic(diagnostic: ts.Diagnostic) {
30
- config.onReportDiagnostic?.({ diagnostic });
31
- }
32
-
33
- /**
34
- * Prints a diagnostic every time the watch status changes.
35
- * This is mainly for messages like "Starting compilation" or "Compilation completed".
36
- */
37
- let a: ChildProcess | any;
38
- function reportWatchStatusChanged(diagnostic: ts.Diagnostic) {
39
- const message = `${ts.formatDiagnostic(diagnostic, formatHost)}`.trimEnd();
40
- let status: Status = '';
41
- if (message.includes('message TS6031: Starting compilation in watch mode')) {
42
- status = 'startWatch';
43
- } else if (message.includes('message TS6032: File change detected')) {
44
- status = 'reCompile';
45
- } else if (message.includes('Found 0 errors')) {
46
- status = 'success';
47
- } else if (/Found \d+ error/.test(message)) {
48
- status = 'error';
49
- }
50
-
51
- config.onWatchStatusChanged?.({ status, message });
52
- }
53
-
54
- const configPath = ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.json');
55
- if (!configPath) {
56
- throw new Error('找不到tsconfig.json');
57
- }
58
-
59
- const createProgram = ts.createSemanticDiagnosticsBuilderProgram;
60
-
61
- if (config.watch) {
62
- const host = ts.createWatchCompilerHost(
63
- configPath,
64
- {
65
- ...config.options,
66
- outDir: config.outDir,
67
- noEmit: false,
68
- incremental: true,
69
- },
70
- ts.sys,
71
- createProgram,
72
- reportDiagnostic,
73
- reportWatchStatusChanged,
74
- );
75
-
76
- ts.createWatchProgram(host);
77
- } else {
78
- // 读取 tsconfig.json 文件
79
- const configFile = ts.readConfigFile(configPath, ts.sys.readFile);
80
-
81
- // 解析 tsconfig.json 文件
82
- const compilerOptions = ts.parseJsonConfigFileContent(configFile.config, ts.sys, path.dirname(configPath), {
83
- ...config.options,
84
- outDir: config.outDir,
85
- noEmit: false,
86
- incremental: false,
87
- });
88
-
89
- // 获取编译器实例
90
- const host = ts.createCompilerHost(compilerOptions.options);
91
- const program = ts.createProgram(compilerOptions.fileNames, compilerOptions.options, host);
92
-
93
- // 执行编译
94
- const emitResult = program.emit();
95
-
96
- // 处理编译结果
97
- const diagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
98
-
99
- config.onEmitDiagnostics?.({ diagnostics });
100
- }
101
- }