@leitwerk-dev/process-sdk 0.1.0 → 0.1.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/git-binary.d.ts +4 -3
- package/dist/git-binary.js +25 -33
- package/dist/git-binary.js.map +1 -1
- package/dist/index.d.ts +1066 -35
- package/dist/index.js +4488 -28
- package/dist/index.js.map +1 -1
- package/dist/leaf-outcome-renderer.d.ts +7 -7
- package/dist/leaf-outcome-renderer.js +74 -64
- package/dist/leaf-outcome-renderer.js.map +1 -1
- package/dist/pi-config.d.ts +19 -15
- package/dist/pi-config.js +21 -180
- package/dist/pi-config.js.map +1 -1
- package/dist/review-flow.d.ts +13 -7
- package/dist/review-flow.js +12 -43
- package/dist/review-flow.js.map +1 -1
- package/dist/runtime-internals.d.ts +21 -3
- package/dist/runtime-internals.js +18 -2
- package/dist/runtime-internals.js.map +1 -1
- package/package.json +4 -4
- package/dist/browser-ui-extension.d.ts +0 -27
- package/dist/browser-ui-extension.d.ts.map +0 -1
- package/dist/browser-ui-extension.js +0 -2
- package/dist/browser-ui-extension.js.map +0 -1
- package/dist/capabilities.d.ts +0 -9
- package/dist/capabilities.d.ts.map +0 -1
- package/dist/capabilities.js +0 -7
- package/dist/capabilities.js.map +0 -1
- package/dist/codecs.d.ts +0 -3
- package/dist/codecs.d.ts.map +0 -1
- package/dist/codecs.js +0 -9
- package/dist/codecs.js.map +0 -1
- package/dist/commit-message.d.ts +0 -7
- package/dist/commit-message.d.ts.map +0 -1
- package/dist/commit-message.js +0 -3
- package/dist/commit-message.js.map +0 -1
- package/dist/core-capabilities.d.ts +0 -393
- package/dist/core-capabilities.d.ts.map +0 -1
- package/dist/core-capabilities.js +0 -6
- package/dist/core-capabilities.js.map +0 -1
- package/dist/define-process.d.ts +0 -269
- package/dist/define-process.d.ts.map +0 -1
- package/dist/define-process.js +0 -1040
- package/dist/define-process.js.map +0 -1
- package/dist/event-bus.d.ts +0 -3
- package/dist/event-bus.d.ts.map +0 -1
- package/dist/event-bus.js +0 -31
- package/dist/event-bus.js.map +0 -1
- package/dist/extension-api.d.ts +0 -425
- package/dist/extension-api.d.ts.map +0 -1
- package/dist/extension-api.js +0 -5
- package/dist/extension-api.js.map +0 -1
- package/dist/flow.d.ts +0 -456
- package/dist/flow.d.ts.map +0 -1
- package/dist/flow.js +0 -1557
- package/dist/flow.js.map +0 -1
- package/dist/form-contract.d.ts +0 -2
- package/dist/form-contract.d.ts.map +0 -1
- package/dist/form-contract.js +0 -2
- package/dist/form-contract.js.map +0 -1
- package/dist/fs-utils.d.ts +0 -3
- package/dist/fs-utils.d.ts.map +0 -1
- package/dist/fs-utils.js +0 -23
- package/dist/fs-utils.js.map +0 -1
- package/dist/git-binary.d.ts.map +0 -1
- package/dist/graph-fragments.d.ts +0 -23
- package/dist/graph-fragments.d.ts.map +0 -1
- package/dist/graph-fragments.js +0 -57
- package/dist/graph-fragments.js.map +0 -1
- package/dist/host-capabilities.d.ts +0 -12
- package/dist/host-capabilities.d.ts.map +0 -1
- package/dist/host-capabilities.js +0 -42
- package/dist/host-capabilities.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/launcher-contract.d.ts +0 -2
- package/dist/launcher-contract.d.ts.map +0 -1
- package/dist/launcher-contract.js +0 -2
- package/dist/launcher-contract.js.map +0 -1
- package/dist/leaf-outcome-renderer.d.ts.map +0 -1
- package/dist/leaf-outcomes.d.ts +0 -5
- package/dist/leaf-outcomes.d.ts.map +0 -1
- package/dist/leaf-outcomes.js +0 -52
- package/dist/leaf-outcomes.js.map +0 -1
- package/dist/model-provider.d.ts +0 -210
- package/dist/model-provider.d.ts.map +0 -1
- package/dist/model-provider.js +0 -171
- package/dist/model-provider.js.map +0 -1
- package/dist/pi-config.d.ts.map +0 -1
- package/dist/process-definition-internals.d.ts +0 -7
- package/dist/process-definition-internals.d.ts.map +0 -1
- package/dist/process-definition-internals.js +0 -25
- package/dist/process-definition-internals.js.map +0 -1
- package/dist/process-flow-view.d.ts +0 -20
- package/dist/process-flow-view.d.ts.map +0 -1
- package/dist/process-flow-view.js +0 -418
- package/dist/process-flow-view.js.map +0 -1
- package/dist/process-graph.d.ts +0 -45
- package/dist/process-graph.d.ts.map +0 -1
- package/dist/process-graph.js +0 -213
- package/dist/process-graph.js.map +0 -1
- package/dist/process-launcher-builder.d.ts +0 -9
- package/dist/process-launcher-builder.d.ts.map +0 -1
- package/dist/process-launcher-builder.js +0 -43
- package/dist/process-launcher-builder.js.map +0 -1
- package/dist/process-watcher-builder.d.ts +0 -10
- package/dist/process-watcher-builder.d.ts.map +0 -1
- package/dist/process-watcher-builder.js +0 -40
- package/dist/process-watcher-builder.js.map +0 -1
- package/dist/registry-utils.d.ts +0 -8
- package/dist/registry-utils.d.ts.map +0 -1
- package/dist/registry-utils.js +0 -18
- package/dist/registry-utils.js.map +0 -1
- package/dist/repository-git-env.d.ts +0 -8
- package/dist/repository-git-env.d.ts.map +0 -1
- package/dist/repository-git-env.js +0 -26
- package/dist/repository-git-env.js.map +0 -1
- package/dist/review-flow.d.ts.map +0 -1
- package/dist/runtime-internals.d.ts.map +0 -1
- package/dist/server-events.d.ts +0 -84
- package/dist/server-events.d.ts.map +0 -1
- package/dist/server-events.js +0 -2
- package/dist/server-events.js.map +0 -1
- package/dist/server-process-builder.d.ts +0 -11
- package/dist/server-process-builder.d.ts.map +0 -1
- package/dist/server-process-builder.js +0 -52
- package/dist/server-process-builder.js.map +0 -1
- package/dist/state-helpers.d.ts +0 -9
- package/dist/state-helpers.d.ts.map +0 -1
- package/dist/state-helpers.js +0 -20
- package/dist/state-helpers.js.map +0 -1
- package/dist/subprocess-env.d.ts +0 -12
- package/dist/subprocess-env.d.ts.map +0 -1
- package/dist/subprocess-env.js +0 -34
- package/dist/subprocess-env.js.map +0 -1
- package/dist/tool-renderers.d.ts +0 -10
- package/dist/tool-renderers.d.ts.map +0 -1
- package/dist/tool-renderers.js +0 -63
- package/dist/tool-renderers.js.map +0 -1
- package/dist/turn-semantics.d.ts +0 -22
- package/dist/turn-semantics.d.ts.map +0 -1
- package/dist/turn-semantics.js +0 -339
- package/dist/turn-semantics.js.map +0 -1
- package/dist/types.d.ts +0 -295
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -12
- package/dist/types.js.map +0 -1
- package/dist/ui-process-builder.d.ts +0 -9
- package/dist/ui-process-builder.d.ts.map +0 -1
- package/dist/ui-process-builder.js +0 -30
- package/dist/ui-process-builder.js.map +0 -1
- package/dist/worker-process-builder.d.ts +0 -10
- package/dist/worker-process-builder.d.ts.map +0 -1
- package/dist/worker-process-builder.js +0 -22
- package/dist/worker-process-builder.js.map +0 -1
package/dist/git-binary.d.ts
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* to the bare `"git"` name when no PATH entry matches so spawning still works
|
|
6
6
|
* and surfaces a clear error from the child process itself.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
declare function resolveGitBinary(): string;
|
|
9
9
|
/** Reset the cached resolution. Intended for tests that mutate PATH. */
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
declare function resetGitBinaryCache(): void;
|
|
11
|
+
|
|
12
|
+
export { resetGitBinaryCache, resolveGitBinary };
|
package/dist/git-binary.js
CHANGED
|
@@ -1,38 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* to the bare `"git"` name when no PATH entry matches so spawning still works
|
|
14
|
-
* and surfaces a clear error from the child process itself.
|
|
15
|
-
*/
|
|
16
|
-
export function resolveGitBinary() {
|
|
17
|
-
if (cachedGitBinary) {
|
|
18
|
-
return cachedGitBinary;
|
|
1
|
+
// src/git-binary.ts
|
|
2
|
+
import { existsSync } from "fs";
|
|
3
|
+
import { delimiter, join } from "path";
|
|
4
|
+
var cachedGitBinary = null;
|
|
5
|
+
function resolveGitBinary() {
|
|
6
|
+
if (cachedGitBinary) {
|
|
7
|
+
return cachedGitBinary;
|
|
8
|
+
}
|
|
9
|
+
const pathValue = process.env.PATH ?? "";
|
|
10
|
+
for (const dir of pathValue.split(delimiter)) {
|
|
11
|
+
if (!dir) {
|
|
12
|
+
continue;
|
|
19
13
|
}
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
const candidate = join(dir, "git");
|
|
26
|
-
if (existsSync(candidate)) {
|
|
27
|
-
cachedGitBinary = candidate;
|
|
28
|
-
return candidate;
|
|
29
|
-
}
|
|
14
|
+
const candidate = join(dir, "git");
|
|
15
|
+
if (existsSync(candidate)) {
|
|
16
|
+
cachedGitBinary = candidate;
|
|
17
|
+
return candidate;
|
|
30
18
|
}
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
}
|
|
20
|
+
cachedGitBinary = "git";
|
|
21
|
+
return cachedGitBinary;
|
|
33
22
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
cachedGitBinary = null;
|
|
23
|
+
function resetGitBinaryCache() {
|
|
24
|
+
cachedGitBinary = null;
|
|
37
25
|
}
|
|
26
|
+
export {
|
|
27
|
+
resetGitBinaryCache,
|
|
28
|
+
resolveGitBinary
|
|
29
|
+
};
|
|
38
30
|
//# sourceMappingURL=git-binary.js.map
|
package/dist/git-binary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/git-binary.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport { delimiter, join } from \"node:path\";\n\n// Resolving a bare \"git\" through child_process forces Node to stat every PATH\n// entry on each spawn. On developer machines with long PATHs that is ~60ms per\n// call, which dominates git-heavy code paths and tests that fan out into dozens\n// of subprocesses. Resolve the absolute path once and reuse it so each spawn\n// skips the PATH search.\nlet cachedGitBinary: string | null = null;\n\n/**\n * Resolve the absolute path to the `git` executable once and cache it.\n *\n * POSIX-only by design (matching the leitwerk platform target). Falls back\n * to the bare `\"git\"` name when no PATH entry matches so spawning still works\n * and surfaces a clear error from the child process itself.\n */\nexport function resolveGitBinary(): string {\n\tif (cachedGitBinary) {\n\t\treturn cachedGitBinary;\n\t}\n\tconst pathValue = process.env.PATH ?? \"\";\n\tfor (const dir of pathValue.split(delimiter)) {\n\t\tif (!dir) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst candidate = join(dir, \"git\");\n\t\tif (existsSync(candidate)) {\n\t\t\tcachedGitBinary = candidate;\n\t\t\treturn candidate;\n\t\t}\n\t}\n\tcachedGitBinary = \"git\";\n\treturn cachedGitBinary;\n}\n\n/** Reset the cached resolution. Intended for tests that mutate PATH. */\nexport function resetGitBinaryCache(): void {\n\tcachedGitBinary = null;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB;AAC3B,SAAS,WAAW,YAAY;AAOhC,IAAI,kBAAiC;AAS9B,SAAS,mBAA2B;AAC1C,MAAI,iBAAiB;AACpB,WAAO;AAAA,EACR;AACA,QAAM,YAAY,QAAQ,IAAI,QAAQ;AACtC,aAAW,OAAO,UAAU,MAAM,SAAS,GAAG;AAC7C,QAAI,CAAC,KAAK;AACT;AAAA,IACD;AACA,UAAM,YAAY,KAAK,KAAK,KAAK;AACjC,QAAI,WAAW,SAAS,GAAG;AAC1B,wBAAkB;AAClB,aAAO;AAAA,IACR;AAAA,EACD;AACA,oBAAkB;AAClB,SAAO;AACR;AAGO,SAAS,sBAA4B;AAC3C,oBAAkB;AACnB;","names":[]}
|