closeout 0.0.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/README.md +22 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# closeout
|
|
2
|
+
|
|
3
|
+
**Not yet released, and not yet on the roadmap.** This version reserves the name. The layer,
|
|
4
|
+
its incumbents and the measurements behind it are documented in
|
|
5
|
+
[`.sdlc/research/candidate-layers.md`](https://github.com/ofri-peretz/burgee/blob/main/.sdlc/research/candidate-layers.md).
|
|
6
|
+
An intent and a working release follow if and when the roadmap takes it up.
|
|
7
|
+
|
|
8
|
+
To **close out** is to settle and finish — an account, a position, a shift. Everything outstanding is resolved and nothing is left open.
|
|
9
|
+
|
|
10
|
+
That is what a process should do on the way out, and mostly does not: handlers run once, resources released, the terminal returned to how it was found, and a deadline so a hung handler cannot hold the door.
|
|
11
|
+
|
|
12
|
+
## What it will be
|
|
13
|
+
|
|
14
|
+
- **Exactly once, on every path.** Normal exit, every signal, uncaught exception, unhandled rejection. Registering twice does not run twice.
|
|
15
|
+
- **Terminal restore.** Cursor, raw mode and alternate screen returned to how they were found, so a cancelled program never leaves a terminal it broke.
|
|
16
|
+
- **A bounded deadline.** Cleanup that hangs is cleanup that failed. Handlers get a budget, and exceeding it is reported rather than waited on — a hung handler is exactly what strands an agent with no human on deck.
|
|
17
|
+
- **Drop-in paths** for `signal-exit`, `exit-hook` and `restore-cursor`, graded by their own suites.
|
|
18
|
+
- **Zero external dependencies.**
|
|
19
|
+
|
|
20
|
+
## Licence
|
|
21
|
+
|
|
22
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* closeout — name reserved, not yet on the roadmap. The layer and the measurements
|
|
3
|
+
* behind it are documented in .sdlc/research/candidate-layers.md in the burgee
|
|
4
|
+
* repository. Until an intent is opened this entry exports only its own name, so
|
|
5
|
+
* that importing it costs nothing and promises nothing.
|
|
6
|
+
*/
|
|
7
|
+
export declare const name: "closeout";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* closeout — name reserved, not yet on the roadmap. The layer and the measurements
|
|
3
|
+
* behind it are documented in .sdlc/research/candidate-layers.md in the burgee
|
|
4
|
+
* repository. Until an intent is opened this entry exports only its own name, so
|
|
5
|
+
* that importing it costs nothing and promises nothing.
|
|
6
|
+
*/
|
|
7
|
+
export const name = 'closeout';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "closeout",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Close everything out. Exit handlers that run exactly once on every path, terminal restore, and a bounded deadline so shutdown cannot hang. Drop-in paths for signal-exit, exit-hook and restore-cursor. Zero dependencies.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=24"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"!dist/**/*.map",
|
|
20
|
+
"!dist/**/*.test.*"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc -p tsconfig.build.json",
|
|
24
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
25
|
+
"test": "vitest run --passWithNoTests",
|
|
26
|
+
"lint": "eslint src"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/ofri-peretz/burgee.git",
|
|
31
|
+
"directory": "packages/closeout"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/ofri-peretz/burgee/tree/main/packages/closeout#readme",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/ofri-peretz/burgee/issues"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"cli",
|
|
39
|
+
"terminal",
|
|
40
|
+
"exit",
|
|
41
|
+
"signal",
|
|
42
|
+
"signal-exit",
|
|
43
|
+
"exit-hook",
|
|
44
|
+
"cleanup",
|
|
45
|
+
"shutdown",
|
|
46
|
+
"restore-cursor",
|
|
47
|
+
"teardown"
|
|
48
|
+
],
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"vitest": "^4.0.0"
|
|
51
|
+
}
|
|
52
|
+
}
|