@llmist/cli 12.0.1 → 12.0.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.
- package/dist/cli.js +14 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -76,7 +76,7 @@ import { Command, InvalidArgumentError as InvalidArgumentError2 } from "commande
|
|
|
76
76
|
// package.json
|
|
77
77
|
var package_default = {
|
|
78
78
|
name: "@llmist/cli",
|
|
79
|
-
version: "12.0.
|
|
79
|
+
version: "12.0.2",
|
|
80
80
|
description: "CLI for llmist - run LLM agents from the command line",
|
|
81
81
|
type: "module",
|
|
82
82
|
main: "dist/cli.js",
|
|
@@ -1328,6 +1328,7 @@ async function readFileBuffer(filePath, options = {}) {
|
|
|
1328
1328
|
|
|
1329
1329
|
// src/gadgets.ts
|
|
1330
1330
|
import fs6 from "fs";
|
|
1331
|
+
import { createRequire } from "module";
|
|
1331
1332
|
import path5 from "path";
|
|
1332
1333
|
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
1333
1334
|
import { createJiti } from "jiti";
|
|
@@ -2211,6 +2212,10 @@ function isTypeScriptFile(specifier) {
|
|
|
2211
2212
|
const pathToCheck = specifier.startsWith("file://") ? new URL(specifier).pathname : specifier;
|
|
2212
2213
|
return TYPESCRIPT_EXTENSIONS.some((ext) => pathToCheck.endsWith(ext));
|
|
2213
2214
|
}
|
|
2215
|
+
function resolvePackagePath(packageName) {
|
|
2216
|
+
const require2 = createRequire(import.meta.url);
|
|
2217
|
+
return require2.resolve(packageName);
|
|
2218
|
+
}
|
|
2214
2219
|
var jitiInstance = null;
|
|
2215
2220
|
function getJiti() {
|
|
2216
2221
|
if (!jitiInstance) {
|
|
@@ -2220,7 +2225,14 @@ function getJiti() {
|
|
|
2220
2225
|
// Enable module cache to integrate with Node.js cache
|
|
2221
2226
|
moduleCache: true,
|
|
2222
2227
|
// Enable interop for CJS/ESM compatibility
|
|
2223
|
-
interopDefault: true
|
|
2228
|
+
interopDefault: true,
|
|
2229
|
+
// Map 'llmist' and 'zod' to CLI's installed versions
|
|
2230
|
+
// Allows TypeScript gadgets in ~/.llmist/gadgets/ to import
|
|
2231
|
+
// without needing their own node_modules
|
|
2232
|
+
alias: {
|
|
2233
|
+
llmist: resolvePackagePath("llmist"),
|
|
2234
|
+
zod: resolvePackagePath("zod")
|
|
2235
|
+
}
|
|
2224
2236
|
});
|
|
2225
2237
|
}
|
|
2226
2238
|
return jitiInstance;
|