joist-codegen 0.1.536 → 1.0.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/build/EntityDbMetadata.d.ts +71 -23
- package/build/EntityDbMetadata.js +229 -63
- package/build/EntityDbMetadata.js.map +1 -1
- package/build/EntityDbMetadata.test.js +5 -5
- package/build/EntityDbMetadata.test.js.map +1 -1
- package/build/assignTags.d.ts +1 -1
- package/build/assignTags.js +2 -2
- package/build/assignTags.js.map +1 -1
- package/build/config.d.ts +8 -1
- package/build/config.js +25 -13
- package/build/config.js.map +1 -1
- package/build/config.test.d.ts +1 -0
- package/build/config.test.js +37 -0
- package/build/config.test.js.map +1 -0
- package/build/generateEntitiesFile.d.ts +2 -1
- package/build/generateEntitiesFile.js +6 -3
- package/build/generateEntitiesFile.js.map +1 -1
- package/build/generateEntityCodegenFile.d.ts +2 -4
- package/build/generateEntityCodegenFile.js +278 -90
- package/build/generateEntityCodegenFile.js.map +1 -1
- package/build/generateEnumFile.d.ts +2 -3
- package/build/generateEnumFile.js +15 -10
- package/build/generateEnumFile.js.map +1 -1
- package/build/generateFactoriesFiles.js +4 -4
- package/build/generateFactoriesFiles.js.map +1 -1
- package/build/generateInitialEntityFile.js +7 -2
- package/build/generateInitialEntityFile.js.map +1 -1
- package/build/generateMetadataFile.js +96 -69
- package/build/generateMetadataFile.js.map +1 -1
- package/build/generatePgEnumFile.d.ts +4 -0
- package/build/generatePgEnumFile.js +18 -0
- package/build/generatePgEnumFile.js.map +1 -0
- package/build/index.d.ts +24 -8
- package/build/index.js +116 -40
- package/build/index.js.map +1 -1
- package/build/symbols.d.ts +62 -51
- package/build/symbols.js +64 -52
- package/build/symbols.js.map +1 -1
- package/build/utils.d.ts +4 -2
- package/build/utils.js +21 -11
- package/build/utils.js.map +1 -1
- package/package.json +26 -14
- package/jest.config.js +0 -10
- package/package.json.bak +0 -28
- package/src/EntityDbMetadata.test.ts +0 -42
- package/src/EntityDbMetadata.ts +0 -322
- package/src/assignTags.ts +0 -45
- package/src/config.ts +0 -82
- package/src/generateEntitiesFile.ts +0 -26
- package/src/generateEntityCodegenFile.ts +0 -414
- package/src/generateEnumFile.ts +0 -63
- package/src/generateFactoriesFiles.ts +0 -29
- package/src/generateInitialEntityFile.ts +0 -12
- package/src/generateMetadataFile.ts +0 -175
- package/src/index.ts +0 -180
- package/src/symbols.ts +0 -53
- package/src/utils.ts +0 -87
- package/tsconfig.json +0 -21
- package/tsconfig.tsbuildinfo +0 -3377
package/build/index.js
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
4
20
|
};
|
|
5
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.contentToString = exports.
|
|
22
|
+
exports.contentToString = exports.loadPgEnumMetadata = exports.loadEnumMetadata = exports.generateFiles = exports.generateAndSaveFiles = exports.mapSimpleDbTypeToTypescriptType = exports.EntityDbMetadata = exports.makeEntity = void 0;
|
|
23
|
+
const change_case_1 = require("change-case");
|
|
7
24
|
const fs_1 = require("fs");
|
|
8
25
|
const joist_utils_1 = require("joist-utils");
|
|
26
|
+
const path_1 = require("path");
|
|
9
27
|
const pg_1 = require("pg");
|
|
10
|
-
const pg_structure_1 =
|
|
28
|
+
const pg_structure_1 = __importStar(require("pg-structure"));
|
|
11
29
|
const ts_poet_1 = require("ts-poet");
|
|
12
30
|
const assignTags_1 = require("./assignTags");
|
|
13
31
|
const config_1 = require("./config");
|
|
@@ -19,23 +37,26 @@ const generateEnumFile_1 = require("./generateEnumFile");
|
|
|
19
37
|
const generateFactoriesFiles_1 = require("./generateFactoriesFiles");
|
|
20
38
|
const generateInitialEntityFile_1 = require("./generateInitialEntityFile");
|
|
21
39
|
const generateMetadataFile_1 = require("./generateMetadataFile");
|
|
40
|
+
const generatePgEnumFile_1 = require("./generatePgEnumFile");
|
|
22
41
|
const symbols_1 = require("./symbols");
|
|
23
42
|
const utils_1 = require("./utils");
|
|
43
|
+
Object.defineProperty(exports, "mapSimpleDbTypeToTypescriptType", { enumerable: true, get: function () { return utils_1.mapSimpleDbTypeToTypescriptType; } });
|
|
24
44
|
var EntityDbMetadata_2 = require("./EntityDbMetadata");
|
|
25
45
|
Object.defineProperty(exports, "makeEntity", { enumerable: true, get: function () { return EntityDbMetadata_2.makeEntity; } });
|
|
26
46
|
/** Uses entities and enums from the `db` schema and saves them into our entities directory. */
|
|
27
47
|
async function generateAndSaveFiles(config, dbMeta) {
|
|
28
48
|
const files = await generateFiles(config, dbMeta);
|
|
29
|
-
await fs_1.promises.mkdir(config.entitiesDirectory, { recursive: true });
|
|
30
49
|
for await (const file of files) {
|
|
31
50
|
const path = `${config.entitiesDirectory}/${file.name}`;
|
|
51
|
+
// We might be writing to a non-entities directory i.e. for the graphql plugin, so check this for each file
|
|
52
|
+
await fs_1.promises.mkdir((0, path_1.dirname)(path), { recursive: true });
|
|
32
53
|
if (file.overwrite) {
|
|
33
|
-
await fs_1.promises.writeFile(path, await contentToString(file.contents, file.name));
|
|
54
|
+
await fs_1.promises.writeFile(path, await contentToString(file.contents, file.name, file.prettierOverrides));
|
|
34
55
|
}
|
|
35
56
|
else {
|
|
36
|
-
const exists = await utils_1.trueIfResolved(fs_1.promises.access(path));
|
|
57
|
+
const exists = await (0, utils_1.trueIfResolved)(fs_1.promises.access(path));
|
|
37
58
|
if (!exists) {
|
|
38
|
-
await fs_1.promises.writeFile(path, await contentToString(file.contents, file.name));
|
|
59
|
+
await fs_1.promises.writeFile(path, await contentToString(file.contents, file.name, file.prettierOverrides));
|
|
39
60
|
}
|
|
40
61
|
}
|
|
41
62
|
}
|
|
@@ -43,78 +64,132 @@ async function generateAndSaveFiles(config, dbMeta) {
|
|
|
43
64
|
exports.generateAndSaveFiles = generateAndSaveFiles;
|
|
44
65
|
/** Generates our `${Entity}` and `${Entity}Codegen` files based on the `db` schema. */
|
|
45
66
|
async function generateFiles(config, dbMeta) {
|
|
46
|
-
const { entities,
|
|
67
|
+
const { entities, enums, pgEnums } = dbMeta;
|
|
47
68
|
const entityFiles = entities
|
|
48
69
|
.map((meta) => {
|
|
49
70
|
const entityName = meta.entity.name;
|
|
50
71
|
return [
|
|
51
72
|
{
|
|
52
73
|
name: `${entityName}Codegen.ts`,
|
|
53
|
-
contents: generateEntityCodegenFile_1.generateEntityCodegenFile(config, meta),
|
|
74
|
+
contents: (0, generateEntityCodegenFile_1.generateEntityCodegenFile)(config, meta),
|
|
54
75
|
overwrite: true,
|
|
55
76
|
},
|
|
56
|
-
{ name: `${entityName}.ts`, contents: generateInitialEntityFile_1.generateInitialEntityFile(meta), overwrite: false },
|
|
77
|
+
{ name: `${entityName}.ts`, contents: (0, generateInitialEntityFile_1.generateInitialEntityFile)(meta), overwrite: false },
|
|
57
78
|
];
|
|
58
79
|
})
|
|
59
80
|
.reduce(utils_1.merge, []);
|
|
60
|
-
const enumFiles = enums
|
|
61
|
-
.map((
|
|
62
|
-
const enumName = utils_1.tableToEntityName(config, table);
|
|
81
|
+
const enumFiles = Object.values(enums)
|
|
82
|
+
.map((enumData) => {
|
|
83
|
+
const enumName = (0, utils_1.tableToEntityName)(config, enumData.table);
|
|
63
84
|
return [
|
|
64
85
|
{
|
|
65
86
|
name: `${enumName}.ts`,
|
|
66
|
-
contents: generateEnumFile_1.generateEnumFile(config,
|
|
87
|
+
contents: (0, generateEnumFile_1.generateEnumFile)(config, enumData, enumName),
|
|
67
88
|
overwrite: true,
|
|
68
89
|
},
|
|
69
90
|
];
|
|
70
91
|
})
|
|
71
92
|
.reduce(utils_1.merge, []);
|
|
72
|
-
const
|
|
93
|
+
const pgEnumFiles = Object.values(pgEnums)
|
|
94
|
+
.map((enumData) => {
|
|
95
|
+
return [
|
|
96
|
+
{
|
|
97
|
+
name: `${enumData.name}.ts`,
|
|
98
|
+
contents: (0, generatePgEnumFile_1.generatePgEnumFile)(config, enumData),
|
|
99
|
+
overwrite: true,
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
})
|
|
103
|
+
.reduce(utils_1.merge, []);
|
|
104
|
+
const contextType = config.contextType ? (0, ts_poet_1.imp)(config.contextType) : "{}";
|
|
105
|
+
const BaseEntity = (0, ts_poet_1.imp)("BaseEntity@joist-orm");
|
|
73
106
|
const metadataFile = {
|
|
74
107
|
name: "./metadata.ts",
|
|
75
|
-
contents: ts_poet_1.code `
|
|
76
|
-
export class ${ts_poet_1.def("EntityManager")} extends ${symbols_1.
|
|
108
|
+
contents: (0, ts_poet_1.code) `
|
|
109
|
+
export class ${(0, ts_poet_1.def)("EntityManager")} extends ${symbols_1.JoistEntityManager}<${contextType}> {}
|
|
77
110
|
|
|
78
|
-
${
|
|
111
|
+
export function getEm(e: ${BaseEntity}): EntityManager {
|
|
112
|
+
return e.em as EntityManager;
|
|
113
|
+
}
|
|
79
114
|
|
|
80
|
-
|
|
115
|
+
${entities.map((meta) => (0, generateMetadataFile_1.generateMetadataFile)(config, meta))}
|
|
116
|
+
|
|
117
|
+
export const allMetadata = [${entities.map((meta) => meta.entity.metaName).join(", ")}];
|
|
81
118
|
${symbols_1.configureMetadata}(allMetadata);
|
|
82
119
|
`,
|
|
83
120
|
overwrite: true,
|
|
121
|
+
prettierOverrides: { printWidth: 500 },
|
|
84
122
|
};
|
|
123
|
+
const enumsTables = Object.values(enums)
|
|
124
|
+
.map(({ table }) => table)
|
|
125
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
85
126
|
const entitiesFile = {
|
|
86
127
|
name: "./entities.ts",
|
|
87
|
-
contents: generateEntitiesFile_1.generateEntitiesFile(config, entities,
|
|
128
|
+
contents: (0, generateEntitiesFile_1.generateEntitiesFile)(config, entities, enumsTables, Object.values(pgEnums)),
|
|
88
129
|
overwrite: true,
|
|
89
130
|
};
|
|
90
|
-
const factoriesFiles = generateFactoriesFiles_1.generateFactoriesFiles(entities);
|
|
131
|
+
const factoriesFiles = (0, generateFactoriesFiles_1.generateFactoriesFiles)(entities);
|
|
91
132
|
const indexFile = {
|
|
92
133
|
name: "./index.ts",
|
|
93
|
-
contents: ts_poet_1.code `export * from "./entities"`,
|
|
134
|
+
contents: (0, ts_poet_1.code) `export * from "./entities"`,
|
|
94
135
|
overwrite: false,
|
|
95
136
|
};
|
|
96
137
|
// Look for modules to require and call the exported `.run(EntityDbMetadata[], Table[])` method
|
|
97
138
|
const pluginFiles = (await Promise.all(config.codegenPlugins.map((p) => {
|
|
98
139
|
const plugin = require(p);
|
|
99
|
-
return plugin.run(entities,
|
|
140
|
+
return plugin.run(config, entities, enums);
|
|
100
141
|
}))).flat();
|
|
101
|
-
return [
|
|
142
|
+
return [
|
|
143
|
+
...entityFiles,
|
|
144
|
+
...enumFiles,
|
|
145
|
+
...pgEnumFiles,
|
|
146
|
+
entitiesFile,
|
|
147
|
+
...factoriesFiles,
|
|
148
|
+
metadataFile,
|
|
149
|
+
indexFile,
|
|
150
|
+
...pluginFiles,
|
|
151
|
+
];
|
|
102
152
|
}
|
|
103
153
|
exports.generateFiles = generateFiles;
|
|
104
|
-
async function
|
|
105
|
-
const promises = db.tables.filter(utils_1.isEnumTable).
|
|
154
|
+
async function loadEnumMetadata(db, client, config) {
|
|
155
|
+
const promises = db.tables.filter(utils_1.isEnumTable).mapToArray(async (table) => {
|
|
106
156
|
const result = await client.query(`SELECT * FROM ${table.name} ORDER BY id`);
|
|
107
157
|
const rows = result.rows.map((row) => row);
|
|
108
|
-
|
|
158
|
+
// We're not really an entity, but appropriate EntityDbMetadata's `primitives` filtering
|
|
159
|
+
const extraPrimitives = new EntityDbMetadata_1.EntityDbMetadata(config, table).primitives.filter((p) => !["code", "name"].includes(p.fieldName));
|
|
160
|
+
return [
|
|
161
|
+
table.name,
|
|
162
|
+
{
|
|
163
|
+
table,
|
|
164
|
+
name: (0, change_case_1.pascalCase)(table.name),
|
|
165
|
+
rows,
|
|
166
|
+
extraPrimitives,
|
|
167
|
+
},
|
|
168
|
+
];
|
|
109
169
|
});
|
|
110
170
|
return Object.fromEntries(await Promise.all(promises));
|
|
111
171
|
}
|
|
112
|
-
exports.
|
|
113
|
-
async function
|
|
172
|
+
exports.loadEnumMetadata = loadEnumMetadata;
|
|
173
|
+
async function loadPgEnumMetadata(db, client, config) {
|
|
174
|
+
return db.types.reduce((all, type) => {
|
|
175
|
+
if (type instanceof pg_structure_1.EnumType) {
|
|
176
|
+
return {
|
|
177
|
+
...all,
|
|
178
|
+
[type.name]: {
|
|
179
|
+
name: (0, change_case_1.pascalCase)(type.name),
|
|
180
|
+
values: type.values,
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
return all;
|
|
185
|
+
}, {});
|
|
186
|
+
}
|
|
187
|
+
exports.loadPgEnumMetadata = loadPgEnumMetadata;
|
|
188
|
+
async function contentToString(content, fileName, prettierOverrides = {}) {
|
|
114
189
|
if (typeof content === "string") {
|
|
115
190
|
return content;
|
|
116
191
|
}
|
|
117
|
-
return await content.toStringWithImports(fileName);
|
|
192
|
+
return await content.toStringWithImports({ path: fileName, prettierOverrides });
|
|
118
193
|
}
|
|
119
194
|
exports.contentToString = contentToString;
|
|
120
195
|
if (require.main === module) {
|
|
@@ -122,19 +197,20 @@ if (require.main === module) {
|
|
|
122
197
|
throw new Error("Joist requires Node v12.4.0+");
|
|
123
198
|
}
|
|
124
199
|
(async function () {
|
|
125
|
-
const pgConfig = joist_utils_1.newPgConnectionConfig();
|
|
126
|
-
|
|
200
|
+
const pgConfig = (0, joist_utils_1.newPgConnectionConfig)();
|
|
201
|
+
// Assume other schemas are things like cyan audit / graphile-worker, that we don't want entity for
|
|
202
|
+
const db = await (0, pg_structure_1.default)(pgConfig, { includeSchemas: "public" });
|
|
203
|
+
const config = await (0, config_1.loadConfig)();
|
|
127
204
|
const client = new pg_1.Client(pgConfig);
|
|
128
205
|
await client.connect();
|
|
129
|
-
const
|
|
206
|
+
const enums = await loadEnumMetadata(db, client, config);
|
|
207
|
+
const pgEnums = await loadPgEnumMetadata(db, client, config);
|
|
130
208
|
await client.end();
|
|
131
|
-
const config = await config_1.loadConfig();
|
|
132
209
|
const entityTables = db.tables.filter(utils_1.isEntityTable).sortBy("name");
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
await config_1.writeConfig(config);
|
|
210
|
+
const entities = entityTables.map((table) => new EntityDbMetadata_1.EntityDbMetadata(config, table, enums));
|
|
211
|
+
const dbMetadata = { entityTables, entities, enums, pgEnums };
|
|
212
|
+
(0, assignTags_1.assignTags)(config, dbMetadata);
|
|
213
|
+
await (0, config_1.writeConfig)(config);
|
|
138
214
|
await generateAndSaveFiles(config, dbMetadata);
|
|
139
215
|
})().catch((err) => {
|
|
140
216
|
console.error(err);
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot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AC;QAE1E,IAAA,uBAAU,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAC/B,MAAM,IAAA,oBAAW,EAAC,MAAM,CAAC,CAAC;QAE1B,MAAM,oBAAoB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACjD,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACjB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;CACJ"}
|
package/build/symbols.d.ts
CHANGED
|
@@ -1,51 +1,62 @@
|
|
|
1
|
-
export declare const ConfigApi: import("ts-poet
|
|
2
|
-
export declare const FieldStatus: import("ts-poet
|
|
3
|
-
export declare const Entity: import("ts-poet
|
|
4
|
-
export declare const BaseEntity: import("ts-poet
|
|
5
|
-
export declare const Flavor: import("ts-poet
|
|
6
|
-
export declare const Reference: import("ts-poet
|
|
7
|
-
export declare const Collection: import("ts-poet
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
35
|
-
export declare const
|
|
36
|
-
export declare const
|
|
37
|
-
export declare const
|
|
38
|
-
export declare const
|
|
39
|
-
export declare const
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const
|
|
42
|
-
export declare const
|
|
43
|
-
export declare const
|
|
44
|
-
export declare const
|
|
45
|
-
export declare const
|
|
46
|
-
export declare const
|
|
47
|
-
export declare const
|
|
48
|
-
export declare const
|
|
49
|
-
export declare const
|
|
50
|
-
export declare const
|
|
51
|
-
export declare const
|
|
1
|
+
export declare const ConfigApi: import("ts-poet").Import;
|
|
2
|
+
export declare const FieldStatus: import("ts-poet").Import;
|
|
3
|
+
export declare const Entity: import("ts-poet").Import;
|
|
4
|
+
export declare const BaseEntity: import("ts-poet").Import;
|
|
5
|
+
export declare const Flavor: import("ts-poet").Import;
|
|
6
|
+
export declare const Reference: import("ts-poet").Import;
|
|
7
|
+
export declare const Collection: import("ts-poet").Import;
|
|
8
|
+
export declare const LargeCollection: import("ts-poet").Import;
|
|
9
|
+
export declare const OneToManyCollection: import("ts-poet").Import;
|
|
10
|
+
export declare const EntityOrmField: import("ts-poet").Import;
|
|
11
|
+
export declare const EntityManager: import("ts-poet").Import;
|
|
12
|
+
export declare const JoistEntityManager: import("ts-poet").Import;
|
|
13
|
+
export declare const EntityMetadata: import("ts-poet").Import;
|
|
14
|
+
export declare const Lens: import("ts-poet").Import;
|
|
15
|
+
export declare const KeySerde: import("ts-poet").Import;
|
|
16
|
+
export declare const ManyToOneReference: import("ts-poet").Import;
|
|
17
|
+
export declare const PolymorphicReference: import("ts-poet").Import;
|
|
18
|
+
export declare const OneToOneReference: import("ts-poet").Import;
|
|
19
|
+
export declare const ManyToManyCollection: import("ts-poet").Import;
|
|
20
|
+
export declare const EnumFieldSerde: import("ts-poet").Import;
|
|
21
|
+
export declare const EnumArrayFieldSerde: import("ts-poet").Import;
|
|
22
|
+
export declare const PolymorphicKeySerde: import("ts-poet").Import;
|
|
23
|
+
export declare const PrimitiveSerde: import("ts-poet").Import;
|
|
24
|
+
export declare const SuperstructSerde: import("ts-poet").Import;
|
|
25
|
+
export declare const DecimalToNumberSerde: import("ts-poet").Import;
|
|
26
|
+
export declare const fail: import("ts-poet").Import;
|
|
27
|
+
export declare const setOpts: import("ts-poet").Import;
|
|
28
|
+
export declare const setField: import("ts-poet").Import;
|
|
29
|
+
export declare const OrderBy: import("ts-poet").Import;
|
|
30
|
+
export declare const OptsOf: import("ts-poet").Import;
|
|
31
|
+
export declare const IdOf: import("ts-poet").Import;
|
|
32
|
+
export declare const PartialOrNull: import("ts-poet").Import;
|
|
33
|
+
export declare const BooleanFilter: import("ts-poet").Import;
|
|
34
|
+
export declare const ValueFilter: import("ts-poet").Import;
|
|
35
|
+
export declare const EntityFilter: import("ts-poet").Import;
|
|
36
|
+
export declare const BooleanGraphQLFilter: import("ts-poet").Import;
|
|
37
|
+
export declare const EntityGraphQLFilter: import("ts-poet").Import;
|
|
38
|
+
export declare const EnumGraphQLFilter: import("ts-poet").Import;
|
|
39
|
+
export declare const ValueGraphQLFilter: import("ts-poet").Import;
|
|
40
|
+
export declare const FilterOf: import("ts-poet").Import;
|
|
41
|
+
export declare const GraphQLFilterOf: import("ts-poet").Import;
|
|
42
|
+
export declare const configureMetadata: import("ts-poet").Import;
|
|
43
|
+
export declare const newRequiredRule: import("ts-poet").Import;
|
|
44
|
+
export declare const Changes: import("ts-poet").Import;
|
|
45
|
+
export declare const newChangesProxy: import("ts-poet").Import;
|
|
46
|
+
export declare const LoadHint: import("ts-poet").Import;
|
|
47
|
+
export declare const Loaded: import("ts-poet").Import;
|
|
48
|
+
export declare const getEm: import("ts-poet").Import;
|
|
49
|
+
export declare const loadLens: import("ts-poet").Import;
|
|
50
|
+
export declare const hasOneThrough: import("ts-poet").Import;
|
|
51
|
+
export declare const hasMany: import("ts-poet").Import;
|
|
52
|
+
export declare const hasLargeMany: import("ts-poet").Import;
|
|
53
|
+
export declare const hasOne: import("ts-poet").Import;
|
|
54
|
+
export declare const hasOnePolymorphic: import("ts-poet").Import;
|
|
55
|
+
export declare const hasOneToOne: import("ts-poet").Import;
|
|
56
|
+
export declare const hasManyToMany: import("ts-poet").Import;
|
|
57
|
+
export declare const hasLargeManyToMany: import("ts-poet").Import;
|
|
58
|
+
export declare const newTestInstance: import("ts-poet").Import;
|
|
59
|
+
export declare const New: import("ts-poet").Import;
|
|
60
|
+
export declare const FactoryOpts: import("ts-poet").Import;
|
|
61
|
+
export declare const SSAssert: import("ts-poet").Import;
|
|
62
|
+
export declare const EntityConstructor: import("ts-poet").Import;
|
package/build/symbols.js
CHANGED
|
@@ -1,56 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.hasOneThrough = exports.loadLens = exports.getEm = exports.Loaded = exports.LoadHint = exports.newChangesProxy = exports.Changes = exports.newRequiredRule = exports.configureMetadata = exports.GraphQLFilterOf = exports.FilterOf = exports.ValueGraphQLFilter = exports.EnumGraphQLFilter = exports.EntityGraphQLFilter = exports.BooleanGraphQLFilter = exports.EntityFilter = exports.ValueFilter = exports.BooleanFilter = exports.PartialOrNull = exports.IdOf = exports.OptsOf = exports.OrderBy = exports.setField = exports.setOpts = exports.fail = exports.DecimalToNumberSerde = exports.SuperstructSerde = exports.PrimitiveSerde = exports.PolymorphicKeySerde = exports.EnumArrayFieldSerde = exports.EnumFieldSerde = exports.ManyToManyCollection = exports.OneToOneReference = exports.PolymorphicReference = exports.ManyToOneReference = exports.KeySerde = exports.Lens = exports.EntityMetadata = exports.JoistEntityManager = exports.EntityManager = exports.EntityOrmField = exports.OneToManyCollection = exports.LargeCollection = exports.Collection = exports.Reference = exports.Flavor = exports.BaseEntity = exports.Entity = exports.FieldStatus = exports.ConfigApi = void 0;
|
|
4
|
+
exports.EntityConstructor = exports.SSAssert = exports.FactoryOpts = exports.New = exports.newTestInstance = exports.hasLargeManyToMany = exports.hasManyToMany = exports.hasOneToOne = exports.hasOnePolymorphic = exports.hasOne = exports.hasLargeMany = exports.hasMany = void 0;
|
|
4
5
|
const ts_poet_1 = require("ts-poet");
|
|
5
|
-
exports.ConfigApi = ts_poet_1.imp("ConfigApi@joist-orm");
|
|
6
|
-
exports.FieldStatus = ts_poet_1.imp("FieldStatus@joist-orm");
|
|
7
|
-
exports.Entity = ts_poet_1.imp("Entity@joist-orm");
|
|
8
|
-
exports.BaseEntity = ts_poet_1.imp("BaseEntity@joist-orm");
|
|
9
|
-
exports.Flavor = ts_poet_1.imp("Flavor@joist-orm");
|
|
10
|
-
exports.Reference = ts_poet_1.imp("Reference@joist-orm");
|
|
11
|
-
exports.Collection = ts_poet_1.imp("Collection@joist-orm");
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
33
|
-
exports.
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
6
|
+
exports.ConfigApi = (0, ts_poet_1.imp)("ConfigApi@joist-orm");
|
|
7
|
+
exports.FieldStatus = (0, ts_poet_1.imp)("FieldStatus@joist-orm");
|
|
8
|
+
exports.Entity = (0, ts_poet_1.imp)("Entity@joist-orm");
|
|
9
|
+
exports.BaseEntity = (0, ts_poet_1.imp)("BaseEntity@joist-orm");
|
|
10
|
+
exports.Flavor = (0, ts_poet_1.imp)("Flavor@joist-orm");
|
|
11
|
+
exports.Reference = (0, ts_poet_1.imp)("Reference@joist-orm");
|
|
12
|
+
exports.Collection = (0, ts_poet_1.imp)("Collection@joist-orm");
|
|
13
|
+
exports.LargeCollection = (0, ts_poet_1.imp)("LargeCollection@joist-orm");
|
|
14
|
+
exports.OneToManyCollection = (0, ts_poet_1.imp)("OneToManyCollection@joist-orm");
|
|
15
|
+
exports.EntityOrmField = (0, ts_poet_1.imp)("EntityOrmField@joist-orm");
|
|
16
|
+
exports.EntityManager = (0, ts_poet_1.imp)("EntityManager@src/entities");
|
|
17
|
+
exports.JoistEntityManager = (0, ts_poet_1.imp)("EntityManager@joist-orm");
|
|
18
|
+
exports.EntityMetadata = (0, ts_poet_1.imp)("EntityMetadata@joist-orm");
|
|
19
|
+
exports.Lens = (0, ts_poet_1.imp)("Lens@joist-orm");
|
|
20
|
+
exports.KeySerde = (0, ts_poet_1.imp)("KeySerde@joist-orm");
|
|
21
|
+
exports.ManyToOneReference = (0, ts_poet_1.imp)("ManyToOneReference@joist-orm");
|
|
22
|
+
exports.PolymorphicReference = (0, ts_poet_1.imp)("PolymorphicReference@joist-orm");
|
|
23
|
+
exports.OneToOneReference = (0, ts_poet_1.imp)("OneToOneReference@joist-orm");
|
|
24
|
+
exports.ManyToManyCollection = (0, ts_poet_1.imp)("ManyToManyCollection@joist-orm");
|
|
25
|
+
exports.EnumFieldSerde = (0, ts_poet_1.imp)("EnumFieldSerde@joist-orm");
|
|
26
|
+
exports.EnumArrayFieldSerde = (0, ts_poet_1.imp)("EnumArrayFieldSerde@joist-orm");
|
|
27
|
+
exports.PolymorphicKeySerde = (0, ts_poet_1.imp)("PolymorphicKeySerde@joist-orm");
|
|
28
|
+
exports.PrimitiveSerde = (0, ts_poet_1.imp)("PrimitiveSerde@joist-orm");
|
|
29
|
+
exports.SuperstructSerde = (0, ts_poet_1.imp)("SuperstructSerde@joist-orm");
|
|
30
|
+
exports.DecimalToNumberSerde = (0, ts_poet_1.imp)("DecimalToNumberSerde@joist-orm");
|
|
31
|
+
exports.fail = (0, ts_poet_1.imp)("fail@joist-orm");
|
|
32
|
+
exports.setOpts = (0, ts_poet_1.imp)("setOpts@joist-orm");
|
|
33
|
+
exports.setField = (0, ts_poet_1.imp)("setField@joist-orm");
|
|
34
|
+
exports.OrderBy = (0, ts_poet_1.imp)("OrderBy@joist-orm");
|
|
35
|
+
exports.OptsOf = (0, ts_poet_1.imp)("OptsOf@joist-orm");
|
|
36
|
+
exports.IdOf = (0, ts_poet_1.imp)("IdOf@joist-orm");
|
|
37
|
+
exports.PartialOrNull = (0, ts_poet_1.imp)("PartialOrNull@joist-orm");
|
|
38
|
+
exports.BooleanFilter = (0, ts_poet_1.imp)("BooleanFilter@joist-orm");
|
|
39
|
+
exports.ValueFilter = (0, ts_poet_1.imp)("ValueFilter@joist-orm");
|
|
40
|
+
exports.EntityFilter = (0, ts_poet_1.imp)("EntityFilter@joist-orm");
|
|
41
|
+
exports.BooleanGraphQLFilter = (0, ts_poet_1.imp)("BooleanGraphQLFilter@joist-orm");
|
|
42
|
+
exports.EntityGraphQLFilter = (0, ts_poet_1.imp)("EntityGraphQLFilter@joist-orm");
|
|
43
|
+
exports.EnumGraphQLFilter = (0, ts_poet_1.imp)("EnumGraphQLFilter@joist-orm");
|
|
44
|
+
exports.ValueGraphQLFilter = (0, ts_poet_1.imp)("ValueGraphQLFilter@joist-orm");
|
|
45
|
+
exports.FilterOf = (0, ts_poet_1.imp)("FilterOf@joist-orm");
|
|
46
|
+
exports.GraphQLFilterOf = (0, ts_poet_1.imp)("GraphQLFilterOf@joist-orm");
|
|
47
|
+
exports.configureMetadata = (0, ts_poet_1.imp)("configureMetadata@joist-orm");
|
|
48
|
+
exports.newRequiredRule = (0, ts_poet_1.imp)("newRequiredRule@joist-orm");
|
|
49
|
+
exports.Changes = (0, ts_poet_1.imp)("Changes@joist-orm");
|
|
50
|
+
exports.newChangesProxy = (0, ts_poet_1.imp)("newChangesProxy@joist-orm");
|
|
51
|
+
exports.LoadHint = (0, ts_poet_1.imp)("LoadHint@joist-orm");
|
|
52
|
+
exports.Loaded = (0, ts_poet_1.imp)("Loaded@joist-orm");
|
|
53
|
+
exports.getEm = (0, ts_poet_1.imp)("getEm@joist-orm");
|
|
54
|
+
exports.loadLens = (0, ts_poet_1.imp)("loadLens@joist-orm");
|
|
55
|
+
exports.hasOneThrough = (0, ts_poet_1.imp)("hasOneThrough@joist-orm");
|
|
56
|
+
exports.hasMany = (0, ts_poet_1.imp)("hasMany@joist-orm");
|
|
57
|
+
exports.hasLargeMany = (0, ts_poet_1.imp)("hasLargeMany@joist-orm");
|
|
58
|
+
exports.hasOne = (0, ts_poet_1.imp)("hasOne@joist-orm");
|
|
59
|
+
exports.hasOnePolymorphic = (0, ts_poet_1.imp)("hasOnePolymorphic@joist-orm");
|
|
60
|
+
exports.hasOneToOne = (0, ts_poet_1.imp)("hasOneToOne@joist-orm");
|
|
61
|
+
exports.hasManyToMany = (0, ts_poet_1.imp)("hasManyToMany@joist-orm");
|
|
62
|
+
exports.hasLargeManyToMany = (0, ts_poet_1.imp)("hasLargeManyToMany@joist-orm");
|
|
63
|
+
exports.newTestInstance = (0, ts_poet_1.imp)("newTestInstance@joist-orm");
|
|
64
|
+
exports.New = (0, ts_poet_1.imp)("New@joist-orm");
|
|
65
|
+
exports.FactoryOpts = (0, ts_poet_1.imp)("FactoryOpts@joist-orm");
|
|
66
|
+
exports.SSAssert = (0, ts_poet_1.imp)("assert@superstruct");
|
|
67
|
+
exports.EntityConstructor = (0, ts_poet_1.imp)("EntityConstructor@joist-orm");
|
|
56
68
|
//# sourceMappingURL=symbols.js.map
|
package/build/symbols.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbols.js","sourceRoot":"","sources":["../src/symbols.ts"],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AkB,GAAG,IAAA,aAAG,EAAC,8BAA8B,CAAC,CAAC;AACzD,QAAA,eAAe,GAAG,IAAA,aAAG,EAAC,2BAA2B,CAAC,CAAC;AACnD,QAAA,GAAG,GAAG,IAAA,aAAG,EAAC,eAAe,CAAC,CAAC;AAC3B,QAAA,WAAW,GAAG,IAAA,aAAG,EAAC,uBAAuB,CAAC,CAAC;AAC3C,QAAA,QAAQ,GAAG,IAAA,aAAG,EAAC,oBAAoB,CAAC,CAAC;AACrC,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAAC,6BAA6B,CAAC,CAAC"}
|
package/build/utils.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Config } from "./config";
|
|
2
1
|
import { Table } from "pg-structure";
|
|
2
|
+
import { Config } from "./config";
|
|
3
|
+
import { DatabaseColumnType, PrimitiveTypescriptType } from "./EntityDbMetadata";
|
|
4
|
+
export declare function assertNever(x: never): never;
|
|
3
5
|
export declare function isEntityTable(t: Table): boolean;
|
|
4
6
|
export declare function isEnumTable(t: Table): boolean;
|
|
5
7
|
export declare function isJoinTable(t: Table): boolean;
|
|
6
8
|
/** Converts `projects` to `Project`. */
|
|
7
9
|
export declare function tableToEntityName(config: Config, table: Table): string;
|
|
8
10
|
/** Maps db types, i.e. `int`, to JS types, i.e. `number`. */
|
|
9
|
-
export declare function
|
|
11
|
+
export declare function mapSimpleDbTypeToTypescriptType(dbType: DatabaseColumnType): PrimitiveTypescriptType;
|
|
10
12
|
export declare function merge<T>(a: T[], b: T[]): T[];
|
|
11
13
|
/** Returns true if `p` is resolved, otherwise false if it is rejected. */
|
|
12
14
|
export declare function trueIfResolved(p: Promise<unknown>): Promise<boolean>;
|