deeplake 0.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.
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # DeepLake Node.js Client
2
+
3
+ Node.js client for DeepLake - the database for AI.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install deeplake
9
+ ```
10
+
11
+ This will automatically install both the managed client (`@deeplake/managed`) and the WASM module (`@deeplake/wasm`).
12
+
13
+ ## Quick Start
14
+
15
+ ```javascript
16
+ const { ManagedClient, initializeWasm } = require('deeplake');
17
+
18
+ async function main() {
19
+ // Initialize WASM (automatically finds the installed WASM module)
20
+ await initializeWasm();
21
+
22
+ // Create client
23
+ const client = new ManagedClient({
24
+ token: 'your-api-token'
25
+ });
26
+
27
+ // Use the client...
28
+ }
29
+
30
+ main();
31
+ ```
32
+
33
+ ## Documentation
34
+
35
+ For full documentation, visit [https://docs.activeloop.ai/](https://docs.activeloop.ai/)
36
+
37
+ ## License
38
+
39
+ Apache-2.0
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Re-export all types from @deeplake/managed
2
+ export * from '@deeplake/managed';
package/index.js ADDED
@@ -0,0 +1,26 @@
1
+ const path = require('path');
2
+
3
+ // Re-export everything from @deeplake/managed
4
+ module.exports = require('@deeplake/managed');
5
+
6
+ // Override initializeWasm to automatically use the installed WASM package
7
+ const { initializeWasm: originalInitializeWasm } = require('@deeplake/managed');
8
+
9
+ /**
10
+ * Initialize the WASM module.
11
+ * If no path is provided, automatically uses the installed @deeplake/wasm package.
12
+ */
13
+ module.exports.initializeWasm = async function initializeWasm(modulePath) {
14
+ if (!modulePath && !process.env.DEEPLAKE_WASM_PATH) {
15
+ // Auto-resolve to the installed @deeplake/wasm package
16
+ try {
17
+ const wasmPackagePath = require.resolve('@deeplake/wasm');
18
+ modulePath = wasmPackagePath;
19
+ } catch (err) {
20
+ throw new Error(
21
+ '@deeplake/wasm package not found. Please ensure it is installed, or provide a modulePath.'
22
+ );
23
+ }
24
+ }
25
+ return originalInitializeWasm(modulePath);
26
+ };
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "deeplake",
3
+ "version": "0.1.0",
4
+ "description": "Node.js client for DeepLake - unified package",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
+ "engines": {
8
+ "node": ">=18.0.0"
9
+ },
10
+ "dependencies": {
11
+ "@deeplake/wasm": "^0.1.0",
12
+ "@deeplake/managed": "^0.1.0"
13
+ },
14
+ "keywords": [
15
+ "deeplake",
16
+ "database",
17
+ "vector-database",
18
+ "machine-learning",
19
+ "data-lakehouse"
20
+ ],
21
+ "license": "Apache-2.0",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/activeloopai/deeplake"
25
+ }
26
+ }