@manot40/genql-cli 1.0.1 → 1.1.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/LICENSE +21 -21
- package/README.md +3 -3
- package/dist/{chunk-CIPSg9SW.mjs → chunk.mjs} +14 -1
- package/dist/{cli-truncate-D3wAEQfN.mjs → cli-truncate.mjs} +2 -2
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +484 -120
- package/dist/index.d.mts +19 -0
- package/dist/index.mjs +1 -1
- package/dist/{log-update-ByzxNOMZ.mjs → log-update.mjs} +3 -3
- package/dist/{main-D79GNEz7.mjs → main.mjs} +75 -69
- package/dist/runtime/generateGraphqlOperation.ts +6 -6
- package/dist/runtime/index.ts +1 -1
- package/dist/runtime/typeSelection.ts +9 -9
- package/dist/{slice-ansi-jJmCsHqC.mjs → slice-ansi.mjs} +1 -1
- package/package.json +3 -2
- package/dist/get-east-asian-width-BRiQxJA0.mjs +0 -24
- package/dist/wrap-ansi-CNamFguB.mjs +0 -3
- package/dist/wrap-ansi-CUNel7aF.mjs +0 -359
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Tommaso De Rossi
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Tommaso De Rossi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ client
|
|
|
50
50
|
.query({
|
|
51
51
|
countries: {
|
|
52
52
|
// pass arguments to the query
|
|
53
|
-
|
|
53
|
+
$args: {
|
|
54
54
|
filter: {
|
|
55
55
|
currency: {
|
|
56
56
|
eq: 'EUR',
|
|
@@ -61,7 +61,7 @@ client
|
|
|
61
61
|
code: true,
|
|
62
62
|
nestedField: {
|
|
63
63
|
// fetch all scalar fields
|
|
64
|
-
|
|
64
|
+
$scalar: true,
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
67
|
})
|
|
@@ -89,7 +89,7 @@ Genql has a lot of benefits over writing graphql queries by hand:
|
|
|
89
89
|
|
|
90
90
|
- Writing queries is faster thanks to TypeScript auto completion
|
|
91
91
|
- You can safely update your schema and be sure your queries are still valid
|
|
92
|
-
- You can fetch all scalar fields in a type with
|
|
92
|
+
- You can fetch all scalar fields in a type with `$scalar: true`
|
|
93
93
|
- No `graphql` package dependency, no runtime parsing of queries
|
|
94
94
|
- You have to generate the client only after your schema changes, not after every query change
|
|
95
95
|
|
|
@@ -8,6 +8,19 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
8
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
10
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
|
+
var __exportAll = (all, symbols) => {
|
|
12
|
+
let target = {};
|
|
13
|
+
for (var name in all) {
|
|
14
|
+
__defProp(target, name, {
|
|
15
|
+
get: all[name],
|
|
16
|
+
enumerable: true
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (symbols) {
|
|
20
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
21
|
+
}
|
|
22
|
+
return target;
|
|
23
|
+
};
|
|
11
24
|
var __copyProps = (to, from, except, desc) => {
|
|
12
25
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
26
|
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
@@ -28,4 +41,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
41
|
}) : target, mod));
|
|
29
42
|
|
|
30
43
|
//#endregion
|
|
31
|
-
export {
|
|
44
|
+
export { __exportAll as n, __toESM as r, __commonJSMin as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as sliceAnsi } from "./slice-ansi
|
|
1
|
+
import { n as eastAsianWidth } from "./cli.mjs";
|
|
2
|
+
import { t as sliceAnsi } from "./slice-ansi.mjs";
|
|
3
3
|
|
|
4
4
|
//#region node_modules/cli-truncate/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
5
5
|
function ansiRegex({ onlyFirst = false } = {}) {
|
package/dist/cli.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|