@tickernelz/wardmote-adapter-utils 2026.1111.0 → 2026.1112.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/dist/acpx-engine/execute.js +7 -7
- package/dist/acpx-engine/execute.js.map +1 -1
- package/dist/chat-file-delivery.d.ts +1 -1
- package/dist/chat-file-delivery.d.ts.map +1 -1
- package/dist/chat-file-delivery.js +1 -1
- package/dist/chat-file-delivery.js.map +1 -1
- package/dist/chat-file-delivery.test.js +1 -1
- package/dist/chat-file-delivery.test.js.map +1 -1
- package/dist/github-launcher.test.js +1 -1
- package/dist/github-launcher.test.js.map +1 -1
- package/dist/server-utils-env.test.js +1 -1
- package/dist/server-utils-env.test.js.map +1 -1
- package/dist/server-utils.test.js +8 -8
- package/dist/server-utils.test.js.map +1 -1
- package/dist/session-compaction.js +1 -1
- package/dist/session-compaction.js.map +1 -1
- package/node_modules/bare-path/README.md +8 -0
- package/node_modules/bare-path/binding.c +33 -12
- package/node_modules/bare-path/index.d.ts +64 -0
- package/node_modules/bare-path/package.json +1 -1
- package/node_modules/bare-path/prebuilds/android-arm/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/android-arm64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/android-ia32/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/android-x64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/darwin-arm64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/darwin-x64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/ios-arm64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/ios-arm64-simulator/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/ios-x64-simulator/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/linux-arm64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/linux-x64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/win32-arm64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/win32-x64/bare-path.bare +0 -0
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#include <bare.h>
|
|
3
3
|
#include <js.h>
|
|
4
4
|
#include <stddef.h>
|
|
5
|
+
#include <stdlib.h>
|
|
5
6
|
#include <utf.h>
|
|
6
7
|
#include <uv.h>
|
|
7
8
|
|
|
@@ -47,39 +48,59 @@ bare_path_cwd(js_env_t *env, js_callback_info_t *info) {
|
|
|
47
48
|
) {
|
|
48
49
|
char name[4] = {'=', (char) device[0], ':', '\0'};
|
|
49
50
|
|
|
50
|
-
char
|
|
51
|
-
|
|
51
|
+
char buffer[256];
|
|
52
|
+
char *value = buffer;
|
|
53
|
+
size_t value_len = sizeof(buffer);
|
|
52
54
|
|
|
53
55
|
err = uv_os_getenv(name, value, &value_len);
|
|
54
56
|
|
|
57
|
+
// The stack buffer only has to fit the common case. A longer value has
|
|
58
|
+
// its length reported and is read again into a buffer that fits it.
|
|
59
|
+
if (err == UV_ENOBUFS) {
|
|
60
|
+
value = malloc(value_len);
|
|
61
|
+
|
|
62
|
+
err = uv_os_getenv(name, value, &value_len);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
js_value_t *result = NULL;
|
|
66
|
+
|
|
55
67
|
// Fall through to the process working directory when the variable is
|
|
56
68
|
// unset or otherwise cannot be read.
|
|
57
69
|
if (err == 0) {
|
|
58
|
-
js_value_t *result;
|
|
59
70
|
err = js_create_string_utf8(env, (utf8_t *) value, value_len, &result);
|
|
60
71
|
assert(err == 0);
|
|
61
|
-
|
|
62
|
-
return result;
|
|
63
72
|
}
|
|
73
|
+
|
|
74
|
+
if (value != buffer) free(value);
|
|
75
|
+
|
|
76
|
+
if (result) return result;
|
|
64
77
|
}
|
|
65
78
|
}
|
|
66
79
|
}
|
|
67
80
|
|
|
68
|
-
char
|
|
69
|
-
|
|
81
|
+
char buffer[256];
|
|
82
|
+
char *cwd = buffer;
|
|
83
|
+
size_t cwd_len = sizeof(buffer);
|
|
70
84
|
|
|
71
85
|
err = uv_cwd(cwd, &cwd_len);
|
|
72
86
|
|
|
87
|
+
if (err == UV_ENOBUFS) {
|
|
88
|
+
cwd = malloc(cwd_len);
|
|
89
|
+
|
|
90
|
+
err = uv_cwd(cwd, &cwd_len);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
js_value_t *result = NULL;
|
|
94
|
+
|
|
73
95
|
if (err < 0) {
|
|
74
96
|
err = js_throw_error(env, uv_err_name(err), uv_strerror(err));
|
|
75
97
|
assert(err == 0);
|
|
76
|
-
|
|
77
|
-
|
|
98
|
+
} else {
|
|
99
|
+
err = js_create_string_utf8(env, (utf8_t *) cwd, cwd_len, &result);
|
|
100
|
+
assert(err == 0);
|
|
78
101
|
}
|
|
79
102
|
|
|
80
|
-
|
|
81
|
-
err = js_create_string_utf8(env, (utf8_t *) cwd, cwd_len, &result);
|
|
82
|
-
assert(err == 0);
|
|
103
|
+
if (cwd != buffer) free(cwd);
|
|
83
104
|
|
|
84
105
|
return result;
|
|
85
106
|
}
|
|
@@ -1,26 +1,90 @@
|
|
|
1
|
+
/** Path manipulation utilities, mirroring Node.js's `path` module. */
|
|
1
2
|
declare namespace path {
|
|
3
|
+
/** The platform-specific path segment separator: `\` on Windows, `/` elsewhere. */
|
|
2
4
|
export const sep: '/' | '\\'
|
|
5
|
+
/** The platform-specific path delimiter: `;` on Windows, `:` elsewhere. */
|
|
3
6
|
export const delimiter: ':' | ';'
|
|
4
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Returns the last portion of `path`, similar to the Unix `basename` command.
|
|
10
|
+
* @param path - The path to extract the last portion from.
|
|
11
|
+
* @param suffix - An optional suffix to remove from the end of the result, if it matches exactly.
|
|
12
|
+
* @returns An empty string if `suffix` equals `path` exactly.
|
|
13
|
+
* @throws {TypeError} thrown if `path`, or a defined `suffix`, is not a string.
|
|
14
|
+
*/
|
|
5
15
|
export function basename(path: string, suffix?: string): string
|
|
6
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Returns the directory name of `path`, similar to the Unix `dirname` command.
|
|
19
|
+
* @param path - The path to extract the directory name from.
|
|
20
|
+
* @throws {TypeError} thrown if `path` is not a string.
|
|
21
|
+
*/
|
|
7
22
|
export function dirname(path: string): string
|
|
8
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Returns the extension of `path`, from the last `.` to the end of the string.
|
|
26
|
+
* @param path - The path to extract the extension from.
|
|
27
|
+
* @returns An empty string if `path` has no `.` in its last segment, or if that segment's only
|
|
28
|
+
* `.` is its first character (for example a dotfile).
|
|
29
|
+
* @throws {TypeError} thrown if `path` is not a string.
|
|
30
|
+
*/
|
|
9
31
|
export function extname(path: string): string
|
|
10
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Returns `true` if `path` is an absolute path.
|
|
35
|
+
* @param path - The path to test.
|
|
36
|
+
* @returns On Windows, a drive-qualified path such as `C:\foo` is also absolute; on POSIX, only
|
|
37
|
+
* paths starting with `/` are absolute.
|
|
38
|
+
* @throws {TypeError} thrown if `path` is not a string.
|
|
39
|
+
*/
|
|
11
40
|
export function isAbsolute(path: string): boolean
|
|
12
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Joins all given path segments using the platform-specific separator, then normalizes the
|
|
44
|
+
* result.
|
|
45
|
+
* @param paths - The path segments to join together, in the order given.
|
|
46
|
+
* @throws {TypeError} thrown if any path segment is not a string.
|
|
47
|
+
*/
|
|
13
48
|
export function join(...paths: string[]): string
|
|
14
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Normalizes `path`, resolving `.` and `..` segments.
|
|
52
|
+
* @param path - The path to normalize.
|
|
53
|
+
* @throws {TypeError} thrown if `path` is not a string.
|
|
54
|
+
*/
|
|
15
55
|
export function normalize(path: string): string
|
|
16
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Returns the relative path from `from` to `to`.
|
|
59
|
+
* @param from - The path to resolve the relative path from.
|
|
60
|
+
* @param to - The path to resolve the relative path to.
|
|
61
|
+
* @returns Both `from` and `to` are resolved to absolute paths before comparing, and an empty
|
|
62
|
+
* string is returned if they resolve to the same path.
|
|
63
|
+
* @throws {TypeError} thrown if `from` or `to` is not a string.
|
|
64
|
+
*/
|
|
17
65
|
export function relative(from: string, to: string): string
|
|
18
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Resolves a sequence of paths or path segments into an absolute path.
|
|
69
|
+
* @param args - The path segments to resolve, processed from right to left until an absolute path
|
|
70
|
+
* is constructed.
|
|
71
|
+
* @returns Falls back to the current working directory (or that of the resolved drive, on
|
|
72
|
+
* Windows) if none of the given segments is absolute.
|
|
73
|
+
* @throws {TypeError} thrown if any path segment is not a string.
|
|
74
|
+
*/
|
|
19
75
|
export function resolve(...args: string[]): string
|
|
20
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Converts `path` to a namespace-prefixed path on Windows; returns `path` unchanged on POSIX.
|
|
79
|
+
* @param path - The path to convert.
|
|
80
|
+
* @returns On Windows, resolves `path` and prefixes UNC paths with `\\?\UNC\` and drive-letter
|
|
81
|
+
* paths with `\\?\`; other paths (including non-string input) are returned unchanged.
|
|
82
|
+
*/
|
|
21
83
|
export function toNamespacedPath(path: string): string
|
|
22
84
|
|
|
85
|
+
/** The POSIX-specific implementation of the `path` methods. */
|
|
23
86
|
export const posix = path
|
|
87
|
+
/** The Windows-specific implementation of the `path` methods. */
|
|
24
88
|
export const win32 = path
|
|
25
89
|
}
|
|
26
90
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tickernelz/wardmote-adapter-utils",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1112.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/tickernelz/wardmote",
|
|
6
6
|
"bugs": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"typecheck": "tsc --noEmit"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tickernelz/wardmote-shared": "2026.
|
|
37
|
+
"@tickernelz/wardmote-shared": "2026.1112.1",
|
|
38
38
|
"acpx": "0.12.0",
|
|
39
39
|
"picocolors": "^1.1.1"
|
|
40
40
|
},
|