@muhgholy/next-drive 3.0.0 → 3.1.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.
@@ -52,4 +52,33 @@ export declare const driveFilePath: (file: string | IDatabaseDriveDocument | TDa
52
52
  provider: string;
53
53
  }>>;
54
54
  export declare const processChunk: (drive: any, chunkFile: formidable.File | formidable.File[] | undefined, chunkIndex: number, totalChunks: number, STORAGE_PATH: string) => Promise<void>;
55
+ /**
56
+ * Upload a file to the drive system from a file path or readable stream.
57
+ * @param source - File path (string) or Readable stream
58
+ * @param key - Owner key (must match the authenticated user's key)
59
+ * @param options - Upload options including name, parentId, accountId, and enforce flag
60
+ * @returns Promise with the created drive file object
61
+ * @example
62
+ * ```typescript
63
+ * // Upload from file path
64
+ * const file = await driveUpload('/tmp/photo.jpg', { userId: '123' }, {
65
+ * name: 'photo.jpg',
66
+ * parentId: 'folderId',
67
+ * enforce: false
68
+ * });
69
+ *
70
+ * // Upload from stream
71
+ * const stream = fs.createReadStream('/tmp/video.mp4');
72
+ * const file = await driveUpload(stream, { userId: '123' }, {
73
+ * name: 'video.mp4',
74
+ * enforce: true // Skip quota check
75
+ * });
76
+ * ```
77
+ */
78
+ export declare const driveUpload: (source: string | Readable, key: Record<string, unknown> | null, options: {
79
+ name: string;
80
+ parentId?: string | null;
81
+ accountId?: string;
82
+ enforce?: boolean;
83
+ }) => Promise<TDatabaseDrive>;
55
84
  //# sourceMappingURL=drive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../../src/server/controllers/drive.ts"],"names":[],"mappings":"AAGA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAIvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE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AAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA2GhG,CAAC;AAEF,eAAO,MAAM,YAAY,GAAU,OAAO,GAAG,EAAE,WAAW,UAAU,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,EAAE,GAAG,SAAS,EAAE,YAAY,MAAM,EAAE,aAAa,MAAM,EAAE,cAAc,MAAM,kBA8BvK,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,WAAW,GACpB,QAAQ,MAAM,GAAG,QAAQ,EACzB,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACnC,SAAS;IACL,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,KACF,OAAO,CAAC,cAAc,CAoIxB,CAAC"}
@@ -1,5 +1,5 @@
1
- import { driveAPIHandler, driveConfiguration } from '../chunk-KCDI2FBD.js';
2
- export { driveFilePath, driveFileSchemaZod, driveGetUrl, driveReadFile, getDriveConfig } from '../chunk-KCDI2FBD.js';
1
+ import { driveAPIHandler, driveConfiguration } from '../chunk-F5ZVJGYN.js';
2
+ export { driveFilePath, driveFileSchemaZod, driveGetUrl, driveReadFile, getDriveConfig } from '../chunk-F5ZVJGYN.js';
3
3
  import '../chunk-CN3AV3AN.js';
4
4
  import '../chunk-DGUM43GV.js';
5
5
 
@@ -2,7 +2,7 @@ import type { NextApiRequest, NextApiResponse } from 'next';
2
2
  import { getDriveConfig, getDriveInformation, driveConfiguration } from '../server/config';
3
3
  export declare const driveAPIHandler: (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
4
4
  export { driveConfiguration, getDriveConfig, getDriveInformation };
5
- export { driveGetUrl, driveReadFile, driveFilePath } from '../server/controllers/drive';
5
+ export { driveGetUrl, driveReadFile, driveFilePath, driveUpload } from '../server/controllers/drive';
6
6
  export { driveFileSchemaZod } from '../server/zod/schemas';
7
7
  export { driveCreateUrl, driveCreateSrcSet } from '../client/utils';
8
8
  export type { TDriveFile, TImageQuality, TImageFormat } from '../types/client';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAO5D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA6F1F,eAAO,MAAM,eAAe,GAAU,KAAK,cAAc,EAAE,KAAK,eAAe,KAAG,OAAO,CAAC,IAAI,CA+sB7F,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9E,mBAAmB,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAO5D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA6F1F,eAAO,MAAM,eAAe,GAAU,KAAK,cAAc,EAAE,KAAK,eAAe,KAAG,OAAO,CAAC,IAAI,CA+sB7F,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9E,mBAAmB,gBAAgB,CAAC"}
@@ -1,4 +1,4 @@
1
- export { driveAPIHandler, driveConfiguration, driveFilePath, driveFileSchemaZod, driveGetUrl, driveReadFile, getDriveConfig, getDriveInformation } from '../chunk-KCDI2FBD.js';
1
+ export { driveAPIHandler, driveConfiguration, driveFilePath, driveFileSchemaZod, driveGetUrl, driveReadFile, driveUpload, getDriveConfig, getDriveInformation } from '../chunk-F5ZVJGYN.js';
2
2
  export { driveCreateSrcSet, driveCreateUrl } from '../chunk-CN3AV3AN.js';
3
3
  import '../chunk-DGUM43GV.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../../src/server/providers/local.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAK/D,eAAO,MAAM,oBAAoB,EAAE,gBA6OlC,CAAC"}
1
+ {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../../src/server/providers/local.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAK/D,eAAO,MAAM,oBAAoB,EAAE,gBAwPlC,CAAC"}
@@ -28,5 +28,10 @@ export type TDriveUploadState = {
28
28
  totalChunks: number;
29
29
  driveId?: string;
30
30
  error?: string;
31
+ logs?: Array<{
32
+ type: 'info' | 'warning' | 'error' | 'success';
33
+ message: string;
34
+ timestamp: number;
35
+ }>;
31
36
  };
32
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/client/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACtD,CAAC;AAGF,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC9E,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAGnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGnD,MAAM,MAAM,cAAc,GAAG;IACzB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAGF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,CAAC;IAChF,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,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,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxG,CAAC"}
package/package.json CHANGED
@@ -1,104 +1,105 @@
1
1
  {
2
- "name": "@muhgholy/next-drive",
3
- "version": "3.0.0",
4
- "description": "File storage and management for Next.js applications",
5
- "type": "module",
6
- "exports": {
7
- "./server": {
8
- "types": "./dist/server/index.d.ts",
9
- "import": "./dist/server/index.js"
10
- },
11
- "./server/express": {
12
- "types": "./dist/server/express.d.ts",
13
- "import": "./dist/server/express.js"
14
- },
15
- "./client": {
16
- "types": "./dist/client/index.d.ts",
17
- "import": "./dist/client/index.js"
18
- },
19
- "./schemas": {
20
- "types": "./dist/schemas.d.ts",
21
- "import": "./dist/schemas.js"
22
- },
23
- "./client/styles.css": "./dist/client/styles.css"
24
- },
25
- "files": [
26
- "dist"
27
- ],
28
- "scripts": {
29
- "build": "tsup && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
30
- "dev": "tsup --watch",
31
- "lint": "eslint \"src/**/*.{ts,tsx}\"",
32
- "typecheck": "tsc --noEmit",
33
- "test": "vitest",
34
- "test:coverage": "vitest --coverage",
35
- "test:integration": "vitest -c vitest.integration.config.ts"
36
- },
37
- "peerDependencies": {
38
- "mongoose": ">=7.0.0",
39
- "next": ">=14.0.0",
40
- "react": ">=18.0.0",
41
- "react-dom": ">=18.0.0"
42
- },
43
- "dependencies": {
44
- "@dnd-kit/core": "^6.3.1",
45
- "@dnd-kit/sortable": "^10.0.0",
46
- "@dnd-kit/utilities": "^3.2.2",
47
- "@radix-ui/react-alert-dialog": "^1.1.15",
48
- "@radix-ui/react-context-menu": "^2.2.16",
49
- "@radix-ui/react-dialog": "^1.1.15",
50
- "@radix-ui/react-dropdown-menu": "^2.1.16",
51
- "@radix-ui/react-label": "^2.1.8",
52
- "@radix-ui/react-progress": "^1.1.8",
53
- "@radix-ui/react-separator": "^1.1.8",
54
- "@radix-ui/react-slot": "^1.2.4",
55
- "@radix-ui/react-tooltip": "^1.2.8",
56
- "class-variance-authority": "^0.7.1",
57
- "clsx": "^2.1.1",
58
- "date-fns": "^4.1.0",
59
- "fluent-ffmpeg": "^2.1.2",
60
- "formidable": "^3.5.4",
61
- "googleapis": "^169.0.0",
62
- "lucide-react": "^0.562.0",
63
- "sharp": "^0.33.0",
64
- "tailwind-merge": "^3.4.0",
65
- "zod": "^3.22.0"
66
- },
67
- "devDependencies": {
68
- "@eslint/js": "^9.39.2",
69
- "@semantic-release/changelog": "^6.0.3",
70
- "@semantic-release/exec": "^7.1.0",
71
- "@semantic-release/git": "^10.0.1",
72
- "@types/express": "^5.0.6",
73
- "@types/fluent-ffmpeg": "^2.1.21",
74
- "@types/formidable": "^3.4.6",
75
- "@types/node": "^20.0.0",
76
- "@types/react": "^18.0.0",
77
- "@types/react-dom": "^18.0.0",
78
- "@vitest/coverage-v8": "^4.0.16",
79
- "eslint": "^8.0.0",
80
- "jsdom": "^27.3.0",
81
- "mongoose": ">=7.0.0",
82
- "semantic-release": "^24.2.9",
83
- "tsc-alias": "^1.8.16",
84
- "tsup": "^8.0.0",
85
- "typescript": "^5.0.0",
86
- "typescript-eslint": "^8.50.1",
87
- "vitest": "^4.0.16"
88
- },
89
- "keywords": [
90
- "next.js",
91
- "file-storage",
92
- "drive",
93
- "upload",
94
- "file-management"
95
- ],
96
- "publishConfig": {
97
- "access": "public"
98
- },
99
- "license": "MIT",
100
- "repository": {
101
- "type": "git",
102
- "url": "https://github.com/muhgholy/next-drive"
103
- }
2
+ "name": "@muhgholy/next-drive",
3
+ "version": "3.1.0",
4
+ "description": "File storage and management for Next.js applications",
5
+ "type": "module",
6
+ "exports": {
7
+ "./server": {
8
+ "types": "./dist/server/index.d.ts",
9
+ "import": "./dist/server/index.js"
10
+ },
11
+ "./server/express": {
12
+ "types": "./dist/server/express.d.ts",
13
+ "import": "./dist/server/express.js"
14
+ },
15
+ "./client": {
16
+ "types": "./dist/client/index.d.ts",
17
+ "import": "./dist/client/index.js"
18
+ },
19
+ "./schemas": {
20
+ "types": "./dist/schemas.d.ts",
21
+ "import": "./dist/schemas.js"
22
+ },
23
+ "./client/styles.css": "./dist/client/styles.css"
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "README.md"
28
+ ],
29
+ "scripts": {
30
+ "build": "tsup && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
31
+ "dev": "tsup --watch",
32
+ "lint": "eslint \"src/**/*.{ts,tsx}\"",
33
+ "typecheck": "tsc --noEmit",
34
+ "test": "vitest",
35
+ "test:coverage": "vitest --coverage",
36
+ "test:integration": "vitest -c vitest.integration.config.ts"
37
+ },
38
+ "peerDependencies": {
39
+ "mongoose": ">=7.0.0",
40
+ "next": ">=14.0.0",
41
+ "react": ">=18.0.0",
42
+ "react-dom": ">=18.0.0"
43
+ },
44
+ "dependencies": {
45
+ "@dnd-kit/core": "^6.3.1",
46
+ "@dnd-kit/sortable": "^10.0.0",
47
+ "@dnd-kit/utilities": "^3.2.2",
48
+ "@radix-ui/react-alert-dialog": "^1.1.15",
49
+ "@radix-ui/react-context-menu": "^2.2.16",
50
+ "@radix-ui/react-dialog": "^1.1.15",
51
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
52
+ "@radix-ui/react-label": "^2.1.8",
53
+ "@radix-ui/react-progress": "^1.1.8",
54
+ "@radix-ui/react-separator": "^1.1.8",
55
+ "@radix-ui/react-slot": "^1.2.4",
56
+ "@radix-ui/react-tooltip": "^1.2.8",
57
+ "class-variance-authority": "^0.7.1",
58
+ "clsx": "^2.1.1",
59
+ "date-fns": "^4.1.0",
60
+ "fluent-ffmpeg": "^2.1.2",
61
+ "formidable": "^3.5.4",
62
+ "googleapis": "^169.0.0",
63
+ "lucide-react": "^0.562.0",
64
+ "sharp": "^0.33.0",
65
+ "tailwind-merge": "^3.4.0",
66
+ "zod": "^3.22.0"
67
+ },
68
+ "devDependencies": {
69
+ "@eslint/js": "^9.39.2",
70
+ "@semantic-release/changelog": "^6.0.3",
71
+ "@semantic-release/exec": "^7.1.0",
72
+ "@semantic-release/git": "^10.0.1",
73
+ "@types/express": "^5.0.6",
74
+ "@types/fluent-ffmpeg": "^2.1.21",
75
+ "@types/formidable": "^3.4.6",
76
+ "@types/node": "^20.0.0",
77
+ "@types/react": "^18.0.0",
78
+ "@types/react-dom": "^18.0.0",
79
+ "@vitest/coverage-v8": "^4.0.16",
80
+ "eslint": "^8.0.0",
81
+ "jsdom": "^27.3.0",
82
+ "mongoose": ">=7.0.0",
83
+ "semantic-release": "^24.2.9",
84
+ "tsc-alias": "^1.8.16",
85
+ "tsup": "^8.0.0",
86
+ "typescript": "^5.0.0",
87
+ "typescript-eslint": "^8.50.1",
88
+ "vitest": "^4.0.16"
89
+ },
90
+ "keywords": [
91
+ "next.js",
92
+ "file-storage",
93
+ "drive",
94
+ "upload",
95
+ "file-management"
96
+ ],
97
+ "publishConfig": {
98
+ "access": "public"
99
+ },
100
+ "license": "MIT",
101
+ "repository": {
102
+ "type": "git",
103
+ "url": "https://github.com/muhgholy/next-drive"
104
+ }
104
105
  }