opencode-manifold 0.5.15 → 0.5.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 +13 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -104,7 +104,19 @@ import { homedir } from "os";
|
|
|
104
104
|
import { createRequire as createRequire2 } from "module";
|
|
105
105
|
var __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
106
106
|
var require2 = createRequire2(import.meta.url);
|
|
107
|
-
|
|
107
|
+
function getBundledTemplatesDir() {
|
|
108
|
+
const possiblePaths = [
|
|
109
|
+
join(__dirname2, "..", "src", "templates"),
|
|
110
|
+
join(__dirname2, "templates"),
|
|
111
|
+
join(__dirname2, "..", "templates")
|
|
112
|
+
];
|
|
113
|
+
for (const p of possiblePaths) {
|
|
114
|
+
if (existsSync(p))
|
|
115
|
+
return p;
|
|
116
|
+
}
|
|
117
|
+
return possiblePaths[0];
|
|
118
|
+
}
|
|
119
|
+
var bundledTemplatesDir = getBundledTemplatesDir();
|
|
108
120
|
var globalTemplatesDir = join(homedir(), ".config", "opencode", "manifold");
|
|
109
121
|
async function copyFiles(src, dest) {
|
|
110
122
|
if (!existsSync(src))
|