@tsed/cli-plugin-typegraphql 3.21.0-rc.3 → 3.21.0
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/TypeGraphqlModule.js +1 -0
- package/lib/cjs/TypeGraphqlModule.js.map +1 -1
- package/lib/cjs/hooks/TypeGraphqlInitHook.js +3 -0
- package/lib/cjs/hooks/TypeGraphqlInitHook.js.map +1 -1
- package/lib/esm/TypeGraphqlModule.js +1 -0
- package/lib/esm/TypeGraphqlModule.js.map +1 -1
- package/lib/esm/hooks/TypeGraphqlInitHook.js +3 -0
- package/lib/esm/hooks/TypeGraphqlInitHook.js.map +1 -1
- package/package.json +6 -9
|
@@ -6,6 +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
|
+
packageJson;
|
|
9
10
|
install(ctx) {
|
|
10
11
|
this.packageJson.addDependencies({
|
|
11
12
|
"@tsed/typegraphql": "{{tsedVersion}}",
|
|
@@ -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;
|
|
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;IAE5B,WAAW,CAAqB;IAGhC,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"]}
|
|
@@ -6,6 +6,9 @@ const cli_core_1 = require("@tsed/cli-core");
|
|
|
6
6
|
const di_1 = require("@tsed/di");
|
|
7
7
|
const templateDir_1 = require("../utils/templateDir");
|
|
8
8
|
let TypeGraphqlInitHook = class TypeGraphqlInitHook {
|
|
9
|
+
packageJson;
|
|
10
|
+
rootRenderer;
|
|
11
|
+
srcRenderer;
|
|
9
12
|
onExec(ctx) {
|
|
10
13
|
return [
|
|
11
14
|
{
|
|
@@ -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;
|
|
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;IAEpB,WAAW,CAAqB;IAGhC,YAAY,CAAsB;IAGlC,WAAW,CAAqB;IAG1C,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"]}
|
|
@@ -3,6 +3,7 @@ import { Module, OnAdd, ProjectPackageJson } from "@tsed/cli-core";
|
|
|
3
3
|
import { Inject } from "@tsed/di";
|
|
4
4
|
import { TypeGraphqlInitHook } from "./hooks/TypeGraphqlInitHook.js";
|
|
5
5
|
let TypeGraphqlModule = class TypeGraphqlModule {
|
|
6
|
+
packageJson;
|
|
6
7
|
install(ctx) {
|
|
7
8
|
this.packageJson.addDependencies({
|
|
8
9
|
"@tsed/typegraphql": "{{tsedVersion}}",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeGraphqlModule.js","sourceRoot":"","sources":["../../src/TypeGraphqlModule.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAC;AAKhE,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;
|
|
1
|
+
{"version":3,"file":"TypeGraphqlModule.js","sourceRoot":"","sources":["../../src/TypeGraphqlModule.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAC;AAKhE,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAE5B,WAAW,CAAqB;IAGhC,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,MAAM,EAAE;8BACI,kBAAkB;sDAAC;AAGhC;IADC,KAAK,CAAC,8BAA8B,CAAC;;;;gDAqBrC;AAzBU,iBAAiB;IAH7B,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,mBAAmB,CAAC;KAC/B,CAAC;GACW,iBAAiB,CA0B7B;SA1BY,iBAAiB","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"]}
|
|
@@ -3,6 +3,9 @@ import { Inject, OnExec, ProjectPackageJson, RootRendererService, SrcRendererSer
|
|
|
3
3
|
import { Injectable } from "@tsed/di";
|
|
4
4
|
import { TEMPLATE_DIR } from "../utils/templateDir.js";
|
|
5
5
|
let TypeGraphqlInitHook = class TypeGraphqlInitHook {
|
|
6
|
+
packageJson;
|
|
7
|
+
rootRenderer;
|
|
8
|
+
srcRenderer;
|
|
6
9
|
onExec(ctx) {
|
|
7
10
|
return [
|
|
8
11
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeGraphqlInitHook.js","sourceRoot":"","sources":["../../../src/hooks/TypeGraphqlInitHook.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAC3G,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAGlD,IAAa,mBAAmB,GAAhC,MAAa,mBAAmB;
|
|
1
|
+
{"version":3,"file":"TypeGraphqlInitHook.js","sourceRoot":"","sources":["../../../src/hooks/TypeGraphqlInitHook.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAC3G,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAGlD,IAAa,mBAAmB,GAAhC,MAAa,mBAAmB;IAEpB,WAAW,CAAqB;IAGhC,YAAY,CAAsB;IAGlC,WAAW,CAAqB;IAG1C,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,YAAY,OAAO;iBACpC,CACF;aACJ;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA/BC;IADC,MAAM,EAAE;8BACc,kBAAkB;wDAAC;AAG1C;IADC,MAAM,EAAE;8BACe,mBAAmB;yDAAC;AAG5C;IADC,MAAM,EAAE;8BACc,kBAAkB;wDAAC;AAG1C;IADC,MAAM,CAAC,MAAM,CAAC;;;;iDAsBd;AAhCU,mBAAmB;IAD/B,UAAU,EAAE;GACA,mBAAmB,CAiC/B;SAjCY,mBAAmB","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.21.0
|
|
3
|
+
"version": "3.21.0",
|
|
4
4
|
"description": "Ts.ED CLI plugin. Add TypeGraphql support.",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"tslib": "2.3.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tsed/cli": "3.21.0
|
|
29
|
-
"@tsed/cli-core": "3.21.0
|
|
28
|
+
"@tsed/cli": "3.21.0",
|
|
29
|
+
"@tsed/cli-core": "3.21.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@tsed/cli": "^3.21.0
|
|
33
|
-
"@tsed/cli-core": "^3.21.0
|
|
32
|
+
"@tsed/cli": "^3.21.0",
|
|
33
|
+
"@tsed/cli-core": "^3.21.0"
|
|
34
34
|
},
|
|
35
35
|
"repository": "https://github.com/tsedio/tsed-cli",
|
|
36
36
|
"bugs": {
|
|
@@ -38,8 +38,5 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/tsedio/tsed-cli/tree/master/packages/cli-plugin-typegraphql",
|
|
40
40
|
"author": "Romain Lenzotti",
|
|
41
|
-
"license": "MIT"
|
|
42
|
-
"publishConfig": {
|
|
43
|
-
"tag": "rc"
|
|
44
|
-
}
|
|
41
|
+
"license": "MIT"
|
|
45
42
|
}
|