@cobol-ts/files 0.0.3 → 0.0.4
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/index.js.map +1 -0
- package/dist/src/files.d.ts +9 -0
- package/dist/src/files.js +68 -0
- package/dist/src/files.js.map +1 -0
- package/dist/src/files.spec.d.ts +1 -0
- package/dist/src/files.spec.js +23 -0
- package/dist/src/files.spec.js.map +1 -0
- package/dist/src/text.files.d.ts +10 -0
- package/dist/src/text.files.js +31 -0
- package/dist/src/text.files.js.map +1 -0
- package/dist/src/text.files.spec.d.ts +1 -0
- package/dist/src/text.files.spec.js +80 -0
- package/dist/src/text.files.spec.js.map +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAE3B,mDAAgC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively searches upwards from the current working directory
|
|
3
|
+
* to find a directory with the given name.
|
|
4
|
+
*
|
|
5
|
+
* @param dirName Name of the directory to find
|
|
6
|
+
* @returns The absolute path to the found directory
|
|
7
|
+
* @throws If the directory cannot be found in the current or any parent path
|
|
8
|
+
*/
|
|
9
|
+
export declare function findDirectoryUp(dirName: string, startDirectory?: string): Promise<string>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.findDirectoryUp = findDirectoryUp;
|
|
38
|
+
const node_fs_1 = require("node:fs");
|
|
39
|
+
const path = __importStar(require("node:path"));
|
|
40
|
+
/**
|
|
41
|
+
* Recursively searches upwards from the current working directory
|
|
42
|
+
* to find a directory with the given name.
|
|
43
|
+
*
|
|
44
|
+
* @param dirName Name of the directory to find
|
|
45
|
+
* @returns The absolute path to the found directory
|
|
46
|
+
* @throws If the directory cannot be found in the current or any parent path
|
|
47
|
+
*/
|
|
48
|
+
async function findDirectoryUp(dirName, startDirectory = process.cwd()) {
|
|
49
|
+
let currentDir = path.resolve(startDirectory);
|
|
50
|
+
while (true) {
|
|
51
|
+
const candidate = path.join(currentDir, dirName);
|
|
52
|
+
try {
|
|
53
|
+
const stats = await node_fs_1.promises.stat(candidate);
|
|
54
|
+
if (stats.isDirectory()) {
|
|
55
|
+
return candidate;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
if (error.code !== 'ENOENT')
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
const parent = path.dirname(currentDir);
|
|
63
|
+
if (parent === currentDir)
|
|
64
|
+
throw new Error(`Directory "${dirName}" not found`);
|
|
65
|
+
currentDir = parent;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/files.ts"],"names":[],"mappings":";AAAA,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAa9B,0CAiBC;AA5BD,qCAAyC;AACzC,gDAAkC;AAElC;;;;;;;GAOG;AACI,KAAK,UAAU,eAAe,CAAC,OAAe,EAAE,iBAAyB,OAAO,CAAC,GAAG,EAAE;IACzF,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC9C,OAAO,IAAI,EAAE,CAAC;QACV,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC;YACD,MAAM,KAAK,GAAG,MAAM,kBAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACvC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACtB,OAAO,SAAS,CAAC;YACrB,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;gBAAE,MAAM,KAAK,CAAC;QACxE,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,MAAM,KAAK,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,cAAc,OAAO,aAAa,CAAC,CAAC;QAC/E,UAAU,GAAG,MAAM,CAAC;IACxB,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const promises_1 = require("node:fs/promises");
|
|
4
|
+
const node_os_1 = require("node:os");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
const files_1 = require("./files");
|
|
7
|
+
describe('findDirectoryUp', () => {
|
|
8
|
+
let root;
|
|
9
|
+
beforeEach(async () => { root = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobolts-root-')); });
|
|
10
|
+
afterEach(async () => { await (0, promises_1.rm)(root, { recursive: true, force: true }); });
|
|
11
|
+
it('finds the nearest configuration directory upward from a specified start', async () => {
|
|
12
|
+
await (0, promises_1.mkdir)((0, node_path_1.join)(root, '.cobolts'));
|
|
13
|
+
await (0, promises_1.mkdir)((0, node_path_1.join)(root, 'nested', '.cobolts'), { recursive: true });
|
|
14
|
+
await (0, promises_1.mkdir)((0, node_path_1.join)(root, 'nested', 'sub'), { recursive: true });
|
|
15
|
+
expect(await (0, files_1.findDirectoryUp)('.cobolts', (0, node_path_1.join)(root, 'nested', 'sub'))).toEqual((0, node_path_1.join)(root, 'nested', '.cobolts'));
|
|
16
|
+
});
|
|
17
|
+
it('ignores a regular file with the marker name', async () => {
|
|
18
|
+
await (0, promises_1.writeFile)((0, node_path_1.join)(root, '.cobolts'), 'not a directory');
|
|
19
|
+
await (0, promises_1.mkdir)((0, node_path_1.join)(root, 'nested'));
|
|
20
|
+
await expect((0, files_1.findDirectoryUp)('.cobolts', (0, node_path_1.join)(root, 'nested'))).rejects.toThrow('Directory ".cobolts" not found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AQ,EAAE,UAAU,CAAC,CAAC,CAAA;IACpH,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;QACzD,MAAM,IAAA,oBAAS,EAAC,IAAA,gBAAI,EAAC,IAAI,EAAE,UAAU,CAAC,EAAE,iBAAiB,CAAC,CAAA;QAC1D,MAAM,IAAA,gBAAK,EAAC,IAAA,gBAAI,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAA;QACjC,MAAM,MAAM,CAAC,IAAA,uBAAe,EAAC,UAAU,EAAE,IAAA,gBAAI,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAA;IACrH,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The small filesystem port used by configuration and source generation. */
|
|
2
|
+
export interface TextFiles {
|
|
3
|
+
read(filename: string): Promise<string>;
|
|
4
|
+
write(filename: string, text: readonly string[]): Promise<void>;
|
|
5
|
+
exists(filename: string): Promise<boolean>;
|
|
6
|
+
}
|
|
7
|
+
/** Node adapter. Each line supplied to write() occupies one line in the file. */
|
|
8
|
+
export declare const nodeTextFiles: TextFiles;
|
|
9
|
+
export declare const readTextFile: (filename: string) => Promise<string>;
|
|
10
|
+
export declare const writeTextFile: (filename: string, text: readonly string[]) => Promise<void>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.writeTextFile = exports.readTextFile = exports.nodeTextFiles = void 0;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
/** Node adapter. Each line supplied to write() occupies one line in the file. */
|
|
7
|
+
exports.nodeTextFiles = {
|
|
8
|
+
read(filename) {
|
|
9
|
+
return node_fs_1.promises.readFile(filename, 'utf8');
|
|
10
|
+
},
|
|
11
|
+
async write(filename, text) {
|
|
12
|
+
await node_fs_1.promises.mkdir((0, node_path_1.dirname)(filename), { recursive: true });
|
|
13
|
+
await node_fs_1.promises.writeFile(filename, text.join('\n') + (text.length ? '\n' : ''), 'utf8');
|
|
14
|
+
},
|
|
15
|
+
async exists(filename) {
|
|
16
|
+
try {
|
|
17
|
+
await node_fs_1.promises.access(filename);
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (error.code === 'ENOENT')
|
|
22
|
+
return false;
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const readTextFile = (filename) => exports.nodeTextFiles.read(filename);
|
|
28
|
+
exports.readTextFile = readTextFile;
|
|
29
|
+
const writeTextFile = (filename, text) => exports.nodeTextFiles.write(filename, text);
|
|
30
|
+
exports.writeTextFile = writeTextFile;
|
|
31
|
+
//# sourceMappingURL=text.files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.files.js","sourceRoot":"","sources":["../../src/text.files.ts"],"names":[],"mappings":";;;AACA,qCAAsC;AACtC,yCAAiC;AASjC,iFAAiF;AACpE,QAAA,aAAa,GAAc;IACpC,IAAI,CAAC,QAAQ;QACT,OAAO,kBAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IACxC,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI;QACtB,MAAM,kBAAE,CAAC,KAAK,CAAC,IAAA,mBAAO,EAAC,QAAQ,CAAC,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;QACpD,MAAM,kBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAA;IACrF,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,QAAQ;QACjB,IAAI,CAAC;YACD,MAAM,kBAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;YACzB,OAAO,IAAI,CAAA;QACf,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;gBAAE,OAAO,KAAK,CAAA;YACpE,MAAM,KAAK,CAAA;QACf,CAAC;IACL,CAAC;CACJ,CAAA;AAEM,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAmB,EAAE,CAAC,qBAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AAAlF,QAAA,YAAY,gBAAsE;AACxF,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAE,IAAuB,EAAiB,EAAE,CAAC,qBAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;AAAjH,QAAA,aAAa,iBAAoG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const promises_1 = require("node:fs/promises");
|
|
4
|
+
const node_os_1 = require("node:os");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
const text_files_1 = require("./text.files");
|
|
7
|
+
describe('nodeTextFiles', () => {
|
|
8
|
+
it('writes and reads UTF-8 lines, creating parent directories', async () => {
|
|
9
|
+
const directory = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobol-ts-files-'));
|
|
10
|
+
try {
|
|
11
|
+
const filename = (0, node_path_1.join)(directory, 'generated', 'example.ts');
|
|
12
|
+
expect(await text_files_1.nodeTextFiles.exists(filename)).toEqual(false);
|
|
13
|
+
await text_files_1.nodeTextFiles.write(filename, ['export const name = "café"', '']);
|
|
14
|
+
expect(await (0, promises_1.readFile)(filename, 'utf8')).toEqual('export const name = "café"\n\n');
|
|
15
|
+
expect(await text_files_1.nodeTextFiles.read(filename)).toEqual('export const name = "café"\n\n');
|
|
16
|
+
expect(await text_files_1.nodeTextFiles.exists(filename)).toEqual(true);
|
|
17
|
+
}
|
|
18
|
+
finally {
|
|
19
|
+
await (0, promises_1.rm)(directory, { recursive: true, force: true });
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
it('writes an empty file from an empty line array', async () => {
|
|
23
|
+
const directory = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobol-ts-files-'));
|
|
24
|
+
try {
|
|
25
|
+
const filename = (0, node_path_1.join)(directory, 'empty.txt');
|
|
26
|
+
await text_files_1.nodeTextFiles.write(filename, []);
|
|
27
|
+
expect(await text_files_1.nodeTextFiles.read(filename)).toEqual('');
|
|
28
|
+
}
|
|
29
|
+
finally {
|
|
30
|
+
await (0, promises_1.rm)(directory, { recursive: true, force: true });
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
it('replaces an existing generated file with exactly the new lines', async () => {
|
|
34
|
+
const directory = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobol-ts-files-'));
|
|
35
|
+
try {
|
|
36
|
+
const filename = (0, node_path_1.join)(directory, 'generated.ts');
|
|
37
|
+
await text_files_1.nodeTextFiles.write(filename, ['old content', 'no longer present']);
|
|
38
|
+
await text_files_1.nodeTextFiles.write(filename, ['export const value = 42']);
|
|
39
|
+
expect(await text_files_1.nodeTextFiles.read(filename)).toEqual('export const value = 42\n');
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
await (0, promises_1.rm)(directory, { recursive: true, force: true });
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
it('rejects reads of a missing file', async () => {
|
|
46
|
+
const directory = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobol-ts-files-'));
|
|
47
|
+
try {
|
|
48
|
+
const filename = (0, node_path_1.join)(directory, 'missing.ts');
|
|
49
|
+
let code;
|
|
50
|
+
try {
|
|
51
|
+
await text_files_1.nodeTextFiles.read(filename);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
code = error.code;
|
|
55
|
+
}
|
|
56
|
+
expect(code).toEqual('ENOENT');
|
|
57
|
+
expect(await text_files_1.nodeTextFiles.exists(filename)).toEqual(false);
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
await (0, promises_1.rm)(directory, { recursive: true, force: true });
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
it('does not treat a directory as a readable text file', async () => {
|
|
64
|
+
const directory = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobol-ts-files-'));
|
|
65
|
+
try {
|
|
66
|
+
let code;
|
|
67
|
+
try {
|
|
68
|
+
await text_files_1.nodeTextFiles.read(directory);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
code = error.code;
|
|
72
|
+
}
|
|
73
|
+
expect(code).toEqual('EISDIR');
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
await (0, promises_1.rm)(directory, { recursive: true, force: true });
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=text.files.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.files.spec.js","sourceRoot":"","sources":["../../src/text.files.spec.ts"],"names":[],"mappings":";;AAAA,+CAAsD;AACtD,qCAA8B;AAC9B,yCAA8B;AAC9B,6CAA0C;AAE1C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,2DAA2D,EAAE,KAAK,IAAI,EAAE;QACvE,MAAM,SAAS,GAAG,MAAM,IAAA,kBAAO,EAAC,IAAA,gBAAI,EAAC,IAAA,gBAAM,GAAE,EAAE,iBAAiB,CA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utilities for the @cobol-ts project",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"types": "dist/index",
|
|
7
7
|
"browserslist": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cobol-ts/records": "0.0.
|
|
20
|
+
"@cobol-ts/records": "0.0.4"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"typescript": "^5.2.2",
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
"dist/index.js",
|
|
48
48
|
"dist/index.d.ts",
|
|
49
49
|
"dist/src/",
|
|
50
|
-
"build/"
|
|
50
|
+
"build/",
|
|
51
|
+
"dist/**/*"
|
|
51
52
|
],
|
|
52
53
|
"keywords": [
|
|
53
54
|
"indexing"
|