@m2s2/cli 0.1.31 → 0.1.33

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/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.33] - 2026-06-21
11
+
12
+ ### Bug Fixes
13
+ - Fixed new command and added testing to verify package creation
14
+
15
+
16
+ ## [0.1.32] - 2026-06-20
17
+
18
+ ### Bug Fixes
19
+ - Sync template dependencies to latest @m2s2 releases
20
+
21
+
10
22
  ## [0.1.31] - 2026-06-19
11
23
 
12
24
  ### Bug Fixes
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![GitHub Sponsors](https://img.shields.io/github/sponsors/mgmaster24?style=flat&logo=githubsponsors&label=Sponsor)](https://github.com/sponsors/mgmaster24)
4
4
 
5
- The official CLI for scaffolding and working with [M²S²](https://github.com/M2S2-Engineering-Group) design system projects. Create new React, Angular, or Vue applications pre-wired with M²S² components, generate components, and keep your installation up to date — all from the terminal.
5
+ The official CLI for scaffolding and working with [M²S²](https://github.com/M2S2-Engineering-Group) design system projects. Create new frontend (React, Angular, Vue), backend (Go, Node, Python), or fullstack projects pre-wired with M²S² components, generate components and pages, and keep your installation up to date — all from the terminal.
6
6
 
7
7
  ## Table of Contents
8
8
 
@@ -79,24 +79,45 @@ m2s2 new <name> [OPTIONS]
79
79
 
80
80
  **Options**
81
81
 
82
- | Flag | Description |
83
- |------|-------------|
84
- | `--framework <react\|angular\|vue>` | Framework to scaffold. Prompted interactively if omitted. |
85
- | `--skip-install` | Skip running `npm install` after writing project files. |
82
+ | Flag | Values | Description |
83
+ |------|--------|-------------|
84
+ | `--project-type` | `frontend` `backend` `fullstack` | Project type. Prompted interactively if omitted. |
85
+ | `--framework` | `react` `angular` `vue` | Frontend framework. Required for frontend and fullstack projects. |
86
+ | `--runtime` | `go` `node` `python` | Backend runtime. Required for backend and fullstack projects. |
87
+ | `--api-framework` | `gin` `echo` `fiber` `express` `fastify` `fastapi` `flask` | API framework. Infers `--runtime` if omitted. |
88
+ | `--skip-install` | | Skip `npm install` / `go mod tidy` / `pip install` after scaffolding. |
89
+ | `--offline` | | Skip npm version resolution (uses placeholder versions). Intended for testing. |
86
90
 
87
91
  **Examples**
88
92
 
89
93
  ```bash
90
- # Interactive framework selection
94
+ # Interactive — prompts for all choices
91
95
  m2s2 new my-app
92
96
 
93
- # Explicit framework
94
- m2s2 new my-app --framework react
95
- m2s2 new my-app --framework angular
96
- m2s2 new my-app --framework vue
97
+ # Frontend
98
+ m2s2 new my-app --project-type frontend --framework react
99
+ m2s2 new my-app --project-type frontend --framework angular
100
+ m2s2 new my-app --project-type frontend --framework vue
101
+
102
+ # Backend — Go
103
+ m2s2 new my-api --project-type backend --runtime go --api-framework gin
104
+ m2s2 new my-api --project-type backend --runtime go --api-framework echo
105
+ m2s2 new my-api --project-type backend --runtime go --api-framework fiber
106
+
107
+ # Backend — Node
108
+ m2s2 new my-api --project-type backend --runtime node --api-framework express
109
+ m2s2 new my-api --project-type backend --runtime node --api-framework fastify
97
110
 
98
- # Skip npm install (useful in CI or offline environments)
99
- m2s2 new my-app --framework react --skip-install
111
+ # Backend — Python (creates a .venv and runs pip install)
112
+ m2s2 new my-api --project-type backend --runtime python --api-framework fastapi
113
+ m2s2 new my-api --project-type backend --runtime python --api-framework flask
114
+
115
+ # Fullstack
116
+ m2s2 new my-app --project-type fullstack --framework react --runtime go --api-framework gin
117
+ m2s2 new my-app --project-type fullstack --framework vue --runtime python --api-framework fastapi
118
+
119
+ # Skip install (useful in CI)
120
+ m2s2 new my-app --project-type frontend --framework react --skip-install
100
121
  ```
101
122
 
102
123
  **What gets generated**
@@ -420,29 +441,49 @@ templates/
420
441
 
421
442
  ## Testing
422
443
 
444
+ The test suite has two tiers.
445
+
446
+ ### Unit / integration tests (fast, no network)
447
+
423
448
  ```bash
424
- # Run all tests
425
449
  cargo test
450
+ ```
426
451
 
427
- # Lint
428
- cargo clippy -- -D warnings
452
+ Covers all scaffold and generate paths using temp directories and an `--offline`
453
+ flag that skips npm version resolution. Runs in under a second. Also includes
454
+ `cargo clippy` and `cargo fmt` checks in CI.
429
455
 
430
- # Format check
456
+ ```bash
457
+ cargo clippy -- -D warnings
431
458
  cargo fmt --check
432
459
  ```
433
460
 
434
- End-to-end smoke test (no npm install required):
461
+ ### End-to-end tests (network required)
462
+
463
+ E2e tests scaffold real projects, resolve live package versions, and run the
464
+ full install step (`npm install`, `go mod tidy`, `python3 -m venv` + `pip
465
+ install`). They are marked `#[ignore]` and never run during normal CI.
435
466
 
436
467
  ```bash
437
- # Scaffold a React project and inspect the output
438
- cargo run -- new test-app --framework react --skip-install
439
- find test-app -type f
468
+ # Run the full e2e suite
469
+ cargo e2e
440
470
 
441
- # Generate a component inside it
442
- cd test-app
443
- ../target/debug/m2s2 generate component MyCard
471
+ # Run a single scenario
472
+ cargo test --test e2e new_react_frontend_e2e -- --ignored --nocapture
444
473
  ```
445
474
 
475
+ Each test asserts on install artifacts to confirm the toolchain ran:
476
+
477
+ | Scenario | Artifact checked |
478
+ |----------|-----------------|
479
+ | React / Angular / Vue frontend | `node_modules/` |
480
+ | Go backend (gin / echo / fiber) | `go.sum` |
481
+ | Node backend (express / fastify) | `node_modules/` |
482
+ | Python backend (fastapi / flask) | `.venv/` + `.venv/bin/pip` |
483
+ | Fullstack | web `node_modules/` + api artifact |
484
+
485
+ Temp directories are cleaned up automatically after each test.
486
+
446
487
  ---
447
488
 
448
489
  ## Project Structure
@@ -23,7 +23,7 @@
23
23
  "hasInstallScript": true,
24
24
  "license": "MIT",
25
25
  "name": "@m2s2/cli",
26
- "version": "0.1.31"
26
+ "version": "0.1.33"
27
27
  },
28
28
  "node_modules/@isaacs/cliui": {
29
29
  "engines": {
@@ -542,5 +542,5 @@
542
542
  }
543
543
  },
544
544
  "requires": true,
545
- "version": "0.1.31"
545
+ "version": "0.1.33"
546
546
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "artifactDownloadUrls": [
3
- "https://github.com/M2S2-Engineering-Group/m2s2-cli/releases/download/v0.1.31"
3
+ "https://github.com/M2S2-Engineering-Group/m2s2-cli/releases/download/v0.1.33"
4
4
  ],
5
5
  "author": "M²S² Engineering Group <contact@m2s2.io>",
6
6
  "bin": {
@@ -95,7 +95,7 @@
95
95
  "zipExt": ".tar.xz"
96
96
  }
97
97
  },
98
- "version": "0.1.31",
98
+ "version": "0.1.33",
99
99
  "volta": {
100
100
  "node": "18.14.1",
101
101
  "npm": "9.5.0"