@hexagen-monaco/sync 0.7.1 → 0.9.0

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 (28) hide show
  1. package/dist/cli.js +744 -25
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/add/index.d.ts +6 -0
  4. package/dist/commands/add/index.d.ts.map +1 -1
  5. package/dist/generators/apps-framework-templates.d.ts.map +1 -1
  6. package/dist/generators/apps.d.ts.map +1 -1
  7. package/dist/generators/eslint.d.ts +2 -0
  8. package/dist/generators/eslint.d.ts.map +1 -1
  9. package/dist/generators/package-json.d.ts.map +1 -1
  10. package/dist/index.js +722 -20
  11. package/dist/index.js.map +1 -1
  12. package/dist/templates/agents-md/files/.agents/tech-stack.md +3 -4
  13. package/dist/templates/agents-md/files/.agents/testing.md +9 -9
  14. package/dist/templates/bedrock-agentcore-runtime/files/.github/workflows/deploy-agentcore.yml +1 -1
  15. package/dist/templates/ci-github-actions/files/.github/workflows/ci.yml +3 -3
  16. package/dist/templates/ci-github-actions/files/.github/workflows/deploy-fly.yml +1 -1
  17. package/dist/templates/ci-github-actions/files/.github/workflows/deploy-railway.yml +1 -1
  18. package/dist/templates/ci-github-actions/files/.github/workflows/deploy-vercel.yml +2 -2
  19. package/dist/templates/ci-github-actions/files/.github/workflows/preview.yml +2 -2
  20. package/dist/templates/docker/files/.github/workflows/docker-build.yml +1 -1
  21. package/dist/templates/mcp-server/files/src/infrastructure/mcp/registry/tool-registry.test.ts +1 -1
  22. package/dist/templates/mcp-server/files/src/infrastructure/mcp/tools/example.tool.test.ts +1 -1
  23. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/auth/bearer.test.ts +1 -1
  24. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/auth/oauth.test.ts +1 -1
  25. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/guard.test.ts +1 -1
  26. package/dist/types/manifest/apps.d.ts +1 -1
  27. package/dist/types/manifest/apps.d.ts.map +1 -1
  28. package/package.json +1 -1
@@ -10,8 +10,8 @@ if it is not here (or is in "Never Suggest"), do not introduce it without asking
10
10
  | Next.js | Web framework | App Router. Do not add Pages Router. |
11
11
  | React | UI | Function components + hooks; no class components. |
12
12
  | TypeScript | Language | `strict: true`. No `any` — narrow or use `unknown`. |
13
- | node:test | Test runner | Built-in; `import { test } from "node:test"`. |
14
- | node:assert | Assertions | `node:assert/strict`; never `expect()`. |
13
+ | Vitest | Test runner | `vitest run`; `import { describe, it } from "vitest"`. |
14
+ | node:assert / `expect()` | Assertions | `node:assert/strict` or Vitest's `expect()` — either is fine. |
15
15
 
16
16
  > Keep this table accurate. When you add a dependency (or a Hexagen template
17
17
  > adds one), add its row here in the same change — a stale stack reference is
@@ -19,8 +19,7 @@ if it is not here (or is in "Never Suggest"), do not introduce it without asking
19
19
 
20
20
  ## Never Suggest
21
21
 
22
- - **Jest / Vitest / Mocha / Chai** — this project uses `node:test` + `node:assert`.
23
- - **The `expect()` API** — use `assert.*`.
22
+ - **Jest / Mocha / Chai** — this project uses Vitest.
24
23
  - **Pages Router** — App Router only.
25
24
  - **`any`** — use a precise type, a generic, or `unknown` with narrowing.
26
25
  - A new HTTP client, date library, or state manager **before checking** whether
@@ -2,17 +2,17 @@
2
2
 
3
3
  ## Runner & Assertions
4
4
 
5
- - **Runner:** the Node.js built-in test runner — `import { test } from "node:test"`.
6
- - **Assertions:** `node:assert/strict` — e.g. `assert.equal()`, `assert.deepEqual()`.
7
- - **Never** introduce Jest, Vitest, Mocha, Chai, or an `expect()` API. If you
8
- see them suggested, stop and use `node:test` / `node:assert`.
5
+ - **Runner:** Vitest — `import { describe, it, expect } from "vitest"` (or `test`).
6
+ - **Assertions:** either Vitest's `expect()` or `node:assert/strict` (e.g.
7
+ `assert.equal()`, `assert.deepEqual()`) — both are fine; stay consistent per file.
8
+ - **Never** introduce Jest, Mocha, or Chai. Vitest is the project's runner.
9
9
 
10
10
  ## Conventions
11
11
 
12
- - **File naming:** `*.test.ts` (not `*.spec.ts`).
12
+ - **File naming:** `*.test.ts` (or `*.test.tsx` for component tests).
13
13
  - **Location:** a `__tests__/` directory adjacent to the module under test.
14
- - **Mocks:** prefer `node:test`'s built-in `mock.fn()` over external mock
15
- libraries. Mock at the boundary (ports/adapters), not deep internals.
14
+ - **Mocks:** prefer Vitest's built-in `vi.fn()` / `vi.spyOn()` / `vi.mock()` over
15
+ external mock libraries. Mock at the boundary (ports/adapters), not deep internals.
16
16
  - **Determinism:** no real network, clock, or filesystem in unit tests — inject
17
17
  a fake at the seam. Integration tests that need real I/O are named and
18
18
  isolated.
@@ -26,5 +26,5 @@
26
26
 
27
27
  ## Before You Commit
28
28
 
29
- Run the full suite (`npm test`). A red suite blocks the commit — diagnose, do
30
- not skip or delete the failing test to make it pass.
29
+ Run the full suite (`yarn test`, i.e. `vitest run`). A red suite blocks the
30
+ commit — diagnose, do not skip or delete the failing test to make it pass.
@@ -37,7 +37,7 @@ jobs:
37
37
  deploy:
38
38
  runs-on: ubuntu-latest
39
39
  steps:
40
- - uses: actions/checkout@v4
40
+ - uses: actions/checkout@v5
41
41
 
42
42
  - name: Configure AWS credentials (OIDC)
43
43
  uses: aws-actions/configure-aws-credentials@v4
@@ -31,9 +31,9 @@ jobs:
31
31
  name: Build, Typecheck, Lint & Test
32
32
  runs-on: ubuntu-latest
33
33
  steps:
34
- - uses: actions/checkout@v4
34
+ - uses: actions/checkout@v5
35
35
 
36
- - uses: actions/setup-node@v4
36
+ - uses: actions/setup-node@v5
37
37
  with:
38
38
  node-version: "{node_version}"
39
39
  # No `cache: yarn` here. setup-node's yarn cache runs the runner's
@@ -66,7 +66,7 @@ jobs:
66
66
  # skipped on warm runs (cache_strategy = {cache_strategy}). Set TURBO_TOKEN
67
67
  # and TURBO_TEAM below for the cross-run remote cache.
68
68
  - name: Restore Turbo cache
69
- uses: actions/cache@v4
69
+ uses: actions/cache@v5
70
70
  with:
71
71
  path: .turbo
72
72
  key: ${{ runner.os }}-turbo-${{ github.sha }}
@@ -18,7 +18,7 @@ jobs:
18
18
  name: Deploy
19
19
  runs-on: ubuntu-latest
20
20
  steps:
21
- - uses: actions/checkout@v4
21
+ - uses: actions/checkout@v5
22
22
 
23
23
  # Pinned to a commit SHA (not @master); Dependabot bumps it via the
24
24
  # github-actions ecosystem.
@@ -21,7 +21,7 @@ jobs:
21
21
  runs-on: ubuntu-latest
22
22
  environment: production
23
23
  steps:
24
- - uses: actions/checkout@v4
24
+ - uses: actions/checkout@v5
25
25
 
26
26
  - name: Deploy to Railway
27
27
  # Pinned to a commit SHA (not @main) so an upstream change can't alter
@@ -23,9 +23,9 @@ jobs:
23
23
  VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
24
24
  VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
25
25
  steps:
26
- - uses: actions/checkout@v4
26
+ - uses: actions/checkout@v5
27
27
 
28
- - uses: actions/setup-node@v4
28
+ - uses: actions/setup-node@v5
29
29
  with:
30
30
  node-version: "{node_version}"
31
31
  cache: "yarn"
@@ -29,9 +29,9 @@ jobs:
29
29
  VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
30
30
  VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
31
31
  steps:
32
- - uses: actions/checkout@v4
32
+ - uses: actions/checkout@v5
33
33
 
34
- - uses: actions/setup-node@v4
34
+ - uses: actions/setup-node@v5
35
35
  with:
36
36
  node-version: "{node_version}"
37
37
  # No `cache: yarn` here. setup-node's yarn cache runs the runner's
@@ -25,7 +25,7 @@ jobs:
25
25
  contents: read
26
26
  packages: write
27
27
  steps:
28
- - uses: actions/checkout@v4
28
+ - uses: actions/checkout@v5
29
29
 
30
30
  - name: Set up Buildx
31
31
  uses: docker/setup-buildx-action@v3
@@ -1,5 +1,5 @@
1
1
  // @hexagen-server-only
2
- import { describe, it } from "node:test";
2
+ import { describe, it } from "vitest";
3
3
  import assert from "node:assert/strict";
4
4
 
5
5
  import {
@@ -1,5 +1,5 @@
1
1
  // @hexagen-server-only
2
- import { describe, it } from "node:test";
2
+ import { describe, it } from "vitest";
3
3
  import assert from "node:assert/strict";
4
4
 
5
5
  import { exampleTool } from "./example.tool.js";
@@ -1,4 +1,4 @@
1
- import { describe, it, afterEach } from "node:test";
1
+ import { describe, it, afterEach } from "vitest";
2
2
  import assert from "node:assert/strict";
3
3
  import type { IncomingMessage } from "node:http";
4
4
  import { authenticate, assertConfigured } from "./bearer.js";
@@ -1,4 +1,4 @@
1
- import { describe, it, afterEach } from "node:test";
1
+ import { describe, it, afterEach } from "vitest";
2
2
  import assert from "node:assert/strict";
3
3
  import type { IncomingMessage } from "node:http";
4
4
  import { authenticate, assertConfigured } from "./oauth.js";
@@ -1,4 +1,4 @@
1
- import { describe, it } from "node:test";
1
+ import { describe, it } from "vitest";
2
2
  import assert from "node:assert/strict";
3
3
  import { assertSafeTransport } from "./guard.js";
4
4
 
@@ -1,5 +1,5 @@
1
1
  export type AppDriver = "next.js" | "fastify" | "express" | "cli";
2
- export type AppFramework = "next.js" | "fastify" | "express" | "plain-ts" | "nitro";
2
+ export type AppFramework = "next.js" | "fastify" | "express" | "nestjs" | "serverless" | "plain-ts" | "nitro" | "vue" | "react-router" | "remix" | "angular";
3
3
  export interface App {
4
4
  name: string;
5
5
  driver?: AppDriver;
@@ -1 +1 @@
1
- {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../../src/types/manifest/apps.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC;AAElE,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,SAAS,GACT,SAAS,GACT,UAAU,GACV,OAAO,CAAC;AAEZ,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,OAAO,CAAC,EAAE,M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C;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,OAAO,eAAe,EAAE,YAAY,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,eAAe,EAAE,gBAAgB,CAAC;IACpD,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC,CAAC;CAChE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexagen-monaco/sync",
3
- "version": "0.7.1",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "description": "HexaGen Sync Engine — Generate and sync modular monorepos",
6
6
  "keywords": [