@tsed/cli-plugin-typegraphql 3.20.14 → 3.20.17
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/TypeGraphqlModule.js
CHANGED
|
@@ -6,7 +6,7 @@ const cli_core_1 = require("@tsed/cli-core");
|
|
|
6
6
|
const di_1 = require("@tsed/di");
|
|
7
7
|
const TypeGraphqlInitHook_1 = require("./hooks/TypeGraphqlInitHook");
|
|
8
8
|
let TypeGraphqlModule = class TypeGraphqlModule {
|
|
9
|
-
install() {
|
|
9
|
+
install(ctx) {
|
|
10
10
|
this.packageJson.addDependencies({
|
|
11
11
|
"@tsed/typegraphql": "{{tsedVersion}}",
|
|
12
12
|
"apollo-datasource": "^3.3.1",
|
|
@@ -15,11 +15,11 @@ let TypeGraphqlModule = class TypeGraphqlModule {
|
|
|
15
15
|
"type-graphql": "^1.1.1",
|
|
16
16
|
"class-validator": "^0.13.2",
|
|
17
17
|
graphql: "^15.7.2"
|
|
18
|
-
});
|
|
18
|
+
}, ctx);
|
|
19
19
|
this.packageJson.addDevDependencies({
|
|
20
20
|
"@types/validator": "latest",
|
|
21
21
|
"apollo-server-testing": "latest"
|
|
22
|
-
});
|
|
22
|
+
}, ctx);
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
tslib_1.__decorate([
|
|
@@ -29,7 +29,7 @@ tslib_1.__decorate([
|
|
|
29
29
|
tslib_1.__decorate([
|
|
30
30
|
(0, cli_core_1.OnAdd)("@tsed/cli-plugin-typegraphql"),
|
|
31
31
|
tslib_1.__metadata("design:type", Function),
|
|
32
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
32
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
33
33
|
tslib_1.__metadata("design:returntype", void 0)
|
|
34
34
|
], TypeGraphqlModule.prototype, "install", null);
|
|
35
35
|
TypeGraphqlModule = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeGraphqlModule.js","sourceRoot":"","sources":["../src/TypeGraphqlModule.ts"],"names":[],"mappings":";;;;AAAA,6CAAiE;AACjE,iCAAgC;AAChC,qEAAgE;AAKhE,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAK5B,OAAO;
|
|
1
|
+
{"version":3,"file":"TypeGraphqlModule.js","sourceRoot":"","sources":["../src/TypeGraphqlModule.ts"],"names":[],"mappings":";;;;AAAA,6CAAiE;AACjE,iCAAgC;AAChC,qEAAgE;AAKhE,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAK5B,OAAO,CAAC,GAAQ;QACd,IAAI,CAAC,WAAW,CAAC,eAAe,CAC9B;YACE,mBAAmB,EAAE,iBAAiB;YACtC,mBAAmB,EAAE,QAAQ;YAC7B,wBAAwB,EAAE,QAAQ;YAClC,oBAAoB,EAAE,QAAQ;YAC9B,cAAc,EAAE,QAAQ;YACxB,iBAAiB,EAAE,SAAS;YAC5B,OAAO,EAAE,SAAS;SACnB,EACD,GAAG,CACJ,CAAC;QACF,IAAI,CAAC,WAAW,CAAC,kBAAkB,CACjC;YACE,kBAAkB,EAAE,QAAQ;YAC5B,uBAAuB,EAAE,QAAQ;SAClC,EACD,GAAG,CACJ,CAAC;IACJ,CAAC;CACF,CAAA;AAxBC;IADC,IAAA,WAAM,GAAE;sCACI,6BAAkB;sDAAC;AAGhC;IADC,IAAA,gBAAK,EAAC,8BAA8B,CAAC;;;;gDAqBrC;AAzBU,iBAAiB;IAH7B,IAAA,iBAAM,EAAC;QACN,OAAO,EAAE,CAAC,yCAAmB,CAAC;KAC/B,CAAC;GACW,iBAAiB,CA0B7B;AA1BY,8CAAiB","sourcesContent":["import {Module, OnAdd, ProjectPackageJson} from \"@tsed/cli-core\";\nimport {Inject} from \"@tsed/di\";\nimport {TypeGraphqlInitHook} from \"./hooks/TypeGraphqlInitHook\";\n\n@Module({\n imports: [TypeGraphqlInitHook]\n})\nexport class TypeGraphqlModule {\n @Inject()\n packageJson: ProjectPackageJson;\n\n @OnAdd(\"@tsed/cli-plugin-typegraphql\")\n install(ctx: any) {\n this.packageJson.addDependencies(\n {\n \"@tsed/typegraphql\": \"{{tsedVersion}}\",\n \"apollo-datasource\": \"^3.3.1\",\n \"apollo-datasource-rest\": \"^3.5.1\",\n \"apollo-server-core\": \"^3.6.2\",\n \"type-graphql\": \"^1.1.1\",\n \"class-validator\": \"^0.13.2\",\n graphql: \"^15.7.2\"\n },\n ctx\n );\n this.packageJson.addDevDependencies(\n {\n \"@types/validator\": \"latest\",\n \"apollo-server-testing\": \"latest\"\n },\n ctx\n );\n }\n}\n"]}
|
|
@@ -12,7 +12,7 @@ let TypeGraphqlInitHook = class TypeGraphqlInitHook {
|
|
|
12
12
|
title: "Generate files",
|
|
13
13
|
task: async () => this.rootRenderer.renderAll([
|
|
14
14
|
"/src/datasources/index.ts",
|
|
15
|
-
"/src/datasources/MyDataSource",
|
|
15
|
+
"/src/datasources/MyDataSource.ts",
|
|
16
16
|
"/src/resolvers/recipes/Recipe.ts",
|
|
17
17
|
"/src/resolvers/recipes/RecipeNotFoundError.ts",
|
|
18
18
|
"/src/resolvers/recipes/RecipeResolver.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeGraphqlInitHook.js","sourceRoot":"","sources":["../../src/hooks/TypeGraphqlInitHook.ts"],"names":[],"mappings":";;;;AACA,6CAA2G;AAC3G,iCAAoC;AACpC,sDAAkD;AAGlD,IAAa,mBAAmB,GAAhC,MAAa,mBAAmB;IAW9B,MAAM,CAAC,GAAmB;QACxB,OAAO;YACL;gBACE,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,KAAK,IAAI,EAAE,CACf,IAAI,CAAC,YAAY,CAAC,SAAS,CACzB;oBACE,2BAA2B;oBAC3B
|
|
1
|
+
{"version":3,"file":"TypeGraphqlInitHook.js","sourceRoot":"","sources":["../../src/hooks/TypeGraphqlInitHook.ts"],"names":[],"mappings":";;;;AACA,6CAA2G;AAC3G,iCAAoC;AACpC,sDAAkD;AAGlD,IAAa,mBAAmB,GAAhC,MAAa,mBAAmB;IAW9B,MAAM,CAAC,GAAmB;QACxB,OAAO;YACL;gBACE,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,KAAK,IAAI,EAAE,CACf,IAAI,CAAC,YAAY,CAAC,SAAS,CACzB;oBACE,2BAA2B;oBAC3B,kCAAkC;oBAClC,kCAAkC;oBAClC,+CAA+C;oBAC/C,0CAA0C;oBAC1C,yBAAyB;iBAC1B,EACD,GAAG,EACH;oBACE,WAAW,EAAE,GAAG,0BAAY,OAAO;iBACpC,CACF;aACJ;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA/BC;IADC,IAAA,iBAAM,GAAE;sCACc,6BAAkB;wDAAC;AAG1C;IADC,IAAA,iBAAM,GAAE;sCACe,8BAAmB;yDAAC;AAG5C;IADC,IAAA,iBAAM,GAAE;sCACc,6BAAkB;wDAAC;AAG1C;IADC,IAAA,iBAAM,EAAC,MAAM,CAAC;;;;iDAsBd;AAhCU,mBAAmB;IAD/B,IAAA,eAAU,GAAE;GACA,mBAAmB,CAiC/B;AAjCY,kDAAmB","sourcesContent":["import {InitCmdContext} from \"@tsed/cli\";\nimport {Inject, OnExec, ProjectPackageJson, RootRendererService, SrcRendererService} from \"@tsed/cli-core\";\nimport {Injectable} from \"@tsed/di\";\nimport {TEMPLATE_DIR} from \"../utils/templateDir\";\n\n@Injectable()\nexport class TypeGraphqlInitHook {\n @Inject()\n protected packageJson: ProjectPackageJson;\n\n @Inject()\n protected rootRenderer: RootRendererService;\n\n @Inject()\n protected srcRenderer: SrcRendererService;\n\n @OnExec(\"init\")\n onExec(ctx: InitCmdContext) {\n return [\n {\n title: \"Generate files\",\n task: async () =>\n this.rootRenderer.renderAll(\n [\n \"/src/datasources/index.ts\",\n \"/src/datasources/MyDataSource.ts\",\n \"/src/resolvers/recipes/Recipe.ts\",\n \"/src/resolvers/recipes/RecipeNotFoundError.ts\",\n \"/src/resolvers/recipes/RecipeResolver.ts\",\n \"/src/resolvers/index.ts\"\n ],\n ctx,\n {\n templateDir: `${TEMPLATE_DIR}/init`\n }\n )\n }\n ];\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli-plugin-typegraphql",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.17",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"typings": "./lib/index.d.ts",
|
|
6
6
|
"description": "Ts.ED CLI plugin. Add TypeGraphql support.",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"tslib": "2.3.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@tsed/cli": "3.20.
|
|
20
|
-
"@tsed/cli-core": "3.20.
|
|
19
|
+
"@tsed/cli": "3.20.17",
|
|
20
|
+
"@tsed/cli-core": "3.20.17"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@tsed/cli": "^3.20.
|
|
24
|
-
"@tsed/cli-core": "^3.20.
|
|
23
|
+
"@tsed/cli": "^3.20.17",
|
|
24
|
+
"@tsed/cli-core": "^3.20.17"
|
|
25
25
|
},
|
|
26
26
|
"repository": "https://github.com/tsedio/tsed-cli",
|
|
27
27
|
"bugs": {
|