codebuff 1.0.270 → 1.0.272
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-handlers/api-key.d.ts +1 -1
- package/dist/cli-handlers/api-key.js +1 -1
- package/dist/cli-handlers/api-key.js.map +1 -1
- package/dist/cli.d.ts +1 -6
- package/dist/cli.js +7 -60
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +0 -1
- package/dist/client.js +0 -3
- package/dist/client.js.map +1 -1
- package/dist/code-map/languages.d.ts +2 -1
- package/dist/code-map/languages.d.ts.map +1 -1
- package/dist/code-map/languages.js +1 -2
- package/dist/code-map/languages.js.map +1 -1
- package/dist/code-map/parse.d.ts +4 -14
- package/dist/code-map/parse.d.ts.map +1 -1
- package/dist/code-map/parse.js +38 -91
- package/dist/code-map/parse.js.map +1 -1
- package/dist/code-map/tree-sitter-queries/tree-sitter-c-tags.scm +1 -6
- package/dist/code-map/tree-sitter-queries/tree-sitter-c_sharp-tags.scm +1 -11
- package/dist/code-map/tree-sitter-queries/tree-sitter-cpp-tags.scm +1 -13
- package/dist/code-map/tree-sitter-queries/tree-sitter-javascript-tags.scm +0 -1
- package/dist/code-map/tree-sitter-queries/tree-sitter-php-tags.scm +8 -5
- package/dist/code-map/tree-sitter-queries/tree-sitter-python-tags.scm +2 -5
- package/dist/code-map/tree-sitter-queries/tree-sitter-typescript-tags.scm +0 -7
- package/dist/code-map/tsconfig.tsbuildinfo +1 -1
- package/dist/common/actions.d.ts +32 -58
- package/dist/common/constants.d.ts +1 -1
- package/dist/common/constants.js +7 -18
- package/dist/common/constants.js.map +1 -1
- package/dist/common/types/agent-state.d.ts +8 -13
- package/dist/common/types/message.d.ts +6 -6
- package/dist/common/util/__tests__/saxy.test.js +11 -137
- package/dist/common/util/__tests__/saxy.test.js.map +1 -1
- package/dist/common/util/credentials.d.ts +2 -2
- package/dist/common/util/file.d.ts +0 -3
- package/dist/common/util/file.js +0 -3
- package/dist/common/util/file.js.map +1 -1
- package/dist/common/util/saxy.d.ts +0 -1
- package/dist/common/util/saxy.js +10 -42
- package/dist/common/util/saxy.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +68 -118
- package/dist/display.d.ts +0 -2
- package/dist/display.js +0 -8
- package/dist/display.js.map +1 -1
- package/dist/index.js +39 -5
- package/dist/index.js.map +1 -1
- package/dist/menu.js +106 -35
- package/dist/menu.js.map +1 -1
- package/dist/project-files.d.ts +0 -2
- package/dist/project-files.js +2 -3
- package/dist/project-files.js.map +1 -1
- package/dist/utils/__tests__/tool-renderers.test.js +1 -27
- package/dist/utils/__tests__/tool-renderers.test.js.map +1 -1
- package/dist/utils/__tests__/xml-stream-parser.test.js +0 -26
- package/dist/utils/__tests__/xml-stream-parser.test.js.map +1 -1
- package/dist/utils/detect-shell.js +1 -1
- package/dist/utils/detect-shell.js.map +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/logger.js +6 -3
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/spinner.d.ts +0 -1
- package/dist/utils/spinner.js +1 -8
- package/dist/utils/spinner.js.map +1 -1
- package/dist/utils/system-info.js +2 -2
- package/dist/utils/system-info.js.map +1 -1
- package/dist/utils/terminal.d.ts +2 -2
- package/dist/utils/terminal.js +34 -46
- package/dist/utils/terminal.js.map +1 -1
- package/dist/utils/tool-renderers.js +5 -22
- package/dist/utils/tool-renderers.js.map +1 -1
- package/dist/utils/xml-stream-parser.js.map +1 -1
- package/dist/workers/project-context.js +1 -4
- package/dist/workers/project-context.js.map +1 -1
- package/package.json +1 -3
- package/dist/common/json-config/__tests__/__snapshots__/stringify-schema.test.js.snap +0 -119
- package/dist/common/util/process-stream.d.ts +0 -7
- package/dist/common/util/process-stream.js +0 -162
- package/dist/common/util/process-stream.js.map +0 -1
- package/dist/utils/__tests__/__snapshots__/background-process-manager.test.js.snap +0 -137
- package/dist/utils/__tests__/file-paths.test.d.ts +0 -1
- package/dist/utils/__tests__/file-paths.test.js +0 -37
- package/dist/utils/__tests__/file-paths.test.js.map +0 -1
- package/dist/utils/__tests__/path.test.d.ts +0 -1
- package/dist/utils/__tests__/path.test.js +0 -37
- package/dist/utils/__tests__/path.test.js.map +0 -1
- package/dist/utils/file-paths.d.ts +0 -9
- package/dist/utils/file-paths.js +0 -24
- package/dist/utils/file-paths.js.map +0 -1
- package/dist/utils/path.d.ts +0 -9
- package/dist/utils/path.js +0 -27
- package/dist/utils/path.js.map +0 -1
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
// Bun Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`stringifySchema should correctly stringify StartupProcessSchema 1`] = `
|
|
4
|
-
"// Defines a single startup process.
|
|
5
|
-
{
|
|
6
|
-
// A user-friendly name for the process. Should be one word and unique.
|
|
7
|
-
"name": string,
|
|
8
|
-
|
|
9
|
-
// The actual shell command to execute.
|
|
10
|
-
"command": string,
|
|
11
|
-
|
|
12
|
-
// (optional): The working directory from which to run the command.
|
|
13
|
-
"cwd": string | undefined,
|
|
14
|
-
|
|
15
|
-
// (optional): Whether this process should be run, default: true
|
|
16
|
-
"enabled": boolean | undefined,
|
|
17
|
-
|
|
18
|
-
// (optional): Path to write the process's stdout. If not specified, stderr is not stored.
|
|
19
|
-
"stdoutFile": string | undefined,
|
|
20
|
-
|
|
21
|
-
// (optional): Path to write the process's stderr. If not specified, stderr will be put into the stdoutFile.
|
|
22
|
-
"stderrFile": string | undefined
|
|
23
|
-
}"
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
exports[`stringifySchema should correctly stringify CodebuffConfigSchema 1`] = `
|
|
27
|
-
"// Defines the overall Codebuff configuration file (e.g., codebuff.json). This schema defines the top-level structure of the configuration.
|
|
28
|
-
{
|
|
29
|
-
// (optional): Does nothing. Put any thing you want here!
|
|
30
|
-
"description": any | undefined,
|
|
31
|
-
|
|
32
|
-
// (optional): An array of startup processes.
|
|
33
|
-
"startupProcesses": [
|
|
34
|
-
|
|
35
|
-
// Defines a single startup process.
|
|
36
|
-
{
|
|
37
|
-
// A user-friendly name for the process. Should be one word and unique.
|
|
38
|
-
"name": string,
|
|
39
|
-
|
|
40
|
-
// The actual shell command to execute.
|
|
41
|
-
"command": string,
|
|
42
|
-
|
|
43
|
-
// (optional): The working directory from which to run the command.
|
|
44
|
-
"cwd": string | undefined,
|
|
45
|
-
|
|
46
|
-
// (optional): Whether this process should be run, default: true
|
|
47
|
-
"enabled": boolean | undefined,
|
|
48
|
-
|
|
49
|
-
// (optional): Path to write the process's stdout. If not specified, stderr is not stored.
|
|
50
|
-
"stdoutFile": string | undefined,
|
|
51
|
-
|
|
52
|
-
// (optional): Path to write the process's stderr. If not specified, stderr will be put into the stdoutFile.
|
|
53
|
-
"stderrFile": string | undefined
|
|
54
|
-
}
|
|
55
|
-
] | undefined
|
|
56
|
-
}"
|
|
57
|
-
`;
|
|
58
|
-
|
|
59
|
-
exports[`stringifySchema should handle a more complex schema 1`] = `
|
|
60
|
-
"// A complex test schema
|
|
61
|
-
{
|
|
62
|
-
// Unique identifier
|
|
63
|
-
"id": string,
|
|
64
|
-
|
|
65
|
-
// A positive integer count
|
|
66
|
-
"count": number,
|
|
67
|
-
|
|
68
|
-
// Activity status
|
|
69
|
-
"isActive": boolean,
|
|
70
|
-
|
|
71
|
-
// (optional): Optional list of tags
|
|
72
|
-
"tags": [
|
|
73
|
-
|
|
74
|
-
string
|
|
75
|
-
] | undefined,
|
|
76
|
-
|
|
77
|
-
// A nested object structure
|
|
78
|
-
"nested": {
|
|
79
|
-
"value": string,
|
|
80
|
-
|
|
81
|
-
// Nested configuration
|
|
82
|
-
"config": {
|
|
83
|
-
// (optional): Number of retries, default: 3
|
|
84
|
-
"retries": number
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}"
|
|
88
|
-
`;
|
|
89
|
-
|
|
90
|
-
exports[`stringifySchema should handle an empty object schema 1`] = `
|
|
91
|
-
"// An empty schema
|
|
92
|
-
{
|
|
93
|
-
}"
|
|
94
|
-
`;
|
|
95
|
-
|
|
96
|
-
exports[`stringifySchema should handle schema with only optional fields 1`] = `
|
|
97
|
-
"// Schema with only optional fields
|
|
98
|
-
{
|
|
99
|
-
// (optional): Optional field 1
|
|
100
|
-
"field1": string | undefined,
|
|
101
|
-
|
|
102
|
-
// (optional): Optional field 2
|
|
103
|
-
"field2": number | undefined
|
|
104
|
-
}"
|
|
105
|
-
`;
|
|
106
|
-
|
|
107
|
-
exports[`stringifySchema should handle schema with default values 1`] = `
|
|
108
|
-
"// Schema demonstrating default values
|
|
109
|
-
{
|
|
110
|
-
// (optional): Name with default, default: "anonymous"
|
|
111
|
-
"name": string,
|
|
112
|
-
|
|
113
|
-
// (optional): Level with default, default: 1
|
|
114
|
-
"level": number,
|
|
115
|
-
|
|
116
|
-
// (optional): Enabled with default, default: false
|
|
117
|
-
"enabled": boolean
|
|
118
|
-
}"
|
|
119
|
-
`;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare function processStreamWithTags<T extends string>(stream: AsyncGenerator<T>, tags: {
|
|
2
|
-
[tagName: string]: {
|
|
3
|
-
attributeNames: string[];
|
|
4
|
-
onTagStart: (attributes: Record<string, string>) => void;
|
|
5
|
-
onTagEnd: (content: string, attributes: Record<string, string>) => boolean;
|
|
6
|
-
};
|
|
7
|
-
}): AsyncGenerator<string, void, unknown>;
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.processStreamWithTags = processStreamWithTags;
|
|
4
|
-
const saxy_1 = require("./saxy");
|
|
5
|
-
async function* processStreamWithTags(stream, tags) {
|
|
6
|
-
const saxyParser = new saxy_1.Saxy();
|
|
7
|
-
let currentTagName = null;
|
|
8
|
-
let currentTagAttributes = {};
|
|
9
|
-
let currentTagContentBuffer = '';
|
|
10
|
-
let shouldStopProcessing = false;
|
|
11
|
-
const outputQueue = [];
|
|
12
|
-
const enqueueOutput = (str) => {
|
|
13
|
-
if (str) {
|
|
14
|
-
// Only enqueue non-empty strings
|
|
15
|
-
outputQueue.push(str);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
saxyParser.on('tagopen', (node) => {
|
|
19
|
-
if (shouldStopProcessing)
|
|
20
|
-
return;
|
|
21
|
-
if (currentTagName === null) {
|
|
22
|
-
// Not currently inside a tracked tag
|
|
23
|
-
if (tags[node.name]) {
|
|
24
|
-
// This is a tag we want to track
|
|
25
|
-
currentTagName = node.name;
|
|
26
|
-
try {
|
|
27
|
-
currentTagAttributes = saxy_1.Saxy.parseAttrs(node.attrs);
|
|
28
|
-
}
|
|
29
|
-
catch (e) {
|
|
30
|
-
// If attributes are malformed, default to empty or handle as error
|
|
31
|
-
// console.error(`Error parsing attributes for tag ${node.name}: "${node.attrs}"`, e);
|
|
32
|
-
currentTagAttributes = {}; // Default to empty attributes on parsing error
|
|
33
|
-
}
|
|
34
|
-
tags[currentTagName].onTagStart(currentTagAttributes);
|
|
35
|
-
currentTagContentBuffer = '';
|
|
36
|
-
if (node.isSelfClosing) {
|
|
37
|
-
const stop = tags[currentTagName].onTagEnd(currentTagContentBuffer, currentTagAttributes);
|
|
38
|
-
currentTagName = null;
|
|
39
|
-
currentTagAttributes = {};
|
|
40
|
-
if (stop) {
|
|
41
|
-
shouldStopProcessing = true;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
// A non-tracked tag, pass it through
|
|
47
|
-
enqueueOutput(`<${node.name}${node.attrs ? ' ' + node.attrs : ''}${node.isSelfClosing ? ' /' : ''}>`);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
// Inside a tracked tag, so this is nested content
|
|
52
|
-
currentTagContentBuffer += `<${node.name}${node.attrs ? ' ' + node.attrs : ''}${node.isSelfClosing ? ' /' : ''}>`;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
saxyParser.on('text', (node) => {
|
|
56
|
-
if (shouldStopProcessing)
|
|
57
|
-
return;
|
|
58
|
-
if (currentTagName !== null) {
|
|
59
|
-
currentTagContentBuffer += node.contents;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
enqueueOutput(node.contents);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
saxyParser.on('tagclose', (node) => {
|
|
66
|
-
if (shouldStopProcessing)
|
|
67
|
-
return;
|
|
68
|
-
if (currentTagName === node.name) {
|
|
69
|
-
const stop = tags[currentTagName].onTagEnd(currentTagContentBuffer, currentTagAttributes);
|
|
70
|
-
currentTagName = null;
|
|
71
|
-
currentTagAttributes = {};
|
|
72
|
-
currentTagContentBuffer = '';
|
|
73
|
-
if (stop) {
|
|
74
|
-
shouldStopProcessing = true;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
else if (currentTagName !== null) {
|
|
78
|
-
// Closing a nested tag inside a tracked tag
|
|
79
|
-
currentTagContentBuffer += `</${node.name}>`;
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
// Closing a non-tracked tag, pass it through
|
|
83
|
-
enqueueOutput(`</${node.name}>`);
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
saxyParser.on('cdata', (node) => {
|
|
87
|
-
if (shouldStopProcessing)
|
|
88
|
-
return;
|
|
89
|
-
const cdataStr = `<![CDATA[${node.contents}]]>`;
|
|
90
|
-
if (currentTagName !== null) {
|
|
91
|
-
currentTagContentBuffer += cdataStr;
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
enqueueOutput(cdataStr);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
saxyParser.on('comment', (node) => {
|
|
98
|
-
if (shouldStopProcessing)
|
|
99
|
-
return;
|
|
100
|
-
const commentStr = `<!--${node.contents}-->`;
|
|
101
|
-
if (currentTagName !== null) {
|
|
102
|
-
currentTagContentBuffer += commentStr;
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
enqueueOutput(commentStr);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
saxyParser.on('processinginstruction', (node) => {
|
|
109
|
-
if (shouldStopProcessing)
|
|
110
|
-
return;
|
|
111
|
-
const piStr = `<?${node.contents}?>`;
|
|
112
|
-
if (currentTagName !== null) {
|
|
113
|
-
currentTagContentBuffer += piStr;
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
enqueueOutput(piStr);
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
saxyParser.on('error', (err) => {
|
|
120
|
-
// Saxy might emit 'error' for issues not causing write/end to throw.
|
|
121
|
-
// This flag helps stop processing in such cases.
|
|
122
|
-
// console.error("Saxy parser emitted an error:", err);
|
|
123
|
-
shouldStopProcessing = true;
|
|
124
|
-
// The error might need to be explicitly thrown here if it's critical
|
|
125
|
-
// and not otherwise surfaced to the generator's caller.
|
|
126
|
-
// For now, this ensures processing stops.
|
|
127
|
-
});
|
|
128
|
-
try {
|
|
129
|
-
for await (const chunk of stream) {
|
|
130
|
-
if (shouldStopProcessing)
|
|
131
|
-
break;
|
|
132
|
-
saxyParser.write(chunk); // Saxy events fill outputQueue
|
|
133
|
-
while (outputQueue.length > 0) {
|
|
134
|
-
// If stopping and not inside a tracked tag, clear queue to prevent further passthrough.
|
|
135
|
-
if (shouldStopProcessing && currentTagName === null) {
|
|
136
|
-
outputQueue.length = 0;
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
yield outputQueue.shift();
|
|
140
|
-
}
|
|
141
|
-
// Re-check stop condition after yielding, as an event during write might have set it.
|
|
142
|
-
if (shouldStopProcessing)
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
if (!shouldStopProcessing) {
|
|
146
|
-
saxyParser.end(); // Finalize parsing
|
|
147
|
-
while (outputQueue.length > 0) {
|
|
148
|
-
if (shouldStopProcessing && currentTagName === null) {
|
|
149
|
-
outputQueue.length = 0;
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
152
|
-
yield outputQueue.shift();
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
catch (error) {
|
|
157
|
-
// Catches errors from saxyParser.write() or saxyParser.end()
|
|
158
|
-
// console.error("Error during Saxy stream processing in generator:", error);
|
|
159
|
-
throw error; // Propagate error to the caller
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
//# sourceMappingURL=process-stream.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process-stream.js","sourceRoot":"","sources":["../../src/util/process-stream.ts"],"names":[],"mappings":";;AAUA,sDAkLC;AA5LD,iCAQe;AAER,KAAK,SAAS,CAAC,CAAC,qBAAqB,CAC1C,MAAyB,EACzB,IAOC;IAED,MAAM,UAAU,GAAG,IAAI,WAAI,EAAE,CAAA;IAC7B,IAAI,cAAc,GAAkB,IAAI,CAAA;IACxC,IAAI,oBAAoB,GAA2B,EAAE,CAAA;IACrD,IAAI,uBAAuB,GAAW,EAAE,CAAA;IACxC,IAAI,oBAAoB,GAAG,KAAK,CAAA;IAEhC,MAAM,WAAW,GAAa,EAAE,CAAA;IAEhC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE;QACpC,IAAI,GAAG,EAAE,CAAC;YACR,iCAAiC;YACjC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACvB,CAAC;IACH,CAAC,CAAA;IAED,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,IAAiB,EAAE,EAAE;QAC7C,IAAI,oBAAoB;YAAE,OAAM;QAEhC,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;YAC5B,qCAAqC;YACrC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACpB,iCAAiC;gBACjC,cAAc,GAAG,IAAI,CAAC,IAAI,CAAA;gBAC1B,IAAI,CAAC;oBACH,oBAAoB,GAAG,WAAI,CAAC,UAAU,CAAC,IAA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,MAAK;gBACP,CAAC;gBACD,MAAM,WAAW,CAAC,KAAK,EAAG,CAAA;YAC5B,CAAC;YACD,sFAAsF;YACtF,IAAI,oBAAoB;gBAAE,MAAK;QACjC,CAAC;QAED,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC1B,UAAU,CAAC,GAAG,EAAE,CAAA,CAAC,mBAAmB;YACpC,OAAO,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC9B,IAAI,oBAAoB,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;oBACpD,WAAW,CAAC,MAAM,GAAG,CAAC,CAAA;oBACtB,MAAK;gBACP,CAAC;gBACD,MAAM,WAAW,CAAC,KAAK,EAAG,CAAA;YAC5B,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,6DAA6D;QAC7D,6EAA6E;QAC7E,MAAM,KAAK,CAAA,CAAC,gCAAgC;IAC9C,CAAC;AACH,CAAC"}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
// Bun Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`getBackgroundProcessInfoString formats a running process correctly 1`] = `
|
|
4
|
-
"<background_process>
|
|
5
|
-
<process_id>123</process_id>
|
|
6
|
-
<command>npm test</command>
|
|
7
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
8
|
-
<duration_ms>2000</duration_ms>
|
|
9
|
-
<stdout>test output</stdout>
|
|
10
|
-
<stderr>test error</stderr>
|
|
11
|
-
<status>running</status>
|
|
12
|
-
</background_process>"
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
exports[`getBackgroundProcessInfoString formats a completed process correctly 1`] = `
|
|
16
|
-
"<background_process>
|
|
17
|
-
<process_id>456</process_id>
|
|
18
|
-
<command>npm build</command>
|
|
19
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
20
|
-
<duration_ms>1000</duration_ms>
|
|
21
|
-
<stdout>build successful</stdout>
|
|
22
|
-
<status>completed</status>
|
|
23
|
-
<exit_code>0</exit_code>
|
|
24
|
-
</background_process>"
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
exports[`getBackgroundProcessInfoString formats an errored process correctly 1`] = `
|
|
28
|
-
"<background_process>
|
|
29
|
-
<process_id>789</process_id>
|
|
30
|
-
<command>invalid-command</command>
|
|
31
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
32
|
-
<duration_ms>1500</duration_ms>
|
|
33
|
-
<stderr>command not found</stderr>
|
|
34
|
-
<status>error</status>
|
|
35
|
-
<exit_code>1</exit_code>
|
|
36
|
-
<signal_code>SIGTERM</signal_code>
|
|
37
|
-
</background_process>"
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
exports[`getBackgroundProcessInfoString handles new output since last report 1`] = `
|
|
41
|
-
"<background_process>
|
|
42
|
-
<process_id>102</process_id>
|
|
43
|
-
<command>echo test</command>
|
|
44
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
45
|
-
<duration_ms>1000</duration_ms>
|
|
46
|
-
<stdout>[PREVIOUS OUTPUT]
|
|
47
|
-
more output</stdout>
|
|
48
|
-
<status>completed</status>
|
|
49
|
-
</background_process>"
|
|
50
|
-
`;
|
|
51
|
-
|
|
52
|
-
exports[`getBackgroundProcessInfoString handles no new content 1`] = `
|
|
53
|
-
"<background_process>
|
|
54
|
-
<process_id>103</process_id>
|
|
55
|
-
<command>echo test</command>
|
|
56
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
57
|
-
<duration_ms>1000</duration_ms>
|
|
58
|
-
<status>running</status>
|
|
59
|
-
</background_process>"
|
|
60
|
-
`;
|
|
61
|
-
|
|
62
|
-
exports[`getBackgroundProcessInfoString handles new stderr without when no previous stderr 1`] = `
|
|
63
|
-
"<background_process>
|
|
64
|
-
<process_id>104</process_id>
|
|
65
|
-
<command>echo test</command>
|
|
66
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
67
|
-
<duration_ms>1000</duration_ms>
|
|
68
|
-
<stderr>new error</stderr>
|
|
69
|
-
<status>error</status>
|
|
70
|
-
</background_process>"
|
|
71
|
-
`;
|
|
72
|
-
|
|
73
|
-
exports[`getBackgroundProcessInfoString handles new stdout without when no previous stdout 1`] = `
|
|
74
|
-
"<background_process>
|
|
75
|
-
<process_id>105</process_id>
|
|
76
|
-
<command>echo test</command>
|
|
77
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
78
|
-
<duration_ms>2000</duration_ms>
|
|
79
|
-
<stdout>first output</stdout>
|
|
80
|
-
<status>running</status>
|
|
81
|
-
</background_process>"
|
|
82
|
-
`;
|
|
83
|
-
|
|
84
|
-
exports[`getBackgroundProcessInfoString reports completed process with new stderr even if stdout unchanged 1`] = `
|
|
85
|
-
"<background_process>
|
|
86
|
-
<process_id>106</process_id>
|
|
87
|
-
<command>echo test</command>
|
|
88
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
89
|
-
<duration_ms>1000</duration_ms>
|
|
90
|
-
<stderr>new error</stderr>
|
|
91
|
-
<status>completed</status>
|
|
92
|
-
</background_process>"
|
|
93
|
-
`;
|
|
94
|
-
|
|
95
|
-
exports[`getBackgroundProcessInfoString reports completed process with new stdout even if stderr unchanged 1`] = `
|
|
96
|
-
"<background_process>
|
|
97
|
-
<process_id>107</process_id>
|
|
98
|
-
<command>echo test</command>
|
|
99
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
100
|
-
<duration_ms>1000</duration_ms>
|
|
101
|
-
<stdout>[PREVIOUS OUTPUT]
|
|
102
|
-
more</stdout>
|
|
103
|
-
<status>completed</status>
|
|
104
|
-
</background_process>"
|
|
105
|
-
`;
|
|
106
|
-
|
|
107
|
-
exports[`getBackgroundProcessInfoString reports process when status changes even without output changes 1`] = `
|
|
108
|
-
"<background_process>
|
|
109
|
-
<process_id>108</process_id>
|
|
110
|
-
<command>echo test</command>
|
|
111
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
112
|
-
<duration_ms>1000</duration_ms>
|
|
113
|
-
<status>completed</status>
|
|
114
|
-
</background_process>"
|
|
115
|
-
`;
|
|
116
|
-
|
|
117
|
-
exports[`getBackgroundProcessInfoString calculates duration from endTime when available 1`] = `
|
|
118
|
-
"<background_process>
|
|
119
|
-
<process_id>109</process_id>
|
|
120
|
-
<command>echo test</command>
|
|
121
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
122
|
-
<duration_ms>1500</duration_ms>
|
|
123
|
-
<stdout>test</stdout>
|
|
124
|
-
<status>completed</status>
|
|
125
|
-
</background_process>"
|
|
126
|
-
`;
|
|
127
|
-
|
|
128
|
-
exports[`getBackgroundProcessInfoString calculates duration from current time when no endTime 1`] = `
|
|
129
|
-
"<background_process>
|
|
130
|
-
<process_id>110</process_id>
|
|
131
|
-
<command>echo test</command>
|
|
132
|
-
<start_time_utc>1970-01-01T00:00:01.000Z</start_time_utc>
|
|
133
|
-
<duration_ms>2000</duration_ms>
|
|
134
|
-
<stdout>test</stdout>
|
|
135
|
-
<status>running</status>
|
|
136
|
-
</background_process>"
|
|
137
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const file_paths_1 = require("../file-paths");
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
describe('toAbsolutePath', () => {
|
|
9
|
-
const projectRoot = '/home/user/project';
|
|
10
|
-
it('should handle relative paths', () => {
|
|
11
|
-
expect((0, file_paths_1.toAbsolutePath)('src/file.ts', projectRoot))
|
|
12
|
-
.toBe(path_1.default.normalize(path_1.default.join(projectRoot, 'src/file.ts')));
|
|
13
|
-
});
|
|
14
|
-
it('should handle parent directory references', () => {
|
|
15
|
-
expect((0, file_paths_1.toAbsolutePath)('../file.ts', projectRoot))
|
|
16
|
-
.toBe(path_1.default.normalize(path_1.default.join(path_1.default.dirname(projectRoot), 'file.ts')));
|
|
17
|
-
});
|
|
18
|
-
it('should handle current directory references', () => {
|
|
19
|
-
expect((0, file_paths_1.toAbsolutePath)('./file.ts', projectRoot))
|
|
20
|
-
.toBe(path_1.default.normalize(path_1.default.join(projectRoot, 'file.ts')));
|
|
21
|
-
});
|
|
22
|
-
it('should return absolute paths unchanged', () => {
|
|
23
|
-
const absolutePath = '/absolute/path/file.ts';
|
|
24
|
-
expect((0, file_paths_1.toAbsolutePath)(absolutePath, projectRoot))
|
|
25
|
-
.toBe(path_1.default.normalize(absolutePath));
|
|
26
|
-
});
|
|
27
|
-
it('should handle Windows-style paths', () => {
|
|
28
|
-
const winPath = 'src\\file.ts';
|
|
29
|
-
expect((0, file_paths_1.toAbsolutePath)(winPath, projectRoot))
|
|
30
|
-
.toBe(path_1.default.normalize(path_1.default.join(projectRoot, 'src/file.ts')));
|
|
31
|
-
});
|
|
32
|
-
it('should normalize paths with multiple slashes', () => {
|
|
33
|
-
expect((0, file_paths_1.toAbsolutePath)('src//file.ts', projectRoot))
|
|
34
|
-
.toBe(path_1.default.normalize(path_1.default.join(projectRoot, 'src/file.ts')));
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=file-paths.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-paths.test.js","sourceRoot":"","sources":["../../../src/utils/__tests__/file-paths.test.ts"],"names":[],"mappings":";;;;;AAAA,8CAA8C;AAC9C,gDAAuB;AAEvB,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,MAAM,WAAW,GAAG,oBA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,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,CAAC,IAAA,2BAAc,EAAC,cAAc,EAAE,WAAW,CAAC,CAAC;aAChD,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const path_1 = require("../path");
|
|
7
|
-
const path_2 = __importDefault(require("path"));
|
|
8
|
-
describe('toAbsolutePath', () => {
|
|
9
|
-
const projectRoot = '/home/user/project';
|
|
10
|
-
it('should handle relative paths', () => {
|
|
11
|
-
expect((0, path_1.toAbsolutePath)('src/file.ts', projectRoot))
|
|
12
|
-
.toBe(path_2.default.normalize(path_2.default.join(projectRoot, 'src/file.ts')));
|
|
13
|
-
});
|
|
14
|
-
it('should handle parent directory references', () => {
|
|
15
|
-
expect((0, path_1.toAbsolutePath)('../file.ts', projectRoot))
|
|
16
|
-
.toBe(path_2.default.normalize(path_2.default.join(path_2.default.dirname(projectRoot), 'file.ts')));
|
|
17
|
-
});
|
|
18
|
-
it('should handle current directory references', () => {
|
|
19
|
-
expect((0, path_1.toAbsolutePath)('./file.ts', projectRoot))
|
|
20
|
-
.toBe(path_2.default.normalize(path_2.default.join(projectRoot, 'file.ts')));
|
|
21
|
-
});
|
|
22
|
-
it('should return absolute paths unchanged', () => {
|
|
23
|
-
const absolutePath = '/absolute/path/file.ts';
|
|
24
|
-
expect((0, path_1.toAbsolutePath)(absolutePath, projectRoot))
|
|
25
|
-
.toBe(path_2.default.normalize(absolutePath));
|
|
26
|
-
});
|
|
27
|
-
it('should handle Windows-style paths', () => {
|
|
28
|
-
const winPath = 'src\\file.ts';
|
|
29
|
-
expect((0, path_1.toAbsolutePath)(winPath, projectRoot))
|
|
30
|
-
.toBe(path_2.default.normalize(path_2.default.join(projectRoot, 'src/file.ts')));
|
|
31
|
-
});
|
|
32
|
-
it('should normalize paths with multiple slashes', () => {
|
|
33
|
-
expect((0, path_1.toAbsolutePath)('src//file.ts', projectRoot))
|
|
34
|
-
.toBe(path_2.default.normalize(path_2.default.join(projectRoot, 'src/file.ts')));
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=path.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path.test.js","sourceRoot":"","sources":["../../../src/utils/__tests__/path.test.ts"],"names":[],"mappings":";;;;;AAAA,kCAAwC;AACxC,gDAAuB;AAEvB,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,MAAM,WAAW,GAAG,oBAAoB,CAAA;IAExC,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,IAAA,qBAAc,EAAC,aAAa,EAAE,WAAW,CAAC,CAAC;aAC/C,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,CAAC,IAAA,qBAAc,EAAC,YAAY,EAAE,WAAW,CAAC,CAAC;aAC9C,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,cAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IAC1E,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,CAAC,IAAA,qBAAc,EAAC,WAAW,EAAE,WAAW,CAAC,CAAC;aAC7C,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IAC5D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAChD,MAAM,YAAY,GAAG,wBAAwB,CAAA;QAC7C,MAAM,CAAC,IAAA,qBAAc,EAAC,YAAY,EAAE,WAAW,CAAC,CAAC;aAC9C,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,OAAO,GAAG,cAAc,CAAA;QAC9B,MAAM,CAAC,IAAA,qBAAc,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;aACzC,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,CAAC,IAAA,qBAAc,EAAC,cAAc,EAAE,WAAW,CAAC,CAAC;aAChD,IAAI,CAAC,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transforms a relative filepath into an absolute one, using the project root as the base.
|
|
3
|
-
* Handles '..' and '.' in paths correctly. Also handles Windows paths.
|
|
4
|
-
*
|
|
5
|
-
* @param filepath The relative filepath to transform
|
|
6
|
-
* @param projectRoot The absolute path to the project root
|
|
7
|
-
* @returns The absolute filepath
|
|
8
|
-
*/
|
|
9
|
-
export declare function toAbsolutePath(filepath: string, projectRoot: string): string;
|
package/dist/utils/file-paths.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.toAbsolutePath = toAbsolutePath;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
/**
|
|
9
|
-
* Transforms a relative filepath into an absolute one, using the project root as the base.
|
|
10
|
-
* Handles '..' and '.' in paths correctly. Also handles Windows paths.
|
|
11
|
-
*
|
|
12
|
-
* @param filepath The relative filepath to transform
|
|
13
|
-
* @param projectRoot The absolute path to the project root
|
|
14
|
-
* @returns The absolute filepath
|
|
15
|
-
*/
|
|
16
|
-
function toAbsolutePath(filepath, projectRoot) {
|
|
17
|
-
// If already absolute, normalize and return
|
|
18
|
-
if (path_1.default.isAbsolute(filepath)) {
|
|
19
|
-
return path_1.default.normalize(filepath);
|
|
20
|
-
}
|
|
21
|
-
// Handle '..' at the start by resolving against project root
|
|
22
|
-
return path_1.default.normalize(path_1.default.resolve(projectRoot, filepath));
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=file-paths.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-paths.js","sourceRoot":"","sources":["../../src/utils/file-paths.ts"],"names":[],"mappings":";;;;;AAUA,wCAQC;AAlBD,gDAAuB;AAEvB;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,QAAgB,EAAE,WAAmB;IAClE,4CAA4C;IAC5C,IAAI,cAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,OAAO,cAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IACjC,CAAC;IAED,6DAA6D;IAC7D,OAAO,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAA;AAC5D,CAAC"}
|
package/dist/utils/path.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transforms a relative filepath into an absolute one, using the project root as the base.
|
|
3
|
-
* Handles '..' and '.' in paths correctly. Also handles Windows paths.
|
|
4
|
-
*
|
|
5
|
-
* @param filepath The relative filepath to transform
|
|
6
|
-
* @param projectRoot The absolute path to the project root
|
|
7
|
-
* @returns The absolute filepath
|
|
8
|
-
*/
|
|
9
|
-
export declare function toAbsolutePath(filepath: string, projectRoot: string): string;
|
package/dist/utils/path.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.toAbsolutePath = toAbsolutePath;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
/**
|
|
9
|
-
* Transforms a relative filepath into an absolute one, using the project root as the base.
|
|
10
|
-
* Handles '..' and '.' in paths correctly. Also handles Windows paths.
|
|
11
|
-
*
|
|
12
|
-
* @param filepath The relative filepath to transform
|
|
13
|
-
* @param projectRoot The absolute path to the project root
|
|
14
|
-
* @returns The absolute filepath
|
|
15
|
-
*/
|
|
16
|
-
function toAbsolutePath(filepath, projectRoot) {
|
|
17
|
-
// If already absolute, normalize and return
|
|
18
|
-
if (path_1.default.isAbsolute(filepath)) {
|
|
19
|
-
return path_1.default.normalize(filepath);
|
|
20
|
-
}
|
|
21
|
-
// Handle Windows paths
|
|
22
|
-
const normalizedFilepath = filepath.replace(/\\/g, '/');
|
|
23
|
-
const normalizedProjectRoot = projectRoot.replace(/\\/g, '/');
|
|
24
|
-
// Handle '..' at the start by resolving against project root
|
|
25
|
-
return path_1.default.normalize(path_1.default.resolve(normalizedProjectRoot, normalizedFilepath));
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=path.js.map
|
package/dist/utils/path.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/utils/path.ts"],"names":[],"mappings":";;;;;AAUA,wCAYC;AAtBD,gDAAuB;AAEvB;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,QAAgB,EAAE,WAAmB;IAClE,4CAA4C;IAC5C,IAAI,cAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,OAAO,cAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IACjC,CAAC;IAED,uBAAuB;IACvB,MAAM,kBAAkB,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IACvD,MAAM,qBAAqB,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IAE7D,6DAA6D;IAC7D,OAAO,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAC,CAAA;AAChF,CAAC"}
|