agkan 3.15.1 → 3.15.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/dist/board/boardRoutes.d.ts.map +1 -1
- package/dist/board/boardRoutes.js +16 -0
- package/dist/board/boardRoutes.js.map +1 -1
- package/dist/board/client/main.js +103 -183
- package/dist/cli/commands/task/list.d.ts.map +1 -1
- package/dist/cli/commands/task/list.js +36 -6
- package/dist/cli/commands/task/list.js.map +1 -1
- package/dist/db/adapters/sqlite-storage-backend.js +4 -4
- package/dist/db/adapters/sqlite-storage-backend.js.map +1 -1
- package/dist/services/ExportImportService.d.ts +11 -0
- package/dist/services/ExportImportService.d.ts.map +1 -1
- package/dist/services/ExportImportService.js +44 -30
- package/dist/services/ExportImportService.js.map +1 -1
- package/dist/terminal/PtySessionService.d.ts.map +1 -1
- package/dist/terminal/PtySessionService.js +23 -12
- package/dist/terminal/PtySessionService.js.map +1 -1
- package/dist/terminal/ensureSpawnHelperExecutable.d.ts +31 -0
- package/dist/terminal/ensureSpawnHelperExecutable.d.ts.map +1 -0
- package/dist/terminal/ensureSpawnHelperExecutable.js +89 -0
- package/dist/terminal/ensureSpawnHelperExecutable.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Make a single file executable (chmod +x equivalent) if it exists and lacks
|
|
3
|
+
* execute bits. Best-effort: never throws. Returns true only when it changed
|
|
4
|
+
* the file's mode.
|
|
5
|
+
*/
|
|
6
|
+
export declare function makeExecutable(filePath: string): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Find `spawn-helper` under a node-pty package directory, checking each
|
|
9
|
+
* search dir in order and returning the first one that exists.
|
|
10
|
+
*/
|
|
11
|
+
export declare function findSpawnHelperInPackage(pkgRoot: string, searchDirs?: string[]): string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Resolve node-pty's `spawn-helper` binary path for the current install.
|
|
14
|
+
* Returns null when node-pty cannot be resolved or spawn-helper isn't found
|
|
15
|
+
* in any of its known locations.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveSpawnHelperPath(): string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Startup self-heal for the node-pty `spawn-helper` binary.
|
|
20
|
+
*
|
|
21
|
+
* Under pnpm on macOS the prebuilt `spawn-helper` is materialized as a clone of
|
|
22
|
+
* the store copy (mode 0644), so it loses its execute bit on every install and
|
|
23
|
+
* `pty.spawn()` fails with "posix_spawnp failed.". The install-time
|
|
24
|
+
* scripts/fix-node-pty-perms.mjs is the first line of defense; this runtime
|
|
25
|
+
* self-heal guarantees the bit is set before the first spawn regardless of how
|
|
26
|
+
* node_modules was materialized (cache restore, --ignore-scripts, etc.).
|
|
27
|
+
*
|
|
28
|
+
* Runs at most once per process and never throws.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ensureSpawnHelperExecutable(): void;
|
|
31
|
+
//# sourceMappingURL=ensureSpawnHelperExecutable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensureSpawnHelperExecutable.d.ts","sourceRoot":"","sources":["../../src/terminal/ensureSpawnHelperExecutable.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAUxD;AAQD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,MAAM,EAA6B,GAC9C,MAAM,GAAG,IAAI,CAMf;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAQtD;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,IAAI,IAAI,CAUlD"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeExecutable = makeExecutable;
|
|
4
|
+
exports.findSpawnHelperInPackage = findSpawnHelperInPackage;
|
|
5
|
+
exports.resolveSpawnHelperPath = resolveSpawnHelperPath;
|
|
6
|
+
exports.ensureSpawnHelperExecutable = ensureSpawnHelperExecutable;
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const module_1 = require("module");
|
|
10
|
+
const EXEC_BITS = 0o111;
|
|
11
|
+
/**
|
|
12
|
+
* Make a single file executable (chmod +x equivalent) if it exists and lacks
|
|
13
|
+
* execute bits. Best-effort: never throws. Returns true only when it changed
|
|
14
|
+
* the file's mode.
|
|
15
|
+
*/
|
|
16
|
+
function makeExecutable(filePath) {
|
|
17
|
+
try {
|
|
18
|
+
if (!(0, fs_1.existsSync)(filePath))
|
|
19
|
+
return false;
|
|
20
|
+
const mode = (0, fs_1.statSync)(filePath).mode;
|
|
21
|
+
if ((mode & EXEC_BITS) === EXEC_BITS)
|
|
22
|
+
return false;
|
|
23
|
+
(0, fs_1.chmodSync)(filePath, mode | EXEC_BITS);
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
// Mirrors node-pty's own lookup order (see node-pty's src/utils.ts
|
|
31
|
+
// loadNativeModule): a node-gyp source build lands in build/Release (or
|
|
32
|
+
// build/Debug), while platforms with no compiled output ship a bundled
|
|
33
|
+
// prebuild instead.
|
|
34
|
+
const SPAWN_HELPER_SEARCH_DIRS = ['build/Release', 'build/Debug', `prebuilds/${process.platform}-${process.arch}`];
|
|
35
|
+
/**
|
|
36
|
+
* Find `spawn-helper` under a node-pty package directory, checking each
|
|
37
|
+
* search dir in order and returning the first one that exists.
|
|
38
|
+
*/
|
|
39
|
+
function findSpawnHelperInPackage(pkgRoot, searchDirs = SPAWN_HELPER_SEARCH_DIRS) {
|
|
40
|
+
for (const dir of searchDirs) {
|
|
41
|
+
const candidate = (0, path_1.join)(pkgRoot, dir, 'spawn-helper');
|
|
42
|
+
if ((0, fs_1.existsSync)(candidate))
|
|
43
|
+
return candidate;
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Resolve node-pty's `spawn-helper` binary path for the current install.
|
|
49
|
+
* Returns null when node-pty cannot be resolved or spawn-helper isn't found
|
|
50
|
+
* in any of its known locations.
|
|
51
|
+
*/
|
|
52
|
+
function resolveSpawnHelperPath() {
|
|
53
|
+
try {
|
|
54
|
+
const require = (0, module_1.createRequire)(__filename);
|
|
55
|
+
const pkgPath = require.resolve('node-pty/package.json');
|
|
56
|
+
return findSpawnHelperInPackage((0, path_1.dirname)(pkgPath));
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
let healed = false;
|
|
63
|
+
/**
|
|
64
|
+
* Startup self-heal for the node-pty `spawn-helper` binary.
|
|
65
|
+
*
|
|
66
|
+
* Under pnpm on macOS the prebuilt `spawn-helper` is materialized as a clone of
|
|
67
|
+
* the store copy (mode 0644), so it loses its execute bit on every install and
|
|
68
|
+
* `pty.spawn()` fails with "posix_spawnp failed.". The install-time
|
|
69
|
+
* scripts/fix-node-pty-perms.mjs is the first line of defense; this runtime
|
|
70
|
+
* self-heal guarantees the bit is set before the first spawn regardless of how
|
|
71
|
+
* node_modules was materialized (cache restore, --ignore-scripts, etc.).
|
|
72
|
+
*
|
|
73
|
+
* Runs at most once per process and never throws.
|
|
74
|
+
*/
|
|
75
|
+
function ensureSpawnHelperExecutable() {
|
|
76
|
+
if (healed)
|
|
77
|
+
return;
|
|
78
|
+
healed = true;
|
|
79
|
+
// Windows node-pty uses conpty/winpty, not spawn-helper.
|
|
80
|
+
if (process.platform === 'win32')
|
|
81
|
+
return;
|
|
82
|
+
const helper = resolveSpawnHelperPath();
|
|
83
|
+
if (!helper)
|
|
84
|
+
return;
|
|
85
|
+
if (makeExecutable(helper)) {
|
|
86
|
+
console.error(`[pty] self-healed node-pty spawn-helper permissions (+x): ${helper}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=ensureSpawnHelperExecutable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensureSpawnHelperExecutable.js","sourceRoot":"","sources":["../../src/terminal/ensureSpawnHelperExecutable.ts"],"names":[],"mappings":";;AAWA,wCAUC;AAYD,4DASC;AAOD,wDAQC;AAgBD,kEAUC;AAnFD,2BAAqD;AACrD,+BAAqC;AACrC,mCAAuC;AAEvC,MAAM,SAAS,GAAG,KAAK,CAAC;AAExB;;;;GAIG;AACH,SAAgB,cAAc,CAAC,QAAgB;IAC7C,IAAI,CAAC;QACH,IAAI,CAAC,IAAA,eAAU,EAAC,QAAQ,CAAC;YAAE,OAAO,KAAK,CAAC;QACxC,MAAM,IAAI,GAAG,IAAA,aAAQ,EAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QACnD,IAAA,cAAS,EAAC,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,mEAAmE;AACnE,wEAAwE;AACxE,uEAAuE;AACvE,oBAAoB;AACpB,MAAM,wBAAwB,GAAG,CAAC,eAAe,EAAE,aAAa,EAAE,aAAa,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AAEnH;;;GAGG;AACH,SAAgB,wBAAwB,CACtC,OAAe,EACf,aAAuB,wBAAwB;IAE/C,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,MAAM,SAAS,GAAG,IAAA,WAAI,EAAC,OAAO,EAAE,GAAG,EAAE,cAAc,CAAC,CAAC;QACrD,IAAI,IAAA,eAAU,EAAC,SAAS,CAAC;YAAE,OAAO,SAAS,CAAC;IAC9C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,SAAgB,sBAAsB;IACpC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,sBAAa,EAAC,UAAU,CAAC,CAAC;QAC1C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;QACzD,OAAO,wBAAwB,CAAC,IAAA,cAAO,EAAC,OAAO,CAAC,CAAC,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB;;;;;;;;;;;GAWG;AACH,SAAgB,2BAA2B;IACzC,IAAI,MAAM;QAAE,OAAO;IACnB,MAAM,GAAG,IAAI,CAAC;IACd,yDAAyD;IACzD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;QAAE,OAAO;IACzC,MAAM,MAAM,GAAG,sBAAsB,EAAE,CAAC;IACxC,IAAI,CAAC,MAAM;QAAE,OAAO;IACpB,IAAI,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,KAAK,CAAC,6DAA6D,MAAM,EAAE,CAAC,CAAC;IACvF,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agkan",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.2",
|
|
4
4
|
"description": "TypeScript-based CLI task management tool with SQLite storage",
|
|
5
5
|
"main": "dist/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
|
|
77
77
|
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"",
|
|
78
78
|
"type-check": "tsc --noEmit && tsc --noEmit -p src/board/client/tsconfig.json",
|
|
79
|
-
"check": "pnpm run type-check && pnpm run lint && pnpm run format:check"
|
|
79
|
+
"check": "pnpm run type-check && pnpm run lint && pnpm run format:check",
|
|
80
|
+
"postinstall": "node scripts/fix-node-pty-perms.mjs"
|
|
80
81
|
}
|
|
81
82
|
}
|