@kici-dev/compiler 0.1.17 → 0.1.19
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 +1 -1
- package/dist/commands/compile.js +14 -14
- package/dist/commands/test.js +3 -5
- package/dist/llm-context/llms-full.txt +419 -1063
- package/dist/llm-context/llms.txt +2 -1
- package/dist/local-executor/job-runner.js +3 -2
- package/dist/local-executor/runs-on-display.d.ts +9 -0
- package/dist/local-executor/runs-on-display.js +23 -0
- package/dist/lockfile/generator.d.ts +2 -0
- package/dist/lockfile/generator.js +39 -22
- package/dist/templates/package-json.js +1 -1
- package/dist/test-runner/job-executor.js +2 -1
- package/dist/types.d.ts +22 -4
- package/package.json +10 -10
- package/sbom.spdx.json +440 -415
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import { resolve } from "node:path";
|
|
|
6
6
|
import { Argument, Command, Option } from "commander";
|
|
7
7
|
import pc from "picocolors";
|
|
8
8
|
//#region src/cli.ts
|
|
9
|
-
const version = "0.1.
|
|
9
|
+
const version = "0.1.19";
|
|
10
10
|
/**
|
|
11
11
|
* Build the kici Commander program with every command registered. Exported so
|
|
12
12
|
* the surface registry can walk the real command tree without parsing argv (no
|
package/dist/commands/compile.js
CHANGED
|
@@ -12,6 +12,7 @@ import pc from "picocolors";
|
|
|
12
12
|
import { existsSync } from "node:fs";
|
|
13
13
|
import fs from "node:fs/promises";
|
|
14
14
|
import { logger, toErrorMessage } from "@kici-dev/core";
|
|
15
|
+
import { PackageManager, detectPackageManagerSync } from "@kici-dev/core/package-manager";
|
|
15
16
|
import { execSync } from "node:child_process";
|
|
16
17
|
//#region src/commands/compile.ts
|
|
17
18
|
/**
|
|
@@ -26,22 +27,21 @@ async function readExistingLockfileHash(lockPath) {
|
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
|
-
* Reinstall dependencies in .kici/ using
|
|
30
|
+
* Reinstall dependencies in .kici/ using the project's package manager.
|
|
31
|
+
*
|
|
32
|
+
* Detects the manager from `.kici/` (pnpm-lock.yaml / yarn.lock /
|
|
33
|
+
* package-lock.json) so a standalone-pnpm or -yarn `.kici` is reinstalled with
|
|
34
|
+
* the right tool — running `npm ci` against a pnpm lock fails, and against a
|
|
35
|
+
* stale npm lock left beside a pnpm lock it fails even harder.
|
|
30
36
|
*/
|
|
31
37
|
async function reinstallDeps(kiciDir) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
logger.info("Running " + pc.cyan("npm install") + ` in ${kiciDir}`);
|
|
40
|
-
execSync("npm install", {
|
|
41
|
-
cwd: kiciDir,
|
|
42
|
-
stdio: "inherit"
|
|
43
|
-
});
|
|
44
|
-
}
|
|
38
|
+
const pm = detectPackageManagerSync(kiciDir);
|
|
39
|
+
const command = pm === PackageManager.Pnpm ? "pnpm install" : pm === PackageManager.Yarn ? "yarn install" : existsSync(path.join(kiciDir, "package-lock.json")) ? "npm ci" : "npm install";
|
|
40
|
+
logger.info("Running " + pc.cyan(command) + ` in ${kiciDir}`);
|
|
41
|
+
execSync(command, {
|
|
42
|
+
cwd: kiciDir,
|
|
43
|
+
stdio: "inherit"
|
|
44
|
+
});
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* Execute the compile command.
|
package/dist/commands/test.js
CHANGED
|
@@ -10,7 +10,8 @@ import path from "node:path";
|
|
|
10
10
|
import pc from "picocolors";
|
|
11
11
|
import { readFile } from "node:fs/promises";
|
|
12
12
|
import { logger, toErrorMessage } from "@kici-dev/core";
|
|
13
|
-
import { matchAllWorkflows
|
|
13
|
+
import { matchAllWorkflows } from "@kici-dev/engine";
|
|
14
|
+
import { normalizeRunsOnToMatchers } from "@kici-dev/engine/labels/compile";
|
|
14
15
|
//#region src/commands/test.ts
|
|
15
16
|
/**
|
|
16
17
|
* Main test command entry point.
|
|
@@ -136,10 +137,7 @@ function workflowsToLockFormat(workflows) {
|
|
|
136
137
|
return {
|
|
137
138
|
_type: "static",
|
|
138
139
|
name: j.name,
|
|
139
|
-
runsOn:
|
|
140
|
-
const n = normalizeRunsOn(j.runsOn);
|
|
141
|
-
return n.labels.length === 1 ? n.labels[0] : n.labels;
|
|
142
|
-
})(),
|
|
140
|
+
runsOn: j.runsOn === void 0 ? [] : normalizeRunsOnToMatchers(j.runsOn, `job '${j.name}' runsOn`).include,
|
|
143
141
|
needs: j.needs?.map((n) => {
|
|
144
142
|
if (typeof n === "string") return n;
|
|
145
143
|
if ("name" in n) return n.name;
|