pg-codegen 2.3.0 → 2.4.1
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/esm/index.js +4 -4
- package/esm/introspect.js +1 -1
- package/index.js +6 -6
- package/introspect.js +2 -2
- package/package.json +5 -5
package/esm/index.js
CHANGED
|
@@ -2,13 +2,13 @@ import { promises as fs } from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { generateCodeTree } from './codegen/codegen';
|
|
4
4
|
import getIntrospectionRows from './introspect';
|
|
5
|
-
import { Logger } from '@launchql/
|
|
6
|
-
import { getPgEnvOptions } from '
|
|
7
|
-
import {
|
|
5
|
+
import { Logger } from '@launchql/logger';
|
|
6
|
+
import { getPgEnvOptions } from 'pg-env';
|
|
7
|
+
import { getPgPool } from 'pg-cache';
|
|
8
8
|
const log = new Logger('pg-codegen');
|
|
9
9
|
(async () => {
|
|
10
10
|
const env = getPgEnvOptions();
|
|
11
|
-
const pool =
|
|
11
|
+
const pool = getPgPool(env);
|
|
12
12
|
const options = {
|
|
13
13
|
// @ts-ignore
|
|
14
14
|
client: pool, // hope this is ok?
|
package/esm/introspect.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { makeIntrospectionQuery } from './query';
|
|
2
|
-
import { Logger } from '@launchql/
|
|
2
|
+
import { Logger } from '@launchql/logger';
|
|
3
3
|
const log = new Logger('pg-codegen');
|
|
4
4
|
export const getIntrospectionRows = async (options) => {
|
|
5
5
|
const { client, introspectionOptions, namespacesToIntrospect, includeExtensions = false, } = options;
|
package/index.js
CHANGED
|
@@ -7,13 +7,13 @@ const fs_1 = require("fs");
|
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const codegen_1 = require("./codegen/codegen");
|
|
9
9
|
const introspect_1 = __importDefault(require("./introspect"));
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const log = new
|
|
10
|
+
const logger_1 = require("@launchql/logger");
|
|
11
|
+
const pg_env_1 = require("pg-env");
|
|
12
|
+
const pg_cache_1 = require("pg-cache");
|
|
13
|
+
const log = new logger_1.Logger('pg-codegen');
|
|
14
14
|
(async () => {
|
|
15
|
-
const env = (0,
|
|
16
|
-
const pool = (0,
|
|
15
|
+
const env = (0, pg_env_1.getPgEnvOptions)();
|
|
16
|
+
const pool = (0, pg_cache_1.getPgPool)(env);
|
|
17
17
|
const options = {
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
client: pool, // hope this is ok?
|
package/introspect.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getIntrospectionRows = void 0;
|
|
4
4
|
const query_1 = require("./query");
|
|
5
|
-
const
|
|
6
|
-
const log = new
|
|
5
|
+
const logger_1 = require("@launchql/logger");
|
|
6
|
+
const log = new logger_1.Logger('pg-codegen');
|
|
7
7
|
const getIntrospectionRows = async (options) => {
|
|
8
8
|
const { client, introspectionOptions, namespacesToIntrospect, includeExtensions = false, } = options;
|
|
9
9
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg-codegen",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
5
5
|
"description": "PostgreSQL Codegen",
|
|
6
6
|
"main": "index.js",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@babel/generator": "^7.26.3",
|
|
43
43
|
"@babel/types": "^7.26.3",
|
|
44
|
-
"@launchql/server-utils": "^2.1.
|
|
45
|
-
"@launchql/types": "^2.1.
|
|
44
|
+
"@launchql/server-utils": "^2.1.15",
|
|
45
|
+
"@launchql/types": "^2.1.13",
|
|
46
46
|
"pg": "^8.16.0",
|
|
47
|
-
"pgsql-test": "^2.
|
|
47
|
+
"pgsql-test": "^2.3.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/pg": "^8.15.2"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "835a2e84ed84edab5bea8f5954d9dfeb657beb03"
|
|
53
53
|
}
|