@venturekit/cli 0.0.0-dev.20260701100017 → 0.0.0-dev.20260704225856

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.
Files changed (44) hide show
  1. package/bin/vk.js +18 -18
  2. package/dist/commands/check.d.ts +13 -0
  3. package/dist/commands/check.d.ts.map +1 -0
  4. package/dist/commands/check.js +49 -0
  5. package/dist/commands/check.js.map +1 -0
  6. package/dist/commands/deploy.d.ts.map +1 -1
  7. package/dist/commands/deploy.js +24 -0
  8. package/dist/commands/deploy.js.map +1 -1
  9. package/dist/commands/dev.d.ts.map +1 -1
  10. package/dist/commands/dev.js +4 -0
  11. package/dist/commands/dev.js.map +1 -1
  12. package/dist/commands/help.d.ts.map +1 -1
  13. package/dist/commands/help.js +4 -0
  14. package/dist/commands/help.js.map +1 -1
  15. package/dist/commands/init.d.ts.map +1 -1
  16. package/dist/commands/init.js +2 -37
  17. package/dist/commands/init.js.map +1 -1
  18. package/dist/commands/logs.js +1 -1
  19. package/dist/commands/logs.js.map +1 -1
  20. package/dist/commands/migrate.js +0 -1
  21. package/dist/commands/migrate.js.map +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +2 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/utils/cdk-bridge.d.ts.map +1 -1
  26. package/dist/utils/cdk-bridge.js +211 -200
  27. package/dist/utils/cdk-bridge.js.map +1 -1
  28. package/dist/utils/cognito-local.d.ts +10 -0
  29. package/dist/utils/cognito-local.d.ts.map +1 -1
  30. package/dist/utils/cognito-local.js +26 -1
  31. package/dist/utils/cognito-local.js.map +1 -1
  32. package/dist/utils/local-events.d.ts +97 -0
  33. package/dist/utils/local-events.d.ts.map +1 -0
  34. package/dist/utils/local-events.js +271 -0
  35. package/dist/utils/local-events.js.map +1 -0
  36. package/dist/utils/local-server.d.ts +10 -0
  37. package/dist/utils/local-server.d.ts.map +1 -1
  38. package/dist/utils/local-server.js +20 -0
  39. package/dist/utils/local-server.js.map +1 -1
  40. package/dist/utils/typecheck.d.ts +42 -0
  41. package/dist/utils/typecheck.d.ts.map +1 -0
  42. package/dist/utils/typecheck.js +55 -0
  43. package/dist/utils/typecheck.js.map +1 -0
  44. package/package.json +9 -5
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Shared TypeScript type-check helper.
3
+ *
4
+ * Backs both `vk check` (explicit type-check command) and the
5
+ * pre-deploy gate in `vk deploy`. Runs `tsc --noEmit -p <tsconfig>`
6
+ * against the consumer project so type errors in routes, functions,
7
+ * and `vk.config.ts` surface locally instead of as a half-applied
8
+ * CloudFormation stack.
9
+ *
10
+ * `tsc` is invoked through `npx` (with `shell: true`, matching the
11
+ * `npx cdk` invocation in `deploy.ts`). npx resolves the project's
12
+ * locally-installed `typescript` before fetching, so the check uses
13
+ * the exact compiler version the project pins.
14
+ */
15
+ /**
16
+ * Outcome of a type-check run.
17
+ */
18
+ export interface TypecheckResult {
19
+ /** False when the check was skipped (no tsconfig.json found). */
20
+ ran: boolean;
21
+ /** True when the check passed — or was skipped (nothing to fail). */
22
+ ok: boolean;
23
+ /** Combined stdout + stderr from `tsc`. */
24
+ output: string;
25
+ /** The tsconfig.json that was used, when one was found. */
26
+ tsconfigPath?: string;
27
+ }
28
+ /**
29
+ * Resolve the project's `tsconfig.json`, or null if it has none.
30
+ */
31
+ export declare function findTsconfig(projectDir: string): string | null;
32
+ /**
33
+ * Run `tsc --noEmit` against the project's tsconfig.
34
+ *
35
+ * Resolves (never rejects) with a {@link TypecheckResult}. When no
36
+ * tsconfig is found, returns `{ ran: false, ok: true }` so callers can
37
+ * treat "no TypeScript config" as a non-fatal skip.
38
+ */
39
+ export declare function runTypecheck(projectDir: string, opts?: {
40
+ tsconfigPath?: string;
41
+ }): Promise<TypecheckResult>;
42
+ //# sourceMappingURL=typecheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typecheck.d.ts","sourceRoot":"","sources":["../../src/utils/typecheck.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iEAAiE;IACjE,GAAG,EAAE,OAAO,CAAC;IACb,qEAAqE;IACrE,EAAE,EAAE,OAAO,CAAC;IACZ,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG9D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/B,OAAO,CAAC,eAAe,CAAC,CAyB1B"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Shared TypeScript type-check helper.
3
+ *
4
+ * Backs both `vk check` (explicit type-check command) and the
5
+ * pre-deploy gate in `vk deploy`. Runs `tsc --noEmit -p <tsconfig>`
6
+ * against the consumer project so type errors in routes, functions,
7
+ * and `vk.config.ts` surface locally instead of as a half-applied
8
+ * CloudFormation stack.
9
+ *
10
+ * `tsc` is invoked through `npx` (with `shell: true`, matching the
11
+ * `npx cdk` invocation in `deploy.ts`). npx resolves the project's
12
+ * locally-installed `typescript` before fetching, so the check uses
13
+ * the exact compiler version the project pins.
14
+ */
15
+ import { spawn } from 'node:child_process';
16
+ import { existsSync } from 'node:fs';
17
+ import { join } from 'node:path';
18
+ /**
19
+ * Resolve the project's `tsconfig.json`, or null if it has none.
20
+ */
21
+ export function findTsconfig(projectDir) {
22
+ const candidate = join(projectDir, 'tsconfig.json');
23
+ return existsSync(candidate) ? candidate : null;
24
+ }
25
+ /**
26
+ * Run `tsc --noEmit` against the project's tsconfig.
27
+ *
28
+ * Resolves (never rejects) with a {@link TypecheckResult}. When no
29
+ * tsconfig is found, returns `{ ran: false, ok: true }` so callers can
30
+ * treat "no TypeScript config" as a non-fatal skip.
31
+ */
32
+ export function runTypecheck(projectDir, opts) {
33
+ return new Promise((resolve) => {
34
+ const tsconfigPath = opts?.tsconfigPath ?? findTsconfig(projectDir);
35
+ if (!tsconfigPath) {
36
+ resolve({ ran: false, ok: true, output: '' });
37
+ return;
38
+ }
39
+ const proc = spawn('npx', ['tsc', '--noEmit', '-p', `"${tsconfigPath}"`], {
40
+ cwd: projectDir,
41
+ shell: true,
42
+ env: process.env,
43
+ });
44
+ let output = '';
45
+ proc.stdout?.on('data', (d) => { output += d.toString(); });
46
+ proc.stderr?.on('data', (d) => { output += d.toString(); });
47
+ proc.on('error', (err) => {
48
+ resolve({ ran: true, ok: false, output: err instanceof Error ? err.message : String(err), tsconfigPath });
49
+ });
50
+ proc.on('close', (code) => {
51
+ resolve({ ran: true, ok: code === 0, output, tsconfigPath });
52
+ });
53
+ });
54
+ }
55
+ //# sourceMappingURL=typecheck.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typecheck.js","sourceRoot":"","sources":["../../src/utils/typecheck.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAgBjC;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,UAAkB;IAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IACpD,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAClD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,UAAkB,EAClB,IAAgC;IAEhC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,YAAY,GAAG,IAAI,EAAE,YA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YAAY,EAAE,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venturekit/cli",
3
- "version": "0.0.0-dev.20260701100017",
3
+ "version": "0.0.0-dev.20260704225856",
4
4
  "description": "CLI for VentureKit - scaffolding and deploy orchestration",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,9 +14,13 @@
14
14
  ],
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "https://github.com/venturekit-dev/venturekit.private.git",
17
+ "url": "https://github.com/venturekit-dev/venturekit.git",
18
18
  "directory": "packages/cli"
19
19
  },
20
+ "homepage": "https://venturekit.dev",
21
+ "bugs": {
22
+ "url": "https://github.com/venturekit-dev/venturekit/issues"
23
+ },
20
24
  "publishConfig": {
21
25
  "registry": "https://registry.npmjs.org",
22
26
  "access": "public"
@@ -29,8 +33,8 @@
29
33
  }
30
34
  },
31
35
  "dependencies": {
32
- "@venturekit/core": "0.0.0-dev.20260701100017",
33
- "@venturekit/data": "0.0.0-dev.20260701100017",
36
+ "@venturekit/core": "0.0.0-dev.20260704225856",
37
+ "@venturekit/data": "0.0.0-dev.20260704225856",
34
38
  "@aws-sdk/client-acm": "^3.1068.0",
35
39
  "@aws-sdk/client-cloudformation": "^3.1068.0",
36
40
  "@aws-sdk/client-iam": "^3.1068.0",
@@ -48,7 +52,7 @@
48
52
  "@types/node": "^25.6.0",
49
53
  "@types/prompts": "^2.4.9",
50
54
  "@types/ws": "^8.5.13",
51
- "@venturekit/runtime": "0.0.0-dev.20260701100017",
55
+ "@venturekit/runtime": "0.0.0-dev.20260704225856",
52
56
  "@aws-sdk/client-cloudwatch-logs": "^3.1068.0",
53
57
  "@aws-sdk/client-cognito-identity-provider": "^3.1068.0",
54
58
  "@aws-sdk/client-lambda": "^3.1068.0",