node-datalith 0.2.1 → 0.2.3
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/lib/lib.js +3 -3
- package/package.json +13 -14
package/lib/lib.js
CHANGED
|
@@ -58,7 +58,7 @@ export class Datalith {
|
|
|
58
58
|
if (typeof options.fileSize !== "undefined") {
|
|
59
59
|
headers["x-file-length"] = options.fileSize.toString();
|
|
60
60
|
}
|
|
61
|
-
const response = await timeoutFetch(
|
|
61
|
+
const response = await timeoutFetch(url, {
|
|
62
62
|
method: "PUT",
|
|
63
63
|
headers,
|
|
64
64
|
body: fileStream,
|
|
@@ -100,7 +100,7 @@ export class Datalith {
|
|
|
100
100
|
else {
|
|
101
101
|
fileStream = options.fileStream;
|
|
102
102
|
}
|
|
103
|
-
const url = new URL(this.
|
|
103
|
+
const url = new URL(this._apiOperateImage);
|
|
104
104
|
const searchParams = url.searchParams;
|
|
105
105
|
if (typeof options.fileName !== "undefined") {
|
|
106
106
|
searchParams.append("file_name", options.fileName);
|
|
@@ -121,7 +121,7 @@ export class Datalith {
|
|
|
121
121
|
if (typeof options.fileSize !== "undefined") {
|
|
122
122
|
headers["x-file-length"] = options.fileSize.toString();
|
|
123
123
|
}
|
|
124
|
-
const response = await timeoutFetch(
|
|
124
|
+
const response = await timeoutFetch(url, {
|
|
125
125
|
method: "PUT",
|
|
126
126
|
headers,
|
|
127
127
|
body: fileStream,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-datalith",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Datalith is a file management system powered by SQLite for metadata storage and the file system for file storage. This library can help you conmunicate with Datalith in Node.js.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/lib.js",
|
|
@@ -42,23 +42,22 @@
|
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://magiclen.org/datalith/",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@types/node": "^22.
|
|
46
|
-
"fetch-helper-x": "^0.1.
|
|
45
|
+
"@types/node": "^22.13.11",
|
|
46
|
+
"fetch-helper-x": "^0.1.8"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@eslint/js": "^9.
|
|
50
|
-
"@stylistic/eslint-plugin": "^2.
|
|
51
|
-
"@types/
|
|
52
|
-
"
|
|
53
|
-
"eslint": "^
|
|
54
|
-
"eslint-import-resolver-typescript": "^3.6.3",
|
|
49
|
+
"@eslint/js": "^9.23.0",
|
|
50
|
+
"@stylistic/eslint-plugin": "^4.2.0",
|
|
51
|
+
"@types/jest": "^29.5.14",
|
|
52
|
+
"eslint": "^9.23.0",
|
|
53
|
+
"eslint-import-resolver-typescript": "^4.2.2",
|
|
55
54
|
"eslint-plugin-import": "^2.31.0",
|
|
56
|
-
"globals": "^
|
|
55
|
+
"globals": "^16.0.0",
|
|
57
56
|
"jest": "^29.7.0",
|
|
58
57
|
"rimraf": "^6.0.1",
|
|
59
|
-
"ts-jest": "^29.2.
|
|
60
|
-
"typescript": "~5.
|
|
61
|
-
"typescript-eslint": "^8.
|
|
62
|
-
"web-streams-polyfill": "^4.
|
|
58
|
+
"ts-jest": "^29.2.6",
|
|
59
|
+
"typescript": "~5.8.2",
|
|
60
|
+
"typescript-eslint": "^8.27.0",
|
|
61
|
+
"web-streams-polyfill": "^4.1.0"
|
|
63
62
|
}
|
|
64
63
|
}
|