vscode-fs 0.1.0 → 0.1.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/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as FileSystemProviderErrorCode, c as WriteableFlags, i as FileSystemError, n as createFileSystemError, o as FileType, r as toFileSystemError, s as RelativePattern, t as createNodeFileSystem } from "./node-
|
|
1
|
+
import { a as FileSystemProviderErrorCode, c as WriteableFlags, i as FileSystemError, n as createFileSystemError, o as FileType, r as toFileSystemError, s as RelativePattern, t as createNodeFileSystem } from "./node-C-Gv1oIU.mjs";
|
|
2
2
|
|
|
3
3
|
export { FileSystemError, FileSystemProviderErrorCode, FileType, RelativePattern, WriteableFlags, createFileSystemError, createNodeFileSystem, toFileSystemError };
|
|
@@ -177,9 +177,8 @@ function joinPath(basePath, ...segments) {
|
|
|
177
177
|
return vscode_uri.Utils.joinPath(vscode_uri.URI.file(basePath), ...segments).fsPath;
|
|
178
178
|
}
|
|
179
179
|
async function createNodeFileSystem() {
|
|
180
|
-
const [fs,
|
|
180
|
+
const [fs, glob, watch, stream] = await Promise.all([
|
|
181
181
|
import("node:fs"),
|
|
182
|
-
import("trash").then((m) => m.default),
|
|
183
182
|
import("tinyglobby").then((m) => m.glob),
|
|
184
183
|
import("chokidar").then((m) => m.watch),
|
|
185
184
|
import("node:stream")
|
|
@@ -256,7 +255,7 @@ async function createNodeFileSystem() {
|
|
|
256
255
|
readFile: (uri) => wrap(() => fs.promises.readFile(uri.fsPath)),
|
|
257
256
|
writeFile: (uri, content) => wrap(() => fs.promises.writeFile(uri.fsPath, content)),
|
|
258
257
|
delete: (uri, options) => wrap(async () => {
|
|
259
|
-
if (options?.useTrash) await trash(uri.fsPath);
|
|
258
|
+
if (options?.useTrash === true) await import("trash").then((m) => m.default).then((trash) => trash(uri.fsPath));
|
|
260
259
|
else await fs.promises.rm(uri.fsPath, { recursive: options?.recursive ?? false });
|
|
261
260
|
}),
|
|
262
261
|
rename: (source, target, options) => wrap(async () => {
|
|
@@ -176,9 +176,8 @@ function joinPath(basePath, ...segments) {
|
|
|
176
176
|
return Utils.joinPath(URI.file(basePath), ...segments).fsPath;
|
|
177
177
|
}
|
|
178
178
|
async function createNodeFileSystem() {
|
|
179
|
-
const [fs,
|
|
179
|
+
const [fs, glob, watch, stream] = await Promise.all([
|
|
180
180
|
import("node:fs"),
|
|
181
|
-
import("trash").then((m) => m.default),
|
|
182
181
|
import("tinyglobby").then((m) => m.glob),
|
|
183
182
|
import("chokidar").then((m) => m.watch),
|
|
184
183
|
import("node:stream")
|
|
@@ -255,7 +254,7 @@ async function createNodeFileSystem() {
|
|
|
255
254
|
readFile: (uri) => wrap(() => fs.promises.readFile(uri.fsPath)),
|
|
256
255
|
writeFile: (uri, content) => wrap(() => fs.promises.writeFile(uri.fsPath, content)),
|
|
257
256
|
delete: (uri, options) => wrap(async () => {
|
|
258
|
-
if (options?.useTrash) await trash(uri.fsPath);
|
|
257
|
+
if (options?.useTrash === true) await import("trash").then((m) => m.default).then((trash) => trash(uri.fsPath));
|
|
259
258
|
else await fs.promises.rm(uri.fsPath, { recursive: options?.recursive ?? false });
|
|
260
259
|
}),
|
|
261
260
|
rename: (source, target, options) => wrap(async () => {
|
package/dist/vscode.cjs
CHANGED
|
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
}) : target, mod));
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
|
-
const require_node = require('./node-
|
|
29
|
+
const require_node = require('./node-BV_ucnay.cjs');
|
|
30
30
|
let vscode = require("vscode");
|
|
31
31
|
vscode = __toESM(vscode);
|
|
32
32
|
|
|
@@ -39,7 +39,7 @@ async function createVSCodeFileSystem() {
|
|
|
39
39
|
createDirectory: async (uri) => await vscode.workspace.fs.createDirectory(uri),
|
|
40
40
|
readFile: async (uri) => await vscode.workspace.fs.readFile(uri),
|
|
41
41
|
writeFile: async (uri, content) => await vscode.workspace.fs.writeFile(uri, content),
|
|
42
|
-
delete: async (uri) => await vscode.workspace.fs.delete(uri),
|
|
42
|
+
delete: async (uri, options) => await vscode.workspace.fs.delete(uri, options),
|
|
43
43
|
rename: async (source, target, options) => await vscode.workspace.fs.rename(source, target, options),
|
|
44
44
|
copy: async (source, target, options) => await vscode.workspace.fs.copy(source, target, options),
|
|
45
45
|
isDirectory: async (uri) => await vscode.workspace.fs.stat(uri).then((stat) => stat.type === vscode.FileType.Directory ? stat : false, () => false),
|
package/dist/vscode.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createNodeFileSystem } from "./node-
|
|
1
|
+
import { t as createNodeFileSystem } from "./node-C-Gv1oIU.mjs";
|
|
2
2
|
import * as vscode from "vscode";
|
|
3
3
|
|
|
4
4
|
//#region src/vscode.ts
|
|
@@ -10,7 +10,7 @@ async function createVSCodeFileSystem() {
|
|
|
10
10
|
createDirectory: async (uri) => await vscode.workspace.fs.createDirectory(uri),
|
|
11
11
|
readFile: async (uri) => await vscode.workspace.fs.readFile(uri),
|
|
12
12
|
writeFile: async (uri, content) => await vscode.workspace.fs.writeFile(uri, content),
|
|
13
|
-
delete: async (uri) => await vscode.workspace.fs.delete(uri),
|
|
13
|
+
delete: async (uri, options) => await vscode.workspace.fs.delete(uri, options),
|
|
14
14
|
rename: async (source, target, options) => await vscode.workspace.fs.rename(source, target, options),
|
|
15
15
|
copy: async (source, target, options) => await vscode.workspace.fs.copy(source, target, options),
|
|
16
16
|
isDirectory: async (uri) => await vscode.workspace.fs.stat(uri).then((stat) => stat.type === vscode.FileType.Directory ? stat : false, () => false),
|
package/package.json
CHANGED