@phila/cli 0.0.6 → 0.0.8

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 (63) hide show
  1. package/README.md +20 -1
  2. package/dist/commands/config.d.ts +2 -0
  3. package/dist/commands/config.d.ts.map +1 -1
  4. package/dist/commands/config.js.map +1 -1
  5. package/dist/commands/deploy.d.ts.map +1 -1
  6. package/dist/commands/deploy.js +17 -6
  7. package/dist/commands/deploy.js.map +1 -1
  8. package/dist/commands/init.d.ts.map +1 -1
  9. package/dist/commands/init.js +91 -7
  10. package/dist/commands/init.js.map +1 -1
  11. package/dist/commands/ship.d.ts.map +1 -1
  12. package/dist/commands/ship.js +14 -4
  13. package/dist/commands/ship.js.map +1 -1
  14. package/dist/templates/_shared/webapp-cdk-package.json.tmpl +2 -2
  15. package/dist/templates/lambda-api-nodejs/cdk/package.json +2 -2
  16. package/dist/templates/lambda-api-nodejs/package.json.tmpl +2 -2
  17. package/dist/templates/lambda-api-nodejs/pnpm-workspace.yaml.tmpl +3 -0
  18. package/dist/templates/lambda-dynamo-api/cdk/package.json +2 -2
  19. package/dist/templates/lambda-dynamo-api/package.json.tmpl +2 -2
  20. package/dist/templates/lambda-dynamo-api/pnpm-workspace.yaml.tmpl +3 -0
  21. package/dist/templates/lambda-postgres-api/cdk/package.json +2 -2
  22. package/dist/templates/lambda-postgres-api/package.json.tmpl +2 -2
  23. package/dist/templates/lambda-postgres-api/pnpm-workspace.yaml.tmpl +3 -0
  24. package/dist/templates/static-site/cdk/package.json +2 -2
  25. package/dist/templates/static-site/package.json.tmpl +2 -6
  26. package/dist/templates/static-site/pnpm-workspace.yaml.tmpl +3 -0
  27. package/dist/templates/webapp-ecs-dotnet/package.json.tmpl +1 -1
  28. package/dist/templates/webapp-ecs-dotnet/pnpm-workspace.yaml.tmpl +3 -0
  29. package/dist/templates/webapp-ecs-node/package.json.tmpl +2 -2
  30. package/dist/templates/webapp-ecs-node/pnpm-workspace.yaml.tmpl +4 -0
  31. package/dist/templates/webapp-ecs-postgres-dotnet/package.json.tmpl +1 -1
  32. package/dist/templates/webapp-ecs-postgres-dotnet/pnpm-workspace.yaml.tmpl +3 -0
  33. package/dist/templates/webapp-ecs-postgres-node/package.json.tmpl +2 -2
  34. package/dist/templates/webapp-ecs-postgres-node/pnpm-workspace.yaml.tmpl +4 -0
  35. package/dist/templates/webapp-lambda-dotnet/package.json.tmpl +1 -1
  36. package/dist/templates/webapp-lambda-dotnet/pnpm-workspace.yaml.tmpl +3 -0
  37. package/dist/templates/webapp-lambda-dynamo-dotnet/package.json.tmpl +1 -1
  38. package/dist/templates/webapp-lambda-dynamo-dotnet/pnpm-workspace.yaml.tmpl +3 -0
  39. package/dist/templates/webapp-lambda-dynamo-node/package.json.tmpl +2 -2
  40. package/dist/templates/webapp-lambda-dynamo-node/pnpm-workspace.yaml.tmpl +4 -0
  41. package/dist/templates/webapp-lambda-node/package.json.tmpl +2 -2
  42. package/dist/templates/webapp-lambda-node/pnpm-workspace.yaml.tmpl +4 -0
  43. package/dist/templates/webapp-lambda-postgres-dotnet/package.json.tmpl +1 -1
  44. package/dist/templates/webapp-lambda-postgres-dotnet/pnpm-workspace.yaml.tmpl +3 -0
  45. package/dist/templates/webapp-lambda-postgres-node/package.json.tmpl +2 -2
  46. package/dist/templates/webapp-lambda-postgres-node/pnpm-workspace.yaml.tmpl +4 -0
  47. package/dist/utils/cli-installation.d.ts +17 -0
  48. package/dist/utils/cli-installation.d.ts.map +1 -0
  49. package/dist/utils/cli-installation.js +131 -0
  50. package/dist/utils/cli-installation.js.map +1 -0
  51. package/dist/utils/dependencies.d.ts +4 -2
  52. package/dist/utils/dependencies.d.ts.map +1 -1
  53. package/dist/utils/dependencies.js +84 -4
  54. package/dist/utils/dependencies.js.map +1 -1
  55. package/dist/utils/package-manager.d.ts +30 -0
  56. package/dist/utils/package-manager.d.ts.map +1 -0
  57. package/dist/utils/package-manager.js +145 -0
  58. package/dist/utils/package-manager.js.map +1 -0
  59. package/dist/utils/template.d.ts +3 -0
  60. package/dist/utils/template.d.ts.map +1 -1
  61. package/dist/utils/template.js +23 -5
  62. package/dist/utils/template.js.map +1 -1
  63. package/package.json +2 -2
@@ -9,14 +9,14 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@phila/constructs": "^{{constructsVersion}}",
12
- "aws-cdk-lib": "^2.100.0",
12
+ "aws-cdk-lib": "^2.236.0",
13
13
  "cdk-nag": "^2.28.0",
14
14
  "constructs": "^10.4.4",
15
15
  "source-map-support": "^0.5.21"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^20.10.0",
19
- "aws-cdk": "^2.100.0",
19
+ "aws-cdk": "^2.1103.0",
20
20
  "ts-node": "^10.9.0",
21
21
  "typescript": "^5.3.0"
22
22
  },
@@ -9,14 +9,14 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@phila/constructs": "^{{constructsVersion}}",
12
- "aws-cdk-lib": "^2.100.0",
12
+ "aws-cdk-lib": "^2.236.0",
13
13
  "cdk-nag": "^2.28.0",
14
14
  "constructs": "^10.4.4",
15
15
  "source-map-support": "^0.5.21"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^20.10.0",
19
- "aws-cdk": "^2.100.0",
19
+ "aws-cdk": "^2.1103.0",
20
20
  "ts-node": "^10.9.0",
21
21
  "typescript": "^5.3.0"
22
22
  },
@@ -4,8 +4,8 @@
4
4
  "description": "Lambda API application using Philadelphia constructs",
5
5
  "private": true,
6
6
  "scripts": {
7
- "build": "npm run build --workspaces",
8
- "test": "npm test --workspaces",
7
+ "build": "{{buildCommand}}",
8
+ "test": "{{testCommand}}",
9
9
  "synth": "cd cdk && cdk synth",
10
10
  "deploy": "cd cdk && cdk deploy",
11
11
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'apps/*'
@@ -9,14 +9,14 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@phila/constructs": "^{{constructsVersion}}",
12
- "aws-cdk-lib": "^2.100.0",
12
+ "aws-cdk-lib": "^2.236.0",
13
13
  "cdk-nag": "^2.28.0",
14
14
  "constructs": "^10.4.4",
15
15
  "source-map-support": "^0.5.21"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^20.10.0",
19
- "aws-cdk": "^2.100.0",
19
+ "aws-cdk": "^2.1103.0",
20
20
  "ts-node": "^10.9.0",
21
21
  "typescript": "^5.3.0"
22
22
  },
@@ -4,8 +4,8 @@
4
4
  "description": "Lambda DynamoDB API application using Philadelphia constructs",
5
5
  "private": true,
6
6
  "scripts": {
7
- "build": "npm run build --workspaces",
8
- "test": "npm test --workspaces",
7
+ "build": "{{buildCommand}}",
8
+ "test": "{{testCommand}}",
9
9
  "synth": "cd cdk && cdk synth",
10
10
  "deploy": "cd cdk && cdk deploy",
11
11
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'apps/*'
@@ -9,14 +9,14 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@phila/constructs": "^{{constructsVersion}}",
12
- "aws-cdk-lib": "^2.100.0",
12
+ "aws-cdk-lib": "^2.236.0",
13
13
  "cdk-nag": "^2.28.0",
14
14
  "constructs": "^10.4.4",
15
15
  "source-map-support": "^0.5.21"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^20.10.0",
19
- "aws-cdk": "^2.100.0",
19
+ "aws-cdk": "^2.1103.0",
20
20
  "ts-node": "^10.9.0",
21
21
  "typescript": "^5.3.0"
22
22
  },
@@ -4,8 +4,8 @@
4
4
  "description": "Lambda API with PostgreSQL database using Philadelphia constructs",
5
5
  "private": true,
6
6
  "scripts": {
7
- "build": "npm run build --workspaces",
8
- "test": "npm test --workspaces",
7
+ "build": "{{buildCommand}}",
8
+ "test": "{{testCommand}}",
9
9
  "synth": "cd cdk && cdk synth",
10
10
  "deploy": "cd cdk && cdk deploy",
11
11
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'apps/*'
@@ -9,14 +9,14 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@phila/constructs": "^{{constructsVersion}}",
12
- "aws-cdk-lib": "^2.100.0",
12
+ "aws-cdk-lib": "^2.236.0",
13
13
  "cdk-nag": "^2.28.0",
14
14
  "constructs": "^10.4.4",
15
15
  "source-map-support": "^0.5.21"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^20.10.0",
19
- "aws-cdk": "^2.100.0",
19
+ "aws-cdk": "^2.1103.0",
20
20
  "ts-node": "^10.9.0",
21
21
  "typescript": "^5.3.0"
22
22
  },
@@ -4,7 +4,7 @@
4
4
  "description": "Static site application using Philadelphia constructs",
5
5
  "private": true,
6
6
  "scripts": {
7
- "build": "npm run build --workspaces",
7
+ "build": "{{buildCommand}}",
8
8
  "synth": "cd cdk && cdk synth",
9
9
  "deploy": "cd cdk && cdk deploy",
10
10
  "diff": "cd cdk && cdk diff"
@@ -12,9 +12,5 @@
12
12
  "workspaces": [
13
13
  "cdk",
14
14
  "frontend"
15
- ],
16
- "devDependencies": {
17
- "@types/node": "^20.10.0",
18
- "typescript": "^5.3.0"
19
- }
15
+ ]
20
16
  }
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'frontend'
@@ -8,7 +8,7 @@
8
8
  "build:frontend": "cd frontend && npm run build",
9
9
  "build:api": "cd apps/api && docker build -t {{appName}}-api .",
10
10
  "dev": "cd frontend && npm run dev",
11
- "test": "npm test --workspaces --if-present",
11
+ "test": "{{testCommand}}",
12
12
  "synth": "cd cdk && cdk synth",
13
13
  "deploy": "cd cdk && cdk deploy",
14
14
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'frontend'
@@ -4,12 +4,12 @@
4
4
  "description": "Web application with Nuxt frontend and ECS containerized API backend",
5
5
  "private": true,
6
6
  "scripts": {
7
- "build": "npm run build --workspaces",
7
+ "build": "{{buildCommand}}",
8
8
  "build:frontend": "cd frontend && npm run build",
9
9
  "build:api": "cd apps/api && npm run build",
10
10
  "dev": "cd frontend && npm run dev",
11
11
  "dev:api": "cd apps/api && npm run dev",
12
- "test": "npm test --workspaces --if-present",
12
+ "test": "{{testCommand}}",
13
13
  "synth": "cd cdk && cdk synth",
14
14
  "deploy": "cd cdk && cdk deploy",
15
15
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,4 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'apps/*'
4
+ - 'frontend'
@@ -8,7 +8,7 @@
8
8
  "build:frontend": "cd frontend && npm run build",
9
9
  "build:api": "cd apps/api && docker build -t {{appName}}-api .",
10
10
  "dev": "cd frontend && npm run dev",
11
- "test": "npm test --workspaces --if-present",
11
+ "test": "{{testCommand}}",
12
12
  "synth": "cd cdk && cdk synth",
13
13
  "deploy": "cd cdk && cdk deploy",
14
14
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'frontend'
@@ -4,12 +4,12 @@
4
4
  "description": "Web application with Nuxt frontend, ECS containerized API backend, and PostgreSQL",
5
5
  "private": true,
6
6
  "scripts": {
7
- "build": "npm run build --workspaces",
7
+ "build": "{{buildCommand}}",
8
8
  "build:frontend": "cd frontend && npm run build",
9
9
  "build:api": "cd apps/api && npm run build",
10
10
  "dev": "cd frontend && npm run dev",
11
11
  "dev:api": "cd apps/api && npm run dev",
12
- "test": "npm test --workspaces --if-present",
12
+ "test": "{{testCommand}}",
13
13
  "synth": "cd cdk && cdk synth",
14
14
  "deploy": "cd cdk && cdk deploy",
15
15
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,4 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'apps/*'
4
+ - 'frontend'
@@ -8,7 +8,7 @@
8
8
  "build:frontend": "cd frontend && npm run build",
9
9
  "build:api": "cd apps/api && dotnet publish -c Release -o publish",
10
10
  "dev": "cd frontend && npm run dev",
11
- "test": "npm test --workspaces --if-present",
11
+ "test": "{{testCommand}}",
12
12
  "synth": "cd cdk && cdk synth",
13
13
  "deploy": "cd cdk && cdk deploy",
14
14
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'frontend'
@@ -8,7 +8,7 @@
8
8
  "build:frontend": "cd frontend && npm run build",
9
9
  "build:api": "cd apps/api && dotnet publish -c Release -o publish",
10
10
  "dev": "cd frontend && npm run dev",
11
- "test": "npm test --workspaces --if-present",
11
+ "test": "{{testCommand}}",
12
12
  "synth": "cd cdk && cdk synth",
13
13
  "deploy": "cd cdk && cdk deploy",
14
14
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'frontend'
@@ -4,11 +4,11 @@
4
4
  "description": "Web application with Nuxt frontend and Lambda API backend",
5
5
  "private": true,
6
6
  "scripts": {
7
- "build": "npm run build --workspaces",
7
+ "build": "{{buildCommand}}",
8
8
  "build:frontend": "cd frontend && npm run build",
9
9
  "build:api": "cd apps/api && npm run build",
10
10
  "dev": "cd frontend && npm run dev",
11
- "test": "npm test --workspaces --if-present",
11
+ "test": "{{testCommand}}",
12
12
  "synth": "cd cdk && cdk synth",
13
13
  "deploy": "cd cdk && cdk deploy",
14
14
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,4 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'apps/*'
4
+ - 'frontend'
@@ -4,11 +4,11 @@
4
4
  "description": "Web application with Nuxt frontend and Lambda API backend",
5
5
  "private": true,
6
6
  "scripts": {
7
- "build": "npm run build --workspaces",
7
+ "build": "{{buildCommand}}",
8
8
  "build:frontend": "cd frontend && npm run build",
9
9
  "build:api": "cd apps/api && npm run build",
10
10
  "dev": "cd frontend && npm run dev",
11
- "test": "npm test --workspaces --if-present",
11
+ "test": "{{testCommand}}",
12
12
  "synth": "cd cdk && cdk synth",
13
13
  "deploy": "cd cdk && cdk deploy",
14
14
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,4 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'apps/*'
4
+ - 'frontend'
@@ -8,7 +8,7 @@
8
8
  "build:frontend": "cd frontend && npm run build",
9
9
  "build:api": "cd apps/api && dotnet publish -c Release -o publish",
10
10
  "dev": "cd frontend && npm run dev",
11
- "test": "npm test --workspaces --if-present",
11
+ "test": "{{testCommand}}",
12
12
  "synth": "cd cdk && cdk synth",
13
13
  "deploy": "cd cdk && cdk deploy",
14
14
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'frontend'
@@ -4,11 +4,11 @@
4
4
  "description": "Web application with Nuxt frontend and Lambda API backend",
5
5
  "private": true,
6
6
  "scripts": {
7
- "build": "npm run build --workspaces",
7
+ "build": "{{buildCommand}}",
8
8
  "build:frontend": "cd frontend && npm run build",
9
9
  "build:api": "cd apps/api && npm run build",
10
10
  "dev": "cd frontend && npm run dev",
11
- "test": "npm test --workspaces --if-present",
11
+ "test": "{{testCommand}}",
12
12
  "synth": "cd cdk && cdk synth",
13
13
  "deploy": "cd cdk && cdk deploy",
14
14
  "diff": "cd cdk && cdk diff"
@@ -0,0 +1,4 @@
1
+ packages:
2
+ - 'cdk'
3
+ - 'apps/*'
4
+ - 'frontend'
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Detects if the CLI package is running from a local link or workspace (via npm link, pnpm link, or direct workspace execution)
3
+ * vs installed from npm registry.
4
+ *
5
+ * @returns true if running from a local link or workspace, false if from npm registry
6
+ */
7
+ export declare function isLocalLink(): boolean;
8
+ /**
9
+ * Finds the workspace root by looking for pnpm-workspace.yaml, package.json with workspaces,
10
+ * or other workspace indicators
11
+ */
12
+ export declare function findWorkspaceRoot(startDir: string): string | null;
13
+ /**
14
+ * Gets the installation type as a string for display purposes
15
+ */
16
+ export declare function getInstallationType(): 'local' | 'npm';
17
+ //# sourceMappingURL=cli-installation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-installation.d.ts","sourceRoot":"","sources":["../../src/utils/cli-installation.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAmDrC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA0BjE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,GAAG,KAAK,CAErD"}
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ // ABOUTME: Detects whether the CLI is running from a local link or npm registry
3
+ // ABOUTME: Checks symlinks, workspace paths, and node_modules location
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || (function () {
21
+ var ownKeys = function(o) {
22
+ ownKeys = Object.getOwnPropertyNames || function (o) {
23
+ var ar = [];
24
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
25
+ return ar;
26
+ };
27
+ return ownKeys(o);
28
+ };
29
+ return function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ })();
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.isLocalLink = isLocalLink;
39
+ exports.findWorkspaceRoot = findWorkspaceRoot;
40
+ exports.getInstallationType = getInstallationType;
41
+ const path = __importStar(require("path"));
42
+ const fs = __importStar(require("fs-extra"));
43
+ /**
44
+ * Detects if the CLI package is running from a local link or workspace (via npm link, pnpm link, or direct workspace execution)
45
+ * vs installed from npm registry.
46
+ *
47
+ * @returns true if running from a local link or workspace, false if from npm registry
48
+ */
49
+ function isLocalLink() {
50
+ try {
51
+ // Get the resolved path to this package's package.json
52
+ // When linked, this will point to the source directory
53
+ // When installed, it will be in node_modules
54
+ const packageJsonPath = require.resolve('@phila/cli/package.json');
55
+ const packageDir = path.dirname(packageJsonPath);
56
+ // Check if the package.json itself or its parent directory is a symlink
57
+ const stats = fs.lstatSync(packageJsonPath);
58
+ if (stats.isSymbolicLink()) {
59
+ return true;
60
+ }
61
+ // Check parent directory
62
+ const parentStats = fs.lstatSync(packageDir);
63
+ if (parentStats.isSymbolicLink()) {
64
+ return true;
65
+ }
66
+ // Check if it's outside node_modules (typical for linked packages or workspace execution)
67
+ if (!packageDir.includes('node_modules')) {
68
+ // Check if it's in the workspace (pnpm workspaces keep packages at root level)
69
+ const workspaceRoot = findWorkspaceRoot(packageDir);
70
+ if (workspaceRoot) {
71
+ // Check if this is the actual workspace package
72
+ const expectedPath = path.join(workspaceRoot, 'packages', 'cli', 'package.json');
73
+ if (fs.existsSync(expectedPath)) {
74
+ // Always use file paths when in workspace (whether it's the actual package or a link)
75
+ return true;
76
+ }
77
+ }
78
+ // If not in node_modules and not in expected workspace location, likely a link
79
+ return true;
80
+ }
81
+ // If it's in node_modules, check if it's a symlink
82
+ // npm link creates symlinks in node_modules
83
+ const nodeModulesPath = path.join(packageDir, '..', '..');
84
+ if (fs.existsSync(nodeModulesPath)) {
85
+ const nodeModulesStats = fs.lstatSync(nodeModulesPath);
86
+ if (nodeModulesStats.isSymbolicLink()) {
87
+ return true;
88
+ }
89
+ }
90
+ return false;
91
+ }
92
+ catch (error) {
93
+ // If we can't resolve, assume it's not a local link
94
+ return false;
95
+ }
96
+ }
97
+ /**
98
+ * Finds the workspace root by looking for pnpm-workspace.yaml, package.json with workspaces,
99
+ * or other workspace indicators
100
+ */
101
+ function findWorkspaceRoot(startDir) {
102
+ let current = path.resolve(startDir);
103
+ while (current !== path.dirname(current)) {
104
+ // Check for pnpm workspace
105
+ if (fs.existsSync(path.join(current, 'pnpm-workspace.yaml'))) {
106
+ return current;
107
+ }
108
+ // Check for npm/yarn workspace in package.json
109
+ const packageJsonPath = path.join(current, 'package.json');
110
+ if (fs.existsSync(packageJsonPath)) {
111
+ try {
112
+ const pkg = fs.readJsonSync(packageJsonPath);
113
+ if (pkg.workspaces || pkg.workspace) {
114
+ return current;
115
+ }
116
+ }
117
+ catch {
118
+ // Ignore JSON parse errors
119
+ }
120
+ }
121
+ current = path.dirname(current);
122
+ }
123
+ return null;
124
+ }
125
+ /**
126
+ * Gets the installation type as a string for display purposes
127
+ */
128
+ function getInstallationType() {
129
+ return isLocalLink() ? 'local' : 'npm';
130
+ }
131
+ //# sourceMappingURL=cli-installation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-installation.js","sourceRoot":"","sources":["../../src/utils/cli-installation.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,uEAAuE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWvE,kCAmDC;AAMD,8CA0BC;AAKD,kDAEC;AAnGD,2CAA6B;AAC7B,6CAA+B;AAE/B;;;;;GAKG;AACH,SAAgB,WAAW;IACzB,IAAI,CAAC;QACH,uDAAuD;QACvD,uDAAuD;QACvD,6CAA6C;QAC7C,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,eA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C;QACf,oDAAoD;QACpD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,QAAgB;IAChD,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAErC,OAAO,OAAO,KAAK,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,2BAA2B;QAC3B,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC,EAAE,CAAC;YAC7D,OAAO,OAAO,CAAC;QACjB,CAAC;QAED,+CAA+C;QAC/C,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3D,IAAI,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;gBAC7C,IAAI,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;oBACpC,OAAO,OAAO,CAAC;gBACjB,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,2BAA2B;YAC7B,CAAC;QACH,CAAC;QAED,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAgB,mBAAmB;IACjC,OAAO,WAAW,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AACzC,CAAC"}
@@ -18,10 +18,12 @@ export declare function getPlatform(): Platform;
18
18
  export declare const DEPENDENCIES: Dependency[];
19
19
  /**
20
20
  * Check all dependencies and return their status
21
+ * @param skipDependencies - Array of dependency names to skip checking
21
22
  */
22
- export declare function checkAllDependencies(): Promise<DependencyStatus[]>;
23
+ export declare function checkAllDependencies(skipDependencies?: string[]): Promise<DependencyStatus[]>;
23
24
  /**
24
25
  * Main entry point - check dependencies and prompt to install if needed
26
+ * @param skipDependencies - Array of dependency names to skip checking (e.g., ['cdk'] for init command)
25
27
  */
26
- export declare function ensureDependencies(): Promise<void>;
28
+ export declare function ensureDependencies(skipDependencies?: string[]): Promise<void>;
27
29
  //# sourceMappingURL=dependencies.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../src/utils/dependencies.ts"],"names":[],"mappings":"AAQA,oBAAY,QAAQ;IAClB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;CAClD;AAED,wBAAgB,WAAW,IAAI,QAAQ,CAKtC;AAED,eAAO,MAAM,YAAY,EAAE,UAAU,EA0JpC,CAAC;AAEF;;GAEG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAOxE;AAkBD;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CA6DxD"}
1
+ {"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../src/utils/dependencies.ts"],"names":[],"mappings":"AAYA,oBAAY,QAAQ;IAClB,MAAM,WAAW;IAC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