@ttoss/graphql-api 0.4.5 → 0.4.6
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/dist/cli.js +5 -1
- package/dist/esm/cli.js +7 -3
- package/package.json +6 -17
- package/src/cli.ts +7 -5
package/dist/cli.js
CHANGED
|
@@ -37,7 +37,11 @@ var import_npmlog = __toESM(require("npmlog"));
|
|
|
37
37
|
var import_yargs = __toESM(require("yargs"));
|
|
38
38
|
var logPrefix = "graphql-api";
|
|
39
39
|
(0, import_ts_node.register)({
|
|
40
|
-
transpileOnly: true
|
|
40
|
+
transpileOnly: true,
|
|
41
|
+
compilerOptions: {
|
|
42
|
+
module: "NodeNext",
|
|
43
|
+
moduleResolution: "NodeNext"
|
|
44
|
+
}
|
|
41
45
|
});
|
|
42
46
|
var argv = (0, import_yargs.default)(process.argv.slice(2)).argv;
|
|
43
47
|
(async () => {
|
package/dist/esm/cli.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { __require } from "./chunk-O4CP4YC5.js";
|
|
3
3
|
|
|
4
4
|
// src/cli.ts
|
|
5
|
-
import * as fs from "fs";
|
|
6
|
-
import * as path from "path";
|
|
5
|
+
import * as fs from "node:fs";
|
|
6
|
+
import * as path from "node:path";
|
|
7
7
|
import * as typescriptPlugin from "@graphql-codegen/typescript";
|
|
8
8
|
import { codegen } from "@graphql-codegen/core";
|
|
9
9
|
import { parse } from "graphql";
|
|
@@ -12,7 +12,11 @@ import log from "npmlog";
|
|
|
12
12
|
import yargs from "yargs";
|
|
13
13
|
var logPrefix = "graphql-api";
|
|
14
14
|
register({
|
|
15
|
-
transpileOnly: true
|
|
15
|
+
transpileOnly: true,
|
|
16
|
+
compilerOptions: {
|
|
17
|
+
module: "NodeNext",
|
|
18
|
+
moduleResolution: "NodeNext"
|
|
19
|
+
}
|
|
16
20
|
});
|
|
17
21
|
var argv = yargs(process.argv.slice(2)).argv;
|
|
18
22
|
(async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/graphql-api",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "A library for building GraphQL APIs using ttoss ecosystem.",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
16
|
"import": "./dist/esm/index.js",
|
|
17
|
-
"require": "./dist/index.js"
|
|
17
|
+
"require": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
18
19
|
},
|
|
19
20
|
"./shield": {
|
|
20
21
|
"import": "./dist/esm/shield.js",
|
|
21
|
-
"require": "./dist/shield.js"
|
|
22
|
+
"require": "./dist/shield.js",
|
|
23
|
+
"types": "./dist/shield.d.ts"
|
|
22
24
|
}
|
|
23
25
|
},
|
|
24
|
-
"main": "dist/index.js",
|
|
25
|
-
"module": "dist/esm/index.js",
|
|
26
26
|
"bin": {
|
|
27
27
|
"ttoss-graphql-api": "./bin/cli.js"
|
|
28
28
|
},
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"src"
|
|
32
32
|
],
|
|
33
33
|
"sideEffects": false,
|
|
34
|
-
"typings": "dist/index.d.ts",
|
|
35
34
|
"dependencies": {
|
|
36
35
|
"@graphql-codegen/core": "^4.0.0",
|
|
37
36
|
"@graphql-codegen/typescript": "^4.0.1",
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
"graphql": "^16.8.1",
|
|
52
51
|
"jest": "^29.7.0",
|
|
53
52
|
"tsup": "^8.0.1",
|
|
54
|
-
"@ttoss/config": "^1.31.
|
|
53
|
+
"@ttoss/config": "^1.31.3"
|
|
55
54
|
},
|
|
56
55
|
"keywords": [
|
|
57
56
|
"api",
|
|
@@ -61,16 +60,6 @@
|
|
|
61
60
|
"access": "public",
|
|
62
61
|
"provenance": true
|
|
63
62
|
},
|
|
64
|
-
"typesVersions": {
|
|
65
|
-
"*": {
|
|
66
|
-
".": [
|
|
67
|
-
"./dist/index.d.ts"
|
|
68
|
-
],
|
|
69
|
-
"shield": [
|
|
70
|
-
"./dist/shield.d.ts"
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
63
|
"scripts": {
|
|
75
64
|
"build": "tsup",
|
|
76
65
|
"test": "jest"
|
package/src/cli.ts
CHANGED
|
@@ -11,6 +11,10 @@ const logPrefix = 'graphql-api';
|
|
|
11
11
|
|
|
12
12
|
register({
|
|
13
13
|
transpileOnly: true,
|
|
14
|
+
compilerOptions: {
|
|
15
|
+
module: 'NodeNext',
|
|
16
|
+
moduleResolution: 'NodeNext',
|
|
17
|
+
},
|
|
14
18
|
});
|
|
15
19
|
|
|
16
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -34,11 +38,9 @@ const argv: any = yargs(process.argv.slice(2)).argv;
|
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
37
|
-
const { schemaComposer } = require(
|
|
38
|
-
process.cwd(),
|
|
39
|
-
|
|
40
|
-
'schemaComposer.ts'
|
|
41
|
-
));
|
|
41
|
+
const { schemaComposer } = require(
|
|
42
|
+
path.resolve(process.cwd(), 'src', 'schemaComposer.ts')
|
|
43
|
+
);
|
|
42
44
|
|
|
43
45
|
const sdl = schemaComposer.toSDL();
|
|
44
46
|
|