@nuvix/storage 1.0.1 → 2.0.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 (37) hide show
  1. package/README.md +141 -275
  2. package/dist/index.d.ts +14 -469
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +2 -7360
  5. package/dist/src/device/local.d.ts +49 -0
  6. package/dist/src/device/local.d.ts.map +1 -0
  7. package/dist/src/device/minio.d.ts +22 -0
  8. package/dist/src/device/minio.d.ts.map +1 -0
  9. package/dist/src/device/s3.d.ts +104 -0
  10. package/dist/src/device/s3.d.ts.map +1 -0
  11. package/dist/src/device/wasabi.d.ts +26 -0
  12. package/dist/src/device/wasabi.d.ts.map +1 -0
  13. package/dist/src/device.d.ts +118 -0
  14. package/dist/src/device.d.ts.map +1 -0
  15. package/dist/src/errors.d.ts +15 -0
  16. package/dist/src/errors.d.ts.map +1 -0
  17. package/dist/src/storage.d.ts +44 -0
  18. package/dist/src/storage.d.ts.map +1 -0
  19. package/dist/src/validator/file-ext.d.ts +15 -0
  20. package/dist/src/validator/file-ext.d.ts.map +1 -0
  21. package/dist/src/validator/file-name.d.ts +15 -0
  22. package/dist/src/validator/file-name.d.ts.map +1 -0
  23. package/dist/src/validator/file-size.d.ts +17 -0
  24. package/dist/src/validator/file-size.d.ts.map +1 -0
  25. package/dist/src/validator/file-type.d.ts +23 -0
  26. package/dist/src/validator/file-type.d.ts.map +1 -0
  27. package/dist/src/validator/file.d.ts +14 -0
  28. package/dist/src/validator/file.d.ts.map +1 -0
  29. package/dist/src/validator/upload.d.ts +15 -0
  30. package/dist/src/validator/upload.d.ts.map +1 -0
  31. package/dist/src/validator/validator.d.ts +8 -0
  32. package/dist/src/validator/validator.d.ts.map +1 -0
  33. package/package.json +22 -28
  34. package/dist/index.cjs +0 -7375
  35. package/dist/index.cjs.map +0 -1
  36. package/dist/index.d.cts +0 -469
  37. package/dist/index.js.map +0 -1
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "@nuvix/storage",
3
- "version": "1.0.1",
4
- "description": "S3-compatible storage library for Nuvix BaaS platform with support for AWS S3, Wasabi, MinIO, and local storage",
3
+ "version": "2.0.0",
4
+ "description": "S3-compatible storage library for the Nuvix BaaS platform, built on Bun's native APIs. Supports AWS S3, Wasabi, MinIO, and local storage.",
5
5
  "type": "module",
6
- "main": "dist/index.cjs",
7
- "module": "dist/index.js",
8
- "types": "dist/index.d.ts",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
- "types": " ./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.cjs"
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
14
13
  }
15
14
  },
16
15
  "files": [
@@ -19,29 +18,23 @@
19
18
  "LICENSE"
20
19
  ],
21
20
  "scripts": {
22
- "build": "tsup",
23
- "build:watch": "tsup --watch",
21
+ "build": "bun run build:js && bun run build:types",
22
+ "build:js": "bun build ./index.ts --outdir dist --target bun --format esm --minify",
23
+ "build:types": "tsc --project tsconfig.build.json",
24
24
  "clean": "rm -rf dist",
25
25
  "prepublishOnly": "bun run clean && bun run build",
26
- "test": "jest",
27
- "test:watch": "jest --watch",
28
- "test:coverage": "jest --coverage",
29
- "lint": "eslint src --ext .ts",
30
- "lint:fix": "eslint src --ext .ts --fix"
26
+ "test": "bun test",
27
+ "test:watch": "bun test --watch",
28
+ "test:coverage": "bun test --coverage",
29
+ "lint": "oxlint src __tests__ index.ts",
30
+ "lint:fix": "oxlint src __tests__ index.ts --fix",
31
+ "typecheck": "tsc --noEmit"
31
32
  },
32
33
  "dependencies": {},
33
34
  "devDependencies": {
34
- "@types/jest": "^29.5.0",
35
- "@types/node": "^18.15.11",
36
- "@types/xml2js": "^0.4.14",
37
- "@typescript-eslint/eslint-plugin": "^5.59.0",
38
- "@typescript-eslint/parser": "^5.59.0",
39
- "xml2js": "^0.6.2",
40
- "eslint": "^8.38.0",
41
- "jest": "^29.5.0",
42
- "ts-jest": "^29.1.0",
43
- "tsup": "^8.5.0",
44
- "typescript": "^5.0.4"
35
+ "@types/bun": "^1.2.0",
36
+ "oxlint": "^1.0.0",
37
+ "typescript": "^5.6.0"
45
38
  },
46
39
  "keywords": [
47
40
  "nuvix",
@@ -53,18 +46,19 @@
53
46
  "cloud-storage",
54
47
  "file-upload",
55
48
  "typescript",
56
- "esm"
49
+ "bun"
57
50
  ],
58
51
  "author": "",
59
52
  "license": "MIT",
60
53
  "engines": {
61
- "node": ">=16.0.0"
54
+ "bun": ">=1.2.0"
62
55
  },
63
56
  "repository": {
64
57
  "type": "git",
65
58
  "url": "https://github.com/nuvix-tech/storage.git"
66
59
  },
67
60
  "bugs": {
61
+ "type": "git",
68
62
  "url": "https://github.com/nuvix-tech/storage/issues"
69
63
  },
70
64
  "homepage": "https://github.com/nuvix-tech/storage#readme"