@tsed/cli-plugin-typegraphql 5.3.1 → 6.0.0-alpha.2
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/esm/TypeGraphqlModule.js +0 -1
- package/lib/esm/TypeGraphqlModule.js.map +1 -1
- package/lib/esm/hooks/TypeGraphqlInitHook.js +0 -3
- package/lib/esm/hooks/TypeGraphqlInitHook.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/utils/templateDir.js +3 -5
- package/lib/esm/utils/templateDir.js.map +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/types/index.d.ts +3 -3
- package/package.json +22 -20
- package/templates/init/src/datasources/index.ts +1 -1
- package/templates/init/src/resolvers/index.ts +3 -3
- package/templates/init/src/resolvers/recipes/RecipeResolver.ts +3 -3
- package/templates/init/src/services/RecipeService.ts +1 -1
- package/lib/cjs/TypeGraphqlModule.js +0 -42
- package/lib/cjs/TypeGraphqlModule.js.map +0 -1
- package/lib/cjs/hooks/TypeGraphqlInitHook.js +0 -53
- package/lib/cjs/hooks/TypeGraphqlInitHook.js.map +0 -1
- package/lib/cjs/index.js +0 -8
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/utils/templateDir.js +0 -6
- package/lib/cjs/utils/templateDir.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/tsconfig.tsbuildinfo +0 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TypeGraphqlModule } from "./TypeGraphqlModule";
|
|
2
|
-
export * from "./hooks/TypeGraphqlInitHook";
|
|
3
|
-
export * from "./utils/templateDir";
|
|
1
|
+
import { TypeGraphqlModule } from "./TypeGraphqlModule.js";
|
|
2
|
+
export * from "./hooks/TypeGraphqlInitHook.js";
|
|
3
|
+
export * from "./utils/templateDir.js";
|
|
4
4
|
export default TypeGraphqlModule;
|
package/package.json
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli-plugin-typegraphql",
|
|
3
|
-
"version": "5.3.1",
|
|
4
3
|
"description": "Ts.ED CLI plugin. Add TypeGraphql support.",
|
|
4
|
+
"version": "6.0.0-alpha.2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./lib/esm/index.js",
|
|
5
7
|
"source": "./src/index.ts",
|
|
6
|
-
"main": "./lib/cjs/index.js",
|
|
7
8
|
"module": "./lib/esm/index.js",
|
|
8
9
|
"typings": "./lib/types/index.d.ts",
|
|
9
10
|
"exports": {
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./lib/types/index.d.ts",
|
|
13
|
+
"import": "./lib/esm/index.js",
|
|
14
|
+
"default": "./lib/esm/index.js"
|
|
15
|
+
}
|
|
14
16
|
},
|
|
15
17
|
"scripts": {
|
|
16
18
|
"build": "yarn build:ts",
|
|
17
|
-
"build:ts": "tsc --build tsconfig.json
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"test": "cross-env NODE_ENV=test yarn jest --max-workers=2 --passWithNoTests && jest-coverage-thresholds-bumper"
|
|
19
|
+
"build:ts": "tsc --build tsconfig.json",
|
|
20
|
+
"test": "vitest run",
|
|
21
|
+
"test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
|
|
21
22
|
},
|
|
22
23
|
"files": [
|
|
23
24
|
"lib",
|
|
@@ -27,18 +28,16 @@
|
|
|
27
28
|
"tslib": "2.3.1"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@tsed/cli": "
|
|
31
|
-
"@tsed/cli-core": "
|
|
32
|
-
"@tsed/
|
|
33
|
-
"@tsed/jest-config": "5.3.1",
|
|
34
|
-
"@tsed/typescript": "5.3.1",
|
|
31
|
+
"@tsed/cli": "6.0.0-alpha.2",
|
|
32
|
+
"@tsed/cli-core": "6.0.0-alpha.2",
|
|
33
|
+
"@tsed/typescript": "6.0.0-alpha.2",
|
|
35
34
|
"cross-env": "7.0.3",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
35
|
+
"typescript": "4.9.5",
|
|
36
|
+
"vitest": "2.1.1"
|
|
38
37
|
},
|
|
39
38
|
"peerDependencies": {
|
|
40
|
-
"@tsed/cli": "
|
|
41
|
-
"@tsed/cli-core": "
|
|
39
|
+
"@tsed/cli": "workspace:*",
|
|
40
|
+
"@tsed/cli-core": "workspace:*"
|
|
42
41
|
},
|
|
43
42
|
"repository": "https://github.com/tsedio/tsed-cli",
|
|
44
43
|
"bugs": {
|
|
@@ -46,5 +45,8 @@
|
|
|
46
45
|
},
|
|
47
46
|
"homepage": "https://github.com/tsedio/tsed-cli/tree/master/packages/cli-plugin-typegraphql",
|
|
48
47
|
"author": "Romain Lenzotti",
|
|
49
|
-
"license": "MIT"
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"tag": "alpha"
|
|
51
|
+
}
|
|
50
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./MyDataSource";
|
|
1
|
+
export * from "./MyDataSource.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./recipes/Recipe";
|
|
2
|
-
export * from "./recipes/RecipeNotFoundError";
|
|
3
|
-
export * from "./recipes/RecipeResolver";
|
|
1
|
+
export * from "./recipes/Recipe.js";
|
|
2
|
+
export * from "./recipes/RecipeNotFoundError.js";
|
|
3
|
+
export * from "./recipes/RecipeResolver.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {ResolverService} from "@tsed/typegraphql";
|
|
2
2
|
import {Arg, Query} from "type-graphql";
|
|
3
|
-
import {RecipeService} from "../../services/RecipeService";
|
|
4
|
-
import {Recipe} from "./Recipe";
|
|
5
|
-
import {RecipeNotFoundError} from "./RecipeNotFoundError";
|
|
3
|
+
import {RecipeService} from "../../services/RecipeService.js";
|
|
4
|
+
import {Recipe} from "./Recipe.js";
|
|
5
|
+
import {RecipeNotFoundError} from "./RecipeNotFoundError.js";
|
|
6
6
|
|
|
7
7
|
@ResolverService(Recipe)
|
|
8
8
|
export class RecipeResolver {
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeGraphqlModule = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const cli_core_1 = require("@tsed/cli-core");
|
|
6
|
-
const di_1 = require("@tsed/di");
|
|
7
|
-
const TypeGraphqlInitHook_1 = require("./hooks/TypeGraphqlInitHook");
|
|
8
|
-
let TypeGraphqlModule = class TypeGraphqlModule {
|
|
9
|
-
packageJson;
|
|
10
|
-
install(ctx) {
|
|
11
|
-
this.packageJson.addDependencies({
|
|
12
|
-
"@tsed/typegraphql": "{{tsedVersion}}",
|
|
13
|
-
"apollo-datasource": "^3.3.1",
|
|
14
|
-
"apollo-datasource-rest": "^3.5.1",
|
|
15
|
-
"apollo-server-core": "^3.6.2",
|
|
16
|
-
"type-graphql": "^1.1.1",
|
|
17
|
-
"class-validator": "^0.13.2",
|
|
18
|
-
graphql: "^15.7.2"
|
|
19
|
-
}, ctx);
|
|
20
|
-
this.packageJson.addDevDependencies({
|
|
21
|
-
"@types/validator": "latest",
|
|
22
|
-
"apollo-server-testing": "latest"
|
|
23
|
-
}, ctx);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
tslib_1.__decorate([
|
|
27
|
-
(0, di_1.Inject)(),
|
|
28
|
-
tslib_1.__metadata("design:type", cli_core_1.ProjectPackageJson)
|
|
29
|
-
], TypeGraphqlModule.prototype, "packageJson", void 0);
|
|
30
|
-
tslib_1.__decorate([
|
|
31
|
-
(0, cli_core_1.OnAdd)("@tsed/cli-plugin-typegraphql"),
|
|
32
|
-
tslib_1.__metadata("design:type", Function),
|
|
33
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
34
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
35
|
-
], TypeGraphqlModule.prototype, "install", null);
|
|
36
|
-
TypeGraphqlModule = tslib_1.__decorate([
|
|
37
|
-
(0, cli_core_1.Module)({
|
|
38
|
-
imports: [TypeGraphqlInitHook_1.TypeGraphqlInitHook]
|
|
39
|
-
})
|
|
40
|
-
], TypeGraphqlModule);
|
|
41
|
-
exports.TypeGraphqlModule = TypeGraphqlModule;
|
|
42
|
-
//# sourceMappingURL=TypeGraphqlModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypeGraphqlModule.js","sourceRoot":"","sources":["../../src/TypeGraphqlModule.ts"],"names":[],"mappings":";;;;AAAA,6CAAiE;AACjE,iCAAgC;AAChC,qEAAgE;AAKzD,IAAM,iBAAiB,GAAvB,MAAM,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;AAzBC;IAAC,IAAA,WAAM,GAAE;sCACI,6BAAkB;sDAAC;AAEhC;IAAC,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"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeGraphqlInitHook = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const cli_core_1 = require("@tsed/cli-core");
|
|
6
|
-
const di_1 = require("@tsed/di");
|
|
7
|
-
const templateDir_1 = require("../utils/templateDir");
|
|
8
|
-
let TypeGraphqlInitHook = class TypeGraphqlInitHook {
|
|
9
|
-
packageJson;
|
|
10
|
-
rootRenderer;
|
|
11
|
-
srcRenderer;
|
|
12
|
-
onExec(ctx) {
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
title: "Generate files",
|
|
16
|
-
task: () => this.rootRenderer.renderAll([
|
|
17
|
-
"/src/datasources/index.ts",
|
|
18
|
-
"/src/datasources/MyDataSource.ts",
|
|
19
|
-
"/src/resolvers/recipes/Recipe.ts",
|
|
20
|
-
"/src/resolvers/recipes/RecipeNotFoundError.ts",
|
|
21
|
-
"/src/resolvers/recipes/RecipeResolver.ts",
|
|
22
|
-
"/src/resolvers/index.ts",
|
|
23
|
-
"/src/services/RecipeService.ts"
|
|
24
|
-
], ctx, {
|
|
25
|
-
templateDir: `${templateDir_1.TEMPLATE_DIR}/init`
|
|
26
|
-
})
|
|
27
|
-
}
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
tslib_1.__decorate([
|
|
32
|
-
(0, cli_core_1.Inject)(),
|
|
33
|
-
tslib_1.__metadata("design:type", cli_core_1.ProjectPackageJson)
|
|
34
|
-
], TypeGraphqlInitHook.prototype, "packageJson", void 0);
|
|
35
|
-
tslib_1.__decorate([
|
|
36
|
-
(0, cli_core_1.Inject)(),
|
|
37
|
-
tslib_1.__metadata("design:type", cli_core_1.RootRendererService)
|
|
38
|
-
], TypeGraphqlInitHook.prototype, "rootRenderer", void 0);
|
|
39
|
-
tslib_1.__decorate([
|
|
40
|
-
(0, cli_core_1.Inject)(),
|
|
41
|
-
tslib_1.__metadata("design:type", cli_core_1.SrcRendererService)
|
|
42
|
-
], TypeGraphqlInitHook.prototype, "srcRenderer", void 0);
|
|
43
|
-
tslib_1.__decorate([
|
|
44
|
-
(0, cli_core_1.OnExec)("init"),
|
|
45
|
-
tslib_1.__metadata("design:type", Function),
|
|
46
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
47
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
48
|
-
], TypeGraphqlInitHook.prototype, "onExec", null);
|
|
49
|
-
TypeGraphqlInitHook = tslib_1.__decorate([
|
|
50
|
-
(0, di_1.Injectable)()
|
|
51
|
-
], TypeGraphqlInitHook);
|
|
52
|
-
exports.TypeGraphqlInitHook = TypeGraphqlInitHook;
|
|
53
|
-
//# sourceMappingURL=TypeGraphqlInitHook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypeGraphqlInitHook.js","sourceRoot":"","sources":["../../../src/hooks/TypeGraphqlInitHook.ts"],"names":[],"mappings":";;;;AACA,6CAA2G;AAC3G,iCAAoC;AACpC,sDAAkD;AAG3C,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAEpB,WAAW,CAAqB;IAGhC,YAAY,CAAsB;IAGlC,WAAW,CAAqB;IAG1C,MAAM,CAAC,GAAmB;QACxB,OAAO;YACL;gBACE,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,GAAG,EAAE,CACT,IAAI,CAAC,YAAY,CAAC,SAAS,CACzB;oBACE,2BAA2B;oBAC3B,kCAAkC;oBAClC,kCAAkC;oBAClC,+CAA+C;oBAC/C,0CAA0C;oBAC1C,yBAAyB;oBACzB,gCAAgC;iBACjC,EACD,GAAG,EACH;oBACE,WAAW,EAAE,GAAG,0BAAY,OAAO;iBACpC,CACF;aACJ;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAjCC;IAAC,IAAA,iBAAM,GAAE;sCACc,6BAAkB;wDAAC;AAE1C;IAAC,IAAA,iBAAM,GAAE;sCACe,8BAAmB;yDAAC;AAE5C;IAAC,IAAA,iBAAM,GAAE;sCACc,6BAAkB;wDAAC;AAE1C;IAAC,IAAA,iBAAM,EAAC,MAAM,CAAC;;;;iDAuBd;AAjCU,mBAAmB;IAD/B,IAAA,eAAU,GAAE;GACA,mBAAmB,CAkC/B;AAlCY,kDAAmB"}
|
package/lib/cjs/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const TypeGraphqlModule_1 = require("./TypeGraphqlModule");
|
|
5
|
-
tslib_1.__exportStar(require("./hooks/TypeGraphqlInitHook"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./utils/templateDir"), exports);
|
|
7
|
-
exports.default = TypeGraphqlModule_1.TypeGraphqlModule;
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAEtD,sEAA4C;AAC5C,8DAAoC;AAEpC,kBAAe,qCAAiB,CAAC"}
|
package/lib/cjs/package.json
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TEMPLATE_DIR = void 0;
|
|
4
|
-
const cli_core_1 = require("@tsed/cli-core");
|
|
5
|
-
exports.TEMPLATE_DIR = (0, cli_core_1.getTemplateDirectory)(__dirname);
|
|
6
|
-
//# sourceMappingURL=templateDir.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"templateDir.js","sourceRoot":"","sources":["../../../src/utils/templateDir.ts"],"names":[],"mappings":";;;AAAA,6CAAoD;AAEvC,QAAA,YAAY,GAAG,IAAA,+BAAoB,EAAC,SAAS,CAAC,CAAC"}
|
package/lib/esm/package.json
DELETED