@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,212 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ArrayExpression,
|
|
3
|
-
ClassDeclaration,
|
|
4
|
-
ConditionalExpression,
|
|
5
|
-
FunctionDeclaration,
|
|
6
|
-
isAssignmentExpression,
|
|
7
|
-
isExpressionStatement,
|
|
8
|
-
isIdentifier,
|
|
9
|
-
isMemberExpression,
|
|
10
|
-
isObjectProperty,
|
|
11
|
-
ObjectExpression,
|
|
12
|
-
VariableDeclarator
|
|
13
|
-
} from "@babel/types";
|
|
14
|
-
import { NeverEntryError } from "@simplysm/sd-core-common";
|
|
15
|
-
import { SdCliBbFileMetadata } from "./SdCliBbFileMetadata";
|
|
16
|
-
import {
|
|
17
|
-
SdCliBbNgComponentMetadata,
|
|
18
|
-
SdCliBbNgDirectiveMetadata,
|
|
19
|
-
SdCliBbNgInjectableMetadata,
|
|
20
|
-
SdCliBbNgModuleMetadata,
|
|
21
|
-
SdCliBbNgPipeMetadata,
|
|
22
|
-
TSdCliBbNgMetadata
|
|
23
|
-
} from "./TSdCliBbNgMetadata";
|
|
24
|
-
import { TSdCliBbMetadata } from "./SdCliBbRootMetadata";
|
|
25
|
-
|
|
26
|
-
export type TSdCliBbTypeMetadata = SdCliBbClassMetadata |
|
|
27
|
-
SdCliBbVariableMetadata |
|
|
28
|
-
SdCliBbFunctionMetadata |
|
|
29
|
-
SdCliBbObjectMetadata |
|
|
30
|
-
SdCliBbArrayMetadata |
|
|
31
|
-
SdCliBbConditionMetadata;
|
|
32
|
-
|
|
33
|
-
export class SdCliBbClassMetadata {
|
|
34
|
-
public constructor(private readonly _fileMeta: SdCliBbFileMetadata,
|
|
35
|
-
private readonly _rawMeta: ClassDeclaration) {
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public get filePath(): string {
|
|
39
|
-
return this._fileMeta.filePath;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public get name(): string {
|
|
43
|
-
return this._rawMeta.id.name;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
private _ngDeclCache?: TSdCliBbNgMetadata | "none";
|
|
47
|
-
|
|
48
|
-
public get ngDecl(): TSdCliBbNgMetadata | undefined {
|
|
49
|
-
if (this._ngDeclCache !== undefined) {
|
|
50
|
-
return this._ngDeclCache === "none" ? undefined : this._ngDeclCache;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
for (const meta of this._fileMeta.rawMetas) {
|
|
54
|
-
if (
|
|
55
|
-
isExpressionStatement(meta) &&
|
|
56
|
-
isAssignmentExpression(meta.expression) &&
|
|
57
|
-
isMemberExpression(meta.expression.left) &&
|
|
58
|
-
isIdentifier(meta.expression.left.object) &&
|
|
59
|
-
meta.expression.left.object.name === this._rawMeta.id.name &&
|
|
60
|
-
isIdentifier(meta.expression.left.property)
|
|
61
|
-
) {
|
|
62
|
-
if (meta.expression.left.property.name === "ɵmod") {
|
|
63
|
-
this._ngDeclCache = new SdCliBbNgModuleMetadata(this._fileMeta, this._rawMeta.id.name);
|
|
64
|
-
return this._ngDeclCache;
|
|
65
|
-
}
|
|
66
|
-
else if (meta.expression.left.property.name === "ɵprov") {
|
|
67
|
-
this._ngDeclCache = new SdCliBbNgInjectableMetadata(this._fileMeta, this._rawMeta.id.name);
|
|
68
|
-
return this._ngDeclCache;
|
|
69
|
-
}
|
|
70
|
-
else if (meta.expression.left.property.name === "ɵdir") {
|
|
71
|
-
this._ngDeclCache = new SdCliBbNgDirectiveMetadata(this._fileMeta, this._rawMeta.id.name);
|
|
72
|
-
return this._ngDeclCache;
|
|
73
|
-
}
|
|
74
|
-
else if (meta.expression.left.property.name === "ɵcmp") {
|
|
75
|
-
this._ngDeclCache = new SdCliBbNgComponentMetadata(this._fileMeta, this._rawMeta.id.name);
|
|
76
|
-
return this._ngDeclCache;
|
|
77
|
-
}
|
|
78
|
-
else if (meta.expression.left.property.name === "ɵpipe") {
|
|
79
|
-
this._ngDeclCache = new SdCliBbNgPipeMetadata(this._fileMeta, this._rawMeta.id.name);
|
|
80
|
-
return this._ngDeclCache;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
this._ngDeclCache = "none";
|
|
86
|
-
return undefined;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export class SdCliBbVariableMetadata {
|
|
91
|
-
public constructor(private readonly _fileMeta: SdCliBbFileMetadata,
|
|
92
|
-
private readonly _rawMeta: VariableDeclarator) {
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
public get filePath(): string {
|
|
96
|
-
return this._fileMeta.filePath;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
public get name(): string {
|
|
100
|
-
if (!isIdentifier(this._rawMeta.id)) throw new NeverEntryError();
|
|
101
|
-
return this._rawMeta.id.name;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
private _valueCache?: TSdCliBbMetadata;
|
|
105
|
-
|
|
106
|
-
public get value(): TSdCliBbMetadata | undefined {
|
|
107
|
-
if (this._valueCache === undefined) {
|
|
108
|
-
this._valueCache = this._rawMeta.init == null ? undefined : this._fileMeta.getMetaFromRaw(this._rawMeta.init);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return this._valueCache;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export class SdCliBbFunctionMetadata {
|
|
116
|
-
public constructor(private readonly _fileMeta: SdCliBbFileMetadata,
|
|
117
|
-
private readonly _rawMeta: FunctionDeclaration) {
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
public get filePath(): string {
|
|
121
|
-
return this._fileMeta.filePath;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
public get name(): string {
|
|
125
|
-
if (!isIdentifier(this._rawMeta.id)) throw new NeverEntryError();
|
|
126
|
-
return this._rawMeta.id.name;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export class SdCliBbObjectMetadata {
|
|
131
|
-
public constructor(private readonly _fileMeta: SdCliBbFileMetadata,
|
|
132
|
-
private readonly _metadata: ObjectExpression) {
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
private readonly _getPropValueCache = new Map<string, TSdCliBbMetadata | undefined>();
|
|
136
|
-
|
|
137
|
-
public getPropValue(propName: string): TSdCliBbMetadata | undefined {
|
|
138
|
-
if (this._getPropValueCache.has(propName)) {
|
|
139
|
-
return this._getPropValueCache.get(propName);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
const prop = this._metadata.properties
|
|
143
|
-
.single((item) => (
|
|
144
|
-
isObjectProperty(item) &&
|
|
145
|
-
isIdentifier(item.key) &&
|
|
146
|
-
item.key.name === propName
|
|
147
|
-
));
|
|
148
|
-
if (prop && !isObjectProperty(prop)) {
|
|
149
|
-
throw new NeverEntryError();
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (!prop) {
|
|
153
|
-
this._getPropValueCache.set(propName, undefined);
|
|
154
|
-
return undefined;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const result = this._fileMeta.getMetaFromRaw(prop.value);
|
|
158
|
-
this._getPropValueCache.set(propName, result);
|
|
159
|
-
return result;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export class SdCliBbArrayMetadata {
|
|
164
|
-
public constructor(private readonly _fileMeta: SdCliBbFileMetadata,
|
|
165
|
-
private readonly _metadata: ArrayExpression) {
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
private _valueCache?: (TSdCliBbMetadata | undefined)[];
|
|
169
|
-
|
|
170
|
-
public get value(): (TSdCliBbMetadata | undefined)[] {
|
|
171
|
-
if (this._valueCache === undefined) {
|
|
172
|
-
this._valueCache = [];
|
|
173
|
-
for (const el of this._metadata.elements) {
|
|
174
|
-
this._valueCache.push(el ? this._fileMeta.getMetaFromRaw(el) : undefined);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return this._valueCache;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export class SdCliBbConditionMetadata {
|
|
182
|
-
public constructor(private readonly _fileMeta: SdCliBbFileMetadata,
|
|
183
|
-
private readonly _metadata: ConditionalExpression) {
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
private _testCache?: TSdCliBbMetadata | undefined;
|
|
187
|
-
|
|
188
|
-
public get test(): TSdCliBbMetadata | undefined {
|
|
189
|
-
if (this._testCache === undefined) {
|
|
190
|
-
this._testCache = this._fileMeta.getMetaFromRaw(this._metadata.test);
|
|
191
|
-
}
|
|
192
|
-
return this._testCache;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
private _consequentCache?: TSdCliBbMetadata | undefined;
|
|
196
|
-
|
|
197
|
-
public get consequent(): TSdCliBbMetadata | undefined {
|
|
198
|
-
if (this._consequentCache === undefined) {
|
|
199
|
-
this._consequentCache = this._fileMeta.getMetaFromRaw(this._metadata.consequent);
|
|
200
|
-
}
|
|
201
|
-
return this._consequentCache;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
private _alternateCache?: TSdCliBbMetadata | undefined;
|
|
205
|
-
|
|
206
|
-
public get alternate(): TSdCliBbMetadata | undefined {
|
|
207
|
-
if (this._alternateCache === undefined) {
|
|
208
|
-
this._alternateCache = this._fileMeta.getMetaFromRaw(this._metadata.alternate);
|
|
209
|
-
}
|
|
210
|
-
return this._alternateCache;
|
|
211
|
-
}
|
|
212
|
-
}
|
package/src/ng-tools/commons.ts
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { FsUtil } from "@simplysm/sd-core-node";
|
|
2
|
-
import ts from "typescript";
|
|
3
|
-
import { NeverEntryError } from "@simplysm/sd-core-common";
|
|
4
|
-
import { TSdCliMetaRef } from "../commons";
|
|
5
|
-
import path from "path";
|
|
6
|
-
|
|
7
|
-
export class SdCliTsFileMetadata {
|
|
8
|
-
public readonly sourceFile: ts.SourceFile;
|
|
9
|
-
|
|
10
|
-
public constructor(public readonly filePath: string) {
|
|
11
|
-
const fileContent = FsUtil.readFile(filePath);
|
|
12
|
-
this.sourceFile = ts.createSourceFile(filePath, fileContent, ts.ScriptTarget.ES2017);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
private _directExportClassesCache?: { exportedName: string; target: SdCliTsClassMetadata }[];
|
|
16
|
-
|
|
17
|
-
public get directExportClasses(): { exportedName: string; target: SdCliTsClassMetadata }[] {
|
|
18
|
-
if (this._directExportClassesCache) return this._directExportClassesCache;
|
|
19
|
-
|
|
20
|
-
const result: { exportedName: string; target: SdCliTsClassMetadata }[] = [];
|
|
21
|
-
this.sourceFile.forEachChild((node) => {
|
|
22
|
-
if (!ts.canHaveModifiers(node) || !ts.getModifiers(node)?.some((item) => item.kind === ts.SyntaxKind.ExportKeyword)) return;
|
|
23
|
-
if (!ts.isClassDeclaration(node)) return;
|
|
24
|
-
if (node.name === undefined) {
|
|
25
|
-
throw new NeverEntryError();
|
|
26
|
-
}
|
|
27
|
-
result.push({ exportedName: node.name.text, target: new SdCliTsClassMetadata(this, node) });
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
this._directExportClassesCache = result;
|
|
31
|
-
return result;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public get imports(): TSdCliMetaRef[] {
|
|
35
|
-
const result: TSdCliMetaRef[] = [];
|
|
36
|
-
|
|
37
|
-
ts.forEachChild(this.sourceFile, (node) => {
|
|
38
|
-
if (ts.isImportDeclaration(node)) {
|
|
39
|
-
if (ts.isStringLiteral(node.moduleSpecifier)) {
|
|
40
|
-
if (node.importClause) {
|
|
41
|
-
if (node.moduleSpecifier.text.startsWith(".")) {
|
|
42
|
-
const moduleFilePath = path.resolve(path.dirname(this.filePath), node.moduleSpecifier.text);
|
|
43
|
-
|
|
44
|
-
if (node.importClause.namedBindings) {
|
|
45
|
-
if (ts.isNamedImports(node.importClause.namedBindings)) {
|
|
46
|
-
for (const el of node.importClause.namedBindings.elements) {
|
|
47
|
-
result.push({
|
|
48
|
-
filePath: moduleFilePath,
|
|
49
|
-
name: el.name.text,
|
|
50
|
-
__TSdCliMetaRef__: "__TSdCliMetaRef__" as const
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
// throw SdCliTsUtil.error("'import * as [name] from ...'을 'import [name] from ...'로 변경하세요.", this.sourceFile, node);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
result.push({
|
|
60
|
-
filePath: moduleFilePath,
|
|
61
|
-
name: "default",
|
|
62
|
-
__TSdCliMetaRef__: "__TSdCliMetaRef__" as const
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
const moduleName = node.moduleSpecifier.text;
|
|
68
|
-
if (node.importClause.namedBindings) {
|
|
69
|
-
if (ts.isNamedImports(node.importClause.namedBindings)) {
|
|
70
|
-
for (const el of node.importClause.namedBindings.elements) {
|
|
71
|
-
result.push({
|
|
72
|
-
moduleName,
|
|
73
|
-
name: el.propertyName?.text ?? el.name.text,
|
|
74
|
-
__TSdCliMetaRef__: "__TSdCliMetaRef__" as const
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
const nsUseList = this._findNamespaceUse(node.importClause.namedBindings.name.text);
|
|
80
|
-
for (const nsUse of nsUseList) {
|
|
81
|
-
result.push({
|
|
82
|
-
moduleName,
|
|
83
|
-
name: nsUse,
|
|
84
|
-
__TSdCliMetaRef__: "__TSdCliMetaRef__" as const
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else if (node.importClause.name) {
|
|
90
|
-
const nsUseList = this._findNamespaceUse(node.importClause.name.text);
|
|
91
|
-
for (const nsUse of nsUseList) {
|
|
92
|
-
result.push({
|
|
93
|
-
moduleName: moduleName,
|
|
94
|
-
name: nsUse,
|
|
95
|
-
__TSdCliMetaRef__: "__TSdCliMetaRef__" as const
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
throw new NeverEntryError();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
// 무시
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
throw new NeverEntryError();
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
else if (ts.isExportDeclaration(node)) {
|
|
113
|
-
if (
|
|
114
|
-
node.exportClause &&
|
|
115
|
-
ts.isNamedExports(node.exportClause) &&
|
|
116
|
-
node.moduleSpecifier &&
|
|
117
|
-
ts.isStringLiteral(node.moduleSpecifier)
|
|
118
|
-
) {
|
|
119
|
-
if (node.moduleSpecifier.text.startsWith(".")) {
|
|
120
|
-
const moduleFilePath = path.resolve(path.dirname(this.filePath), node.moduleSpecifier.text);
|
|
121
|
-
for (const el of node.exportClause.elements) {
|
|
122
|
-
if (el.propertyName && el.name.text !== el.propertyName.text) {
|
|
123
|
-
throw new NeverEntryError();
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
result.push({
|
|
127
|
-
filePath: moduleFilePath,
|
|
128
|
-
name: el.name.text,
|
|
129
|
-
__TSdCliMetaRef__: "__TSdCliMetaRef__" as const
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
throw new NeverEntryError();
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
throw new NeverEntryError();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
return result;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
private _findNamespaceUse(localName: string): string[] {
|
|
147
|
-
const fn = (parent: ts.Node): string[] => {
|
|
148
|
-
const result: string[] = [];
|
|
149
|
-
ts.forEachChild(parent, (node) => {
|
|
150
|
-
if (ts.isPropertyAccessExpression(node)) {
|
|
151
|
-
if (
|
|
152
|
-
ts.isIdentifier(node.expression) &&
|
|
153
|
-
node.expression.text === localName &&
|
|
154
|
-
ts.isIdentifier(node.name)
|
|
155
|
-
) {
|
|
156
|
-
result.push(node.name.text);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
result.push(...fn(node));
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
return result;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
return fn(this.sourceFile);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
public getMetaFromNode(node: ts.Node): TSdCliTsMetadata {
|
|
171
|
-
if (ts.isClassDeclaration(node)) {
|
|
172
|
-
return new SdCliTsClassMetadata(this, node);
|
|
173
|
-
}
|
|
174
|
-
else if (ts.isStringLiteral(node)) {
|
|
175
|
-
return node.text;
|
|
176
|
-
}
|
|
177
|
-
else if (ts.isNoSubstitutionTemplateLiteral(node)) {
|
|
178
|
-
return node.text;
|
|
179
|
-
}
|
|
180
|
-
else if (node.kind === ts.SyntaxKind.NullKeyword) {
|
|
181
|
-
return null;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
throw new NeverEntryError();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export class SdCliTsClassMetadata {
|
|
189
|
-
public constructor(private readonly _fileMeta: SdCliTsFileMetadata,
|
|
190
|
-
private readonly _node: ts.ClassDeclaration) {
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
private _ngDeclCache?: TSdCliTsNgMetadata;
|
|
194
|
-
|
|
195
|
-
public get ngDecl(): TSdCliTsNgMetadata | undefined {
|
|
196
|
-
if (this._ngDeclCache !== undefined) return this._ngDeclCache;
|
|
197
|
-
|
|
198
|
-
if (!ts.canHaveDecorators(this._node)) return undefined;
|
|
199
|
-
|
|
200
|
-
for (const deco of ts.getDecorators(this._node) ?? []) {
|
|
201
|
-
if (!ts.isCallExpression(deco.expression)) continue;
|
|
202
|
-
if (!ts.isIdentifier(deco.expression.expression)) {
|
|
203
|
-
throw new NeverEntryError();
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
if (deco.expression.expression.text === "Injectable") {
|
|
207
|
-
this._ngDeclCache = new SdCliTsNgInjectableMetadata(this._fileMeta, deco);
|
|
208
|
-
return this._ngDeclCache;
|
|
209
|
-
}
|
|
210
|
-
else if (deco.expression.expression.text === "Directive") {
|
|
211
|
-
this._ngDeclCache = new SdCliTsNgDirectiveMetadata(this._fileMeta, deco);
|
|
212
|
-
return this._ngDeclCache;
|
|
213
|
-
}
|
|
214
|
-
else if (deco.expression.expression.text === "Component") {
|
|
215
|
-
this._ngDeclCache = new SdCliTsNgComponentMetadata(this._fileMeta, deco);
|
|
216
|
-
return this._ngDeclCache;
|
|
217
|
-
}
|
|
218
|
-
else if (deco.expression.expression.text === "Pipe") {
|
|
219
|
-
this._ngDeclCache = new SdCliTsNgPipeMetadata(this._fileMeta, deco);
|
|
220
|
-
return this._ngDeclCache;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
return undefined;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
export class SdCliTsObjectMetadata {
|
|
229
|
-
public constructor(private readonly _fileMeta: SdCliTsFileMetadata,
|
|
230
|
-
private readonly _node: ts.ObjectLiteralExpression) {
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
private readonly _getPropValueCache = new Map<string, TSdCliTsMetadata | undefined>();
|
|
234
|
-
|
|
235
|
-
public getPropValue(propName: string): TSdCliTsMetadata | undefined {
|
|
236
|
-
if (this._getPropValueCache.has(propName)) {
|
|
237
|
-
return this._getPropValueCache.get(propName);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
const prop = this._node.properties.single((item) => (
|
|
241
|
-
ts.isPropertyAssignment(item) &&
|
|
242
|
-
ts.isIdentifier(item.name) &&
|
|
243
|
-
item.name.text === propName
|
|
244
|
-
)) as ts.PropertyAssignment | undefined;
|
|
245
|
-
if (!prop) {
|
|
246
|
-
this._getPropValueCache.set(propName, undefined);
|
|
247
|
-
return undefined;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
const result = this._fileMeta.getMetaFromNode(prop.initializer);
|
|
251
|
-
this._getPropValueCache.set(propName, result);
|
|
252
|
-
return result;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export type TSdCliTsMetadata = SdCliTsClassMetadata
|
|
257
|
-
| SdCliTsObjectMetadata
|
|
258
|
-
| TSdCliMetaRef
|
|
259
|
-
| string
|
|
260
|
-
| null;
|
|
261
|
-
|
|
262
|
-
export class SdCliTsNgInjectableMetadata {
|
|
263
|
-
public constructor(private readonly _fileMeta: SdCliTsFileMetadata,
|
|
264
|
-
private readonly _node: ts.Decorator) {
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
private _providedInCache?: string;
|
|
268
|
-
|
|
269
|
-
public get providedIn(): string | undefined {
|
|
270
|
-
if (this._providedInCache !== undefined) return this._providedInCache;
|
|
271
|
-
|
|
272
|
-
if (!ts.isCallExpression(this._node.expression)) throw new NeverEntryError();
|
|
273
|
-
|
|
274
|
-
if (this._node.expression.arguments.length > 0 && ts.isObjectLiteralExpression(this._node.expression.arguments[0])) {
|
|
275
|
-
const decoArg = new SdCliTsObjectMetadata(this._fileMeta, this._node.expression.arguments[0]);
|
|
276
|
-
const decoArgSelectorVal = decoArg.getPropValue("providedIn");
|
|
277
|
-
if (typeof decoArgSelectorVal === "string") {
|
|
278
|
-
this._providedInCache = decoArgSelectorVal;
|
|
279
|
-
return decoArgSelectorVal;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
return undefined;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
export class SdCliTsNgDirectiveMetadata {
|
|
288
|
-
public constructor(private readonly _fileMeta: SdCliTsFileMetadata,
|
|
289
|
-
private readonly _node: ts.Decorator) {
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
private _selectorCache?: string;
|
|
293
|
-
|
|
294
|
-
public get selector(): string {
|
|
295
|
-
if (this._selectorCache !== undefined) return this._selectorCache;
|
|
296
|
-
|
|
297
|
-
if (!ts.isCallExpression(this._node.expression)) throw new NeverEntryError();
|
|
298
|
-
|
|
299
|
-
if (this._node.expression.arguments.length > 0 && ts.isObjectLiteralExpression(this._node.expression.arguments[0])) {
|
|
300
|
-
const decoArg = new SdCliTsObjectMetadata(this._fileMeta, this._node.expression.arguments[0]);
|
|
301
|
-
const decoArgSelectorVal = decoArg.getPropValue("selector");
|
|
302
|
-
if (typeof decoArgSelectorVal === "string") {
|
|
303
|
-
this._selectorCache = decoArgSelectorVal;
|
|
304
|
-
return decoArgSelectorVal;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
throw new NeverEntryError();
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export class SdCliTsNgComponentMetadata {
|
|
313
|
-
public constructor(private readonly _fileMeta: SdCliTsFileMetadata,
|
|
314
|
-
private readonly _node: ts.Decorator) {
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
private _selectorCache?: string;
|
|
318
|
-
|
|
319
|
-
public get selector(): string {
|
|
320
|
-
if (this._selectorCache !== undefined) return this._selectorCache;
|
|
321
|
-
|
|
322
|
-
if (!ts.isCallExpression(this._node.expression)) throw new NeverEntryError();
|
|
323
|
-
|
|
324
|
-
if (this._node.expression.arguments.length > 0 && ts.isObjectLiteralExpression(this._node.expression.arguments[0])) {
|
|
325
|
-
const decoArg = new SdCliTsObjectMetadata(this._fileMeta, this._node.expression.arguments[0]);
|
|
326
|
-
const decoArgSelectorVal = decoArg.getPropValue("selector");
|
|
327
|
-
if (typeof decoArgSelectorVal === "string") {
|
|
328
|
-
this._selectorCache = decoArgSelectorVal;
|
|
329
|
-
return decoArgSelectorVal;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
throw new NeverEntryError();
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
private _templateCache?: string;
|
|
337
|
-
|
|
338
|
-
public get template(): string {
|
|
339
|
-
if (this._templateCache !== undefined) return this._templateCache;
|
|
340
|
-
|
|
341
|
-
if (!ts.isCallExpression(this._node.expression)) throw new NeverEntryError();
|
|
342
|
-
|
|
343
|
-
if (this._node.expression.arguments.length > 0 && ts.isObjectLiteralExpression(this._node.expression.arguments[0])) {
|
|
344
|
-
const decoArg = new SdCliTsObjectMetadata(this._fileMeta, this._node.expression.arguments[0]);
|
|
345
|
-
const decoArgSelectorVal = decoArg.getPropValue("template");
|
|
346
|
-
if (typeof decoArgSelectorVal === "string") {
|
|
347
|
-
this._templateCache = decoArgSelectorVal;
|
|
348
|
-
return decoArgSelectorVal;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
throw new NeverEntryError();
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
export class SdCliTsNgPipeMetadata {
|
|
357
|
-
public constructor(private readonly _fileMeta: SdCliTsFileMetadata,
|
|
358
|
-
private readonly _node: ts.Decorator) {
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
private _pipeNameCache?: string;
|
|
362
|
-
|
|
363
|
-
public get pipeName(): string {
|
|
364
|
-
if (this._pipeNameCache !== undefined) return this._pipeNameCache;
|
|
365
|
-
|
|
366
|
-
if (!ts.isCallExpression(this._node.expression)) throw new NeverEntryError();
|
|
367
|
-
|
|
368
|
-
if (this._node.expression.arguments.length > 0 && ts.isObjectLiteralExpression(this._node.expression.arguments[0])) {
|
|
369
|
-
const decoArg = new SdCliTsObjectMetadata(this._fileMeta, this._node.expression.arguments[0]);
|
|
370
|
-
const decoArgSelectorVal = decoArg.getPropValue("name");
|
|
371
|
-
if (typeof decoArgSelectorVal === "string") {
|
|
372
|
-
this._pipeNameCache = decoArgSelectorVal;
|
|
373
|
-
return decoArgSelectorVal;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
throw new NeverEntryError();
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
export type TSdCliTsNgMetadata = SdCliTsNgInjectableMetadata
|
|
382
|
-
| SdCliTsNgDirectiveMetadata
|
|
383
|
-
| SdCliTsNgComponentMetadata
|
|
384
|
-
| SdCliTsNgPipeMetadata;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import ts from "typescript";
|
|
3
|
-
import { FsUtil } from "@simplysm/sd-core-node";
|
|
4
|
-
import { SdCliTsFileMetadata } from "./SdCliTsFileMetadata";
|
|
5
|
-
|
|
6
|
-
export class SdCliTsRootMetadata {
|
|
7
|
-
private readonly _fileMetaCache = new Map<string, SdCliTsFileMetadata>();
|
|
8
|
-
|
|
9
|
-
public constructor(private readonly _packagePath: string) {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public removeCaches(filePaths: string[]): void {
|
|
13
|
-
for (const filePath of filePaths) {
|
|
14
|
-
this._fileMetaCache.delete(filePath);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public getFileMetas(): SdCliTsFileMetadata[] {
|
|
19
|
-
const tsconfigPath = path.resolve(this._packagePath, "tsconfig-build.json");
|
|
20
|
-
const tsconfig = FsUtil.readJson(tsconfigPath);
|
|
21
|
-
const parsedTsconfig = ts.parseJsonConfigFileContent(tsconfig, ts.sys, this._packagePath, tsconfig.angularCompilerOptions);
|
|
22
|
-
|
|
23
|
-
const result: SdCliTsFileMetadata[] = [];
|
|
24
|
-
for (const fileName of parsedTsconfig.fileNames) {
|
|
25
|
-
const filePath = path.resolve(fileName);
|
|
26
|
-
const fileMeta = this._fileMetaCache.getOrCreate(filePath, () => new SdCliTsFileMetadata(filePath));
|
|
27
|
-
result.push(fileMeta);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return result;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
import { SdCliBuildResultError } from "../../SdCliBuildResultError";
|
|
3
|
-
import path from "path";
|
|
4
|
-
|
|
5
|
-
export class SdCliTsUtil {
|
|
6
|
-
public static error(message: string, sourceFile: ts.SourceFile, meta?: ts.Node): SdCliBuildResultError {
|
|
7
|
-
if (meta) {
|
|
8
|
-
const pos = sourceFile.getLineAndCharacterOfPosition(meta.getStart());
|
|
9
|
-
return new SdCliBuildResultError({
|
|
10
|
-
filePath: path.resolve(sourceFile.fileName),
|
|
11
|
-
line: pos.line,
|
|
12
|
-
char: pos.character,
|
|
13
|
-
code: undefined,
|
|
14
|
-
severity: "error",
|
|
15
|
-
message: message
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
return new SdCliBuildResultError({
|
|
20
|
-
filePath: path.resolve(sourceFile.fileName),
|
|
21
|
-
line: undefined,
|
|
22
|
-
char: undefined,
|
|
23
|
-
code: undefined,
|
|
24
|
-
severity: "error",
|
|
25
|
-
message: message
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|