poe-code 4.0.46 → 4.0.48
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/config-testing.d.ts +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/modules/fs.conformance-cases.js +2 -2
- package/packages/safejs/dist/modules/fs.js +7 -2
- package/packages/terminal-pilot-mcp/dist/index.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { constants as nodeFsConstants } from "node:fs";
|
|
2
|
-
import
|
|
2
|
+
import * as nodeUtil from "node:util";
|
|
3
3
|
import { Volume, createFsFromVolume } from "memfs";
|
|
4
4
|
import { makeFsModule } from "./fs.js";
|
|
5
5
|
// The one case table the fs module's conformance is measured against. It is data rather than
|
|
@@ -63,7 +63,7 @@ export const HANGS = "hangs";
|
|
|
63
63
|
// back from the table is what keeps an expectation the platform's answer rather than
|
|
64
64
|
// the darwin numbers and wording these cases happened to be recorded on.
|
|
65
65
|
export function readSystemError(code) {
|
|
66
|
-
const entry = [...getSystemErrorMap()].find(([, [name]]) => name === code);
|
|
66
|
+
const entry = [...(nodeUtil.getSystemErrorMap?.() ?? [])].find(([, [name]]) => name === code);
|
|
67
67
|
/* c8 ignore next 3 -- every code this table names is one node defines. */
|
|
68
68
|
if (entry === undefined) {
|
|
69
69
|
throw new Error(`node does not define the ${code} system error.`);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { constants as nodeFsConstants } from "node:fs";
|
|
2
2
|
import * as nodeFsPromises from "node:fs/promises";
|
|
3
3
|
import { dirname, isAbsolute, resolve } from "node:path";
|
|
4
|
-
import {
|
|
4
|
+
import { inspect } from "node:util";
|
|
5
|
+
import * as nodeUtil from "node:util";
|
|
5
6
|
import { declareHostOperation } from "../interp/host-bridge.js";
|
|
6
7
|
import { containsPath, resolveCanonicalPath } from "./canonical-path.js";
|
|
7
8
|
// Whether node answers with a Buffer when an encoding is not given: readFile
|
|
@@ -449,7 +450,11 @@ function createAccessDeniedError(name, path, dest) {
|
|
|
449
450
|
return error;
|
|
450
451
|
}
|
|
451
452
|
function readSystemError(code) {
|
|
452
|
-
|
|
453
|
+
const fallback = new Map([
|
|
454
|
+
[process.platform === "win32" ? -4092 : -13, ["EACCES", "permission denied"]]
|
|
455
|
+
]);
|
|
456
|
+
const systemErrors = nodeUtil.getSystemErrorMap?.() ?? fallback;
|
|
457
|
+
for (const [errno, [name, message]] of systemErrors) {
|
|
453
458
|
if (name === code) {
|
|
454
459
|
return [errno, message];
|
|
455
460
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Command } from "../../toolcraft/dist/index.js";
|
|
2
|
-
import { type TerminalPilotCommandServices } from "../../terminal-pilot/dist/commands.js";
|
|
2
|
+
import { type TerminalPilotCommandServices } from "../../terminal-pilot/dist/commands/index.js";
|
|
3
3
|
type TerminalPilotMCPCommand = Command<TerminalPilotCommandServices, any, any, any>;
|
|
4
4
|
export declare function createTerminalPilotMCPGroup(): import("../../toolcraft/dist/index.js").Group<TerminalPilotCommandServices> & {
|
|
5
5
|
readonly __agentKitGroupTypeInfo: import("../../toolcraft/dist/index.js").GroupTypeInfo<TerminalPilotCommandServices, "", TerminalPilotMCPCommand[], readonly ["mcp"], undefined>;
|