dbx-tools-node-runtime 0.9.119__tar.gz → 0.9.120__tar.gz
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.
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/PKG-INFO +1 -1
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/pyproject.toml +1 -1
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/pyproject.toml.orig +1 -1
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/src/dbx_tools/node_runtime/runtime.js +27 -18
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/LICENSE +0 -0
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/README.md +0 -0
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/src/dbx_tools/node_runtime/__init__.py +0 -0
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/src/dbx_tools/node_runtime/__main__.py +0 -0
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/src/dbx_tools/node_runtime/bootstrap.py +0 -0
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/src/dbx_tools/node_runtime/py.typed +0 -0
- {dbx_tools_node_runtime-0.9.119 → dbx_tools_node_runtime-0.9.120}/src/dbx_tools/node_runtime/runtime.py +0 -0
|
@@ -11854,6 +11854,28 @@ __export(exports_node___fs, {
|
|
|
11854
11854
|
});
|
|
11855
11855
|
var import_node_stream2 = __toESM(require_stream_browserify(), 1);
|
|
11856
11856
|
|
|
11857
|
+
// packages/py/node-runtime/shims/fs-errors.ts
|
|
11858
|
+
function nodeError(error, code, path) {
|
|
11859
|
+
return Object.assign(error instanceof Error ? error : new Error(String(error)), { code, path });
|
|
11860
|
+
}
|
|
11861
|
+
function translatePythonError(cause, path) {
|
|
11862
|
+
const message = String(cause);
|
|
11863
|
+
if (/FileNotFoundError|Errno 2/.test(message))
|
|
11864
|
+
throw nodeError(cause, "ENOENT", path);
|
|
11865
|
+
if (/FileExistsError|Errno 17/.test(message))
|
|
11866
|
+
throw nodeError(cause, "EEXIST", path);
|
|
11867
|
+
if (/PermissionError|Errno 13/.test(message))
|
|
11868
|
+
throw nodeError(cause, "EACCES", path);
|
|
11869
|
+
throw cause;
|
|
11870
|
+
}
|
|
11871
|
+
function withPythonPath(path, operation) {
|
|
11872
|
+
try {
|
|
11873
|
+
return operation();
|
|
11874
|
+
} catch (cause) {
|
|
11875
|
+
translatePythonError(cause, path);
|
|
11876
|
+
}
|
|
11877
|
+
}
|
|
11878
|
+
|
|
11857
11879
|
// packages/py/node-runtime/shims/node___fs__promises.ts
|
|
11858
11880
|
var exports_node___fs__promises = {};
|
|
11859
11881
|
__export(exports_node___fs__promises, {
|
|
@@ -11875,19 +11897,6 @@ __export(exports_node___fs__promises, {
|
|
|
11875
11897
|
writeFile: () => writeFile
|
|
11876
11898
|
});
|
|
11877
11899
|
var import_node_buffer2 = __toESM(require_buffer(), 1);
|
|
11878
|
-
function nodeError(error, code, path) {
|
|
11879
|
-
return Object.assign(error instanceof Error ? error : new Error(String(error)), { code, path });
|
|
11880
|
-
}
|
|
11881
|
-
function translatePythonError(cause, path) {
|
|
11882
|
-
const message = String(cause);
|
|
11883
|
-
if (/FileNotFoundError|Errno 2/.test(message))
|
|
11884
|
-
throw nodeError(cause, "ENOENT", path);
|
|
11885
|
-
if (/FileExistsError|Errno 17/.test(message))
|
|
11886
|
-
throw nodeError(cause, "EEXIST", path);
|
|
11887
|
-
if (/PermissionError|Errno 13/.test(message))
|
|
11888
|
-
throw nodeError(cause, "EACCES", path);
|
|
11889
|
-
throw cause;
|
|
11890
|
-
}
|
|
11891
11900
|
async function access(path) {
|
|
11892
11901
|
try {
|
|
11893
11902
|
await pythonHost().file.stat(String(path));
|
|
@@ -12018,10 +12027,10 @@ function existsSync(path) {
|
|
|
12018
12027
|
return pythonHost().file.exists(String(path));
|
|
12019
12028
|
}
|
|
12020
12029
|
function readFileSync(path, _encoding) {
|
|
12021
|
-
return pythonHost().file.readTextSync(String(path));
|
|
12030
|
+
return withPythonPath(path, () => pythonHost().file.readTextSync(String(path)));
|
|
12022
12031
|
}
|
|
12023
12032
|
function readdirSync(path, options = {}) {
|
|
12024
|
-
const entries = pythonHost().file.readDirectorySync(String(path));
|
|
12033
|
+
const entries = withPythonPath(path, () => pythonHost().file.readDirectorySync(String(path)));
|
|
12025
12034
|
if (!options.withFileTypes)
|
|
12026
12035
|
return entries.map((entry) => entry.name);
|
|
12027
12036
|
return entries.map((entry) => ({
|
|
@@ -12032,14 +12041,14 @@ function readdirSync(path, options = {}) {
|
|
|
12032
12041
|
}));
|
|
12033
12042
|
}
|
|
12034
12043
|
function readlinkSync(path) {
|
|
12035
|
-
return pythonHost().file.readLinkSync(String(path));
|
|
12044
|
+
return withPythonPath(path, () => pythonHost().file.readLinkSync(String(path)));
|
|
12036
12045
|
}
|
|
12037
12046
|
function realpathSync(path) {
|
|
12038
|
-
return pythonHost().file.realpathSync(String(path));
|
|
12047
|
+
return withPythonPath(path, () => pythonHost().file.realpathSync(String(path)));
|
|
12039
12048
|
}
|
|
12040
12049
|
realpathSync.native = realpathSync;
|
|
12041
12050
|
function lstatSync(path) {
|
|
12042
|
-
const value = pythonHost().file.statSync(String(path));
|
|
12051
|
+
const value = withPythonPath(path, () => pythonHost().file.statSync(String(path)));
|
|
12043
12052
|
return {
|
|
12044
12053
|
mode: value.mode,
|
|
12045
12054
|
mtime: new Date(value.mtimeMs),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|