@mostajs/orm 1.4.0 → 1.4.2
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.
|
@@ -15,8 +15,9 @@ const __dirname_resolved = dirname(__filename_resolved);
|
|
|
15
15
|
function getDefaultJarDir() {
|
|
16
16
|
if (process.env.MOSTA_JAR_DIR)
|
|
17
17
|
return process.env.MOSTA_JAR_DIR;
|
|
18
|
-
// Look in
|
|
18
|
+
// Look in project root first (process.cwd()), then relative to package
|
|
19
19
|
const candidates = [
|
|
20
|
+
join(process.cwd(), 'jar_files'),
|
|
20
21
|
join(__dirname_resolved, '..', '..', 'bridge'),
|
|
21
22
|
join(__dirname_resolved, '..', '..', '..', 'jar_files'),
|
|
22
23
|
join(__dirname_resolved, '..', '..', 'jar_files'),
|
|
@@ -31,9 +32,15 @@ function getDefaultJarDir() {
|
|
|
31
32
|
function getDefaultBridgeJavaPath() {
|
|
32
33
|
if (process.env.MOSTA_BRIDGE_JAVA)
|
|
33
34
|
return process.env.MOSTA_BRIDGE_JAVA;
|
|
35
|
+
const bridgeFile = 'MostaJdbcBridge.java';
|
|
34
36
|
const candidates = [
|
|
35
|
-
|
|
36
|
-
join(__dirname_resolved, '..', '..', '
|
|
37
|
+
// Relative to dist/bridge/ (normal npm install layout)
|
|
38
|
+
join(__dirname_resolved, '..', '..', 'bridge', bridgeFile),
|
|
39
|
+
// Relative to package root (monorepo / local dev)
|
|
40
|
+
join(__dirname_resolved, '..', '..', '..', 'bridge', bridgeFile),
|
|
41
|
+
// Via process.cwd() (fallback)
|
|
42
|
+
join(process.cwd(), 'node_modules', '@mostajs', 'orm', 'bridge', bridgeFile),
|
|
43
|
+
join(process.cwd(), 'bridge', bridgeFile),
|
|
37
44
|
];
|
|
38
45
|
for (const p of candidates) {
|
|
39
46
|
if (existsSync(p))
|
package/package.json
CHANGED