@simplysm/sd-cli 14.0.30 → 14.0.32
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.
- package/dist/{utils → angular}/angular-build-pipeline.d.ts +0 -2
- package/dist/angular/angular-build-pipeline.d.ts.map +1 -0
- package/dist/{utils → angular}/angular-build-pipeline.js +3 -6
- package/dist/angular/angular-build-pipeline.js.map +1 -0
- package/dist/{utils → angular}/angular-build.d.ts +1 -1
- package/dist/angular/angular-build.d.ts.map +1 -0
- package/dist/{utils → angular}/angular-build.js +1 -1
- package/dist/angular/angular-build.js.map +1 -0
- package/dist/{utils → angular}/angular-compiler.d.ts +0 -3
- package/dist/angular/angular-compiler.d.ts.map +1 -0
- package/dist/{utils → angular}/angular-compiler.js +1 -45
- package/dist/angular/angular-compiler.js.map +1 -0
- package/dist/angular/client-transform-stylesheet.js +1 -1
- package/dist/angular/client-transform-stylesheet.js.map +1 -1
- package/dist/{utils → angular}/ngtsc-build-core.d.ts +3 -3
- package/dist/angular/ngtsc-build-core.d.ts.map +1 -0
- package/dist/angular/ngtsc-build-core.js.map +1 -0
- package/dist/angular/scss-compiler.d.ts.map +1 -0
- package/dist/angular/scss-compiler.js.map +1 -0
- package/dist/angular/vite-angular-plugin.d.ts +2 -10
- package/dist/angular/vite-angular-plugin.d.ts.map +1 -1
- package/dist/angular/vite-angular-plugin.js +20 -286
- package/dist/angular/vite-angular-plugin.js.map +1 -1
- package/dist/capacitor/capacitor-build.d.ts +14 -0
- package/dist/capacitor/capacitor-build.d.ts.map +1 -0
- package/dist/capacitor/capacitor-build.js +105 -0
- package/dist/capacitor/capacitor-build.js.map +1 -0
- package/dist/capacitor/capacitor-config-writer.d.ts +11 -0
- package/dist/capacitor/capacitor-config-writer.d.ts.map +1 -0
- package/dist/capacitor/capacitor-config-writer.js +54 -0
- package/dist/capacitor/capacitor-config-writer.js.map +1 -0
- package/dist/capacitor/capacitor-icon.d.ts +5 -0
- package/dist/capacitor/capacitor-icon.d.ts.map +1 -0
- package/dist/capacitor/capacitor-icon.js +58 -0
- package/dist/capacitor/capacitor-icon.js.map +1 -0
- package/dist/capacitor/capacitor-npm-config.d.ts +11 -0
- package/dist/capacitor/capacitor-npm-config.d.ts.map +1 -0
- package/dist/capacitor/capacitor-npm-config.js +145 -0
- package/dist/capacitor/capacitor-npm-config.js.map +1 -0
- package/dist/capacitor/capacitor.d.ts +0 -45
- package/dist/capacitor/capacitor.d.ts.map +1 -1
- package/dist/capacitor/capacitor.js +15 -354
- package/dist/capacitor/capacitor.js.map +1 -1
- package/dist/commands/check.js +2 -2
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/dev.d.ts +3 -3
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +3 -3
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/lint.d.ts +1 -1
- package/dist/commands/lint.d.ts.map +1 -1
- package/dist/commands/lint.js +1 -1
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/publish/deployment-phase.d.ts +12 -0
- package/dist/commands/publish/deployment-phase.d.ts.map +1 -0
- package/dist/commands/publish/deployment-phase.js +94 -0
- package/dist/commands/publish/deployment-phase.js.map +1 -0
- package/dist/commands/publish/env-utils.d.ts +10 -0
- package/dist/commands/publish/env-utils.d.ts.map +1 -0
- package/dist/commands/publish/env-utils.js +41 -0
- package/dist/commands/publish/env-utils.js.map +1 -0
- package/dist/commands/publish/git-phase.d.ts +12 -0
- package/dist/commands/publish/git-phase.d.ts.map +1 -0
- package/dist/commands/publish/git-phase.js +79 -0
- package/dist/commands/publish/git-phase.js.map +1 -0
- package/dist/commands/{publish.d.ts → publish/index.d.ts} +1 -1
- package/dist/commands/publish/index.d.ts.map +1 -0
- package/dist/commands/publish/index.js +211 -0
- package/dist/commands/publish/index.js.map +1 -0
- package/dist/commands/publish/local-publisher.d.ts +6 -0
- package/dist/commands/publish/local-publisher.d.ts.map +1 -0
- package/dist/commands/publish/local-publisher.js +16 -0
- package/dist/commands/publish/local-publisher.js.map +1 -0
- package/dist/commands/publish/npm-publisher.d.ts +6 -0
- package/dist/commands/publish/npm-publisher.d.ts.map +1 -0
- package/dist/commands/publish/npm-publisher.js +21 -0
- package/dist/commands/publish/npm-publisher.js.map +1 -0
- package/dist/commands/publish/post-publish-phase.d.ts +8 -0
- package/dist/commands/publish/post-publish-phase.d.ts.map +1 -0
- package/dist/commands/publish/post-publish-phase.js +34 -0
- package/dist/commands/publish/post-publish-phase.js.map +1 -0
- package/dist/commands/publish/storage-publisher.d.ts +18 -0
- package/dist/commands/publish/storage-publisher.d.ts.map +1 -0
- package/dist/commands/publish/storage-publisher.js +173 -0
- package/dist/commands/publish/storage-publisher.js.map +1 -0
- package/dist/commands/publish/version-upgrade.d.ts +28 -0
- package/dist/commands/publish/version-upgrade.d.ts.map +1 -0
- package/dist/commands/publish/version-upgrade.js +96 -0
- package/dist/commands/publish/version-upgrade.js.map +1 -0
- package/dist/commands/replace-deps.js +1 -1
- package/dist/commands/replace-deps.js.map +1 -1
- package/dist/commands/watch.d.ts +3 -4
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +3 -4
- package/dist/commands/watch.js.map +1 -1
- package/dist/deps/replace-deps/collect-deps.d.ts +6 -0
- package/dist/deps/replace-deps/collect-deps.d.ts.map +1 -0
- package/dist/deps/replace-deps/collect-deps.js +71 -0
- package/dist/deps/replace-deps/collect-deps.js.map +1 -0
- package/dist/{utils/replace-deps.d.ts → deps/replace-deps/replace-deps-resolve.d.ts} +7 -24
- package/dist/deps/replace-deps/replace-deps-resolve.d.ts.map +1 -0
- package/dist/{utils/replace-deps.js → deps/replace-deps/replace-deps-resolve.js} +4 -152
- package/dist/deps/replace-deps/replace-deps-resolve.js.map +1 -0
- package/dist/deps/replace-deps/replace-deps.d.ts +36 -0
- package/dist/deps/replace-deps/replace-deps.d.ts.map +1 -0
- package/dist/deps/replace-deps/replace-deps.js +155 -0
- package/dist/deps/replace-deps/replace-deps.js.map +1 -0
- package/dist/{utils → deps/server-externals}/server-production-files.d.ts +1 -1
- package/dist/deps/server-externals/server-production-files.d.ts.map +1 -0
- package/dist/{utils → deps/server-externals}/server-production-files.js +1 -1
- package/dist/deps/server-externals/server-production-files.js.map +1 -0
- package/dist/dev-server/dev-http-server.d.ts +23 -0
- package/dist/dev-server/dev-http-server.d.ts.map +1 -0
- package/dist/dev-server/dev-http-server.js +116 -0
- package/dist/dev-server/dev-http-server.js.map +1 -0
- package/dist/dev-server/hmr-client-script.d.ts +13 -0
- package/dist/dev-server/hmr-client-script.d.ts.map +1 -0
- package/dist/dev-server/hmr-client-script.js +73 -0
- package/dist/dev-server/hmr-client-script.js.map +1 -0
- package/dist/dev-server/hmr-service.d.ts +23 -0
- package/dist/dev-server/hmr-service.d.ts.map +1 -0
- package/dist/dev-server/hmr-service.js +139 -0
- package/dist/dev-server/hmr-service.js.map +1 -0
- package/dist/electron/electron.d.ts +5 -0
- package/dist/electron/electron.d.ts.map +1 -1
- package/dist/electron/electron.js +17 -24
- package/dist/electron/electron.js.map +1 -1
- package/dist/engines/BaseEngine.d.ts +18 -4
- package/dist/engines/BaseEngine.d.ts.map +1 -1
- package/dist/engines/BaseEngine.js +45 -66
- package/dist/engines/BaseEngine.js.map +1 -1
- package/dist/engines/{ViteEngine.d.ts → EsbuildClientEngine.d.ts} +11 -18
- package/dist/engines/EsbuildClientEngine.d.ts.map +1 -0
- package/dist/engines/{ViteEngine.js → EsbuildClientEngine.js} +28 -55
- package/dist/engines/EsbuildClientEngine.js.map +1 -0
- package/dist/engines/NgtscEngine.d.ts +2 -2
- package/dist/engines/NgtscEngine.d.ts.map +1 -1
- package/dist/engines/NgtscEngine.js +1 -9
- package/dist/engines/NgtscEngine.js.map +1 -1
- package/dist/engines/ServerEsbuildEngine.d.ts +2 -2
- package/dist/engines/ServerEsbuildEngine.d.ts.map +1 -1
- package/dist/engines/ServerEsbuildEngine.js +1 -9
- package/dist/engines/ServerEsbuildEngine.js.map +1 -1
- package/dist/engines/TscEngine.d.ts +2 -2
- package/dist/engines/TscEngine.d.ts.map +1 -1
- package/dist/engines/TscEngine.js +1 -9
- package/dist/engines/TscEngine.js.map +1 -1
- package/dist/engines/index.d.ts +15 -5
- package/dist/engines/index.d.ts.map +1 -1
- package/dist/engines/index.js +21 -5
- package/dist/engines/index.js.map +1 -1
- package/dist/engines/types.d.ts +3 -3
- package/dist/engines/types.d.ts.map +1 -1
- package/dist/esbuild/esbuild-client-config.d.ts +38 -0
- package/dist/esbuild/esbuild-client-config.d.ts.map +1 -0
- package/dist/esbuild/esbuild-client-config.js +171 -0
- package/dist/esbuild/esbuild-client-config.js.map +1 -0
- package/dist/esbuild/esbuild-config.d.ts.map +1 -0
- package/dist/{utils → esbuild}/esbuild-config.js +1 -0
- package/dist/esbuild/esbuild-config.js.map +1 -0
- package/dist/esbuild/esbuild-index-html.d.ts +39 -0
- package/dist/esbuild/esbuild-index-html.d.ts.map +1 -0
- package/dist/esbuild/esbuild-index-html.js +68 -0
- package/dist/esbuild/esbuild-index-html.js.map +1 -0
- package/dist/esbuild/esbuild-pwa.d.ts +21 -0
- package/dist/esbuild/esbuild-pwa.d.ts.map +1 -0
- package/dist/esbuild/esbuild-pwa.js +105 -0
- package/dist/esbuild/esbuild-pwa.js.map +1 -0
- package/dist/esbuild/esbuild-scss-plugin.d.ts +6 -0
- package/dist/esbuild/esbuild-scss-plugin.d.ts.map +1 -0
- package/dist/esbuild/esbuild-scss-plugin.js +41 -0
- package/dist/esbuild/esbuild-scss-plugin.js.map +1 -0
- package/dist/lint/lint-core.d.ts.map +1 -0
- package/dist/lint/lint-core.js.map +1 -0
- package/dist/lint/lint-utils.d.ts.map +1 -0
- package/dist/lint/lint-utils.js.map +1 -0
- package/dist/lint/lint-with-program.d.ts.map +1 -0
- package/dist/lint/lint-with-program.js.map +1 -0
- package/dist/orchestrators/BaseOrchestrator.d.ts +44 -0
- package/dist/orchestrators/BaseOrchestrator.d.ts.map +1 -0
- package/dist/orchestrators/BaseOrchestrator.js +92 -0
- package/dist/orchestrators/BaseOrchestrator.js.map +1 -0
- package/dist/orchestrators/BuildOrchestrator.d.ts +45 -3
- package/dist/orchestrators/BuildOrchestrator.d.ts.map +1 -1
- package/dist/orchestrators/BuildOrchestrator.js +170 -143
- package/dist/orchestrators/BuildOrchestrator.js.map +1 -1
- package/dist/orchestrators/DevOrchestrator.d.ts +39 -0
- package/dist/orchestrators/DevOrchestrator.d.ts.map +1 -0
- package/dist/orchestrators/DevOrchestrator.js +249 -0
- package/dist/orchestrators/DevOrchestrator.js.map +1 -0
- package/dist/orchestrators/ServerRuntimeManager.d.ts +22 -0
- package/dist/orchestrators/ServerRuntimeManager.d.ts.map +1 -0
- package/dist/orchestrators/ServerRuntimeManager.js +66 -0
- package/dist/orchestrators/ServerRuntimeManager.js.map +1 -0
- package/dist/orchestrators/TypecheckOrchestrator.d.ts +17 -2
- package/dist/orchestrators/TypecheckOrchestrator.d.ts.map +1 -1
- package/dist/orchestrators/TypecheckOrchestrator.js +122 -108
- package/dist/orchestrators/TypecheckOrchestrator.js.map +1 -1
- package/dist/orchestrators/WatchOrchestrator.d.ts +33 -0
- package/dist/orchestrators/WatchOrchestrator.d.ts.map +1 -0
- package/dist/orchestrators/WatchOrchestrator.js +158 -0
- package/dist/orchestrators/WatchOrchestrator.js.map +1 -0
- package/dist/orchestrators/types.d.ts +17 -0
- package/dist/orchestrators/types.d.ts.map +1 -0
- package/dist/orchestrators/types.js +2 -0
- package/dist/orchestrators/types.js.map +1 -0
- package/dist/runtime/ResultCollector.d.ts.map +1 -0
- package/dist/runtime/ResultCollector.js.map +1 -0
- package/dist/runtime/SignalHandler.d.ts.map +1 -0
- package/dist/runtime/SignalHandler.js.map +1 -0
- package/dist/{utils → runtime}/engine-stop.d.ts +1 -1
- package/dist/runtime/engine-stop.d.ts.map +1 -0
- package/dist/{utils → runtime}/engine-stop.js +1 -1
- package/dist/runtime/engine-stop.js.map +1 -0
- package/dist/runtime/engine-watch-events.d.ts +43 -0
- package/dist/runtime/engine-watch-events.d.ts.map +1 -0
- package/dist/runtime/engine-watch-events.js +72 -0
- package/dist/runtime/engine-watch-events.js.map +1 -0
- package/dist/{utils → runtime}/rebuild-manager.d.ts +1 -0
- package/dist/runtime/rebuild-manager.d.ts.map +1 -0
- package/dist/{utils → runtime}/rebuild-manager.js +8 -1
- package/dist/runtime/rebuild-manager.js.map +1 -0
- package/dist/runtime/worker-events.d.ts +22 -0
- package/dist/runtime/worker-events.d.ts.map +1 -0
- package/dist/runtime/worker-events.js +2 -0
- package/dist/runtime/worker-events.js.map +1 -0
- package/dist/runtime/worker-utils.d.ts.map +1 -0
- package/dist/runtime/worker-utils.js.map +1 -0
- package/dist/sd-cli-entry.d.ts.map +1 -1
- package/dist/sd-cli-entry.js +61 -54
- package/dist/sd-cli-entry.js.map +1 -1
- package/dist/sd-cli.js +1 -1
- package/dist/sd-cli.js.map +1 -1
- package/dist/sd-config.types.d.ts +6 -15
- package/dist/sd-config.types.d.ts.map +1 -1
- package/dist/typecheck/typecheck-non-package.d.ts.map +1 -0
- package/dist/{utils → typecheck}/typecheck-non-package.js +1 -1
- package/dist/typecheck/typecheck-non-package.js.map +1 -0
- package/dist/typecheck/typecheck-serialization.d.ts.map +1 -0
- package/dist/typecheck/typecheck-serialization.js.map +1 -0
- package/dist/utils/diagnostic-utils.d.ts +5 -0
- package/dist/utils/diagnostic-utils.d.ts.map +1 -1
- package/dist/utils/diagnostic-utils.js +15 -0
- package/dist/utils/diagnostic-utils.js.map +1 -1
- package/dist/utils/orchestrator-utils.d.ts +1 -5
- package/dist/utils/orchestrator-utils.d.ts.map +1 -1
- package/dist/utils/orchestrator-utils.js +2 -5
- package/dist/utils/orchestrator-utils.js.map +1 -1
- package/dist/utils/output-utils.d.ts +1 -1
- package/dist/utils/output-utils.d.ts.map +1 -1
- package/dist/utils/package-classify.d.ts +54 -0
- package/dist/utils/package-classify.d.ts.map +1 -0
- package/dist/utils/package-classify.js +134 -0
- package/dist/utils/package-classify.js.map +1 -0
- package/dist/utils/package-utils.d.ts +1 -58
- package/dist/utils/package-utils.d.ts.map +1 -1
- package/dist/utils/package-utils.js +0 -193
- package/dist/utils/package-utils.js.map +1 -1
- package/dist/utils/tsc-build.d.ts +1 -1
- package/dist/utils/tsc-build.d.ts.map +1 -1
- package/dist/utils/tsc-build.js +1 -1
- package/dist/utils/tsc-build.js.map +1 -1
- package/dist/workers/build-change-filter.d.ts +8 -0
- package/dist/workers/build-change-filter.d.ts.map +1 -0
- package/dist/workers/build-change-filter.js +16 -0
- package/dist/workers/build-change-filter.js.map +1 -0
- package/dist/workers/build-watch-paths.d.ts +20 -0
- package/dist/workers/build-watch-paths.d.ts.map +1 -0
- package/dist/workers/build-watch-paths.js +29 -0
- package/dist/workers/build-watch-paths.js.map +1 -0
- package/dist/workers/client.worker.d.ts +11 -18
- package/dist/workers/client.worker.d.ts.map +1 -1
- package/dist/workers/client.worker.js +218 -289
- package/dist/workers/client.worker.js.map +1 -1
- package/dist/workers/library-build.worker.d.ts +2 -2
- package/dist/workers/library-build.worker.d.ts.map +1 -1
- package/dist/workers/library-build.worker.js +13 -24
- package/dist/workers/library-build.worker.js.map +1 -1
- package/dist/workers/lint.worker.d.ts +1 -1
- package/dist/workers/lint.worker.d.ts.map +1 -1
- package/dist/workers/lint.worker.js +1 -1
- package/dist/workers/lint.worker.js.map +1 -1
- package/dist/workers/ngtsc-build.worker.d.ts +1 -1
- package/dist/workers/ngtsc-build.worker.d.ts.map +1 -1
- package/dist/workers/ngtsc-build.worker.js +19 -35
- package/dist/workers/ngtsc-build.worker.js.map +1 -1
- package/dist/workers/server-build.worker.d.ts +2 -2
- package/dist/workers/server-build.worker.d.ts.map +1 -1
- package/dist/workers/server-build.worker.js +36 -137
- package/dist/workers/server-build.worker.js.map +1 -1
- package/dist/workers/server-esbuild-context.d.ts +47 -0
- package/dist/workers/server-esbuild-context.d.ts.map +1 -0
- package/dist/workers/server-esbuild-context.js +92 -0
- package/dist/workers/server-esbuild-context.js.map +1 -0
- package/dist/workers/server-runtime.worker.d.ts.map +1 -1
- package/dist/workers/server-runtime.worker.js +3 -1
- package/dist/workers/server-runtime.worker.js.map +1 -1
- package/dist/workers/server-watch-manager.d.ts +44 -0
- package/dist/workers/server-watch-manager.d.ts.map +1 -0
- package/dist/workers/server-watch-manager.js +87 -0
- package/dist/workers/server-watch-manager.js.map +1 -0
- package/dist/workers/shared-worker-lifecycle.d.ts +14 -0
- package/dist/workers/shared-worker-lifecycle.d.ts.map +1 -0
- package/dist/workers/shared-worker-lifecycle.js +17 -0
- package/dist/workers/shared-worker-lifecycle.js.map +1 -0
- package/package.json +9 -9
- package/src/{utils → angular}/angular-build-pipeline.ts +3 -8
- package/src/{utils → angular}/angular-build.ts +1 -1
- package/src/{utils → angular}/angular-compiler.ts +1 -64
- package/src/angular/client-transform-stylesheet.ts +1 -1
- package/src/{utils → angular}/ngtsc-build-core.ts +3 -3
- package/src/angular/vite-angular-plugin.ts +22 -355
- package/src/capacitor/capacitor-build.ts +142 -0
- package/src/capacitor/capacitor-config-writer.ts +66 -0
- package/src/capacitor/capacitor-icon.ts +75 -0
- package/src/capacitor/capacitor-npm-config.ts +192 -0
- package/src/capacitor/capacitor.ts +32 -441
- package/src/commands/check.ts +2 -2
- package/src/commands/dev.ts +6 -6
- package/src/commands/lint.ts +1 -1
- package/src/commands/publish/deployment-phase.ts +125 -0
- package/src/commands/publish/env-utils.ts +44 -0
- package/src/commands/publish/git-phase.ts +99 -0
- package/src/commands/publish/index.ts +266 -0
- package/src/commands/publish/local-publisher.ts +23 -0
- package/src/commands/publish/npm-publisher.ts +30 -0
- package/src/commands/publish/post-publish-phase.ts +43 -0
- package/src/commands/publish/storage-publisher.ts +208 -0
- package/src/commands/publish/version-upgrade.ts +132 -0
- package/src/commands/replace-deps.ts +1 -1
- package/src/commands/watch.ts +6 -7
- package/src/deps/replace-deps/collect-deps.ts +92 -0
- package/src/{utils/replace-deps.ts → deps/replace-deps/replace-deps-resolve.ts} +4 -188
- package/src/deps/replace-deps/replace-deps.ts +193 -0
- package/src/{utils → deps/server-externals}/server-production-files.ts +2 -2
- package/src/dev-server/dev-http-server.ts +149 -0
- package/src/dev-server/hmr-client-script.ts +74 -0
- package/src/dev-server/hmr-service.ts +178 -0
- package/src/electron/electron.ts +21 -28
- package/src/engines/BaseEngine.ts +64 -83
- package/src/engines/{ViteEngine.ts → EsbuildClientEngine.ts} +33 -72
- package/src/engines/NgtscEngine.ts +3 -11
- package/src/engines/ServerEsbuildEngine.ts +3 -11
- package/src/engines/TscEngine.ts +3 -11
- package/src/engines/index.ts +29 -9
- package/src/engines/types.ts +3 -3
- package/src/esbuild/esbuild-client-config.ts +230 -0
- package/src/{utils → esbuild}/esbuild-config.ts +1 -0
- package/src/esbuild/esbuild-index-html.ts +119 -0
- package/src/esbuild/esbuild-pwa.ts +139 -0
- package/src/esbuild/esbuild-scss-plugin.ts +48 -0
- package/src/orchestrators/BaseOrchestrator.ts +118 -0
- package/src/orchestrators/BuildOrchestrator.ts +234 -171
- package/src/orchestrators/DevOrchestrator.ts +315 -0
- package/src/orchestrators/ServerRuntimeManager.ts +85 -0
- package/src/orchestrators/TypecheckOrchestrator.ts +166 -117
- package/src/orchestrators/WatchOrchestrator.ts +203 -0
- package/src/orchestrators/types.ts +18 -0
- package/src/{utils → runtime}/engine-stop.ts +1 -1
- package/src/runtime/engine-watch-events.ts +121 -0
- package/src/{utils → runtime}/rebuild-manager.ts +8 -1
- package/src/runtime/worker-events.ts +25 -0
- package/src/sd-cli-entry.ts +69 -54
- package/src/sd-cli.ts +1 -1
- package/src/sd-config.types.ts +6 -16
- package/src/{utils → typecheck}/typecheck-non-package.ts +1 -1
- package/src/utils/diagnostic-utils.ts +15 -0
- package/src/utils/orchestrator-utils.ts +2 -6
- package/src/utils/output-utils.ts +1 -1
- package/src/utils/package-classify.ts +182 -0
- package/src/utils/package-utils.ts +0 -257
- package/src/utils/tsc-build.ts +1 -1
- package/src/workers/build-change-filter.ts +27 -0
- package/src/workers/build-watch-paths.ts +54 -0
- package/src/workers/client.worker.ts +258 -328
- package/src/workers/library-build.worker.ts +15 -34
- package/src/workers/lint.worker.ts +1 -1
- package/src/workers/ngtsc-build.worker.ts +19 -46
- package/src/workers/server-build.worker.ts +38 -168
- package/src/workers/server-esbuild-context.ts +122 -0
- package/src/workers/server-runtime.worker.ts +4 -1
- package/src/workers/server-watch-manager.ts +124 -0
- package/src/workers/shared-worker-lifecycle.ts +24 -0
- package/tests/angular/angular-build-pipeline.spec.ts +2 -2
- package/tests/angular/angular-compiler-aot.acc.spec.ts +68 -0
- package/tests/angular/angular-compiler-aot.spec.ts +80 -0
- package/tests/angular/angular-compiler-hmr-removal.verify.md +16 -0
- package/tests/angular/vite-angular-plugin-legacy-watch.spec.ts +0 -17
- package/tests/angular/vite-angular-plugin-vitest.spec.ts +1 -6
- package/tests/angular/vite-angular-plugin-vitest.verify.md +20 -0
- package/tests/angular/vite-angular-plugin.spec.ts +4 -178
- package/tests/capacitor/capacitor-android.spec.ts +1 -0
- package/tests/capacitor/capacitor-build.spec.ts +1 -0
- package/tests/capacitor/capacitor-config-writer.acc.spec.ts +108 -0
- package/tests/capacitor/capacitor-config-writer.spec.ts +95 -0
- package/tests/capacitor/capacitor-icon.spec.ts +1 -0
- package/tests/capacitor/capacitor-init.spec.ts +1 -0
- package/tests/capacitor/capacitor-npm-config.acc.spec.ts +236 -0
- package/tests/capacitor/capacitor-npm-config.spec.ts +132 -0
- package/tests/capacitor/capacitor-run.spec.ts +1 -0
- package/tests/capacitor/capacitor-workspace.spec.ts +1 -0
- package/tests/commands/check.spec.ts +2 -2
- package/tests/commands/deployment-phase.acc.spec.ts +142 -0
- package/tests/commands/git-phase.acc.spec.ts +158 -0
- package/tests/commands/lint.spec.ts +1 -1
- package/tests/commands/post-publish-phase.acc.spec.ts +82 -0
- package/tests/commands/publish-npm-local-split.verify.md +9 -0
- package/tests/commands/publish-responsibility-split.verify.md +13 -0
- package/tests/commands/publish-storage-split.verify.md +8 -0
- package/tests/commands/publish.spec.ts +1 -1
- package/tests/commands/typecheck.spec.ts +18 -18
- package/tests/deps/deps-directory-separation.verify.md +15 -0
- package/tests/engines/base-engine.spec.ts +65 -6
- package/tests/engines/engine-adapter-isolation.spec.ts +11 -18
- package/tests/engines/engine-selection.spec.ts +38 -5
- package/tests/engines/engine-typecheck-selection.acc.spec.ts +85 -0
- package/tests/engines/engine-typecheck-selection.verify.md +8 -0
- package/tests/engines/esbuild-client-engine.acc.spec.ts +161 -0
- package/tests/engines/esbuild-client-engine.spec.ts +320 -0
- package/tests/engines/esbuild-client-engine.verify.md +15 -0
- package/tests/engines/normalize-result.verify.md +9 -0
- package/tests/engines/vite-dependency-cleanup.verify.md +24 -0
- package/tests/orchestrators/build-orchestrator.spec.ts +3 -3
- package/tests/orchestrators/dev-orchestrator.spec.ts +799 -0
- package/tests/orchestrators/orchestrator-baseenv.verify.md +10 -0
- package/tests/orchestrators/orchestrator-diagnostic-formatting.verify.md +10 -0
- package/tests/orchestrators/orchestrator-initializemode-signature.verify.md +9 -0
- package/tests/orchestrators/typecheck-orchestrator.spec.ts +11 -11
- package/tests/orchestrators/watch-orchestrator.spec.ts +511 -0
- package/tests/{infra → runtime}/result-collector.spec.ts +1 -1
- package/tests/{infra → runtime}/signal-handler.spec.ts +1 -1
- package/tests/sd-cli-entry.spec.ts +9 -0
- package/tests/utils/angular-build.spec.ts +15 -20
- package/tests/utils/angular-compiler-emit.spec.ts +2 -2
- package/tests/utils/angular-compiler.spec.ts +2 -2
- package/tests/utils/angular-source-file-cache.spec.ts +2 -2
- package/tests/utils/concurrency.spec.ts +2 -10
- package/tests/utils/dev-http-server.acc.spec.ts +206 -0
- package/tests/utils/dev-http-server.spec.ts +181 -0
- package/tests/utils/dev-http-server.verify.md +8 -0
- package/tests/utils/diagnostic-utils.spec.ts +42 -1
- package/tests/utils/engine-stop.spec.ts +1 -1
- package/tests/utils/engine-watch-events.acc.spec.ts +217 -0
- package/tests/utils/engine-watch-events.spec.ts +141 -0
- package/tests/utils/engine-watch-events.verify.md +17 -0
- package/tests/utils/esbuild-client-config.acc.spec.ts +443 -0
- package/tests/utils/esbuild-client-config.spec.ts +590 -0
- package/tests/utils/esbuild-client-config.verify.md +26 -0
- package/tests/utils/esbuild-config.spec.ts +11 -1
- package/tests/utils/esbuild-index-html.acc.spec.ts +166 -0
- package/tests/utils/esbuild-index-html.spec.ts +194 -0
- package/tests/utils/esbuild-index-html.verify.md +10 -0
- package/tests/utils/esbuild-pwa.acc.spec.ts +203 -0
- package/tests/utils/esbuild-pwa.spec.ts +189 -0
- package/tests/utils/esbuild-pwa.verify.md +9 -0
- package/tests/utils/esbuild-scss-plugin.acc.spec.ts +111 -0
- package/tests/utils/esbuild-scss-plugin.spec.ts +150 -0
- package/tests/utils/esbuild-scss-plugin.verify.md +8 -0
- package/tests/utils/external-modules.spec.ts +1 -1
- package/tests/utils/hmr-client-script.acc.spec.ts +128 -0
- package/tests/utils/hmr-client-script.spec.ts +44 -0
- package/tests/utils/hmr-service-dispatcher.acc.spec.ts +217 -0
- package/tests/utils/hmr-service-dispatcher.spec.ts +143 -0
- package/tests/utils/hmr-service.acc.spec.ts +139 -0
- package/tests/utils/hmr-service.spec.ts +131 -0
- package/tests/utils/hmr-service.verify.md +17 -0
- package/tests/utils/lint-core.spec.ts +2 -1
- package/tests/utils/lint-utils.spec.ts +1 -1
- package/tests/utils/lint-with-program.spec.ts +1 -1
- package/tests/utils/ngtsc-build-core-write-emit.spec.ts +19 -19
- package/tests/utils/ngtsc-build-core.spec.ts +4 -4
- package/tests/utils/orchestrator-utils.spec.ts +2 -2
- package/tests/utils/output-utils.spec.ts +1 -1
- package/tests/utils/package-utils.spec.ts +1 -1
- package/tests/utils/rebuild-manager.spec.ts +20 -7
- package/tests/utils/replace-deps-split.verify.md +15 -0
- package/tests/utils/replace-deps-watch.acc.spec.ts +131 -0
- package/tests/utils/replace-deps-watch.spec.ts +91 -0
- package/tests/utils/replace-deps-watch.verify.md +9 -0
- package/tests/utils/replace-deps.spec.ts +1 -1
- package/tests/utils/scss-compiler.spec.ts +1 -1
- package/tests/utils/tsc-build.spec.ts +1 -1
- package/tests/utils/typecheck-non-package.spec.ts +2 -2
- package/tests/utils/worker-utils.spec.ts +2 -1
- package/tests/workers/build-change-filter.acc.spec.ts +78 -0
- package/tests/workers/build-change-filter.spec.ts +39 -0
- package/tests/workers/build-watch-paths-library.verify.md +10 -0
- package/tests/workers/build-watch-paths-ngtsc-server.verify.md +12 -0
- package/tests/workers/build-watch-paths.acc.spec.ts +101 -0
- package/tests/workers/build-watch-paths.spec.ts +121 -0
- package/tests/workers/client-worker-browser-support.verify.md +7 -0
- package/tests/workers/client-worker-onend-sync.verify.md +7 -0
- package/tests/workers/client-worker.acc.spec.ts +185 -0
- package/tests/workers/client-worker.spec.ts +91 -178
- package/tests/workers/library-build-lint.spec.ts +3 -3
- package/tests/workers/library-build-worker.spec.ts +10 -11
- package/tests/workers/ngtsc-build-lint.spec.ts +4 -4
- package/tests/workers/ngtsc-build-worker.spec.ts +2 -2
- package/tests/workers/server-build-lint.spec.ts +4 -4
- package/tests/workers/server-build-worker.spec.ts +14 -15
- package/tests/workers/server-esbuild-context-integration.verify.md +10 -0
- package/tests/workers/server-esbuild-context.acc.spec.ts +98 -0
- package/tests/workers/server-esbuild-context.spec.ts +198 -0
- package/tests/workers/server-runtime-worker.spec.ts +4 -3
- package/tests/workers/server-watch-manager.acc.spec.ts +162 -0
- package/tests/workers/server-watch-manager.spec.ts +199 -0
- package/tests/workers/shared-worker-lifecycle.acc.spec.ts +27 -0
- package/tests/workers/shared-worker-lifecycle.spec.ts +47 -0
- package/dist/angular/vite-postcss-inline-plugin.d.ts +0 -18
- package/dist/angular/vite-postcss-inline-plugin.d.ts.map +0 -1
- package/dist/angular/vite-postcss-inline-plugin.js +0 -108
- package/dist/angular/vite-postcss-inline-plugin.js.map +0 -1
- package/dist/commands/publish.d.ts.map +0 -1
- package/dist/commands/publish.js +0 -689
- package/dist/commands/publish.js.map +0 -1
- package/dist/engines/ViteEngine.d.ts.map +0 -1
- package/dist/engines/ViteEngine.js.map +0 -1
- package/dist/infra/ResultCollector.d.ts.map +0 -1
- package/dist/infra/ResultCollector.js.map +0 -1
- package/dist/infra/SignalHandler.d.ts.map +0 -1
- package/dist/infra/SignalHandler.js.map +0 -1
- package/dist/orchestrators/DevWatchOrchestrator.d.ts +0 -63
- package/dist/orchestrators/DevWatchOrchestrator.d.ts.map +0 -1
- package/dist/orchestrators/DevWatchOrchestrator.js +0 -478
- package/dist/orchestrators/DevWatchOrchestrator.js.map +0 -1
- package/dist/utils/angular-build-pipeline.d.ts.map +0 -1
- package/dist/utils/angular-build-pipeline.js.map +0 -1
- package/dist/utils/angular-build.d.ts.map +0 -1
- package/dist/utils/angular-build.js.map +0 -1
- package/dist/utils/angular-compiler.d.ts.map +0 -1
- package/dist/utils/angular-compiler.js.map +0 -1
- package/dist/utils/engine-stop.d.ts.map +0 -1
- package/dist/utils/engine-stop.js.map +0 -1
- package/dist/utils/esbuild-config.d.ts.map +0 -1
- package/dist/utils/esbuild-config.js.map +0 -1
- package/dist/utils/hmr-candidates.d.ts +0 -15
- package/dist/utils/hmr-candidates.d.ts.map +0 -1
- package/dist/utils/hmr-candidates.js +0 -234
- package/dist/utils/hmr-candidates.js.map +0 -1
- package/dist/utils/lint-core.d.ts.map +0 -1
- package/dist/utils/lint-core.js.map +0 -1
- package/dist/utils/lint-utils.d.ts.map +0 -1
- package/dist/utils/lint-utils.js.map +0 -1
- package/dist/utils/lint-with-program.d.ts.map +0 -1
- package/dist/utils/lint-with-program.js.map +0 -1
- package/dist/utils/ngtsc-build-core.d.ts.map +0 -1
- package/dist/utils/ngtsc-build-core.js.map +0 -1
- package/dist/utils/rebuild-manager.d.ts.map +0 -1
- package/dist/utils/rebuild-manager.js.map +0 -1
- package/dist/utils/replace-deps.d.ts.map +0 -1
- package/dist/utils/replace-deps.js.map +0 -1
- package/dist/utils/scss-compiler.d.ts.map +0 -1
- package/dist/utils/scss-compiler.js.map +0 -1
- package/dist/utils/server-production-files.d.ts.map +0 -1
- package/dist/utils/server-production-files.js.map +0 -1
- package/dist/utils/typecheck-non-package.d.ts.map +0 -1
- package/dist/utils/typecheck-non-package.js.map +0 -1
- package/dist/utils/typecheck-serialization.d.ts.map +0 -1
- package/dist/utils/typecheck-serialization.js.map +0 -1
- package/dist/utils/vite-config.d.ts +0 -50
- package/dist/utils/vite-config.d.ts.map +0 -1
- package/dist/utils/vite-config.js +0 -242
- package/dist/utils/vite-config.js.map +0 -1
- package/dist/utils/vite-pwa-plugin.d.ts +0 -9
- package/dist/utils/vite-pwa-plugin.d.ts.map +0 -1
- package/dist/utils/vite-pwa-plugin.js +0 -139
- package/dist/utils/vite-pwa-plugin.js.map +0 -1
- package/dist/utils/vite-scope-watch-plugin.d.ts +0 -24
- package/dist/utils/vite-scope-watch-plugin.d.ts.map +0 -1
- package/dist/utils/vite-scope-watch-plugin.js +0 -51
- package/dist/utils/vite-scope-watch-plugin.js.map +0 -1
- package/dist/utils/worker-events.d.ts +0 -66
- package/dist/utils/worker-events.d.ts.map +0 -1
- package/dist/utils/worker-events.js +0 -55
- package/dist/utils/worker-events.js.map +0 -1
- package/dist/utils/worker-utils.d.ts.map +0 -1
- package/dist/utils/worker-utils.js.map +0 -1
- package/src/angular/vite-postcss-inline-plugin.ts +0 -139
- package/src/commands/publish.ts +0 -850
- package/src/orchestrators/DevWatchOrchestrator.ts +0 -594
- package/src/utils/hmr-candidates.ts +0 -327
- package/src/utils/vite-config.ts +0 -318
- package/src/utils/vite-pwa-plugin.ts +0 -168
- package/src/utils/vite-scope-watch-plugin.ts +0 -77
- package/src/utils/worker-events.ts +0 -128
- package/tests/angular/angular-compiler-hmr.spec.ts +0 -152
- package/tests/angular/hmr-candidates.spec.ts +0 -158
- package/tests/angular/linker-disk-cache.spec.ts +0 -171
- package/tests/angular/vite-angular-plugin-hmr-fallback.spec.ts +0 -333
- package/tests/angular/vite-angular-plugin-hmr.spec.ts +0 -320
- package/tests/angular/vite-angular-plugin-scss-hmr.spec.ts +0 -95
- package/tests/angular/vite-postcss-inline-plugin.spec.ts +0 -60
- package/tests/engines/vite-engine.spec.ts +0 -409
- package/tests/orchestrators/dev-watch-orchestrator.spec.ts +0 -1542
- package/tests/utils/vite-config.spec.ts +0 -780
- package/tests/utils/vite-pwa-plugin.spec.ts +0 -401
- package/tests/utils/vite-scope-watch-plugin.spec.ts +0 -218
- package/tests/utils/worker-events.spec.ts +0 -147
- package/tests/workers/client-worker-legacy.spec.ts +0 -659
- /package/dist/{utils → angular}/ngtsc-build-core.js +0 -0
- /package/dist/{utils → angular}/scss-compiler.d.ts +0 -0
- /package/dist/{utils → angular}/scss-compiler.js +0 -0
- /package/dist/{utils → esbuild}/esbuild-config.d.ts +0 -0
- /package/dist/{utils → lint}/lint-core.d.ts +0 -0
- /package/dist/{utils → lint}/lint-core.js +0 -0
- /package/dist/{utils → lint}/lint-utils.d.ts +0 -0
- /package/dist/{utils → lint}/lint-utils.js +0 -0
- /package/dist/{utils → lint}/lint-with-program.d.ts +0 -0
- /package/dist/{utils → lint}/lint-with-program.js +0 -0
- /package/dist/{infra → runtime}/ResultCollector.d.ts +0 -0
- /package/dist/{infra → runtime}/ResultCollector.js +0 -0
- /package/dist/{infra → runtime}/SignalHandler.d.ts +0 -0
- /package/dist/{infra → runtime}/SignalHandler.js +0 -0
- /package/dist/{utils → runtime}/worker-utils.d.ts +0 -0
- /package/dist/{utils → runtime}/worker-utils.js +0 -0
- /package/dist/{utils → typecheck}/typecheck-non-package.d.ts +0 -0
- /package/dist/{utils → typecheck}/typecheck-serialization.d.ts +0 -0
- /package/dist/{utils → typecheck}/typecheck-serialization.js +0 -0
- /package/src/{utils → angular}/scss-compiler.ts +0 -0
- /package/src/{utils → lint}/lint-core.ts +0 -0
- /package/src/{utils → lint}/lint-utils.ts +0 -0
- /package/src/{utils → lint}/lint-with-program.ts +0 -0
- /package/src/{infra → runtime}/ResultCollector.ts +0 -0
- /package/src/{infra → runtime}/SignalHandler.ts +0 -0
- /package/src/{utils → runtime}/worker-utils.ts +0 -0
- /package/src/{utils → typecheck}/typecheck-serialization.ts +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { createRequire } from "module";
|
|
5
2
|
import { cpx, fsx, pathx } from "@simplysm/core-node";
|
|
6
3
|
import { consola, LogLevels } from "consola";
|
|
7
4
|
import type { NpmConfig, SdCapacitorConfig } from "../sd-config.types.js";
|
|
8
5
|
import { configureAndroid, findAndroidSdk, findJava21 } from "./capacitor-android.js";
|
|
6
|
+
import { buildAndroid, configureSigningConfig, copyBuildOutput } from "./capacitor-build.js";
|
|
7
|
+
import { writeCapacitorConfig, updateServerUrl } from "./capacitor-config-writer.js";
|
|
8
|
+
import { setupIcon } from "./capacitor-icon.js";
|
|
9
|
+
import { initCapNpmProject } from "./capacitor-npm-config.js";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* 설정 검증 에러
|
|
@@ -105,12 +106,19 @@ export class Capacitor {
|
|
|
105
106
|
|
|
106
107
|
// 1. Capacitor 프로젝트 초기화
|
|
107
108
|
Capacitor._logger.debug("Capacitor 프로젝트 초기화 시작");
|
|
108
|
-
const changed = await
|
|
109
|
+
const changed = await initCapNpmProject(
|
|
110
|
+
this._capPath,
|
|
111
|
+
this._pkgPath,
|
|
112
|
+
this._config,
|
|
113
|
+
this._npmConfig,
|
|
114
|
+
this._platforms,
|
|
115
|
+
this._exclude,
|
|
116
|
+
);
|
|
109
117
|
Capacitor._logger.debug(`Capacitor 프로젝트 초기화 완료 (changed: ${changed})`);
|
|
110
118
|
|
|
111
119
|
// 2. Capacitor 설정 파일 생성
|
|
112
120
|
Capacitor._logger.debug("Capacitor 설정 파일 생성 시작");
|
|
113
|
-
await this.
|
|
121
|
+
await writeCapacitorConfig(this._capPath, this._config);
|
|
114
122
|
Capacitor._logger.debug("Capacitor 설정 파일 생성 완료");
|
|
115
123
|
|
|
116
124
|
// 3. 플랫폼 관리 (멱등성: 이미 존재하면 스킵)
|
|
@@ -119,9 +127,11 @@ export class Capacitor {
|
|
|
119
127
|
Capacitor._logger.debug("플랫폼 추가 완료");
|
|
120
128
|
|
|
121
129
|
// 4. 아이콘 처리
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
130
|
+
if (this._config.icon != null) {
|
|
131
|
+
Capacitor._logger.debug("아이콘 처리 시작");
|
|
132
|
+
await setupIcon(this._pkgPath, this._capPath, this._config.icon);
|
|
133
|
+
Capacitor._logger.debug("아이콘 처리 완료");
|
|
134
|
+
}
|
|
125
135
|
|
|
126
136
|
// 5. Android 네이티브 설정 구성
|
|
127
137
|
if (this._platforms.includes("android")) {
|
|
@@ -241,192 +251,6 @@ export class Capacitor {
|
|
|
241
251
|
|
|
242
252
|
//#region Private - 초기화
|
|
243
253
|
|
|
244
|
-
/**
|
|
245
|
-
* Capacitor 프로젝트 기본 초기화 (package.json, npm install, cap init)
|
|
246
|
-
*/
|
|
247
|
-
private async _initCap(): Promise<boolean> {
|
|
248
|
-
Capacitor._logger.debug("package.json 설정 시작");
|
|
249
|
-
const depChanged = await this._setupNpmConf();
|
|
250
|
-
const nodeModulesExists = await fsx.exists(pathx.posixResolve(this._capPath, "node_modules"));
|
|
251
|
-
Capacitor._logger.debug(`depChanged: ${depChanged}, nodeModulesExists: ${nodeModulesExists}`);
|
|
252
|
-
|
|
253
|
-
if (!depChanged && nodeModulesExists) {
|
|
254
|
-
Capacitor._logger.debug("의존성 변경 없음");
|
|
255
|
-
return false;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// pnpm-workspace.yaml 생성 (상위 workspace 탐색 차단)
|
|
259
|
-
const workspaceYamlPath = pathx.posixResolve(this._capPath, "pnpm-workspace.yaml");
|
|
260
|
-
if (!(await fsx.exists(workspaceYamlPath))) {
|
|
261
|
-
await fsx.write(workspaceYamlPath, "");
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// pnpm install + 빌드 스크립트 승인
|
|
265
|
-
Capacitor._logger.debug("pnpm install 시작");
|
|
266
|
-
await this._exec("pnpm", ["install"], this._capPath);
|
|
267
|
-
await this._exec("pnpm", ["approve-builds", "--all"], this._capPath);
|
|
268
|
-
Capacitor._logger.debug("pnpm install 완료");
|
|
269
|
-
|
|
270
|
-
// 멱등성: capacitor.config.ts가 없을 때만 cap init 실행
|
|
271
|
-
const configPath = pathx.posixResolve(this._capPath, "capacitor.config.ts");
|
|
272
|
-
if (!(await fsx.exists(configPath))) {
|
|
273
|
-
Capacitor._logger.debug("cap init 시작");
|
|
274
|
-
await this._execCap(["init", this._config.appId, this._config.appId]);
|
|
275
|
-
Capacitor._logger.debug("cap init 완료");
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
// www/index.html placeholder (cap sync/copy에 필요, 이미 존재하면 유지)
|
|
279
|
-
const wwwPath = pathx.posixResolve(this._capPath, "www");
|
|
280
|
-
await fsx.mkdir(wwwPath);
|
|
281
|
-
const wwwIndexPath = pathx.posixResolve(wwwPath, "index.html");
|
|
282
|
-
if (!(await fsx.exists(wwwIndexPath))) {
|
|
283
|
-
await fsx.write(
|
|
284
|
-
wwwIndexPath,
|
|
285
|
-
"<!DOCTYPE html><html><head></head><body></body></html>",
|
|
286
|
-
);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
return true;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* package.json 설정
|
|
294
|
-
*/
|
|
295
|
-
private async _setupNpmConf(): Promise<boolean> {
|
|
296
|
-
const projNpmConfigPath = pathx.posixResolve(this._findWorkspaceRoot(), "package.json");
|
|
297
|
-
|
|
298
|
-
// 루트 package.json 존재 확인
|
|
299
|
-
if (!(await fsx.exists(projNpmConfigPath))) {
|
|
300
|
-
throw new Error(`루트 package.json을 찾을 수 없습니다: ${projNpmConfigPath}`);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
const projNpmConfig = await fsx.readJson<NpmConfig>(projNpmConfigPath);
|
|
304
|
-
|
|
305
|
-
const capNpmConfPath = pathx.posixResolve(this._capPath, "package.json");
|
|
306
|
-
const orgCapNpmConf: NpmConfig = (await fsx.exists(capNpmConfPath))
|
|
307
|
-
? await fsx.readJson<NpmConfig>(capNpmConfPath)
|
|
308
|
-
: { name: "", version: "" };
|
|
309
|
-
|
|
310
|
-
const capNpmConf: NpmConfig = { ...orgCapNpmConf };
|
|
311
|
-
capNpmConf.name = this._config.appId;
|
|
312
|
-
capNpmConf.version = this._npmConfig.version;
|
|
313
|
-
if (projNpmConfig.volta != null) {
|
|
314
|
-
capNpmConf.volta = projNpmConfig.volta;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// 기본 의존성
|
|
318
|
-
capNpmConf.dependencies = capNpmConf.dependencies ?? {};
|
|
319
|
-
capNpmConf.dependencies["@capacitor/core"] = "^7";
|
|
320
|
-
capNpmConf.dependencies["@capacitor/app"] = "^7";
|
|
321
|
-
for (const platform of this._platforms) {
|
|
322
|
-
capNpmConf.dependencies[`@capacitor/${platform}`] = "^7";
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
capNpmConf.devDependencies = capNpmConf.devDependencies ?? {};
|
|
326
|
-
capNpmConf.devDependencies["@capacitor/cli"] = "^7";
|
|
327
|
-
capNpmConf.devDependencies["@capacitor/assets"] = "^3";
|
|
328
|
-
|
|
329
|
-
// 플러그인 패키지 설정
|
|
330
|
-
const mainDeps = {
|
|
331
|
-
...this._npmConfig.dependencies,
|
|
332
|
-
...this._npmConfig.devDependencies,
|
|
333
|
-
...this._npmConfig.peerDependencies,
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
const usePlugins = Object.keys(this._config.plugins ?? {});
|
|
337
|
-
|
|
338
|
-
const prevPlugins = Object.keys(capNpmConf.dependencies).filter(
|
|
339
|
-
(item) =>
|
|
340
|
-
!["@capacitor/core", "@capacitor/android", "@capacitor/ios", "@capacitor/app"].includes(
|
|
341
|
-
item,
|
|
342
|
-
),
|
|
343
|
-
);
|
|
344
|
-
|
|
345
|
-
// 사용하지 않는 플러그인 제거
|
|
346
|
-
for (const prevPlugin of prevPlugins) {
|
|
347
|
-
if (!usePlugins.includes(prevPlugin)) {
|
|
348
|
-
delete capNpmConf.dependencies[prevPlugin];
|
|
349
|
-
Capacitor._logger.debug(`플러그인 제거: ${prevPlugin}`);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
// 새 플러그인 추가
|
|
354
|
-
const pkgRequire = createRequire(pathx.posixResolve(this._pkgPath, "package.json"));
|
|
355
|
-
for (const plugin of usePlugins) {
|
|
356
|
-
const version = mainDeps[plugin] ?? "*";
|
|
357
|
-
if (typeof version === "string" && version.startsWith("workspace:")) {
|
|
358
|
-
// workspace 플러그인은 link: 프로토콜로 실제 경로를 지정
|
|
359
|
-
const pluginPkgJsonPath = pkgRequire.resolve(`${plugin}/package.json`);
|
|
360
|
-
const pluginDir = path.dirname(pluginPkgJsonPath);
|
|
361
|
-
const relativePath = path.relative(this._capPath, pluginDir).replace(/\\/g, "/");
|
|
362
|
-
capNpmConf.dependencies[plugin] = `link:${relativePath}`;
|
|
363
|
-
Capacitor._logger.debug(`workspace 플러그인 (link): ${plugin} → ${relativePath}`);
|
|
364
|
-
} else if (!(plugin in capNpmConf.dependencies)) {
|
|
365
|
-
capNpmConf.dependencies[plugin] = version;
|
|
366
|
-
Capacitor._logger.debug(`플러그인 추가: ${plugin}@${version}`);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
// exclude 패키지 추가
|
|
371
|
-
for (const excludePkg of this._exclude) {
|
|
372
|
-
if (!(excludePkg in capNpmConf.dependencies)) {
|
|
373
|
-
const version = mainDeps[excludePkg] ?? "*";
|
|
374
|
-
capNpmConf.dependencies[excludePkg] = version;
|
|
375
|
-
Capacitor._logger.debug(`exclude 패키지 추가: ${excludePkg}@${version}`);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
// 저장
|
|
380
|
-
await fsx.mkdir(this._capPath);
|
|
381
|
-
await fsx.writeJson(capNpmConfPath, capNpmConf, { space: 2 });
|
|
382
|
-
|
|
383
|
-
// 의존성 변경 여부 확인
|
|
384
|
-
return (
|
|
385
|
-
orgCapNpmConf.volta !== capNpmConf.volta ||
|
|
386
|
-
JSON.stringify(orgCapNpmConf.dependencies) !== JSON.stringify(capNpmConf.dependencies) ||
|
|
387
|
-
JSON.stringify(orgCapNpmConf.devDependencies) !== JSON.stringify(capNpmConf.devDependencies)
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* capacitor.config.ts 생성
|
|
393
|
-
*/
|
|
394
|
-
private async _writeCapConf(): Promise<void> {
|
|
395
|
-
const confPath = pathx.posixResolve(this._capPath, "capacitor.config.ts");
|
|
396
|
-
|
|
397
|
-
// 플러그인 옵션 생성
|
|
398
|
-
const pluginOptions: Record<string, Record<string, unknown>> = {};
|
|
399
|
-
for (const [pluginName, options] of Object.entries(this._config.plugins ?? {})) {
|
|
400
|
-
if (options !== true) {
|
|
401
|
-
const configKey = this._toPascalCase(pluginName.split("/").at(-1)!);
|
|
402
|
-
pluginOptions[configKey] = options;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
const pluginsConfigStr =
|
|
407
|
-
Object.keys(pluginOptions).length > 0
|
|
408
|
-
? JSON.stringify(pluginOptions, null, 2).replace(/^/gm, " ").trim()
|
|
409
|
-
: "{}";
|
|
410
|
-
|
|
411
|
-
const configContent = `import type { CapacitorConfig } from "@capacitor/cli";
|
|
412
|
-
|
|
413
|
-
const config: CapacitorConfig = {
|
|
414
|
-
appId: "${this._config.appId}",
|
|
415
|
-
appName: "${this._config.appName}",
|
|
416
|
-
server: {
|
|
417
|
-
androidScheme: "http",
|
|
418
|
-
cleartext: true
|
|
419
|
-
},
|
|
420
|
-
android: {},
|
|
421
|
-
plugins: ${pluginsConfigStr},
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
export default config;
|
|
425
|
-
`;
|
|
426
|
-
|
|
427
|
-
await fsx.write(confPath, configContent);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
254
|
/**
|
|
431
255
|
* 플랫폼 추가 (멱등성: 이미 존재하면 스킵)
|
|
432
256
|
*/
|
|
@@ -442,71 +266,6 @@ export default config;
|
|
|
442
266
|
}
|
|
443
267
|
}
|
|
444
268
|
|
|
445
|
-
/**
|
|
446
|
-
* 앱 아이콘 처리 (소스 이미지 → 멀티 해상도 아이콘 + 스플래시)
|
|
447
|
-
*/
|
|
448
|
-
private async _setupIcon(): Promise<void> {
|
|
449
|
-
if (this._config.icon == null) return;
|
|
450
|
-
|
|
451
|
-
const iconPath = pathx.posixResolve(this._pkgPath, this._config.icon);
|
|
452
|
-
|
|
453
|
-
if (!(await fsx.exists(iconPath))) {
|
|
454
|
-
Capacitor._logger.warn(`아이콘 파일을 찾을 수 없습니다: ${iconPath}`);
|
|
455
|
-
return;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
try {
|
|
459
|
-
const sharp = (await import("sharp")).default;
|
|
460
|
-
|
|
461
|
-
// 소스 이미지를 리사이즈 (60% of 1024 = ~614px)
|
|
462
|
-
const canvasSize = 1024;
|
|
463
|
-
const contentSize = Math.round(canvasSize * 0.6);
|
|
464
|
-
|
|
465
|
-
const resizedBuffer = await sharp(iconPath)
|
|
466
|
-
.resize(contentSize, contentSize, { fit: "inside" })
|
|
467
|
-
.png()
|
|
468
|
-
.toBuffer();
|
|
469
|
-
|
|
470
|
-
// 1024x1024 투명 캔버스에 합성
|
|
471
|
-
const assetsDir = pathx.posixResolve(this._capPath, "assets");
|
|
472
|
-
await fsx.mkdir(assetsDir);
|
|
473
|
-
const logoPath = pathx.posixResolve(assetsDir, "logo.png");
|
|
474
|
-
|
|
475
|
-
await sharp({
|
|
476
|
-
create: {
|
|
477
|
-
width: canvasSize,
|
|
478
|
-
height: canvasSize,
|
|
479
|
-
channels: 4 as const,
|
|
480
|
-
background: { r: 0, g: 0, b: 0, alpha: 0 },
|
|
481
|
-
},
|
|
482
|
-
})
|
|
483
|
-
.composite([{ input: resizedBuffer, gravity: "center" }])
|
|
484
|
-
.png()
|
|
485
|
-
.toFile(logoPath);
|
|
486
|
-
|
|
487
|
-
// capacitor-assets로 모든 해상도 아이콘/스플래시 생성
|
|
488
|
-
await this._exec(
|
|
489
|
-
"pnpm",
|
|
490
|
-
[
|
|
491
|
-
"exec",
|
|
492
|
-
"capacitor-assets",
|
|
493
|
-
"generate",
|
|
494
|
-
"--iconBackgroundColor",
|
|
495
|
-
"transparent",
|
|
496
|
-
"--splashBackgroundColor",
|
|
497
|
-
"transparent",
|
|
498
|
-
"--logoSplashScale",
|
|
499
|
-
"0.6",
|
|
500
|
-
],
|
|
501
|
-
this._capPath,
|
|
502
|
-
);
|
|
503
|
-
} catch (err) {
|
|
504
|
-
Capacitor._logger.warn(
|
|
505
|
-
`아이콘 생성에 실패했습니다: ${err instanceof Error ? err.message : err}`,
|
|
506
|
-
);
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
|
|
510
269
|
//#endregion
|
|
511
270
|
|
|
512
271
|
//#region Public — 기기 실행
|
|
@@ -520,7 +279,7 @@ export default config;
|
|
|
520
279
|
*/
|
|
521
280
|
async run(url: string): Promise<void> {
|
|
522
281
|
Capacitor._logger.debug(`server.url 설정: ${url}`);
|
|
523
|
-
await this.
|
|
282
|
+
await updateServerUrl(this._capPath, url);
|
|
524
283
|
|
|
525
284
|
for (const platform of this._platforms) {
|
|
526
285
|
// Android + localhost URL이면 adb reverse로 포트 포워딩
|
|
@@ -566,27 +325,6 @@ export default config;
|
|
|
566
325
|
|
|
567
326
|
//#endregion
|
|
568
327
|
|
|
569
|
-
//#region Private — 기기 실행
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* capacitor.config.ts의 server.url을 업데이트한다.
|
|
573
|
-
* WebView가 이 URL에서 웹 에셋을 로드하여 Hot Reload가 동작한다.
|
|
574
|
-
*/
|
|
575
|
-
private async _updateServerUrl(url: string): Promise<void> {
|
|
576
|
-
const configPath = pathx.posixResolve(this._capPath, "capacitor.config.ts");
|
|
577
|
-
let content = await fsx.read(configPath);
|
|
578
|
-
|
|
579
|
-
if (content.includes("url:")) {
|
|
580
|
-
content = content.replace(/url:\s*"[^"]*"/, `url: "${url}"`);
|
|
581
|
-
} else if (content.includes("server:")) {
|
|
582
|
-
content = content.replace(/server:\s*\{/, `server: {\n url: "${url}",`);
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
await fsx.write(configPath, content);
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
//#endregion
|
|
589
|
-
|
|
590
328
|
//#region Public — 빌드
|
|
591
329
|
|
|
592
330
|
/**
|
|
@@ -615,7 +353,11 @@ export default config;
|
|
|
615
353
|
const signConfig = this._config.platform?.android?.sign;
|
|
616
354
|
if (!isDebug && signConfig != null) {
|
|
617
355
|
Capacitor._logger.debug("서명 설정 시작");
|
|
618
|
-
await
|
|
356
|
+
await configureSigningConfig(
|
|
357
|
+
this._pkgPath,
|
|
358
|
+
pathx.posixResolve(this._capPath, "android"),
|
|
359
|
+
signConfig,
|
|
360
|
+
);
|
|
619
361
|
Capacitor._logger.debug("서명 설정 완료");
|
|
620
362
|
} else if (!isDebug) {
|
|
621
363
|
Capacitor._logger.warn("서명 설정이 없어 unsigned 빌드가 생성됩니다.");
|
|
@@ -623,173 +365,22 @@ export default config;
|
|
|
623
365
|
|
|
624
366
|
// 4. Gradle 빌드
|
|
625
367
|
Capacitor._logger.debug("Gradle 빌드 시작");
|
|
626
|
-
await this.
|
|
368
|
+
await buildAndroid(this._capPath, buildType, isBundle);
|
|
627
369
|
Capacitor._logger.debug("Gradle 빌드 완료");
|
|
628
370
|
|
|
629
371
|
// 5. 빌드 산출물 복사
|
|
630
372
|
Capacitor._logger.debug("빌드 산출물 복사 시작");
|
|
631
|
-
await
|
|
632
|
-
Capacitor._logger.debug("빌드 산출물 복사 완료");
|
|
633
|
-
|
|
634
|
-
Capacitor._logger.debug("build 완료");
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
//#endregion
|
|
638
|
-
|
|
639
|
-
//#region Private — 빌드
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
* 서명 설정을 build.gradle에 추가하고 keystore 파일을 복사
|
|
643
|
-
*/
|
|
644
|
-
private async _configureSigningConfig(
|
|
645
|
-
androidPath: string,
|
|
646
|
-
sign: import("../sd-config.types.js").SdCapacitorSignConfig,
|
|
647
|
-
): Promise<void> {
|
|
648
|
-
// keystore 파일 확인 및 복사
|
|
649
|
-
const keystoreSrc = pathx.posixResolve(this._pkgPath, sign.keystore);
|
|
650
|
-
if (!(await fsx.exists(keystoreSrc))) {
|
|
651
|
-
throw new Error(`keystore 파일을 찾을 수 없습니다: ${keystoreSrc}`);
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
const keystoreDest = pathx.posixResolve(androidPath, "app", "android.keystore");
|
|
655
|
-
await fsx.copy(keystoreSrc, keystoreDest);
|
|
656
|
-
|
|
657
|
-
// build.gradle에 signingConfigs 추가
|
|
658
|
-
const buildGradlePath = pathx.posixResolve(androidPath, "app/build.gradle");
|
|
659
|
-
let content = await fsx.read(buildGradlePath);
|
|
660
|
-
|
|
661
|
-
// 이미 signingConfigs가 있으면 스킵
|
|
662
|
-
if (content.includes("signingConfigs")) return;
|
|
663
|
-
|
|
664
|
-
const storeType = sign.keystoreType ?? "jks";
|
|
665
|
-
const escapeGroovy = (s: string) => s.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
666
|
-
const escapedStorePassword = escapeGroovy(sign.storePassword);
|
|
667
|
-
const escapedKeyPassword = escapeGroovy(sign.password);
|
|
668
|
-
|
|
669
|
-
const signingBlock = ` signingConfigs {
|
|
670
|
-
release {
|
|
671
|
-
storeFile file("android.keystore")
|
|
672
|
-
storePassword '${escapedStorePassword}'
|
|
673
|
-
keyAlias '${sign.alias}'
|
|
674
|
-
keyPassword '${escapedKeyPassword}'
|
|
675
|
-
storeType "${storeType}"
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
`;
|
|
679
|
-
|
|
680
|
-
// signingConfigs 블록을 buildTypes 앞에 삽입
|
|
681
|
-
content = content.replace(/(\s*buildTypes\s*\{)/, (match) => `\n${signingBlock}${match}`);
|
|
682
|
-
|
|
683
|
-
// buildTypes.release에 signingConfig 추가
|
|
684
|
-
content = content.replace(
|
|
685
|
-
/(buildTypes\s*\{[\s\S]*?release\s*\{)/,
|
|
686
|
-
"$1\n signingConfig signingConfigs.release",
|
|
687
|
-
);
|
|
688
|
-
|
|
689
|
-
await fsx.write(buildGradlePath, content);
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* Gradle 빌드 실행 (cross-platform)
|
|
694
|
-
*/
|
|
695
|
-
private async _buildAndroid(buildType: string, isBundle: boolean): Promise<void> {
|
|
696
|
-
let gradleTask: string;
|
|
697
|
-
if (buildType === "debug") {
|
|
698
|
-
gradleTask = "assembleDebug";
|
|
699
|
-
} else if (isBundle) {
|
|
700
|
-
gradleTask = "bundleRelease";
|
|
701
|
-
} else {
|
|
702
|
-
gradleTask = "assembleRelease";
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
const androidPath = pathx.posixResolve(this._capPath, "android");
|
|
706
|
-
const isWindows = process.platform === "win32";
|
|
707
|
-
|
|
708
|
-
if (isWindows) {
|
|
709
|
-
Capacitor._logger.debug(`Gradle 실행: cmd /c gradlew.bat ${gradleTask}`);
|
|
710
|
-
await this._exec("cmd", ["/c", "gradlew.bat", gradleTask, "--no-daemon"], androidPath);
|
|
711
|
-
} else {
|
|
712
|
-
const gradlew = pathx.posixResolve(androidPath, "gradlew");
|
|
713
|
-
Capacitor._logger.debug(`Gradle 실행: ${gradlew} ${gradleTask}`);
|
|
714
|
-
await this._exec(gradlew, [gradleTask, "--no-daemon"], androidPath);
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* 빌드 산출물을 출력 경로에 복사
|
|
720
|
-
*/
|
|
721
|
-
private async _copyBuildOutput(
|
|
722
|
-
outPath: string,
|
|
723
|
-
buildType: string,
|
|
724
|
-
isBundle: boolean,
|
|
725
|
-
): Promise<void> {
|
|
726
|
-
const ext = isBundle ? "aab" : "apk";
|
|
727
|
-
const outputType = isBundle ? "bundle" : "apk";
|
|
728
|
-
const androidBuildPath = pathx.posixResolve(
|
|
373
|
+
await copyBuildOutput(
|
|
729
374
|
this._capPath,
|
|
730
|
-
|
|
731
|
-
outputType,
|
|
375
|
+
outPath,
|
|
732
376
|
buildType,
|
|
377
|
+
isBundle,
|
|
378
|
+
this._config.appName,
|
|
379
|
+
this._npmConfig.version,
|
|
733
380
|
);
|
|
381
|
+
Capacitor._logger.debug("빌드 산출물 복사 완료");
|
|
734
382
|
|
|
735
|
-
|
|
736
|
-
Capacitor._logger.debug(`빌드 산출물 탐색: ${androidBuildPath}`);
|
|
737
|
-
const candidates = await fsx.glob(pathx.posixResolve(androidBuildPath, `app-*.${ext}`));
|
|
738
|
-
if (candidates.length === 0) {
|
|
739
|
-
throw new Error(`빌드 산출물을 찾을 수 없습니다: ${androidBuildPath}`);
|
|
740
|
-
}
|
|
741
|
-
const builtFile = candidates[0];
|
|
742
|
-
Capacitor._logger.debug(`빌드 산출물: ${builtFile}`);
|
|
743
|
-
const isUnsigned = builtFile.includes("unsigned");
|
|
744
|
-
|
|
745
|
-
// 출력 디렉토리 생성
|
|
746
|
-
const androidOutPath = pathx.posixResolve(outPath, "android");
|
|
747
|
-
const updatesPath = pathx.posixResolve(androidOutPath, "updates");
|
|
748
|
-
await fsx.mkdir(androidOutPath);
|
|
749
|
-
await fsx.mkdir(updatesPath);
|
|
750
|
-
|
|
751
|
-
// latest 파일명 결정
|
|
752
|
-
const unsignedSuffix = isUnsigned ? "-unsigned" : "";
|
|
753
|
-
const latestName = `${this._config.appName}${unsignedSuffix}-latest.${ext}`;
|
|
754
|
-
const versionedName = `${this._npmConfig.version}.${ext}`;
|
|
755
|
-
|
|
756
|
-
// 복사
|
|
757
|
-
await fsx.copy(builtFile, pathx.posixResolve(androidOutPath, latestName));
|
|
758
|
-
await fsx.copy(builtFile, pathx.posixResolve(updatesPath, versionedName));
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
//#endregion
|
|
762
|
-
|
|
763
|
-
//#region Private - 유틸리티
|
|
764
|
-
|
|
765
|
-
/**
|
|
766
|
-
* workspace:* 플러그인을 .capacitor/node_modules/에 symlink로 연결한다.
|
|
767
|
-
* cap sync는 플러그인의 android/ 네이티브 코드만 필요하므로 JS 의존성 resolve 불필요.
|
|
768
|
-
*/
|
|
769
|
-
/**
|
|
770
|
-
* pnpm-workspace.yaml이 있는 워크스페이스 루트 디렉토리를 찾는다.
|
|
771
|
-
*/
|
|
772
|
-
private _findWorkspaceRoot(): string {
|
|
773
|
-
let dir = this._pkgPath;
|
|
774
|
-
while (true) {
|
|
775
|
-
const parent = path.dirname(dir);
|
|
776
|
-
if (parent === dir) {
|
|
777
|
-
throw new Error(`워크스페이스 루트를 찾을 수 없습니다: ${this._pkgPath}`);
|
|
778
|
-
}
|
|
779
|
-
if (existsSync(pathx.posixResolve(parent, "pnpm-workspace.yaml"))) {
|
|
780
|
-
return parent;
|
|
781
|
-
}
|
|
782
|
-
dir = parent;
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
/**
|
|
787
|
-
* 문자열을 PascalCase로 변환
|
|
788
|
-
*/
|
|
789
|
-
private _toPascalCase(str: string): string {
|
|
790
|
-
return str
|
|
791
|
-
.replace(/[-_](.)/g, (_, c: string) => c.toUpperCase())
|
|
792
|
-
.replace(/^./, (c) => c.toUpperCase());
|
|
383
|
+
Capacitor._logger.debug("build 완료");
|
|
793
384
|
}
|
|
794
385
|
|
|
795
386
|
//#endregion
|
package/src/commands/check.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cpx } from "@simplysm/core-node";
|
|
2
2
|
import { err as errNs } from "@simplysm/core-common";
|
|
3
3
|
import { executeTypecheck, type TypecheckResult } from "../orchestrators/TypecheckOrchestrator";
|
|
4
|
-
import { executeLint, type LintResult } from "../
|
|
4
|
+
import { executeLint, type LintResult } from "../lint/lint-core";
|
|
5
5
|
import { consola } from "consola";
|
|
6
6
|
import { validateTargets, discoverWorkspacePackages } from "../utils/package-utils";
|
|
7
|
-
import { runLintInWorker } from "../
|
|
7
|
+
import { runLintInWorker } from "../lint/lint-utils";
|
|
8
8
|
|
|
9
9
|
//#region Types
|
|
10
10
|
|
package/src/commands/dev.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
type
|
|
4
|
-
} from "../orchestrators/
|
|
2
|
+
DevOrchestrator,
|
|
3
|
+
type DevOrchestratorOptions,
|
|
4
|
+
} from "../orchestrators/DevOrchestrator";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* DevOrchestrator를 통해 서버 패키지를 개발 모드로 실행한다.
|
|
8
8
|
*
|
|
9
9
|
* @param options - 개발 모드 실행 옵션 (targets, options)
|
|
10
10
|
* @returns 종료 시그널 수신 시 resolve
|
|
11
11
|
*/
|
|
12
|
-
export async function runDev(options:
|
|
13
|
-
const orchestrator = new
|
|
12
|
+
export async function runDev(options: DevOrchestratorOptions): Promise<void> {
|
|
13
|
+
const orchestrator = new DevOrchestrator(options);
|
|
14
14
|
|
|
15
15
|
try {
|
|
16
16
|
await orchestrator.initialize();
|
package/src/commands/lint.ts
CHANGED