gut-cli 0.1.15 → 0.1.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/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/index.js +14 -2
- package/dist/lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -108,7 +108,8 @@ var FALLBACK_ENV_MAP = {
|
|
|
108
108
|
};
|
|
109
109
|
async function getKeytar() {
|
|
110
110
|
try {
|
|
111
|
-
|
|
111
|
+
const keytar = await import("keytar");
|
|
112
|
+
return keytar.default || keytar;
|
|
112
113
|
} catch {
|
|
113
114
|
return null;
|
|
114
115
|
}
|
|
@@ -390,7 +391,18 @@ function isValidLanguage(lang) {
|
|
|
390
391
|
// src/lib/ai.ts
|
|
391
392
|
var __filename = fileURLToPath(import.meta.url);
|
|
392
393
|
var __dirname = dirname(__filename);
|
|
393
|
-
|
|
394
|
+
function findGutRoot() {
|
|
395
|
+
let current = __dirname;
|
|
396
|
+
for (let i = 0; i < 5; i++) {
|
|
397
|
+
const gutPath = join2(current, ".gut");
|
|
398
|
+
if (existsSync2(gutPath)) {
|
|
399
|
+
return current;
|
|
400
|
+
}
|
|
401
|
+
current = dirname(current);
|
|
402
|
+
}
|
|
403
|
+
return join2(__dirname, "..");
|
|
404
|
+
}
|
|
405
|
+
var GUT_ROOT = findGutRoot();
|
|
394
406
|
function loadTemplate(name) {
|
|
395
407
|
const templatePath = join2(GUT_ROOT, ".gut", `${name}.md`);
|
|
396
408
|
if (existsSync2(templatePath)) {
|