bingo-systems 0.5.0 → 0.5.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/lib/fetchers/types.d.ts +11 -0
- package/lib/fetchers/types.d.ts.map +1 -1
- package/lib/files/createWritingFileSystem.d.ts +2 -2
- package/lib/files/createWritingFileSystem.d.ts.map +1 -1
- package/lib/files/createWritingFileSystem.js +11 -0
- package/lib/files/createWritingFileSystem.js.map +1 -1
- package/lib/files/createWritingFileSystem.test.js +11 -1
- package/lib/files/createWritingFileSystem.test.js.map +1 -1
- package/lib/files/types.d.ts +46 -5
- package/lib/files/types.d.ts.map +1 -1
- package/lib/runner/runner.d.ts +4 -0
- package/lib/runner/runner.d.ts.map +1 -1
- package/lib/types/system.d.ts +12 -0
- package/lib/types/system.d.ts.map +1 -1
- package/package.json +3 -3
package/lib/fetchers/types.d.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { Octokit } from "octokit";
|
|
2
|
+
/**
|
|
3
|
+
* APIs to send network requests.
|
|
4
|
+
*/
|
|
2
5
|
export interface SystemFetchers {
|
|
6
|
+
/**
|
|
7
|
+
* Standard fetch function to send requests.
|
|
8
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API}
|
|
9
|
+
*/
|
|
3
10
|
fetch: typeof fetch;
|
|
11
|
+
/**
|
|
12
|
+
* Octokit.js instance wrapping the same `fetch` function.
|
|
13
|
+
* @see {@link https://octokit.github.io/rest.js}
|
|
14
|
+
*/
|
|
4
15
|
octokit: Octokit;
|
|
5
16
|
}
|
|
6
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/fetchers/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,OAAO,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/fetchers/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;;OAGG;IACH,KAAK,EAAE,OAAO,KAAK,CAAC;IAEpB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreatedFileMetadata } from "bingo-fs";
|
|
2
2
|
export declare function createWritingFileSystem(): {
|
|
3
3
|
writeDirectory: (directoryPath: string) => Promise<undefined>;
|
|
4
|
-
writeFile: (filePath: string, contents: string, options?:
|
|
4
|
+
writeFile: (filePath: string, contents: string, options?: CreatedFileMetadata) => Promise<void>;
|
|
5
5
|
readDirectory: import("./types.js").ReadDirectory;
|
|
6
6
|
readFile: import("./types.js").ReadFile;
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWritingFileSystem.d.ts","sourceRoot":"","sources":["../../src/files/createWritingFileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"createWritingFileSystem.d.ts","sourceRoot":"","sources":["../../src/files/createWritingFileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAK/C,wBAAgB,uBAAuB;oCAGC,MAAM;0BAGjC,MAAM,YACN,MAAM,YACN,mBAAmB;;;EAoB/B"}
|
|
@@ -5,6 +5,17 @@ export function createWritingFileSystem() {
|
|
|
5
5
|
...createReadingFileSystem(),
|
|
6
6
|
writeDirectory: async (directoryPath) => void (await fs.mkdir(directoryPath, { recursive: true })),
|
|
7
7
|
writeFile: async (filePath, contents, options) => {
|
|
8
|
+
try {
|
|
9
|
+
// If the file had custom permissions written, it might support
|
|
10
|
+
// being deleted but not being written to.
|
|
11
|
+
// https://github.com/JoshuaKGoldberg/bingo/issues/238
|
|
12
|
+
await fs.rm(filePath);
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
// If the file didn't exist, that's fine too.
|
|
16
|
+
// Or if we don't have rm permissions, we probably won't have
|
|
17
|
+
// write permissions, so the subsequent writeFile will fail.
|
|
18
|
+
}
|
|
8
19
|
await fs.writeFile(filePath, contents, options?.executable ? { mode: 0x755 } : undefined);
|
|
9
20
|
},
|
|
10
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWritingFileSystem.js","sourceRoot":"","sources":["../../src/files/createWritingFileSystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,UAAU,uBAAuB;IACtC,OAAO;QACN,GAAG,uBAAuB,EAAE;QAC5B,cAAc,EAAE,KAAK,EAAE,aAAqB,EAAE,EAAE,CAC/C,KAAK,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,SAAS,EAAE,KAAK,EACf,QAAgB,EAChB,QAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"createWritingFileSystem.js","sourceRoot":"","sources":["../../src/files/createWritingFileSystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,UAAU,uBAAuB;IACtC,OAAO;QACN,GAAG,uBAAuB,EAAE;QAC5B,cAAc,EAAE,KAAK,EAAE,aAAqB,EAAE,EAAE,CAC/C,KAAK,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,SAAS,EAAE,KAAK,EACf,QAAgB,EAChB,QAAgB,EAChB,OAA6B,EAC5B,EAAE;YACH,IAAI,CAAC;gBACJ,+DAA+D;gBAC/D,0CAA0C;gBAC1C,sDAAsD;gBACtD,MAAM,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;YACvB,CAAC;YAAC,MAAM,CAAC;gBACR,6CAA6C;gBAC7C,6DAA6D;gBAC7D,4DAA4D;YAC7D,CAAC;YAED,MAAM,EAAE,CAAC,SAAS,CACjB,QAAQ,EACR,QAAQ,EACR,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CACjD,CAAC;QACH,CAAC;KACD,CAAC;AACH,CAAC"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from "vitest";
|
|
2
2
|
import { createWritingFileSystem } from "./createWritingFileSystem.js";
|
|
3
3
|
const mockMkdir = vi.fn();
|
|
4
|
+
const mockRm = vi.fn();
|
|
4
5
|
const mockWriteFile = vi.fn();
|
|
5
6
|
vi.mock("node:fs/promises", () => ({
|
|
6
7
|
get mkdir() {
|
|
7
8
|
return mockMkdir;
|
|
8
9
|
},
|
|
10
|
+
get rm() {
|
|
11
|
+
return mockRm;
|
|
12
|
+
},
|
|
9
13
|
get writeFile() {
|
|
10
14
|
return mockWriteFile;
|
|
11
15
|
},
|
|
@@ -24,7 +28,13 @@ describe("createWritingFileSystem", () => {
|
|
|
24
28
|
});
|
|
25
29
|
});
|
|
26
30
|
describe("writeFile", () => {
|
|
27
|
-
it("writes without mode when options does not exist", async () => {
|
|
31
|
+
it("writes without mode when options does not exist and rm rejects", async () => {
|
|
32
|
+
mockRm.mockRejectedValueOnce(new Error("Oh no!"));
|
|
33
|
+
const system = createWritingFileSystem();
|
|
34
|
+
await system.writeFile(filePath, contents);
|
|
35
|
+
expect(mockWriteFile).toHaveBeenCalledWith(filePath, contents, undefined);
|
|
36
|
+
});
|
|
37
|
+
it("writes without mode when options does not exist and rm does not reject", async () => {
|
|
28
38
|
const system = createWritingFileSystem();
|
|
29
39
|
await system.writeFile(filePath, contents);
|
|
30
40
|
expect(mockWriteFile).toHaveBeenCalledWith(filePath, contents, undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWritingFileSystem.test.js","sourceRoot":"","sources":["../../src/files/createWritingFileSystem.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAElD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,SAAS,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;AAC1B,MAAM,aAAa,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;AAE9B,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,CAAC;IAClC,IAAI,KAAK;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,IAAI,SAAS;QACZ,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC,CAAC,CAAC;AAEJ,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAC1B,MAAM,aAAa,GAAG,cAAc,CAAC;AACrC,MAAM,QAAQ,GAAG,cAAc,CAAC;AAEhC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACxC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;QAC/B,EAAE,CAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;YAC5C,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;YAEzC,MAAM,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YAE3C,MAAM,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,aAAa,EAAE;gBACrD,SAAS,EAAE,IAAI;aACf,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;I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Aa,CAAC,CAAC,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE;gBAC9D,IAAI,EAAE,KAAK;aACX,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/files/types.d.ts
CHANGED
|
@@ -1,20 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Reads the names of a directory's children.
|
|
3
|
+
* @param directoryPath Path to the directory on disk.
|
|
4
|
+
* @returns Promise for the names of the directory's children.
|
|
5
|
+
*/
|
|
6
|
+
export type ReadDirectory = (directoryPath: string) => Promise<string[]>;
|
|
7
|
+
/**
|
|
8
|
+
* Reads the contents of a file.
|
|
9
|
+
* @param filePath Path to the file on disk.
|
|
10
|
+
* @returns Promise for the text contents of the file.
|
|
11
|
+
*/
|
|
6
12
|
export type ReadFile = (filePath: string) => Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* APIs to read from a file system.
|
|
15
|
+
*/
|
|
7
16
|
export interface ReadingFileSystem {
|
|
17
|
+
/**
|
|
18
|
+
* Reads the names of a directory's children.
|
|
19
|
+
*/
|
|
8
20
|
readDirectory: ReadDirectory;
|
|
21
|
+
/**
|
|
22
|
+
* Reads the contents of a file.
|
|
23
|
+
*/
|
|
9
24
|
readFile: ReadFile;
|
|
10
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Creates a directory if it doesn't yet exist.
|
|
28
|
+
* @param directoryPath Path to the directory on disk.
|
|
29
|
+
*/
|
|
11
30
|
export type WriteDirectory = (directoryPath: string) => Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Writes contents to a file, updating it if it already exists.
|
|
33
|
+
* @param filePath Path to the file on disk.
|
|
34
|
+
* @param contents New contents for the file.
|
|
35
|
+
* @param options Extra metadata to attach to the file.
|
|
36
|
+
* @returns Promise for the text contents of the file.
|
|
37
|
+
*/
|
|
12
38
|
export type WriteFile = (filePath: string, contents: string, options?: WriteFileOptions) => Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Extra metadata for writing a file.
|
|
41
|
+
*/
|
|
13
42
|
export interface WriteFileOptions {
|
|
43
|
+
/**
|
|
44
|
+
* Whether the file has an executable bit enabled.
|
|
45
|
+
*/
|
|
14
46
|
executable?: boolean;
|
|
15
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* APIs to read from and write to a file system.
|
|
50
|
+
*/
|
|
16
51
|
export interface WritingFileSystem extends ReadingFileSystem {
|
|
52
|
+
/**
|
|
53
|
+
* Creates a directory if it doesn't yet exist.
|
|
54
|
+
*/
|
|
17
55
|
writeDirectory: WriteDirectory;
|
|
56
|
+
/**
|
|
57
|
+
* Writes contents to a file, updating it if it already exists.
|
|
58
|
+
*/
|
|
18
59
|
writeFile: WriteFile;
|
|
19
60
|
}
|
|
20
61
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/files/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/files/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/files/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,aAAa,EAAE,aAAa,CAAC;IAE7B;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,CACvB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,gBAAgB,KACtB,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC3D;;OAEG;IACH,cAAc,EAAE,cAAc,CAAC;IAE/B;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;CACrB"}
|
package/lib/runner/runner.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ExecaError, Result } from "execa";
|
|
2
|
+
/**
|
|
3
|
+
* Executes a command in the system shell.
|
|
4
|
+
* @see {@link https://github.com/sindresorhus/execa}
|
|
5
|
+
*/
|
|
2
6
|
export type SystemRunner = (command: string) => Promise<ExecaError | Result>;
|
|
3
7
|
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/runner/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/runner/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE3C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,CAAC"}
|
package/lib/types/system.d.ts
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { SystemFetchers } from "../fetchers/types.js";
|
|
2
2
|
import { WritingFileSystem } from "../files/types.js";
|
|
3
3
|
import { SystemRunner } from "../runner/runner.js";
|
|
4
|
+
/**
|
|
5
|
+
* Shared APIs used by Bingo preparers, producers, and runners.
|
|
6
|
+
*/
|
|
4
7
|
export interface BingoSystem {
|
|
8
|
+
/**
|
|
9
|
+
* APIs to send network requests.
|
|
10
|
+
*/
|
|
5
11
|
fetchers: SystemFetchers;
|
|
12
|
+
/**
|
|
13
|
+
* APIs to read from and write to a file system.
|
|
14
|
+
*/
|
|
6
15
|
fs: WritingFileSystem;
|
|
16
|
+
/**
|
|
17
|
+
* Executes a command in the system shell.
|
|
18
|
+
*/
|
|
7
19
|
runner: SystemRunner;
|
|
8
20
|
}
|
|
9
21
|
//# sourceMappingURL=system.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/types/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC3B,QAAQ,EAAE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/types/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,QAAQ,EAAE,cAAc,CAAC;IAEzB;;OAEG;IACH,EAAE,EAAE,iBAAiB,CAAC;IAEtB;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bingo-systems",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "File, network, and shell wrapper APIs used by Bingo. 🧰",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"README.md"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"bingo-fs": "^0.5.0",
|
|
25
24
|
"execa": "^9.5.2",
|
|
26
25
|
"get-github-auth-token": "^0.1.1",
|
|
27
|
-
"octokit": "^4.1.2"
|
|
26
|
+
"octokit": "^4.1.2",
|
|
27
|
+
"bingo-fs": "^0.5.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "22.13.4"
|