@nikovirtala/projen-colima 1.0.23 → 1.0.24

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/.jsii CHANGED
@@ -151,6 +151,6 @@
151
151
  "symbolId": "src/index:Colima"
152
152
  }
153
153
  },
154
- "version": "1.0.23",
155
- "fingerprint": "ByIaRwZE53+WqbDn6kEcYGqoEW6yt6Z4ng8U781i8Sk="
154
+ "version": "1.0.24",
155
+ "fingerprint": "UINHuKSQmumd7tyPZoc0kjdJ6A/Lm6Hnjf6kB0lGynA="
156
156
  }
@@ -0,0 +1,20 @@
1
+ # Product Overview
2
+
3
+ This is a projen component that adds Colima (container runtime) support to projen projects.
4
+
5
+ ## Purpose
6
+
7
+ Provides a reusable component that:
8
+ - Automatically installs Colima and Docker via Homebrew
9
+ - Creates a task to manage Colima startup
10
+ - Integrates seamlessly with projen project configurations
11
+
12
+ ## Target Users
13
+
14
+ Developers using projen to manage their project configurations who need Colima for container runtime on macOS.
15
+
16
+ ## Key Features
17
+
18
+ - Single-line integration: `new Colima(project)`
19
+ - Automatic dependency management through Homebrew
20
+ - Task creation for starting Colima when needed
@@ -0,0 +1,73 @@
1
+ # Project Structure
2
+
3
+ ## Root Configuration
4
+
5
+ - `.projenrc.ts`: Main projen configuration file (source of truth for project setup)
6
+ - `package.json`: Generated by projen - do not edit directly
7
+ - `tsconfig.dev.json`: TypeScript configuration
8
+ - `biome.jsonc`: Biome formatter/linter configuration
9
+ - `vitest.config.ts`: Vitest test configuration
10
+ - `mise.toml`: Node.js version management
11
+
12
+ ## Source Code
13
+
14
+ ```
15
+ src/
16
+ index.ts # Main entry point - exports Colima component
17
+ ```
18
+
19
+ All source code lives in `src/`. The component extends projen's `Component` class.
20
+
21
+ ## Tests
22
+
23
+ ```
24
+ test/
25
+ colima.test.ts # Component tests using Vitest
26
+ ```
27
+
28
+ Tests use Vitest and follow the pattern:
29
+ - Create a test projen project
30
+ - Instantiate the Colima component
31
+ - Assert expected tasks and dependencies are created
32
+
33
+ ## Generated Files
34
+
35
+ ```
36
+ .projen/ # Projen metadata (generated)
37
+ lib/ # Compiled JavaScript output (generated)
38
+ dist/ # JSII distribution packages (generated)
39
+ ```
40
+
41
+ These directories are generated and should not be edited manually.
42
+
43
+ ## Architecture Patterns
44
+
45
+ ### Component Pattern
46
+
47
+ The Colima class extends `Component` from projen:
48
+ - Takes an `IConstruct` scope in constructor
49
+ - Finds or creates Homebrew component
50
+ - Adds packages to Homebrew
51
+ - Creates tasks on the project
52
+
53
+ ### Singleton Pattern
54
+
55
+ Uses `Homebrew.of(project)` to find existing Homebrew component before creating a new one, avoiding duplicate components.
56
+
57
+ ### Task Creation
58
+
59
+ Creates a `colima` task that checks status before starting:
60
+ ```typescript
61
+ project.addTask("colima", {
62
+ exec: "colima status >/dev/null 2>&1 || colima start",
63
+ });
64
+ ```
65
+
66
+ ## Conventions
67
+
68
+ - Use 4-space indentation
69
+ - 120 character line width
70
+ - Organize imports automatically
71
+ - Export main component from `src/index.ts`
72
+ - Test files mirror source structure with `.test.ts` suffix
73
+ - All configuration changes go through `.projenrc.ts`
@@ -0,0 +1,81 @@
1
+ # Technology Stack
2
+
3
+ ## ⚠️ Projen-Managed Project
4
+
5
+ This project is **entirely managed by projen**. Key implications:
6
+
7
+ - **DO NOT** manually edit generated files (package.json, tsconfig.json, etc.)
8
+ - **ALL** configuration changes must be made in `.projenrc.ts`
9
+ - After modifying `.projenrc.ts`, run `npx projen` to regenerate files
10
+ - Dependencies, scripts, and tooling are defined in `.projenrc.ts`, not package.json
11
+
12
+ ## Build System
13
+
14
+ - **projen**: Project configuration and build orchestration
15
+ - **JSII**: Multi-language library compilation (TypeScript to other languages)
16
+ - **TypeScript**: 5.9.3
17
+
18
+ ## Package Management
19
+
20
+ - **pnpm**: Package manager (version 10)
21
+ - **Node.js**: >= 22.21.1 (managed via mise)
22
+
23
+ ## Code Quality
24
+
25
+ - **Biome**: Formatter and linter (replaces ESLint/Prettier)
26
+ - 4-space indentation
27
+ - 120 character line width
28
+ - Organize imports on save
29
+
30
+ ## Testing
31
+
32
+ - **Vitest**: Test framework (version 4)
33
+ - **@vitest/coverage-v8**: Coverage reporting
34
+
35
+ ## Dependencies
36
+
37
+ - **projen**: Core dependency for component integration
38
+ - **constructs**: Peer dependency for component tree
39
+ - **@nikovirtala/projen-homebrew**: Homebrew package management
40
+
41
+ ## Common Commands
42
+
43
+ ```bash
44
+ # Build the project
45
+ npm run build
46
+
47
+ # Run tests
48
+ npm run test
49
+
50
+ # Run tests in watch mode
51
+ npm run test:watch
52
+
53
+ # Update test snapshots
54
+ npm run test:update
55
+
56
+ # Format and lint code
57
+ npm run biome
58
+
59
+ # Compile TypeScript
60
+ npm run compile
61
+
62
+ # Generate API documentation
63
+ npm run docgen
64
+
65
+ # Run all projen tasks
66
+ npm run default
67
+
68
+ # Upgrade dependencies
69
+ npm run upgrade
70
+
71
+ # Create a release
72
+ npm run release
73
+ ```
74
+
75
+ ## Development Workflow
76
+
77
+ 1. Modify `.projenrc.ts` for project configuration changes
78
+ 2. Run `npx projen` to regenerate project files
79
+ 3. Write code in `src/` directory
80
+ 4. Write tests in `test/` directory
81
+ 5. Run `npm run build` to compile and test
package/lib/index.js CHANGED
@@ -27,5 +27,5 @@ class Colima extends component_1.Component {
27
27
  }
28
28
  exports.Colima = Colima;
29
29
  _a = JSII_RTTI_SYMBOL_1;
30
- Colima[_a] = { fqn: "@nikovirtala/projen-colima.Colima", version: "1.0.23" };
30
+ Colima[_a] = { fqn: "@nikovirtala/projen-colima.Colima", version: "1.0.24" };
31
31
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxrRUFBd0Q7QUFHeEQsb0RBQWlEO0FBRWpEOzs7O0dBS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5leHBvcnQgY2xhc3MgQ29saW1hIGV4dGVuZHMgQ29tcG9uZW50IHtcbiAgICBjb25zdHJ1Y3RvcihzY29wZTogSUNvbnN0cnVjdCkge1xuICAgICAgICBzdXBlcihzY29wZSk7XG5cbiAgICAgICAgY29uc3QgcHJvamVjdCA9IHRoaXMucHJvamVjdCBhcyBQcm9qZWN0O1xuXG4gICAgICAgIGxldCBob21lYnJldyA9IEhvbWVicmV3Lm9mKHByb2plY3QpO1xuICAgICAgICBpZiAoIWhvbWVicmV3KSB7XG4gICAgICAgICAgICBob21lYnJldyA9IG5ldyBIb21lYnJldyhwcm9qZWN0KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGhvbWVicmV3LmFkZFBhY2thZ2UoXCJjb2xpbWFcIik7XG4gICAgICAgIGhvbWVicmV3LmFkZFBhY2thZ2UoXCJkb2NrZXJcIik7XG5cbiAgICAgICAgcHJvamVjdC5hZGRUYXNrKFwiY29saW1hXCIsIHtcbiAgICAgICAgICAgIGV4ZWM6IFwiY29saW1hIHN0YXR1cyA+L2Rldi9udWxsIDI+JjEgfHwgY29saW1hIHN0YXJ0XCIsXG4gICAgICAgIH0pO1xuICAgIH1cbn1cbiJdfQ==
package/package.json CHANGED
@@ -43,7 +43,7 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "version": "1.0.23",
46
+ "version": "1.0.24",
47
47
  "types": "lib/index.d.ts",
48
48
  "stability": "stable",
49
49
  "jsii": {