@simplysm/sd-cli 12.16.27 → 13.0.0-beta.11
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,197 +0,0 @@
|
|
|
1
|
-
import { FsUtils, SdLogger, SdProcess } from "@simplysm/sd-core-node";
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
import os from "os";
|
|
4
|
-
import path from "path";
|
|
5
|
-
import { ISdClientBuilderElectronConfig } from "../types/config/ISdProjectConfig";
|
|
6
|
-
import { loadProjConfAsync } from "../utils/loadProjConfAsync";
|
|
7
|
-
import electronBuilder from "electron-builder";
|
|
8
|
-
import { INpmConfig } from "../types/common-config/INpmConfig";
|
|
9
|
-
|
|
10
|
-
export class SdCliElectron {
|
|
11
|
-
private static readonly _logger = SdLogger.get(["simplysm", "sd-cli", "SdCliElectron"]);
|
|
12
|
-
|
|
13
|
-
static async runAsync(opt: { package: string; config: string; options?: string[] }) {
|
|
14
|
-
this._logger.log("설정 가져오기...");
|
|
15
|
-
const { pkgPath, electronPath, electronConfig } = await this._loadDevConfig(opt);
|
|
16
|
-
|
|
17
|
-
this._logger.log("준비...");
|
|
18
|
-
await this._prepareAsync({ pkgPath, electronPath, electronConfig });
|
|
19
|
-
|
|
20
|
-
this._logger.log("실행...");
|
|
21
|
-
await SdProcess.spawnAsync("npx", ["electron", "."], { cwd: electronPath, showMessage: true });
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
static async buildForDevAsync(opt: { package: string; config: string; options?: string[] }) {
|
|
25
|
-
this._logger.log("설정 가져오기...");
|
|
26
|
-
const { pkgPath, electronPath, electronConfig } = await this._loadDevConfig(opt);
|
|
27
|
-
|
|
28
|
-
this._logger.log("준비...");
|
|
29
|
-
const { npmConfig } = await this._prepareAsync({ pkgPath, electronPath, electronConfig });
|
|
30
|
-
|
|
31
|
-
this._logger.log("빌드...");
|
|
32
|
-
const electronDistPath = path.resolve(pkgPath, ".electron/dist");
|
|
33
|
-
await this._buildAsync({ pkgPath, electronPath, electronDistPath, npmConfig, electronConfig });
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
static async buildAsync(opt: {
|
|
37
|
-
pkgPath: string;
|
|
38
|
-
electronConfig: ISdClientBuilderElectronConfig;
|
|
39
|
-
}) {
|
|
40
|
-
this._logger.log("준비...");
|
|
41
|
-
const electronPath = path.resolve(opt.pkgPath, ".electron/src");
|
|
42
|
-
const { npmConfig } = await this._prepareAsync({ ...opt, electronPath });
|
|
43
|
-
|
|
44
|
-
this._logger.log("빌드...");
|
|
45
|
-
const electronDistPath = path.resolve(opt.pkgPath, ".electron/dist");
|
|
46
|
-
await this._buildAsync({
|
|
47
|
-
pkgPath: opt.pkgPath,
|
|
48
|
-
electronPath,
|
|
49
|
-
electronDistPath,
|
|
50
|
-
npmConfig,
|
|
51
|
-
electronConfig: opt.electronConfig,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
private static async _loadDevConfig(opt: { package: string; config: string; options?: string[] }) {
|
|
56
|
-
const projConf = await loadProjConfAsync(process.cwd(), true, opt);
|
|
57
|
-
const pkgConf = projConf.packages[opt.package];
|
|
58
|
-
if (pkgConf?.type !== "client" || pkgConf.builder?.electron === undefined) {
|
|
59
|
-
throw new Error();
|
|
60
|
-
}
|
|
61
|
-
const pkgPath = path.resolve(process.cwd(), `packages/${opt.package}`);
|
|
62
|
-
const electronPath = path.resolve(pkgPath, "dist/electron");
|
|
63
|
-
|
|
64
|
-
return {
|
|
65
|
-
pkgPath,
|
|
66
|
-
electronPath,
|
|
67
|
-
electronConfig: pkgConf.builder.electron,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
private static async _prepareAsync(opt: {
|
|
72
|
-
pkgPath: string;
|
|
73
|
-
electronPath: string;
|
|
74
|
-
electronConfig: ISdClientBuilderElectronConfig;
|
|
75
|
-
}) {
|
|
76
|
-
const npmConfig = FsUtils.readJson(path.resolve(opt.pkgPath, `package.json`)) as INpmConfig;
|
|
77
|
-
|
|
78
|
-
const reinstallPkgNames = opt.electronConfig.reinstallDependencies ?? [];
|
|
79
|
-
|
|
80
|
-
FsUtils.writeJson(path.resolve(opt.electronPath, `package.json`), {
|
|
81
|
-
name: npmConfig.name.replace(/^@/, "").replace(/\//, "-"),
|
|
82
|
-
version: npmConfig.version,
|
|
83
|
-
description: npmConfig.description,
|
|
84
|
-
main: "electron-main.js",
|
|
85
|
-
...(opt.electronConfig.postInstallScript !== undefined
|
|
86
|
-
? {
|
|
87
|
-
scripts: {
|
|
88
|
-
postinstall: opt.electronConfig.postInstallScript,
|
|
89
|
-
},
|
|
90
|
-
}
|
|
91
|
-
: {}),
|
|
92
|
-
dependencies: reinstallPkgNames.toObject(
|
|
93
|
-
(item) => item,
|
|
94
|
-
(item) => npmConfig.dependencies![item],
|
|
95
|
-
),
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
await SdProcess.spawnAsync("npm", ["install"], { cwd: opt.electronPath, showMessage: true });
|
|
99
|
-
|
|
100
|
-
await SdProcess.spawnAsync("npx", ["electron-rebuild"], {
|
|
101
|
-
cwd: opt.electronPath,
|
|
102
|
-
showMessage: true,
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
return { npmConfig };
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
private static async _buildAsync(opt: {
|
|
109
|
-
pkgPath: string;
|
|
110
|
-
electronPath: string;
|
|
111
|
-
electronDistPath: string;
|
|
112
|
-
npmConfig: INpmConfig;
|
|
113
|
-
electronConfig: ISdClientBuilderElectronConfig;
|
|
114
|
-
}) {
|
|
115
|
-
if (!this._canCreateSymlink()) {
|
|
116
|
-
throw new Error(
|
|
117
|
-
"'Electron 빌드'를 위해서는 'Symlink 생성' 권한이 필요합니다. 윈도우의 개발자모드를 활성화하세요.",
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const electronConfig: electronBuilder.Configuration = {
|
|
122
|
-
appId: opt.electronConfig.appId,
|
|
123
|
-
productName: opt.npmConfig.description,
|
|
124
|
-
asar: false,
|
|
125
|
-
win: {
|
|
126
|
-
target: opt.electronConfig.portable ? "portable" : "nsis",
|
|
127
|
-
},
|
|
128
|
-
nsis: opt.electronConfig.nsisOptions ?? {},
|
|
129
|
-
directories: {
|
|
130
|
-
app: opt.electronPath,
|
|
131
|
-
output: opt.electronDistPath,
|
|
132
|
-
},
|
|
133
|
-
...(opt.electronConfig.installerIcon !== undefined
|
|
134
|
-
? {
|
|
135
|
-
icon: path.resolve(opt.pkgPath, opt.electronConfig.installerIcon),
|
|
136
|
-
}
|
|
137
|
-
: {}),
|
|
138
|
-
removePackageScripts: false,
|
|
139
|
-
npmRebuild: false,
|
|
140
|
-
forceCodeSigning: false,
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
const configFilePath = path.resolve(opt.pkgPath, ".electron/builder-config.json");
|
|
144
|
-
FsUtils.writeJson(configFilePath, electronConfig);
|
|
145
|
-
await SdProcess.spawnAsync("npx", ["electron-builder", "--win", "--config", configFilePath]);
|
|
146
|
-
|
|
147
|
-
FsUtils.copy(
|
|
148
|
-
path.resolve(
|
|
149
|
-
opt.electronDistPath,
|
|
150
|
-
`${opt.npmConfig.description} ${
|
|
151
|
-
opt.electronConfig.portable ? "" : "Setup "
|
|
152
|
-
}${opt.npmConfig.version}.exe`,
|
|
153
|
-
),
|
|
154
|
-
path.resolve(
|
|
155
|
-
opt.pkgPath,
|
|
156
|
-
`dist/electron/${opt.npmConfig.description}${
|
|
157
|
-
opt.electronConfig.portable ? "-portable" : ""
|
|
158
|
-
}-latest.exe`,
|
|
159
|
-
),
|
|
160
|
-
);
|
|
161
|
-
|
|
162
|
-
FsUtils.copy(
|
|
163
|
-
path.resolve(
|
|
164
|
-
opt.electronDistPath,
|
|
165
|
-
`${opt.npmConfig.description} ${
|
|
166
|
-
opt.electronConfig.portable ? "" : "Setup "
|
|
167
|
-
}${opt.npmConfig.version}.exe`,
|
|
168
|
-
),
|
|
169
|
-
path.resolve(opt.pkgPath, `dist/electron/updates/${opt.npmConfig.version}.exe`),
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
private static _canCreateSymlink() {
|
|
174
|
-
const tmpDir = os.tmpdir();
|
|
175
|
-
const testTarget = path.join(tmpDir, "symlink-test-target.txt");
|
|
176
|
-
const testLink = path.join(tmpDir, "symlink-test-link.txt");
|
|
177
|
-
|
|
178
|
-
try {
|
|
179
|
-
// 대상 파일 생성
|
|
180
|
-
fs.writeFileSync(testTarget, "test");
|
|
181
|
-
|
|
182
|
-
// symlink 시도
|
|
183
|
-
fs.symlinkSync(testTarget, testLink, "file");
|
|
184
|
-
|
|
185
|
-
// symlink 성공 여부 확인
|
|
186
|
-
const isSymlink = fs.lstatSync(testLink).isSymbolicLink();
|
|
187
|
-
|
|
188
|
-
// 정리
|
|
189
|
-
fs.unlinkSync(testLink);
|
|
190
|
-
fs.unlinkSync(testTarget);
|
|
191
|
-
|
|
192
|
-
return isSymlink;
|
|
193
|
-
} catch {
|
|
194
|
-
return false;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { FsUtils, PathUtils, SdFsWatcher, SdLogger } from "@simplysm/sd-core-node";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { loadProjConfAsync } from "../utils/loadProjConfAsync";
|
|
4
|
-
|
|
5
|
-
export class SdCliLocalUpdate {
|
|
6
|
-
static async runAsync(opt: { config: string; options?: string[] }): Promise<void> {
|
|
7
|
-
const logger = SdLogger.get(["simplysm", "sd-cli", "SdCliLocalUpdate", "runAsync"]);
|
|
8
|
-
|
|
9
|
-
logger.debug("프로젝트 설정 가져오기...");
|
|
10
|
-
const projConf = await loadProjConfAsync(process.cwd(), true, opt);
|
|
11
|
-
if (!projConf.localUpdates) return;
|
|
12
|
-
|
|
13
|
-
const updatePathInfos = this._getUpdatePathInfos(projConf.localUpdates);
|
|
14
|
-
logger.debug("로컬 업데이트 구성");
|
|
15
|
-
|
|
16
|
-
logger.log("로컬 라이브러리 업데이트 시작...");
|
|
17
|
-
await updatePathInfos.parallelAsync(async (updatePathInfo) => {
|
|
18
|
-
if (!FsUtils.exists(updatePathInfo.source)) {
|
|
19
|
-
logger.warn(`소스경로를 찾을 수 없어 무시됩니다(${updatePathInfo.source})`);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// 소스경로에서 대상경로로 파일 복사
|
|
24
|
-
await FsUtils.copyAsync(updatePathInfo.source, updatePathInfo.target, (src) => {
|
|
25
|
-
return !src.includes("node_modules") && !src.endsWith("package.json");
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
logger.info("로컬 라이브러리 업데이트 완료");
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
static async watchAsync(opt: { config: string; options?: string[] }): Promise<void> {
|
|
32
|
-
const logger = SdLogger.get(["simplysm", "sd-cli", "SdCliLocalUpdate", "watchAsync"]);
|
|
33
|
-
|
|
34
|
-
logger.debug("프로젝트 설정 가져오기...");
|
|
35
|
-
const projConf = await loadProjConfAsync(process.cwd(), true, opt);
|
|
36
|
-
if (!projConf.localUpdates) return;
|
|
37
|
-
|
|
38
|
-
const updatePathInfos = this._getUpdatePathInfos(projConf.localUpdates);
|
|
39
|
-
logger.debug("로컬 업데이트 구성");
|
|
40
|
-
|
|
41
|
-
const watcher = await SdFsWatcher.watchAsync(updatePathInfos.map((item) => item.source));
|
|
42
|
-
watcher.onChange({ delay: 300 }, async (changedInfos) => {
|
|
43
|
-
const changedFileInfos = changedInfos.filter((item) =>
|
|
44
|
-
["add", "change", "unlink"].includes(item.event),
|
|
45
|
-
);
|
|
46
|
-
if (changedFileInfos.length === 0) return;
|
|
47
|
-
|
|
48
|
-
logger.log("로컬 라이브러리 변경감지...");
|
|
49
|
-
|
|
50
|
-
await changedFileInfos.parallelAsync(async (changedFileInfo) => {
|
|
51
|
-
await updatePathInfos.parallelAsync(async (updatePathInfo) => {
|
|
52
|
-
if (!PathUtils.isChildPath(changedFileInfo.path, updatePathInfo.source)) return;
|
|
53
|
-
|
|
54
|
-
const sourceRelPath = path.relative(updatePathInfo.source, changedFileInfo.path);
|
|
55
|
-
const targetFilePath = path.resolve(updatePathInfo.target, sourceRelPath);
|
|
56
|
-
|
|
57
|
-
if (changedFileInfo.event === "unlink") {
|
|
58
|
-
logger.debug(`변경파일감지(삭제): ${targetFilePath}`);
|
|
59
|
-
await FsUtils.removeAsync(targetFilePath);
|
|
60
|
-
} else {
|
|
61
|
-
logger.debug(`변경파일감지(복사): ${changedFileInfo.path} => ${targetFilePath}`);
|
|
62
|
-
await FsUtils.copyAsync(changedFileInfo.path, targetFilePath);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
logger.info("로컬 라이브러리 복사 완료");
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
private static _getUpdatePathInfos(record: Record<string, string>): IUpdatePathInfo[] {
|
|
72
|
-
const result: IUpdatePathInfo[] = [];
|
|
73
|
-
for (const pkgGlobPath of Object.keys(record)) {
|
|
74
|
-
// "node_modules'에서 로컬업데이트 설정에 맞는 패키지를 "glob"하여 대상 패키지경로 목록 가져오기
|
|
75
|
-
const targetPaths = [
|
|
76
|
-
...FsUtils.glob(path.resolve(process.cwd(), "node_modules", pkgGlobPath)),
|
|
77
|
-
...FsUtils.glob(path.resolve(process.cwd(), "packages", "*", "node_modules", pkgGlobPath)),
|
|
78
|
-
];
|
|
79
|
-
|
|
80
|
-
result.push(
|
|
81
|
-
...targetPaths
|
|
82
|
-
.map((targetPath) => {
|
|
83
|
-
// 대상의 명칭 추출
|
|
84
|
-
const regexpText = pkgGlobPath.replace(/[\\/.*]/g, (item) =>
|
|
85
|
-
item === "/" ? "[\\\\\\/]" : item === "." ? "\\." : item === "*" ? "(.*)" : item,
|
|
86
|
-
);
|
|
87
|
-
const targetNameMatch = new RegExp(regexpText).exec(targetPath);
|
|
88
|
-
if (!targetNameMatch || typeof targetNameMatch[1] === "undefined") return undefined;
|
|
89
|
-
const targetName = targetNameMatch[1];
|
|
90
|
-
|
|
91
|
-
// 가져올 소스 경로 추출
|
|
92
|
-
const sourcePath = path.resolve(record[pkgGlobPath].replace(/\*/g, targetName));
|
|
93
|
-
return { source: sourcePath, target: targetPath };
|
|
94
|
-
})
|
|
95
|
-
.filterExists(),
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return result;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
interface IUpdatePathInfo {
|
|
104
|
-
source: string;
|
|
105
|
-
target: string;
|
|
106
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from "url";
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
|
|
4
|
-
export class SdCliPostInstall {
|
|
5
|
-
static run() {
|
|
6
|
-
{
|
|
7
|
-
const filePath = fileURLToPath(import.meta.resolve("@angular/build/package.json"));
|
|
8
|
-
const contents = JSON.parse(fs.readFileSync(filePath).toString());
|
|
9
|
-
delete contents.exports;
|
|
10
|
-
fs.writeFileSync(filePath, JSON.stringify(contents, undefined, 2));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/*{
|
|
14
|
-
const fortawesomeDirPath = path.resolve(
|
|
15
|
-
path.dirname(
|
|
16
|
-
fileURLToPath(import.meta.resolve("@fortawesome/fontawesome-svg-core/package.json")),
|
|
17
|
-
),
|
|
18
|
-
"..",
|
|
19
|
-
);
|
|
20
|
-
const iconsDirNames = fs
|
|
21
|
-
.readdirSync(fortawesomeDirPath)
|
|
22
|
-
.filter((item) => item.endsWith("-icons"));
|
|
23
|
-
for (const iconsDirName of iconsDirNames) {
|
|
24
|
-
const dirPath = path.resolve(fortawesomeDirPath, iconsDirName);
|
|
25
|
-
|
|
26
|
-
const contents = JSON.parse(
|
|
27
|
-
fs.readFileSync(path.resolve(dirPath, "package.json")).toString(),
|
|
28
|
-
);
|
|
29
|
-
contents.exports = {
|
|
30
|
-
"./package.json": "./package.json",
|
|
31
|
-
"./!*": "./!*.js",
|
|
32
|
-
};
|
|
33
|
-
fs.writeFileSync(
|
|
34
|
-
path.resolve(dirPath, "package.json"),
|
|
35
|
-
JSON.stringify(contents, undefined, 2),
|
|
36
|
-
);
|
|
37
|
-
fs.rmSync(path.resolve(dirPath, "index.d.ts"), { force: true });
|
|
38
|
-
fs.rmSync(path.resolve(dirPath, "index.js"), { force: true });
|
|
39
|
-
fs.rmSync(path.resolve(dirPath, "index.mjs"), { force: true });
|
|
40
|
-
}
|
|
41
|
-
}*/
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
const filePath = fileURLToPath(import.meta.resolve("cordova/bin/cordova"));
|
|
45
|
-
let contents = fs.readFileSync(filePath).toString();
|
|
46
|
-
contents = contents.replace("process.exitCode = err.code || 1;", "process.exitCode = 1;");
|
|
47
|
-
contents = contents.replace("console.error(err.message);", "console.error(err);");
|
|
48
|
-
fs.writeFileSync(filePath, contents);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|