@adecore/agents 0.40.1 → 0.40.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/fs.d.ts +1 -0
- package/dist/fs.js +11 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/src/fs.ts +12 -1
- package/src/index.ts +1 -1
package/dist/fs.d.ts
CHANGED
|
@@ -11,3 +11,4 @@ export declare function removeFile(path: string, remove?: (path: string, options
|
|
|
11
11
|
force: true;
|
|
12
12
|
}) => Promise<void>): Promise<void>;
|
|
13
13
|
export declare function fileExists(path: string): Promise<boolean>;
|
|
14
|
+
export declare function entryExists(path: string): Promise<boolean>;
|
package/dist/fs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { renameSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { open, rename, rm, stat, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { lstat, open, rename, rm, stat, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { dirname } from 'node:path';
|
|
4
4
|
import { wait } from './async.js';
|
|
5
5
|
// Windows can refuse a rename while a watcher or an indexer holds the target; a few short retries cover it.
|
|
@@ -120,3 +120,13 @@ export async function fileExists(path) {
|
|
|
120
120
|
return false;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
+
/* Whether anything is at the path, a link that leads nowhere included, where `fileExists` follows the link. */
|
|
124
|
+
export async function entryExists(path) {
|
|
125
|
+
try {
|
|
126
|
+
await lstat(path);
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { wait, withTimeout } from './async.ts';
|
|
2
2
|
export { CodedError } from './coded-error.ts';
|
|
3
3
|
export { describeError, setErrorStacks, errorText } from './error-text.ts';
|
|
4
|
-
export { tempNameFor, writeAtomic, replaceSync, writeAtomicSync, isNotFound, fileExists, type WriteAtomicOptions } from './fs.ts';
|
|
4
|
+
export { tempNameFor, writeAtomic, replaceSync, writeAtomicSync, isNotFound, fileExists, entryExists, type WriteAtomicOptions } from './fs.ts';
|
|
5
5
|
export { RecordDirectory, type RecordDirectoryOptions } from './record-directory.ts';
|
|
6
6
|
export { runProcess, type ProcessResult, type RunProcessOptions } from './run-process.ts';
|
|
7
7
|
export { Serializer, KeyedSerializer } from './serializer.ts';
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export { wait, withTimeout } from './async.js';
|
|
3
3
|
export { CodedError } from './coded-error.js';
|
|
4
4
|
export { describeError, setErrorStacks, errorText } from './error-text.js';
|
|
5
|
-
export { tempNameFor, writeAtomic, replaceSync, writeAtomicSync, isNotFound, fileExists } from './fs.js';
|
|
5
|
+
export { tempNameFor, writeAtomic, replaceSync, writeAtomicSync, isNotFound, fileExists, entryExists } from './fs.js';
|
|
6
6
|
export { RecordDirectory } from './record-directory.js';
|
|
7
7
|
export { runProcess } from './run-process.js';
|
|
8
8
|
export { Serializer, KeyedSerializer } from './serializer.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agents",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.2",
|
|
4
4
|
"description": "Node-compatible agent chat hosts, providers, accounts, usage and durable task coordination.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"test": "bun --conditions=source test"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@adecore/agent-contracts": "0.40.
|
|
85
|
-
"@adecore/intelligent-ui": "0.40.
|
|
84
|
+
"@adecore/agent-contracts": "0.40.2",
|
|
85
|
+
"@adecore/intelligent-ui": "0.40.2",
|
|
86
86
|
"zod": "^4.6.7"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
package/src/fs.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { renameSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { open, rename, rm, stat, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { lstat, open, rename, rm, stat, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { dirname } from 'node:path';
|
|
4
4
|
import { wait } from './async.ts';
|
|
5
5
|
|
|
@@ -143,3 +143,14 @@ export async function fileExists(path: string): Promise<boolean> {
|
|
|
143
143
|
return false;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
+
|
|
147
|
+
/* Whether anything is at the path, a link that leads nowhere included, where `fileExists` follows the link. */
|
|
148
|
+
export async function entryExists(path: string): Promise<boolean> {
|
|
149
|
+
try {
|
|
150
|
+
await lstat(path);
|
|
151
|
+
|
|
152
|
+
return true;
|
|
153
|
+
} catch {
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export { wait, withTimeout } from './async.ts';
|
|
3
3
|
export { CodedError } from './coded-error.ts';
|
|
4
4
|
export { describeError, setErrorStacks, errorText } from './error-text.ts';
|
|
5
|
-
export { tempNameFor, writeAtomic, replaceSync, writeAtomicSync, isNotFound, fileExists, type WriteAtomicOptions } from './fs.ts';
|
|
5
|
+
export { tempNameFor, writeAtomic, replaceSync, writeAtomicSync, isNotFound, fileExists, entryExists, type WriteAtomicOptions } from './fs.ts';
|
|
6
6
|
export { RecordDirectory, type RecordDirectoryOptions } from './record-directory.ts';
|
|
7
7
|
export { runProcess, type ProcessResult, type RunProcessOptions } from './run-process.ts';
|
|
8
8
|
export { Serializer, KeyedSerializer } from './serializer.ts';
|