@hexagen-monaco/sync 0.8.0 → 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.
- package/dist/cli.js +744 -25
- package/dist/cli.js.map +1 -1
- package/dist/commands/add/index.d.ts +6 -0
- package/dist/commands/add/index.d.ts.map +1 -1
- package/dist/generators/apps-framework-templates.d.ts.map +1 -1
- package/dist/generators/apps.d.ts.map +1 -1
- package/dist/generators/eslint.d.ts +2 -0
- package/dist/generators/eslint.d.ts.map +1 -1
- package/dist/generators/package-json.d.ts.map +1 -1
- package/dist/index.js +722 -20
- package/dist/index.js.map +1 -1
- package/dist/templates/agents-md/files/.agents/tech-stack.md +3 -4
- package/dist/templates/agents-md/files/.agents/testing.md +9 -9
- package/dist/templates/mcp-server/files/src/infrastructure/mcp/registry/tool-registry.test.ts +1 -1
- package/dist/templates/mcp-server/files/src/infrastructure/mcp/tools/example.tool.test.ts +1 -1
- package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/auth/bearer.test.ts +1 -1
- package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/auth/oauth.test.ts +1 -1
- package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/guard.test.ts +1 -1
- package/dist/types/manifest/apps.d.ts +1 -1
- package/dist/types/manifest/apps.d.ts.map +1 -1
- 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
|
-
|
|
|
14
|
-
| node:assert
|
|
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 /
|
|
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:**
|
|
6
|
-
- **Assertions:** `node:assert/strict`
|
|
7
|
-
|
|
8
|
-
|
|
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` (
|
|
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
|
|
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 (`
|
|
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.
|
|
@@ -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;
|
|
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,QAAQ,GACR,YAAY,GACZ,UAAU,GACV,OAAO,GACP,KAAK,GACL,cAAc,GACd,OAAO,GACP,SAAS,CAAC;AAEd,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,OAAO,CAAC,EA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