relq 1.0.17 → 1.0.18
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.
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.defineConfig = defineConfig;
|
|
37
4
|
exports.loadConfig = loadConfig;
|
|
@@ -40,6 +7,7 @@ exports.mergeConfigs = mergeConfigs;
|
|
|
40
7
|
exports.validateConfig = validateConfig;
|
|
41
8
|
const node_path_1 = require("node:path");
|
|
42
9
|
const node_fs_1 = require("node:fs");
|
|
10
|
+
const jiti_1 = require("jiti");
|
|
43
11
|
function defineConfig(config) {
|
|
44
12
|
return {
|
|
45
13
|
...config,
|
|
@@ -83,10 +51,16 @@ async function loadConfig(startPath) {
|
|
|
83
51
|
return {};
|
|
84
52
|
}
|
|
85
53
|
try {
|
|
86
|
-
const
|
|
87
|
-
|
|
54
|
+
const jiti = (0, jiti_1.createJiti)(result.projectRoot, {
|
|
55
|
+
interopDefault: true,
|
|
56
|
+
});
|
|
57
|
+
const module = await jiti.import(result.configPath);
|
|
58
|
+
if (module && typeof module === 'object' && 'default' in module) {
|
|
88
59
|
return module.default;
|
|
89
60
|
}
|
|
61
|
+
if (module && typeof module === 'object') {
|
|
62
|
+
return module;
|
|
63
|
+
}
|
|
90
64
|
return {};
|
|
91
65
|
}
|
|
92
66
|
catch {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { join, dirname, parse, basename } from 'node:path';
|
|
2
2
|
import { existsSync, statSync } from 'node:fs';
|
|
3
|
+
import { createJiti } from 'jiti';
|
|
3
4
|
export function defineConfig(config) {
|
|
4
5
|
return {
|
|
5
6
|
...config,
|
|
@@ -43,10 +44,16 @@ export async function loadConfig(startPath) {
|
|
|
43
44
|
return {};
|
|
44
45
|
}
|
|
45
46
|
try {
|
|
46
|
-
const
|
|
47
|
-
|
|
47
|
+
const jiti = createJiti(result.projectRoot, {
|
|
48
|
+
interopDefault: true,
|
|
49
|
+
});
|
|
50
|
+
const module = await jiti.import(result.configPath);
|
|
51
|
+
if (module && typeof module === 'object' && 'default' in module) {
|
|
48
52
|
return module.default;
|
|
49
53
|
}
|
|
54
|
+
if (module && typeof module === 'object') {
|
|
55
|
+
return module;
|
|
56
|
+
}
|
|
50
57
|
return {};
|
|
51
58
|
}
|
|
52
59
|
catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "relq",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "The Fully-Typed PostgreSQL ORM for TypeScript",
|
|
5
5
|
"author": "Olajide Mathew O. <olajide.mathew@yuniq.solutions>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
"node": ">=18.0.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"
|
|
54
|
+
"jiti": "^2.6.1",
|
|
55
|
+
"@aws-sdk/dsql-signer": "^3.962.0",
|
|
55
56
|
"@pgsql/types": "^17.6.2",
|
|
56
57
|
"cli-spinners": "^3.3.0",
|
|
57
58
|
"ora": "^9.0.0",
|