@deessejs/cli 0.6.45 → 0.6.46
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/dist/commands/db/generate.d.ts +6 -0
- package/dist/commands/db/generate.d.ts.map +1 -0
- package/dist/commands/db/generate.js +10 -0
- package/dist/commands/db/generate.js.map +1 -0
- package/dist/commands/db/index.d.ts +5 -1
- package/dist/commands/db/index.d.ts.map +1 -1
- package/dist/commands/db/index.js +5 -4
- package/dist/commands/db/index.js.map +1 -1
- package/dist/commands/db/migrate.d.ts +6 -0
- package/dist/commands/db/migrate.d.ts.map +1 -0
- package/dist/commands/db/migrate.js +10 -0
- package/dist/commands/db/migrate.js.map +1 -0
- package/dist/commands/db/push.d.ts +10 -0
- package/dist/commands/db/push.d.ts.map +1 -0
- package/dist/commands/db/push.js +22 -0
- package/dist/commands/db/push.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const generateCommand: import("@drizzle-team/brocli").Command<{
|
|
2
|
+
[x: string]: import("@drizzle-team/brocli").OutputType;
|
|
3
|
+
} | undefined, {
|
|
4
|
+
[x: string]: import("@drizzle-team/brocli").OutputType;
|
|
5
|
+
} | undefined>;
|
|
6
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/commands/db/generate.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;cAM1B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { command } from '@drizzle-team/brocli';
|
|
2
|
+
import { execSync } from 'child_process';
|
|
3
|
+
export const generateCommand = command({
|
|
4
|
+
name: 'generate',
|
|
5
|
+
desc: 'Generate migration files from schema changes',
|
|
6
|
+
handler: async () => {
|
|
7
|
+
execSync('drizzle-kit generate', { stdio: 'inherit' });
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/db/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;IACrC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,8CAA8C;IACpD,OAAO,EAAE,KAAK,IAAI,EAAE;QAClB,QAAQ,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACzD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export declare const dbCommand: import("@drizzle-team/brocli").Command<{
|
|
1
|
+
export declare const dbCommand: import("@drizzle-team/brocli").Command<{
|
|
2
|
+
[x: string]: import("@drizzle-team/brocli").OutputType;
|
|
3
|
+
} | undefined, {
|
|
4
|
+
[x: string]: import("@drizzle-team/brocli").OutputType;
|
|
5
|
+
} | undefined>;
|
|
2
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/db/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/db/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;cAIpB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { command } from '@drizzle-team/brocli';
|
|
2
|
+
import { generateCommand } from './generate.js';
|
|
3
|
+
import { migrateCommand } from './migrate.js';
|
|
4
|
+
import { pushCommand } from './push.js';
|
|
2
5
|
export const dbCommand = command({
|
|
3
6
|
name: 'db',
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
console.log('db namespace - coming soon');
|
|
7
|
-
},
|
|
7
|
+
desc: 'Database commands (generate, migrate, push)',
|
|
8
|
+
subcommands: [generateCommand, migrateCommand, pushCommand],
|
|
8
9
|
});
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC;IAC/B,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,6CAA6C;IACnD,WAAW,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,WAAW,CAAC;CAC5D,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const migrateCommand: import("@drizzle-team/brocli").Command<{
|
|
2
|
+
[x: string]: import("@drizzle-team/brocli").OutputType;
|
|
3
|
+
} | undefined, {
|
|
4
|
+
[x: string]: import("@drizzle-team/brocli").OutputType;
|
|
5
|
+
} | undefined>;
|
|
6
|
+
//# sourceMappingURL=migrate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/commands/db/migrate.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;cAMzB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { command } from '@drizzle-team/brocli';
|
|
2
|
+
import { execSync } from 'child_process';
|
|
3
|
+
export const migrateCommand = command({
|
|
4
|
+
name: 'migrate',
|
|
5
|
+
desc: 'Apply migrations to the database',
|
|
6
|
+
handler: async () => {
|
|
7
|
+
execSync('drizzle-kit migrate', { stdio: 'inherit' });
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=migrate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../../src/commands/db/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;IACpC,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,kCAAkC;IACxC,OAAO,EAAE,KAAK,IAAI,EAAE;QAClB,QAAQ,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACxD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const pushCommand: import("@drizzle-team/brocli").Command<{
|
|
2
|
+
strict: boolean | undefined;
|
|
3
|
+
force: boolean | undefined;
|
|
4
|
+
verbose: boolean | undefined;
|
|
5
|
+
}, {
|
|
6
|
+
strict: boolean | undefined;
|
|
7
|
+
force: boolean | undefined;
|
|
8
|
+
verbose: boolean | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=push.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../src/commands/db/push.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW;;;;;;;;EAetB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { command, boolean } from '@drizzle-team/brocli';
|
|
2
|
+
import { execSync } from 'child_process';
|
|
3
|
+
export const pushCommand = command({
|
|
4
|
+
name: 'push',
|
|
5
|
+
desc: 'Push schema changes directly to the database',
|
|
6
|
+
options: {
|
|
7
|
+
strict: boolean(),
|
|
8
|
+
force: boolean(),
|
|
9
|
+
verbose: boolean(),
|
|
10
|
+
},
|
|
11
|
+
handler: async (opts) => {
|
|
12
|
+
const args = ['drizzle-kit', 'push'];
|
|
13
|
+
if (opts?.strict)
|
|
14
|
+
args.push('--strict');
|
|
15
|
+
if (opts?.force)
|
|
16
|
+
args.push('--force');
|
|
17
|
+
if (opts?.verbose)
|
|
18
|
+
args.push('--verbose');
|
|
19
|
+
execSync(args.join(' '), { stdio: 'inherit' });
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=push.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../src/commands/db/push.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;IACjC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,8CAA8C;IACpD,OAAO,EAAE;QACP,MAAM,EAAE,OAAO,EAAE;QACjB,KAAK,EAAE,OAAO,EAAE;QAChB,OAAO,EAAE,OAAO,EAAE;KACnB;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,MAAM,IAAI,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QACrC,IAAI,IAAI,EAAE,MAAM;YAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,IAAI,EAAE,KAAK;YAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,IAAI,IAAI,EAAE,OAAO;YAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC1C,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACjD,CAAC;CACF,CAAC,CAAC"}
|
package/dist/index.js
CHANGED