@venturekit/cli 0.0.0-dev.20260307234057

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/LICENSE ADDED
@@ -0,0 +1,191 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to the Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by the Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding any notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ Copyright 2025 VentureKit Contributors
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ http://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.
package/bin/vk.js ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * VentureKit CLI
5
+ *
6
+ * Usage: vk <command> [options]
7
+ *
8
+ * Commands:
9
+ * vk init Initialize a new VentureKit project
10
+ * vk dev Start development server
11
+ * vk deploy Deploy to AWS
12
+ * vk remove Remove deployed resources
13
+ * vk generate Generate code (routes, handlers)
14
+ * vk migrate Run database migrations
15
+ *
16
+ * Documentation: https://venturekit.dev
17
+ */
18
+
19
+ import('../dist/index.js').then(({ run }) => run());
@@ -0,0 +1,6 @@
1
+ /**
2
+ * vk deploy - Deploy to AWS
3
+ */
4
+ import { Command } from 'commander';
5
+ export declare function deployCommand(program: Command): void;
6
+ //# sourceMappingURL=deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyDpD"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * vk deploy - Deploy to AWS
3
+ */
4
+ import chalk from 'chalk';
5
+ import ora from 'ora';
6
+ import { spawn } from 'child_process';
7
+ export function deployCommand(program) {
8
+ program
9
+ .command('deploy')
10
+ .description('Deploy to AWS')
11
+ .option('-s, --stage <stage>', 'Stage name (dev, stage, prod)', 'dev')
12
+ .action(async (options) => {
13
+ const stage = options.stage || 'dev';
14
+ console.log(chalk.blue(`\n🚀 Deploying to ${stage}...\n`));
15
+ // Warn for production deployments
16
+ if (stage === 'prod' || stage === 'production') {
17
+ console.log(chalk.yellow('⚠️ Production deployment - please verify your changes\n'));
18
+ }
19
+ const spinner = ora('Building...').start();
20
+ // Run SST deploy
21
+ const sst = spawn('npx', ['sst', 'deploy', '--stage', stage], {
22
+ stdio: ['inherit', 'pipe', 'pipe'],
23
+ shell: true,
24
+ });
25
+ let output = '';
26
+ sst.stdout?.on('data', (data) => {
27
+ output += data.toString();
28
+ spinner.text = data.toString().trim().split('\n').pop() || 'Deploying...';
29
+ });
30
+ sst.stderr?.on('data', (data) => {
31
+ output += data.toString();
32
+ });
33
+ sst.on('error', (error) => {
34
+ spinner.fail('Deployment failed');
35
+ console.error(chalk.red(error.message));
36
+ process.exit(1);
37
+ });
38
+ sst.on('close', (code) => {
39
+ if (code === 0) {
40
+ spinner.succeed('Deployed successfully!');
41
+ console.log(chalk.green(`\n✅ Deployed to ${stage}\n`));
42
+ // Extract and display API URL if present
43
+ const urlMatch = output.match(/https:\/\/[^\s]+\.amazonaws\.com[^\s]*/);
44
+ if (urlMatch) {
45
+ console.log(chalk.cyan(`API URL: ${urlMatch[0]}\n`));
46
+ }
47
+ }
48
+ else {
49
+ spinner.fail('Deployment failed');
50
+ console.log(output);
51
+ process.exit(code || 1);
52
+ }
53
+ });
54
+ });
55
+ }
56
+ //# sourceMappingURL=deploy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAMtC,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,eAAe,CAAC;SAC5B,MAAM,CAAC,qBAAqB,EAAE,+BAA+B,EAAE,KAAK,CAAC;SACrE,MAAM,CAAC,KAAK,EAAE,OAAsB,EAAE,EAAE;QACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC;QAErC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB,KAAK,OAAO,CAAC,CAAC,CAAC;QAE3D,kCAAkC;QAClC,IAAI,KAAK,KAAK,MAA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,EAAE,CAAC,IAAI,EAAE,EAAE;YACvB,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;gBACf,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;gBAC1C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,KAAK,IAAI,CAAC,CAAC,CAAC;gBAEvD,yCAAyC;gBACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;gBACxE,IAAI,QAAQ,EAAE,CAAC;oBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;gBACvD,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;gBAClC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACpB,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * vk dev - Start development server
3
+ */
4
+ import { Command } from 'commander';
5
+ export declare function devCommand(program: Command): void;
6
+ //# sourceMappingURL=dev.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuBjD"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * vk dev - Start development server
3
+ */
4
+ import chalk from 'chalk';
5
+ import { spawn } from 'child_process';
6
+ export function devCommand(program) {
7
+ program
8
+ .command('dev')
9
+ .description('Start development server')
10
+ .option('-s, --stage <stage>', 'Stage name', 'dev')
11
+ .action(async (options) => {
12
+ console.log(chalk.blue(`\n🚀 Starting VentureKit dev server (${options.stage})...\n`));
13
+ // Run SST dev
14
+ const sst = spawn('npx', ['sst', 'dev', '--stage', options.stage || 'dev'], {
15
+ stdio: 'inherit',
16
+ shell: true,
17
+ });
18
+ sst.on('error', (error) => {
19
+ console.error(chalk.red('Failed to start dev server:'), error.message);
20
+ process.exit(1);
21
+ });
22
+ sst.on('close', (code) => {
23
+ process.exit(code || 0);
24
+ });
25
+ });
26
+ }
27
+ //# sourceMappingURL=dev.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAMtC,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,OAAO;SACJ,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,0BAA0B,CAAC;SACvC,MAAM,CAAC,qBAAqB,EAAE,YAAY,EAAE,KAAK,CAAC;SAClD,MAAM,CAAC,KAAK,EAAE,OAAmB,EAAE,EAAE;QACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,wCAAwC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC;QAEvF,cAAc;QACd,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,EAAE;YAC1E,KAAK,EAAE,SAAS;YAChB,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;QAEH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACxB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,6BAA6B,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YACvB,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * vk generate - Generate code (routes, handlers)
3
+ */
4
+ import { Command } from 'commander';
5
+ export declare function generateCommand(program: Command): void;
6
+ //# sourceMappingURL=generate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoFtD"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * vk generate - Generate code (routes, handlers)
3
+ */
4
+ import chalk from 'chalk';
5
+ import { existsSync, mkdirSync, writeFileSync } from 'fs';
6
+ import { join, dirname } from 'path';
7
+ export function generateCommand(program) {
8
+ const generate = program
9
+ .command('generate')
10
+ .alias('g')
11
+ .description('Generate code');
12
+ // vk generate route <path>
13
+ generate
14
+ .command('route <path>')
15
+ .description('Generate a new route handler')
16
+ .option('--scopes <scopes>', 'Required scopes (comma-separated)')
17
+ .action(async (routePath, options) => {
18
+ const routesDir = join(process.cwd(), 'src/routes');
19
+ const filePath = join(routesDir, `${routePath}.ts`);
20
+ if (existsSync(filePath)) {
21
+ console.log(chalk.red(`Route already exists: ${routePath}`));
22
+ process.exit(1);
23
+ }
24
+ // Create directory if needed
25
+ const dir = dirname(filePath);
26
+ if (!existsSync(dir)) {
27
+ mkdirSync(dir, { recursive: true });
28
+ }
29
+ // Generate handler code
30
+ const scopes = options.scopes?.split(',').map(s => s.trim()) || [];
31
+ const scopesOption = scopes.length > 0
32
+ ? `, { scopes: [${scopes.map(s => `'${s}'`).join(', ')}] }`
33
+ : '';
34
+ const code = `import { handler } from '@venturekit/runtime';
35
+
36
+ export const main = handler(async (body, ctx, log) => {
37
+ log.info('${routePath} called');
38
+
39
+ return {
40
+ message: 'Hello from ${routePath}',
41
+ };
42
+ }${scopesOption});
43
+ `;
44
+ writeFileSync(filePath, code);
45
+ console.log(chalk.green(`\n✅ Created route: src/routes/${routePath}.ts\n`));
46
+ if (scopes.length > 0) {
47
+ console.log(chalk.gray(` Scopes: ${scopes.join(', ')}\n`));
48
+ }
49
+ });
50
+ // vk generate config <env>
51
+ generate
52
+ .command('config <env>')
53
+ .description('Generate environment config')
54
+ .action(async (env) => {
55
+ const configDir = join(process.cwd(), 'config');
56
+ const filePath = join(configDir, `${env}.ts`);
57
+ if (existsSync(filePath)) {
58
+ console.log(chalk.red(`Config already exists: ${env}`));
59
+ process.exit(1);
60
+ }
61
+ if (!existsSync(configDir)) {
62
+ mkdirSync(configDir, { recursive: true });
63
+ }
64
+ const preset = env === 'prod' || env === 'production' ? 'micro' : 'nano';
65
+ const dataSafety = env === 'prod' || env === 'production' ? "dataSafety: 'strict'," : '';
66
+ const code = `import type { EnvConfigInput } from '@venturekit/core';
67
+
68
+ export const ${env}: EnvConfigInput = {
69
+ preset: '${preset}',
70
+ ${dataSafety}
71
+ };
72
+ `;
73
+ writeFileSync(filePath, code);
74
+ console.log(chalk.green(`\n✅ Created config: config/${env}.ts\n`));
75
+ });
76
+ }
77
+ //# sourceMappingURL=generate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,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5C,CAAC;QAED,MAAM,MAAM,GAAG,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;QACzE,MAAM,UAAU,GAAG,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,YAAY,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC;QAEzF,MAAM,IAAI,GAAG;;eAEJ,GAAG;aACL,MAAM;IACf,UAAU;;CAEb,CAAC;QAEI,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAE9B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,8BAA8B,GAAG,OAAO,CAAC,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * vk init - Initialize a new VentureKit project
3
+ */
4
+ import { Command } from 'commander';
5
+ export declare function initCommand(program: Command): void;
6
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8LlD"}
@@ -0,0 +1,158 @@
1
+ /**
2
+ * vk init - Initialize a new VentureKit project
3
+ */
4
+ import chalk from 'chalk';
5
+ import ora from 'ora';
6
+ import prompts from 'prompts';
7
+ import { existsSync, mkdirSync, writeFileSync } from 'fs';
8
+ import { join } from 'path';
9
+ export function initCommand(program) {
10
+ program
11
+ .command('init [name]')
12
+ .description('Initialize a new VentureKit project')
13
+ .option('-t, --template <template>', 'Project template (minimal, api, fullstack)', 'minimal')
14
+ .option('-y, --yes', 'Skip prompts and use defaults')
15
+ .action(async (name, options) => {
16
+ console.log(chalk.blue('\n🚀 VentureKit Project Setup\n'));
17
+ let projectName = name || options.name;
18
+ let template = options.template || 'minimal';
19
+ // Interactive prompts if not using --yes
20
+ if (!options.yes && !projectName) {
21
+ const response = await prompts([
22
+ {
23
+ type: 'text',
24
+ name: 'name',
25
+ message: 'Project name:',
26
+ initial: 'my-venture-app',
27
+ },
28
+ {
29
+ type: 'select',
30
+ name: 'template',
31
+ message: 'Template:',
32
+ choices: [
33
+ { title: 'Minimal - Basic API setup', value: 'minimal' },
34
+ { title: 'API - REST API with auth', value: 'api' },
35
+ { title: 'Fullstack - API + Database + Storage', value: 'fullstack' },
36
+ ],
37
+ initial: 0,
38
+ },
39
+ ]);
40
+ projectName = response.name;
41
+ template = response.template;
42
+ }
43
+ if (!projectName) {
44
+ console.log(chalk.red('Project name is required'));
45
+ process.exit(1);
46
+ }
47
+ const projectDir = join(process.cwd(), projectName);
48
+ if (existsSync(projectDir)) {
49
+ console.log(chalk.red(`Directory ${projectName} already exists`));
50
+ process.exit(1);
51
+ }
52
+ const spinner = ora('Creating project...').start();
53
+ try {
54
+ // Create project structure
55
+ mkdirSync(projectDir, { recursive: true });
56
+ mkdirSync(join(projectDir, 'src/routes'), { recursive: true });
57
+ mkdirSync(join(projectDir, 'config'), { recursive: true });
58
+ // Create package.json
59
+ writeFileSync(join(projectDir, 'package.json'), JSON.stringify({
60
+ name: projectName,
61
+ version: '0.1.0',
62
+ type: 'module',
63
+ scripts: {
64
+ dev: 'vk dev',
65
+ deploy: 'vk deploy',
66
+ remove: 'vk remove',
67
+ },
68
+ dependencies: {
69
+ '@venturekit/core': '^0.1.0',
70
+ '@venturekit/runtime': '^0.1.0',
71
+ '@venturekit/infra': '^0.1.0',
72
+ },
73
+ devDependencies: {
74
+ '@venturekit/cli': '^0.1.0',
75
+ typescript: '^5.3.0',
76
+ '@types/node': '^20.10.0',
77
+ },
78
+ }, null, 2));
79
+ // Create sst.config.ts
80
+ writeFileSync(join(projectDir, 'sst.config.ts'), `import { defineVenture } from '@venturekit/infra';
81
+ import { base } from './config/base';
82
+ import { security } from './config/security';
83
+ import { dev } from './config/dev';
84
+ import { prod } from './config/prod';
85
+
86
+ export default defineVenture({
87
+ base,
88
+ security,
89
+ envs: { dev, prod },
90
+ routesDir: 'src/routes',
91
+ });
92
+ `);
93
+ // Create config files
94
+ writeFileSync(join(projectDir, 'config/base.ts'), `import type { BaseConfig } from '@venturekit/core';
95
+
96
+ export const base: BaseConfig = {
97
+ projectName: '${projectName}',
98
+ region: 'eu-west-1',
99
+ };
100
+ `);
101
+ writeFileSync(join(projectDir, 'config/security.ts'), `import type { SecurityConfig } from '@venturekit/core';
102
+
103
+ export const security: SecurityConfig = {
104
+ dataSafety: 'standard',
105
+ encryption: { atRest: true, inTransit: true },
106
+ };
107
+ `);
108
+ writeFileSync(join(projectDir, 'config/dev.ts'), `import type { EnvConfigInput } from '@venturekit/core';
109
+
110
+ export const dev: EnvConfigInput = {
111
+ preset: 'nano',
112
+ };
113
+ `);
114
+ writeFileSync(join(projectDir, 'config/prod.ts'), `import type { EnvConfigInput } from '@venturekit/core';
115
+
116
+ export const prod: EnvConfigInput = {
117
+ preset: 'micro',
118
+ dataSafety: 'strict',
119
+ };
120
+ `);
121
+ // Create example route
122
+ writeFileSync(join(projectDir, 'src/routes/health.ts'), `import { handler } from '@venturekit/runtime';
123
+
124
+ export const main = handler(async () => {
125
+ return { status: 'ok', timestamp: new Date().toISOString() };
126
+ });
127
+ `);
128
+ // Create tsconfig.json
129
+ writeFileSync(join(projectDir, 'tsconfig.json'), JSON.stringify({
130
+ compilerOptions: {
131
+ target: 'ES2022',
132
+ module: 'ESNext',
133
+ moduleResolution: 'bundler',
134
+ strict: true,
135
+ esModuleInterop: true,
136
+ skipLibCheck: true,
137
+ outDir: 'dist',
138
+ rootDir: '.',
139
+ },
140
+ include: ['src/**/*', 'config/**/*', 'sst.config.ts'],
141
+ exclude: ['node_modules', 'dist'],
142
+ }, null, 2));
143
+ spinner.succeed('Project created!');
144
+ console.log(chalk.green(`\n✅ Created ${projectName}\n`));
145
+ console.log('Next steps:');
146
+ console.log(chalk.cyan(` cd ${projectName}`));
147
+ console.log(chalk.cyan(' npm install'));
148
+ console.log(chalk.cyan(' vk dev'));
149
+ console.log(chalk.gray('\nDocs: https://venturekit.dev\n'));
150
+ }
151
+ catch (error) {
152
+ spinner.fail('Failed to create project');
153
+ console.error(error);
154
+ process.exit(1);
155
+ }
156
+ });
157
+ }
158
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAQ5B,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,qCAAqC,CAAC;SAClD,MAAM,CAAC,2BAA2B,EAAE,4CAA4C,EAAE,SAAS,CAAC;SAC5F,MAAM,CAAC,WAAW,EAAE,+BAA+B,CAAC;SACpD,MAAM,CAAC,KAAK,EAAE,IAAwB,EAAE,OAAoB,EAAE,EAAE;QAC/D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,CAAC;QAE3D,IAAI,WAAW,GAAG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;QACvC,IAAI,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAC;QAE7C,yCAAyC;QACzC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YACjC,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC;gBAC7B;oB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CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * vk migrate — Run database migrations using Drizzle Kit
3
+ *
4
+ * VentureKit uses Drizzle Kit as its standard migration tool.
5
+ * Type-safe schema, generates plain SQL migrations, zero runtime overhead.
6
+ *
7
+ * Commands:
8
+ * vk migrate generate Generate migrations from schema changes
9
+ * vk migrate up Apply pending migrations
10
+ * vk migrate drop Drop a migration
11
+ * vk migrate status Check migration status
12
+ *
13
+ * Expects a drizzle.config.ts at the project root.
14
+ * If missing, `vk migrate` will scaffold one for you.
15
+ */
16
+ import { Command } from 'commander';
17
+ export declare function migrateCommand(program: Command): void;
18
+ //# sourceMappingURL=migrate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoGpC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgFrD"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * vk migrate — Run database migrations using Drizzle Kit
3
+ *
4
+ * VentureKit uses Drizzle Kit as its standard migration tool.
5
+ * Type-safe schema, generates plain SQL migrations, zero runtime overhead.
6
+ *
7
+ * Commands:
8
+ * vk migrate generate Generate migrations from schema changes
9
+ * vk migrate up Apply pending migrations
10
+ * vk migrate drop Drop a migration
11
+ * vk migrate status Check migration status
12
+ *
13
+ * Expects a drizzle.config.ts at the project root.
14
+ * If missing, `vk migrate` will scaffold one for you.
15
+ */
16
+ import chalk from 'chalk';
17
+ import { spawn } from 'child_process';
18
+ import * as fs from 'fs';
19
+ import * as path from 'path';
20
+ const DEFAULT_CONFIG = 'drizzle.config.ts';
21
+ const DEFAULT_MIGRATIONS_DIR = './migrations';
22
+ /**
23
+ * Resolve the drizzle config path.
24
+ * If no config exists, scaffold one.
25
+ */
26
+ function resolveConfig(configFlag) {
27
+ const configPath = configFlag ?? DEFAULT_CONFIG;
28
+ if (!fs.existsSync(configPath)) {
29
+ console.log(chalk.yellow(`No ${configPath} found. Creating a default config...\n`));
30
+ scaffoldDrizzleConfig(configPath);
31
+ }
32
+ return configPath;
33
+ }
34
+ /**
35
+ * Create a default drizzle.config.ts for the project
36
+ */
37
+ function scaffoldDrizzleConfig(configPath) {
38
+ const content = `import { defineConfig } from 'drizzle-kit';
39
+
40
+ export default defineConfig({
41
+ dialect: 'postgresql',
42
+ schema: './src/db/schema.ts',
43
+ out: '${DEFAULT_MIGRATIONS_DIR}',
44
+ dbCredentials: {
45
+ url: process.env.DATABASE_URL!,
46
+ },
47
+ });
48
+ `;
49
+ fs.writeFileSync(configPath, content, 'utf-8');
50
+ console.log(chalk.green(`Created ${configPath}`));
51
+ // Ensure schema directory exists
52
+ const schemaDir = path.dirname('./src/db/schema.ts');
53
+ if (!fs.existsSync(schemaDir)) {
54
+ fs.mkdirSync(schemaDir, { recursive: true });
55
+ }
56
+ // Scaffold schema file if missing
57
+ const schemaPath = './src/db/schema.ts';
58
+ if (!fs.existsSync(schemaPath)) {
59
+ fs.writeFileSync(schemaPath, `// Define your database schema here.\n// See: https://orm.drizzle.team/docs/sql-schema-declaration\n\n`, 'utf-8');
60
+ console.log(chalk.green(`Created ${schemaPath}`));
61
+ }
62
+ }
63
+ /**
64
+ * Run a drizzle-kit command and stream output
65
+ */
66
+ function drizzle(args, env) {
67
+ return new Promise((resolve) => {
68
+ const child = spawn('npx', ['drizzle-kit', ...args], {
69
+ stdio: 'inherit',
70
+ shell: true,
71
+ env: { ...process.env, ...env },
72
+ });
73
+ child.on('error', (error) => {
74
+ console.error(chalk.red('Failed to run drizzle-kit'), error.message);
75
+ console.error(chalk.dim('Make sure drizzle-kit is installed: npm install -D drizzle-kit'));
76
+ resolve(1);
77
+ });
78
+ child.on('close', (code) => {
79
+ resolve(code ?? 0);
80
+ });
81
+ });
82
+ }
83
+ /**
84
+ * Build env vars for the target environment
85
+ */
86
+ function buildEnv(options) {
87
+ const env = {};
88
+ if (options.env) {
89
+ env.VENTURE_STAGE = options.env;
90
+ }
91
+ return env;
92
+ }
93
+ export function migrateCommand(program) {
94
+ const migrate = program
95
+ .command('migrate')
96
+ .description('Database migrations (powered by Drizzle Kit)');
97
+ migrate
98
+ .command('generate')
99
+ .description('Generate migration files from schema changes')
100
+ .option('-c, --config <path>', 'Drizzle config file path', DEFAULT_CONFIG)
101
+ .option('--name <name>', 'Migration name')
102
+ .action(async (options) => {
103
+ const config = resolveConfig(options.config);
104
+ const args = ['generate', `--config=${config}`];
105
+ if (options.name)
106
+ args.push(`--name=${options.name}`);
107
+ console.log(chalk.blue('\nGenerating migrations from schema...\n'));
108
+ const code = await drizzle(args, buildEnv(options));
109
+ if (code !== 0)
110
+ process.exit(code);
111
+ });
112
+ migrate
113
+ .command('up')
114
+ .description('Apply pending migrations to the database')
115
+ .option('-c, --config <path>', 'Drizzle config file path', DEFAULT_CONFIG)
116
+ .option('-e, --env <env>', 'Target environment', 'dev')
117
+ .action(async (options) => {
118
+ const config = resolveConfig(options.config);
119
+ console.log(chalk.blue(`\nApplying migrations (${options.env ?? 'dev'})...\n`));
120
+ const code = await drizzle(['migrate', `--config=${config}`], buildEnv(options));
121
+ if (code !== 0)
122
+ process.exit(code);
123
+ });
124
+ migrate
125
+ .command('drop')
126
+ .description('Drop a migration file')
127
+ .option('-c, --config <path>', 'Drizzle config file path', DEFAULT_CONFIG)
128
+ .action(async (options) => {
129
+ const config = resolveConfig(options.config);
130
+ const code = await drizzle(['drop', `--config=${config}`], buildEnv(options));
131
+ if (code !== 0)
132
+ process.exit(code);
133
+ });
134
+ migrate
135
+ .command('status')
136
+ .description('Check which migrations have been applied')
137
+ .option('-c, --config <path>', 'Drizzle config file path', DEFAULT_CONFIG)
138
+ .option('-e, --env <env>', 'Target environment', 'dev')
139
+ .action(async (options) => {
140
+ const config = resolveConfig(options.config);
141
+ console.log(chalk.blue(`\nMigration status (${options.env ?? 'dev'}):\n`));
142
+ const code = await drizzle(['check', `--config=${config}`], buildEnv(options));
143
+ if (code !== 0)
144
+ process.exit(code);
145
+ });
146
+ migrate
147
+ .command('push')
148
+ .description('Push schema directly to the database (dev only, no migration files)')
149
+ .option('-c, --config <path>', 'Drizzle config file path', DEFAULT_CONFIG)
150
+ .option('-e, --env <env>', 'Target environment', 'dev')
151
+ .action(async (options) => {
152
+ const config = resolveConfig(options.config);
153
+ console.log(chalk.blue('\nPushing schema to database...\n'));
154
+ const code = await drizzle(['push', `--config=${config}`], buildEnv(options));
155
+ if (code !== 0)
156
+ process.exit(code);
157
+ });
158
+ migrate
159
+ .command('studio')
160
+ .description('Open Drizzle Studio (database GUI)')
161
+ .option('-c, --config <path>', 'Drizzle config file path', DEFAULT_CONFIG)
162
+ .action(async (options) => {
163
+ const config = resolveConfig(options.config);
164
+ console.log(chalk.blue('\nStarting Drizzle Studio...\n'));
165
+ await drizzle(['studio', `--config=${config}`], buildEnv(options));
166
+ });
167
+ }
168
+ //# sourceMappingURL=migrate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAO7B,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,MAAM,sBAAsB,GAAG,cAAc,CAAC;AAE9C;;;GAGG;AACH,SAAS,aAAa,CAAC,UAAmB;IACxC,MAAM,UAAU,GAAG,UAAU,IAAI,cAAc,CAAC;IAEhD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/B,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AAK,EAAE,OAAuB,EAAE,EAAE;QACxC,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAE7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,CAAC;QAC7D,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,CAAC,MAAM,EAAE,YAAY,MAAM,EAAE,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9E,IAAI,IAAI,KAAK,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEL,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,oCAAoC,CAAC;SACjD,MAAM,CAAC,qBAAqB,EAAE,0BAA0B,EAAE,cAAc,CAAC;SACzE,MAAM,CAAC,KAAK,EAAE,OAAuB,EAAE,EAAE;QACxC,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAE7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,CAAC;QAC1D,MAAM,OAAO,CAAC,CAAC,QAAQ,EAAE,YAAY,MAAM,EAAE,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * vk remove - Remove deployed resources
3
+ */
4
+ import { Command } from 'commander';
5
+ export declare function removeCommand(program: Command): void;
6
+ //# sourceMappingURL=remove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../src/commands/remove.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA4CpD"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * vk remove - Remove deployed resources
3
+ */
4
+ import chalk from 'chalk';
5
+ import prompts from 'prompts';
6
+ import { spawn } from 'child_process';
7
+ export function removeCommand(program) {
8
+ program
9
+ .command('remove')
10
+ .description('Remove deployed resources')
11
+ .option('-s, --stage <stage>', 'Stage name', 'dev')
12
+ .option('-y, --yes', 'Skip confirmation')
13
+ .action(async (options) => {
14
+ const stage = options.stage || 'dev';
15
+ // Require confirmation for non-dev stages
16
+ if (!options.yes && stage !== 'dev') {
17
+ const response = await prompts({
18
+ type: 'confirm',
19
+ name: 'confirm',
20
+ message: chalk.yellow(`Are you sure you want to remove ${stage}?`),
21
+ initial: false,
22
+ });
23
+ if (!response.confirm) {
24
+ console.log(chalk.gray('Cancelled'));
25
+ return;
26
+ }
27
+ }
28
+ console.log(chalk.blue(`\n🗑️ Removing ${stage}...\n`));
29
+ // Run SST remove
30
+ const sst = spawn('npx', ['sst', 'remove', '--stage', stage], {
31
+ stdio: 'inherit',
32
+ shell: true,
33
+ });
34
+ sst.on('error', (error) => {
35
+ console.error(chalk.red('Failed to remove:'), error.message);
36
+ process.exit(1);
37
+ });
38
+ sst.on('close', (code) => {
39
+ if (code === 0) {
40
+ console.log(chalk.green(`\n✅ Removed ${stage}\n`));
41
+ }
42
+ process.exit(code || 0);
43
+ });
44
+ });
45
+ }
46
+ //# sourceMappingURL=remove.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove.js","sourceRoot":"","sources":["../../src/commands/remove.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOtC,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,2BAA2B,CAAC;SACxC,MA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C,IAAI,EAAE,EAAE;YACvB,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;gBACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,KAAK,IAAI,CAAC,CAAC,CAAC;YACrD,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @venturekit/cli
3
+ *
4
+ * CLI for VentureKit - scaffolding and deploy orchestration.
5
+ * Documentation: https://venturekit.dev
6
+ */
7
+ import { Command } from 'commander';
8
+ declare const program: Command;
9
+ /**
10
+ * Run the CLI
11
+ */
12
+ export declare function run(): void;
13
+ export { program };
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,QAAA,MAAM,OAAO,SAAgB,CAAC;AAe9B;;GAEG;AACH,wBAAgB,GAAG,IAAI,IAAI,CAE1B;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @venturekit/cli
3
+ *
4
+ * CLI for VentureKit - scaffolding and deploy orchestration.
5
+ * Documentation: https://venturekit.dev
6
+ */
7
+ import { Command } from 'commander';
8
+ import { initCommand } from './commands/init';
9
+ import { devCommand } from './commands/dev';
10
+ import { deployCommand } from './commands/deploy';
11
+ import { removeCommand } from './commands/remove';
12
+ import { generateCommand } from './commands/generate';
13
+ import { migrateCommand } from './commands/migrate';
14
+ const program = new Command();
15
+ program
16
+ .name('vk')
17
+ .description('VentureKit CLI - Build serverless apps faster')
18
+ .version('0.1.0');
19
+ // Register commands
20
+ initCommand(program);
21
+ devCommand(program);
22
+ deployCommand(program);
23
+ removeCommand(program);
24
+ generateCommand(program);
25
+ migrateCommand(program);
26
+ /**
27
+ * Run the CLI
28
+ */
29
+ export function run() {
30
+ program.parse();
31
+ }
32
+ export { program };
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,IAAI,CAAC;KACV,WAAW,CAAC,+CAA+C,CAAC;KAC5D,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,oBAAoB;AACpB,WAAW,CAAC,OAAO,CAAC,CAAC;AACrB,UAAU,CAAC,OAAO,CAAC,CAAC;AACpB,aAAa,CAAC,OAAO,CAAC,CAAC;AACvB,aAAa,CAAC,OAAO,CAAC,CAAC;AACvB,eAAe,CAAC,OAAO,CAAC,CAAC;AACzB,cAAc,CAAC,OAAO,CAAC,CAAC;AAExB;;GAEG;AACH,MAAM,UAAU,GAAG;IACjB,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,CAAC;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@venturekit/cli",
3
+ "version": "0.0.0-dev.20260307234057",
4
+ "description": "CLI for VentureKit - scaffolding and deploy orchestration",
5
+ "type": "module",
6
+ "bin": {
7
+ "vk": "./bin/vk.js"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "files": [
12
+ "dist",
13
+ "bin"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/venturekit-dev/venturekit.private.git",
18
+ "directory": "packages/cli"
19
+ },
20
+ "publishConfig": {
21
+ "registry": "https://registry.npmjs.org",
22
+ "access": "public"
23
+ },
24
+ "license": "Apache-2.0",
25
+ "exports": {
26
+ ".": {
27
+ "import": "./dist/index.js",
28
+ "types": "./dist/index.d.ts"
29
+ }
30
+ },
31
+ "dependencies": {
32
+ "@venturekit/core": "0.0.0-dev.20260307234057",
33
+ "commander": "^12.0.0",
34
+ "chalk": "^5.3.0",
35
+ "ora": "^8.0.0",
36
+ "prompts": "^2.4.2"
37
+ },
38
+ "devDependencies": {
39
+ "@types/node": "^20.10.0",
40
+ "@types/prompts": "^2.4.9",
41
+ "typescript": "^5.3.0"
42
+ },
43
+ "scripts": {
44
+ "build": "tsc",
45
+ "dev": "tsc --watch",
46
+ "clean": "rm -rf dist"
47
+ }
48
+ }