@snowtop/ent 0.0.37 → 0.0.38
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/core/config.d.ts +10 -0
- package/core/config.js +12 -0
- package/package.json +2 -2
package/core/config.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Database, DBDict } from "./db";
|
|
3
3
|
declare type logType = "query" | "warn" | "info" | "error" | "debug";
|
|
4
|
+
declare enum graphqlMutationName {
|
|
5
|
+
NOUN_VERB = "NounVerb",
|
|
6
|
+
VERB_NOUN = "VerbNoun"
|
|
7
|
+
}
|
|
8
|
+
declare enum graphQLFieldFormat {
|
|
9
|
+
LOWER_CAMEL = "lowerCamel",
|
|
10
|
+
SNAKE_CASE = "snake_case"
|
|
11
|
+
}
|
|
4
12
|
export interface Config {
|
|
5
13
|
dbConnectionString?: string;
|
|
6
14
|
dbFile?: string;
|
|
@@ -17,6 +25,8 @@ interface CodegenConfig {
|
|
|
17
25
|
generatedHeader?: string;
|
|
18
26
|
disableBase64Encoding?: boolean;
|
|
19
27
|
generateRootResolvers?: boolean;
|
|
28
|
+
defaultGraphQLMutationName?: graphqlMutationName;
|
|
29
|
+
defaultGraphQLFieldFormat?: graphQLFieldFormat;
|
|
20
30
|
}
|
|
21
31
|
interface PrettierConfig {
|
|
22
32
|
custom?: boolean;
|
package/core/config.js
CHANGED
|
@@ -28,6 +28,18 @@ const js_yaml_1 = require("js-yaml");
|
|
|
28
28
|
const db_1 = __importDefault(require("./db"));
|
|
29
29
|
const path = __importStar(require("path"));
|
|
30
30
|
const logger_1 = require("./logger");
|
|
31
|
+
// ent.config.ts eventually. for now ent.yml
|
|
32
|
+
// or ent.yml?
|
|
33
|
+
var graphqlMutationName;
|
|
34
|
+
(function (graphqlMutationName) {
|
|
35
|
+
graphqlMutationName["NOUN_VERB"] = "NounVerb";
|
|
36
|
+
graphqlMutationName["VERB_NOUN"] = "VerbNoun";
|
|
37
|
+
})(graphqlMutationName || (graphqlMutationName = {}));
|
|
38
|
+
var graphQLFieldFormat;
|
|
39
|
+
(function (graphQLFieldFormat) {
|
|
40
|
+
graphQLFieldFormat["LOWER_CAMEL"] = "lowerCamel";
|
|
41
|
+
graphQLFieldFormat["SNAKE_CASE"] = "snake_case";
|
|
42
|
+
})(graphQLFieldFormat || (graphQLFieldFormat = {}));
|
|
31
43
|
function setConfig(cfg) {
|
|
32
44
|
if (cfg.log) {
|
|
33
45
|
(0, logger_1.setLogLevels)(cfg.log);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snowtop/ent",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "snowtop ent framework",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"json5": "^2.1.3",
|
|
18
18
|
"luxon": "^1.25.0",
|
|
19
19
|
"memoizee": "^0.4.15",
|
|
20
|
-
"minimist": "^1.2.
|
|
20
|
+
"minimist": "^1.2.6",
|
|
21
21
|
"pascal-case": "^3.1.2",
|
|
22
22
|
"pg": "^8.0.3",
|
|
23
23
|
"prettier": "^2.3.2",
|