dirac-lang 0.1.42 → 0.1.43
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/{chunk-2J7FVKXI.js → chunk-BN7IKYVP.js} +16 -12
- package/dist/{chunk-CRT4U2QX.js → chunk-G5UIFJ5I.js} +1 -1
- package/dist/cli.js +3 -3
- package/dist/index.js +2 -2
- package/dist/{interpreter-U74XE6FV.js → interpreter-7N52YTBH.js} +1 -1
- package/dist/{schedule-H4R2Z65R.js → schedule-CROFBEVH.js} +1 -1
- package/dist/{shell-VHD65GUJ.js → shell-HPRM7WFE.js} +5 -5
- package/dist/test-runner.js +1 -1
- package/package.json +1 -1
|
@@ -448,12 +448,12 @@ async function executeIf(session, element) {
|
|
|
448
448
|
const condition = await evaluatePredicate(session, conditionElement);
|
|
449
449
|
if (condition) {
|
|
450
450
|
if (thenElement) {
|
|
451
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
451
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-7N52YTBH.js");
|
|
452
452
|
await integrateChildren2(session, thenElement);
|
|
453
453
|
}
|
|
454
454
|
} else {
|
|
455
455
|
if (elseElement) {
|
|
456
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
456
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-7N52YTBH.js");
|
|
457
457
|
await integrateChildren2(session, elseElement);
|
|
458
458
|
}
|
|
459
459
|
}
|
|
@@ -466,7 +466,7 @@ async function evaluatePredicate(session, predicateElement) {
|
|
|
466
466
|
return await evaluateCondition(session, predicateElement);
|
|
467
467
|
}
|
|
468
468
|
const outputLengthBefore = session.output.length;
|
|
469
|
-
const { integrate: integrate2 } = await import("./interpreter-
|
|
469
|
+
const { integrate: integrate2 } = await import("./interpreter-7N52YTBH.js");
|
|
470
470
|
await integrate2(session, predicateElement);
|
|
471
471
|
const newOutputChunks = session.output.slice(outputLengthBefore);
|
|
472
472
|
const result = newOutputChunks.join("").trim();
|
|
@@ -489,11 +489,11 @@ async function evaluateCondition(session, condElement) {
|
|
|
489
489
|
}
|
|
490
490
|
const outputLengthBefore = session.output.length;
|
|
491
491
|
const args = [];
|
|
492
|
-
const { integrate: integrate2 } = await import("./interpreter-
|
|
492
|
+
const { integrate: integrate2 } = await import("./interpreter-7N52YTBH.js");
|
|
493
493
|
for (const child of condElement.children) {
|
|
494
494
|
if (child.tag.toLowerCase() === "arg") {
|
|
495
495
|
const argOutputStart = session.output.length;
|
|
496
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
496
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-7N52YTBH.js");
|
|
497
497
|
await integrateChildren2(session, child);
|
|
498
498
|
const newChunks = session.output.slice(argOutputStart);
|
|
499
499
|
const argValue = newChunks.join("");
|
|
@@ -1154,6 +1154,10 @@ async function executeExpr(session, element) {
|
|
|
1154
1154
|
case "strcmp":
|
|
1155
1155
|
result = stringArgs.length >= 2 ? stringArgs[0] === stringArgs[1] : false;
|
|
1156
1156
|
break;
|
|
1157
|
+
case "contains":
|
|
1158
|
+
case "includes":
|
|
1159
|
+
result = stringArgs.length >= 2 ? stringArgs[0].includes(stringArgs[1]) : false;
|
|
1160
|
+
break;
|
|
1157
1161
|
default:
|
|
1158
1162
|
throw new Error(`<expr> unknown operation: ${op}`);
|
|
1159
1163
|
}
|
|
@@ -1378,7 +1382,7 @@ async function executeTagCheck(session, element) {
|
|
|
1378
1382
|
const executeTag = correctedTag || tagName;
|
|
1379
1383
|
console.error(`[tag-check] Executing <${executeTag}/> as all checks passed and execute=true.`);
|
|
1380
1384
|
const elementToExecute = correctedTag ? { ...child, tag: correctedTag } : child;
|
|
1381
|
-
const { integrate: integrate2 } = await import("./interpreter-
|
|
1385
|
+
const { integrate: integrate2 } = await import("./interpreter-7N52YTBH.js");
|
|
1382
1386
|
await integrate2(session, elementToExecute);
|
|
1383
1387
|
}
|
|
1384
1388
|
}
|
|
@@ -1387,7 +1391,7 @@ async function executeTagCheck(session, element) {
|
|
|
1387
1391
|
// src/tags/throw.ts
|
|
1388
1392
|
async function executeThrow(session, element) {
|
|
1389
1393
|
const exceptionName = element.attributes?.name || "exception";
|
|
1390
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
1394
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-7N52YTBH.js");
|
|
1391
1395
|
const exceptionDom = {
|
|
1392
1396
|
tag: "exception-content",
|
|
1393
1397
|
attributes: { name: exceptionName },
|
|
@@ -1400,7 +1404,7 @@ async function executeThrow(session, element) {
|
|
|
1400
1404
|
// src/tags/try.ts
|
|
1401
1405
|
async function executeTry(session, element) {
|
|
1402
1406
|
setExceptionBoundary(session);
|
|
1403
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
1407
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-7N52YTBH.js");
|
|
1404
1408
|
await integrateChildren2(session, element);
|
|
1405
1409
|
unsetExceptionBoundary(session);
|
|
1406
1410
|
}
|
|
@@ -1410,7 +1414,7 @@ async function executeCatch(session, element) {
|
|
|
1410
1414
|
const exceptionName = element.attributes?.name || "exception";
|
|
1411
1415
|
const caughtCount = lookupException(session, exceptionName);
|
|
1412
1416
|
if (caughtCount > 0) {
|
|
1413
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
1417
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-7N52YTBH.js");
|
|
1414
1418
|
await integrateChildren2(session, element);
|
|
1415
1419
|
}
|
|
1416
1420
|
flushCurrentException(session);
|
|
@@ -1419,7 +1423,7 @@ async function executeCatch(session, element) {
|
|
|
1419
1423
|
// src/tags/exception.ts
|
|
1420
1424
|
async function executeException(session, element) {
|
|
1421
1425
|
const exceptions = getCurrentExceptions(session);
|
|
1422
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
1426
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-7N52YTBH.js");
|
|
1423
1427
|
for (const exceptionDom of exceptions) {
|
|
1424
1428
|
await integrateChildren2(session, exceptionDom);
|
|
1425
1429
|
}
|
|
@@ -1882,7 +1886,7 @@ async function executeLoadContext(session, element) {
|
|
|
1882
1886
|
query = element.text.trim();
|
|
1883
1887
|
}
|
|
1884
1888
|
if (!query && element.children.length > 0) {
|
|
1885
|
-
const { integrate: integrate2 } = await import("./interpreter-
|
|
1889
|
+
const { integrate: integrate2 } = await import("./interpreter-7N52YTBH.js");
|
|
1886
1890
|
const beforeOutput = session.output.length;
|
|
1887
1891
|
for (const child of element.children) {
|
|
1888
1892
|
await integrate2(session, child);
|
|
@@ -2121,7 +2125,7 @@ async function executeForeach(session, element) {
|
|
|
2121
2125
|
const parser2 = new DiracParser2();
|
|
2122
2126
|
try {
|
|
2123
2127
|
const fromElement = parser2.parse(fromAttr);
|
|
2124
|
-
const { integrate: integrate2 } = await import("./interpreter-
|
|
2128
|
+
const { integrate: integrate2 } = await import("./interpreter-7N52YTBH.js");
|
|
2125
2129
|
await integrate2(session, fromElement);
|
|
2126
2130
|
} catch (e) {
|
|
2127
2131
|
session.output = savedOutput;
|
package/dist/cli.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "./chunk-UEFKQRYN.js";
|
|
5
5
|
import {
|
|
6
6
|
execute
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-G5UIFJ5I.js";
|
|
8
|
+
import "./chunk-BN7IKYVP.js";
|
|
9
9
|
import "./chunk-HRHAMPOB.js";
|
|
10
10
|
import "./chunk-4QLTSCDG.js";
|
|
11
11
|
import "./chunk-GLXVY235.js";
|
|
@@ -96,7 +96,7 @@ async function main() {
|
|
|
96
96
|
process.exit(0);
|
|
97
97
|
}
|
|
98
98
|
if (args[0] === "shell") {
|
|
99
|
-
const { DiracShell } = await import("./shell-
|
|
99
|
+
const { DiracShell } = await import("./shell-HPRM7WFE.js");
|
|
100
100
|
const shellConfig = { debug: false };
|
|
101
101
|
for (let i = 1; i < args.length; i++) {
|
|
102
102
|
const arg = args[i];
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
createLLMAdapter,
|
|
3
3
|
execute,
|
|
4
4
|
executeUserCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G5UIFJ5I.js";
|
|
6
6
|
import {
|
|
7
7
|
integrate
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BN7IKYVP.js";
|
|
9
9
|
import {
|
|
10
10
|
DiracParser
|
|
11
11
|
} from "./chunk-HRHAMPOB.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-UEFKQRYN.js";
|
|
5
5
|
import {
|
|
6
6
|
integrate
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BN7IKYVP.js";
|
|
8
8
|
import {
|
|
9
9
|
DiracParser
|
|
10
10
|
} from "./chunk-HRHAMPOB.js";
|
|
@@ -66,7 +66,7 @@ var DiracShell = class {
|
|
|
66
66
|
});
|
|
67
67
|
this.rl.on("close", () => {
|
|
68
68
|
this.saveHistory();
|
|
69
|
-
import("./schedule-
|
|
69
|
+
import("./schedule-CROFBEVH.js").then(({ stopAllScheduledTasks }) => {
|
|
70
70
|
stopAllScheduledTasks();
|
|
71
71
|
console.log("\nGoodbye!");
|
|
72
72
|
process.exit(0);
|
|
@@ -366,7 +366,7 @@ Examples:
|
|
|
366
366
|
break;
|
|
367
367
|
case "tasks":
|
|
368
368
|
try {
|
|
369
|
-
const { listScheduledTasks } = await import("./schedule-
|
|
369
|
+
const { listScheduledTasks } = await import("./schedule-CROFBEVH.js");
|
|
370
370
|
const tasks = listScheduledTasks();
|
|
371
371
|
if (tasks.length === 0) {
|
|
372
372
|
console.log("No scheduled tasks running.");
|
|
@@ -385,7 +385,7 @@ Examples:
|
|
|
385
385
|
console.log("Usage: :stop <task-name>");
|
|
386
386
|
} else {
|
|
387
387
|
try {
|
|
388
|
-
const { stopScheduledTask } = await import("./schedule-
|
|
388
|
+
const { stopScheduledTask } = await import("./schedule-CROFBEVH.js");
|
|
389
389
|
const taskName = args[0];
|
|
390
390
|
const stopped = stopScheduledTask(taskName);
|
|
391
391
|
if (stopped) {
|
|
@@ -400,7 +400,7 @@ Examples:
|
|
|
400
400
|
break;
|
|
401
401
|
case "stopall":
|
|
402
402
|
try {
|
|
403
|
-
const { stopAllScheduledTasks } = await import("./schedule-
|
|
403
|
+
const { stopAllScheduledTasks } = await import("./schedule-CROFBEVH.js");
|
|
404
404
|
stopAllScheduledTasks();
|
|
405
405
|
console.log("All scheduled tasks stopped.");
|
|
406
406
|
} catch (error) {
|
package/dist/test-runner.js
CHANGED