@vyriy/create 0.8.9 → 0.8.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vyriy/create",
3
- "version": "0.8.9",
3
+ "version": "0.8.11",
4
4
  "description": "Vyriy project creation CLI.",
5
5
  "homepage": "https://vyriy.dev/docs/create/",
6
6
  "type": "module",
@@ -13,10 +13,11 @@
13
13
  "vyriy-create": "./bin/index.js"
14
14
  },
15
15
  "dependencies": {
16
- "@vyriy/check": "0.8.9",
17
- "@vyriy/tooling": "0.8.9"
16
+ "@vyriy/check": "0.8.11",
17
+ "@vyriy/tooling": "0.8.11"
18
18
  },
19
19
  "peerDependencies": {
20
+ "@modelcontextprotocol/sdk": "^1.29.0",
20
21
  "@storybook/addon-docs": "^10.4.6",
21
22
  "@storybook/react-webpack5": "^10.4.6",
22
23
  "@testing-library/dom": "^10.4.1",
@@ -27,8 +28,10 @@
27
28
  "cross-env": "^10.1.0",
28
29
  "eslint": "^10.5.0",
29
30
  "graphql": "^16.14.2",
31
+ "html-entities": "^2.6.0",
30
32
  "husky": "^9.1.7",
31
33
  "jest": "^30.4.2",
34
+ "npm-check-updates": "^22.2.7",
32
35
  "npm-run-all2": "^9.0.2",
33
36
  "prettier": "^3.8.4",
34
37
  "react": "^19.2.7",
@@ -40,9 +43,13 @@
40
43
  "tsx": "^4.22.4",
41
44
  "typescript": "^6.0.3",
42
45
  "webpack": "^5.107.2",
43
- "webpack-cli": "^7.0.3"
46
+ "webpack-cli": "^7.0.3",
47
+ "zod": "^4.4.3"
44
48
  },
45
49
  "peerDependenciesMeta": {
50
+ "@modelcontextprotocol/sdk": {
51
+ "optional": true
52
+ },
46
53
  "@storybook/addon-docs": {
47
54
  "optional": true
48
55
  },
@@ -73,12 +80,18 @@
73
80
  "graphql": {
74
81
  "optional": true
75
82
  },
83
+ "html-entities": {
84
+ "optional": true
85
+ },
76
86
  "husky": {
77
87
  "optional": true
78
88
  },
79
89
  "jest": {
80
90
  "optional": true
81
91
  },
92
+ "npm-check-updates": {
93
+ "optional": true
94
+ },
82
95
  "npm-run-all2": {
83
96
  "optional": true
84
97
  },
@@ -114,6 +127,9 @@
114
127
  },
115
128
  "webpack-cli": {
116
129
  "optional": true
130
+ },
131
+ "zod": {
132
+ "optional": true
117
133
  }
118
134
  },
119
135
  "agents": "./AGENTS.md",
package/preset/mcp.js CHANGED
@@ -45,7 +45,7 @@ export const mcp = ({ name, description }) => ({
45
45
  postinstall: 'husky',
46
46
  },
47
47
  dependencies: {
48
- '@modelcontextprotocol/sdk': '^1.29.0',
48
+ '@modelcontextprotocol/sdk': packageJson.peerDependencies['@modelcontextprotocol/sdk'],
49
49
  '@vyriy/typescript-config': `^${packageJson.version}`,
50
50
  typescript: packageJson.peerDependencies.typescript,
51
51
  '@vyriy/prettier-config': `^${packageJson.version}`,
@@ -68,7 +68,7 @@ export const mcp = ({ name, description }) => ({
68
68
  '@vyriy/handler': `^${packageJson.version}`,
69
69
  '@vyriy/router': `^${packageJson.version}`,
70
70
  '@vyriy/server': `^${packageJson.version}`,
71
- zod: '^4.4.3',
71
+ zod: packageJson.peerDependencies.zod,
72
72
  },
73
73
  }, null, 2) + '\n',
74
74
  'README.md': `# MCP
@@ -298,8 +298,8 @@ export default ssr(
298
298
  private: true,
299
299
  type: 'module',
300
300
  dependencies: {
301
- '@modelcontextprotocol/sdk': '^1.29.0',
302
- zod: '^4.4.3',
301
+ '@modelcontextprotocol/sdk': packageJson.peerDependencies['@modelcontextprotocol/sdk'],
302
+ zod: packageJson.peerDependencies.zod,
303
303
  },
304
304
  }, null, 2) + '\n',
305
305
  'workspaces/mcp/types.ts': `import type { z } from 'zod';
package/preset/mfe.js CHANGED
@@ -181,7 +181,16 @@ const projectFiles = {
181
181
  'workspaces/api/doc.mdx': "import { Meta, Markdown } from '@storybook/addon-docs/blocks';\nimport ReadMe from './README.md?raw';\n\n<Meta title=\"Workspaces/API\" />\n\n<Markdown>{ReadMe}</Markdown>\n",
182
182
  'workspaces/api/index.test.ts': "import { describe, expect, it, jest } from '@jest/globals';\nimport type { APIGatewayProxyEvent, RouterHandler } from '@vyriy/router';\n\nconst apiMock = jest.fn(\n (handler: RouterHandler): RouterHandler =>\n (event: APIGatewayProxyEvent) => {\n if (event.path === '/healthcheck') {\n return Promise.resolve({\n body: JSON.stringify({\n message: 'OK',\n }),\n statusCode: 200,\n });\n }\n\n return handler(event);\n },\n);\nconst serverMock = jest.fn();\n\njest.mock('@vyriy/handler', () => ({\n api: apiMock,\n}));\n\njest.mock('@vyriy/server', () => ({\n server: serverMock,\n}));\n\ndescribe('workspaces/api/index.ts', () => {\n const getEvent = (\n path: string,\n queryStringParameters: APIGatewayProxyEvent['queryStringParameters'] = null,\n ): APIGatewayProxyEvent =>\n ({\n body: null,\n headers: {},\n httpMethod: 'GET',\n path,\n pathParameters: null,\n queryStringParameters,\n }) as APIGatewayProxyEvent;\n\n it('starts the server with the API router handler', async () => {\n process.env.MODE = 'open';\n process.env.TAG = 'vyriy-profile-card';\n process.env.API = 'http://localhost:3000';\n process.env.UI = 'http://localhost:3002';\n\n await import('./index.js');\n\n expect(apiMock).toHaveBeenCalledTimes(1);\n expect(serverMock).toHaveBeenCalledTimes(1);\n expect(serverMock).toHaveBeenCalledWith(apiMock.mock.results[0]?.value);\n\n const handler = apiMock.mock.results[0]?.value as RouterHandler;\n\n await expect(handler(getEvent('/'))).resolves.toEqual({\n body: expect.stringContaining('<vyriy-profile-card'),\n headers: {\n 'access-control-allow-origin': '*',\n 'cache-control': 'public, max-age=300, s-maxage=3600, stale-while-revalidate=86400',\n 'content-type': 'text/html; charset=utf-8',\n 'x-content-type-options': 'nosniff',\n },\n isBase64Encoded: undefined,\n multiValueHeaders: undefined,\n statusCode: 200,\n });\n\n await expect(handler(getEvent('/prerender'))).resolves.toEqual({\n body: JSON.stringify({\n message: 'Query parameter \"name\" is required.',\n }),\n headers: undefined,\n isBase64Encoded: undefined,\n multiValueHeaders: undefined,\n statusCode: 400,\n });\n\n const prerenderResponse = await handler(\n getEvent('/prerender', {\n description: 'Profile description',\n name: 'Name',\n tags: 'one, two',\n title: 'Title',\n }),\n );\n\n expect(prerenderResponse).toEqual({\n body: expect.stringContaining('Name'),\n headers: {\n 'access-control-allow-origin': '*',\n 'cache-control': 'public, max-age=300, s-maxage=3600, stale-while-revalidate=86400',\n 'content-type': 'text/html; charset=utf-8',\n 'x-content-type-options': 'nosniff',\n },\n isBase64Encoded: undefined,\n multiValueHeaders: undefined,\n statusCode: 200,\n });\n expect(prerenderResponse.body).toContain('shadowrootmode=\"open\"');\n expect(prerenderResponse.body).toContain('http://localhost:3002/main.css');\n\n await expect(handler(getEvent('/semantic', { name: 'Name' }))).resolves.toEqual({\n body: JSON.stringify({\n '@context': 'https://schema.org',\n '@type': 'Person',\n name: 'Name',\n }),\n headers: {\n 'access-control-allow-origin': '*',\n 'cache-control': 'public, max-age=300, s-maxage=3600, stale-while-revalidate=86400',\n 'content-type': 'application/ld+json; charset=utf-8',\n 'x-content-type-options': 'nosniff',\n },\n isBase64Encoded: undefined,\n multiValueHeaders: undefined,\n statusCode: 200,\n });\n\n await expect(handler(getEvent('/semantic'))).resolves.toEqual({\n body: JSON.stringify({\n message: 'Query parameter \"name\" is required.',\n }),\n headers: undefined,\n isBase64Encoded: undefined,\n multiValueHeaders: undefined,\n statusCode: 400,\n });\n\n await expect(handler(getEvent('/manifest.yml'))).resolves.toEqual({\n body: expect.stringContaining(\"name: 'Vyriy Profile Card'\"),\n headers: {\n 'access-control-allow-origin': '*',\n 'cache-control': 'public, max-age=300, s-maxage=3600, stale-while-revalidate=86400',\n 'content-type': 'text/yaml; charset=utf-8',\n 'x-content-type-options': 'nosniff',\n },\n isBase64Encoded: undefined,\n multiValueHeaders: undefined,\n statusCode: 200,\n });\n\n await expect(handler(getEvent('/healthcheck'))).resolves.toEqual({\n body: JSON.stringify({\n message: 'OK',\n }),\n statusCode: 200,\n });\n });\n});\n",
183
183
  'workspaces/api/index.ts': "import { server } from '@vyriy/server';\nimport { api } from '@vyriy/handler';\nimport { createRouter } from '@vyriy/router';\nimport { minify } from '@vyriy/html';\nimport { withStatic } from '@vyriy/static';\nimport { path } from '@vyriy/path';\n\nimport { demo, manifest, prerender, semantic } from '@p/api';\nimport { parseProfileCardQuery } from '@p/query';\n\nserver(\n api(async (event) =>\n withStatic(createRouter())\n .get('/', () => ({\n body: minify(demo()),\n headers: {\n 'content-type': 'text/html; charset=utf-8',\n 'cache-control': 'public, max-age=300, s-maxage=3600, stale-while-revalidate=86400',\n 'access-control-allow-origin': '*',\n 'x-content-type-options': 'nosniff',\n },\n }))\n .get('/prerender', ({ query }) => {\n const profileCard = parseProfileCardQuery(query);\n\n if (!profileCard) {\n return {\n statusCode: 400,\n body: JSON.stringify({ message: 'Query parameter \"name\" is required.' }),\n };\n }\n\n return {\n body: minify(prerender(profileCard)),\n headers: {\n 'content-type': 'text/html; charset=utf-8',\n 'cache-control': 'public, max-age=300, s-maxage=3600, stale-while-revalidate=86400',\n 'access-control-allow-origin': '*',\n 'x-content-type-options': 'nosniff',\n },\n };\n })\n .get('/semantic', ({ query }) => {\n const profileCard = parseProfileCardQuery(query);\n\n if (!profileCard) {\n return {\n statusCode: 400,\n body: JSON.stringify({ message: 'Query parameter \"name\" is required.' }),\n };\n }\n\n return {\n body: semantic(profileCard),\n headers: {\n 'content-type': 'application/ld+json; charset=utf-8',\n 'cache-control': 'public, max-age=300, s-maxage=3600, stale-while-revalidate=86400',\n 'access-control-allow-origin': '*',\n 'x-content-type-options': 'nosniff',\n },\n };\n })\n .get('/manifest.yml', () => ({\n body: manifest(),\n headers: {\n 'content-type': 'text/yaml; charset=utf-8',\n 'cache-control': 'public, max-age=300, s-maxage=3600, stale-while-revalidate=86400',\n 'access-control-allow-origin': '*',\n 'x-content-type-options': 'nosniff',\n },\n }))\n .static('/ui', path('ui'))\n .route(event),\n ),\n);\n",
184
- 'workspaces/api/package.json': '{\n "name": "@w/api",\n "type": "module",\n "private": true,\n "dependencies": {\n "html-entities": "^2.6.0",\n "react": "^19.2.7",\n "react-dom": "^19.2.7"\n }\n}\n',
184
+ 'workspaces/api/package.json': JSON.stringify({
185
+ name: '@w/api',
186
+ type: 'module',
187
+ private: true,
188
+ dependencies: {
189
+ 'html-entities': packageJson.peerDependencies['html-entities'],
190
+ react: packageJson.peerDependencies.react,
191
+ 'react-dom': packageJson.peerDependencies['react-dom'],
192
+ },
193
+ }, null, 2) + '\n',
185
194
  'workspaces/api/webpack.config.ts': "import { EnvironmentPlugin } from 'webpack';\nimport { path } from '@vyriy/path';\nimport { ssr, external } from '@vyriy/webpack-config';\n\nexport default ssr(\n '@w/api',\n {\n path: path('dist'),\n filename: 'index.js',\n library: { type: 'commonjs2' },\n },\n (config) => ({\n ...config,\n externals: [external({ allowlist: [/^@p/, /^@w/, /^@vyriy/] })],\n plugins: [\n ...(config.plugins ?? []),\n new EnvironmentPlugin([\n 'API',\n 'MODE',\n 'TAG',\n 'UI',\n ]),\n ],\n }),\n);\n",
186
195
  'workspaces/env.sh': '#!/usr/bin/env sh\n\n: "${API_PORT:=3000}"\n: "${UI_PORT:=3002}"\n: "${API:=http://localhost:$API_PORT}"\n: "${UI:=http://localhost:$UI_PORT}"\n: "${TAG:=vyriy-profile-card}"\n: "${MODE:=open}"\n\nexport API_PORT\nexport UI_PORT\nexport API\nexport UI\nexport TAG\nexport MODE\n',
187
196
  'workspaces/ui/README.md': '# UI\n\nBrowser workspace for the `vyriy-profile-card` custom element.\n\n## Runtime\n\nThe entry point registers the custom element and renders `ProfileCard` inside its shadow root. The element reads these attributes:\n\n- `name`\n- `title`\n- `description`\n- `avatarUrl`\n- `tags`, as a JSON string array\n\nClicking the rendered profile card dispatches `vyriy-profile-card.select` and `openmfe.analytics`.\n\n## Local Development\n\n```bash\nyarn start:ui\n```\n\nThe start script loads `workspaces/env.sh`, starts webpack dev server on `UI_PORT`, and opens the generated demo page.\n\nDefault local URL:\n\n```text\nhttp://localhost:3002\n```\n\n## Build\n\n```bash\nyarn build:ui\n```\n\nThe build writes `index.js`, `main.css`, public UI assets, and the generated demo HTML into `dist/ui`.\n',
@@ -267,10 +276,10 @@ export const mfe = (options) => ({
267
276
  '@vyriy/webpack-config': `^${packageJson.version}`,
268
277
  'cross-env': packageJson.peerDependencies['cross-env'],
269
278
  eslint: packageJson.peerDependencies['eslint'],
270
- 'html-entities': '^2.6.0',
279
+ 'html-entities': packageJson.peerDependencies['html-entities'],
271
280
  husky: packageJson.peerDependencies['husky'],
272
281
  jest: packageJson.peerDependencies['jest'],
273
- 'npm-check-updates': '^22.2.3',
282
+ 'npm-check-updates': packageJson.peerDependencies['npm-check-updates'],
274
283
  'npm-run-all2': packageJson.peerDependencies['npm-run-all2'],
275
284
  prettier: packageJson.peerDependencies['prettier'],
276
285
  react: packageJson.peerDependencies['react'],