nanodb-orm 0.0.3 → 0.0.5
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 +506 -333
- package/dist/cli.d.ts +96 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +348 -0
- package/dist/cli.js.map +1 -0
- package/dist/constants/index.d.ts +7 -54
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +9 -61
- package/dist/constants/index.js.map +1 -1
- package/dist/core/config.d.ts +3 -13
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +5 -27
- package/dist/core/config.js.map +1 -1
- package/dist/core/connection.d.ts +16 -31
- package/dist/core/connection.d.ts.map +1 -1
- package/dist/core/connection.js +42 -78
- package/dist/core/connection.js.map +1 -1
- package/dist/core/index.d.ts +2 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +3 -18
- package/dist/core/index.js.map +1 -1
- package/dist/index.d.ts +235 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +252 -35
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +127 -18
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +280 -47
- package/dist/init.js.map +1 -1
- package/dist/jest.setup.d.ts +4 -0
- package/dist/jest.setup.d.ts.map +1 -0
- package/dist/jest.setup.js +40 -0
- package/dist/jest.setup.js.map +1 -0
- package/dist/types/errors.d.ts +30 -12
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +98 -23
- package/dist/types/errors.js.map +1 -1
- package/dist/types/index.d.ts +268 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +5 -4
- package/dist/types/index.js.map +1 -1
- package/dist/utils/error-handler.d.ts +6 -31
- package/dist/utils/error-handler.d.ts.map +1 -1
- package/dist/utils/error-handler.js +24 -81
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/index.d.ts +1 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +4 -6
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/logger.d.ts +6 -25
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +20 -38
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/migrations.d.ts +16 -90
- package/dist/utils/migrations.d.ts.map +1 -1
- package/dist/utils/migrations.js +220 -422
- package/dist/utils/migrations.js.map +1 -1
- package/dist/utils/schema-introspection.d.ts +30 -169
- package/dist/utils/schema-introspection.d.ts.map +1 -1
- package/dist/utils/schema-introspection.js +125 -462
- package/dist/utils/schema-introspection.js.map +1 -1
- package/dist/utils/seeds.d.ts +15 -48
- package/dist/utils/seeds.d.ts.map +1 -1
- package/dist/utils/seeds.js +108 -186
- package/dist/utils/seeds.js.map +1 -1
- package/dist/utils/sync.d.ts +16 -41
- package/dist/utils/sync.d.ts.map +1 -1
- package/dist/utils/sync.js +78 -172
- package/dist/utils/sync.js.map +1 -1
- package/dist/utils/transactions.d.ts +61 -44
- package/dist/utils/transactions.d.ts.map +1 -1
- package/dist/utils/transactions.js +103 -137
- package/dist/utils/transactions.js.map +1 -1
- package/package.json +29 -10
- package/dist/example.d.ts +0 -67
- package/dist/example.d.ts.map +0 -1
- package/dist/example.js +0 -86
- package/dist/example.js.map +0 -1
- package/dist/types/database.d.ts +0 -74
- package/dist/types/database.d.ts.map +0 -1
- package/dist/types/database.js +0 -6
- package/dist/types/database.js.map +0 -1
- package/dist/types/types.d.ts +0 -30
- package/dist/types/types.d.ts.map +0 -1
- package/dist/types/types.js +0 -6
- package/dist/types/types.js.map +0 -1
- package/llm.txt +0 -336
package/dist/core/config.js
CHANGED
|
@@ -1,40 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getDatabaseConfig = getDatabaseConfig;
|
|
4
|
-
exports.validateDatabaseConfig = validateDatabaseConfig;
|
|
5
4
|
const dotenv_1 = require("dotenv");
|
|
6
|
-
const errors_1 = require("../types/errors");
|
|
7
|
-
// Load environment variables
|
|
8
5
|
(0, dotenv_1.config)({ path: '.env' });
|
|
9
6
|
/**
|
|
10
|
-
* Get database configuration from environment variables
|
|
7
|
+
* Get Turso database configuration from environment variables.
|
|
8
|
+
* Throws if required variables are missing.
|
|
11
9
|
*/
|
|
12
10
|
function getDatabaseConfig() {
|
|
13
11
|
const connectionUrl = process.env.TURSO_CONNECTION_URL;
|
|
14
12
|
const authToken = process.env.TURSO_AUTH_TOKEN;
|
|
15
|
-
if (!connectionUrl) {
|
|
16
|
-
throw new
|
|
17
|
-
}
|
|
18
|
-
if (!authToken) {
|
|
19
|
-
throw new errors_1.DatabaseError('TURSO_AUTH_TOKEN environment variable is required', 'config');
|
|
20
|
-
}
|
|
21
|
-
return {
|
|
22
|
-
connectionUrl,
|
|
23
|
-
authToken,
|
|
24
|
-
syncInterval: 60, // Default sync interval in seconds
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Validate database configuration
|
|
29
|
-
*/
|
|
30
|
-
function validateDatabaseConfig() {
|
|
31
|
-
try {
|
|
32
|
-
getDatabaseConfig();
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
console.error('Database configuration validation failed:', error);
|
|
37
|
-
return false;
|
|
13
|
+
if (!connectionUrl || !authToken) {
|
|
14
|
+
throw new Error('Missing TURSO_CONNECTION_URL or TURSO_AUTH_TOKEN');
|
|
38
15
|
}
|
|
16
|
+
return { connectionUrl, authToken };
|
|
39
17
|
}
|
|
40
18
|
//# sourceMappingURL=config.js.map
|
package/dist/core/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../core/config.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../core/config.ts"],"names":[],"mappings":";;AASA,8CASC;AAlBD,mCAAgC;AAGhC,IAAA,eAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AAEzB;;;GAGG;AACH,SAAgB,iBAAiB;IAC/B,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;IACvD,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAE/C,IAAI,CAAC,aAAa,IAAI,CAAC,SAAS,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -1,41 +1,26 @@
|
|
|
1
1
|
import { drizzle } from 'drizzle-orm/libsql';
|
|
2
|
+
type DrizzleInstance = ReturnType<typeof drizzle>;
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* Thread-safe singleton database connection manager.
|
|
5
|
+
* Supports both Turso (remote) and local SQLite databases.
|
|
6
|
+
*
|
|
7
|
+
* Environment variables:
|
|
8
|
+
* - `TURSO_CONNECTION_URL` + `TURSO_AUTH_TOKEN`: Use Turso remote database
|
|
9
|
+
* - `FORCE_LOCAL_DB=true`: Force local SQLite mode
|
|
10
|
+
* - `DATABASE_PATH`: Custom path for local database (default: database.db)
|
|
11
|
+
* - `NODE_ENV=test`: Use isolated test database
|
|
5
12
|
*/
|
|
6
13
|
export declare class DatabaseConnection {
|
|
7
14
|
private static instance;
|
|
8
|
-
private static
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
static getInstance(): Promise<ReturnType<typeof drizzle>>;
|
|
14
|
-
/**
|
|
15
|
-
* Synchronous getter for backward compatibility (deprecated)
|
|
16
|
-
* @deprecated Use getInstance() instead for thread safety
|
|
17
|
-
*/
|
|
18
|
-
static getInstanceSync(): import("drizzle-orm/libsql").LibSQLDatabase<Record<string, unknown>> & {
|
|
19
|
-
$client: import("@libsql/client").Client;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Create a new database connection asynchronously
|
|
23
|
-
*/
|
|
24
|
-
private static createConnectionAsync;
|
|
25
|
-
/**
|
|
26
|
-
* Create a new database connection
|
|
27
|
-
*/
|
|
15
|
+
private static pending;
|
|
16
|
+
/** Get the database connection instance (creates if needed) */
|
|
17
|
+
static getInstance(): Promise<DrizzleInstance>;
|
|
18
|
+
/** Create a new database connection */
|
|
28
19
|
private static createConnection;
|
|
29
|
-
/**
|
|
30
|
-
* Reset the connection instance (useful for testing)
|
|
31
|
-
*/
|
|
20
|
+
/** Reset the connection (for testing) */
|
|
32
21
|
static reset(): void;
|
|
33
|
-
/**
|
|
34
|
-
* Check if connection is established
|
|
35
|
-
*/
|
|
22
|
+
/** Check if a connection exists */
|
|
36
23
|
static isConnected(): boolean;
|
|
37
24
|
}
|
|
38
|
-
export
|
|
39
|
-
$client: import("@libsql/client").Client;
|
|
40
|
-
};
|
|
25
|
+
export {};
|
|
41
26
|
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../core/connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../core/connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI7C,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAElD;;;;;;;;;GASG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAgC;IACvD,OAAO,CAAC,MAAM,CAAC,OAAO,CAAyC;IAE/D,+DAA+D;WAClD,WAAW,IAAI,OAAO,CAAC,eAAe,CAAC;IAcpD,uCAAuC;mBAClB,gBAAgB;IA4BrC,yCAAyC;IACzC,MAAM,CAAC,KAAK,IAAI,IAAI;IAKpB,mCAAmC;IACnC,MAAM,CAAC,WAAW,IAAI,OAAO;CAG9B"}
|
package/dist/core/connection.js
CHANGED
|
@@ -1,109 +1,73 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DatabaseConnection = void 0;
|
|
4
4
|
const libsql_1 = require("drizzle-orm/libsql");
|
|
5
5
|
const client_1 = require("@libsql/client");
|
|
6
6
|
const config_1 = require("./config");
|
|
7
|
-
const errors_1 = require("../types/errors");
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Thread-safe singleton database connection manager.
|
|
9
|
+
* Supports both Turso (remote) and local SQLite databases.
|
|
10
|
+
*
|
|
11
|
+
* Environment variables:
|
|
12
|
+
* - `TURSO_CONNECTION_URL` + `TURSO_AUTH_TOKEN`: Use Turso remote database
|
|
13
|
+
* - `FORCE_LOCAL_DB=true`: Force local SQLite mode
|
|
14
|
+
* - `DATABASE_PATH`: Custom path for local database (default: database.db)
|
|
15
|
+
* - `NODE_ENV=test`: Use isolated test database
|
|
11
16
|
*/
|
|
12
17
|
class DatabaseConnection {
|
|
13
|
-
/**
|
|
14
|
-
* Get or create the database connection instance (thread-safe)
|
|
15
|
-
*/
|
|
18
|
+
/** Get the database connection instance (creates if needed) */
|
|
16
19
|
static async getInstance() {
|
|
17
|
-
if (this.instance)
|
|
20
|
+
if (this.instance)
|
|
18
21
|
return this.instance;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
this.isCreating = true;
|
|
24
|
-
this.creationPromise = this.createConnectionAsync();
|
|
22
|
+
if (this.pending)
|
|
23
|
+
return this.pending;
|
|
24
|
+
this.pending = this.createConnection();
|
|
25
25
|
try {
|
|
26
|
-
this.instance = await this.
|
|
26
|
+
this.instance = await this.pending;
|
|
27
27
|
return this.instance;
|
|
28
28
|
}
|
|
29
29
|
finally {
|
|
30
|
-
this.
|
|
31
|
-
this.creationPromise = null;
|
|
30
|
+
this.pending = null;
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
/** Create a new database connection */
|
|
34
|
+
static async createConnection() {
|
|
35
|
+
// Test environment: use isolated local database
|
|
36
|
+
if (process.env.NODE_ENV === 'test') {
|
|
37
|
+
const dbName = process.env.JEST_WORKER_ID
|
|
38
|
+
? `test-${process.env.JEST_WORKER_ID}.db`
|
|
39
|
+
: (process.env.DATABASE_PATH ?? 'test.db');
|
|
40
|
+
return (0, libsql_1.drizzle)((0, client_1.createClient)({ url: `file:${dbName}` }));
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return this.createConnection();
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Create a new database connection
|
|
52
|
-
*/
|
|
53
|
-
static createConnection() {
|
|
42
|
+
// Force local mode: use DATABASE_PATH or default
|
|
43
|
+
if (process.env.FORCE_LOCAL_DB === 'true') {
|
|
44
|
+
const dbPath = process.env.DATABASE_PATH ?? 'database.db';
|
|
45
|
+
return (0, libsql_1.drizzle)((0, client_1.createClient)({ url: `file:${dbPath}` }));
|
|
46
|
+
}
|
|
47
|
+
// Production: try Turso first, fallback to local SQLite
|
|
54
48
|
try {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const client = (0, client_1.createClient)({
|
|
61
|
-
url: `file:${testDbName}`,
|
|
62
|
-
});
|
|
63
|
-
return (0, libsql_1.drizzle)(client);
|
|
64
|
-
}
|
|
65
|
-
// Try to get Turso config first, fallback to local SQLite if not available
|
|
66
|
-
try {
|
|
67
|
-
const config = (0, config_1.getDatabaseConfig)();
|
|
68
|
-
const client = (0, client_1.createClient)({
|
|
69
|
-
url: config.connectionUrl,
|
|
70
|
-
authToken: config.authToken,
|
|
71
|
-
});
|
|
72
|
-
console.log('Connected to Turso database');
|
|
73
|
-
return (0, libsql_1.drizzle)(client);
|
|
74
|
-
}
|
|
75
|
-
catch (configError) {
|
|
76
|
-
// Fallback to local SQLite database
|
|
77
|
-
console.log('Turso config not found, using local SQLite database');
|
|
78
|
-
const client = (0, client_1.createClient)({
|
|
79
|
-
url: 'file:database.db',
|
|
80
|
-
});
|
|
81
|
-
return (0, libsql_1.drizzle)(client);
|
|
82
|
-
}
|
|
49
|
+
const config = (0, config_1.getDatabaseConfig)();
|
|
50
|
+
return (0, libsql_1.drizzle)((0, client_1.createClient)({
|
|
51
|
+
url: config.connectionUrl,
|
|
52
|
+
authToken: config.authToken,
|
|
53
|
+
}));
|
|
83
54
|
}
|
|
84
|
-
catch
|
|
85
|
-
|
|
55
|
+
catch {
|
|
56
|
+
const dbPath = process.env.DATABASE_PATH ?? 'database.db';
|
|
57
|
+
return (0, libsql_1.drizzle)((0, client_1.createClient)({ url: `file:${dbPath}` }));
|
|
86
58
|
}
|
|
87
59
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Reset the connection instance (useful for testing)
|
|
90
|
-
*/
|
|
60
|
+
/** Reset the connection (for testing) */
|
|
91
61
|
static reset() {
|
|
92
62
|
this.instance = null;
|
|
93
|
-
this.
|
|
94
|
-
this.creationPromise = null;
|
|
63
|
+
this.pending = null;
|
|
95
64
|
}
|
|
96
|
-
/**
|
|
97
|
-
* Check if connection is established
|
|
98
|
-
*/
|
|
65
|
+
/** Check if a connection exists */
|
|
99
66
|
static isConnected() {
|
|
100
67
|
return this.instance !== null;
|
|
101
68
|
}
|
|
102
69
|
}
|
|
103
70
|
exports.DatabaseConnection = DatabaseConnection;
|
|
104
71
|
DatabaseConnection.instance = null;
|
|
105
|
-
DatabaseConnection.
|
|
106
|
-
DatabaseConnection.creationPromise = null;
|
|
107
|
-
// Export the database instance for convenience (deprecated - use getInstance() instead)
|
|
108
|
-
exports.db = DatabaseConnection.getInstanceSync();
|
|
72
|
+
DatabaseConnection.pending = null;
|
|
109
73
|
//# sourceMappingURL=connection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../core/connection.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAC7C,2CAA8C;AAC9C,qCAA6C;
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../core/connection.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAC7C,2CAA8C;AAC9C,qCAA6C;AAI7C;;;;;;;;;GASG;AACH,MAAa,kBAAkB;IAI7B,+DAA+D;IAC/D,MAAM,CAAC,KAAK,CAAC,WAAW;QACtB,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC,QAAQ,CAAC;QACxC,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC;QAEtC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAEvC,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;YACnC,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACtB,CAAC;IACH,CAAC;IAED,uCAAuC;IAC/B,MAAM,CAAC,KAAK,CAAC,gBAAgB;QACnC,gDAAgD;QAChD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;YACpC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc;gBACvC,CAAC,CAAC,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK;gBACzC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,SAAS,CAAC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@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Core database functionality
|
|
3
|
-
* Essential database components: connection, schema, and configuration
|
|
4
3
|
*/
|
|
5
|
-
export {
|
|
6
|
-
export
|
|
4
|
+
export { DatabaseConnection } from './connection';
|
|
5
|
+
export { getDatabaseConfig } from './config';
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../core/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -1,26 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* Core database functionality
|
|
4
|
-
* Essential database components: connection, schema, and configuration
|
|
5
4
|
*/
|
|
6
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
-
if (k2 === undefined) k2 = k;
|
|
8
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
-
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
6
|
+
exports.getDatabaseConfig = exports.DatabaseConnection = void 0;
|
|
22
7
|
var connection_1 = require("./connection");
|
|
23
|
-
Object.defineProperty(exports, "db", { enumerable: true, get: function () { return connection_1.db; } });
|
|
24
8
|
Object.defineProperty(exports, "DatabaseConnection", { enumerable: true, get: function () { return connection_1.DatabaseConnection; } });
|
|
25
|
-
|
|
9
|
+
var config_1 = require("./config");
|
|
10
|
+
Object.defineProperty(exports, "getDatabaseConfig", { enumerable: true, get: function () { return config_1.getDatabaseConfig; } });
|
|
26
11
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../core/index.ts"],"names":[],"mappings":";AAAA;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../core/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2CAAkD;AAAzC,gHAAA,kBAAkB,OAAA;AAC3B,mCAA6C;AAApC,2GAAA,iBAAiB,OAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,237 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
* nanodb-orm - A lightweight ORM wrapper for Drizzle + SQLite/Turso
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* // Default import (recommended)
|
|
7
|
+
* import nanodb from 'nanodb-orm';
|
|
8
|
+
*
|
|
9
|
+
* const users = nanodb.schema.table('users', {
|
|
10
|
+
* id: nanodb.schema.integer('id').primaryKey({ autoIncrement: true }),
|
|
11
|
+
* name: nanodb.schema.text('name').notNull(),
|
|
12
|
+
* });
|
|
13
|
+
*
|
|
14
|
+
* const db = await nanodb.createDatabase({ tables: { users } });
|
|
15
|
+
* const adults = await db.select().from(users).where(nanodb.query.gte(users.age, 18));
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* // Named imports
|
|
21
|
+
* import { createDatabase, schema, query } from 'nanodb-orm';
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
import { sqliteTable, integer as drizzleInteger, text as drizzleText, real as drizzleReal, blob as drizzleBlob } from 'drizzle-orm/sqlite-core';
|
|
25
|
+
import { like as drizzleLike, ilike as drizzleIlike, notLike as drizzleNotLike, and as drizzleAnd, or as drizzleOr, not as drizzleNot, between as drizzleBetween, inArray as drizzleInArray, notInArray as drizzleNotInArray, isNull as drizzleIsNull, isNotNull as drizzleIsNotNull, desc as drizzleDesc, asc as drizzleAsc, count as drizzleCount, sum as drizzleSum, avg as drizzleAvg, min as drizzleMin, max as drizzleMax, sql as drizzleSql } from 'drizzle-orm';
|
|
26
|
+
/**
|
|
27
|
+
* Schema building utilities.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* import { schema } from 'nanodb-orm';
|
|
32
|
+
*
|
|
33
|
+
* const users = schema.table('users', {
|
|
34
|
+
* id: schema.integer('id').primaryKey({ autoIncrement: true }),
|
|
35
|
+
* name: schema.text('name').notNull(),
|
|
36
|
+
* email: schema.text('email').unique(),
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare const schema: {
|
|
41
|
+
table: import("drizzle-orm/sqlite-core").SQLiteTableFn<undefined>;
|
|
42
|
+
integer: typeof drizzleInteger;
|
|
43
|
+
text: typeof drizzleText;
|
|
44
|
+
real: typeof drizzleReal;
|
|
45
|
+
blob: typeof drizzleBlob;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Query operators for WHERE clauses and expressions.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import { query } from 'nanodb-orm';
|
|
53
|
+
*
|
|
54
|
+
* await db.select().from(users).where(
|
|
55
|
+
* query.and(
|
|
56
|
+
* query.gte(users.age, 18),
|
|
57
|
+
* query.like(users.name, 'A%')
|
|
58
|
+
* )
|
|
59
|
+
* );
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare const query: {
|
|
63
|
+
eq: import("drizzle-orm").BinaryOperator;
|
|
64
|
+
ne: import("drizzle-orm").BinaryOperator;
|
|
65
|
+
gt: import("drizzle-orm").BinaryOperator;
|
|
66
|
+
gte: import("drizzle-orm").BinaryOperator;
|
|
67
|
+
lt: import("drizzle-orm").BinaryOperator;
|
|
68
|
+
lte: import("drizzle-orm").BinaryOperator;
|
|
69
|
+
like: typeof drizzleLike;
|
|
70
|
+
ilike: typeof drizzleIlike;
|
|
71
|
+
notLike: typeof drizzleNotLike;
|
|
72
|
+
and: typeof drizzleAnd;
|
|
73
|
+
or: typeof drizzleOr;
|
|
74
|
+
not: typeof drizzleNot;
|
|
75
|
+
between: typeof drizzleBetween;
|
|
76
|
+
inArray: typeof drizzleInArray;
|
|
77
|
+
notInArray: typeof drizzleNotInArray;
|
|
78
|
+
isNull: typeof drizzleIsNull;
|
|
79
|
+
isNotNull: typeof drizzleIsNotNull;
|
|
80
|
+
desc: typeof drizzleDesc;
|
|
81
|
+
asc: typeof drizzleAsc;
|
|
82
|
+
count: typeof drizzleCount;
|
|
83
|
+
sum: typeof drizzleSum;
|
|
84
|
+
avg: typeof drizzleAvg;
|
|
85
|
+
min: typeof drizzleMin;
|
|
86
|
+
max: typeof drizzleMax;
|
|
87
|
+
sql: typeof drizzleSql;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Error classes and utilities.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* import { errors } from 'nanodb-orm';
|
|
95
|
+
*
|
|
96
|
+
* try {
|
|
97
|
+
* await db.insert(users).values({ ... });
|
|
98
|
+
* } catch (e) {
|
|
99
|
+
* if (e instanceof errors.DatabaseError) {
|
|
100
|
+
* console.log(e.message, e.table);
|
|
101
|
+
* }
|
|
102
|
+
* const parsed = errors.parse(e, { table: 'users' });
|
|
103
|
+
* }
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
import { DatabaseError, SchemaError, ConnectionError, MigrationError, SeedError, parseDbError } from './types/errors';
|
|
107
|
+
export declare const errors: {
|
|
108
|
+
DatabaseError: typeof DatabaseError;
|
|
109
|
+
SchemaError: typeof SchemaError;
|
|
110
|
+
ConnectionError: typeof ConnectionError;
|
|
111
|
+
MigrationError: typeof MigrationError;
|
|
112
|
+
SeedError: typeof SeedError;
|
|
113
|
+
parse: typeof parseDbError;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* CLI functions for programmatic access.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* import { cli } from 'nanodb-orm';
|
|
121
|
+
*
|
|
122
|
+
* await cli.setup();
|
|
123
|
+
* const status = await cli.status(true);
|
|
124
|
+
* await cli.studio({ port: 3000 });
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
import { launchStudio, runSetup, runReset, getStatus, runValidate } from './cli';
|
|
128
|
+
export declare const cli: {
|
|
129
|
+
studio: typeof launchStudio;
|
|
130
|
+
setup: typeof runSetup;
|
|
131
|
+
reset: typeof runReset;
|
|
132
|
+
status: typeof getStatus;
|
|
133
|
+
validate: typeof runValidate;
|
|
134
|
+
};
|
|
135
|
+
export { createDatabase, initializeDatabase } from './init';
|
|
136
|
+
export type { CreateDatabaseConfig, NanoDatabase, Hooks, SchemaUtils, MigrationUtils, PluginUtils, } from './init';
|
|
137
|
+
export type { Table, AnyTable, Schema, SelectModel, InsertModel, SchemaModels, SchemaInsertModels, DrizzleDB, NanoPlugin, HookFn, ErrorHookFn, LifecycleHookFn, ColumnMetadata, ForeignKeyReference, SchemaData, MigrationConfig, DatabaseConfig, DatabaseInfo, HealthCheck, SyncResult, SchemaValidation, ForeignKey, TableMetadata, QueryResult, DatabaseClient, DrizzleTable, DrizzleColumn, } from './types';
|
|
138
|
+
export type { StudioOptions, StatusResult, ValidationResult, } from './cli';
|
|
139
|
+
export type { InferSelectModel, InferInsertModel, } from 'drizzle-orm';
|
|
140
|
+
export { DatabaseError, SchemaError, ConnectionError, MigrationError, SeedError, parseDbError, } from './types/errors';
|
|
141
|
+
export { DatabaseConnection } from './core/connection';
|
|
142
|
+
export { getDatabaseConfig } from './core/config';
|
|
143
|
+
export { DatabaseSync } from './utils/sync';
|
|
144
|
+
export { DatabaseMigrations } from './utils/migrations';
|
|
145
|
+
export { DatabaseSeeds } from './utils/seeds';
|
|
146
|
+
export { SchemaIntrospection } from './utils/schema-introspection';
|
|
147
|
+
export { transaction, batch, recreateTable } from './utils/transactions';
|
|
148
|
+
export { launchStudio, runSetup, runReset, getStatus, runValidate, } from './cli';
|
|
149
|
+
export declare const table: import("drizzle-orm/sqlite-core").SQLiteTableFn<undefined>;
|
|
150
|
+
export { sqliteTable };
|
|
151
|
+
export declare const integer: typeof drizzleInteger;
|
|
152
|
+
export declare const text: typeof drizzleText;
|
|
153
|
+
export declare const real: typeof drizzleReal;
|
|
154
|
+
export declare const blob: typeof drizzleBlob;
|
|
155
|
+
export declare const column: {
|
|
156
|
+
table: import("drizzle-orm/sqlite-core").SQLiteTableFn<undefined>;
|
|
157
|
+
integer: typeof drizzleInteger;
|
|
158
|
+
text: typeof drizzleText;
|
|
159
|
+
real: typeof drizzleReal;
|
|
160
|
+
blob: typeof drizzleBlob;
|
|
161
|
+
};
|
|
162
|
+
export { eq, ne, gt, gte, lt, lte, like, ilike, notLike, and, or, not, between, inArray, notInArray, isNull, isNotNull, desc, asc, count, sum, avg, min, max, sql, } from 'drizzle-orm';
|
|
163
|
+
import { createDatabase, initializeDatabase } from './init';
|
|
164
|
+
import { transaction, batch } from './utils/transactions';
|
|
165
|
+
/**
|
|
166
|
+
* Default export with all nanodb-orm functionality.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```ts
|
|
170
|
+
* import nanodb from 'nanodb-orm';
|
|
171
|
+
*
|
|
172
|
+
* const users = nanodb.schema.table('users', {
|
|
173
|
+
* id: nanodb.schema.integer('id').primaryKey({ autoIncrement: true }),
|
|
174
|
+
* name: nanodb.schema.text('name').notNull(),
|
|
175
|
+
* });
|
|
176
|
+
*
|
|
177
|
+
* const db = await nanodb.createDatabase({ tables: { users } });
|
|
178
|
+
* await db.select().from(users).where(nanodb.query.eq(users.id, 1));
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
declare const nanodb: {
|
|
182
|
+
createDatabase: typeof createDatabase;
|
|
183
|
+
initializeDatabase: typeof initializeDatabase;
|
|
184
|
+
transaction: typeof transaction;
|
|
185
|
+
batch: typeof batch;
|
|
186
|
+
schema: {
|
|
187
|
+
table: import("drizzle-orm/sqlite-core").SQLiteTableFn<undefined>;
|
|
188
|
+
integer: typeof drizzleInteger;
|
|
189
|
+
text: typeof drizzleText;
|
|
190
|
+
real: typeof drizzleReal;
|
|
191
|
+
blob: typeof drizzleBlob;
|
|
192
|
+
};
|
|
193
|
+
query: {
|
|
194
|
+
eq: import("drizzle-orm").BinaryOperator;
|
|
195
|
+
ne: import("drizzle-orm").BinaryOperator;
|
|
196
|
+
gt: import("drizzle-orm").BinaryOperator;
|
|
197
|
+
gte: import("drizzle-orm").BinaryOperator;
|
|
198
|
+
lt: import("drizzle-orm").BinaryOperator;
|
|
199
|
+
lte: import("drizzle-orm").BinaryOperator;
|
|
200
|
+
like: typeof drizzleLike;
|
|
201
|
+
ilike: typeof drizzleIlike;
|
|
202
|
+
notLike: typeof drizzleNotLike;
|
|
203
|
+
and: typeof drizzleAnd;
|
|
204
|
+
or: typeof drizzleOr;
|
|
205
|
+
not: typeof drizzleNot;
|
|
206
|
+
between: typeof drizzleBetween;
|
|
207
|
+
inArray: typeof drizzleInArray;
|
|
208
|
+
notInArray: typeof drizzleNotInArray;
|
|
209
|
+
isNull: typeof drizzleIsNull;
|
|
210
|
+
isNotNull: typeof drizzleIsNotNull;
|
|
211
|
+
desc: typeof drizzleDesc;
|
|
212
|
+
asc: typeof drizzleAsc;
|
|
213
|
+
count: typeof drizzleCount;
|
|
214
|
+
sum: typeof drizzleSum;
|
|
215
|
+
avg: typeof drizzleAvg;
|
|
216
|
+
min: typeof drizzleMin;
|
|
217
|
+
max: typeof drizzleMax;
|
|
218
|
+
sql: typeof drizzleSql;
|
|
219
|
+
};
|
|
220
|
+
errors: {
|
|
221
|
+
DatabaseError: typeof DatabaseError;
|
|
222
|
+
SchemaError: typeof SchemaError;
|
|
223
|
+
ConnectionError: typeof ConnectionError;
|
|
224
|
+
MigrationError: typeof MigrationError;
|
|
225
|
+
SeedError: typeof SeedError;
|
|
226
|
+
parse: typeof parseDbError;
|
|
227
|
+
};
|
|
228
|
+
cli: {
|
|
229
|
+
studio: typeof launchStudio;
|
|
230
|
+
setup: typeof runSetup;
|
|
231
|
+
reset: typeof runReset;
|
|
232
|
+
status: typeof getStatus;
|
|
233
|
+
validate: typeof runValidate;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
export default nanodb;
|
|
14
237
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACL,WAAW,EACX,OAAO,IAAI,cAAc,EACzB,IAAI,IAAI,WAAW,EACnB,IAAI,IAAI,WAAW,EACnB,IA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