@sdk-it/core 0.30.0 → 0.31.1
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/lib/paths.d.ts.map +1 -1
- package/dist/lib/paths.js +4 -1
- package/dist/lib/paths.js.map +2 -2
- package/package.json +5 -4
- package/dist/lib/deriver.test.d.ts +0 -1
- package/dist/lib/deriver.test.d.ts.map +0 -1
- package/dist/lib/deriver.test.js +0 -382
- package/dist/lib/deriver.test.js.map +0 -7
- package/dist/lib/file-system.test.d.ts +0 -2
- package/dist/lib/file-system.test.d.ts.map +0 -1
- package/dist/lib/file-system.test.js +0 -357
- package/dist/lib/file-system.test.js.map +0 -7
- package/dist/lib/program.test.d.ts +0 -2
- package/dist/lib/program.test.d.ts.map +0 -1
- package/dist/lib/program.test.js +0 -289
- package/dist/lib/program.test.js.map +0 -7
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
import assert from "node:assert/strict";
|
|
2
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
|
-
import { tmpdir } from "node:os";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
import { after, before, describe, it } from "node:test";
|
|
6
|
-
import {
|
|
7
|
-
addLeadingSlash,
|
|
8
|
-
exist,
|
|
9
|
-
getExt,
|
|
10
|
-
getFile,
|
|
11
|
-
getFolderExports,
|
|
12
|
-
isNullOrUndefined,
|
|
13
|
-
readFolder,
|
|
14
|
-
removeTrialingSlashes,
|
|
15
|
-
writeFiles
|
|
16
|
-
} from "./file-system.ts";
|
|
17
|
-
describe("File System Utilities - Error-First Testing", () => {
|
|
18
|
-
let testDir;
|
|
19
|
-
let nonExistentPath;
|
|
20
|
-
before(async () => {
|
|
21
|
-
testDir = join(tmpdir(), `fs-test-${Date.now()}`);
|
|
22
|
-
await mkdir(testDir, { recursive: true });
|
|
23
|
-
nonExistentPath = join(testDir, "non-existent-directory", "deep", "path");
|
|
24
|
-
});
|
|
25
|
-
after(async () => {
|
|
26
|
-
const { rm } = await import("node:fs/promises");
|
|
27
|
-
await rm(testDir, { recursive: true, force: true });
|
|
28
|
-
});
|
|
29
|
-
describe("getFile - Attack Phase: Invalid Inputs & File System Errors", () => {
|
|
30
|
-
it("should return null for non-existent file", async () => {
|
|
31
|
-
const result = await getFile(join(testDir, "does-not-exist.txt"));
|
|
32
|
-
assert.strictEqual(result, null);
|
|
33
|
-
});
|
|
34
|
-
it("should return null for empty string path", async () => {
|
|
35
|
-
const result = await getFile("");
|
|
36
|
-
assert.strictEqual(result, null);
|
|
37
|
-
});
|
|
38
|
-
it("should throw error when trying to read a directory path instead of file", async () => {
|
|
39
|
-
const dirPath = join(testDir, "test-dir-for-getfile");
|
|
40
|
-
await mkdir(dirPath);
|
|
41
|
-
await assert.rejects(() => getFile(dirPath), {
|
|
42
|
-
code: "EISDIR"
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
it("should handle permission denied scenarios gracefully", async () => {
|
|
46
|
-
const result = await getFile("/root/protected-file.txt");
|
|
47
|
-
assert.strictEqual(result, null);
|
|
48
|
-
});
|
|
49
|
-
it("should handle malformed paths", async () => {
|
|
50
|
-
const malformedPaths = [
|
|
51
|
-
"\0invalid",
|
|
52
|
-
"file\nwith\nnewlines",
|
|
53
|
-
"file with tabs"
|
|
54
|
-
];
|
|
55
|
-
for (const path of malformedPaths) {
|
|
56
|
-
const result = await getFile(path);
|
|
57
|
-
assert.strictEqual(result, null, `Failed for path: ${path}`);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
describe("exist - Attack Phase: Edge Cases & Invalid Paths", () => {
|
|
62
|
-
it("should return false for non-existent paths", async () => {
|
|
63
|
-
assert.strictEqual(await exist(nonExistentPath), false);
|
|
64
|
-
});
|
|
65
|
-
it("should return false for empty string", async () => {
|
|
66
|
-
assert.strictEqual(await exist(""), false);
|
|
67
|
-
});
|
|
68
|
-
it("should handle null bytes in path gracefully", async () => {
|
|
69
|
-
assert.strictEqual(await exist("path\0with\0nulls"), false);
|
|
70
|
-
});
|
|
71
|
-
it("should handle extremely long paths", async () => {
|
|
72
|
-
const longPath = "a".repeat(1e4);
|
|
73
|
-
assert.strictEqual(await exist(longPath), false);
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
describe("readFolder - Attack Phase: Directory Corruption & Invalid States", () => {
|
|
77
|
-
it("should return empty array for non-existent directory", async () => {
|
|
78
|
-
const result = await readFolder(nonExistentPath);
|
|
79
|
-
assert.deepStrictEqual(result, []);
|
|
80
|
-
});
|
|
81
|
-
it("should throw error for file path instead of directory", async () => {
|
|
82
|
-
const filePath = join(testDir, "test-file-for-readfolder.txt");
|
|
83
|
-
await writeFile(filePath, "content");
|
|
84
|
-
await assert.rejects(() => readFolder(filePath), {
|
|
85
|
-
code: "ENOTDIR"
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
it("should handle permission denied on directory", async () => {
|
|
89
|
-
const result = await readFolder("/root");
|
|
90
|
-
assert.deepStrictEqual(result, []);
|
|
91
|
-
});
|
|
92
|
-
it("should handle recursive reading with circular symlinks gracefully", async () => {
|
|
93
|
-
const result = await readFolder(testDir, true);
|
|
94
|
-
assert.ok(Array.isArray(result));
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
describe("writeFiles - Attack Phase: Write Failures & State Corruption", () => {
|
|
98
|
-
it("should handle null content gracefully", async () => {
|
|
99
|
-
const content = {
|
|
100
|
-
"test.txt": null,
|
|
101
|
-
"valid.txt": "content"
|
|
102
|
-
};
|
|
103
|
-
await writeFiles(testDir, content);
|
|
104
|
-
assert.strictEqual(await exist(join(testDir, "test.txt")), false);
|
|
105
|
-
assert.strictEqual(await exist(join(testDir, "valid.txt")), true);
|
|
106
|
-
});
|
|
107
|
-
it("should fail gracefully when writing to read-only directory", async () => {
|
|
108
|
-
const readOnlyPath = "/read-only-system-path";
|
|
109
|
-
const content = {
|
|
110
|
-
"test.txt": "content"
|
|
111
|
-
};
|
|
112
|
-
try {
|
|
113
|
-
await writeFiles(readOnlyPath, content);
|
|
114
|
-
assert.fail("Should have thrown an error for read-only directory");
|
|
115
|
-
} catch (error) {
|
|
116
|
-
assert.ok(error instanceof Error);
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
it("should handle ignoreIfExists flag correctly when file exists", async () => {
|
|
120
|
-
const filePath = join(testDir, "existing.txt");
|
|
121
|
-
await writeFile(filePath, "original");
|
|
122
|
-
const content = {
|
|
123
|
-
"existing.txt": {
|
|
124
|
-
content: "should not overwrite",
|
|
125
|
-
ignoreIfExists: true
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
await writeFiles(testDir, content);
|
|
129
|
-
const result = await getFile(filePath);
|
|
130
|
-
assert.strictEqual(result, "original");
|
|
131
|
-
});
|
|
132
|
-
it("should create deeply nested directories", async () => {
|
|
133
|
-
const content = {
|
|
134
|
-
"deep/nested/structure/file.txt": "content"
|
|
135
|
-
};
|
|
136
|
-
await writeFiles(testDir, content);
|
|
137
|
-
const result = await getFile(
|
|
138
|
-
join(testDir, "deep/nested/structure/file.txt")
|
|
139
|
-
);
|
|
140
|
-
assert.strictEqual(result, "content");
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
describe("getFolderExports - Attack Phase: Invalid Folder States", () => {
|
|
144
|
-
const mockReadFolder = async (folder) => {
|
|
145
|
-
if (folder === nonExistentPath) {
|
|
146
|
-
return [];
|
|
147
|
-
}
|
|
148
|
-
return [
|
|
149
|
-
{
|
|
150
|
-
filePath: join(folder, "valid.ts"),
|
|
151
|
-
fileName: "valid.ts",
|
|
152
|
-
isFolder: false
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
filePath: join(folder, "index.ts"),
|
|
156
|
-
fileName: "index.ts",
|
|
157
|
-
isFolder: false
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
filePath: join(folder, "subfolder"),
|
|
161
|
-
fileName: "subfolder",
|
|
162
|
-
isFolder: true
|
|
163
|
-
}
|
|
164
|
-
];
|
|
165
|
-
};
|
|
166
|
-
it("should handle non-existent folder gracefully", async () => {
|
|
167
|
-
const result = await getFolderExports(nonExistentPath, mockReadFolder);
|
|
168
|
-
assert.strictEqual(result, "");
|
|
169
|
-
});
|
|
170
|
-
it("should ignore files with unsupported extensions", async () => {
|
|
171
|
-
const mockReadFolderWithJs = async () => [
|
|
172
|
-
{ filePath: "test.js", fileName: "test.js", isFolder: false },
|
|
173
|
-
{ filePath: "test.ts", fileName: "test.ts", isFolder: false }
|
|
174
|
-
];
|
|
175
|
-
const result = await getFolderExports(
|
|
176
|
-
testDir,
|
|
177
|
-
mockReadFolderWithJs,
|
|
178
|
-
true,
|
|
179
|
-
["ts"]
|
|
180
|
-
);
|
|
181
|
-
assert.ok(!result.includes("test.js"));
|
|
182
|
-
assert.ok(result.includes("test.ts"));
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
describe("getExt - Attack Phase: Malformed File Names", () => {
|
|
186
|
-
it("should handle undefined filename", () => {
|
|
187
|
-
assert.strictEqual(getExt(void 0), "");
|
|
188
|
-
});
|
|
189
|
-
it("should handle empty string filename", () => {
|
|
190
|
-
assert.strictEqual(getExt(""), "");
|
|
191
|
-
});
|
|
192
|
-
it("should handle filename with no extension", () => {
|
|
193
|
-
assert.strictEqual(getExt("filename"), "");
|
|
194
|
-
});
|
|
195
|
-
it("should handle filename with multiple dots", () => {
|
|
196
|
-
assert.strictEqual(getExt("file.name.with.multiple.dots.ts"), "ts");
|
|
197
|
-
});
|
|
198
|
-
it("should handle filename starting with dot", () => {
|
|
199
|
-
assert.strictEqual(getExt(".hidden"), "hidden");
|
|
200
|
-
});
|
|
201
|
-
it("should handle filename with only dots", () => {
|
|
202
|
-
assert.strictEqual(getExt("..."), "txt");
|
|
203
|
-
});
|
|
204
|
-
it("should handle filename with path separators", () => {
|
|
205
|
-
assert.strictEqual(getExt("path/to/file.txt"), "txt");
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
describe("Path Utilities - Attack Phase: Malformed Paths", () => {
|
|
209
|
-
describe("addLeadingSlash", () => {
|
|
210
|
-
it("should handle empty string", () => {
|
|
211
|
-
assert.strictEqual(addLeadingSlash(""), "/");
|
|
212
|
-
});
|
|
213
|
-
it("should handle path with multiple leading slashes", () => {
|
|
214
|
-
assert.strictEqual(addLeadingSlash("///path"), "/path");
|
|
215
|
-
});
|
|
216
|
-
it("should handle path with backslashes", () => {
|
|
217
|
-
const result = addLeadingSlash("path\\to\\file");
|
|
218
|
-
assert.ok(result.startsWith("/"));
|
|
219
|
-
});
|
|
220
|
-
});
|
|
221
|
-
describe("removeTrialingSlashes", () => {
|
|
222
|
-
it("should handle empty string", () => {
|
|
223
|
-
assert.strictEqual(removeTrialingSlashes(""), "");
|
|
224
|
-
});
|
|
225
|
-
it("should handle string with only slashes", () => {
|
|
226
|
-
assert.strictEqual(removeTrialingSlashes("///"), "");
|
|
227
|
-
});
|
|
228
|
-
it("should preserve single slash when keepLastOne is true", () => {
|
|
229
|
-
assert.strictEqual(removeTrialingSlashes("path///", true), "path/");
|
|
230
|
-
});
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
describe("Type Guards - Attack Phase: Type Coercion Vulnerabilities", () => {
|
|
234
|
-
describe("isNullOrUndefined", () => {
|
|
235
|
-
it("should correctly identify falsy values that are not null/undefined", () => {
|
|
236
|
-
assert.strictEqual(isNullOrUndefined(0), false);
|
|
237
|
-
assert.strictEqual(isNullOrUndefined(""), false);
|
|
238
|
-
assert.strictEqual(isNullOrUndefined(false), false);
|
|
239
|
-
assert.strictEqual(isNullOrUndefined(NaN), false);
|
|
240
|
-
});
|
|
241
|
-
it("should correctly identify null and undefined", () => {
|
|
242
|
-
assert.strictEqual(isNullOrUndefined(null), true);
|
|
243
|
-
assert.strictEqual(isNullOrUndefined(void 0), true);
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
describe("type safety verification", () => {
|
|
247
|
-
it("should handle type coercion edge cases", () => {
|
|
248
|
-
const value = null;
|
|
249
|
-
if (isNullOrUndefined(value)) {
|
|
250
|
-
assert.ok(value === null || value === void 0);
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
describe("State Transition Testing - File System Operations", () => {
|
|
256
|
-
it("should maintain file system consistency during complex operations", async () => {
|
|
257
|
-
const complexContent = {
|
|
258
|
-
"folder1/file1.txt": "content1",
|
|
259
|
-
"folder1/file2.txt": null,
|
|
260
|
-
// Should not be created
|
|
261
|
-
"folder2/subfolder/file3.txt": {
|
|
262
|
-
content: "content3",
|
|
263
|
-
ignoreIfExists: false
|
|
264
|
-
},
|
|
265
|
-
"folder2/existing.txt": {
|
|
266
|
-
content: "new content",
|
|
267
|
-
ignoreIfExists: true
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
await mkdir(join(testDir, "folder2"), { recursive: true });
|
|
271
|
-
await writeFile(join(testDir, "folder2/existing.txt"), "original");
|
|
272
|
-
await writeFiles(testDir, complexContent);
|
|
273
|
-
assert.strictEqual(
|
|
274
|
-
await getFile(join(testDir, "folder1/file1.txt")),
|
|
275
|
-
"content1"
|
|
276
|
-
);
|
|
277
|
-
assert.strictEqual(
|
|
278
|
-
await exist(join(testDir, "folder1/file2.txt")),
|
|
279
|
-
false
|
|
280
|
-
);
|
|
281
|
-
assert.strictEqual(
|
|
282
|
-
await getFile(join(testDir, "folder2/subfolder/file3.txt")),
|
|
283
|
-
"content3"
|
|
284
|
-
);
|
|
285
|
-
assert.strictEqual(
|
|
286
|
-
await getFile(join(testDir, "folder2/existing.txt")),
|
|
287
|
-
"original"
|
|
288
|
-
);
|
|
289
|
-
});
|
|
290
|
-
it("should maintain directory structure consistency during recursive operations", async () => {
|
|
291
|
-
const nestedDir = join(testDir, "nested/deep/structure");
|
|
292
|
-
await mkdir(nestedDir, { recursive: true });
|
|
293
|
-
await writeFile(join(nestedDir, "file.txt"), "content");
|
|
294
|
-
await writeFile(join(testDir, "nested/file2.txt"), "content2");
|
|
295
|
-
const files = await readFolder(join(testDir, "nested"), true);
|
|
296
|
-
assert.ok(files.includes("deep/structure/file.txt"));
|
|
297
|
-
assert.ok(files.includes("file2.txt"));
|
|
298
|
-
assert.strictEqual(files.filter((f) => f.startsWith("deep/")).length, 1);
|
|
299
|
-
});
|
|
300
|
-
});
|
|
301
|
-
describe("Happy Path - Basic Functionality Confirmation", () => {
|
|
302
|
-
it("should successfully read existing file", async () => {
|
|
303
|
-
const filePath = join(testDir, "test-read.txt");
|
|
304
|
-
const content = "test content";
|
|
305
|
-
await writeFile(filePath, content);
|
|
306
|
-
const result = await getFile(filePath);
|
|
307
|
-
assert.strictEqual(result, content);
|
|
308
|
-
});
|
|
309
|
-
it("should correctly identify existing files and directories", async () => {
|
|
310
|
-
const filePath = join(testDir, "test-exist-unique.txt");
|
|
311
|
-
const dirPath = join(testDir, "test-dir-unique");
|
|
312
|
-
await writeFile(filePath, "content");
|
|
313
|
-
await mkdir(dirPath);
|
|
314
|
-
assert.strictEqual(await exist(filePath), true);
|
|
315
|
-
assert.strictEqual(await exist(dirPath), true);
|
|
316
|
-
});
|
|
317
|
-
it("should read folder contents correctly", async () => {
|
|
318
|
-
const folderPath = join(testDir, "read-test");
|
|
319
|
-
await mkdir(folderPath);
|
|
320
|
-
await writeFile(join(folderPath, "file1.txt"), "content1");
|
|
321
|
-
await writeFile(join(folderPath, "file2.txt"), "content2");
|
|
322
|
-
const files = await readFolder(folderPath);
|
|
323
|
-
assert.deepStrictEqual(files.sort(), ["file1.txt", "file2.txt"]);
|
|
324
|
-
});
|
|
325
|
-
it("should write files correctly", async () => {
|
|
326
|
-
const content = {
|
|
327
|
-
"simple.txt": "simple content",
|
|
328
|
-
"complex.txt": {
|
|
329
|
-
content: "complex content",
|
|
330
|
-
ignoreIfExists: false
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
await writeFiles(testDir, content);
|
|
334
|
-
assert.strictEqual(
|
|
335
|
-
await getFile(join(testDir, "simple.txt")),
|
|
336
|
-
"simple content"
|
|
337
|
-
);
|
|
338
|
-
assert.strictEqual(
|
|
339
|
-
await getFile(join(testDir, "complex.txt")),
|
|
340
|
-
"complex content"
|
|
341
|
-
);
|
|
342
|
-
});
|
|
343
|
-
it("should extract file extensions correctly", () => {
|
|
344
|
-
assert.strictEqual(getExt("file.txt"), "txt");
|
|
345
|
-
assert.strictEqual(getExt("script.js"), "js");
|
|
346
|
-
assert.strictEqual(getExt("component.tsx"), "tsx");
|
|
347
|
-
});
|
|
348
|
-
it("should format paths correctly", () => {
|
|
349
|
-
assert.strictEqual(addLeadingSlash("path/to/file"), "/path/to/file");
|
|
350
|
-
assert.strictEqual(
|
|
351
|
-
removeTrialingSlashes("path/to/file///"),
|
|
352
|
-
"path/to/file"
|
|
353
|
-
);
|
|
354
|
-
});
|
|
355
|
-
});
|
|
356
|
-
});
|
|
357
|
-
//# sourceMappingURL=file-system.test.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/lib/file-system.test.ts"],
|
|
4
|
-
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { after, before, describe, it } from 'node:test';\n\nimport {\n type WriteContent,\n addLeadingSlash,\n exist,\n getExt,\n getFile,\n getFolderExports,\n isNullOrUndefined,\n readFolder,\n removeTrialingSlashes,\n writeFiles,\n} from './file-system.ts';\n\ndescribe('File System Utilities - Error-First Testing', () => {\n let testDir: string;\n let nonExistentPath: string;\n\n before(async () => {\n testDir = join(tmpdir(), `fs-test-${Date.now()}`);\n await mkdir(testDir, { recursive: true });\n nonExistentPath = join(testDir, 'non-existent-directory', 'deep', 'path');\n });\n\n after(async () => {\n const { rm } = await import('node:fs/promises');\n await rm(testDir, { recursive: true, force: true });\n });\n\n describe('getFile - Attack Phase: Invalid Inputs & File System Errors', () => {\n it('should return null for non-existent file', async () => {\n const result = await getFile(join(testDir, 'does-not-exist.txt'));\n assert.strictEqual(result, null);\n });\n\n it('should return null for empty string path', async () => {\n const result = await getFile('');\n assert.strictEqual(result, null);\n });\n\n it('should throw error when trying to read a directory path instead of file', async () => {\n const dirPath = join(testDir, 'test-dir-for-getfile');\n await mkdir(dirPath);\n\n await assert.rejects(() => getFile(dirPath), {\n code: 'EISDIR',\n });\n });\n\n it('should handle permission denied scenarios gracefully', async () => {\n // Test with invalid path that would cause permission errors\n const result = await getFile('/root/protected-file.txt');\n assert.strictEqual(result, null);\n });\n\n it('should handle malformed paths', async () => {\n const malformedPaths = [\n '\\0invalid',\n 'file\\nwith\\nnewlines',\n 'file\\twith\\ttabs',\n ];\n\n for (const path of malformedPaths) {\n const result = await getFile(path);\n assert.strictEqual(result, null, `Failed for path: ${path}`);\n }\n });\n });\n\n describe('exist - Attack Phase: Edge Cases & Invalid Paths', () => {\n it('should return false for non-existent paths', async () => {\n assert.strictEqual(await exist(nonExistentPath), false);\n });\n\n it('should return false for empty string', async () => {\n assert.strictEqual(await exist(''), false);\n });\n\n it('should handle null bytes in path gracefully', async () => {\n assert.strictEqual(await exist('path\\0with\\0nulls'), false);\n });\n\n it('should handle extremely long paths', async () => {\n const longPath = 'a'.repeat(10000);\n assert.strictEqual(await exist(longPath), false);\n });\n });\n\n describe('readFolder - Attack Phase: Directory Corruption & Invalid States', () => {\n it('should return empty array for non-existent directory', async () => {\n const result = await readFolder(nonExistentPath);\n assert.deepStrictEqual(result, []);\n });\n\n it('should throw error for file path instead of directory', async () => {\n const filePath = join(testDir, 'test-file-for-readfolder.txt');\n await writeFile(filePath, 'content');\n\n // readFolder should throw an error when given a file path\n await assert.rejects(() => readFolder(filePath), {\n code: 'ENOTDIR',\n });\n });\n\n it('should handle permission denied on directory', async () => {\n const result = await readFolder('/root');\n assert.deepStrictEqual(result, []);\n });\n\n it('should handle recursive reading with circular symlinks gracefully', async () => {\n // This tests the function's resilience to infinite loops\n const result = await readFolder(testDir, true);\n assert.ok(Array.isArray(result));\n });\n });\n\n describe('writeFiles - Attack Phase: Write Failures & State Corruption', () => {\n it('should handle null content gracefully', async () => {\n const content: WriteContent = {\n 'test.txt': null,\n 'valid.txt': 'content',\n };\n\n await writeFiles(testDir, content);\n\n // Verify null content file was not created\n assert.strictEqual(await exist(join(testDir, 'test.txt')), false);\n // Verify valid file was created\n assert.strictEqual(await exist(join(testDir, 'valid.txt')), true);\n });\n\n it('should fail gracefully when writing to read-only directory', async () => {\n const readOnlyPath = '/read-only-system-path';\n const content: WriteContent = {\n 'test.txt': 'content',\n };\n\n try {\n await writeFiles(readOnlyPath, content);\n assert.fail('Should have thrown an error for read-only directory');\n } catch (error) {\n assert.ok(error instanceof Error);\n }\n });\n\n it('should handle ignoreIfExists flag correctly when file exists', async () => {\n const filePath = join(testDir, 'existing.txt');\n await writeFile(filePath, 'original');\n\n const content: WriteContent = {\n 'existing.txt': {\n content: 'should not overwrite',\n ignoreIfExists: true,\n },\n };\n\n await writeFiles(testDir, content);\n const result = await getFile(filePath);\n assert.strictEqual(result, 'original');\n });\n\n it('should create deeply nested directories', async () => {\n const content: WriteContent = {\n 'deep/nested/structure/file.txt': 'content',\n };\n\n await writeFiles(testDir, content);\n const result = await getFile(\n join(testDir, 'deep/nested/structure/file.txt'),\n );\n assert.strictEqual(result, 'content');\n });\n });\n\n describe('getFolderExports - Attack Phase: Invalid Folder States', () => {\n const mockReadFolder = async (folder: string) => {\n if (folder === nonExistentPath) {\n return [];\n }\n return [\n {\n filePath: join(folder, 'valid.ts'),\n fileName: 'valid.ts',\n isFolder: false,\n },\n {\n filePath: join(folder, 'index.ts'),\n fileName: 'index.ts',\n isFolder: false,\n },\n {\n filePath: join(folder, 'subfolder'),\n fileName: 'subfolder',\n isFolder: true,\n },\n ];\n };\n\n it('should handle non-existent folder gracefully', async () => {\n const result = await getFolderExports(nonExistentPath, mockReadFolder);\n assert.strictEqual(result, '');\n });\n\n it('should ignore files with unsupported extensions', async () => {\n const mockReadFolderWithJs = async () => [\n { filePath: 'test.js', fileName: 'test.js', isFolder: false },\n { filePath: 'test.ts', fileName: 'test.ts', isFolder: false },\n ];\n\n const result = await getFolderExports(\n testDir,\n mockReadFolderWithJs,\n true,\n ['ts'],\n );\n assert.ok(!result.includes('test.js'));\n assert.ok(result.includes('test.ts'));\n });\n });\n\n describe('getExt - Attack Phase: Malformed File Names', () => {\n it('should handle undefined filename', () => {\n assert.strictEqual(getExt(undefined), '');\n });\n\n it('should handle empty string filename', () => {\n assert.strictEqual(getExt(''), '');\n });\n\n it('should handle filename with no extension', () => {\n assert.strictEqual(getExt('filename'), '');\n });\n\n it('should handle filename with multiple dots', () => {\n assert.strictEqual(getExt('file.name.with.multiple.dots.ts'), 'ts');\n });\n\n it('should handle filename starting with dot', () => {\n // Based on the actual implementation, '.hidden' should return 'hidden'\n assert.strictEqual(getExt('.hidden'), 'hidden');\n });\n\n it('should handle filename with only dots', () => {\n // Based on the actual implementation, '...' returns 'txt' as fallback\n assert.strictEqual(getExt('...'), 'txt');\n });\n\n it('should handle filename with path separators', () => {\n assert.strictEqual(getExt('path/to/file.txt'), 'txt');\n });\n });\n\n describe('Path Utilities - Attack Phase: Malformed Paths', () => {\n describe('addLeadingSlash', () => {\n it('should handle empty string', () => {\n assert.strictEqual(addLeadingSlash(''), '/');\n });\n\n it('should handle path with multiple leading slashes', () => {\n assert.strictEqual(addLeadingSlash('///path'), '/path');\n });\n\n it('should handle path with backslashes', () => {\n const result = addLeadingSlash('path\\\\to\\\\file');\n assert.ok(result.startsWith('/'));\n });\n });\n\n describe('removeTrialingSlashes', () => {\n it('should handle empty string', () => {\n assert.strictEqual(removeTrialingSlashes(''), '');\n });\n\n it('should handle string with only slashes', () => {\n assert.strictEqual(removeTrialingSlashes('///'), '');\n });\n\n it('should preserve single slash when keepLastOne is true', () => {\n assert.strictEqual(removeTrialingSlashes('path///', true), 'path/');\n });\n });\n });\n\n describe('Type Guards - Attack Phase: Type Coercion Vulnerabilities', () => {\n describe('isNullOrUndefined', () => {\n it('should correctly identify falsy values that are not null/undefined', () => {\n assert.strictEqual(isNullOrUndefined(0), false);\n assert.strictEqual(isNullOrUndefined(''), false);\n assert.strictEqual(isNullOrUndefined(false), false);\n assert.strictEqual(isNullOrUndefined(NaN), false);\n });\n\n it('should correctly identify null and undefined', () => {\n assert.strictEqual(isNullOrUndefined(null), true);\n assert.strictEqual(isNullOrUndefined(undefined), true);\n });\n });\n\n // Remove notNullOrUndefined tests since it doesn't exist in the source\n describe('type safety verification', () => {\n it('should handle type coercion edge cases', () => {\n // Test that isNullOrUndefined works as a proper type guard\n const value: unknown = null;\n if (isNullOrUndefined(value)) {\n // TypeScript should narrow the type here\n assert.ok(value === null || value === undefined);\n }\n });\n });\n });\n\n describe('State Transition Testing - File System Operations', () => {\n it('should maintain file system consistency during complex operations', async () => {\n const complexContent: WriteContent = {\n 'folder1/file1.txt': 'content1',\n 'folder1/file2.txt': null, // Should not be created\n 'folder2/subfolder/file3.txt': {\n content: 'content3',\n ignoreIfExists: false,\n },\n 'folder2/existing.txt': {\n content: 'new content',\n ignoreIfExists: true,\n },\n };\n\n // Pre-create existing file\n await mkdir(join(testDir, 'folder2'), { recursive: true });\n await writeFile(join(testDir, 'folder2/existing.txt'), 'original');\n\n await writeFiles(testDir, complexContent);\n\n // Verify final state\n assert.strictEqual(\n await getFile(join(testDir, 'folder1/file1.txt')),\n 'content1',\n );\n assert.strictEqual(\n await exist(join(testDir, 'folder1/file2.txt')),\n false,\n );\n assert.strictEqual(\n await getFile(join(testDir, 'folder2/subfolder/file3.txt')),\n 'content3',\n );\n assert.strictEqual(\n await getFile(join(testDir, 'folder2/existing.txt')),\n 'original',\n );\n });\n\n it('should maintain directory structure consistency during recursive operations', async () => {\n // Create nested structure\n const nestedDir = join(testDir, 'nested/deep/structure');\n await mkdir(nestedDir, { recursive: true });\n await writeFile(join(nestedDir, 'file.txt'), 'content');\n await writeFile(join(testDir, 'nested/file2.txt'), 'content2');\n\n const files = await readFolder(join(testDir, 'nested'), true);\n\n // Verify structure is maintained\n assert.ok(files.includes('deep/structure/file.txt'));\n assert.ok(files.includes('file2.txt'));\n assert.strictEqual(files.filter((f) => f.startsWith('deep/')).length, 1);\n });\n });\n\n describe('Happy Path - Basic Functionality Confirmation', () => {\n it('should successfully read existing file', async () => {\n const filePath = join(testDir, 'test-read.txt');\n const content = 'test content';\n await writeFile(filePath, content);\n\n const result = await getFile(filePath);\n assert.strictEqual(result, content);\n });\n\n it('should correctly identify existing files and directories', async () => {\n const filePath = join(testDir, 'test-exist-unique.txt');\n const dirPath = join(testDir, 'test-dir-unique');\n\n await writeFile(filePath, 'content');\n await mkdir(dirPath);\n\n assert.strictEqual(await exist(filePath), true);\n assert.strictEqual(await exist(dirPath), true);\n });\n\n it('should read folder contents correctly', async () => {\n const folderPath = join(testDir, 'read-test');\n await mkdir(folderPath);\n await writeFile(join(folderPath, 'file1.txt'), 'content1');\n await writeFile(join(folderPath, 'file2.txt'), 'content2');\n\n const files = await readFolder(folderPath);\n assert.deepStrictEqual(files.sort(), ['file1.txt', 'file2.txt']);\n });\n\n it('should write files correctly', async () => {\n const content: WriteContent = {\n 'simple.txt': 'simple content',\n 'complex.txt': {\n content: 'complex content',\n ignoreIfExists: false,\n },\n };\n\n await writeFiles(testDir, content);\n\n assert.strictEqual(\n await getFile(join(testDir, 'simple.txt')),\n 'simple content',\n );\n assert.strictEqual(\n await getFile(join(testDir, 'complex.txt')),\n 'complex content',\n );\n });\n\n it('should extract file extensions correctly', () => {\n assert.strictEqual(getExt('file.txt'), 'txt');\n assert.strictEqual(getExt('script.js'), 'js');\n assert.strictEqual(getExt('component.tsx'), 'tsx');\n });\n\n it('should format paths correctly', () => {\n assert.strictEqual(addLeadingSlash('path/to/file'), '/path/to/file');\n assert.strictEqual(\n removeTrialingSlashes('path/to/file///'),\n 'path/to/file',\n );\n });\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,OAAO,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