node-datalith 0.2.2 → 0.3.0

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.
Files changed (2) hide show
  1. package/lib/lib.js +3 -3
  2. package/package.json +17 -18
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(this._apiOperate.toString(), {
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._apiOperate);
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(this._apiOperateImage.toString(), {
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.2",
3
+ "version": "0.3.0",
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",
@@ -9,7 +9,7 @@
9
9
  "lib"
10
10
  ],
11
11
  "engines": {
12
- "node": ">=20"
12
+ "node": ">=22"
13
13
  },
14
14
  "scripts": {
15
15
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
@@ -42,23 +42,22 @@
42
42
  },
43
43
  "homepage": "https://magiclen.org/datalith/",
44
44
  "dependencies": {
45
- "@types/node": "^22.7.7",
46
- "fetch-helper-x": "^0.1.7"
45
+ "@types/node": "^25.3.3",
46
+ "fetch-helper-x": "^0.1.8"
47
47
  },
48
48
  "devDependencies": {
49
- "@eslint/js": "^9.13.0",
50
- "@stylistic/eslint-plugin": "^2.9.0",
51
- "@types/eslint__js": "^8.42.3",
52
- "@types/jest": "^29.5.13",
53
- "eslint": "^9.13.0",
54
- "eslint-import-resolver-typescript": "^3.6.3",
55
- "eslint-plugin-import": "^2.31.0",
56
- "globals": "^15.11.0",
57
- "jest": "^29.7.0",
58
- "rimraf": "^6.0.1",
59
- "ts-jest": "^29.2.5",
60
- "typescript": "~5.5.4",
61
- "typescript-eslint": "^8.10.0",
62
- "web-streams-polyfill": "^4.0.0"
49
+ "@eslint/js": "^9.39.2",
50
+ "@stylistic/eslint-plugin": "^5.7.1",
51
+ "@types/jest": "^30.0.0",
52
+ "eslint": "^9.39.2",
53
+ "eslint-import-resolver-typescript": "^4.4.4",
54
+ "eslint-plugin-import": "^2.32.0",
55
+ "globals": "^17.3.0",
56
+ "jest": "^30.2.0",
57
+ "rimraf": "^6.1.2",
58
+ "ts-jest": "^29.4.6",
59
+ "typescript": "~5.9.3",
60
+ "typescript-eslint": "^8.54.0",
61
+ "web-streams-polyfill": "^4.2.0"
63
62
  }
64
63
  }