@vibe-agent-toolkit/utils 0.1.41 → 0.1.42-rc.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 +146 -31
- package/dist/asset.d.ts +9 -0
- package/dist/asset.d.ts.map +1 -0
- package/dist/asset.js +9 -0
- package/dist/asset.js.map +1 -0
- package/dist/crawl.d.ts +19 -0
- package/dist/crawl.d.ts.map +1 -0
- package/dist/crawl.js +19 -0
- package/dist/crawl.js.map +1 -0
- package/dist/file-crawler.d.ts +19 -2
- package/dist/file-crawler.d.ts.map +1 -1
- package/dist/file-crawler.js +19 -1
- package/dist/file-crawler.js.map +1 -1
- package/dist/fs-utils.d.ts +60 -3
- package/dist/fs-utils.d.ts.map +1 -1
- package/dist/fs-utils.js +88 -10
- package/dist/fs-utils.js.map +1 -1
- package/dist/fs.d.ts +7 -6
- package/dist/fs.d.ts.map +1 -1
- package/dist/fs.js +7 -6
- package/dist/fs.js.map +1 -1
- package/dist/git-utils.d.ts +2 -0
- package/dist/git-utils.d.ts.map +1 -1
- package/dist/git-utils.js +16 -0
- package/dist/git-utils.js.map +1 -1
- package/dist/git.d.ts +23 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +23 -0
- package/dist/git.js.map +1 -0
- package/dist/gitignore-checker.d.ts +0 -9
- package/dist/gitignore-checker.d.ts.map +1 -1
- package/dist/gitignore-checker.js +0 -12
- package/dist/gitignore-checker.js.map +1 -1
- package/dist/glob/glob-pattern.js +1 -1
- package/dist/glob/glob-pattern.js.map +1 -1
- package/dist/glob.d.ts +8 -0
- package/dist/glob.d.ts.map +1 -0
- package/dist/glob.js +8 -0
- package/dist/glob.js.map +1 -0
- package/dist/path-core.d.ts +196 -0
- package/dist/path-core.d.ts.map +1 -0
- package/dist/path-core.js +251 -0
- package/dist/path-core.js.map +1 -0
- package/dist/path-utils.d.ts +12 -183
- package/dist/path-utils.d.ts.map +1 -1
- package/dist/path-utils.js +13 -237
- package/dist/path-utils.js.map +1 -1
- package/dist/path.d.ts +12 -0
- package/dist/path.d.ts.map +1 -0
- package/dist/path.js +12 -0
- package/dist/path.js.map +1 -0
- package/dist/process.d.ts +7 -4
- package/dist/process.d.ts.map +1 -1
- package/dist/process.js +7 -4
- package/dist/process.js.map +1 -1
- package/dist/project.d.ts +31 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +31 -0
- package/dist/project.js.map +1 -0
- package/dist/safe-exec.d.ts.map +1 -1
- package/dist/safe-exec.js +8 -4
- package/dist/safe-exec.js.map +1 -1
- package/dist/spawn-hardened.d.ts.map +1 -1
- package/dist/spawn-hardened.js +4 -17
- package/dist/spawn-hardened.js.map +1 -1
- package/dist/template-entry.d.ts +10 -0
- package/dist/template-entry.d.ts.map +1 -0
- package/dist/template-entry.js +10 -0
- package/dist/template-entry.js.map +1 -0
- package/dist/testing.d.ts +8 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +8 -0
- package/dist/testing.js.map +1 -0
- package/dist/windows-shell.d.ts +140 -8
- package/dist/windows-shell.d.ts.map +1 -1
- package/dist/windows-shell.js +218 -11
- package/dist/windows-shell.js.map +1 -1
- package/dist/yaml.d.ts +9 -0
- package/dist/yaml.d.ts.map +1 -0
- package/dist/yaml.js +9 -0
- package/dist/yaml.js.map +1 -0
- package/dist/zod.d.ts +10 -0
- package/dist/zod.d.ts.map +1 -0
- package/dist/zod.js +10 -0
- package/dist/zod.js.map +1 -0
- package/eslint/README.md +191 -0
- package/eslint/index.cjs +161 -0
- package/eslint/index.d.cts +60 -0
- package/eslint/rules/eslint-rule-factory.cjs +241 -0
- package/eslint/rules/exempt-path-matcher.cjs +265 -0
- package/eslint/rules/no-bare-dynamic-import-path.cjs +142 -0
- package/eslint/rules/no-child-process-execSync.cjs +23 -0
- package/eslint/rules/no-command-direct-factory.cjs +246 -0
- package/eslint/rules/no-file-url-string-concat.cjs +77 -0
- package/eslint/rules/no-fs-mkdirSync.cjs +23 -0
- package/eslint/rules/no-fs-promises-cp.cjs +36 -0
- package/eslint/rules/no-fs-realpathSync.cjs +23 -0
- package/eslint/rules/no-hardcoded-path-split.cjs +141 -0
- package/eslint/rules/no-manual-path-normalize.cjs +130 -0
- package/eslint/rules/no-os-tmpdir.cjs +24 -0
- package/eslint/rules/no-path-join.cjs +14 -0
- package/eslint/rules/no-path-operations-in-comparisons.cjs +148 -0
- package/eslint/rules/no-path-relative.cjs +14 -0
- package/eslint/rules/no-path-resolve.cjs +14 -0
- package/eslint/rules/no-path-sep-in-strings.cjs +130 -0
- package/eslint/rules/no-path-startswith.cjs +139 -0
- package/eslint/rules/no-test-scoped-functions.cjs +134 -0
- package/eslint/rules/no-unix-shell-commands.cjs +152 -0
- package/eslint/rules/no-unsafe-root-join.cjs +85 -0
- package/eslint/rules/no-url-pathname-for-fs.cjs +107 -0
- package/eslint/rules/path-function-rule-factory.cjs +216 -0
- package/eslint/rules/prefer-startswith-over-regex.cjs +111 -0
- package/eslint/rules/require-justified-skip.cjs +348 -0
- package/eslint/rules/safe-import.cjs +141 -0
- package/package.json +65 -7
package/dist/path-utils.js
CHANGED
|
@@ -2,6 +2,19 @@ import { mkdirSync, realpathSync } from 'node:fs';
|
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
5
|
+
import { safePath } from './path-core.js';
|
|
6
|
+
/**
|
|
7
|
+
* Re-export every pure path helper so the package barrel keeps exposing the
|
|
8
|
+
* exact same surface it always has. The pure definitions themselves live in
|
|
9
|
+
* `./path-core.ts`, which imports nothing but `node:path` — see that file's
|
|
10
|
+
* header for why the split exists.
|
|
11
|
+
*
|
|
12
|
+
* This preserves the BARREL only. `@vibe-agent-toolkit/utils/fs` no longer
|
|
13
|
+
* re-exports the pure helpers — they moved to `@vibe-agent-toolkit/utils/path`,
|
|
14
|
+
* which is a breaking change for `./fs` consumers (see CHANGELOG and
|
|
15
|
+
* `test/path-fs-subpaths.test.ts`).
|
|
16
|
+
*/
|
|
17
|
+
export * from './path-core.js';
|
|
5
18
|
/**
|
|
6
19
|
* Normalize any path (resolve short names on Windows)
|
|
7
20
|
*
|
|
@@ -161,243 +174,6 @@ export function mkdirSyncReal(dirPath, options) {
|
|
|
161
174
|
}
|
|
162
175
|
}
|
|
163
176
|
}
|
|
164
|
-
/**
|
|
165
|
-
* Check if a path is absolute
|
|
166
|
-
*
|
|
167
|
-
* Cross-platform detection of absolute paths:
|
|
168
|
-
* - Unix: /path/to/file
|
|
169
|
-
* - Windows: C:\path\to\file or C:/path/to/file
|
|
170
|
-
*
|
|
171
|
-
* @param p - Path to check
|
|
172
|
-
* @returns True if path is absolute
|
|
173
|
-
*
|
|
174
|
-
* @example
|
|
175
|
-
* isAbsolutePath('/path/to/file') // true
|
|
176
|
-
* isAbsolutePath('./relative') // false
|
|
177
|
-
* isAbsolutePath('C:/Windows') // true (Windows)
|
|
178
|
-
*/
|
|
179
|
-
export function isAbsolutePath(p) {
|
|
180
|
-
return path.isAbsolute(p);
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* True if `p` is absolute on ANY platform — a POSIX root path (`/etc`), a
|
|
184
|
-
* Windows drive-letter path (`C:\…` or `C:/…`), or a UNC path (`\\host\share`).
|
|
185
|
-
*
|
|
186
|
-
* Unlike {@link isAbsolutePath} (host-platform only), this is host-independent,
|
|
187
|
-
* so config-containment checks reject Windows-absolute paths even when run on
|
|
188
|
-
* POSIX CI, and vice versa. Used to keep config-supplied relative paths (skill
|
|
189
|
-
* `files:` dest) from escaping their anchor directory (zip-slip class).
|
|
190
|
-
*
|
|
191
|
-
* @example
|
|
192
|
-
* isAbsoluteAnyPlatform('/etc/passwd') // true (POSIX)
|
|
193
|
-
* isAbsoluteAnyPlatform('C:\\Users') // true (Windows drive)
|
|
194
|
-
* isAbsoluteAnyPlatform('scripts/cli') // false (relative)
|
|
195
|
-
*/
|
|
196
|
-
export function isAbsoluteAnyPlatform(p) {
|
|
197
|
-
return path.posix.isAbsolute(p) || path.win32.isAbsolute(p);
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* True if `p` contains a `..` parent-directory traversal segment.
|
|
201
|
-
*
|
|
202
|
-
* Forward-slash-normalized, then inspects each `/`-delimited segment — so a
|
|
203
|
-
* `..` is caught regardless of the original OS separator. A containment guard
|
|
204
|
-
* for config-supplied relative paths (skill `files:` dest values, glob magic
|
|
205
|
-
* remainders) that must never climb above their anchor directory.
|
|
206
|
-
*
|
|
207
|
-
* @example
|
|
208
|
-
* hasParentTraversalSegment('a/../b') // true
|
|
209
|
-
* hasParentTraversalSegment('a/b/c') // false
|
|
210
|
-
* hasParentTraversalSegment('..\\evil') // true (backslash normalized)
|
|
211
|
-
* hasParentTraversalSegment('a..b/c') // false (".." must be a whole segment)
|
|
212
|
-
*/
|
|
213
|
-
export function hasParentTraversalSegment(p) {
|
|
214
|
-
return toForwardSlash(p).split('/').includes('..');
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Compute a `ValidationIssue.location`: an absolute source file path made
|
|
218
|
-
* relative to the scan/project root, forward-slashed.
|
|
219
|
-
*
|
|
220
|
-
* This is the ONE relativizer every VAT validation lane uses. `location` is
|
|
221
|
-
* contractually project-relative (see `ValidationIssue` in
|
|
222
|
-
* `@vibe-agent-toolkit/agent-schema`), so producers must route through here
|
|
223
|
-
* rather than emitting `skillPath` directly — absolute locations leak the
|
|
224
|
-
* developer's home directory into CI logs and make `validation.allow` globs,
|
|
225
|
-
* which match against `location`, unwritable.
|
|
226
|
-
*
|
|
227
|
-
* `projectRoot` is required precisely because "relative to what?" has no safe
|
|
228
|
-
* default: a caller with no root must decide one (the skill directory, the
|
|
229
|
-
* scan root) rather than silently falling back to an absolute path.
|
|
230
|
-
*
|
|
231
|
-
* @param sourceFilePath - Absolute path to the file the issue was found in.
|
|
232
|
-
* @param projectRoot - Root the location is expressed relative to.
|
|
233
|
-
* @returns Forward-slashed relative location.
|
|
234
|
-
*
|
|
235
|
-
* @example
|
|
236
|
-
* issueLocation('/repo/skills/foo/SKILL.md', '/repo') // 'skills/foo/SKILL.md'
|
|
237
|
-
*/
|
|
238
|
-
export function issueLocation(sourceFilePath, projectRoot) {
|
|
239
|
-
return toForwardSlash(path.relative(projectRoot, sourceFilePath));
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Convert a relative path to absolute
|
|
243
|
-
*
|
|
244
|
-
* If path is already absolute, returns it normalized.
|
|
245
|
-
* Otherwise resolves relative to baseDir.
|
|
246
|
-
*
|
|
247
|
-
* @param p - Path to convert
|
|
248
|
-
* @param baseDir - Base directory for resolution
|
|
249
|
-
* @returns Absolute path with **forward slashes** (cross-platform safe)
|
|
250
|
-
*
|
|
251
|
-
* @example
|
|
252
|
-
* toAbsolutePath('./docs/README.md', '/project')
|
|
253
|
-
* // Returns: '/project/docs/README.md'
|
|
254
|
-
*
|
|
255
|
-
* toAbsolutePath('/absolute/path.md', '/project')
|
|
256
|
-
* // Returns: '/absolute/path.md'
|
|
257
|
-
*/
|
|
258
|
-
export function toAbsolutePath(p, baseDir) {
|
|
259
|
-
if (path.isAbsolute(p)) {
|
|
260
|
-
return toForwardSlash(path.normalize(p));
|
|
261
|
-
}
|
|
262
|
-
return toForwardSlash(path.resolve(baseDir, p));
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Get the relative path from one file to another
|
|
266
|
-
*
|
|
267
|
-
* Useful for generating relative links between markdown files.
|
|
268
|
-
*
|
|
269
|
-
* @param from - Source file path (absolute)
|
|
270
|
-
* @param to - Target file path (absolute)
|
|
271
|
-
* @returns Relative path from source to target with **forward slashes** (cross-platform safe)
|
|
272
|
-
*
|
|
273
|
-
* @example
|
|
274
|
-
* getRelativePath('/project/docs/guide.md', '/project/README.md')
|
|
275
|
-
* // Returns: '../README.md'
|
|
276
|
-
*
|
|
277
|
-
* getRelativePath('/project/README.md', '/project/docs/api.md')
|
|
278
|
-
* // Returns: 'docs/api.md'
|
|
279
|
-
*/
|
|
280
|
-
export function getRelativePath(from, to) {
|
|
281
|
-
// Get directory of source file (not the file itself)
|
|
282
|
-
const fromDir = path.dirname(from);
|
|
283
|
-
// Calculate relative path from source directory to target file
|
|
284
|
-
return toForwardSlash(path.relative(fromDir, to));
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Convert a path to forward slashes
|
|
288
|
-
*
|
|
289
|
-
* Windows accepts both forward slashes and backslashes as path separators.
|
|
290
|
-
* This function normalizes all paths to use forward slashes for consistency.
|
|
291
|
-
* Useful for glob pattern matching, cross-platform comparisons, and string operations.
|
|
292
|
-
*
|
|
293
|
-
* @param p - Path to convert
|
|
294
|
-
* @returns Path with forward slashes
|
|
295
|
-
*
|
|
296
|
-
* @example
|
|
297
|
-
* toForwardSlash('C:\\Users\\docs\\README.md')
|
|
298
|
-
* // Returns: 'C:/Users/docs/README.md'
|
|
299
|
-
*
|
|
300
|
-
* toForwardSlash('/project/docs/README.md')
|
|
301
|
-
* // Returns: '/project/docs/README.md' (unchanged)
|
|
302
|
-
*/
|
|
303
|
-
export function toForwardSlash(p) {
|
|
304
|
-
return p.replaceAll('\\', '/');
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Cross-platform safe path operations.
|
|
308
|
-
*
|
|
309
|
-
* Wraps Node's `path.join()`, `path.resolve()`, and `path.relative()` to always
|
|
310
|
-
* return forward-slash paths. On Windows, the native `path.*` functions return
|
|
311
|
-
* backslashes, which causes bugs when paths are used as Map keys, compared as
|
|
312
|
-
* strings, or matched with glob patterns.
|
|
313
|
-
*
|
|
314
|
-
* **Use these instead of importing from `node:path` directly.**
|
|
315
|
-
* ESLint rules enforce this — see `no-path-join`, `no-path-resolve`, `no-path-relative`.
|
|
316
|
-
*
|
|
317
|
-
* @example
|
|
318
|
-
* ```typescript
|
|
319
|
-
* import { safePath } from '@vibe-agent-toolkit/utils';
|
|
320
|
-
*
|
|
321
|
-
* // Always forward slashes, even on Windows
|
|
322
|
-
* safePath.join('C:\\Users', 'docs', 'file.md') // → 'C:/Users/docs/file.md'
|
|
323
|
-
* safePath.resolve('/project', './docs') // → '/project/docs'
|
|
324
|
-
* safePath.relative('/project/docs', '/project') // → '..'
|
|
325
|
-
* safePath.joinUnderRoot('/harness', 'skill-abc') // → '/harness/skill-abc'
|
|
326
|
-
* safePath.joinUnderRoot('/harness', '../escape') // throws Error
|
|
327
|
-
* ```
|
|
328
|
-
*/
|
|
329
|
-
export const safePath = {
|
|
330
|
-
/** Like `path.join()` but always returns forward slashes. */
|
|
331
|
-
join(...paths) {
|
|
332
|
-
return toForwardSlash(path.join(...paths));
|
|
333
|
-
},
|
|
334
|
-
/** Like `path.resolve()` but always returns forward slashes. */
|
|
335
|
-
resolve(...paths) {
|
|
336
|
-
return toForwardSlash(path.resolve(...paths));
|
|
337
|
-
},
|
|
338
|
-
/** Like `path.relative()` but always returns forward slashes. */
|
|
339
|
-
relative(from, to) {
|
|
340
|
-
return toForwardSlash(path.relative(from, to));
|
|
341
|
-
},
|
|
342
|
-
/**
|
|
343
|
-
* Join path segments under a security root, throwing if the result would escape.
|
|
344
|
-
*
|
|
345
|
-
* Resolves `root + segments` and verifies the result is strictly inside `root`
|
|
346
|
-
* (or equal to it). Throws when any segment would cause the result to escape:
|
|
347
|
-
*
|
|
348
|
-
* - A `..` traversal that climbs above root
|
|
349
|
-
* - An absolute POSIX path segment (e.g. `/etc/passwd`)
|
|
350
|
-
* - A Windows drive-letter segment (e.g. `C:\Users\evil`)
|
|
351
|
-
*
|
|
352
|
-
* On success returns a forward-slash-normalized absolute path (consistent with
|
|
353
|
-
* the other `safePath` helpers).
|
|
354
|
-
*
|
|
355
|
-
* **Use this instead of `safePath.join(root, segment)` whenever `segment` may
|
|
356
|
-
* contain caller-controlled input** — this is the bug class that the original
|
|
357
|
-
* skill-test staging code was vulnerable to on Windows.
|
|
358
|
-
*
|
|
359
|
-
* @returns Forward-slash absolute path guaranteed to be inside `root`.
|
|
360
|
-
* @throws {Error} If the resolved path would escape `root`.
|
|
361
|
-
*
|
|
362
|
-
* @example
|
|
363
|
-
* ```typescript
|
|
364
|
-
* // ✅ Safe — throws if caller passes '../../../etc'
|
|
365
|
-
* const dest = safePath.joinUnderRoot(harnessRoot, stagedDirName(item.name));
|
|
366
|
-
*
|
|
367
|
-
* // ❌ Unsafe — silently escapes on Windows with absolute segment
|
|
368
|
-
* const dest = safePath.join(harnessRoot, item.name);
|
|
369
|
-
* ```
|
|
370
|
-
*/
|
|
371
|
-
joinUnderRoot(root, ...segments) {
|
|
372
|
-
// Eagerly reject any segment that is absolute (POSIX or Windows drive-letter)
|
|
373
|
-
// BEFORE resolving, so the error message can name the offending segment.
|
|
374
|
-
for (const seg of segments) {
|
|
375
|
-
if (path.isAbsolute(seg)) {
|
|
376
|
-
throw new Error(`safePath.joinUnderRoot: segment "${seg}" is absolute and escapes root "${root}".`);
|
|
377
|
-
}
|
|
378
|
-
// Windows drive-letter check for POSIX hosts (path.isAbsolute won't catch
|
|
379
|
-
// 'C:\...' on POSIX, but node's path.win32.isAbsolute does).
|
|
380
|
-
if (path.win32.isAbsolute(seg)) {
|
|
381
|
-
throw new Error(`safePath.joinUnderRoot: segment "${seg}" contains a Windows drive letter and escapes root "${root}".`);
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
const resolvedRoot = path.resolve(root);
|
|
385
|
-
const resolvedResult = segments.length > 0
|
|
386
|
-
? path.resolve(resolvedRoot, ...segments)
|
|
387
|
-
: resolvedRoot;
|
|
388
|
-
// Containment check: normalize both to forward slashes so the comparison
|
|
389
|
-
// is platform-independent and no path.sep is needed in string operations.
|
|
390
|
-
const fwdRoot = toForwardSlash(resolvedRoot);
|
|
391
|
-
const fwdResult = toForwardSlash(resolvedResult);
|
|
392
|
-
// Result must equal root or start with root + '/' (not just startsWith(root)
|
|
393
|
-
// which would match '/rootEvil' when root is '/root').
|
|
394
|
-
const rootPrefix = fwdRoot.endsWith('/') ? fwdRoot : `${fwdRoot}/`;
|
|
395
|
-
if (fwdResult !== fwdRoot && !fwdResult.startsWith(rootPrefix)) {
|
|
396
|
-
throw new Error(`safePath.joinUnderRoot: result "${fwdResult}" escapes root "${fwdRoot}".`);
|
|
397
|
-
}
|
|
398
|
-
return fwdResult;
|
|
399
|
-
},
|
|
400
|
-
};
|
|
401
177
|
/**
|
|
402
178
|
* Resolve an OS-native absolute path from an ESM module's `import.meta.url` and
|
|
403
179
|
* optional relative path segments.
|
package/dist/path-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../src/path-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,aAAa,CAAC,GAAG,KAAe;IAC9C,4DAA4D;IAC5D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,2BAA2B;IAC3B,iGAAiG;IACjG,4CAA4C;IAC5C,IAAI,QAAgB,CAAC;IACrB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;SAAM,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,QAAQ,GA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AAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,+BAA+B;YAC/B,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,qBAAqB,CAAC,aAAqB,EAAE,GAAG,QAAkB;IAChF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,gFAAgF;QAChF,OAAO,aAAa,CAAC,aAAa,CAAC,CAAC;IACtC,CAAC;IACD,iFAAiF;IACjF,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC5C,OAAO,aAAa,CAAC,IAAI,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAc,OAAe;IAClE,MAAM,GAAG,GAAY,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/D,OAAO,GAAQ,CAAC;AAClB,CAAC"}
|
package/dist/path.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibe-agent-toolkit/utils/path
|
|
3
|
+
*
|
|
4
|
+
* Pure path-string helpers. This entry point reaches **no** Node builtin
|
|
5
|
+
* except `node:path`, so it is the cheapest possible import for the
|
|
6
|
+
* cross-platform helpers most consumers actually want.
|
|
7
|
+
*
|
|
8
|
+
* If you need `normalizedTmpdir`, `mkdirSyncReal`, or `normalizePath`, those
|
|
9
|
+
* touch the filesystem — import them from `@vibe-agent-toolkit/utils/fs`.
|
|
10
|
+
*/
|
|
11
|
+
export { safePath, toForwardSlash, isAbsolutePath, isAbsoluteAnyPlatform, hasParentTraversalSegment, toAbsolutePath, getRelativePath, issueLocation, } from './path-core.js';
|
|
12
|
+
//# sourceMappingURL=path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,QAAQ,EACR,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACd,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAC"}
|
package/dist/path.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibe-agent-toolkit/utils/path
|
|
3
|
+
*
|
|
4
|
+
* Pure path-string helpers. This entry point reaches **no** Node builtin
|
|
5
|
+
* except `node:path`, so it is the cheapest possible import for the
|
|
6
|
+
* cross-platform helpers most consumers actually want.
|
|
7
|
+
*
|
|
8
|
+
* If you need `normalizedTmpdir`, `mkdirSyncReal`, or `normalizePath`, those
|
|
9
|
+
* touch the filesystem — import them from `@vibe-agent-toolkit/utils/fs`.
|
|
10
|
+
*/
|
|
11
|
+
export { safePath, toForwardSlash, isAbsolutePath, isAbsoluteAnyPlatform, hasParentTraversalSegment, toAbsolutePath, getRelativePath, issueLocation, } from './path-core.js';
|
|
12
|
+
//# sourceMappingURL=path.js.map
|
package/dist/path.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,QAAQ,EACR,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACd,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAC"}
|
package/dist/process.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @vibe-agent-toolkit/utils/process
|
|
3
3
|
*
|
|
4
|
-
* Narrow subpath export for process/command-execution primitives
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Narrow subpath export for process/command-execution primitives: sync exec,
|
|
5
|
+
* stdio blocking, hardened async spawn, and Windows `.cmd`/`.bat`/`.ps1` shell
|
|
6
|
+
* invocation. Import this entry point when you need cross-platform spawn
|
|
7
|
+
* helpers without pulling in the linkAuth, git, skill-testing, or
|
|
8
|
+
* macro-expansion machinery from the full `"."` barrel.
|
|
8
9
|
*/
|
|
9
10
|
export { type StdioBlockingResult, makeStdioBlocking, describeStdioBlocking, } from './stdio-blocking.js';
|
|
10
11
|
export { type SafeExecOptions, type SafeExecResult, CommandExecutionError, safeExecSync, safeExecResult, isToolAvailable, getToolVersion, hasShellSyntax, safeExecFromString, } from './safe-exec.js';
|
|
12
|
+
export { spawnHardened } from './spawn-hardened.js';
|
|
13
|
+
export { shouldUseShell, windowsShellQuote, buildWindowsShellLine, isPathLike, resolveShellCommandToken, } from './windows-shell.js';
|
|
11
14
|
//# sourceMappingURL=process.d.ts.map
|
package/dist/process.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../src/process.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../src/process.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,wBAAwB,GACzB,MAAM,oBAAoB,CAAC"}
|
package/dist/process.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @vibe-agent-toolkit/utils/process
|
|
3
3
|
*
|
|
4
|
-
* Narrow subpath export for process/command-execution primitives
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Narrow subpath export for process/command-execution primitives: sync exec,
|
|
5
|
+
* stdio blocking, hardened async spawn, and Windows `.cmd`/`.bat`/`.ps1` shell
|
|
6
|
+
* invocation. Import this entry point when you need cross-platform spawn
|
|
7
|
+
* helpers without pulling in the linkAuth, git, skill-testing, or
|
|
8
|
+
* macro-expansion machinery from the full `"."` barrel.
|
|
8
9
|
*/
|
|
9
10
|
export { makeStdioBlocking, describeStdioBlocking, } from './stdio-blocking.js';
|
|
10
11
|
export { CommandExecutionError, safeExecSync, safeExecResult, isToolAvailable, getToolVersion, hasShellSyntax, safeExecFromString, } from './safe-exec.js';
|
|
12
|
+
export { spawnHardened } from './spawn-hardened.js';
|
|
13
|
+
export { shouldUseShell, windowsShellQuote, buildWindowsShellLine, isPathLike, resolveShellCommandToken, } from './windows-shell.js';
|
|
11
14
|
//# sourceMappingURL=process.js.map
|
package/dist/process.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.js","sourceRoot":"","sources":["../src/process.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"process.js","sourceRoot":"","sources":["../src/process.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAEL,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAGL,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,wBAAwB,GACzB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@vibe-agent-toolkit/utils/project`
|
|
3
|
+
*
|
|
4
|
+
* Project-root discovery: `findProjectRoot` (config-anchored, then git-anchored)
|
|
5
|
+
* plus the narrower `findConfigFile` / `findNodeWorkspaceRoot` probes and the
|
|
6
|
+
* cache reset used by long-lived processes.
|
|
7
|
+
*
|
|
8
|
+
* Node-only (walks the filesystem via `node:fs`), but **dependency-free**: this
|
|
9
|
+
* entry resolves with zero third-party packages installed. That property is the
|
|
10
|
+
* whole reason it exists as a separate entry rather than barrel-only.
|
|
11
|
+
*
|
|
12
|
+
* This subpath was withdrawn once and restored. The withdrawal measured the wrong
|
|
13
|
+
* thing: it asked "are these four functions useful to our primary adopter?" — and
|
|
14
|
+
* they largely are not, for the reasons documented on the guard test in
|
|
15
|
+
* `test/package-exports.test.ts`. But the question that decides whether an entry
|
|
16
|
+
* should exist is "how heavy is the only remaining door?" With `./project` gone,
|
|
17
|
+
* the sole route to these functions was the `.` barrel, which reaches
|
|
18
|
+
* `handlebars`, `yaml`, `picomatch`, `ignore` and `which`. A consumer that avoids
|
|
19
|
+
* the barrel on graph-weight grounds — which is the entire premise of this
|
|
20
|
+
* package's subpath layout — could no longer reach a capability whose own code
|
|
21
|
+
* imports nothing but `node:fs` and `node:path`.
|
|
22
|
+
*
|
|
23
|
+
* The functions remain VAT-shaped and are documented as such in README.md: they
|
|
24
|
+
* look for `vibe-agent-toolkit.config.yaml`, then `.git/`. If your notion of a
|
|
25
|
+
* root is a `pnpm-workspace.yaml`, a `turbo.json`, or a lockfile, that ladder is
|
|
26
|
+
* not your ladder and a short walk-up of your own is more honest. Publishing the
|
|
27
|
+
* entry is not a claim that it fits every repo — only that reaching it should not
|
|
28
|
+
* cost five third-party packages.
|
|
29
|
+
*/
|
|
30
|
+
export { findConfigFile, findNodeWorkspaceRoot, findProjectRoot, resetProjectRootCaches, } from './project-utils.js';
|
|
31
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,sBAAsB,GACvB,MAAM,oBAAoB,CAAC"}
|
package/dist/project.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@vibe-agent-toolkit/utils/project`
|
|
3
|
+
*
|
|
4
|
+
* Project-root discovery: `findProjectRoot` (config-anchored, then git-anchored)
|
|
5
|
+
* plus the narrower `findConfigFile` / `findNodeWorkspaceRoot` probes and the
|
|
6
|
+
* cache reset used by long-lived processes.
|
|
7
|
+
*
|
|
8
|
+
* Node-only (walks the filesystem via `node:fs`), but **dependency-free**: this
|
|
9
|
+
* entry resolves with zero third-party packages installed. That property is the
|
|
10
|
+
* whole reason it exists as a separate entry rather than barrel-only.
|
|
11
|
+
*
|
|
12
|
+
* This subpath was withdrawn once and restored. The withdrawal measured the wrong
|
|
13
|
+
* thing: it asked "are these four functions useful to our primary adopter?" — and
|
|
14
|
+
* they largely are not, for the reasons documented on the guard test in
|
|
15
|
+
* `test/package-exports.test.ts`. But the question that decides whether an entry
|
|
16
|
+
* should exist is "how heavy is the only remaining door?" With `./project` gone,
|
|
17
|
+
* the sole route to these functions was the `.` barrel, which reaches
|
|
18
|
+
* `handlebars`, `yaml`, `picomatch`, `ignore` and `which`. A consumer that avoids
|
|
19
|
+
* the barrel on graph-weight grounds — which is the entire premise of this
|
|
20
|
+
* package's subpath layout — could no longer reach a capability whose own code
|
|
21
|
+
* imports nothing but `node:fs` and `node:path`.
|
|
22
|
+
*
|
|
23
|
+
* The functions remain VAT-shaped and are documented as such in README.md: they
|
|
24
|
+
* look for `vibe-agent-toolkit.config.yaml`, then `.git/`. If your notion of a
|
|
25
|
+
* root is a `pnpm-workspace.yaml`, a `turbo.json`, or a lockfile, that ladder is
|
|
26
|
+
* not your ladder and a short walk-up of your own is more honest. Publishing the
|
|
27
|
+
* entry is not a claim that it fits every repo — only that reaching it should not
|
|
28
|
+
* cost five third-party packages.
|
|
29
|
+
*/
|
|
30
|
+
export { findConfigFile, findNodeWorkspaceRoot, findProjectRoot, resetProjectRootCaches, } from './project-utils.js';
|
|
31
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,sBAAsB,GACvB,MAAM,oBAAoB,CAAC"}
|
package/dist/safe-exec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe-exec.d.ts","sourceRoot":"","sources":["../src/safe-exec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"safe-exec.d.ts","sourceRoot":"","sources":["../src/safe-exec.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC,CAAC;IAC7E,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,wBAAwB;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6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CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CA0CA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,eAAoB,GAC5B,MAAM,GAAG,MAAM,CAyBjB"}
|
package/dist/safe-exec.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
2
|
import which from 'which';
|
|
3
|
-
import { buildWindowsShellLine, shouldUseShell } from './windows-shell.js';
|
|
3
|
+
import { buildWindowsShellLine, resolveShellCommandToken, shouldUseShell, } from './windows-shell.js';
|
|
4
4
|
/**
|
|
5
5
|
* Error thrown when command execution fails
|
|
6
6
|
*/
|
|
@@ -24,6 +24,11 @@ export class CommandExecutionError extends Error {
|
|
|
24
24
|
* shell metacharacters (`*`, `?`, `(`, `)`, etc.) with `EINVAL`. When shell mode is
|
|
25
25
|
* needed, join command + args into a single string with per-arg quoting via
|
|
26
26
|
* {@link windowsShellQuote} so metacharacters don't get re-interpreted by cmd.exe.
|
|
27
|
+
*
|
|
28
|
+
* The command token itself is chosen by {@link resolveShellCommandToken} — the same
|
|
29
|
+
* helper the async {@link ./spawn-hardened.ts} path uses, so a bare PATH name stays bare
|
|
30
|
+
* (cmd.exe re-resolves it via PATHEXT) while an explicit path is quoted from its resolved
|
|
31
|
+
* value. Passing the raw command here used to break silently on `C:\Program Files\…`.
|
|
27
32
|
*/
|
|
28
33
|
function resolveAndSpawn(command, args, options) {
|
|
29
34
|
const commandPath = which.sync(command);
|
|
@@ -37,11 +42,10 @@ function resolveAndSpawn(command, args, options) {
|
|
|
37
42
|
timeout: options.timeout,
|
|
38
43
|
encoding: options.encoding,
|
|
39
44
|
};
|
|
40
|
-
const execCommand = useShell ? command : commandPath;
|
|
41
45
|
if (!useShell) {
|
|
42
|
-
return spawnSync(
|
|
46
|
+
return spawnSync(commandPath, args, spawnOptions);
|
|
43
47
|
}
|
|
44
|
-
const shellLine = buildWindowsShellLine(
|
|
48
|
+
const shellLine = buildWindowsShellLine(resolveShellCommandToken(command, commandPath), args);
|
|
45
49
|
// eslint-disable-next-line sonarjs/os-command -- Windows DEP0190 workaround: command resolved via which.sync(); args are per-arg shell-quoted via windowsShellQuote()
|
|
46
50
|
return spawnSync(shellLine, { ...spawnOptions, shell: true });
|
|
47
51
|
}
|
package/dist/safe-exec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe-exec.js","sourceRoot":"","sources":["../src/safe-exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,
|
|
1
|
+
{"version":3,"file":"safe-exec.js","sourceRoot":"","sources":["../src/safe-exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,cAAc,GACf,MAAM,oBAAoB,CAAC;AAoC5B;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9B,MAAM,CAAS;IACf,MAAM,CAAkB;IACxB,MAAM,CAAkB;IAExC,YACE,OAAe,EACf,MAAc,EACd,MAAuB,EACvB,MAAuB;QAEvB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAED;;;;;;;;;;;;;GAaG;AACH,SAAS,eAAe,CACtB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EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;AACnC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,UAAU,kBAAkB,CAChC,aAAqB,EACrB,UAA2B,EAAE;IAE7B,uDAAuD;IACvD,+EAA+E;IAC/E,MAAM,KAAK,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,uCAAuC,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,iBAAiB,CAAC,KAAK;YACpF,aAAa,aAAa,MAAM;YAChC,4DAA4D;YAC5D,iCAAiC,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,SAAS,CAAC,MAAM;YACzE,mEAAmE;YACnE,uEAAuE,CAC1E,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAEzB,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE5B,OAAO,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn-hardened.d.ts","sourceRoot":"","sources":["../src/spawn-hardened.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"spawn-hardened.d.ts","sourceRoot":"","sources":["../src/spawn-hardened.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAWjF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,YAAiB,GACzB,YAAY,CAYd"}
|
package/dist/spawn-hardened.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import which from 'which';
|
|
3
|
-
import {
|
|
4
|
-
import { buildWindowsShellLine, shouldUseShell, windowsShellQuote } from './windows-shell.js';
|
|
5
|
-
/**
|
|
6
|
-
* A `command` is treated as an explicit path (used verbatim, never PATH-resolved)
|
|
7
|
-
* when it is absolute or contains a path separator. A bare name (`claude`, `npm`,
|
|
8
|
-
* `git`) is resolved on PATH via `which.sync`. This mirrors — and preserves — the
|
|
9
|
-
* behaviour callers relied on before hardening: an explicit `binPath` is spawned
|
|
10
|
-
* as-given (so a nonexistent path still surfaces as an async `'error'` event, not a
|
|
11
|
-
* synchronous `which` throw), while a bare command is looked up.
|
|
12
|
-
*/
|
|
13
|
-
function isPathLike(command) {
|
|
14
|
-
return isAbsoluteAnyPlatform(command) || command.includes('/') || command.includes('\\');
|
|
15
|
-
}
|
|
3
|
+
import { buildWindowsShellLine, isPathLike, resolveShellCommandToken, shouldUseShell, } from './windows-shell.js';
|
|
16
4
|
/**
|
|
17
5
|
* Cross-platform hardened async `spawn`, returning a live {@link ChildProcess} with
|
|
18
6
|
* streaming stdio intact (unlike the sync, buffered {@link ./safe-exec.ts} path).
|
|
@@ -37,10 +25,9 @@ export function spawnHardened(command, args, options = {}) {
|
|
|
37
25
|
if (!shouldUseShell(resolved)) {
|
|
38
26
|
return spawn(resolved, args, { ...options, shell: false });
|
|
39
27
|
}
|
|
40
|
-
// Windows shell path (.cmd/.bat/.ps1).
|
|
41
|
-
//
|
|
42
|
-
const
|
|
43
|
-
const shellLine = buildWindowsShellLine(shellCommand, args);
|
|
28
|
+
// Windows shell path (.cmd/.bat/.ps1). Token selection is shared with the sync
|
|
29
|
+
// `safeExecSync` path so the two cannot drift — see `resolveShellCommandToken`.
|
|
30
|
+
const shellLine = buildWindowsShellLine(resolveShellCommandToken(command, resolved), args);
|
|
44
31
|
// eslint-disable-next-line sonarjs/os-command -- Windows DEP0190 workaround: command is a PATH-resolved bare name or an explicit path; args are per-arg shell-quoted via windowsShellQuote()
|
|
45
32
|
return spawn(shellLine, { ...options, shell: true });
|
|
46
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn-hardened.js","sourceRoot":"","sources":["../src/spawn-hardened.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAwC,MAAM,oBAAoB,CAAC;AAEjF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,
|
|
1
|
+
{"version":3,"file":"spawn-hardened.js","sourceRoot":"","sources":["../src/spawn-hardened.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAwC,MAAM,oBAAoB,CAAC;AAEjF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,qBAAqB,EACrB,UAAU,EACV,wBAAwB,EACxB,cAAc,GACf,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAe,EACf,IAAc,EACd,UAAwB,EAAE;IAE1B,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAErE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,+EAA+E;IAC/E,gFAAgF;IAChF,MAAM,SAAS,GAAG,qBAAqB,CAAC,wBAAwB,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3F,6LAA6L;IAC7L,OAAO,KAAK,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibe-agent-toolkit/utils/template
|
|
3
|
+
*
|
|
4
|
+
* Cached Handlebars rendering with HTML escaping disabled. Pure with respect
|
|
5
|
+
* to Node builtins, but it pulls in `handlebars` (and transitively
|
|
6
|
+
* `source-map`) — roughly 239KB bundled. Quarantined behind its own subpath
|
|
7
|
+
* so importing a path helper never pays for it.
|
|
8
|
+
*/
|
|
9
|
+
export * from './template.js';
|
|
10
|
+
//# sourceMappingURL=template-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-entry.d.ts","sourceRoot":"","sources":["../src/template-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibe-agent-toolkit/utils/template
|
|
3
|
+
*
|
|
4
|
+
* Cached Handlebars rendering with HTML escaping disabled. Pure with respect
|
|
5
|
+
* to Node builtins, but it pulls in `handlebars` (and transitively
|
|
6
|
+
* `source-map`) — roughly 239KB bundled. Quarantined behind its own subpath
|
|
7
|
+
* so importing a path helper never pays for it.
|
|
8
|
+
*/
|
|
9
|
+
export * from './template.js';
|
|
10
|
+
//# sourceMappingURL=template-entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-entry.js","sourceRoot":"","sources":["../src/template-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,mBAAmB,CAAC"}
|
package/dist/testing.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,mBAAmB,CAAC"}
|