From c5f74ceafce96d1d87e3d68e473322f8d47d4b96 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 20 Sep 2025 11:24:33 -0500 Subject: [PATCH] Replace @std/path with path-browserify --- package-lock.json | 15 --------------- package.json | 1 - src/lib/DotAI.ts | 2 +- src/lib/commands/cat.ts | 2 +- src/lib/commands/cd.ts | 2 +- src/lib/commands/cp.ts | 2 +- src/lib/commands/curl.ts | 2 +- src/lib/commands/cut.ts | 2 +- src/lib/commands/diff.ts | 2 +- src/lib/commands/find.ts | 2 +- src/lib/commands/git/add.ts | 2 +- src/lib/commands/grep.ts | 2 +- src/lib/commands/head.ts | 2 +- src/lib/commands/ls.ts | 2 +- src/lib/commands/mkdir.ts | 2 +- src/lib/commands/mv.ts | 2 +- src/lib/commands/rm.ts | 2 +- src/lib/commands/sort.ts | 2 +- src/lib/commands/tail.ts | 2 +- src/lib/commands/touch.ts | 2 +- src/lib/commands/tr.ts | 2 +- src/lib/commands/uniq.ts | 2 +- src/lib/commands/wc.ts | 2 +- src/lib/security.ts | 2 +- src/lib/system.ts | 2 +- src/lib/tools/TextEditorStrReplaceTool.ts | 2 +- src/lib/tools/TextEditorViewTool.ts | 2 +- src/lib/tools/TextEditorWriteTool.ts | 2 +- 28 files changed, 26 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index d4f31c57..1edd0286 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,6 @@ "@radix-ui/react-toggle-group": "^1.1.0", "@radix-ui/react-tooltip": "^1.1.4", "@std/encoding": "npm:@jsr/std__encoding@^1.0.10", - "@std/path": "npm:@jsr/std__path@^1.1.1", "@tanstack/react-query": "^5.56.2", "@unhead/addons": "^2.0.10", "@unhead/react": "^2.0.10", @@ -1251,11 +1250,6 @@ "resolved": "https://npm.jsr.io/~/11/@jsr/std__encoding/0.224.3.tgz", "integrity": "sha512-zAuX2QV1zwJ5RSmrnDGVerAtN3pBXpYYNlGzhERW9AiQ1UJd2/xruyB3i5NdTWy2OK2pjETswOj+0+prYTPlxQ==" }, - "node_modules/@jsr/std__internal": { - "version": "1.0.9", - "resolved": "https://npm.jsr.io/~/11/@jsr/std__internal/1.0.9.tgz", - "integrity": "sha512-s+f4qrJzZgPAy7XuFOtgaSaxyPLnnEmAfXGLvRXGxPTL76URLVHkF+hOzqXz+bmk8/awybF6BRsasxtAQOV23Q==" - }, "node_modules/@mixmark-io/domino": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@mixmark-io/domino/-/domino-2.2.0.tgz", @@ -3194,15 +3188,6 @@ "resolved": "https://npm.jsr.io/~/11/@jsr/std__encoding/1.0.10.tgz", "integrity": "sha512-WK2njnDTyKefroRNk2Ooq7GStp6Y0ccAvr4To+Z/zecRAGe7+OSvH9DbiaHpAKwEi2KQbmpWMOYsdNt+TsdmSw==" }, - "node_modules/@std/path": { - "name": "@jsr/std__path", - "version": "1.1.1", - "resolved": "https://npm.jsr.io/~/11/@jsr/std__path/1.1.1.tgz", - "integrity": "sha512-+x5LgcNUSpMzOZIRmFSjqrMTCxHlgXjWzK8ZFr7lwgHfWZxoVXeis3MFQlkR5mN5uQ61Y1P30Li1PU0yx9uluA==", - "dependencies": { - "@jsr/std__internal": "^1.0.9" - } - }, "node_modules/@swc/core": { "version": "1.11.24", "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.11.24.tgz", diff --git a/package.json b/package.json index 70e2f92b..267e0501 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "@radix-ui/react-toggle-group": "^1.1.0", "@radix-ui/react-tooltip": "^1.1.4", "@std/encoding": "npm:@jsr/std__encoding@^1.0.10", - "@std/path": "npm:@jsr/std__path@^1.1.1", "@tanstack/react-query": "^5.56.2", "@unhead/addons": "^2.0.10", "@unhead/react": "^2.0.10", diff --git a/src/lib/DotAI.ts b/src/lib/DotAI.ts index ecfd2bb4..bc9961bb 100644 --- a/src/lib/DotAI.ts +++ b/src/lib/DotAI.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type OpenAI from "openai"; import type { JSRuntimeFS } from "./JSRuntime"; diff --git a/src/lib/commands/cat.ts b/src/lib/commands/cat.ts index c16d17a6..d891c7dd 100644 --- a/src/lib/commands/cat.ts +++ b/src/lib/commands/cat.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/cd.ts b/src/lib/commands/cd.ts index c2daf1d5..7bb6e0a6 100644 --- a/src/lib/commands/cd.ts +++ b/src/lib/commands/cd.ts @@ -1,4 +1,4 @@ -import { join, resolve, dirname } from "@std/path"; +import { join, resolve, dirname } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/cp.ts b/src/lib/commands/cp.ts index 03095d41..103f8bdb 100644 --- a/src/lib/commands/cp.ts +++ b/src/lib/commands/cp.ts @@ -1,4 +1,4 @@ -import { join, dirname, basename } from "@std/path"; +import { join, dirname, basename } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/curl.ts b/src/lib/commands/curl.ts index 7f19ea81..74a763fd 100644 --- a/src/lib/commands/curl.ts +++ b/src/lib/commands/curl.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/cut.ts b/src/lib/commands/cut.ts index cfd537be..59f4c366 100644 --- a/src/lib/commands/cut.ts +++ b/src/lib/commands/cut.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/diff.ts b/src/lib/commands/diff.ts index a3d0fef0..ae118482 100644 --- a/src/lib/commands/diff.ts +++ b/src/lib/commands/diff.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/find.ts b/src/lib/commands/find.ts index da461167..969faa2f 100644 --- a/src/lib/commands/find.ts +++ b/src/lib/commands/find.ts @@ -1,4 +1,4 @@ -import { join, basename } from "@std/path"; +import { join, basename } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/git/add.ts b/src/lib/commands/git/add.ts index b8435fad..c7d55a5a 100644 --- a/src/lib/commands/git/add.ts +++ b/src/lib/commands/git/add.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../../JSRuntime"; import type { ShellCommandResult } from "../ShellCommand"; import { createSuccessResult, createErrorResult } from "../ShellCommand"; diff --git a/src/lib/commands/grep.ts b/src/lib/commands/grep.ts index 3298f7cf..7e41a2ed 100644 --- a/src/lib/commands/grep.ts +++ b/src/lib/commands/grep.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/head.ts b/src/lib/commands/head.ts index b3821c48..65552883 100644 --- a/src/lib/commands/head.ts +++ b/src/lib/commands/head.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/ls.ts b/src/lib/commands/ls.ts index 162d499c..49255620 100644 --- a/src/lib/commands/ls.ts +++ b/src/lib/commands/ls.ts @@ -1,4 +1,4 @@ -import { join, basename } from "@std/path"; +import { join, basename } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/mkdir.ts b/src/lib/commands/mkdir.ts index b6666df3..82ddd883 100644 --- a/src/lib/commands/mkdir.ts +++ b/src/lib/commands/mkdir.ts @@ -1,4 +1,4 @@ -import { join, dirname } from "@std/path"; +import { join, dirname } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/mv.ts b/src/lib/commands/mv.ts index d4f84184..1d808420 100644 --- a/src/lib/commands/mv.ts +++ b/src/lib/commands/mv.ts @@ -1,4 +1,4 @@ -import { join, dirname, basename } from "@std/path"; +import { join, dirname, basename } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/rm.ts b/src/lib/commands/rm.ts index 1a17f741..e6b8f913 100644 --- a/src/lib/commands/rm.ts +++ b/src/lib/commands/rm.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/sort.ts b/src/lib/commands/sort.ts index c32adad7..07010429 100644 --- a/src/lib/commands/sort.ts +++ b/src/lib/commands/sort.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/tail.ts b/src/lib/commands/tail.ts index 5ed16c9c..e0fc9b97 100644 --- a/src/lib/commands/tail.ts +++ b/src/lib/commands/tail.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/touch.ts b/src/lib/commands/touch.ts index d3564b50..bce66f25 100644 --- a/src/lib/commands/touch.ts +++ b/src/lib/commands/touch.ts @@ -1,4 +1,4 @@ -import { join, dirname } from "@std/path"; +import { join, dirname } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/tr.ts b/src/lib/commands/tr.ts index 05210b07..e39b03b2 100644 --- a/src/lib/commands/tr.ts +++ b/src/lib/commands/tr.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/uniq.ts b/src/lib/commands/uniq.ts index 5a9146ac..6b0ccd1e 100644 --- a/src/lib/commands/uniq.ts +++ b/src/lib/commands/uniq.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/commands/wc.ts b/src/lib/commands/wc.ts index 62434ec8..d31454b8 100644 --- a/src/lib/commands/wc.ts +++ b/src/lib/commands/wc.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import type { JSRuntimeFS } from "../JSRuntime"; import type { ShellCommand, ShellCommandResult } from "./ShellCommand"; import { createSuccessResult, createErrorResult } from "./ShellCommand"; diff --git a/src/lib/security.ts b/src/lib/security.ts index bc1a07e0..e4f8583d 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -2,7 +2,7 @@ * Security utilities for path validation and access control */ -import { normalize } from "@std/path"; +import { normalize } from "path-browserify"; /** * Check if the given path is an absolute path diff --git a/src/lib/system.ts b/src/lib/system.ts index 6f7652cf..78976c9e 100644 --- a/src/lib/system.ts +++ b/src/lib/system.ts @@ -1,6 +1,6 @@ import { NUser } from "@nostrify/react/login"; import { NostrMetadata } from "@nostrify/nostrify"; -import { join } from "@std/path"; +import { join } from "path-browserify"; import OpenAI from "openai"; import { nip19 } from "nostr-tools"; import { JSRuntimeFS } from "./JSRuntime"; diff --git a/src/lib/tools/TextEditorStrReplaceTool.ts b/src/lib/tools/TextEditorStrReplaceTool.ts index cbcaa828..172a5a0e 100644 --- a/src/lib/tools/TextEditorStrReplaceTool.ts +++ b/src/lib/tools/TextEditorStrReplaceTool.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import { z } from "zod"; import type { Tool } from "./Tool"; diff --git a/src/lib/tools/TextEditorViewTool.ts b/src/lib/tools/TextEditorViewTool.ts index 0adbbfe9..890ca989 100644 --- a/src/lib/tools/TextEditorViewTool.ts +++ b/src/lib/tools/TextEditorViewTool.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "path-browserify"; import ignore from "ignore"; import { z } from "zod"; diff --git a/src/lib/tools/TextEditorWriteTool.ts b/src/lib/tools/TextEditorWriteTool.ts index 0c861d82..9bb066c6 100644 --- a/src/lib/tools/TextEditorWriteTool.ts +++ b/src/lib/tools/TextEditorWriteTool.ts @@ -1,4 +1,4 @@ -import { join, dirname } from "@std/path"; +import { join, dirname } from "path-browserify"; import { z } from "zod"; import type { Tool } from "./Tool";