@hexagen-monaco/sync 0.5.2 → 0.6.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 (104) hide show
  1. package/dist/cli.js +1191 -389
  2. package/dist/cli.js.map +1 -1
  3. package/dist/config.d.ts +7 -0
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/fs-utils.d.ts +13 -0
  6. package/dist/fs-utils.d.ts.map +1 -1
  7. package/dist/generators/apps-framework-templates.d.ts +2 -1
  8. package/dist/generators/apps-framework-templates.d.ts.map +1 -1
  9. package/dist/generators/apps.d.ts.map +1 -1
  10. package/dist/generators/architecture-files.d.ts.map +1 -1
  11. package/dist/generators/barrels/recursive.d.ts.map +1 -1
  12. package/dist/generators/cross-context.d.ts +5 -0
  13. package/dist/generators/cross-context.d.ts.map +1 -0
  14. package/dist/generators/eslint.d.ts +3 -1
  15. package/dist/generators/eslint.d.ts.map +1 -1
  16. package/dist/generators/layer-folders.d.ts.map +1 -1
  17. package/dist/generators/port-analyzer.d.ts +38 -4
  18. package/dist/generators/port-analyzer.d.ts.map +1 -1
  19. package/dist/generators/root-file-templates.d.ts +3 -3
  20. package/dist/generators/root-file-templates.d.ts.map +1 -1
  21. package/dist/generators/shared-kernel.d.ts +23 -0
  22. package/dist/generators/shared-kernel.d.ts.map +1 -0
  23. package/dist/generators/stubs.d.ts +13 -0
  24. package/dist/generators/stubs.d.ts.map +1 -1
  25. package/dist/index.js +950 -172
  26. package/dist/index.js.map +1 -1
  27. package/dist/scope-filter.d.ts +35 -0
  28. package/dist/scope-filter.d.ts.map +1 -0
  29. package/dist/sync-engine.d.ts.map +1 -1
  30. package/dist/templates/adobe-creative-production/manifest.json +2 -0
  31. package/dist/templates/adobe-express/manifest.json +2 -0
  32. package/dist/templates/adobe-firefly-composite/manifest.json +2 -0
  33. package/dist/templates/adobe-firefly-content-tagging/manifest.json +2 -0
  34. package/dist/templates/adobe-firefly-core/manifest.json +2 -0
  35. package/dist/templates/adobe-firefly-custom-models/manifest.json +2 -0
  36. package/dist/templates/adobe-firefly-generate/manifest.json +2 -0
  37. package/dist/templates/adobe-firefly-media/manifest.json +2 -0
  38. package/dist/templates/adobe-firefly-storage-azure/manifest.json +2 -0
  39. package/dist/templates/adobe-firefly-storage-gcs/manifest.json +2 -0
  40. package/dist/templates/adobe-firefly-storage-s3/manifest.json +2 -0
  41. package/dist/templates/adobe-firefly-upscale/manifest.json +2 -0
  42. package/dist/templates/adobe-illustrator/manifest.json +2 -0
  43. package/dist/templates/adobe-ims-spa/manifest.json +2 -0
  44. package/dist/templates/adobe-indesign/manifest.json +2 -0
  45. package/dist/templates/adobe-lightroom/manifest.json +2 -0
  46. package/dist/templates/adobe-photoshop/manifest.json +2 -0
  47. package/dist/templates/adobe-substance-3d/manifest.json +2 -0
  48. package/dist/templates/auth-mock/manifest.json +2 -0
  49. package/dist/templates/bedrock-agentcore-runtime/manifest.json +10 -2
  50. package/dist/templates/bedrock-agentcore-services/manifest.json +38 -9
  51. package/dist/templates/better-auth/manifest.json +2 -0
  52. package/dist/templates/bullmq/manifest.json +2 -0
  53. package/dist/templates/ci-github-actions/README.md +7 -0
  54. package/dist/templates/ci-github-actions/files/.github/dependabot.yml +16 -4
  55. package/dist/templates/ci-github-actions/files/.github/workflows/ci.yml +7 -3
  56. package/dist/templates/ci-github-actions/files/.github/workflows/preview.yml +20 -2
  57. package/dist/templates/ci-github-actions/manifest.json +26 -6
  58. package/dist/templates/clerk/manifest.json +2 -0
  59. package/dist/templates/design-system/manifest.json +14 -3
  60. package/dist/templates/docker/manifest.json +2 -0
  61. package/dist/templates/error-handling/manifest.json +2 -0
  62. package/dist/templates/eslint-no-console/manifest.json +2 -0
  63. package/dist/templates/github-oauth/manifest.json +2 -0
  64. package/dist/templates/google-oauth/manifest.json +2 -0
  65. package/dist/templates/langgraph/manifest.json +62 -15
  66. package/dist/templates/llm-adapter/manifest.json +2 -0
  67. package/dist/templates/magic-link/manifest.json +2 -0
  68. package/dist/templates/mcp-server/README.md +49 -0
  69. package/dist/templates/mcp-server/files/.env.mcp.example +6 -0
  70. package/dist/templates/mcp-server/files/.mcp.json.example +8 -0
  71. package/dist/templates/mcp-server/files/bin/cli.ts +15 -0
  72. package/dist/templates/mcp-server/files/src/infrastructure/mcp/prompts/example.prompt.ts +32 -0
  73. package/dist/templates/mcp-server/files/src/infrastructure/mcp/registry/register-all.ts +11 -0
  74. package/dist/templates/mcp-server/files/src/infrastructure/mcp/registry/tool-registry.test.ts +67 -0
  75. package/dist/templates/mcp-server/files/src/infrastructure/mcp/registry/tool-registry.ts +45 -0
  76. package/dist/templates/mcp-server/files/src/infrastructure/mcp/resources/example.resource.ts +28 -0
  77. package/dist/templates/mcp-server/files/src/infrastructure/mcp/sdk.ts +41 -0
  78. package/dist/templates/mcp-server/files/src/infrastructure/mcp/server.ts +52 -0
  79. package/dist/templates/mcp-server/files/src/infrastructure/mcp/tools/example.tool.test.ts +31 -0
  80. package/dist/templates/mcp-server/files/src/infrastructure/mcp/tools/example.tool.ts +74 -0
  81. package/dist/templates/mcp-server/files/src/infrastructure/mcp/transport/register-transports.ts +15 -0
  82. package/dist/templates/mcp-server/files/src/infrastructure/mcp/transport/stdio.ts +14 -0
  83. package/dist/templates/mcp-server/manifest.json +68 -0
  84. package/dist/templates/mcp-server-http/README.md +98 -0
  85. package/dist/templates/mcp-server-http/files/.env.mcp-http.example +22 -0
  86. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/auth/bearer.test.ts +54 -0
  87. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/auth/bearer.ts +49 -0
  88. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/auth/oauth.test.ts +50 -0
  89. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/auth/oauth.ts +53 -0
  90. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/guard.test.ts +75 -0
  91. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/guard.ts +26 -0
  92. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/transport/http.ts +94 -0
  93. package/dist/templates/mcp-server-http/files/src/infrastructure/mcp/transport/register-transports.ts +15 -0
  94. package/dist/templates/mcp-server-http/manifest.json +56 -0
  95. package/dist/templates/microsoft-entra/manifest.json +2 -0
  96. package/dist/templates/nextauth/manifest.json +2 -0
  97. package/dist/templates/observability/manifest.json +10 -2
  98. package/dist/templates/rate-limiting/manifest.json +2 -0
  99. package/dist/templates/shared-types/manifest.json +2 -0
  100. package/dist/templates/supabase/manifest.json +2 -0
  101. package/dist/templates/supabase-auth/manifest.json +2 -0
  102. package/dist/types/manifest/apps.d.ts +12 -1
  103. package/dist/types/manifest/apps.d.ts.map +1 -1
  104. package/package.json +1 -1
@@ -0,0 +1,56 @@
1
+ {
2
+ "id": "mcp-server-http",
3
+ "name": "MCP Server — HTTP transport + auth",
4
+ "description": "Adds a network-exposed Streamable-HTTP transport with always-on auth (bearer or OAuth) to the mcp-server base. A transport-factory addon: it plugs into the base's registerTransport seam (no server.ts rewrite) and ships a defense-in-depth startup guard.",
5
+ "version": "1.0.0",
6
+ "requires": ["mcp-server"],
7
+ "conflicts": [],
8
+ "branch": "feature/generator-template-mcp-server-http",
9
+ "questions": [
10
+ {
11
+ "id": "auth",
12
+ "type": "select",
13
+ "prompt": "Auth for the HTTP transport?",
14
+ "options": ["bearer", "oauth"],
15
+ "default": "bearer"
16
+ },
17
+ {
18
+ "id": "http_port",
19
+ "type": "text",
20
+ "prompt": "HTTP port?",
21
+ "default": "3333"
22
+ }
23
+ ],
24
+ "envVars": ["MCP_TRANSPORT", "MCP_HTTP_PORT", "MCP_AUTH_MODE"],
25
+ "outputs": [
26
+ "src/infrastructure/mcp/transport/http.ts",
27
+ "src/infrastructure/mcp/transport/register-transports.ts",
28
+ "src/infrastructure/mcp/guard.ts",
29
+ "src/infrastructure/mcp/guard.test.ts",
30
+ ".env.mcp-http.example",
31
+ {
32
+ "path": "src/infrastructure/mcp/auth/bearer.ts",
33
+ "when": { "answer": "auth", "equals": "bearer" }
34
+ },
35
+ {
36
+ "path": "src/infrastructure/mcp/auth/bearer.test.ts",
37
+ "when": { "answer": "auth", "equals": "bearer" }
38
+ },
39
+ {
40
+ "path": "src/infrastructure/mcp/auth/oauth.ts",
41
+ "when": { "answer": "auth", "equals": "oauth" }
42
+ },
43
+ {
44
+ "path": "src/infrastructure/mcp/auth/oauth.test.ts",
45
+ "when": { "answer": "auth", "equals": "oauth" }
46
+ }
47
+ ],
48
+ "checklist": [
49
+ "Set MCP_TRANSPORT=streamable-http, MCP_HTTP_PORT, and MCP_AUTH_MODE in .env (see .env.mcp-http.example).",
50
+ "Never run streamable-http with MCP_AUTH_MODE unset or 'none' — the server refuses to start (guard.ts).",
51
+ "bearer: set MCP_BEARER_TOKEN to the shared secret clients send as 'Authorization: Bearer <token>' — the server refuses to start if it is unset.",
52
+ "oauth: set MCP_OAUTH_ISSUER_URL (the server refuses to start without it) and implement token verification in src/infrastructure/mcp/auth/oauth.ts — it fail-closes (denies all) until you do; install `jose` for JWKS verification.",
53
+ "Verify: start the server (npx tsx bin/cli.ts) and POST an MCP initialize to http://localhost:<port> with a valid Authorization header.",
54
+ "For remote deploy, containerize with the `docker` template."
55
+ ]
56
+ }
@@ -3,6 +3,8 @@
3
3
  "name": "Microsoft Entra ID (Azure AD)",
4
4
  "description": "Entra ID confidential-client PKCE flow, Microsoft Graph profile + group fetch, AAD group-to-role mapping, AES-256-GCM stateless session cookie, and a root middleware that protects configured paths while still honouring AUTH_MODE=mock as a dev short-circuit.",
5
5
  "version": "2.0.0",
6
+ "provides": "platform.auth",
7
+ "scope": "project",
6
8
  "requires": ["shared-types", "auth-mock", "env-setup"],
7
9
  "conflicts": [
8
10
  "nextauth",
@@ -3,6 +3,8 @@
3
3
  "name": "Auth.js (NextAuth v5)",
4
4
  "description": "Standalone Auth.js v5 setup: Google/GitHub/Credentials providers, Edge-safe config split, JWT session strategy, typed session.user, and matcher-based route protection middleware",
5
5
  "version": "1.0.0",
6
+ "provides": "platform.auth",
7
+ "scope": "project",
6
8
  "requires": ["env-setup"],
7
9
  "conflicts": [
8
10
  "auth-mock",
@@ -2,6 +2,8 @@
2
2
  "id": "observability",
3
3
  "name": "Observability",
4
4
  "description": "Structured JSON logging, correlation IDs via AsyncLocalStorage, request logger middleware, /api/health endpoint",
5
+ "provides": "platform.observability",
6
+ "scope": "project",
5
7
  "version": "1.0.0",
6
8
  "requires": [],
7
9
  "conflicts": [],
@@ -39,11 +41,17 @@
39
41
  ".env.observability.example",
40
42
  {
41
43
  "path": "instrumentation.ts",
42
- "when": { "answer": "otel", "equals": true }
44
+ "when": {
45
+ "answer": "otel",
46
+ "equals": true
47
+ }
43
48
  },
44
49
  {
45
50
  "path": ".env.otel.example",
46
- "when": { "answer": "otel", "equals": true }
51
+ "when": {
52
+ "answer": "otel",
53
+ "equals": true
54
+ }
47
55
  }
48
56
  ],
49
57
  "checklist": [
@@ -2,6 +2,8 @@
2
2
  "id": "rate-limiting",
3
3
  "name": "Rate Limiting",
4
4
  "description": "Differentiated middleware (text/image/general), session+IP hybrid identification, configurable limits, debug logging",
5
+ "provides": "platform.rate-limiting",
6
+ "scope": "project",
5
7
  "version": "1.0.0",
6
8
  "requires": ["env-setup"],
7
9
  "conflicts": [],
@@ -3,6 +3,8 @@
3
3
  "name": "Shared Types",
4
4
  "description": "Foundation library shared by every auth template: UserContext domain type, a runtime-overridable MOCK_USER for development, and generic AES-256-GCM session-cookie helpers (including the canonical COOKIE_NAME resolver). Carries no opinion about mock vs. real auth.",
5
5
  "version": "1.0.0",
6
+ "provides": "kernel.user-context",
7
+ "scope": "shared",
6
8
  "requires": ["env-setup"],
7
9
  "conflicts": [],
8
10
  "questions": [
@@ -3,6 +3,8 @@
3
3
  "name": "Supabase",
4
4
  "description": "SSR-safe browser/server/admin clients, Result-based storage helpers, RLS examples, type generation, optional Drizzle ORM and realtime. Pure storage/database layer — no auth code. Add the supabase-auth template to layer @supabase/ssr-based session middleware on top.",
5
5
  "version": "3.0.0",
6
+ "provides": "persistence.out-adapter",
7
+ "scope": "context",
6
8
  "requires": ["env-setup"],
7
9
  "conflicts": [],
8
10
  "questions": [
@@ -3,6 +3,8 @@
3
3
  "name": "Supabase Auth",
4
4
  "description": "Authentication provider built on Supabase: @supabase/ssr root middleware that refreshes the session and protects configured paths, getCurrentUser/requireAuth helpers, and /api/auth/me — all honouring AUTH_MODE=mock as a dev short-circuit. Layer on top of the supabase template.",
5
5
  "version": "1.0.0",
6
+ "provides": "platform.auth",
7
+ "scope": "project",
6
8
  "requires": ["supabase", "shared-types", "auth-mock", "env-setup"],
7
9
  "conflicts": [
8
10
  "nextauth",
@@ -1,5 +1,5 @@
1
1
  export type AppDriver = "next.js" | "fastify" | "express" | "cli";
2
- export type AppFramework = "next.js" | "fastify" | "express" | "plain-ts";
2
+ export type AppFramework = "next.js" | "fastify" | "express" | "plain-ts" | "nitro";
3
3
  export interface App {
4
4
  name: string;
5
5
  driver?: AppDriver;
@@ -16,6 +16,17 @@ export interface AppFrameworkConfig {
16
16
  packageJson?: import("./monorepo.js").FileTemplate;
17
17
  tsConfig?: import("./monorepo.js").TsConfigTemplate;
18
18
  entryPoint?: AppEntryPoint;
19
+ /**
20
+ * Additional root-relative files beyond the single `entryPoint` (e.g. Nitro's
21
+ * `nitro.config.ts`). Each is interpolated and written with the same path
22
+ * containment as `entryPoint`.
23
+ *
24
+ * Like the other fields, a manifest override REPLACES this whole array (no
25
+ * merge): if you override a built-in framework's config and still want its
26
+ * extra files (e.g. keep `nitro.config.ts`), re-include them. Omitting the key
27
+ * keeps the built-in's `extraFiles`; setting `[]` removes them all.
28
+ */
29
+ extraFiles?: AppEntryPoint[];
19
30
  }
20
31
  export interface AppsGeneratorConfig {
21
32
  enabled?: boolean;
@@ -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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B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;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.5.2",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "description": "HexaGen Sync Engine — Generate and sync modular monorepos",
6
6
  "keywords": [