@tsed/cli 3.25.0 → 3.26.0-beta.1
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/lib/cjs/Cli.js.map +1 -1
- package/lib/cjs/commands/init/InitCmd.js +58 -34
- package/lib/cjs/commands/init/InitCmd.js.map +1 -1
- package/lib/cjs/commands/init/config/FeaturesPrompt.js +406 -0
- package/lib/cjs/commands/init/config/FeaturesPrompt.js.map +1 -0
- package/lib/cjs/commands/init/config/InitFileSchema.js +49 -0
- package/lib/cjs/commands/init/config/InitFileSchema.js.map +1 -0
- package/lib/cjs/commands/init/interfaces/InitCmdContext.js +3 -0
- package/lib/cjs/commands/init/interfaces/InitCmdContext.js.map +1 -0
- package/lib/cjs/commands/init/interfaces/InitOptions.js +3 -0
- package/lib/cjs/commands/init/interfaces/InitOptions.js.map +1 -0
- package/lib/cjs/commands/init/interfaces/InitPromptAnswers.js +3 -0
- package/lib/cjs/commands/init/interfaces/InitPromptAnswers.js.map +1 -0
- package/lib/cjs/commands/init/mappers/mapToContext.js +16 -0
- package/lib/cjs/commands/init/mappers/mapToContext.js.map +1 -0
- package/lib/cjs/commands/init/mappers/mapUniqFeatures.js +18 -0
- package/lib/cjs/commands/init/mappers/mapUniqFeatures.js.map +1 -0
- package/lib/cjs/commands/init/prompts/getFeaturesPrompt.js +25 -0
- package/lib/cjs/commands/init/prompts/getFeaturesPrompt.js.map +1 -0
- package/lib/cjs/commands/init/utils/hasFeature.js +13 -0
- package/lib/cjs/commands/init/utils/hasFeature.js.map +1 -0
- package/lib/cjs/commands/init/utils/isPlatform.js +8 -0
- package/lib/cjs/commands/init/utils/isPlatform.js.map +1 -0
- package/lib/cjs/index.js +5 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interfaces/PlatformType.js +9 -0
- package/lib/cjs/interfaces/PlatformType.js.map +1 -0
- package/lib/cjs/interfaces/index.js +1 -0
- package/lib/cjs/interfaces/index.js.map +1 -1
- package/lib/cjs/services/Features.js +118 -133
- package/lib/cjs/services/Features.js.map +1 -1
- package/lib/esm/Cli.js.map +1 -1
- package/lib/esm/commands/init/InitCmd.js +61 -37
- package/lib/esm/commands/init/InitCmd.js.map +1 -1
- package/lib/esm/commands/init/config/FeaturesPrompt.js +402 -0
- package/lib/esm/commands/init/config/FeaturesPrompt.js.map +1 -0
- package/lib/esm/commands/init/config/InitFileSchema.js +46 -0
- package/lib/esm/commands/init/config/InitFileSchema.js.map +1 -0
- package/lib/esm/commands/init/interfaces/InitCmdContext.js +2 -0
- package/lib/esm/commands/init/interfaces/InitCmdContext.js.map +1 -0
- package/lib/esm/commands/init/interfaces/InitOptions.js +2 -0
- package/lib/esm/commands/init/interfaces/InitOptions.js.map +1 -0
- package/lib/esm/commands/init/interfaces/InitPromptAnswers.js +2 -0
- package/lib/esm/commands/init/interfaces/InitPromptAnswers.js.map +1 -0
- package/lib/esm/commands/init/mappers/mapToContext.js +12 -0
- package/lib/esm/commands/init/mappers/mapToContext.js.map +1 -0
- package/lib/esm/commands/init/mappers/mapUniqFeatures.js +14 -0
- package/lib/esm/commands/init/mappers/mapUniqFeatures.js.map +1 -0
- package/lib/esm/commands/init/prompts/getFeaturesPrompt.js +21 -0
- package/lib/esm/commands/init/prompts/getFeaturesPrompt.js.map +1 -0
- package/lib/esm/commands/init/utils/hasFeature.js +8 -0
- package/lib/esm/commands/init/utils/hasFeature.js.map +1 -0
- package/lib/esm/commands/init/utils/isPlatform.js +4 -0
- package/lib/esm/commands/init/utils/isPlatform.js.map +1 -0
- package/lib/esm/index.js +5 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces/PlatformType.js +6 -0
- package/lib/esm/interfaces/PlatformType.js.map +1 -0
- package/lib/esm/interfaces/index.js +1 -0
- package/lib/esm/interfaces/index.js.map +1 -1
- package/lib/esm/services/Features.js +117 -128
- package/lib/esm/services/Features.js.map +1 -1
- package/lib/types/Cli.d.ts +2 -2
- package/lib/types/commands/init/InitCmd.d.ts +8 -24
- package/lib/types/commands/init/config/FeaturesPrompt.d.ts +98 -0
- package/lib/types/commands/init/config/InitFileSchema.d.ts +45 -0
- package/lib/types/commands/init/interfaces/InitCmdContext.d.ts +6 -0
- package/lib/types/commands/init/interfaces/InitOptions.d.ts +19 -0
- package/lib/types/commands/init/interfaces/InitPromptAnswers.d.ts +16 -0
- package/lib/types/commands/init/mappers/mapToContext.d.ts +2 -0
- package/lib/types/commands/init/mappers/mapUniqFeatures.d.ts +3 -0
- package/lib/types/commands/init/prompts/getFeaturesPrompt.d.ts +2 -0
- package/lib/types/commands/init/utils/hasFeature.d.ts +2 -0
- package/lib/types/commands/init/utils/isPlatform.d.ts +1 -0
- package/lib/types/index.d.ts +5 -1
- package/lib/types/interfaces/PlatformType.d.ts +4 -0
- package/lib/types/interfaces/index.d.ts +1 -0
- package/lib/types/services/Features.d.ts +0 -18
- package/package.json +7 -4
- package/readme.md +6 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PackageManager } from "@tsed/cli-core";
|
|
2
|
+
import { ArchitectureConvention, PlatformType, ProjectConvention } from "../../../interfaces";
|
|
3
|
+
export interface InitPromptAnswers {
|
|
4
|
+
projectName: string;
|
|
5
|
+
platform: PlatformType;
|
|
6
|
+
architecture: ArchitectureConvention;
|
|
7
|
+
convention: ProjectConvention;
|
|
8
|
+
features: string[];
|
|
9
|
+
featuresDB: string[];
|
|
10
|
+
featuresTypeORM: string;
|
|
11
|
+
featuresTesting: string;
|
|
12
|
+
featuresExtraLinter: string[];
|
|
13
|
+
featuresBundler: string;
|
|
14
|
+
oidcBasePath: string;
|
|
15
|
+
packageManager: PackageManager;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isPlatform(...types: string[]): (ctx: any) => boolean;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
export * from "./commands/add/AddCmd";
|
|
2
2
|
export * from "./commands/init/InitCmd";
|
|
3
|
+
export * from "./commands/init/interfaces/InitCmdContext";
|
|
4
|
+
export * from "./commands/init/interfaces/InitOptions";
|
|
5
|
+
export * from "./commands/init/config/FeaturesPrompt";
|
|
6
|
+
export * from "./commands/init/config/FeaturesPrompt";
|
|
3
7
|
export * from "./commands/generate/GenerateCmd";
|
|
4
8
|
export * from "./commands/update/UpdateCmd";
|
|
9
|
+
export * from "./commands/init/prompts/getFeaturesPrompt";
|
|
5
10
|
export * from "./interfaces";
|
|
6
11
|
export * from "./services/ProvidersInfoService";
|
|
7
|
-
export * from "./services/Features";
|
|
8
12
|
export * from "./pipes";
|
|
9
13
|
export * from "./constants";
|
|
10
14
|
export * from "./Cli";
|
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
import { ProjectConvention } from "../interfaces";
|
|
2
|
-
export interface FeatureValue {
|
|
3
|
-
type: string;
|
|
4
|
-
dependencies?: {
|
|
5
|
-
[key: string]: string | undefined;
|
|
6
|
-
};
|
|
7
|
-
devDependencies?: {
|
|
8
|
-
[key: string]: string | undefined;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export interface Feature {
|
|
12
|
-
name: string;
|
|
13
|
-
value: FeatureValue;
|
|
14
|
-
}
|
|
15
|
-
export declare type Features = Feature[];
|
|
16
|
-
export declare function Features(): Function;
|
|
17
|
-
export declare function hasFeature(feature: string): (ctx: any) => boolean;
|
|
18
|
-
export declare function hasValue(expression: string, value: any): (ctx: any) => boolean;
|
|
19
|
-
export declare function isPlatform(...types: string[]): (ctx: any) => boolean;
|
|
20
2
|
export declare const FEATURES_TYPEORM_CONNECTION_TYPES: ({
|
|
21
3
|
name: string;
|
|
22
4
|
value: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.26.0-beta.1",
|
|
4
4
|
"source": "./src/index.ts",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"node": ">=14"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@tsed/cli-core": "3.
|
|
59
|
+
"@tsed/cli-core": "3.26.0-beta.1",
|
|
60
60
|
"@tsed/core": ">=6.114.14",
|
|
61
61
|
"@tsed/di": ">=6.114.14",
|
|
62
62
|
"@tsed/logger": ">=6.0.0",
|
|
@@ -80,7 +80,10 @@
|
|
|
80
80
|
"bugs": {
|
|
81
81
|
"url": "https://github.com/tsedio/tsed-cli/issues"
|
|
82
82
|
},
|
|
83
|
-
"homepage": "https://github.com/tsedio/tsed-cli/tree/
|
|
83
|
+
"homepage": "https://github.com/tsedio/tsed-cli/tree/beta/packages/cli",
|
|
84
84
|
"author": "Romain Lenzotti",
|
|
85
|
-
"license": "MIT"
|
|
85
|
+
"license": "MIT",
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"tag": "beta"
|
|
88
|
+
}
|
|
86
89
|
}
|
package/readme.md
CHANGED
|
@@ -48,6 +48,12 @@ https_proxy=http://username:password@host:port
|
|
|
48
48
|
> Note: The following environment variables can be also used to configure the proxy `HTTPS_PROXY`, `HTTP_PROXY`
|
|
49
49
|
> and `NODE_TLS_REJECT_UNAUTHORIZED`.
|
|
50
50
|
|
|
51
|
+
## Init project
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
|
|
51
57
|
## Run Cli from code
|
|
52
58
|
|
|
53
59
|
```typescript
|