@simplysm/sd-cli 12.16.27 → 13.0.0-beta.12
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/README.md +529 -0
- package/dist/builders/BaseBuilder.js +86 -0
- package/dist/builders/BaseBuilder.js.map +7 -0
- package/dist/builders/DtsBuilder.js +109 -0
- package/dist/builders/DtsBuilder.js.map +7 -0
- package/dist/builders/LibraryBuilder.js +122 -0
- package/dist/builders/LibraryBuilder.js.map +7 -0
- package/dist/builders/index.js +9 -0
- package/dist/builders/index.js.map +7 -0
- package/dist/builders/types.js +1 -0
- package/dist/builders/types.js.map +7 -0
- package/dist/capacitor/capacitor.js +619 -0
- package/dist/capacitor/capacitor.js.map +7 -0
- package/dist/commands/add-client.js +83 -0
- package/dist/commands/add-client.js.map +7 -0
- package/dist/commands/add-server.js +91 -0
- package/dist/commands/add-server.js.map +7 -0
- package/dist/commands/build.js +310 -0
- package/dist/commands/build.js.map +7 -0
- package/dist/commands/dev.js +426 -0
- package/dist/commands/dev.js.map +7 -0
- package/dist/commands/device.js +107 -0
- package/dist/commands/device.js.map +7 -0
- package/dist/commands/init.js +58 -0
- package/dist/commands/init.js.map +7 -0
- package/dist/commands/lint.js +138 -0
- package/dist/commands/lint.js.map +7 -0
- package/dist/commands/publish.js +401 -0
- package/dist/commands/publish.js.map +7 -0
- package/dist/commands/typecheck.js +197 -0
- package/dist/commands/typecheck.js.map +7 -0
- package/dist/commands/watch.js +19 -0
- package/dist/commands/watch.js.map +7 -0
- package/dist/core-common/src/common.types.d.ts +74 -0
- package/dist/core-common/src/common.types.d.ts.map +1 -0
- package/dist/core-common/src/env.d.ts +6 -0
- package/dist/core-common/src/env.d.ts.map +1 -0
- package/dist/core-common/src/errors/argument-error.d.ts +25 -0
- package/dist/core-common/src/errors/argument-error.d.ts.map +1 -0
- package/dist/core-common/src/errors/not-implemented-error.d.ts +29 -0
- package/dist/core-common/src/errors/not-implemented-error.d.ts.map +1 -0
- package/dist/core-common/src/errors/sd-error.d.ts +27 -0
- package/dist/core-common/src/errors/sd-error.d.ts.map +1 -0
- package/dist/core-common/src/errors/timeout-error.d.ts +31 -0
- package/dist/core-common/src/errors/timeout-error.d.ts.map +1 -0
- package/dist/core-common/src/extensions/arr-ext.d.ts +15 -0
- package/dist/core-common/src/extensions/arr-ext.d.ts.map +1 -0
- package/dist/core-common/src/extensions/arr-ext.helpers.d.ts +19 -0
- package/dist/core-common/src/extensions/arr-ext.helpers.d.ts.map +1 -0
- package/dist/core-common/src/extensions/arr-ext.types.d.ts +215 -0
- package/dist/core-common/src/extensions/arr-ext.types.d.ts.map +1 -0
- package/dist/core-common/src/extensions/map-ext.d.ts +57 -0
- package/dist/core-common/src/extensions/map-ext.d.ts.map +1 -0
- package/dist/core-common/src/extensions/set-ext.d.ts +36 -0
- package/dist/core-common/src/extensions/set-ext.d.ts.map +1 -0
- package/dist/core-common/src/features/debounce-queue.d.ts +53 -0
- package/dist/core-common/src/features/debounce-queue.d.ts.map +1 -0
- package/dist/core-common/src/features/event-emitter.d.ts +66 -0
- package/dist/core-common/src/features/event-emitter.d.ts.map +1 -0
- package/dist/core-common/src/features/serial-queue.d.ts +47 -0
- package/dist/core-common/src/features/serial-queue.d.ts.map +1 -0
- package/dist/core-common/src/index.d.ts +32 -0
- package/dist/core-common/src/index.d.ts.map +1 -0
- package/dist/core-common/src/types/date-only.d.ts +152 -0
- package/dist/core-common/src/types/date-only.d.ts.map +1 -0
- package/dist/core-common/src/types/date-time.d.ts +96 -0
- package/dist/core-common/src/types/date-time.d.ts.map +1 -0
- package/dist/core-common/src/types/lazy-gc-map.d.ts +80 -0
- package/dist/core-common/src/types/lazy-gc-map.d.ts.map +1 -0
- package/dist/core-common/src/types/time.d.ts +68 -0
- package/dist/core-common/src/types/time.d.ts.map +1 -0
- package/dist/core-common/src/types/uuid.d.ts +35 -0
- package/dist/core-common/src/types/uuid.d.ts.map +1 -0
- package/dist/core-common/src/utils/bytes.d.ts +51 -0
- package/dist/core-common/src/utils/bytes.d.ts.map +1 -0
- package/dist/core-common/src/utils/date-format.d.ts +90 -0
- package/dist/core-common/src/utils/date-format.d.ts.map +1 -0
- package/dist/core-common/src/utils/json.d.ts +34 -0
- package/dist/core-common/src/utils/json.d.ts.map +1 -0
- package/dist/core-common/src/utils/num.d.ts +60 -0
- package/dist/core-common/src/utils/num.d.ts.map +1 -0
- package/dist/core-common/src/utils/obj.d.ts +258 -0
- package/dist/core-common/src/utils/obj.d.ts.map +1 -0
- package/dist/core-common/src/utils/path.d.ts +23 -0
- package/dist/core-common/src/utils/path.d.ts.map +1 -0
- package/dist/core-common/src/utils/primitive.d.ts +18 -0
- package/dist/core-common/src/utils/primitive.d.ts.map +1 -0
- package/dist/core-common/src/utils/str.d.ts +103 -0
- package/dist/core-common/src/utils/str.d.ts.map +1 -0
- package/dist/core-common/src/utils/template-strings.d.ts +84 -0
- package/dist/core-common/src/utils/template-strings.d.ts.map +1 -0
- package/dist/core-common/src/utils/transferable.d.ts +47 -0
- package/dist/core-common/src/utils/transferable.d.ts.map +1 -0
- package/dist/core-common/src/utils/wait.d.ts +19 -0
- package/dist/core-common/src/utils/wait.d.ts.map +1 -0
- package/dist/core-common/src/utils/xml.d.ts +36 -0
- package/dist/core-common/src/utils/xml.d.ts.map +1 -0
- package/dist/core-common/src/zip/sd-zip.d.ts +80 -0
- package/dist/core-common/src/zip/sd-zip.d.ts.map +1 -0
- package/dist/core-node/src/features/fs-watcher.d.ts +70 -0
- package/dist/core-node/src/features/fs-watcher.d.ts.map +1 -0
- package/dist/core-node/src/index.d.ts +7 -0
- package/dist/core-node/src/index.d.ts.map +1 -0
- package/dist/core-node/src/utils/fs.d.ts +197 -0
- package/dist/core-node/src/utils/fs.d.ts.map +1 -0
- package/dist/core-node/src/utils/path.d.ts +75 -0
- package/dist/core-node/src/utils/path.d.ts.map +1 -0
- package/dist/core-node/src/worker/create-worker.d.ts +23 -0
- package/dist/core-node/src/worker/create-worker.d.ts.map +1 -0
- package/dist/core-node/src/worker/types.d.ts +67 -0
- package/dist/core-node/src/worker/types.d.ts.map +1 -0
- package/dist/core-node/src/worker/worker.d.ts +27 -0
- package/dist/core-node/src/worker/worker.d.ts.map +1 -0
- package/dist/electron/electron.js +242 -0
- package/dist/electron/electron.js.map +7 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +7 -0
- package/dist/infra/ResultCollector.js +59 -0
- package/dist/infra/ResultCollector.js.map +7 -0
- package/dist/infra/SignalHandler.js +44 -0
- package/dist/infra/SignalHandler.js.map +7 -0
- package/dist/infra/WorkerManager.js +56 -0
- package/dist/infra/WorkerManager.js.map +7 -0
- package/dist/infra/index.js +9 -0
- package/dist/infra/index.js.map +7 -0
- package/dist/orchestrators/WatchOrchestrator.js +135 -0
- package/dist/orchestrators/WatchOrchestrator.js.map +7 -0
- package/dist/orchestrators/index.js +5 -0
- package/dist/orchestrators/index.js.map +7 -0
- package/dist/sd-cli/src/builders/BaseBuilder.d.ts +77 -0
- package/dist/sd-cli/src/builders/BaseBuilder.d.ts.map +1 -0
- package/dist/sd-cli/src/builders/DtsBuilder.d.ts +22 -0
- package/dist/sd-cli/src/builders/DtsBuilder.d.ts.map +1 -0
- package/dist/sd-cli/src/builders/LibraryBuilder.d.ts +22 -0
- package/dist/sd-cli/src/builders/LibraryBuilder.d.ts.map +1 -0
- package/dist/sd-cli/src/builders/index.d.ts +5 -0
- package/dist/sd-cli/src/builders/index.d.ts.map +1 -0
- package/dist/sd-cli/src/builders/types.d.ts +49 -0
- package/dist/sd-cli/src/builders/types.d.ts.map +1 -0
- package/dist/sd-cli/src/capacitor/capacitor.d.ts +131 -0
- package/dist/sd-cli/src/capacitor/capacitor.d.ts.map +1 -0
- package/dist/sd-cli/src/commands/add-client.d.ts +18 -0
- package/dist/sd-cli/src/commands/add-client.d.ts.map +1 -0
- package/dist/sd-cli/src/commands/add-server.d.ts +18 -0
- package/dist/sd-cli/src/commands/add-server.d.ts.map +1 -0
- package/dist/sd-cli/src/commands/build.d.ts +25 -0
- package/dist/sd-cli/src/commands/build.d.ts.map +1 -0
- package/dist/sd-cli/src/commands/dev.d.ts +23 -0
- package/dist/sd-cli/src/commands/dev.d.ts.map +1 -0
- package/dist/sd-cli/src/commands/device.d.ts +22 -0
- package/dist/sd-cli/src/commands/device.d.ts.map +1 -0
- package/dist/sd-cli/src/commands/init.d.ts +15 -0
- package/dist/sd-cli/src/commands/init.d.ts.map +1 -0
- package/dist/sd-cli/src/commands/lint.d.ts +31 -0
- package/dist/sd-cli/src/commands/lint.d.ts.map +1 -0
- package/dist/sd-cli/src/commands/publish.d.ts +27 -0
- package/dist/sd-cli/src/commands/publish.d.ts.map +1 -0
- package/dist/sd-cli/src/commands/typecheck.d.ts +39 -0
- package/dist/sd-cli/src/commands/typecheck.d.ts.map +1 -0
- package/dist/sd-cli/src/commands/watch.d.ts +20 -0
- package/dist/sd-cli/src/commands/watch.d.ts.map +1 -0
- package/dist/sd-cli/src/electron/electron.d.ts +79 -0
- package/dist/sd-cli/src/electron/electron.d.ts.map +1 -0
- package/dist/sd-cli/src/index.d.ts +2 -0
- package/dist/sd-cli/src/index.d.ts.map +1 -0
- package/dist/sd-cli/src/infra/ResultCollector.d.ts +56 -0
- package/dist/sd-cli/src/infra/ResultCollector.d.ts.map +1 -0
- package/dist/sd-cli/src/infra/SignalHandler.d.ts +26 -0
- package/dist/sd-cli/src/infra/SignalHandler.d.ts.map +1 -0
- package/dist/sd-cli/src/infra/WorkerManager.d.ts +40 -0
- package/dist/sd-cli/src/infra/WorkerManager.d.ts.map +1 -0
- package/dist/sd-cli/src/infra/index.d.ts +4 -0
- package/dist/sd-cli/src/infra/index.d.ts.map +1 -0
- package/dist/sd-cli/src/orchestrators/WatchOrchestrator.d.ts +48 -0
- package/dist/sd-cli/src/orchestrators/WatchOrchestrator.d.ts.map +1 -0
- package/dist/sd-cli/src/orchestrators/index.d.ts +2 -0
- package/dist/sd-cli/src/orchestrators/index.d.ts.map +1 -0
- package/dist/sd-cli/src/sd-cli.d.ts +9 -0
- package/dist/sd-cli/src/sd-cli.d.ts.map +1 -0
- package/dist/sd-cli/src/sd-config.types.d.ts +222 -0
- package/dist/sd-cli/src/sd-config.types.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/build-env.d.ts +5 -0
- package/dist/sd-cli/src/utils/build-env.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/config-editor.d.ts +17 -0
- package/dist/sd-cli/src/utils/config-editor.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/esbuild-config.d.ts +49 -0
- package/dist/sd-cli/src/utils/esbuild-config.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/listr-manager.d.ts +37 -0
- package/dist/sd-cli/src/utils/listr-manager.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/output-utils.d.ts +21 -0
- package/dist/sd-cli/src/utils/output-utils.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/package-utils.d.ts +29 -0
- package/dist/sd-cli/src/utils/package-utils.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/sd-config.d.ts +12 -0
- package/dist/sd-cli/src/utils/sd-config.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/spawn.d.ts +26 -0
- package/dist/sd-cli/src/utils/spawn.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/tailwind-config-deps.d.ts +8 -0
- package/dist/sd-cli/src/utils/tailwind-config-deps.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/template.d.ts +14 -0
- package/dist/sd-cli/src/utils/template.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/tsconfig.d.ts +35 -0
- package/dist/sd-cli/src/utils/tsconfig.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/typecheck-serialization.d.ts +28 -0
- package/dist/sd-cli/src/utils/typecheck-serialization.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/vite-config.d.ts +25 -0
- package/dist/sd-cli/src/utils/vite-config.d.ts.map +1 -0
- package/dist/sd-cli/src/utils/worker-events.d.ts +53 -0
- package/dist/sd-cli/src/utils/worker-events.d.ts.map +1 -0
- package/dist/sd-cli/src/workers/client.worker.d.ts +82 -0
- package/dist/sd-cli/src/workers/client.worker.d.ts.map +1 -0
- package/dist/sd-cli/src/workers/dts.worker.d.ts +73 -0
- package/dist/sd-cli/src/workers/dts.worker.d.ts.map +1 -0
- package/dist/sd-cli/src/workers/library.worker.d.ts +73 -0
- package/dist/sd-cli/src/workers/library.worker.d.ts.map +1 -0
- package/dist/sd-cli/src/workers/server-runtime.worker.d.ts +40 -0
- package/dist/sd-cli/src/workers/server-runtime.worker.d.ts.map +1 -0
- package/dist/sd-cli/src/workers/server.worker.d.ts +76 -0
- package/dist/sd-cli/src/workers/server.worker.d.ts.map +1 -0
- package/dist/sd-cli.js +239 -76
- package/dist/sd-cli.js.map +7 -0
- package/dist/sd-config.types.js +1 -0
- package/dist/sd-config.types.js.map +7 -0
- package/dist/storage/src/clients/ftp-storage-client.d.ts +56 -0
- package/dist/storage/src/clients/ftp-storage-client.d.ts.map +1 -0
- package/dist/storage/src/clients/sftp-storage-client.d.ts +48 -0
- package/dist/storage/src/clients/sftp-storage-client.d.ts.map +1 -0
- package/dist/storage/src/index.d.ts +7 -0
- package/dist/storage/src/index.d.ts.map +1 -0
- package/dist/storage/src/storage-factory.d.ts +20 -0
- package/dist/storage/src/storage-factory.d.ts.map +1 -0
- package/dist/storage/src/types/storage-conn-config.d.ts +7 -0
- package/dist/storage/src/types/storage-conn-config.d.ts.map +1 -0
- package/dist/storage/src/types/storage-type.d.ts +2 -0
- package/dist/storage/src/types/storage-type.d.ts.map +1 -0
- package/dist/storage/src/types/storage.d.ts +19 -0
- package/dist/storage/src/types/storage.d.ts.map +1 -0
- package/dist/utils/build-env.js +12 -0
- package/dist/utils/build-env.js.map +7 -0
- package/dist/utils/config-editor.js +77 -0
- package/dist/utils/config-editor.js.map +7 -0
- package/dist/utils/esbuild-config.js +44 -0
- package/dist/utils/esbuild-config.js.map +7 -0
- package/dist/utils/listr-manager.js +59 -0
- package/dist/utils/listr-manager.js.map +7 -0
- package/dist/utils/output-utils.js +40 -0
- package/dist/utils/output-utils.js.map +7 -0
- package/dist/utils/package-utils.js +28 -0
- package/dist/utils/package-utils.js.map +7 -0
- package/dist/utils/sd-config.js +24 -0
- package/dist/utils/sd-config.js.map +7 -0
- package/dist/utils/spawn.js +49 -0
- package/dist/utils/spawn.js.map +7 -0
- package/dist/utils/tailwind-config-deps.js +80 -0
- package/dist/utils/tailwind-config-deps.js.map +7 -0
- package/dist/utils/template.js +28 -0
- package/dist/utils/template.js.map +7 -0
- package/dist/utils/tsconfig.js +62 -0
- package/dist/utils/tsconfig.js.map +7 -0
- package/dist/utils/typecheck-serialization.js +46 -0
- package/dist/utils/typecheck-serialization.js.map +7 -0
- package/dist/utils/vite-config.js +108 -0
- package/dist/utils/vite-config.js.map +7 -0
- package/dist/utils/worker-events.js +38 -0
- package/dist/utils/worker-events.js.map +7 -0
- package/dist/workers/client.worker.js +94 -0
- package/dist/workers/client.worker.js.map +7 -0
- package/dist/workers/dts.worker.js +210 -0
- package/dist/workers/dts.worker.js.map +7 -0
- package/dist/workers/library.worker.js +118 -0
- package/dist/workers/library.worker.js.map +7 -0
- package/dist/workers/server-runtime.worker.js +85 -0
- package/dist/workers/server-runtime.worker.js.map +7 -0
- package/dist/workers/server.worker.js +114 -42
- package/dist/workers/server.worker.js.map +7 -0
- package/package.json +32 -29
- package/dist/entry/SdCliAiCommand.d.ts +0 -3
- package/dist/entry/SdCliAiCommand.js +0 -91
- package/dist/entry/SdCliCapacitor.d.ts +0 -35
- package/dist/entry/SdCliCapacitor.js +0 -565
- package/dist/entry/SdCliCordova.d.ts +0 -49
- package/dist/entry/SdCliCordova.js +0 -394
- package/dist/entry/SdCliElectron.d.ts +0 -22
- package/dist/entry/SdCliElectron.js +0 -128
- package/dist/entry/SdCliLocalUpdate.d.ts +0 -11
- package/dist/entry/SdCliLocalUpdate.js +0 -83
- package/dist/entry/SdCliPostInstall.d.ts +0 -3
- package/dist/entry/SdCliPostInstall.js +0 -48
- package/dist/entry/SdCliProject.d.ts +0 -24
- package/dist/entry/SdCliProject.js +0 -336
- package/dist/pkg-builders/SdBuildRunnerBase.d.ts +0 -14
- package/dist/pkg-builders/SdBuildRunnerBase.js +0 -22
- package/dist/pkg-builders/SdProjectBuildRunner.d.ts +0 -25
- package/dist/pkg-builders/SdProjectBuildRunner.js +0 -264
- package/dist/pkg-builders/client/SdCliNgRoutesFileGenerator.d.ts +0 -9
- package/dist/pkg-builders/client/SdCliNgRoutesFileGenerator.js +0 -89
- package/dist/pkg-builders/client/SdClientBuildRunner.d.ts +0 -10
- package/dist/pkg-builders/client/SdClientBuildRunner.js +0 -113
- package/dist/pkg-builders/client/SdNgBundler.d.ts +0 -38
- package/dist/pkg-builders/client/SdNgBundler.js +0 -525
- package/dist/pkg-builders/client/SdNgBundlerContext.d.ts +0 -25
- package/dist/pkg-builders/client/SdNgBundlerContext.js +0 -104
- package/dist/pkg-builders/client/createSdNgPlugin.d.ts +0 -5
- package/dist/pkg-builders/client/createSdNgPlugin.js +0 -133
- package/dist/pkg-builders/commons/SdWorkerPathPlugin.d.ts +0 -2
- package/dist/pkg-builders/commons/SdWorkerPathPlugin.js +0 -91
- package/dist/pkg-builders/lib/SdCliDbContextFileGenerator.d.ts +0 -9
- package/dist/pkg-builders/lib/SdCliDbContextFileGenerator.js +0 -138
- package/dist/pkg-builders/lib/SdCliIndexFileGenerator.d.ts +0 -11
- package/dist/pkg-builders/lib/SdCliIndexFileGenerator.js +0 -79
- package/dist/pkg-builders/lib/SdJsLibBuildRunner.d.ts +0 -8
- package/dist/pkg-builders/lib/SdJsLibBuildRunner.js +0 -44
- package/dist/pkg-builders/lib/SdTsLibBuildRunner.d.ts +0 -8
- package/dist/pkg-builders/lib/SdTsLibBuildRunner.js +0 -34
- package/dist/pkg-builders/lib/SdTsLibBuilder.d.ts +0 -10
- package/dist/pkg-builders/lib/SdTsLibBuilder.js +0 -54
- package/dist/pkg-builders/server/SdServerBuildRunner.d.ts +0 -10
- package/dist/pkg-builders/server/SdServerBuildRunner.js +0 -228
- package/dist/pkg-builders/server/SdServerBundler.d.ts +0 -17
- package/dist/pkg-builders/server/SdServerBundler.js +0 -174
- package/dist/pkg-builders/server/createSdServerPlugin.d.ts +0 -5
- package/dist/pkg-builders/server/createSdServerPlugin.js +0 -53
- package/dist/sd-cli-entry.d.ts +0 -2
- package/dist/sd-cli-entry.js +0 -230
- package/dist/sd-cli.d.ts +0 -2
- package/dist/ts-compiler/ScopePathSet.d.ts +0 -7
- package/dist/ts-compiler/ScopePathSet.js +0 -12
- package/dist/ts-compiler/SdDepAnalyzer.d.ts +0 -15
- package/dist/ts-compiler/SdDepAnalyzer.js +0 -299
- package/dist/ts-compiler/SdDepCache.d.ts +0 -77
- package/dist/ts-compiler/SdDepCache.js +0 -248
- package/dist/ts-compiler/SdStyleBundler.d.ts +0 -23
- package/dist/ts-compiler/SdStyleBundler.js +0 -131
- package/dist/ts-compiler/SdTsCompiler.d.ts +0 -29
- package/dist/ts-compiler/SdTsCompiler.js +0 -420
- package/dist/types/build/ISdBuildMessage.d.ts +0 -10
- package/dist/types/build/ISdBuildMessage.js +0 -1
- package/dist/types/build/ISdBuildResult.d.ts +0 -8
- package/dist/types/build/ISdBuildResult.js +0 -1
- package/dist/types/build/ISdTsCompilerOptions.d.ts +0 -10
- package/dist/types/build/ISdTsCompilerOptions.js +0 -1
- package/dist/types/build/ISdTsCompilerResult.d.ts +0 -14
- package/dist/types/build/ISdTsCompilerResult.js +0 -1
- package/dist/types/build/TStylesheetBundlingResult.d.ts +0 -12
- package/dist/types/build/TStylesheetBundlingResult.js +0 -1
- package/dist/types/common-config/INpmConfig.d.ts +0 -17
- package/dist/types/common-config/INpmConfig.js +0 -1
- package/dist/types/common-config/ITsConfig.d.ts +0 -7
- package/dist/types/common-config/ITsConfig.js +0 -1
- package/dist/types/config/ISdProjectConfig.d.ts +0 -144
- package/dist/types/config/ISdProjectConfig.js +0 -1
- package/dist/types/plugin/ISdCliNgPluginResultCache.d.ts +0 -8
- package/dist/types/plugin/ISdCliNgPluginResultCache.js +0 -1
- package/dist/types/plugin/ISdCliServerPluginResultCache.d.ts +0 -8
- package/dist/types/plugin/ISdCliServerPluginResultCache.js +0 -1
- package/dist/types/worker/ISdBuildRunnerWorkerType.d.ts +0 -20
- package/dist/types/worker/ISdBuildRunnerWorkerType.js +0 -1
- package/dist/types/worker/IServerWorkerType.d.ts +0 -17
- package/dist/types/worker/IServerWorkerType.js +0 -1
- package/dist/utils/SdCliConvertMessageUtils.d.ts +0 -21
- package/dist/utils/SdCliConvertMessageUtils.js +0 -138
- package/dist/utils/SdCliPerformanceTimer.d.ts +0 -10
- package/dist/utils/SdCliPerformanceTimer.js +0 -50
- package/dist/utils/loadProjConfAsync.d.ts +0 -5
- package/dist/utils/loadProjConfAsync.js +0 -7
- package/dist/workers/build-runner.worker.d.ts +0 -1
- package/dist/workers/build-runner.worker.js +0 -37
- package/dist/workers/server.worker.d.ts +0 -1
- package/lib/cordova-entry.js +0 -29
- package/src/entry/SdCliAiCommand.ts +0 -105
- package/src/entry/SdCliCapacitor.ts +0 -760
- package/src/entry/SdCliCordova.ts +0 -550
- package/src/entry/SdCliElectron.ts +0 -197
- package/src/entry/SdCliLocalUpdate.ts +0 -106
- package/src/entry/SdCliPostInstall.ts +0 -51
- package/src/entry/SdCliProject.ts +0 -427
- package/src/pkg-builders/SdBuildRunnerBase.ts +0 -36
- package/src/pkg-builders/SdProjectBuildRunner.ts +0 -398
- package/src/pkg-builders/client/SdCliNgRoutesFileGenerator.ts +0 -112
- package/src/pkg-builders/client/SdClientBuildRunner.ts +0 -156
- package/src/pkg-builders/client/SdNgBundler.ts +0 -666
- package/src/pkg-builders/client/SdNgBundlerContext.ts +0 -138
- package/src/pkg-builders/client/createSdNgPlugin.ts +0 -186
- package/src/pkg-builders/commons/SdWorkerPathPlugin.ts +0 -117
- package/src/pkg-builders/lib/SdCliDbContextFileGenerator.ts +0 -177
- package/src/pkg-builders/lib/SdCliIndexFileGenerator.ts +0 -94
- package/src/pkg-builders/lib/SdJsLibBuildRunner.ts +0 -59
- package/src/pkg-builders/lib/SdTsLibBuildRunner.ts +0 -47
- package/src/pkg-builders/lib/SdTsLibBuilder.ts +0 -71
- package/src/pkg-builders/server/SdServerBuildRunner.ts +0 -299
- package/src/pkg-builders/server/SdServerBundler.ts +0 -208
- package/src/pkg-builders/server/createSdServerPlugin.ts +0 -80
- package/src/sd-cli-entry.ts +0 -292
- package/src/sd-cli.ts +0 -105
- package/src/ts-compiler/ScopePathSet.ts +0 -17
- package/src/ts-compiler/SdDepAnalyzer.ts +0 -372
- package/src/ts-compiler/SdDepCache.ts +0 -304
- package/src/ts-compiler/SdStyleBundler.ts +0 -169
- package/src/ts-compiler/SdTsCompiler.ts +0 -638
- package/src/types/build/ISdBuildMessage.ts +0 -11
- package/src/types/build/ISdBuildResult.ts +0 -9
- package/src/types/build/ISdTsCompilerOptions.ts +0 -11
- package/src/types/build/ISdTsCompilerResult.ts +0 -12
- package/src/types/build/TStylesheetBundlingResult.ts +0 -15
- package/src/types/common-config/INpmConfig.ts +0 -24
- package/src/types/common-config/ITsConfig.ts +0 -5
- package/src/types/config/ISdProjectConfig.ts +0 -174
- package/src/types/plugin/ISdCliNgPluginResultCache.ts +0 -9
- package/src/types/plugin/ISdCliServerPluginResultCache.ts +0 -9
- package/src/types/worker/ISdBuildRunnerWorkerType.ts +0 -19
- package/src/types/worker/IServerWorkerType.ts +0 -8
- package/src/utils/SdCliConvertMessageUtils.ts +0 -180
- package/src/utils/SdCliPerformanceTimer.ts +0 -62
- package/src/utils/loadProjConfAsync.ts +0 -16
- package/src/workers/build-runner.worker.ts +0 -54
- package/src/workers/server.worker.ts +0 -54
- package/tests/deps/sd-dependency-analyzer.spec.ts +0 -241
- package/tests/deps/sd-dependency-cache.spec.ts +0 -153
- package/tsconfig.json +0 -8
- package/tsconfig.test.json +0 -8
- package/vitest.config.js +0 -15
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
export class SdDepCache {
|
|
2
|
-
constructor() {
|
|
3
|
-
/**
|
|
4
|
-
* 각 파일이 export한 심볼 집합 (예: export const A → "A")
|
|
5
|
-
*/
|
|
6
|
-
this._exportCache = new Map();
|
|
7
|
-
/**
|
|
8
|
-
* import한 타겟과 그 심볼 정보
|
|
9
|
-
* - 값이 0이면 전체 import(import * 또는 리소스 import)
|
|
10
|
-
* - 값이 Set이면 선택적 심볼 import (예: import { A } ...)
|
|
11
|
-
*/
|
|
12
|
-
this._importCache = new Map();
|
|
13
|
-
/**
|
|
14
|
-
* re-export한 타겟과 그 심볼 정보
|
|
15
|
-
* - export * from ...
|
|
16
|
-
* - export { A as B } from ...
|
|
17
|
-
* - 값이 0이면 전체 reexport(export * from ...)
|
|
18
|
-
*/
|
|
19
|
-
this._reexportCache = new Map();
|
|
20
|
-
/**
|
|
21
|
-
* 역의존 정보 (revDep)
|
|
22
|
-
* - 특정 파일이 어떤 파일에게 의존(참조)되는지
|
|
23
|
-
* - symbol 기반 추적
|
|
24
|
-
*/
|
|
25
|
-
this._revDepCache = new Map();
|
|
26
|
-
/**
|
|
27
|
-
* 분석이 완료된 파일 경로
|
|
28
|
-
*/
|
|
29
|
-
this._collectedCache = new Set();
|
|
30
|
-
this._exportSymbolCache = new Map();
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* .d.ts 또는 .js가 입력되었을 때 쌍으로 존재하는 파일 경로를 반환
|
|
34
|
-
* 예: "/a.d.ts" → ["/a.d.ts", "/a.js"]
|
|
35
|
-
*/
|
|
36
|
-
_getRelatedNPaths(nPath) {
|
|
37
|
-
if (nPath.endsWith(".d.ts")) {
|
|
38
|
-
return [nPath, nPath.replace(/\.d\.ts$/, ".js")];
|
|
39
|
-
}
|
|
40
|
-
if (nPath.endsWith(".js")) {
|
|
41
|
-
return [nPath, nPath.replace(/\.js$/, ".d.ts")];
|
|
42
|
-
}
|
|
43
|
-
return [nPath];
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* 분석이 완료된 파일로 표시
|
|
47
|
-
*/
|
|
48
|
-
addCollected(fileNPath) {
|
|
49
|
-
for (const path of this._getRelatedNPaths(fileNPath)) {
|
|
50
|
-
this._collectedCache.add(path);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
hasCollected(fileNPath) {
|
|
54
|
-
return this._collectedCache.has(fileNPath);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* export한 심볼 등록
|
|
58
|
-
* 예: export const A → "A"
|
|
59
|
-
*/
|
|
60
|
-
addExport(fileNPath, exportSymbol) {
|
|
61
|
-
for (const path of this._getRelatedNPaths(fileNPath)) {
|
|
62
|
-
const exportSymbolSet = this._exportCache.getOrCreate(path, new Set());
|
|
63
|
-
exportSymbolSet.add(exportSymbol);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* import 구문 등록
|
|
68
|
-
* - import * from ... → symbol = 0
|
|
69
|
-
* - import { A } from ... → symbol = "A"
|
|
70
|
-
*/
|
|
71
|
-
addImport(fileNPath, targetNPath, targetSymbol) {
|
|
72
|
-
for (const filePath of this._getRelatedNPaths(fileNPath)) {
|
|
73
|
-
const importTargetMap = this._importCache.getOrCreate(filePath, new Map());
|
|
74
|
-
for (const targetPath of this._getRelatedNPaths(targetNPath)) {
|
|
75
|
-
if (typeof targetSymbol === "string") {
|
|
76
|
-
const importTargetSymbolSet = importTargetMap.getOrCreate(targetPath, new Set());
|
|
77
|
-
if (!(importTargetSymbolSet instanceof Set))
|
|
78
|
-
continue;
|
|
79
|
-
importTargetSymbolSet.add(targetSymbol);
|
|
80
|
-
this._addRevDep(targetPath, filePath, targetSymbol);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
importTargetMap.set(targetPath, targetSymbol);
|
|
84
|
-
this._addRevDep(targetPath, filePath, targetSymbol);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* export * or export { A as B } from ... 구문 등록
|
|
91
|
-
* ※ export/import에 자동 등록되지 않으므로 외부에서 명시적으로 따로 입력해야 함
|
|
92
|
-
*/
|
|
93
|
-
addReexport(fileNPath, targetNPath, targetSymbolInfo) {
|
|
94
|
-
for (const filePath of this._getRelatedNPaths(fileNPath)) {
|
|
95
|
-
const reexportTargetMap = this._reexportCache.getOrCreate(filePath, new Map());
|
|
96
|
-
for (const targetPath of this._getRelatedNPaths(targetNPath)) {
|
|
97
|
-
if (targetSymbolInfo === 0) {
|
|
98
|
-
reexportTargetMap.set(targetPath, 0);
|
|
99
|
-
this._addRevDep(targetPath, filePath, 0);
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
const reexportTargetSymbolInfos = reexportTargetMap.getOrCreate(targetPath, []);
|
|
103
|
-
if (reexportTargetSymbolInfos === 0)
|
|
104
|
-
return;
|
|
105
|
-
if (!reexportTargetSymbolInfos.some((item) => item.importSymbol === targetSymbolInfo.importSymbol &&
|
|
106
|
-
item.exportSymbol === targetSymbolInfo.exportSymbol)) {
|
|
107
|
-
reexportTargetSymbolInfos.push(targetSymbolInfo);
|
|
108
|
-
this._addRevDep(targetPath, filePath, targetSymbolInfo.importSymbol);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* 역의존 관계 등록 (revDep)
|
|
116
|
-
*/
|
|
117
|
-
_addRevDep(targetNPath, fileNPath, exportSymbol) {
|
|
118
|
-
for (const targetPath of this._getRelatedNPaths(targetNPath)) {
|
|
119
|
-
const revDepInfoMap = this._revDepCache.getOrCreate(targetPath, new Map());
|
|
120
|
-
for (const filePath of this._getRelatedNPaths(fileNPath)) {
|
|
121
|
-
if (typeof exportSymbol === "string") {
|
|
122
|
-
const exportSymbolSet = revDepInfoMap.getOrCreate(filePath, new Set());
|
|
123
|
-
if (!(exportSymbolSet instanceof Set))
|
|
124
|
-
continue;
|
|
125
|
-
exportSymbolSet.add(exportSymbol);
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
revDepInfoMap.set(filePath, exportSymbol);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
getAffectedFileMap(modifiedNPathSet) {
|
|
134
|
-
const resultMap = new Map();
|
|
135
|
-
for (const modifiedNPath of modifiedNPathSet) {
|
|
136
|
-
const visited = new Set();
|
|
137
|
-
const result = new Set();
|
|
138
|
-
const queue = [];
|
|
139
|
-
const enqueue = (fileNPath, exportSymbol) => {
|
|
140
|
-
const key = `${fileNPath}#${exportSymbol}`;
|
|
141
|
-
if (!visited.has(key)) {
|
|
142
|
-
visited.add(key);
|
|
143
|
-
queue.push({ fileNPath, exportSymbol });
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
for (const relatedNPath of this._getRelatedNPaths(modifiedNPath)) {
|
|
147
|
-
result.add(relatedNPath);
|
|
148
|
-
const exportSymbols = this._getExportSymbols(relatedNPath);
|
|
149
|
-
if (exportSymbols.size === 0) {
|
|
150
|
-
enqueue(relatedNPath, undefined);
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
for (const symbol of exportSymbols) {
|
|
154
|
-
enqueue(relatedNPath, symbol);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
while (queue.length > 0) {
|
|
159
|
-
const curr = queue.shift();
|
|
160
|
-
const revDepInfoMap = this._revDepCache.get(curr.fileNPath);
|
|
161
|
-
if (!revDepInfoMap)
|
|
162
|
-
continue;
|
|
163
|
-
for (const [revDepFileNPath, revDepInfo] of revDepInfoMap) {
|
|
164
|
-
if (curr.exportSymbol != null) {
|
|
165
|
-
const hasImportSymbol = revDepInfo === 0 || revDepInfo.has(curr.exportSymbol);
|
|
166
|
-
if (hasImportSymbol) {
|
|
167
|
-
result.add(revDepFileNPath);
|
|
168
|
-
const exportSymbol = this._convertImportSymbolToExportSymbol(revDepFileNPath, curr.fileNPath, curr.exportSymbol);
|
|
169
|
-
enqueue(revDepFileNPath, exportSymbol);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
result.add(revDepFileNPath);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
resultMap.set(modifiedNPath, result);
|
|
178
|
-
}
|
|
179
|
-
return resultMap;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* 주어진 파일들 및 그 영향 범위에 해당하는 모든 캐시를 무효화
|
|
183
|
-
*/
|
|
184
|
-
invalidates(fileNPathSet) {
|
|
185
|
-
// const revDepCacheChanged = new Set<TNormPath>();
|
|
186
|
-
for (const fileNPath of fileNPathSet) {
|
|
187
|
-
this._exportCache.delete(fileNPath);
|
|
188
|
-
this._importCache.delete(fileNPath);
|
|
189
|
-
this._reexportCache.delete(fileNPath);
|
|
190
|
-
this._exportSymbolCache.delete(fileNPath);
|
|
191
|
-
this._collectedCache.delete(fileNPath);
|
|
192
|
-
// if (this.#revDepCache.has(fileNPath)) {
|
|
193
|
-
// this.#revDepCache.delete(fileNPath); // 자신이 key인 경우
|
|
194
|
-
// revDepCacheChanged.add(fileNPath);
|
|
195
|
-
// }
|
|
196
|
-
}
|
|
197
|
-
for (const [targetNPath, infoMap] of this._revDepCache) {
|
|
198
|
-
for (const fileNPath of fileNPathSet) {
|
|
199
|
-
if (infoMap.has(fileNPath)) {
|
|
200
|
-
infoMap.delete(fileNPath);
|
|
201
|
-
// revDepCacheChanged.add(targetNPath);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
if (infoMap.size === 0) {
|
|
205
|
-
this._revDepCache.delete(targetNPath);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* reexport된 경우 importSymbol → exportSymbol로 변환
|
|
211
|
-
*/
|
|
212
|
-
_convertImportSymbolToExportSymbol(fileNPath, targetNPath, importSymbol) {
|
|
213
|
-
const symbolInfos = this._reexportCache.get(fileNPath)?.get(targetNPath);
|
|
214
|
-
if (symbolInfos != null && symbolInfos !== 0 && symbolInfos.length > 0) {
|
|
215
|
-
const symbolInfo = symbolInfos.single((item) => item.importSymbol === importSymbol);
|
|
216
|
-
if (symbolInfo)
|
|
217
|
-
return symbolInfo.exportSymbol;
|
|
218
|
-
}
|
|
219
|
-
return importSymbol;
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* 해당 파일에서 export된 모든 심볼 (직접 + 재export 포함)
|
|
223
|
-
*/
|
|
224
|
-
_getExportSymbols(fileNPath) {
|
|
225
|
-
if (this._exportSymbolCache.has(fileNPath)) {
|
|
226
|
-
return this._exportSymbolCache.get(fileNPath);
|
|
227
|
-
}
|
|
228
|
-
const result = new Set();
|
|
229
|
-
for (const path of this._getRelatedNPaths(fileNPath)) {
|
|
230
|
-
const set = this._exportCache.get(path);
|
|
231
|
-
if (set)
|
|
232
|
-
result.adds(...set);
|
|
233
|
-
const map = this._reexportCache.get(path);
|
|
234
|
-
if (map) {
|
|
235
|
-
for (const [key, val] of map) {
|
|
236
|
-
if (val === 0) {
|
|
237
|
-
result.adds(...this._getExportSymbols(key));
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
result.adds(...val.map((item) => item.exportSymbol));
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
this._exportSymbolCache.set(fileNPath, result);
|
|
246
|
-
return result;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { TNormPath } from "@simplysm/sd-core-node";
|
|
2
|
-
import { TStylesheetBundlingResult } from "../types/build/TStylesheetBundlingResult";
|
|
3
|
-
import { ScopePathSet } from "./ScopePathSet";
|
|
4
|
-
export declare class SdStyleBundler {
|
|
5
|
-
private readonly _opt;
|
|
6
|
-
private readonly _ngStyleBundler;
|
|
7
|
-
private readonly _resultCache;
|
|
8
|
-
private readonly _refCache;
|
|
9
|
-
private readonly _revRefCache;
|
|
10
|
-
constructor(_opt: {
|
|
11
|
-
pkgPath: TNormPath;
|
|
12
|
-
scopePathSet: ScopePathSet;
|
|
13
|
-
dev: boolean;
|
|
14
|
-
});
|
|
15
|
-
getResultCache(): Map<TNormPath, TStylesheetBundlingResult>;
|
|
16
|
-
bundleAsync(data: string, containingFile: TNormPath, resourceFile?: TNormPath | null): Promise<TStylesheetBundlingResult & {
|
|
17
|
-
cached: boolean;
|
|
18
|
-
}>;
|
|
19
|
-
invalidate(modifiedNPathSet: Set<TNormPath>): Set<TNormPath>;
|
|
20
|
-
private _addReference;
|
|
21
|
-
getAllStyleFileSet(): Set<TNormPath>;
|
|
22
|
-
getAffectedFileSet(modifiedNPathSet: Set<TNormPath>): Set<TNormPath>;
|
|
23
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { PathUtils } from "@simplysm/sd-core-node";
|
|
2
|
-
import { ComponentStylesheetBundler } from "@angular/build/src/tools/esbuild/angular/component-stylesheets";
|
|
3
|
-
import { transformSupportedBrowsersToTargets } from "@angular/build/src/tools/esbuild/utils";
|
|
4
|
-
import browserslist from "browserslist";
|
|
5
|
-
import path from "path";
|
|
6
|
-
export class SdStyleBundler {
|
|
7
|
-
constructor(_opt) {
|
|
8
|
-
this._opt = _opt;
|
|
9
|
-
this._resultCache = new Map();
|
|
10
|
-
this._refCache = new Map();
|
|
11
|
-
this._revRefCache = new Map();
|
|
12
|
-
this._ngStyleBundler = new ComponentStylesheetBundler({
|
|
13
|
-
workspaceRoot: this._opt.pkgPath,
|
|
14
|
-
inlineFonts: !this._opt.dev,
|
|
15
|
-
optimization: !this._opt.dev,
|
|
16
|
-
sourcemap: this._opt.dev ? "inline" : false,
|
|
17
|
-
sourcesContent: this._opt.dev,
|
|
18
|
-
outputNames: { bundles: "[name]-[hash]", media: "media/[name]-[hash]" },
|
|
19
|
-
includePaths: [],
|
|
20
|
-
sass: {
|
|
21
|
-
fatalDeprecations: undefined,
|
|
22
|
-
silenceDeprecations: undefined,
|
|
23
|
-
futureDeprecations: undefined,
|
|
24
|
-
},
|
|
25
|
-
externalDependencies: [],
|
|
26
|
-
target: transformSupportedBrowsersToTargets(browserslist(["Chrome > 78"])),
|
|
27
|
-
preserveSymlinks: false,
|
|
28
|
-
tailwindConfiguration: undefined,
|
|
29
|
-
postcssConfiguration: undefined,
|
|
30
|
-
cacheOptions: {
|
|
31
|
-
enabled: true,
|
|
32
|
-
basePath: path.resolve(this._opt.pkgPath, ".cache"),
|
|
33
|
-
path: path.resolve(this._opt.pkgPath, ".cache/angular"),
|
|
34
|
-
},
|
|
35
|
-
publicPath: undefined,
|
|
36
|
-
}, "scss", this._opt.dev);
|
|
37
|
-
}
|
|
38
|
-
getResultCache() {
|
|
39
|
-
return this._resultCache;
|
|
40
|
-
}
|
|
41
|
-
async bundleAsync(data, containingFile, resourceFile = null) {
|
|
42
|
-
// containingFile: 포함된 파일 (.ts 혹은 global style.scss)
|
|
43
|
-
// resourceFile: 외부 리소스 파일 (styleUrls로 입력하지 않고 styles에 직접 입력한 경우 null)
|
|
44
|
-
// referencedFiles: import한 외부 scss 파일 혹은 woff파일등 외부 파일
|
|
45
|
-
const fileNPath = PathUtils.norm(resourceFile ?? containingFile);
|
|
46
|
-
if (this._resultCache.has(fileNPath)) {
|
|
47
|
-
return {
|
|
48
|
-
...this._resultCache.get(fileNPath),
|
|
49
|
-
cached: true,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
try {
|
|
53
|
-
const result = resourceFile != null
|
|
54
|
-
? await this._ngStyleBundler.bundleFile(resourceFile)
|
|
55
|
-
: await this._ngStyleBundler.bundleInline(data, containingFile, "scss");
|
|
56
|
-
for (const referencedFile of result.referencedFiles ?? []) {
|
|
57
|
-
if (!this._opt.scopePathSet.inScope(fileNPath) ||
|
|
58
|
-
!this._opt.scopePathSet.inScope(PathUtils.norm(referencedFile)))
|
|
59
|
-
continue;
|
|
60
|
-
// 참조하는 파일과 참조된 파일 사이의 의존성 관계 추가
|
|
61
|
-
this._addReference(fileNPath, PathUtils.norm(referencedFile));
|
|
62
|
-
}
|
|
63
|
-
this._resultCache.set(fileNPath, result);
|
|
64
|
-
return { ...result, cached: false };
|
|
65
|
-
}
|
|
66
|
-
catch (err) {
|
|
67
|
-
const result = {
|
|
68
|
-
errors: [
|
|
69
|
-
{
|
|
70
|
-
text: `스타일 번들링 실패: ${err.message ?? "알 수 없는 오류"}`,
|
|
71
|
-
location: { file: containingFile },
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
warnings: [],
|
|
75
|
-
};
|
|
76
|
-
this._resultCache.set(fileNPath, result);
|
|
77
|
-
return { ...result, cached: false };
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
invalidate(modifiedNPathSet) {
|
|
81
|
-
const affectedFileSet = this.getAffectedFileSet(modifiedNPathSet);
|
|
82
|
-
this._ngStyleBundler.invalidate(affectedFileSet);
|
|
83
|
-
for (const fileNPath of affectedFileSet) {
|
|
84
|
-
this._resultCache.delete(fileNPath);
|
|
85
|
-
}
|
|
86
|
-
// revRefCache/refCache
|
|
87
|
-
const targetSet = new Set();
|
|
88
|
-
for (const fileNPath of affectedFileSet) {
|
|
89
|
-
targetSet.adds(...(this._refCache.get(fileNPath) ?? []));
|
|
90
|
-
}
|
|
91
|
-
for (const target of [...targetSet]) {
|
|
92
|
-
const source = this._revRefCache.get(target);
|
|
93
|
-
if (source == null)
|
|
94
|
-
continue;
|
|
95
|
-
for (const affectedFile of affectedFileSet) {
|
|
96
|
-
source.delete(affectedFile);
|
|
97
|
-
}
|
|
98
|
-
if (source.size === 0) {
|
|
99
|
-
this._revRefCache.delete(target);
|
|
100
|
-
}
|
|
101
|
-
this._refCache.delete(target);
|
|
102
|
-
}
|
|
103
|
-
return affectedFileSet;
|
|
104
|
-
}
|
|
105
|
-
_addReference(fileNPath, referencedFile) {
|
|
106
|
-
if (fileNPath === referencedFile)
|
|
107
|
-
return;
|
|
108
|
-
this._refCache.getOrCreate(fileNPath, new Set()).add(referencedFile);
|
|
109
|
-
this._revRefCache.getOrCreate(referencedFile, new Set()).add(fileNPath);
|
|
110
|
-
}
|
|
111
|
-
getAllStyleFileSet() {
|
|
112
|
-
return new Set([
|
|
113
|
-
...this._revRefCache.keys(),
|
|
114
|
-
...Array.from(this._revRefCache.values()).mapMany((item) => Array.from(item)),
|
|
115
|
-
]);
|
|
116
|
-
}
|
|
117
|
-
getAffectedFileSet(modifiedNPathSet) {
|
|
118
|
-
const affectedFileSet = new Set();
|
|
119
|
-
// 수정파일중 Result에 있는것
|
|
120
|
-
const modifiedResultFiles = Array.from(modifiedNPathSet)
|
|
121
|
-
// .filter((item) => item.endsWith(".scss"))
|
|
122
|
-
.filter((item) => this._resultCache.has(item));
|
|
123
|
-
affectedFileSet.adds(...modifiedResultFiles);
|
|
124
|
-
// 수정파일을 사용하는 파일
|
|
125
|
-
const modifiedScssFiles = Array.from(modifiedNPathSet).filter((item) => item.endsWith(".scss"));
|
|
126
|
-
for (const modifiedScss of modifiedScssFiles) {
|
|
127
|
-
affectedFileSet.adds(...(this._revRefCache.get(modifiedScss) ?? []));
|
|
128
|
-
}
|
|
129
|
-
return affectedFileSet;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { TNormPath } from "@simplysm/sd-core-node";
|
|
2
|
-
import { ISdTsCompilerOptions } from "../types/build/ISdTsCompilerOptions";
|
|
3
|
-
import { ISdTsCompilerResult } from "../types/build/ISdTsCompilerResult";
|
|
4
|
-
export declare class SdTsCompiler {
|
|
5
|
-
private readonly _opt;
|
|
6
|
-
private readonly _forBundle;
|
|
7
|
-
private readonly _logger;
|
|
8
|
-
private readonly _isForAngular;
|
|
9
|
-
private readonly _scopePathSet;
|
|
10
|
-
private readonly _styleBundler;
|
|
11
|
-
private _moduleResolutionCache;
|
|
12
|
-
private _ngProgram;
|
|
13
|
-
private _program;
|
|
14
|
-
private readonly _cache;
|
|
15
|
-
private readonly _sourceFileCacheMap;
|
|
16
|
-
private readonly _emittedFilesCacheMap;
|
|
17
|
-
private _perf;
|
|
18
|
-
constructor(_opt: ISdTsCompilerOptions, _forBundle: boolean);
|
|
19
|
-
private _parseTsConfig;
|
|
20
|
-
private _createCompilerHost;
|
|
21
|
-
compileAsync(modifiedFileSet: Set<TNormPath>): Promise<ISdTsCompilerResult>;
|
|
22
|
-
private _prepareAsync;
|
|
23
|
-
private _lintAsync;
|
|
24
|
-
private _buildGlobalStyleAsync;
|
|
25
|
-
private _build;
|
|
26
|
-
private _convertOutputToReal;
|
|
27
|
-
private _removeOutputDevModeLine;
|
|
28
|
-
private _debug;
|
|
29
|
-
}
|