relq 1.0.14 → 1.0.16
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/dist/cjs/cli/commands/branch.cjs +19 -4
- package/dist/cjs/cli/commands/diff.cjs +19 -4
- package/dist/cjs/cli/commands/fetch.cjs +19 -4
- package/dist/cjs/cli/commands/history.cjs +19 -4
- package/dist/cjs/cli/commands/init.cjs +19 -4
- package/dist/cjs/cli/commands/introspect.cjs +19 -4
- package/dist/cjs/cli/commands/merge.cjs +19 -4
- package/dist/cjs/cli/commands/migrate.cjs +19 -4
- package/dist/cjs/cli/commands/pull.cjs +19 -4
- package/dist/cjs/cli/commands/push.cjs +19 -4
- package/dist/cjs/cli/commands/reset.cjs +19 -4
- package/dist/cjs/cli/commands/resolve.cjs +19 -4
- package/dist/cjs/cli/commands/sync.cjs +19 -4
- package/dist/cjs/cli/index.cjs +19 -4
- package/dist/cjs/config/config.cjs +19 -4
- package/dist/cjs/config/index.cjs +19 -4
- package/dist/esm/config/config.js +21 -4
- package/package.json +1 -1
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
package/dist/cjs/cli/index.cjs
CHANGED
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -106,13 +106,28 @@ function defineConfig(config) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async function loadConfig(startPath) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const { existsSync, statSync } = require("fs");
|
|
110
|
+
const { dirname } = require("path");
|
|
111
|
+
let configPath = null;
|
|
112
|
+
if (startPath && existsSync(startPath)) {
|
|
113
|
+
const stats = statSync(startPath);
|
|
114
|
+
if (stats.isFile()) {
|
|
115
|
+
configPath = startPath;
|
|
116
|
+
} else {
|
|
117
|
+
const result = findConfigFile(startPath);
|
|
118
|
+
configPath = result?.configPath ?? null;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
const result = findConfigFile();
|
|
122
|
+
configPath = result?.configPath ?? null;
|
|
123
|
+
}
|
|
124
|
+
if (!configPath) {
|
|
111
125
|
return {};
|
|
112
126
|
}
|
|
113
127
|
const jiti = (await import("jiti")).default("file:///Users/jmathew/Antigravity/kuery/src/config/config.ts");
|
|
114
|
-
const module2 = await jiti.import(
|
|
115
|
-
|
|
128
|
+
const module2 = await jiti.import(configPath, {});
|
|
129
|
+
const config = module2?.default ?? module2;
|
|
130
|
+
return config ?? {};
|
|
116
131
|
}
|
|
117
132
|
function findConfigFile(startPath) {
|
|
118
133
|
const { existsSync } = require("fs");
|
|
@@ -36,13 +36,30 @@ export function defineConfig(config) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
export async function loadConfig(startPath) {
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
const { existsSync, statSync } = require('fs');
|
|
40
|
+
const { dirname } = require('path');
|
|
41
|
+
let configPath = null;
|
|
42
|
+
if (startPath && existsSync(startPath)) {
|
|
43
|
+
const stats = statSync(startPath);
|
|
44
|
+
if (stats.isFile()) {
|
|
45
|
+
configPath = startPath;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
const result = findConfigFile(startPath);
|
|
49
|
+
configPath = result?.configPath ?? null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
const result = findConfigFile();
|
|
54
|
+
configPath = result?.configPath ?? null;
|
|
55
|
+
}
|
|
56
|
+
if (!configPath) {
|
|
41
57
|
return {};
|
|
42
58
|
}
|
|
43
59
|
const jiti = (await import('jiti')).default(import.meta.url);
|
|
44
|
-
const module = await jiti.import(
|
|
45
|
-
|
|
60
|
+
const module = await jiti.import(configPath, {});
|
|
61
|
+
const config = module?.default ?? module;
|
|
62
|
+
return (config ?? {});
|
|
46
63
|
}
|
|
47
64
|
function findConfigFile(startPath) {
|
|
48
65
|
const { existsSync } = require('fs');
|