@lotics/cli 0.128.0 → 0.129.0
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/src/cli.js +5 -16
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -70380,16 +70380,13 @@ function stripAgentHeader(text) {
|
|
|
70380
70380
|
return text.replace(/<!--\s*lotics:[\s\S]*?-->\n?/g, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
70381
70381
|
}
|
|
70382
70382
|
|
|
70383
|
-
// src/
|
|
70384
|
-
async function fetchLatestNpmVersion(packageName) {
|
|
70383
|
+
// src/npm_registry.ts
|
|
70384
|
+
async function fetchLatestNpmVersion(packageName, { timeoutMs = 1500 } = {}) {
|
|
70385
70385
|
try {
|
|
70386
|
-
const controller = new AbortController();
|
|
70387
|
-
const timeout = setTimeout(() => controller.abort(), 1500);
|
|
70388
70386
|
const response = await fetch(`https://registry.npmjs.org/${packageName}/latest`, {
|
|
70389
|
-
signal:
|
|
70387
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
70390
70388
|
headers: { accept: "application/json" }
|
|
70391
70389
|
});
|
|
70392
|
-
clearTimeout(timeout);
|
|
70393
70390
|
if (!response.ok) return null;
|
|
70394
70391
|
const body = await response.json();
|
|
70395
70392
|
return typeof body.version === "string" ? body.version : null;
|
|
@@ -70397,6 +70394,8 @@ async function fetchLatestNpmVersion(packageName) {
|
|
|
70397
70394
|
return null;
|
|
70398
70395
|
}
|
|
70399
70396
|
}
|
|
70397
|
+
|
|
70398
|
+
// src/app_commands.ts
|
|
70400
70399
|
function orderedLike(value2, template) {
|
|
70401
70400
|
if (Array.isArray(value2)) {
|
|
70402
70401
|
const t = Array.isArray(template) ? template : [];
|
|
@@ -70744,16 +70743,6 @@ function readAppMeta(projectDir) {
|
|
|
70744
70743
|
capabilities: pkg2.lotics.capabilities
|
|
70745
70744
|
};
|
|
70746
70745
|
}
|
|
70747
|
-
var APP_META_KEYS = Object.keys({
|
|
70748
|
-
app_id: true,
|
|
70749
|
-
workspace_id: true,
|
|
70750
|
-
current_version_id: true,
|
|
70751
|
-
version_number: true,
|
|
70752
|
-
workflows: true,
|
|
70753
|
-
queries: true,
|
|
70754
|
-
agents: true,
|
|
70755
|
-
capabilities: true
|
|
70756
|
-
});
|
|
70757
70746
|
function writeAppMeta(projectDir, meta3) {
|
|
70758
70747
|
const pkgPath2 = path7.join(projectDir, "package.json");
|
|
70759
70748
|
const pkg2 = JSON.parse(fs6.readFileSync(pkgPath2, "utf-8"));
|