@simplysm/sd-cli 7.3.4 → 10.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +18 -0
- package/dist/SdLinter.d.ts +5 -0
- package/dist/SdLinter.js.map +1 -0
- package/dist/SdLinter.mjs +37 -0
- package/dist/SdTsIncrementalBuilder.d.ts +16 -0
- package/dist/SdTsIncrementalBuilder.js.map +1 -0
- package/dist/SdTsIncrementalBuilder.mjs +54 -0
- package/dist/build-cluster.js.map +1 -0
- package/dist/build-cluster.mjs +124 -0
- package/dist/builders/SdCliClientBuilder.d.ts +13 -0
- package/dist/builders/SdCliClientBuilder.js.map +1 -0
- package/dist/builders/SdCliClientBuilder.mjs +167 -0
- package/dist/builders/SdCliJsLibLinter.d.ts +14 -0
- package/dist/builders/SdCliJsLibLinter.js.map +1 -0
- package/dist/builders/SdCliJsLibLinter.mjs +60 -0
- package/dist/builders/SdCliServerBuilder.d.ts +14 -0
- package/dist/builders/SdCliServerBuilder.js.map +1 -0
- package/dist/builders/SdCliServerBuilder.mjs +171 -0
- package/dist/builders/SdCliTsLibBuilder.d.ts +13 -0
- package/dist/builders/SdCliTsLibBuilder.js.map +1 -0
- package/dist/builders/SdCliTsLibBuilder.mjs +75 -0
- package/dist/commons.d.ts +20 -110
- package/dist/commons.js.map +1 -0
- package/dist/commons.mjs +1 -1
- package/dist/entry/SdCliProject.d.ts +29 -0
- package/dist/entry/SdCliProject.js.map +1 -0
- package/dist/entry/SdCliProject.mjs +353 -0
- package/dist/sd-cli.js.map +1 -0
- package/dist/sd-cli.mjs +119 -0
- package/dist/sd-core-common/src/decorators/NotifyPropertyChange.d.ts +20 -0
- package/dist/sd-core-common/src/decorators/NotifyPropertyChange.js.map +1 -0
- package/dist/sd-core-common/src/decorators/NotifyPropertyChange.mjs +12 -0
- package/dist/sd-core-common/src/decorators/PropertyGetSetDecoratorBase.d.ts +43 -0
- package/dist/sd-core-common/src/decorators/PropertyGetSetDecoratorBase.js.map +1 -0
- package/dist/sd-core-common/src/decorators/PropertyGetSetDecoratorBase.mjs +54 -0
- package/dist/sd-core-common/src/decorators/PropertyValidate.d.ts +16 -0
- package/dist/sd-core-common/src/decorators/PropertyValidate.js.map +1 -0
- package/dist/sd-core-common/src/decorators/PropertyValidate.mjs +26 -0
- package/dist/sd-core-common/src/decorators/decorator-return-types.d.ts +14 -0
- package/dist/sd-core-common/src/decorators/decorator-return-types.js.map +1 -0
- package/dist/sd-core-common/src/decorators/decorator-return-types.mjs +2 -0
- package/dist/sd-core-common/src/errors/ArgumentError.d.ts +10 -0
- package/dist/sd-core-common/src/errors/ArgumentError.js.map +1 -0
- package/dist/sd-core-common/src/errors/ArgumentError.mjs +13 -0
- package/dist/sd-core-common/src/errors/NeverEntryError.d.ts +10 -0
- package/dist/sd-core-common/src/errors/NeverEntryError.js.map +1 -0
- package/dist/sd-core-common/src/errors/NeverEntryError.mjs +13 -0
- package/dist/sd-core-common/src/errors/NotImplementError.d.ts +10 -0
- package/dist/sd-core-common/src/errors/NotImplementError.js.map +1 -0
- package/dist/sd-core-common/src/errors/NotImplementError.mjs +13 -0
- package/dist/sd-core-common/src/errors/SdError.d.ts +23 -0
- package/dist/sd-core-common/src/errors/SdError.js.map +1 -0
- package/dist/sd-core-common/src/errors/SdError.mjs +40 -0
- package/dist/sd-core-common/src/errors/TimeoutError.d.ts +11 -0
- package/dist/sd-core-common/src/errors/TimeoutError.js.map +1 -0
- package/dist/sd-core-common/src/errors/TimeoutError.mjs +16 -0
- package/dist/sd-core-common/src/extensions/ArrayExtension.d.ts +147 -0
- package/dist/sd-core-common/src/extensions/ArrayExtension.js.map +1 -0
- package/dist/sd-core-common/src/extensions/ArrayExtension.mjs +448 -0
- package/dist/sd-core-common/src/extensions/MapExtension.d.ts +4 -0
- package/dist/sd-core-common/src/extensions/MapExtension.js.map +1 -0
- package/dist/sd-core-common/src/extensions/MapExtension.mjs +15 -0
- package/dist/sd-core-common/src/extensions/SetExtension.d.ts +3 -0
- package/dist/sd-core-common/src/extensions/SetExtension.js.map +1 -0
- package/dist/sd-core-common/src/extensions/SetExtension.mjs +10 -0
- package/dist/sd-core-common/src/index.d.ts +32 -0
- package/dist/sd-core-common/src/index.js.map +1 -0
- package/dist/sd-core-common/src/index.mjs +33 -0
- package/dist/sd-core-common/src/types/DateOnly.d.ts +135 -0
- package/dist/sd-core-common/src/types/DateOnly.js.map +1 -0
- package/dist/sd-core-common/src/types/DateOnly.mjs +220 -0
- package/dist/sd-core-common/src/types/DateTime.d.ts +42 -0
- package/dist/sd-core-common/src/types/DateTime.js.map +1 -0
- package/dist/sd-core-common/src/types/DateTime.mjs +156 -0
- package/dist/sd-core-common/src/types/DeepPartial.d.ts +3 -0
- package/dist/sd-core-common/src/types/DeepPartial.js.map +1 -0
- package/dist/sd-core-common/src/types/DeepPartial.mjs +2 -0
- package/dist/sd-core-common/src/types/ObjectSet.d.ts +4 -0
- package/dist/sd-core-common/src/types/ObjectSet.js.map +1 -0
- package/dist/sd-core-common/src/types/ObjectSet.mjs +18 -0
- package/dist/sd-core-common/src/types/Time.d.ts +27 -0
- package/dist/sd-core-common/src/types/Time.js.map +1 -0
- package/dist/sd-core-common/src/types/Time.mjs +108 -0
- package/dist/sd-core-common/src/types/Type.d.ts +7 -0
- package/dist/sd-core-common/src/types/Type.js.map +1 -0
- package/dist/sd-core-common/src/types/Type.mjs +2 -0
- package/dist/sd-core-common/src/types/UnwrappedType.d.ts +1 -0
- package/dist/sd-core-common/src/types/UnwrappedType.js.map +1 -0
- package/dist/sd-core-common/src/types/UnwrappedType.mjs +2 -0
- package/dist/sd-core-common/src/types/Uuid.d.ts +8 -0
- package/dist/sd-core-common/src/types/Uuid.js.map +1 -0
- package/dist/sd-core-common/src/types/Uuid.mjs +26 -0
- package/dist/sd-core-common/src/types/WrappedType.d.ts +1 -0
- package/dist/sd-core-common/src/types/WrappedType.js.map +1 -0
- package/dist/sd-core-common/src/types/WrappedType.mjs +2 -0
- package/dist/sd-core-common/src/utils/DateTimeFormatUtil.d.ts +12 -0
- package/dist/sd-core-common/src/utils/DateTimeFormatUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/DateTimeFormatUtil.mjs +67 -0
- package/dist/sd-core-common/src/utils/FunctionQueue.d.ts +8 -0
- package/dist/sd-core-common/src/utils/FunctionQueue.js.map +1 -0
- package/dist/sd-core-common/src/utils/FunctionQueue.mjs +46 -0
- package/dist/sd-core-common/src/utils/FunctionUtil.d.ts +6 -0
- package/dist/sd-core-common/src/utils/FunctionUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/FunctionUtil.mjs +31 -0
- package/dist/sd-core-common/src/utils/JsonConvert.d.ts +8 -0
- package/dist/sd-core-common/src/utils/JsonConvert.js.map +1 -0
- package/dist/sd-core-common/src/utils/JsonConvert.mjs +78 -0
- package/dist/sd-core-common/src/utils/MathUtil.d.ts +3 -0
- package/dist/sd-core-common/src/utils/MathUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/MathUtil.mjs +6 -0
- package/dist/sd-core-common/src/utils/NumberUtil.d.ts +6 -0
- package/dist/sd-core-common/src/utils/NumberUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/NumberUtil.mjs +32 -0
- package/dist/sd-core-common/src/utils/ObjectUtil.d.ts +80 -0
- package/dist/sd-core-common/src/utils/ObjectUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/ObjectUtil.mjs +452 -0
- package/dist/sd-core-common/src/utils/SdSyncEventEmitter.d.ts +6 -0
- package/dist/sd-core-common/src/utils/SdSyncEventEmitter.js.map +1 -0
- package/dist/sd-core-common/src/utils/SdSyncEventEmitter.mjs +27 -0
- package/dist/sd-core-common/src/utils/StringUtil.d.ts +8 -0
- package/dist/sd-core-common/src/utils/StringUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/StringUtil.mjs +77 -0
- package/dist/sd-core-common/src/utils/Wait.d.ts +4 -0
- package/dist/sd-core-common/src/utils/Wait.js.map +1 -0
- package/dist/sd-core-common/src/utils/Wait.mjs +23 -0
- package/dist/sd-core-node/src/index.d.ts +6 -0
- package/dist/sd-core-node/src/index.js.map +1 -0
- package/dist/sd-core-node/src/index.mjs +7 -0
- package/dist/sd-core-node/src/utils/FsUtil.d.ts +44 -0
- package/dist/sd-core-node/src/utils/FsUtil.js.map +1 -0
- package/dist/sd-core-node/src/utils/FsUtil.mjs +493 -0
- package/dist/sd-core-node/src/utils/Logger.d.ts +91 -0
- package/dist/sd-core-node/src/utils/Logger.js.map +1 -0
- package/dist/sd-core-node/src/utils/Logger.mjs +185 -0
- package/dist/sd-core-node/src/utils/PathUtil.d.ts +6 -0
- package/dist/sd-core-node/src/utils/PathUtil.js.map +1 -0
- package/dist/sd-core-node/src/utils/PathUtil.mjs +24 -0
- package/dist/sd-core-node/src/utils/SdFsWatcher.d.ts +15 -0
- package/dist/sd-core-node/src/utils/SdFsWatcher.js.map +1 -0
- package/dist/sd-core-node/src/utils/SdFsWatcher.mjs +43 -0
- package/dist/sd-core-node/src/utils/SdProcess.d.ts +5 -0
- package/dist/sd-core-node/src/utils/SdProcess.js.map +1 -0
- package/dist/sd-core-node/src/utils/SdProcess.mjs +36 -0
- package/dist/sd-orm-common/src/CaseQueryHelper.d.ts +12 -0
- package/dist/sd-orm-common/src/CaseQueryHelper.js.map +1 -0
- package/dist/sd-orm-common/src/CaseQueryHelper.mjs +19 -0
- package/dist/sd-orm-common/src/CaseWhenQueryHelper.d.ts +12 -0
- package/dist/sd-orm-common/src/CaseWhenQueryHelper.js.map +1 -0
- package/dist/sd-orm-common/src/CaseWhenQueryHelper.mjs +20 -0
- package/dist/sd-orm-common/src/DbContext.d.ts +81 -0
- package/dist/sd-orm-common/src/DbContext.js.map +1 -0
- package/dist/sd-orm-common/src/DbContext.mjs +635 -0
- package/dist/sd-orm-common/src/IDbConnection.d.ts +15 -0
- package/dist/sd-orm-common/src/IDbConnection.js.map +1 -0
- package/dist/sd-orm-common/src/IDbConnection.mjs +2 -0
- package/dist/sd-orm-common/src/IDbContextExecutor.d.ts +17 -0
- package/dist/sd-orm-common/src/IDbContextExecutor.js.map +1 -0
- package/dist/sd-orm-common/src/IDbContextExecutor.mjs +2 -0
- package/dist/sd-orm-common/src/IDbMigration.d.ts +4 -0
- package/dist/sd-orm-common/src/IDbMigration.js.map +1 -0
- package/dist/sd-orm-common/src/IDbMigration.mjs +2 -0
- package/dist/sd-orm-common/src/QueryBuilder.d.ts +48 -0
- package/dist/sd-orm-common/src/QueryBuilder.js.map +1 -0
- package/dist/sd-orm-common/src/QueryBuilder.mjs +1022 -0
- package/dist/sd-orm-common/src/QueryHelper.d.ts +75 -0
- package/dist/sd-orm-common/src/QueryHelper.js.map +1 -0
- package/dist/sd-orm-common/src/QueryHelper.mjs +627 -0
- package/dist/sd-orm-common/src/QueryUnit.d.ts +10 -0
- package/dist/sd-orm-common/src/QueryUnit.js.map +1 -0
- package/dist/sd-orm-common/src/QueryUnit.mjs +16 -0
- package/dist/sd-orm-common/src/Queryable.d.ts +105 -0
- package/dist/sd-orm-common/src/Queryable.js.map +1 -0
- package/dist/sd-orm-common/src/Queryable.mjs +1375 -0
- package/dist/sd-orm-common/src/SdOrmDataType.d.ts +21 -0
- package/dist/sd-orm-common/src/SdOrmDataType.js.map +1 -0
- package/dist/sd-orm-common/src/SdOrmDataType.mjs +2 -0
- package/dist/sd-orm-common/src/commons.d.ts +400 -0
- package/dist/sd-orm-common/src/commons.js.map +1 -0
- package/dist/sd-orm-common/src/commons.mjs +8 -0
- package/dist/sd-orm-common/src/decorators.d.ts +29 -0
- package/dist/sd-orm-common/src/decorators.js.map +1 -0
- package/dist/sd-orm-common/src/decorators.mjs +89 -0
- package/dist/sd-orm-common/src/index.d.ts +17 -0
- package/dist/sd-orm-common/src/index.js.map +1 -0
- package/dist/sd-orm-common/src/index.mjs +18 -0
- package/dist/sd-orm-common/src/models/SystemMigration.d.ts +3 -0
- package/dist/sd-orm-common/src/models/SystemMigration.js.map +1 -0
- package/dist/sd-orm-common/src/models/SystemMigration.mjs +13 -0
- package/dist/sd-orm-common/src/utils/DbDefinitionUtil.d.ts +14 -0
- package/dist/sd-orm-common/src/utils/DbDefinitionUtil.js.map +1 -0
- package/dist/sd-orm-common/src/utils/DbDefinitionUtil.mjs +66 -0
- package/dist/sd-orm-common/src/utils/SdOrmUtil.d.ts +8 -0
- package/dist/sd-orm-common/src/utils/SdOrmUtil.js.map +1 -0
- package/dist/sd-orm-common/src/utils/SdOrmUtil.mjs +248 -0
- package/dist/sd-orm-node/src/DbConnectionFactory.d.ts +4 -0
- package/dist/sd-orm-node/src/DbConnectionFactory.js.map +1 -0
- package/dist/sd-orm-node/src/DbConnectionFactory.mjs +17 -0
- package/dist/sd-orm-node/src/NodeDbContextExecutor.d.ts +19 -0
- package/dist/sd-orm-node/src/NodeDbContextExecutor.js.map +1 -0
- package/dist/sd-orm-node/src/NodeDbContextExecutor.mjs +71 -0
- package/dist/sd-orm-node/src/SdOrm.d.ts +10 -0
- package/dist/sd-orm-node/src/SdOrm.js.map +1 -0
- package/dist/sd-orm-node/src/SdOrm.mjs +25 -0
- package/dist/sd-orm-node/src/index.d.ts +4 -0
- package/dist/sd-orm-node/src/index.js.map +1 -0
- package/dist/sd-orm-node/src/index.mjs +5 -0
- package/dist/sd-orm-node-mssql/src/MssqlDbConnection.d.ts +25 -0
- package/dist/sd-orm-node-mssql/src/MssqlDbConnection.js.map +1 -0
- package/dist/sd-orm-node-mssql/src/MssqlDbConnection.mjs +321 -0
- package/dist/sd-orm-node-mssql/src/index.d.ts +2 -0
- package/dist/sd-orm-node-mssql/src/index.js.map +1 -0
- package/dist/sd-orm-node-mssql/src/index.mjs +3 -0
- package/dist/sd-orm-node-mysql/src/MysqlDbConnection.d.ts +22 -0
- package/dist/sd-orm-node-mysql/src/MysqlDbConnection.js.map +1 -0
- package/dist/sd-orm-node-mysql/src/MysqlDbConnection.mjs +200 -0
- package/dist/sd-orm-node-mysql/src/index.d.ts +2 -0
- package/dist/sd-orm-node-mysql/src/index.js.map +1 -0
- package/dist/sd-orm-node-mysql/src/index.mjs +3 -0
- package/dist/sd-orm-node-sqlite/src/SqliteDbConnection.d.ts +22 -0
- package/dist/sd-orm-node-sqlite/src/SqliteDbConnection.js.map +1 -0
- package/dist/sd-orm-node-sqlite/src/SqliteDbConnection.mjs +172 -0
- package/dist/sd-orm-node-sqlite/src/index.d.ts +2 -0
- package/dist/sd-orm-node-sqlite/src/index.js.map +1 -0
- package/dist/sd-orm-node-sqlite/src/index.mjs +3 -0
- package/dist/sd-service-common/src/commons-orm.d.ts +4 -0
- package/dist/sd-service-common/src/commons-orm.js.map +1 -0
- package/dist/sd-service-common/src/commons-orm.mjs +2 -0
- package/dist/sd-service-common/src/commons-smtp.d.ts +29 -0
- package/dist/sd-service-common/src/commons-smtp.js.map +1 -0
- package/dist/sd-service-common/src/commons-smtp.mjs +2 -0
- package/dist/sd-service-common/src/commons.d.ts +57 -0
- package/dist/sd-service-common/src/commons.js.map +1 -0
- package/dist/sd-service-common/src/commons.mjs +3 -0
- package/dist/sd-service-common/src/index.d.ts +3 -0
- package/dist/sd-service-common/src/index.js.map +1 -0
- package/dist/sd-service-common/src/index.mjs +4 -0
- package/dist/sd-service-server/src/ApiServiceError.d.ts +12 -0
- package/dist/sd-service-server/src/ApiServiceError.js.map +1 -0
- package/dist/sd-service-server/src/ApiServiceError.mjs +15 -0
- package/dist/sd-service-server/src/SdServiceServer.d.ts +39 -0
- package/dist/sd-service-server/src/SdServiceServer.js.map +1 -0
- package/dist/sd-service-server/src/SdServiceServer.mjs +513 -0
- package/dist/sd-service-server/src/commons.d.ts +23 -0
- package/dist/sd-service-server/src/commons.js.map +1 -0
- package/dist/sd-service-server/src/commons.mjs +3 -0
- package/dist/sd-service-server/src/index.d.ts +8 -0
- package/dist/sd-service-server/src/index.js.map +1 -0
- package/dist/sd-service-server/src/index.mjs +9 -0
- package/dist/sd-service-server/src/services/SdAutoUpdateService.d.ts +4 -0
- package/dist/sd-service-server/src/services/SdAutoUpdateService.js.map +1 -0
- package/dist/sd-service-server/src/services/SdAutoUpdateService.mjs +20 -0
- package/dist/sd-service-server/src/services/SdCryptoService.d.ts +7 -0
- package/dist/sd-service-server/src/services/SdCryptoService.js.map +1 -0
- package/dist/sd-service-server/src/services/SdCryptoService.mjs +39 -0
- package/dist/sd-service-server/src/services/SdOrmService.d.ts +22 -0
- package/dist/sd-service-server/src/services/SdOrmService.js.map +1 -0
- package/dist/sd-service-server/src/services/SdOrmService.mjs +115 -0
- package/dist/sd-service-server/src/services/SdSmtpClientService.d.ts +6 -0
- package/dist/sd-service-server/src/services/SdSmtpClientService.js.map +1 -0
- package/dist/sd-service-server/src/services/SdSmtpClientService.mjs +44 -0
- package/dist/sd-service-server/src/utils/SdServiceServerConfigUtil.d.ts +4 -0
- package/dist/sd-service-server/src/utils/SdServiceServerConfigUtil.js.map +1 -0
- package/dist/sd-service-server/src/utils/SdServiceServerConfigUtil.mjs +36 -0
- package/dist/server-worker.d.ts +1 -0
- package/dist/server-worker.js.map +1 -0
- package/dist/server-worker.mjs +36 -0
- package/dist/utils/SdCliBuildResultUtil.d.ts +1 -4
- package/dist/utils/SdCliBuildResultUtil.js.map +1 -0
- package/dist/utils/SdCliBuildResultUtil.mjs +3 -29
- package/dist/utils/SdCliConfigUtil.js.map +1 -0
- package/dist/utils/SdCliConfigUtil.mjs +1 -1
- package/package.json +14 -56
- package/src/SdLinter.ts +41 -0
- package/src/SdTsIncrementalBuilder.ts +75 -0
- package/src/build-cluster.ts +133 -0
- package/src/builders/SdCliClientBuilder.ts +189 -0
- package/src/builders/SdCliJsLibLinter.ts +72 -0
- package/src/builders/SdCliServerBuilder.ts +191 -0
- package/src/builders/SdCliTsLibBuilder.ts +96 -0
- package/src/commons.ts +21 -112
- package/src/entry/SdCliProject.ts +467 -0
- package/src/sd-cli.ts +136 -0
- package/src/server-worker.ts +45 -0
- package/src/utils/SdCliBuildResultUtil.ts +5 -38
- package/tsconfig.json +9 -0
- package/README.md +0 -105
- package/assets/client-files/assets/icons/icon-128x128.png +0 -0
- package/assets/client-files/assets/icons/icon-144x144.png +0 -0
- package/assets/client-files/assets/icons/icon-152x152.png +0 -0
- package/assets/client-files/assets/icons/icon-192x192.png +0 -0
- package/assets/client-files/assets/icons/icon-384x384.png +0 -0
- package/assets/client-files/assets/icons/icon-512x512.png +0 -0
- package/assets/client-files/assets/icons/icon-72x72.png +0 -0
- package/assets/client-files/assets/icons/icon-96x96.png +0 -0
- package/assets/client-files/favicon.ico +0 -0
- package/dist/SdCliBuildResultError.d.ts +0 -5
- package/dist/SdCliBuildResultError.mjs +0 -8
- package/dist/bin/sd-cli.d.ts +0 -2
- package/dist/bin/sd-cli.mjs +0 -410
- package/dist/build-tool/SdCliCacheCompilerHost.d.ts +0 -10
- package/dist/build-tool/SdCliCacheCompilerHost.mjs +0 -51
- package/dist/build-tool/SdCliCordova.d.ts +0 -16
- package/dist/build-tool/SdCliCordova.mjs +0 -212
- package/dist/build-tool/SdCliElectron.d.ts +0 -9
- package/dist/build-tool/SdCliElectron.mjs +0 -72
- package/dist/build-tool/SdCliGithubApi.d.ts +0 -13
- package/dist/build-tool/SdCliGithubApi.mjs +0 -92
- package/dist/build-tool/SdCliIndexFileGenerator.d.ts +0 -13
- package/dist/build-tool/SdCliIndexFileGenerator.mjs +0 -62
- package/dist/build-tool/SdCliNgCacheCompilerHost.d.ts +0 -12
- package/dist/build-tool/SdCliNgCacheCompilerHost.mjs +0 -43
- package/dist/build-tool/SdCliPackageLinter.d.ts +0 -8
- package/dist/build-tool/SdCliPackageLinter.mjs +0 -62
- package/dist/builder/SdCliClientBuilder.d.ts +0 -26
- package/dist/builder/SdCliClientBuilder.mjs +0 -769
- package/dist/builder/SdCliJsLibBuilder.d.ts +0 -14
- package/dist/builder/SdCliJsLibBuilder.mjs +0 -54
- package/dist/builder/SdCliServerBuilder.d.ts +0 -28
- package/dist/builder/SdCliServerBuilder.mjs +0 -482
- package/dist/builder/SdCliTsLibBuilder.d.ts +0 -35
- package/dist/builder/SdCliTsLibBuilder.mjs +0 -317
- package/dist/entry-points/SdCliFileCrypto.d.ts +0 -7
- package/dist/entry-points/SdCliFileCrypto.mjs +0 -72
- package/dist/entry-points/SdCliLocalUpdate.d.ts +0 -13
- package/dist/entry-points/SdCliLocalUpdate.mjs +0 -100
- package/dist/entry-points/SdCliPrepare.d.ts +0 -5
- package/dist/entry-points/SdCliPrepare.mjs +0 -86
- package/dist/entry-points/SdCliProject.d.ts +0 -34
- package/dist/entry-points/SdCliProject.mjs +0 -416
- package/dist/entry-points/SdCliProjectGenerator.d.ts +0 -44
- package/dist/entry-points/SdCliProjectGenerator.mjs +0 -326
- package/dist/entry-points/file/base/fc_package_eslintrc.d.ts +0 -3
- package/dist/entry-points/file/base/fc_package_eslintrc.mjs +0 -31
- package/dist/entry-points/file/base/fc_package_npmconfig.d.ts +0 -9
- package/dist/entry-points/file/base/fc_package_npmconfig.mjs +0 -32
- package/dist/entry-points/file/base/fc_package_tsconfig.d.ts +0 -5
- package/dist/entry-points/file/base/fc_package_tsconfig.mjs +0 -13
- package/dist/entry-points/file/client/fc_package_AppModule.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_AppModule.mjs +0 -37
- package/dist/entry-points/file/client/fc_package_AppPage.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_AppPage.mjs +0 -14
- package/dist/entry-points/file/client/fc_package_Page.d.ts +0 -4
- package/dist/entry-points/file/client/fc_package_Page.mjs +0 -19
- package/dist/entry-points/file/client/fc_package_client_main.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_client_main.mjs +0 -19
- package/dist/entry-points/file/client/fc_package_index.d.ts +0 -3
- package/dist/entry-points/file/client/fc_package_index.mjs +0 -88
- package/dist/entry-points/file/client/fc_package_manifest.d.ts +0 -5
- package/dist/entry-points/file/client/fc_package_manifest.mjs +0 -54
- package/dist/entry-points/file/client/fc_package_polyfills.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_polyfills.mjs +0 -11
- package/dist/entry-points/file/client/fc_package_styles.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_styles.mjs +0 -7
- package/dist/entry-points/file/db/fc_package_DbContext.d.ts +0 -3
- package/dist/entry-points/file/db/fc_package_DbContext.mjs +0 -14
- package/dist/entry-points/file/db/fc_package_DbModel.d.ts +0 -4
- package/dist/entry-points/file/db/fc_package_DbModel.mjs +0 -12
- package/dist/entry-points/file/project/fc_project_editor_config.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_editor_config.mjs +0 -22
- package/dist/entry-points/file/project/fc_project_eslintrc.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_eslintrc.mjs +0 -30
- package/dist/entry-points/file/project/fc_project_gitattributes.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_gitattributes.mjs +0 -6
- package/dist/entry-points/file/project/fc_project_gitignore.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_gitignore.mjs +0 -27
- package/dist/entry-points/file/project/fc_project_npmconfig.d.ts +0 -7
- package/dist/entry-points/file/project/fc_project_npmconfig.mjs +0 -37
- package/dist/entry-points/file/project/fc_project_readme.d.ts +0 -3
- package/dist/entry-points/file/project/fc_project_readme.mjs +0 -13
- package/dist/entry-points/file/project/fc_project_simplysm.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_simplysm.mjs +0 -2
- package/dist/entry-points/file/project/fc_project_tsconfig.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_tsconfig.mjs +0 -25
- package/dist/entry-points/file/server/fc_package_server_main.d.ts +0 -5
- package/dist/entry-points/file/server/fc_package_server_main.mjs +0 -60
- package/dist/index.d.ts +0 -54
- package/dist/index.mjs +0 -55
- package/dist/ng-tools/SdCliNgModuleGenerator.d.ts +0 -29
- package/dist/ng-tools/SdCliNgModuleGenerator.mjs +0 -502
- package/dist/ng-tools/babel/SdCliBbFileMetadata.d.ts +0 -25
- package/dist/ng-tools/babel/SdCliBbFileMetadata.mjs +0 -539
- package/dist/ng-tools/babel/SdCliBbRootMetadata.d.ts +0 -23
- package/dist/ng-tools/babel/SdCliBbRootMetadata.mjs +0 -247
- package/dist/ng-tools/babel/SdCliBbUtil.d.ts +0 -5
- package/dist/ng-tools/babel/SdCliBbUtil.mjs +0 -14
- package/dist/ng-tools/babel/TSdCliBbNgMetadata.d.ts +0 -42
- package/dist/ng-tools/babel/TSdCliBbNgMetadata.mjs +0 -216
- package/dist/ng-tools/babel/TSdCliBbTypeMetadata.d.ts +0 -55
- package/dist/ng-tools/babel/TSdCliBbTypeMetadata.mjs +0 -151
- package/dist/ng-tools/commons.d.ts +0 -9
- package/dist/ng-tools/commons.mjs +0 -2
- package/dist/ng-tools/typescript/SdCliTsFileMetadata.d.ts +0 -61
- package/dist/ng-tools/typescript/SdCliTsFileMetadata.mjs +0 -325
- package/dist/ng-tools/typescript/SdCliTsRootMetadata.d.ts +0 -8
- package/dist/ng-tools/typescript/SdCliTsRootMetadata.mjs +0 -28
- package/dist/ng-tools/typescript/SdCliTsUtil.d.ts +0 -5
- package/dist/ng-tools/typescript/SdCliTsUtil.mjs +0 -28
- package/dist/packages/SdCliPackage.d.ts +0 -22
- package/dist/packages/SdCliPackage.mjs +0 -206
- package/dist/utils/SdCliNpmConfigUtil.d.ts +0 -7
- package/dist/utils/SdCliNpmConfigUtil.mjs +0 -15
- package/dist/worker/build-worker.mjs +0 -67
- package/dist/worker/server-worker.mjs +0 -67
- package/docs/client-add-page.md +0 -8
- package/docs/client-router.md +0 -85
- package/docs/client-sw.md +0 -101
- package/docs/conf-orm.md +0 -81
- package/docs/conf-usage.md +0 -5
- package/docs/lib-local-update.md +0 -50
- package/docs/lib-ts-paths.md +0 -25
- package/lib/cordova-entry.js +0 -22
- package/src/SdCliBuildResultError.ts +0 -9
- package/src/bin/sd-cli.ts +0 -493
- package/src/build-tool/SdCliCacheCompilerHost.ts +0 -79
- package/src/build-tool/SdCliCordova.ts +0 -263
- package/src/build-tool/SdCliElectron.ts +0 -85
- package/src/build-tool/SdCliGithubApi.ts +0 -111
- package/src/build-tool/SdCliIndexFileGenerator.ts +0 -79
- package/src/build-tool/SdCliNgCacheCompilerHost.ts +0 -58
- package/src/build-tool/SdCliPackageLinter.ts +0 -74
- package/src/builder/SdCliClientBuilder.ts +0 -879
- package/src/builder/SdCliJsLibBuilder.ts +0 -70
- package/src/builder/SdCliServerBuilder.ts +0 -552
- package/src/builder/SdCliTsLibBuilder.ts +0 -450
- package/src/entry-points/SdCliFileCrypto.ts +0 -87
- package/src/entry-points/SdCliLocalUpdate.ts +0 -121
- package/src/entry-points/SdCliPrepare.ts +0 -86
- package/src/entry-points/SdCliProject.ts +0 -491
- package/src/entry-points/SdCliProjectGenerator.ts +0 -402
- package/src/entry-points/file/base/fc_package_eslintrc.ts +0 -30
- package/src/entry-points/file/base/fc_package_npmconfig.ts +0 -43
- package/src/entry-points/file/base/fc_package_tsconfig.ts +0 -12
- package/src/entry-points/file/client/fc_package_AppModule.ts +0 -36
- package/src/entry-points/file/client/fc_package_AppPage.ts +0 -13
- package/src/entry-points/file/client/fc_package_Page.ts +0 -19
- package/src/entry-points/file/client/fc_package_client_main.ts +0 -18
- package/src/entry-points/file/client/fc_package_index.ts +0 -87
- package/src/entry-points/file/client/fc_package_manifest.ts +0 -53
- package/src/entry-points/file/client/fc_package_polyfills.ts +0 -10
- package/src/entry-points/file/client/fc_package_styles.ts +0 -6
- package/src/entry-points/file/db/fc_package_DbContext.ts +0 -14
- package/src/entry-points/file/db/fc_package_DbModel.ts +0 -11
- package/src/entry-points/file/project/fc_project_editor_config.ts +0 -21
- package/src/entry-points/file/project/fc_project_eslintrc.ts +0 -29
- package/src/entry-points/file/project/fc_project_gitattributes.ts +0 -5
- package/src/entry-points/file/project/fc_project_gitignore.ts +0 -26
- package/src/entry-points/file/project/fc_project_npmconfig.ts +0 -36
- package/src/entry-points/file/project/fc_project_readme.ts +0 -12
- package/src/entry-points/file/project/fc_project_simplysm.ts +0 -1
- package/src/entry-points/file/project/fc_project_tsconfig.ts +0 -24
- package/src/entry-points/file/server/fc_package_server_main.ts +0 -62
- package/src/index.ts +0 -54
- package/src/ng-tools/SdCliNgModuleGenerator.ts +0 -672
- package/src/ng-tools/babel/SdCliBbFileMetadata.ts +0 -629
- package/src/ng-tools/babel/SdCliBbRootMetadata.ts +0 -292
- package/src/ng-tools/babel/SdCliBbUtil.ts +0 -15
- package/src/ng-tools/babel/TSdCliBbNgMetadata.ts +0 -251
- package/src/ng-tools/babel/TSdCliBbTypeMetadata.ts +0 -212
- package/src/ng-tools/commons.ts +0 -3
- package/src/ng-tools/typescript/SdCliTsFileMetadata.ts +0 -384
- package/src/ng-tools/typescript/SdCliTsRootMetadata.ts +0 -32
- package/src/ng-tools/typescript/SdCliTsUtil.ts +0 -29
- package/src/packages/SdCliPackage.ts +0 -259
- package/src/utils/SdCliNpmConfigUtil.ts +0 -16
- package/src/worker/build-worker.ts +0 -73
- package/src/worker/server-worker.ts +0 -72
- /package/dist/{worker/build-worker.d.ts → build-cluster.d.ts} +0 -0
- /package/dist/{worker/server-worker.d.ts → sd-cli.d.ts} +0 -0
|
@@ -1,450 +0,0 @@
|
|
|
1
|
-
import { INpmConfig, ISdCliLibPackageConfig, ISdCliPackageBuildResult } from "../commons";
|
|
2
|
-
import { EventEmitter } from "events";
|
|
3
|
-
import ts from "typescript";
|
|
4
|
-
import { FsUtil, Logger, PathUtil, SdFsWatcher } from "@simplysm/sd-core-node";
|
|
5
|
-
import path from "path";
|
|
6
|
-
import { createHash } from "crypto";
|
|
7
|
-
import { SdCliBuildResultUtil } from "../utils/SdCliBuildResultUtil";
|
|
8
|
-
import { NgtscProgram } from "@angular/compiler-cli";
|
|
9
|
-
import * as sass from "sass";
|
|
10
|
-
import { SdCliPackageLinter } from "../build-tool/SdCliPackageLinter";
|
|
11
|
-
import { SdCliCacheCompilerHost } from "../build-tool/SdCliCacheCompilerHost";
|
|
12
|
-
import { SdCliNgCacheCompilerHost } from "../build-tool/SdCliNgCacheCompilerHost";
|
|
13
|
-
import { NgCompiler } from "@angular/compiler-cli/src/ngtsc/core";
|
|
14
|
-
import { SdCliNpmConfigUtil } from "../utils/SdCliNpmConfigUtil";
|
|
15
|
-
import { SdCliNgModuleGenerator } from "../ng-tools/SdCliNgModuleGenerator";
|
|
16
|
-
import { SdCliIndexFileGenerator } from "../build-tool/SdCliIndexFileGenerator";
|
|
17
|
-
|
|
18
|
-
export class SdCliTsLibBuilder extends EventEmitter {
|
|
19
|
-
private readonly _logger: Logger;
|
|
20
|
-
|
|
21
|
-
private _moduleResolutionCache?: ts.ModuleResolutionCache;
|
|
22
|
-
|
|
23
|
-
private readonly _linter: SdCliPackageLinter;
|
|
24
|
-
|
|
25
|
-
private readonly _fileCache = new Map<string, IFileCache>();
|
|
26
|
-
private readonly _writeFileCache = new Map<string, string>();
|
|
27
|
-
|
|
28
|
-
private readonly _indexFileGenerator?: SdCliIndexFileGenerator;
|
|
29
|
-
|
|
30
|
-
private _program?: ts.Program;
|
|
31
|
-
private _ngProgram?: NgtscProgram;
|
|
32
|
-
private _builder?: ts.EmitAndSemanticDiagnosticsBuilderProgram;
|
|
33
|
-
private readonly _ngModuleGenerator?: SdCliNgModuleGenerator;
|
|
34
|
-
|
|
35
|
-
private readonly _tsconfigFilePath: string;
|
|
36
|
-
private readonly _parsedTsconfig: ts.ParsedCommandLine;
|
|
37
|
-
private readonly _npmConfigMap = new Map<string, INpmConfig>();
|
|
38
|
-
|
|
39
|
-
private readonly _isAngular: boolean;
|
|
40
|
-
private readonly _hasAngularRoute: boolean;
|
|
41
|
-
|
|
42
|
-
public constructor(private readonly _rootPath: string,
|
|
43
|
-
private readonly _config: ISdCliLibPackageConfig,
|
|
44
|
-
private readonly _projRootPath: string) {
|
|
45
|
-
super();
|
|
46
|
-
const npmConfig = this._getNpmConfig(this._rootPath)!;
|
|
47
|
-
|
|
48
|
-
// linter
|
|
49
|
-
this._linter = new SdCliPackageLinter(this._rootPath);
|
|
50
|
-
|
|
51
|
-
// logger
|
|
52
|
-
this._logger = Logger.get(["simplysm", "sd-cli", this.constructor.name, npmConfig.name]);
|
|
53
|
-
|
|
54
|
-
// isAngular
|
|
55
|
-
this._isAngular = !!this._config.angular;
|
|
56
|
-
this._hasAngularRoute = SdCliNpmConfigUtil.getDependencies(npmConfig).defaults.includes("@angular/router");
|
|
57
|
-
|
|
58
|
-
// tsconfig
|
|
59
|
-
this._tsconfigFilePath = path.resolve(this._rootPath, "tsconfig-build.json");
|
|
60
|
-
const tsconfig = FsUtil.readJson(this._tsconfigFilePath);
|
|
61
|
-
this._parsedTsconfig = ts.parseJsonConfigFileContent(tsconfig, ts.sys, this._rootPath, this._isAngular ? tsconfig.angularCompilerOptions : undefined);
|
|
62
|
-
|
|
63
|
-
if (this._isAngular) {
|
|
64
|
-
// NgModule 생성기 초기화
|
|
65
|
-
this._ngModuleGenerator = new SdCliNgModuleGenerator(this._rootPath, [
|
|
66
|
-
"controls",
|
|
67
|
-
"directives",
|
|
68
|
-
"guards",
|
|
69
|
-
"modals",
|
|
70
|
-
"providers",
|
|
71
|
-
"app",
|
|
72
|
-
"pages",
|
|
73
|
-
"print-templates",
|
|
74
|
-
"toasts",
|
|
75
|
-
"AppPage"
|
|
76
|
-
], this._hasAngularRoute ? {
|
|
77
|
-
glob: "**/*Page.ts",
|
|
78
|
-
fileEndsWith: "Page",
|
|
79
|
-
rootClassName: "AppPage"
|
|
80
|
-
} : undefined);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// index 생성기 초기화
|
|
84
|
-
if (this._config.autoIndex) {
|
|
85
|
-
this._indexFileGenerator = new SdCliIndexFileGenerator(this._rootPath, this._config.autoIndex);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
public override on(event: "change", listener: () => void): this;
|
|
90
|
-
public override on(event: "complete", listener: (results: ISdCliPackageBuildResult[]) => void): this;
|
|
91
|
-
public override on(event: string | symbol, listener: (...args: any[]) => void): this {
|
|
92
|
-
return super.on(event, listener);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
public async watchAsync(): Promise<void> {
|
|
96
|
-
this.emit("change");
|
|
97
|
-
|
|
98
|
-
this._logger.debug("dist 폴더 삭제...");
|
|
99
|
-
await FsUtil.removeAsync(this._parsedTsconfig.options.outDir!);
|
|
100
|
-
|
|
101
|
-
if (this._ngModuleGenerator) {
|
|
102
|
-
this._logger.debug("NgModule 생성...");
|
|
103
|
-
await this._ngModuleGenerator.runAsync();
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
if (this._indexFileGenerator) {
|
|
107
|
-
this._logger.debug("index.js 생성 및 index.js용 변경감지 시작...");
|
|
108
|
-
await this._indexFileGenerator.runAsync();
|
|
109
|
-
await this._indexFileGenerator.watchAsync();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
this._logger.debug("프로그램 로딩...");
|
|
113
|
-
const buildPack = this._createSdBuildPack(this._parsedTsconfig);
|
|
114
|
-
|
|
115
|
-
this._logger.debug("변경감지 구성...");
|
|
116
|
-
const relatedPaths = await this.getAllRelatedPathsAsync();
|
|
117
|
-
const watcher = SdFsWatcher.watch(relatedPaths);
|
|
118
|
-
watcher.onChange({}, async (changedInfos) => {
|
|
119
|
-
const changeFilePaths = changedInfos.filter((item) => ["add", "change", "unlink"].includes(item.event)).map((item) => item.path);
|
|
120
|
-
if (changeFilePaths.length === 0) return;
|
|
121
|
-
|
|
122
|
-
this._logger.debug("파일 변경 감지", changeFilePaths);
|
|
123
|
-
this.emit("change");
|
|
124
|
-
|
|
125
|
-
this._logger.debug("변경된 파일의 캐쉬 삭제...");
|
|
126
|
-
for (const changeFilePath of changeFilePaths) {
|
|
127
|
-
const fileCache = this._fileCache.get(PathUtil.posix(changeFilePath));
|
|
128
|
-
if (fileCache) {
|
|
129
|
-
if (fileCache.importerSet) {
|
|
130
|
-
for (const importer of fileCache.importerSet.values()) {
|
|
131
|
-
this._fileCache.delete(importer);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
this._fileCache.delete(PathUtil.posix(changeFilePath));
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (this._ngModuleGenerator) {
|
|
140
|
-
this._logger.debug("NgModule 생성...");
|
|
141
|
-
this._ngModuleGenerator.removeCaches(changeFilePaths);
|
|
142
|
-
await this._ngModuleGenerator.runAsync();
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
const watchBuildResults: ISdCliPackageBuildResult[] = [];
|
|
146
|
-
|
|
147
|
-
this._logger.debug("프로그램 로딩...");
|
|
148
|
-
const watchBuildPack = this._createSdBuildPack(this._parsedTsconfig);
|
|
149
|
-
|
|
150
|
-
const promises: Promise<ISdCliPackageBuildResult[]>[] = [];
|
|
151
|
-
|
|
152
|
-
// 빌드
|
|
153
|
-
promises.push(this._runBuilderAsync(watchBuildPack.builder, watchBuildPack.ngCompiler));
|
|
154
|
-
// watchBuildResults.push(...await this._runBuilderAsync(watchBuildPack.builder, watchBuildPack.ngCompiler));
|
|
155
|
-
|
|
156
|
-
// 린트
|
|
157
|
-
const lintFilePaths = [
|
|
158
|
-
...watchBuildPack.affectedSourceFiles.map((item) => item.fileName),
|
|
159
|
-
...changedInfos.filter((item) => ["add", "change"].includes(item.event)).map((item) => item.path)
|
|
160
|
-
];
|
|
161
|
-
if (lintFilePaths.length > 0) {
|
|
162
|
-
promises.push(this._linter.lintAsync(lintFilePaths, watchBuildPack.program));
|
|
163
|
-
// watchBuildResults.push(...await this._linter.lintAsync(lintFilePaths, watchBuildPack.program));
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
this._logger.debug("빌드...");
|
|
167
|
-
watchBuildResults.push(...(await Promise.all(promises)).mapMany());
|
|
168
|
-
|
|
169
|
-
this._logger.debug("변경감지 대상목록 재구성...");
|
|
170
|
-
const watchRelatedPaths = await this.getAllRelatedPathsAsync();
|
|
171
|
-
watcher.add(watchRelatedPaths);
|
|
172
|
-
|
|
173
|
-
this.emit("complete", watchBuildResults);
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
this._logger.debug("빌드...");
|
|
177
|
-
const buildResults = (await Promise.all([
|
|
178
|
-
this._runBuilderAsync(buildPack.builder, buildPack.ngCompiler),
|
|
179
|
-
this._linter.lintAsync(relatedPaths, buildPack.program)
|
|
180
|
-
].filterExists())).mapMany();
|
|
181
|
-
|
|
182
|
-
this._logger.debug("변경감지 대상목록 재구성...");
|
|
183
|
-
const watchRelatedPaths = await this.getAllRelatedPathsAsync();
|
|
184
|
-
watcher.add(watchRelatedPaths);
|
|
185
|
-
|
|
186
|
-
this.emit("complete", buildResults);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
public async buildAsync(): Promise<ISdCliPackageBuildResult[]> {
|
|
190
|
-
this._logger.debug("dist 폴더 삭제...");
|
|
191
|
-
await FsUtil.removeAsync(this._parsedTsconfig.options.outDir!);
|
|
192
|
-
|
|
193
|
-
if (this._ngModuleGenerator) {
|
|
194
|
-
this._logger.debug("NgModule 생성...");
|
|
195
|
-
await this._ngModuleGenerator.runAsync();
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (this._indexFileGenerator) {
|
|
199
|
-
this._logger.debug("index.js 생성...");
|
|
200
|
-
await this._indexFileGenerator.runAsync();
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
this._logger.debug("프로그램 로딩...");
|
|
204
|
-
const buildPack = this._createSdBuildPack(this._parsedTsconfig);
|
|
205
|
-
|
|
206
|
-
this._logger.debug("빌드...");
|
|
207
|
-
const relatedPaths = await this.getAllRelatedPathsAsync();
|
|
208
|
-
return (await Promise.all([
|
|
209
|
-
this._runBuilderAsync(buildPack.builder, buildPack.ngCompiler),
|
|
210
|
-
this._linter.lintAsync(relatedPaths, buildPack.program)
|
|
211
|
-
].filterExists())).mapMany();
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
private async getAllRelatedPathsAsync(): Promise<string[]> {
|
|
215
|
-
const projNpmConfig = this._getNpmConfig(this._projRootPath)!;
|
|
216
|
-
const projName = projNpmConfig.name;
|
|
217
|
-
|
|
218
|
-
const fileCachePaths = Array.from(this._fileCache.keys())
|
|
219
|
-
.filter((filePath) => {
|
|
220
|
-
const projRegex = new RegExp(`node_modules[\\\\/]@${projName}[\\\\/]`);
|
|
221
|
-
return !filePath.includes("node_modules")
|
|
222
|
-
|| (/node_modules[\\/]@simplysm[\\/]/).test(filePath)
|
|
223
|
-
|| projRegex.test(filePath);
|
|
224
|
-
});
|
|
225
|
-
const mySourceGlobPath = path.resolve(this._rootPath, "**", "+(*.js|*.cjs|*.mjs|*.ts|*.scss)");
|
|
226
|
-
const mySourceFilePaths = await FsUtil.globAsync(mySourceGlobPath, {
|
|
227
|
-
ignore: [
|
|
228
|
-
"**/node_modules/**",
|
|
229
|
-
"**/dist/**",
|
|
230
|
-
"**/.*/**"
|
|
231
|
-
]
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
return [...fileCachePaths, ...mySourceFilePaths, path.resolve(this._rootPath, ".eslintrc.cjs")].distinct();
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
private async _runBuilderAsync(builder: ts.EmitAndSemanticDiagnosticsBuilderProgram, ngCompiler?: NgCompiler): Promise<ISdCliPackageBuildResult[]> {
|
|
238
|
-
try {
|
|
239
|
-
const results: ISdCliPackageBuildResult[] = [];
|
|
240
|
-
|
|
241
|
-
const diagnostics: ts.Diagnostic[] = [];
|
|
242
|
-
|
|
243
|
-
if (ngCompiler) {
|
|
244
|
-
diagnostics.push(...ngCompiler.getOptionDiagnostics());
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
diagnostics.push(
|
|
248
|
-
...builder.getOptionsDiagnostics(),
|
|
249
|
-
...builder.getGlobalDiagnostics()
|
|
250
|
-
);
|
|
251
|
-
|
|
252
|
-
if (ngCompiler) {
|
|
253
|
-
await ngCompiler.analyzeAsync();
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
for (const sourceFile of builder.getSourceFiles()) {
|
|
257
|
-
if (ngCompiler?.ignoreForDiagnostics.has(sourceFile)) continue;
|
|
258
|
-
|
|
259
|
-
diagnostics.push(
|
|
260
|
-
...builder.getSyntacticDiagnostics(sourceFile),
|
|
261
|
-
...builder.getSemanticDiagnostics(sourceFile)
|
|
262
|
-
);
|
|
263
|
-
|
|
264
|
-
if (
|
|
265
|
-
ngCompiler &&
|
|
266
|
-
!sourceFile.isDeclarationFile &&
|
|
267
|
-
!ngCompiler.ignoreForEmit.has(sourceFile) &&
|
|
268
|
-
!ngCompiler.incrementalDriver.safeToSkipEmit(sourceFile)
|
|
269
|
-
) {
|
|
270
|
-
diagnostics.push(
|
|
271
|
-
...ngCompiler.getDiagnosticsForFile(sourceFile, 1)
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
results.push(
|
|
277
|
-
...diagnostics
|
|
278
|
-
.filter((item) => [ts.DiagnosticCategory.Error, ts.DiagnosticCategory.Warning].includes(item.category))
|
|
279
|
-
.map((item) => SdCliBuildResultUtil.convertFromTsDiag(item))
|
|
280
|
-
.filterExists()
|
|
281
|
-
);
|
|
282
|
-
|
|
283
|
-
if (results.some((item) => item.severity === "error")) {
|
|
284
|
-
return results;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
const transformers = ngCompiler?.prepareEmit().transformers;
|
|
288
|
-
for (const sourceFile of builder.getSourceFiles()) {
|
|
289
|
-
if (ngCompiler?.ignoreForEmit.has(sourceFile)) continue;
|
|
290
|
-
builder.emit(sourceFile, undefined, undefined, undefined, transformers);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
return results;
|
|
294
|
-
}
|
|
295
|
-
catch (err) {
|
|
296
|
-
if (err instanceof sass.Exception) {
|
|
297
|
-
const matches = (/^(.*\.sd\.scss) ([0-9]*):([0-9]*)/).exec(err.sassStack)!;
|
|
298
|
-
const filePath = path.resolve(matches[1].replace(/\.sd\.scss/, "").replace(/^\.:/, item => item.toUpperCase()));
|
|
299
|
-
const scssLine = matches[2];
|
|
300
|
-
const scssChar = matches[3];
|
|
301
|
-
const message = err.sassMessage;
|
|
302
|
-
|
|
303
|
-
return [{
|
|
304
|
-
filePath,
|
|
305
|
-
line: undefined,
|
|
306
|
-
char: undefined,
|
|
307
|
-
code: undefined,
|
|
308
|
-
severity: "error",
|
|
309
|
-
message: `스타일(${scssLine}:${scssChar}): ${message}\n${err.message}`
|
|
310
|
-
}];
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
return [{
|
|
314
|
-
filePath: undefined,
|
|
315
|
-
line: undefined,
|
|
316
|
-
char: undefined,
|
|
317
|
-
code: undefined,
|
|
318
|
-
severity: "error",
|
|
319
|
-
message: err.stack
|
|
320
|
-
}];
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
private _createSdBuildPack(parsedTsconfig: ts.ParsedCommandLine): ISdBuildPack {
|
|
325
|
-
const compilerHost = this._createCacheCompilerHost(parsedTsconfig);
|
|
326
|
-
const { program, ngCompiler } = this._createProgram(parsedTsconfig, compilerHost);
|
|
327
|
-
|
|
328
|
-
this._builder = ts.createEmitAndSemanticDiagnosticsBuilderProgram(
|
|
329
|
-
program,
|
|
330
|
-
compilerHost,
|
|
331
|
-
this._builder
|
|
332
|
-
);
|
|
333
|
-
|
|
334
|
-
const affectedSourceFileSet: Set<ts.SourceFile> = new Set<ts.SourceFile>();
|
|
335
|
-
while (true) {
|
|
336
|
-
const result = this._builder.getSemanticDiagnosticsOfNextAffectedFile(undefined, (sourceFile) => {
|
|
337
|
-
// this._logger.debug(sourceFile.fileName + " SYNTAX 로딩...");
|
|
338
|
-
if (ngCompiler?.ignoreForDiagnostics.has(sourceFile) && sourceFile.fileName.endsWith(".ngtypecheck.ts")) {
|
|
339
|
-
const orgFileName = sourceFile.fileName.slice(0, -15) + ".ts";
|
|
340
|
-
const orgSourceFile = this._builder!.getSourceFile(orgFileName);
|
|
341
|
-
if (orgSourceFile) {
|
|
342
|
-
affectedSourceFileSet.add(orgSourceFile);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
return true;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return false;
|
|
349
|
-
});
|
|
350
|
-
if (!result) break;
|
|
351
|
-
|
|
352
|
-
// this._logger.debug((result.affected as ts.SourceFile).fileName + " SYNTAX 로딩");
|
|
353
|
-
affectedSourceFileSet.add(result.affected as ts.SourceFile);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
return {
|
|
357
|
-
program,
|
|
358
|
-
ngCompiler,
|
|
359
|
-
builder: this._builder,
|
|
360
|
-
affectedSourceFiles: Array.from(affectedSourceFileSet.values())
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
private _createProgram(parsedTsconfig: ts.ParsedCommandLine, compilerHost: ts.CompilerHost): { program: ts.Program; ngCompiler?: NgCompiler } {
|
|
365
|
-
if (this._isAngular) {
|
|
366
|
-
this._ngProgram = new NgtscProgram(
|
|
367
|
-
parsedTsconfig.fileNames,
|
|
368
|
-
parsedTsconfig.options,
|
|
369
|
-
compilerHost,
|
|
370
|
-
this._ngProgram
|
|
371
|
-
);
|
|
372
|
-
this._program = this._ngProgram.getTsProgram();
|
|
373
|
-
|
|
374
|
-
this._configProgramSourceFileVersions(this._program);
|
|
375
|
-
return {
|
|
376
|
-
program: this._program,
|
|
377
|
-
ngCompiler: this._ngProgram.compiler
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
else {
|
|
381
|
-
this._program = ts.createProgram(
|
|
382
|
-
parsedTsconfig.fileNames,
|
|
383
|
-
parsedTsconfig.options,
|
|
384
|
-
compilerHost,
|
|
385
|
-
this._program
|
|
386
|
-
);
|
|
387
|
-
|
|
388
|
-
this._configProgramSourceFileVersions(this._program);
|
|
389
|
-
|
|
390
|
-
return { program: this._program };
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
private _configProgramSourceFileVersions(program: ts.Program): void {
|
|
395
|
-
const baseGetSourceFiles = program.getSourceFiles;
|
|
396
|
-
program.getSourceFiles = function (...parameters) {
|
|
397
|
-
const files: readonly (ts.SourceFile & { version?: string })[] = baseGetSourceFiles(...parameters);
|
|
398
|
-
|
|
399
|
-
for (const file of files) {
|
|
400
|
-
if (file.version === undefined) {
|
|
401
|
-
file.version = createHash("sha256").update(file.text).digest("hex");
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
return files;
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
private _createCacheCompilerHost(parsedTsconfig: ts.ParsedCommandLine): ts.CompilerHost {
|
|
410
|
-
if (!this._moduleResolutionCache) {
|
|
411
|
-
this._moduleResolutionCache = ts.createModuleResolutionCache(this._rootPath, (s) => s, parsedTsconfig.options);
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
const compilerHost = SdCliCacheCompilerHost.create(
|
|
415
|
-
parsedTsconfig,
|
|
416
|
-
this._moduleResolutionCache,
|
|
417
|
-
this._fileCache,
|
|
418
|
-
this._writeFileCache
|
|
419
|
-
);
|
|
420
|
-
|
|
421
|
-
if (this._isAngular) {
|
|
422
|
-
return SdCliNgCacheCompilerHost.wrap(compilerHost, this._fileCache);
|
|
423
|
-
}
|
|
424
|
-
else {
|
|
425
|
-
return compilerHost;
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
private _getNpmConfig(pkgPath: string): INpmConfig | undefined {
|
|
430
|
-
if (!this._npmConfigMap.has(pkgPath)) {
|
|
431
|
-
this._npmConfigMap.set(pkgPath, FsUtil.readJson(path.resolve(pkgPath, "package.json")));
|
|
432
|
-
}
|
|
433
|
-
return this._npmConfigMap.get(pkgPath);
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
interface IFileCache {
|
|
438
|
-
exists?: boolean;
|
|
439
|
-
sourceFile?: ts.SourceFile;
|
|
440
|
-
content?: string;
|
|
441
|
-
styleContent?: string;
|
|
442
|
-
importerSet?: Set<string>;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
interface ISdBuildPack {
|
|
446
|
-
program: ts.Program;
|
|
447
|
-
ngCompiler?: NgCompiler;
|
|
448
|
-
builder: ts.EmitAndSemanticDiagnosticsBuilderProgram;
|
|
449
|
-
affectedSourceFiles: ts.SourceFile[];
|
|
450
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import readline from "readline";
|
|
2
|
-
import { Writable } from "stream";
|
|
3
|
-
import crypto from "crypto";
|
|
4
|
-
import { FsUtil } from "@simplysm/sd-core-node";
|
|
5
|
-
import os from "os";
|
|
6
|
-
|
|
7
|
-
export class SdCliFileCrypto {
|
|
8
|
-
public async encryptAsync(filePath: string): Promise<void> {
|
|
9
|
-
if (!FsUtil.exists(filePath)) {
|
|
10
|
-
throw new Error(`파일 '${filePath}'을 찾을 수 없습니다.`);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const key = await this._readKeyAsync("password: ");
|
|
14
|
-
if (!key) {
|
|
15
|
-
throw new Error("암호화키를 반드시 입력해야 합니다.");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const confirmKey = await this._readKeyAsync("confirm password: ");
|
|
19
|
-
if (key !== confirmKey) {
|
|
20
|
-
throw new Error("암호화키가 서로 다릅니다.");
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
this._encryptFile(filePath, key, filePath + ".enc");
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public async decryptAsync(encFilePath: string): Promise<void> {
|
|
27
|
-
if (!FsUtil.exists(encFilePath)) {
|
|
28
|
-
throw new Error(`파일 '${encFilePath}'을 찾을 수 없습니다.`);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (!encFilePath.endsWith(".enc")) {
|
|
32
|
-
throw new Error(`파일 ${encFilePath}의 확장자가 '.enc'가 아닙니다.`);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const resultFilePath = encFilePath.slice(0, -4);
|
|
36
|
-
if (FsUtil.exists(resultFilePath)) {
|
|
37
|
-
process.stdout.write(`복호화 시, 현재 존재하는 '${resultFilePath}'파일을 덮어씁니다.${os.EOL}`, "utf-8");
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const key = await this._readKeyAsync("password: ");
|
|
41
|
-
if (!key) {
|
|
42
|
-
throw new Error("암호화키를 반드시 입력해야 합니다.");
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
this._decryptFile(encFilePath, key, resultFilePath);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
private _encryptFile(filePath: string, key: string, encFilePath: string): void {
|
|
49
|
-
const iv = Buffer.alloc(16, 0);
|
|
50
|
-
const cipheriv = crypto.createCipheriv("aes-192-cbc", crypto.scryptSync(key, "salt", 24), iv);
|
|
51
|
-
|
|
52
|
-
const input = FsUtil.createReadStream(filePath);
|
|
53
|
-
const output = FsUtil.createWriteStream(encFilePath);
|
|
54
|
-
input.pipe(cipheriv).pipe(output);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
private _decryptFile(encFilePath: string, key: string, filePath: string): void {
|
|
58
|
-
const iv = Buffer.alloc(16, 0);
|
|
59
|
-
const cipheriv = crypto.createDecipheriv("aes-192-cbc", crypto.scryptSync(key, "salt", 24), iv);
|
|
60
|
-
|
|
61
|
-
const input = FsUtil.createReadStream(encFilePath);
|
|
62
|
-
const output = FsUtil.createWriteStream(filePath);
|
|
63
|
-
input.pipe(cipheriv).pipe(output);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
private async _readKeyAsync(message: string): Promise<string> {
|
|
67
|
-
process.stdout.write(message, "utf-8");
|
|
68
|
-
|
|
69
|
-
return await new Promise((resolve) => {
|
|
70
|
-
const rl = readline.createInterface({
|
|
71
|
-
input: process.stdin,
|
|
72
|
-
output: new Writable({
|
|
73
|
-
write: (chunk, encoding, callback) => {
|
|
74
|
-
callback();
|
|
75
|
-
}
|
|
76
|
-
}),
|
|
77
|
-
terminal: true
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
rl.question(message, (answer) => {
|
|
81
|
-
process.stdout.write(os.EOL, "utf-8");
|
|
82
|
-
resolve(answer);
|
|
83
|
-
rl.close();
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { SdCliConfigUtil } from "../utils/SdCliConfigUtil";
|
|
2
|
-
import { FsUtil, Logger, PathUtil, SdFsWatcher } from "@simplysm/sd-core-node";
|
|
3
|
-
import path from "path";
|
|
4
|
-
|
|
5
|
-
export class SdCliLocalUpdate {
|
|
6
|
-
private readonly _logger = Logger.get(["simplysm", "sd-cli", this.constructor.name]);
|
|
7
|
-
|
|
8
|
-
public constructor(private readonly _rootPath: string) {
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
public async runAsync(opt: { confFileRelPath: string }): Promise<void> {
|
|
12
|
-
this._logger.debug("프로젝트 설정 가져오기...");
|
|
13
|
-
const conf = await SdCliConfigUtil.loadConfigAsync(path.resolve(this._rootPath, opt.confFileRelPath), false);
|
|
14
|
-
if (!conf.localUpdates) return;
|
|
15
|
-
|
|
16
|
-
const updatePathInfos = await this._getUpdatePathInfosAsync(conf.localUpdates);
|
|
17
|
-
this._logger.debug("로컬 업데이트 구성", updatePathInfos);
|
|
18
|
-
|
|
19
|
-
this._logger.log("로컬 라이브러리 업데이트 시작...");
|
|
20
|
-
for (const updatePathInfo of updatePathInfos) {
|
|
21
|
-
if (!FsUtil.exists(updatePathInfo.source)) {
|
|
22
|
-
this._logger.warn(`소스경로를 찾을 수 없어 무시됩니다(${updatePathInfo.source})`);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// 소스경로에서 대상경로로 파일 복사
|
|
27
|
-
await FsUtil.copyAsync(updatePathInfo.source, updatePathInfo.target, (src) => {
|
|
28
|
-
return !src.includes("node_modules") && !src.endsWith("package.json");
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
this._logger.info("로컬 라이브러리 업데이트 완료");
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public async watchAsync(opt: { confFileRelPath: string }): Promise<void> {
|
|
35
|
-
this._logger.debug("프로젝트 설정 가져오기...");
|
|
36
|
-
const conf = await SdCliConfigUtil.loadConfigAsync(path.resolve(this._rootPath, opt.confFileRelPath), false);
|
|
37
|
-
if (!conf.localUpdates) return;
|
|
38
|
-
|
|
39
|
-
const updatePathInfos = await this._getUpdatePathInfosAsync(conf.localUpdates);
|
|
40
|
-
this._logger.debug("로컬 업데이트 구성");
|
|
41
|
-
|
|
42
|
-
const watchPaths = (await updatePathInfos.mapManyAsync(async (item) => await this._getWatchPathsAsync(item.source))).distinct();
|
|
43
|
-
|
|
44
|
-
const watcher = SdFsWatcher.watch(watchPaths);
|
|
45
|
-
watcher.onChange({ delay: 1000 }, async (changedInfos) => {
|
|
46
|
-
const changeFilePaths = changedInfos.filter((item) => ["add", "change", "unlink"].includes(item.event)).map((item) => item.path);
|
|
47
|
-
if (changeFilePaths.length === 0) return;
|
|
48
|
-
|
|
49
|
-
this._logger.log("로컬 라이브러리 변경감지...");
|
|
50
|
-
for (const changedFilePath of changeFilePaths) {
|
|
51
|
-
if (!FsUtil.exists(changedFilePath)) continue;
|
|
52
|
-
|
|
53
|
-
for (const updatePathInfo of updatePathInfos) {
|
|
54
|
-
if (!PathUtil.isChildPath(changedFilePath, updatePathInfo.source)) continue;
|
|
55
|
-
|
|
56
|
-
const sourceRelPath = path.relative(updatePathInfo.source, changedFilePath);
|
|
57
|
-
if (sourceRelPath.includes("node_modules")) continue;
|
|
58
|
-
if (sourceRelPath.includes("package.json")) continue;
|
|
59
|
-
|
|
60
|
-
const targetFilePath = path.resolve(updatePathInfo.target, sourceRelPath);
|
|
61
|
-
|
|
62
|
-
this._logger.debug(`변경파일감지(복사): ${changedFilePath} => ${targetFilePath}`);
|
|
63
|
-
await FsUtil.copyAsync(changedFilePath, targetFilePath);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const watchWatchPaths = (await updatePathInfos.mapManyAsync(async (item) => await this._getWatchPathsAsync(item.source))).distinct();
|
|
68
|
-
watcher.add(watchWatchPaths);
|
|
69
|
-
|
|
70
|
-
this._logger.info("로컬 라이브러리 복사 완료");
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
private async _getUpdatePathInfosAsync(record: Record<string, string>): Promise<IUpdatePathInfo[]> {
|
|
75
|
-
const result: IUpdatePathInfo[] = [];
|
|
76
|
-
for (const pkgGlobPath of Object.keys(record)) {
|
|
77
|
-
// "node_modules'에서 로컬업데이트 설정에 맞는 패키지를 "glob"하여 대상 패키지경로 목록 가져오기
|
|
78
|
-
const targetPaths = [
|
|
79
|
-
...await FsUtil.globAsync(path.resolve(this._rootPath, "node_modules", pkgGlobPath)),
|
|
80
|
-
...await FsUtil.globAsync(path.resolve(this._rootPath, "packages", "*", "node_modules", pkgGlobPath))
|
|
81
|
-
];
|
|
82
|
-
|
|
83
|
-
result.push(
|
|
84
|
-
...targetPaths
|
|
85
|
-
.map((targetPath) => {
|
|
86
|
-
// 대상의 명칭 추출
|
|
87
|
-
const regexpText = pkgGlobPath.replace(/[\\/.*]/g, (item) => (
|
|
88
|
-
item === "/" ? "[\\\\\\/]"
|
|
89
|
-
: item === "." ? "\\."
|
|
90
|
-
: item === "*" ? "(.*)"
|
|
91
|
-
: item
|
|
92
|
-
));
|
|
93
|
-
const targetNameMatch = new RegExp(regexpText).exec(targetPath);
|
|
94
|
-
if (!targetNameMatch || typeof targetNameMatch[1] === "undefined") return undefined;
|
|
95
|
-
const targetName = targetNameMatch[1];
|
|
96
|
-
|
|
97
|
-
// 가져올 소스 경로 추출
|
|
98
|
-
const sourcePath = path.resolve(record[pkgGlobPath].replace(/\*/g, targetName));
|
|
99
|
-
return { source: sourcePath, target: targetPath };
|
|
100
|
-
})
|
|
101
|
-
.filterExists()
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return result;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
protected async _getWatchPathsAsync(sourcePath: string): Promise<string[]> {
|
|
109
|
-
return await FsUtil.globAsync(path.resolve(sourcePath, "**"), {
|
|
110
|
-
ignore: [
|
|
111
|
-
"**/node_modules/**",
|
|
112
|
-
"**/package.json"
|
|
113
|
-
]
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
interface IUpdatePathInfo {
|
|
119
|
-
source: string;
|
|
120
|
-
target: string;
|
|
121
|
-
}
|