@vertesia/create-plugin 0.80.0-dev.20251121 → 0.81.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 (123) hide show
  1. package/README.md +123 -66
  2. package/lib/configuration.d.ts +63 -0
  3. package/lib/configuration.d.ts.map +1 -0
  4. package/lib/configuration.js +72 -0
  5. package/lib/configuration.js.map +1 -0
  6. package/lib/download-template.d.ts +5 -0
  7. package/lib/download-template.d.ts.map +1 -0
  8. package/lib/download-template.js +33 -0
  9. package/lib/download-template.js.map +1 -0
  10. package/lib/index.d.ts +9 -0
  11. package/lib/index.d.ts.map +1 -0
  12. package/lib/index.js +182 -0
  13. package/lib/index.js.map +1 -0
  14. package/lib/package-manager.d.ts +11 -0
  15. package/lib/package-manager.d.ts.map +1 -0
  16. package/lib/package-manager.js +83 -0
  17. package/lib/package-manager.js.map +1 -0
  18. package/lib/post-install.d.ts +11 -0
  19. package/lib/post-install.d.ts.map +1 -0
  20. package/lib/post-install.js +144 -0
  21. package/lib/post-install.js.map +1 -0
  22. package/lib/process-template.d.ts +30 -0
  23. package/lib/process-template.d.ts.map +1 -0
  24. package/lib/process-template.js +233 -0
  25. package/lib/process-template.js.map +1 -0
  26. package/lib/prompts.d.ts +6 -0
  27. package/lib/prompts.d.ts.map +1 -0
  28. package/lib/prompts.js +97 -0
  29. package/lib/prompts.js.map +1 -0
  30. package/lib/template-config.d.ts +139 -0
  31. package/lib/template-config.d.ts.map +1 -0
  32. package/lib/template-config.js +23 -0
  33. package/lib/template-config.js.map +1 -0
  34. package/lib/template-selector.d.ts +7 -0
  35. package/lib/template-selector.d.ts.map +1 -0
  36. package/lib/template-selector.js +56 -0
  37. package/lib/template-selector.js.map +1 -0
  38. package/lib/transforms.d.ts +37 -0
  39. package/lib/transforms.d.ts.map +1 -0
  40. package/lib/transforms.js +87 -0
  41. package/lib/transforms.js.map +1 -0
  42. package/package.json +22 -32
  43. package/bin/create-plugin.mjs +0 -2
  44. package/lib/Package.d.ts +0 -42
  45. package/lib/Package.d.ts.map +0 -1
  46. package/lib/Package.js +0 -52
  47. package/lib/Package.js.map +0 -1
  48. package/lib/TemplateInit.d.ts +0 -30
  49. package/lib/TemplateInit.d.ts.map +0 -1
  50. package/lib/TemplateInit.js +0 -48
  51. package/lib/TemplateInit.js.map +0 -1
  52. package/lib/ToolTemplateInit.d.ts +0 -10
  53. package/lib/ToolTemplateInit.d.ts.map +0 -1
  54. package/lib/ToolTemplateInit.js +0 -58
  55. package/lib/ToolTemplateInit.js.map +0 -1
  56. package/lib/WebTemplateInit.d.ts +0 -10
  57. package/lib/WebTemplateInit.d.ts.map +0 -1
  58. package/lib/WebTemplateInit.js +0 -68
  59. package/lib/WebTemplateInit.js.map +0 -1
  60. package/lib/copy.d.ts +0 -12
  61. package/lib/copy.d.ts.map +0 -1
  62. package/lib/copy.js +0 -45
  63. package/lib/copy.js.map +0 -1
  64. package/lib/deps.d.ts +0 -3
  65. package/lib/deps.d.ts.map +0 -1
  66. package/lib/deps.js +0 -20
  67. package/lib/deps.js.map +0 -1
  68. package/lib/hasBin.d.ts +0 -2
  69. package/lib/hasBin.d.ts.map +0 -1
  70. package/lib/hasBin.js +0 -14
  71. package/lib/hasBin.js.map +0 -1
  72. package/lib/init.d.ts +0 -2
  73. package/lib/init.d.ts.map +0 -1
  74. package/lib/init.js +0 -124
  75. package/lib/init.js.map +0 -1
  76. package/lib/main.d.ts +0 -2
  77. package/lib/main.d.ts.map +0 -1
  78. package/lib/main.js +0 -8
  79. package/lib/main.js.map +0 -1
  80. package/lib/template.d.ts +0 -4
  81. package/lib/template.d.ts.map +0 -1
  82. package/lib/template.js +0 -16
  83. package/lib/template.js.map +0 -1
  84. package/lib/types.d.ts +0 -12
  85. package/lib/types.d.ts.map +0 -1
  86. package/lib/types.js +0 -20
  87. package/lib/types.js.map +0 -1
  88. package/lib/utils.d.ts +0 -2
  89. package/lib/utils.d.ts.map +0 -1
  90. package/lib/utils.js +0 -7
  91. package/lib/utils.js.map +0 -1
  92. package/templates/tool/.env.example +0 -6
  93. package/templates/tool/.vscode/launch.json +0 -24
  94. package/templates/tool/README.md +0 -190
  95. package/templates/tool/api/index.ts +0 -8
  96. package/templates/tool/gitignore +0 -26
  97. package/templates/tool/rollup.config.js +0 -30
  98. package/templates/tool/src/collections/example/icon.svg.ts +0 -6
  99. package/templates/tool/src/collections/example/index.ts +0 -14
  100. package/templates/tool/src/collections/example/weather/WeatherTool.ts +0 -32
  101. package/templates/tool/src/collections/example/weather/manifest.ts +0 -16
  102. package/templates/tool/src/collections/index.ts +0 -7
  103. package/templates/tool/src/index.ts +0 -5
  104. package/templates/tool/src/server.ts +0 -71
  105. package/templates/tool/tsconfig.json +0 -24
  106. package/templates/tool/vite.config.js +0 -48
  107. package/templates/web/README.md +0 -156
  108. package/templates/web/eslint.config.js +0 -29
  109. package/templates/web/gitignore +0 -25
  110. package/templates/web/index.html.tmpl +0 -26
  111. package/templates/web/src/app.tsx +0 -8
  112. package/templates/web/src/assets.ts +0 -26
  113. package/templates/web/src/env.ts.tmpl +0 -14
  114. package/templates/web/src/index.css +0 -21
  115. package/templates/web/src/main.tsx.tmpl +0 -21
  116. package/templates/web/src/pages.tsx +0 -31
  117. package/templates/web/src/plugin.tsx.tmpl +0 -18
  118. package/templates/web/src/routes.tsx +0 -17
  119. package/templates/web/src/vite-env.d.ts +0 -1
  120. package/templates/web/tsconfig.app.json +0 -51
  121. package/templates/web/tsconfig.json +0 -7
  122. package/templates/web/tsconfig.node.json +0 -27
  123. package/templates/web/vite.config.ts.tmpl +0 -128
@@ -1,190 +0,0 @@
1
- # Tool Collections
2
-
3
- This project contains custom tool collections for Vertesia.
4
-
5
- ## Project Structure
6
-
7
- ```txt
8
- src/
9
- ├── collections/ # Tool collections
10
- │ ├── example/ # Example collection
11
- │ │ ├── icon.svg.ts # Collection icon
12
- │ │ ├── index.ts # Collection definition
13
- │ │ └── weather/ # Weather tool
14
- │ │ ├── manifest.ts # Tool schema/metadata
15
- │ │ └── WeatherTool.ts # Tool implementation
16
- │ └── index.ts # Export all collections
17
- ├── server.ts # Hono server with collection endpoints
18
- └── index.ts # Main exports
19
- ```
20
-
21
- ## Development
22
-
23
- Start the development server:
24
-
25
- ```bash
26
- pnpm install
27
- pnpm dev
28
- ```
29
-
30
- The server will be available at `http://localhost:5174/api`
31
-
32
- ### API Endpoints
33
-
34
- - `GET /api` - List all collections
35
- - `GET /api/{collection}` - Get collection metadata and tool definitions
36
- - `POST /api/{collection}` - Execute a tool in the collection
37
-
38
- ### Testing the API
39
-
40
- Get the example collection tools:
41
-
42
- ```bash
43
- curl http://localhost:5174/api/example
44
- ```
45
-
46
- Execute the weather tool:
47
-
48
- ```bash
49
- curl -X POST http://localhost:5174/api/example \
50
- -H "Content-Type: application/json" \
51
- -H "Authorization: Bearer YOUR_TOKEN" \
52
- -d '{
53
- "tool_use": {
54
- "id": "test-123",
55
- "tool_name": "weather",
56
- "tool_input": {
57
- "location": "New York, NY"
58
- }
59
- }
60
- }'
61
- ```
62
-
63
- ## Creating New Tools
64
-
65
- ### 1. Create a new tool in an existing collection
66
-
67
- 1. Create a new directory under `src/collections/example/` (e.g., `my-tool/`)
68
- 2. Create `manifest.ts` with your tool's schema
69
- 3. Create `MyTool.ts` with the implementation
70
- 4. Add the tool to `src/collections/example/index.ts`
71
-
72
- ### 2. Create a new collection
73
-
74
- 1. Create a new directory under `src/collections/` (e.g., `my-collection/`)
75
- 2. Create `icon.svg.ts` with an SVG icon
76
- 3. Create `index.ts` to define the collection
77
- 4. Add your tools in subdirectories
78
- 5. Export the collection in `src/collections/index.ts`
79
-
80
- ## Authentication
81
-
82
- Tools receive authentication context through the `ToolExecutionContext` parameter:
83
-
84
- ```typescript
85
- export async function myTool(
86
- payload: ToolExecutionPayload<MyToolParams>,
87
- context: ToolExecutionContext
88
- ) {
89
- // Access the decoded JWT token
90
- const userId = context.payload.sub;
91
-
92
- // Get a Vertesia client instance
93
- const client = await context.getClient();
94
-
95
- // Your tool logic here
96
- return {
97
- is_error: false,
98
- content: "Tool result"
99
- };
100
- }
101
- ```
102
-
103
- ## Building for Production
104
-
105
- Build the project:
106
-
107
- ```bash
108
- pnpm build
109
- ```
110
-
111
- This creates an optimized build in the `dist/` directory.
112
-
113
- ## Deployment
114
-
115
- Your Agent Tool Server can be deployed to various platforms. The server is built with Hono, which supports multiple runtimes including Node.js, Vercel Edge Functions, Cloudflare Workers, AWS Lambda, and more.
116
-
117
- For detailed guides on deploying to different platforms, visit the [Hono documentation](https://hono.dev/docs/). The documentation provides comprehensive examples for various deployment targets and runtimes.
118
-
119
- ### Deploying to Vercel (Example)
120
-
121
- This section demonstrates deploying to Vercel as an example, since Vercel offers a generous free tier and simple deployment process. The project includes `api/index.ts` which serves as the entry point for Vercel deployment using the Hono Vercel adapter. Vercel automatically detects and configures the Edge Function.
122
-
123
- #### Setup
124
-
125
- Install the Vercel CLI globally:
126
-
127
- ```bash
128
- npm i -g vercel
129
- ```
130
-
131
- #### Deployment Steps
132
-
133
- 1. **Login to Vercel**:
134
-
135
- ```bash
136
- vercel login
137
- ```
138
-
139
- 2. **Deploy to preview**:
140
-
141
- ```bash
142
- vercel
143
- ```
144
-
145
- This will create a preview deployment and provide you with a URL to test your tool server.
146
-
147
- 3. **Deploy to production**:
148
-
149
- ```bash
150
- vercel --prod
151
- ```
152
-
153
- Your tool server will be available at `https://your-project.vercel.app/api`
154
-
155
- For more information, visit the [Vercel CLI documentation](https://vercel.com/docs/cli).
156
-
157
- #### Verify Your Deployment
158
-
159
- Test that your server is responding correctly:
160
-
161
- ```bash
162
- curl https://your-project.vercel.app/api
163
- ```
164
-
165
- You should see a JSON response with the API information and available endpoints.
166
-
167
- #### Configure Your Tool Server in Vertesia
168
-
169
- After deploying to Vercel, update your app manifest to point to the deployed URL using the vertesia CLI:
170
-
171
- ```bash
172
- vertesia apps update <appId> --manifest '{
173
- "name": "my-app",
174
- "title": "My App",
175
- "description": "A sample app",
176
- "publisher": "your-org",
177
- "private": true,
178
- "status": "beta",
179
- "tool_collections": [
180
- "https://your-app.vercel.app/api/example"
181
- ],
182
- }'
183
- ```
184
-
185
- Replace `appId` by the actual ID and `https://your-app.vercel.app` with your actual Vercel deployment URL.
186
-
187
- ## Learn More
188
-
189
- - [Vertesia Documentation](https://docs.vertesiahq.com)
190
- - [Tool SDK Reference](https://github.com/vertesia/composableai/tree/main/packages/tools-sdk)
@@ -1,8 +0,0 @@
1
- import app from '../src/server';
2
- import { handle } from 'hono/vercel';
3
-
4
- export const config = {
5
- runtime: 'edge', // enables edge function runtime
6
- };
7
-
8
- export default handle(app);
@@ -1,26 +0,0 @@
1
- # Dependencies
2
-
3
- node_modules/
4
-
5
- # Build output
6
-
7
- dist/
8
- lib/
9
- \*.tsbuildinfo
10
-
11
- # Environment
12
-
13
- .env
14
- .env.local
15
-
16
- # IDE
17
-
18
- .vscode/
19
- .idea/
20
- _.swp
21
- _.swo
22
-
23
- # OS
24
-
25
- .DS_Store
26
- Thumbs.db
@@ -1,30 +0,0 @@
1
- import commonjs from '@rollup/plugin-commonjs';
2
- import json from '@rollup/plugin-json';
3
- import resolve from '@rollup/plugin-node-resolve';
4
-
5
- export default {
6
- input: './dist/server.js',
7
- output: {
8
- file: './dist/bundle.js',
9
- format: 'es',
10
- sourcemap: false
11
- },
12
- plugins: [
13
- resolve({
14
- preferBuiltins: true,
15
- exportConditions: ['node']
16
- }),
17
- commonjs(),
18
- json()
19
- ],
20
- external: [
21
- // Keep these as external dependencies
22
- 'hono',
23
- 'jose',
24
- 'dotenv',
25
- '@vertesia/client',
26
- '@vertesia/common',
27
- '@vertesia/tools-sdk',
28
- '@hono/node-server'
29
- ]
30
- };
@@ -1,6 +0,0 @@
1
- // Simple SVG icon for the collection
2
- // You can replace this with your own icon
3
- export const icon = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4
- <circle cx="12" cy="12" r="10"/>
5
- <path d="M12 6v6l4 2"/>
6
- </svg>`;
@@ -1,14 +0,0 @@
1
- import { ToolCollection } from "@vertesia/tools-sdk";
2
- import { icon } from "./icon.svg.js";
3
- import { WeatherTool } from "./weather/WeatherTool.js";
4
-
5
- export const ExampleCollection = new ToolCollection({
6
- name: "example",
7
- title: "Example Tools",
8
- description: "A collection of example tools to get you started",
9
- icon,
10
- tools: [
11
- WeatherTool
12
- // Add more tools here
13
- ]
14
- });
@@ -1,32 +0,0 @@
1
- import type { Tool, ToolExecutionPayload, ToolExecutionContext } from "@vertesia/tools-sdk";
2
- import manifest from "./manifest.js";
3
- import { ToolResultContent } from "@vertesia/common";
4
-
5
- interface WeatherToolParams {
6
- location: string;
7
- }
8
-
9
- // Tool implementation function
10
- export async function weather(
11
- payload: ToolExecutionPayload<WeatherToolParams>,
12
- context: ToolExecutionContext
13
- ) {
14
- const { location } = payload.tool_use.tool_input!;
15
-
16
- console.log(`Caller: ${context.payload.user_id}`);
17
-
18
- // Simulate fetching weather data
19
- // In a real implementation, you would call a weather API here
20
- // You can use context.getClient() to access Vertesia services if needed
21
-
22
- return {
23
- is_error: false,
24
- content: `The current weather in ${location} is sunny with a temperature of 75°F.`
25
- } satisfies ToolResultContent;
26
- }
27
-
28
- // Export the complete tool with manifest and implementation
29
- export const WeatherTool = {
30
- ...manifest,
31
- run: weather
32
- } satisfies Tool<WeatherToolParams>;
@@ -1,16 +0,0 @@
1
- import { ToolDefinition } from "@vertesia/tools-sdk";
2
-
3
- export default {
4
- name: "weather",
5
- description: "Get the current weather for a given location.",
6
- input_schema: {
7
- type: "object",
8
- properties: {
9
- location: {
10
- type: "string",
11
- description: "The location to get the weather for, e.g., 'New York, NY'."
12
- }
13
- },
14
- required: ["location"]
15
- },
16
- } satisfies ToolDefinition;
@@ -1,7 +0,0 @@
1
- import { ExampleCollection } from "./example/index.js";
2
-
3
- // Export all your tool collections here
4
- export const collections = [
5
- ExampleCollection
6
- // Add more collections as you create them
7
- ];
@@ -1,5 +0,0 @@
1
- // Export collections for use in other modules or for programmatic access
2
- export { collections } from "./collections/index.js";
3
-
4
- // Export server as default for deployment
5
- export { default } from "./server.js";
@@ -1,71 +0,0 @@
1
- import { ToolCollection } from "@vertesia/tools-sdk";
2
- import { Context, Hono } from "hono";
3
- import { cors } from "hono/cors";
4
- import { collections } from "./collections/index.js";
5
- import { HTTPException } from "hono/http-exception";
6
-
7
- function createServer(collections: ToolCollection[], prefix = '/api') {
8
- prefix = prefix.trim();
9
- const app = new Hono();
10
-
11
- // Add CORS middleware globally
12
- app.use('*', cors({ origin: '*', allowMethods: ['GET', 'POST', 'OPTIONS'] }));
13
-
14
- // Add base API route
15
- app.get(prefix, (c) => {
16
- return c.json({
17
- message: 'Tool Collections API',
18
- version: '1.0.0',
19
- endpoints: {
20
- collections: collections.map(col => `${prefix}/${col.name}`)
21
- }
22
- });
23
- });
24
-
25
- // Create endpoints for tool collections
26
- for (const col of collections) {
27
- app.route(`${prefix}/${col.name}`, createCollectionEndpoints(col));
28
- }
29
-
30
- // Global error handler
31
- app.onError((err, c) => {
32
- if (err instanceof HTTPException) {
33
- return c.json({
34
- error: err.message,
35
- }, err.status);
36
- }
37
- console.error('Uncaught Error:', err);
38
- return c.json({
39
- error: 'Internal Server Error',
40
- }, 500)
41
- })
42
-
43
- return app;
44
- }
45
-
46
- const server = createServer(collections);
47
-
48
- export default server;
49
-
50
- /**
51
- * Create endpoints for a tool collection
52
- */
53
- function createCollectionEndpoints(coll: ToolCollection) {
54
- const endpoint = new Hono();
55
-
56
- // POST endpoint to execute tools
57
- endpoint.post('/', (c: Context) => {
58
- return coll.execute(c);
59
- });
60
-
61
- // GET endpoint to retrieve collection metadata and tool definitions
62
- endpoint.get('/', (c) => {
63
- return c.json({
64
- title: coll.title || coll.name,
65
- description: coll.description,
66
- tools: coll.getToolDefinitions()
67
- });
68
- });
69
-
70
- return endpoint;
71
- }
@@ -1,24 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "moduleResolution": "Bundler",
6
- "esModuleInterop": true,
7
- "strict": true,
8
- "skipLibCheck": true,
9
- "resolveJsonModule": true,
10
- "allowSyntheticDefaultImports": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "noUnusedLocals": true,
13
- "noUnusedParameters": true,
14
- "noImplicitReturns": true,
15
- "outDir": "dist"
16
- },
17
- "include": [
18
- "src/**/*"
19
- ],
20
- "exclude": [
21
- "node_modules",
22
- "dist"
23
- ]
24
- }
@@ -1,48 +0,0 @@
1
- import devServer from '@hono/vite-dev-server';
2
- import { defineConfig, loadEnv } from 'vite';
3
-
4
- export default defineConfig(({ mode }) => {
5
- // Load env files
6
- const env = loadEnv(mode, process.cwd(), '');
7
-
8
- // Dev config
9
- if (mode === 'development') {
10
- return {
11
- plugins: [
12
- devServer({
13
- prefix: '/api', // mount the tool endpoints under /api
14
- entry: './src/server.ts',
15
- }),
16
- ],
17
- }
18
- }
19
-
20
- // Build config
21
- return {
22
- build: {
23
- minify: false,
24
- lib: {
25
- entry: {
26
- server: './src/server.ts',
27
- },
28
- formats: ['es']
29
- },
30
- rollupOptions: {
31
- external: (id) => {
32
- // Keep relative imports as part of the bundle
33
- if (id.startsWith('.') || id.startsWith('/')) {
34
- return false;
35
- }
36
- // Externalize all node modules and absolute imports
37
- return true;
38
- },
39
- output: {
40
- preserveModules: true,
41
- preserveModulesRoot: 'src',
42
- entryFileNames: '[name].js'
43
- }
44
- },
45
- outDir: 'dist'
46
- },
47
- }
48
- });
@@ -1,156 +0,0 @@
1
- # Vertesia Custom App Sample
2
-
3
- A sample project demonstrating how to build a custom app/plugin for the Vertesia platform using React, TypeScript, and Vite.
4
-
5
- ## Overview
6
-
7
- This project serves as a template for building Vertesia plugins that can be integrated into the Vertesia platform. It includes:
8
-
9
- - React 19 with TypeScript for type-safe component development
10
- - Tailwind CSS for styling
11
- - Vite for fast development and optimized builds
12
- - Dual build modes: standalone app and plugin library
13
-
14
- ## Project Structure
15
-
16
- ```txt
17
- src/
18
- ├── app.tsx # Main app component with router
19
- ├── plugin.tsx # Plugin entry point for Vertesia integration
20
- ├── routes.tsx # Application route definitions
21
- ├── pages.tsx # Page components
22
- └── main.tsx # Dev mode entry point
23
- ```
24
-
25
- ## Getting Started
26
-
27
- ### Installation
28
-
29
- ```bash
30
- pnpm install
31
- ```
32
-
33
- ### Development
34
-
35
- Run the app in development mode with hot module replacement:
36
-
37
- ```bash
38
- pnpm dev
39
- ```
40
-
41
- The app will be available at `https://localhost:5173`.
42
-
43
- ### Building
44
-
45
- Build both standalone app and plugin library:
46
-
47
- ```bash
48
- pnpm build
49
- ```
50
-
51
- Or build individually:
52
-
53
- ```bash
54
- # Build standalone app
55
- pnpm build:app
56
-
57
- # Build plugin library
58
- pnpm build:lib
59
- ```
60
-
61
- The plugin library will be output to the `dist/lib/` directory.
62
-
63
- ## Deployment
64
-
65
- Since this is a standard web application, you can deploy it to any static hosting provider (Vercel, Netlify, Cloudflare Pages, AWS S3, etc.).
66
-
67
- ### Deploying to Vercel
68
-
69
- Vercel is a practical deployment option with a generous free tier. You can very simply deploy your standalone app using the Vercel CLI.
70
-
71
- #### Setup
72
-
73
- Install the Vercel CLI globally:
74
-
75
- ```bash
76
- npm i -g vercel
77
- ```
78
-
79
- #### Deployment Steps
80
-
81
- 1. **Login to Vercel**:
82
-
83
- ```bash
84
- vercel login
85
- ```
86
-
87
- 2. **Deploy to preview**:
88
-
89
- ```bash
90
- vercel
91
- ```
92
-
93
- This will create a preview deployment and provide you with a URL to test your app.
94
-
95
- 3. **Deploy to production**:
96
-
97
- ```bash
98
- vercel --prod
99
- ```
100
-
101
- For more information, visit the [Vercel CLI documentation](https://vercel.com/docs/cli).
102
-
103
- #### Update App Manifest with Deployment URL
104
-
105
- After deploying to Vercel, update your app manifest to point to the deployed URL using the vertesia CLI:
106
-
107
- ```bash
108
- vertesia apps update <appId> --manifest '{
109
- "name": "my-app",
110
- "title": "My App",
111
- "description": "A sample app",
112
- "publisher": "your-org",
113
- "private": true,
114
- "status": "beta",
115
- "ui": {
116
- "src": "https://your-app.vercel.app/lib/plugin.js",
117
- "isolation": "shadow"
118
- }
119
- }'
120
- ```
121
-
122
- Replace `appId` by the actual ID and `https://your-app.vercel.app` with your actual Vercel deployment URL.
123
-
124
- ## Key Features
125
-
126
- ### Dual Build Modes
127
-
128
- - **App Mode**: Builds a standalone application for development and testing
129
- - **Library Mode**: Builds a plugin that can be integrated into the Vertesia platform
130
-
131
- ### External Dependencies
132
-
133
- When building as a plugin, React and Vertesia dependencies are externalized to prevent duplication:
134
-
135
- - `react` / `react-dom`
136
- - `@vertesia/common`
137
- - `@vertesia/ui`
138
-
139
- ## Tech Stack
140
-
141
- - **React 19** - UI framework
142
- - **TypeScript** - Type safety
143
- - **Vite** - Build tool and dev server
144
- - **Tailwind CSS 4** - Styling
145
- - **@vertesia/ui** - Vertesia UI components
146
- - **@vertesia/plugin-builder** - Plugin build utilities
147
-
148
- ## Development Notes
149
-
150
- - The dev server uses HTTPS (via `@vitejs/plugin-basic-ssl`)
151
- - CSS can be inlined in the plugin bundle or kept separate (configured in [vite.config.ts](vite.config.ts))
152
- - For debugging Vertesia UI sources, set `VERTESIA_UI_PATH` in [vite.config.ts](vite.config.ts)
153
-
154
- ## License
155
-
156
- See package.json for license information.
@@ -1,29 +0,0 @@
1
- import js from '@eslint/js'
2
- import globals from 'globals'
3
- import reactHooks from 'eslint-plugin-react-hooks'
4
- import reactRefresh from 'eslint-plugin-react-refresh'
5
- import tseslint from 'typescript-eslint'
6
- import { defineConfig } from 'eslint/config';
7
-
8
- export default defineConfig(
9
- { ignores: ['dist'] },
10
- {
11
- extends: [js.configs.recommended, ...tseslint.configs.recommended],
12
- files: ['**/*.{ts,tsx}'],
13
- languageOptions: {
14
- ecmaVersion: 2020,
15
- globals: globals.browser,
16
- },
17
- plugins: {
18
- 'react-hooks': reactHooks,
19
- 'react-refresh': reactRefresh,
20
- },
21
- rules: {
22
- ...reactHooks.configs.recommended.rules,
23
- 'react-refresh/only-export-components': [
24
- 'warn',
25
- { allowConstantExport: true },
26
- ],
27
- },
28
- },
29
- )