@vertesia/create-plugin 0.80.0-dev-20251118 → 0.80.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 (119) 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 +68 -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 +159 -0
  13. package/lib/index.js.map +1 -0
  14. package/lib/package-manager.d.ts +10 -0
  15. package/lib/package-manager.d.ts.map +1 -0
  16. package/lib/package-manager.js +74 -0
  17. package/lib/package-manager.js.map +1 -0
  18. package/lib/process-template.d.ts +25 -0
  19. package/lib/process-template.d.ts.map +1 -0
  20. package/lib/process-template.js +186 -0
  21. package/lib/process-template.js.map +1 -0
  22. package/lib/prompts.d.ts +6 -0
  23. package/lib/prompts.d.ts.map +1 -0
  24. package/lib/prompts.js +54 -0
  25. package/lib/prompts.js.map +1 -0
  26. package/lib/template-config.d.ts +87 -0
  27. package/lib/template-config.d.ts.map +1 -0
  28. package/lib/template-config.js +23 -0
  29. package/lib/template-config.js.map +1 -0
  30. package/lib/template-selector.d.ts +7 -0
  31. package/lib/template-selector.d.ts.map +1 -0
  32. package/lib/template-selector.js +56 -0
  33. package/lib/template-selector.js.map +1 -0
  34. package/lib/transforms.d.ts +33 -0
  35. package/lib/transforms.d.ts.map +1 -0
  36. package/lib/transforms.js +81 -0
  37. package/lib/transforms.js.map +1 -0
  38. package/package.json +38 -48
  39. package/bin/create-plugin.mjs +0 -2
  40. package/lib/Package.d.ts +0 -42
  41. package/lib/Package.d.ts.map +0 -1
  42. package/lib/Package.js +0 -52
  43. package/lib/Package.js.map +0 -1
  44. package/lib/TemplateInit.d.ts +0 -30
  45. package/lib/TemplateInit.d.ts.map +0 -1
  46. package/lib/TemplateInit.js +0 -48
  47. package/lib/TemplateInit.js.map +0 -1
  48. package/lib/ToolTemplateInit.d.ts +0 -10
  49. package/lib/ToolTemplateInit.d.ts.map +0 -1
  50. package/lib/ToolTemplateInit.js +0 -58
  51. package/lib/ToolTemplateInit.js.map +0 -1
  52. package/lib/WebTemplateInit.d.ts +0 -10
  53. package/lib/WebTemplateInit.d.ts.map +0 -1
  54. package/lib/WebTemplateInit.js +0 -68
  55. package/lib/WebTemplateInit.js.map +0 -1
  56. package/lib/copy.d.ts +0 -12
  57. package/lib/copy.d.ts.map +0 -1
  58. package/lib/copy.js +0 -45
  59. package/lib/copy.js.map +0 -1
  60. package/lib/deps.d.ts +0 -3
  61. package/lib/deps.d.ts.map +0 -1
  62. package/lib/deps.js +0 -20
  63. package/lib/deps.js.map +0 -1
  64. package/lib/hasBin.d.ts +0 -2
  65. package/lib/hasBin.d.ts.map +0 -1
  66. package/lib/hasBin.js +0 -14
  67. package/lib/hasBin.js.map +0 -1
  68. package/lib/init.d.ts +0 -2
  69. package/lib/init.d.ts.map +0 -1
  70. package/lib/init.js +0 -124
  71. package/lib/init.js.map +0 -1
  72. package/lib/main.d.ts +0 -2
  73. package/lib/main.d.ts.map +0 -1
  74. package/lib/main.js +0 -8
  75. package/lib/main.js.map +0 -1
  76. package/lib/template.d.ts +0 -4
  77. package/lib/template.d.ts.map +0 -1
  78. package/lib/template.js +0 -16
  79. package/lib/template.js.map +0 -1
  80. package/lib/types.d.ts +0 -12
  81. package/lib/types.d.ts.map +0 -1
  82. package/lib/types.js +0 -20
  83. package/lib/types.js.map +0 -1
  84. package/lib/utils.d.ts +0 -2
  85. package/lib/utils.d.ts.map +0 -1
  86. package/lib/utils.js +0 -7
  87. package/lib/utils.js.map +0 -1
  88. package/templates/tool/.env.example +0 -6
  89. package/templates/tool/.vscode/launch.json +0 -24
  90. package/templates/tool/README.md +0 -190
  91. package/templates/tool/api/index.ts +0 -8
  92. package/templates/tool/gitignore +0 -26
  93. package/templates/tool/rollup.config.js +0 -30
  94. package/templates/tool/src/collections/example/icon.svg.ts +0 -6
  95. package/templates/tool/src/collections/example/index.ts +0 -14
  96. package/templates/tool/src/collections/example/weather/WeatherTool.ts +0 -32
  97. package/templates/tool/src/collections/example/weather/manifest.ts +0 -16
  98. package/templates/tool/src/collections/index.ts +0 -7
  99. package/templates/tool/src/index.ts +0 -5
  100. package/templates/tool/src/server.ts +0 -71
  101. package/templates/tool/tsconfig.json +0 -24
  102. package/templates/tool/vite.config.js +0 -48
  103. package/templates/web/README.md +0 -156
  104. package/templates/web/eslint.config.js +0 -29
  105. package/templates/web/gitignore +0 -25
  106. package/templates/web/index.html.tmpl +0 -26
  107. package/templates/web/src/app.tsx +0 -8
  108. package/templates/web/src/assets.ts +0 -26
  109. package/templates/web/src/env.ts.tmpl +0 -14
  110. package/templates/web/src/index.css +0 -21
  111. package/templates/web/src/main.tsx.tmpl +0 -21
  112. package/templates/web/src/pages.tsx +0 -31
  113. package/templates/web/src/plugin.tsx.tmpl +0 -18
  114. package/templates/web/src/routes.tsx +0 -17
  115. package/templates/web/src/vite-env.d.ts +0 -1
  116. package/templates/web/tsconfig.app.json +0 -51
  117. package/templates/web/tsconfig.json +0 -7
  118. package/templates/web/tsconfig.node.json +0 -27
  119. package/templates/web/vite.config.ts.tmpl +0 -128
package/README.md CHANGED
@@ -1,105 +1,162 @@
1
- # @vertesia/create-plugin
1
+ # @vertesia/plugin
2
2
 
3
- This package scaffolds Vertesia plugin projects. Use it to create either:
3
+ CLI tool to create Vertesia plugins:
4
+ - UI Plugins
5
+ - Tool Server Plugins.
4
6
 
5
- - **Web Application Plugins**: React-based web applications that extend Vertesia Studio
6
- - **Agent Tool Server**: Custom agent tools accessible via API endpoints
7
+ ## Usage
7
8
 
8
- Visit <https://vertesiahq.com> for more information about Vertesia.
9
-
10
- ## What Can You Create?
9
+ ```bash
10
+ # Using pnpm create (recommended)
11
+ pnpm create @vertesia/plugin my-project
11
12
 
12
- ### Web Application Plugin (UI Extensions)
13
+ # Using npm create
14
+ npm create @vertesia/plugin my-project
13
15
 
14
- Vertesia web plugins are React-based web application that can be embedded into the Vertesia Studio interface. They allow you to create custom user experiences focused on specific use cases and business processes, while seamlessly leveraging all the vertesia platform features.
16
+ # Using pnpm dlx (runs without installing)
17
+ pnpm dlx @vertesia/plugin my-project
15
18
 
16
- ### Agent Tool Server
19
+ # Using npx
20
+ npx @vertesia/plugin my-project
17
21
 
18
- An Agent Tool Server extends the capabilities of AI agents in Vertesia. It allows you to:
22
+ # Or install globally
23
+ pnpm install -g @vertesia/plugin
24
+ create-tool-server my-project
25
+ ```
19
26
 
20
- - Create custom tools that agents can use
21
- - Integrate with external APIs and services
22
- - Organize tools into logical collections
23
- - Expose tools via REST API endpoints
24
- - Support authentication and context-aware execution
27
+ **Note:** When using `pnpm create` or `npm create`, drop the `create-` prefix from the package name.
25
28
 
26
- ## Prerequisites
29
+ ## Features
27
30
 
28
- Before creating a plugin project, you need:
31
+ - 📦 **Downloads template from GitHub** - Always get the latest template
32
+ - ⚙️ **Template-driven configuration** - Template defines its own prompts via `template.config.json`
33
+ - 🎨 **Interactive prompts** - User-friendly CLI with validation
34
+ - 🔄 **Variable replacement** - Automatically replaces `{{VARIABLES}}` in files
35
+ - 🧹 **Smart cleanup** - Removes meta files after installation
36
+ - 📚 **Package manager agnostic** - Works with npm, pnpm, or yarn
29
37
 
30
- - Node.js and pnpm (or npm)
31
- - Vertesia CLI
32
- - An application manifest declared in Vertesia
38
+ ## How It Works
33
39
 
34
- ### Declaring Your Web Application Plugin in Vertesia
40
+ 1. **Downloads** the template repository from GitHub using `degit`
41
+ 2. **Reads** `template.config.json` from the template to determine configuration
42
+ 3. **Prompts** the user for values (project name, description, etc.)
43
+ 4. **Replaces** variables in specified files (e.g., `{{PROJECT_NAME}}` → `my-project`)
44
+ 5. **Cleans up** meta files (`.git`, `template.config.json`, etc.)
45
+ 6. **Installs** dependencies using the configured package manager
35
46
 
36
- Before you can develop and integrate your web application plugin with Vertesia, you must declare an application manifest in the Vertesia platform using the Vertesia CLI.
47
+ ## Configuration
37
48
 
38
- #### Install the Vertesia CLI
49
+ All configuration is centralized in `src/configuration.ts`:
39
50
 
40
- If not already done, install the Vertesia CLI and create a profile:
51
+ ```typescript
52
+ export const config = {
53
+ templateRepo: 'vertesiahq/plugin-template',
54
+ templateConfigFile: 'template.config.json',
55
+ packageManager: 'pnpm',
56
+ // ... more options
57
+ }
58
+ ```
41
59
 
42
- ```bash
43
- npm install -g @vertesia/cli
44
- vertesia profiles create
60
+ ### Key Configuration Options
61
+
62
+ - **`templateRepo`** - GitHub repository for the template (format: `owner/repo`)
63
+ - **`templateConfigFile`** - Name of the config file in the template
64
+ - **`packageManager`** - Which package manager to use (`npm`, `pnpm`, or `yarn`)
65
+ - **`useCache`** - Whether to cache downloaded templates
66
+
67
+ ## Template Structure
68
+
69
+ The template repository should include a `template.config.json` file:
70
+
71
+ ```json
72
+ {
73
+ "version": "1.0",
74
+ "prompts": [
75
+ {
76
+ "type": "text",
77
+ "name": "PROJECT_NAME",
78
+ "message": "Project name",
79
+ "initial": "my-tool-server"
80
+ },
81
+ {
82
+ "type": "text",
83
+ "name": "DESCRIPTION",
84
+ "message": "Project description",
85
+ "initial": "A tool server for LLM integrations"
86
+ }
87
+ ],
88
+ "files": [
89
+ "package.json",
90
+ "README.md",
91
+ "src/server.ts"
92
+ ],
93
+ "removeAfterInstall": [
94
+ ".git",
95
+ "template.config.json"
96
+ ]
97
+ }
45
98
  ```
46
99
 
47
- ### Create the App Manifest
100
+ ### Template Config Schema
101
+
102
+ - **`prompts`** - Array of prompts using the [prompts](https://www.npmjs.com/package/prompts) library format
103
+ - **`files`** - List of files where variable replacement should occur
104
+ - **`removeAfterInstall`** - Files/directories to remove after installation
105
+ - **`conditionalRemove`** - Conditional file removal based on user answers
48
106
 
49
- Create the app manifest using the Vertesia CLI:
107
+ ## Development
50
108
 
51
109
  ```bash
52
- vertesia apps create --manifest '{
53
- "name": "my-app",
54
- "title": "My App",
55
- "description": "A sample app",
56
- "publisher": "your-org",
57
- "private": true,
58
- "status": "beta"
59
- }' --install
60
- ```
110
+ # Install dependencies
111
+ pnpm install
61
112
 
62
- The `--install` flag will automatically install the app and grant permissions to the creator.
113
+ # Build
114
+ pnpm build
63
115
 
64
- **Important**: The `name` field from your manifest (e.g., `my-app`) is what you'll use as your plugin name in the next step.
116
+ # Test locally
117
+ pnpm test
65
118
 
66
- ## Initialize a Plugin Project
119
+ # Watch mode
120
+ pnpm dev
121
+ ```
67
122
 
68
- Run the initialization command:
123
+ ## Publishing
69
124
 
70
125
  ```bash
71
- npm init @vertesia/plugin
72
- # or
73
- pnpm create @vertesia/plugin
126
+ # Build and publish
127
+ npm publish
74
128
  ```
75
129
 
76
- You will be prompted to choose a template and provide configuration:
130
+ After publishing, users can create projects with:
77
131
 
78
- ### Prompts
132
+ ```bash
133
+ pnpm create @vertesia/plugin my-project
134
+ ```
79
135
 
80
- 1. **Template type**: Choose between:
81
- - **Web application plugin**: For UI extensions
82
- - **Agent tool server**: For custom agent tools
83
- 2. **Package manager**: Choose between npm or pnpm
84
- 3. **Plugin name**: Use kebab-case (e.g., my-plugin or my-tools)
85
- 4. **Plugin version**: Semantic version (e.g., 1.0.0)
86
- 5. **Description**: Optional description of your plugin
136
+ ## Template Development
87
137
 
88
- ### Web Application Plugin Specific
138
+ To develop a template:
89
139
 
90
- If you select the **Web application plugin** template, you'll also be asked:
140
+ 1. Create a GitHub repository with your template files
141
+ 2. Add a `template.config.json` file with prompts and configuration
142
+ 3. Use `{{VARIABLES}}` in files where you want replacements
143
+ 4. Update `src/configuration.ts` to point to your template repo
144
+ 5. Test with `pnpm test` or run the built CLI directly
91
145
 
92
- 1. **Isolation strategy**:
93
- - **Shadow DOM**: Fully isolated plugin using Shadow DOM (recommended)
94
- - **CSS-only isolation**: Lighter isolation using CSS scope, but may have style conflicts
146
+ ## Examples
95
147
 
96
- ## Working with Plugins
148
+ ### Create a project with default settings
97
149
 
98
- After creating your project, see the README file in the generated project for comprehensive development instructions.
150
+ ```bash
151
+ pnpm create @vertesia/plugin my-project
152
+ ```
99
153
 
100
- ## Support
154
+ ### View help
155
+
156
+ ```bash
157
+ pnpm dlx @vertesia/plugin --help
158
+ ```
101
159
 
102
- For issues, questions, or feature requests:
160
+ ## License
103
161
 
104
- - [GitHub Issues](https://github.com/vertesia/composableai/issues)
105
- - [Documentation](https://docs.vertesiahq.com/)
162
+ MIT
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Configuration for @vertesia/create-tools
3
+ *
4
+ * This file centralizes all configuration values for the installer.
5
+ * Update these values to point to your template repository and customize behavior.
6
+ */
7
+ /**
8
+ * Template definition
9
+ */
10
+ export interface TemplateDefinition {
11
+ /** Display name for the template (shown to user) */
12
+ name: string;
13
+ /** GitHub repository path */
14
+ repository: string;
15
+ }
16
+ export declare const config: {
17
+ /**
18
+ * Available templates
19
+ * Array of template definitions with display names and repository paths
20
+ *
21
+ * Format for repository: 'owner/repo/subdirectory' or 'owner/repo/subdirectory#branch'
22
+ *
23
+ * Examples:
24
+ * - 'vertesia/composableai/packages/tool-server-template'
25
+ * - 'vertesia/composableai/packages/tool-server-template#main'
26
+ * - 'vertesia/composableai/packages/tool-server-template#v1.0.0'
27
+ */
28
+ readonly templates: TemplateDefinition[];
29
+ /**
30
+ * Name of the template configuration file in the template repo
31
+ * This file should contain prompts and installation instructions
32
+ */
33
+ readonly templateConfigFile: "template.config.json";
34
+ /**
35
+ * Whether to use cache for degit downloads
36
+ * Set to true for faster repeated installs (dev mode)
37
+ * Set to false to always get latest template (production)
38
+ */
39
+ readonly useCache: false;
40
+ /**
41
+ * Documentation URL to show in help messages
42
+ */
43
+ readonly docsUrl: "https://docs.vertesia.com/tools";
44
+ };
45
+ /**
46
+ * Validation rules for project names
47
+ */
48
+ export declare const validation: {
49
+ /**
50
+ * Regex for valid project names
51
+ * Allows: lowercase letters, numbers, hyphens
52
+ */
53
+ readonly projectNamePattern: RegExp;
54
+ /**
55
+ * Error message for invalid project names
56
+ */
57
+ readonly projectNameError: "Project name can only contain lowercase letters, numbers, and hyphens";
58
+ /**
59
+ * Reserved project names that cannot be used
60
+ */
61
+ readonly reservedNames: string[];
62
+ };
63
+ //# sourceMappingURL=configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,MAAM;IACjB;;;;;;;;;;OAUG;wBAUE,kBAAkB,EAAE;IAEzB;;;OAGG;;IAGH;;;;OAIG;;IAGH;;OAEG;;CAEK,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;4BAME,MAAM,EAAE;CACL,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Configuration for @vertesia/create-tools
3
+ *
4
+ * This file centralizes all configuration values for the installer.
5
+ * Update these values to point to your template repository and customize behavior.
6
+ */
7
+ export const config = {
8
+ /**
9
+ * Available templates
10
+ * Array of template definitions with display names and repository paths
11
+ *
12
+ * Format for repository: 'owner/repo/subdirectory' or 'owner/repo/subdirectory#branch'
13
+ *
14
+ * Examples:
15
+ * - 'vertesia/composableai/packages/tool-server-template'
16
+ * - 'vertesia/composableai/packages/tool-server-template#main'
17
+ * - 'vertesia/composableai/packages/tool-server-template#v1.0.0'
18
+ */
19
+ templates: [
20
+ {
21
+ name: 'Vertesia Tool Server',
22
+ repository: 'vertesia/composableai/packages/tool-server-template#preview'
23
+ },
24
+ {
25
+ name: 'Vertesia UI Plugin',
26
+ repository: 'vertesia/composableai/packages/ui-plugin-template#preview'
27
+ }
28
+ ],
29
+ /**
30
+ * Name of the template configuration file in the template repo
31
+ * This file should contain prompts and installation instructions
32
+ */
33
+ templateConfigFile: 'template.config.json',
34
+ /**
35
+ * Whether to use cache for degit downloads
36
+ * Set to true for faster repeated installs (dev mode)
37
+ * Set to false to always get latest template (production)
38
+ */
39
+ useCache: false,
40
+ /**
41
+ * Documentation URL to show in help messages
42
+ */
43
+ docsUrl: 'https://docs.vertesia.com/tools',
44
+ };
45
+ /**
46
+ * Validation rules for project names
47
+ */
48
+ export const validation = {
49
+ /**
50
+ * Regex for valid project names
51
+ * Allows: lowercase letters, numbers, hyphens
52
+ */
53
+ projectNamePattern: /^[a-z0-9-]+$/,
54
+ /**
55
+ * Error message for invalid project names
56
+ */
57
+ projectNameError: 'Project name can only contain lowercase letters, numbers, and hyphens',
58
+ /**
59
+ * Reserved project names that cannot be used
60
+ */
61
+ reservedNames: [
62
+ 'test',
63
+ 'node_modules',
64
+ 'dist',
65
+ 'build',
66
+ ],
67
+ };
68
+ //# sourceMappingURL=configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB;;;;;;;;;;OAUG;IACH,SAAS,EAAE;QACT;YACE,IAAI,EAAE,sBAAsB;YAC5B,UAAU,EAAE,6DAA6D;SAC1E;QACD;YACE,IAAI,EAAE,oBAAoB;YAC1B,UAAU,EAAE,2DAA2D;SACxE;KACsB;IAEzB;;;OAGG;IACH,kBAAkB,EAAE,sBAAsB;IAE1C;;;;OAIG;IACH,QAAQ,EAAE,KAAK;IAEf;;OAEG;IACH,OAAO,EAAE,iCAAiC;CAClC,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;;;OAGG;IACH,kBAAkB,EAAE,cAAc;IAElC;;OAEG;IACH,gBAAgB,EAAE,uEAAuE;IAEzF;;OAEG;IACH,aAAa,EAAE;QACb,MAAM;QACN,cAAc;QACd,MAAM;QACN,OAAO;KACI;CACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Download template from GitHub using degit
3
+ */
4
+ export declare function downloadTemplate(projectName: string, repository: string): Promise<void>;
5
+ //# sourceMappingURL=download-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download-template.d.ts","sourceRoot":"","sources":["../src/download-template.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB7F"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Template downloading from GitHub
3
+ */
4
+ import degit from 'degit';
5
+ import chalk from 'chalk';
6
+ import { config } from './configuration.js';
7
+ /**
8
+ * Download template from GitHub using degit
9
+ */
10
+ export async function downloadTemplate(projectName, repository) {
11
+ console.log(chalk.blue('📦 Downloading template from GitHub...\n'));
12
+ console.log(chalk.gray(` Repository: ${repository}`));
13
+ console.log(chalk.gray(` Target: ./${projectName}\n`));
14
+ const emitter = degit(repository, {
15
+ cache: config.useCache,
16
+ force: true,
17
+ });
18
+ // Show download progress
19
+ emitter.on('info', (info) => {
20
+ console.log(chalk.gray(` ${info.message}`));
21
+ });
22
+ emitter.on('warn', (warning) => {
23
+ console.log(chalk.yellow(` ⚠️ ${warning.message}`));
24
+ });
25
+ try {
26
+ await emitter.clone(projectName);
27
+ console.log(chalk.green(' ✓ Template downloaded\n'));
28
+ }
29
+ catch (error) {
30
+ throw new Error(`Failed to download template: ${error instanceof Error ? error.message : 'Unknown error'}`);
31
+ }
32
+ }
33
+ //# sourceMappingURL=download-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download-template.js","sourceRoot":"","sources":["../src/download-template.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAA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C,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;IAC9G,CAAC;AACH,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @vertesia/create-tool-server
4
+ *
5
+ * CLI tool to create Vertesia tool server projects from GitHub templates.
6
+ * Reads template.config.json from the template to determine prompts and file replacements.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
package/lib/index.js ADDED
@@ -0,0 +1,159 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @vertesia/create-tool-server
4
+ *
5
+ * CLI tool to create Vertesia tool server projects from GitHub templates.
6
+ * Reads template.config.json from the template to determine prompts and file replacements.
7
+ */
8
+ import chalk from 'chalk';
9
+ import fs from 'fs';
10
+ import { config, validation } from './configuration.js';
11
+ import { selectTemplate } from './template-selector.js';
12
+ import { selectPackageManager, installDependencies } from './package-manager.js';
13
+ import { downloadTemplate } from './download-template.js';
14
+ import { readTemplateConfig } from './template-config.js';
15
+ import { promptUser } from './prompts.js';
16
+ import { replaceVariables, adjustPackageJson, handleConditionalRemoves, removeMetaFiles } from './process-template.js';
17
+ /**
18
+ * Parse command line arguments
19
+ */
20
+ function parseArgs(args) {
21
+ let projectName;
22
+ let branch;
23
+ for (let i = 0; i < args.length; i++) {
24
+ const arg = args[i];
25
+ if (arg === '-b' || arg === '--branch') {
26
+ branch = args[i + 1];
27
+ i++; // Skip next arg
28
+ }
29
+ else if (!arg.startsWith('-')) {
30
+ projectName = arg;
31
+ }
32
+ }
33
+ if (!projectName) {
34
+ throw new Error('Project name is required');
35
+ }
36
+ return { projectName, branch };
37
+ }
38
+ /**
39
+ * Main entry point
40
+ */
41
+ async function main() {
42
+ const args = process.argv.slice(2);
43
+ // Show help
44
+ if (args.includes('--help') || args.includes('-h')) {
45
+ showHelp();
46
+ process.exit(0);
47
+ }
48
+ // Parse arguments
49
+ let projectName;
50
+ let branch;
51
+ try {
52
+ const parsed = parseArgs(args);
53
+ projectName = parsed.projectName;
54
+ branch = parsed.branch;
55
+ }
56
+ catch (error) {
57
+ console.log(chalk.red('❌ Please specify a project name:\n'));
58
+ console.log(chalk.gray(' pnpm create @vertesia/tool-server my-project'));
59
+ console.log(chalk.gray(' npm create @vertesia/tool-server my-project'));
60
+ console.log(chalk.gray(' npx @vertesia/create-tool-server my-project\n'));
61
+ console.log(chalk.gray('Options:'));
62
+ console.log(chalk.gray(' -b, --branch <branch> Use specific branch\n'));
63
+ process.exit(1);
64
+ }
65
+ // Validate project name
66
+ if (!validation.projectNamePattern.test(projectName)) {
67
+ console.log(chalk.red(`❌ ${validation.projectNameError}\n`));
68
+ process.exit(1);
69
+ }
70
+ if (validation.reservedNames.includes(projectName)) {
71
+ console.log(chalk.red(`❌ "${projectName}" is a reserved name. Please choose a different name.\n`));
72
+ process.exit(1);
73
+ }
74
+ // Check if directory already exists
75
+ if (fs.existsSync(projectName)) {
76
+ console.log(chalk.red(`❌ Directory "${projectName}" already exists.\n`));
77
+ process.exit(1);
78
+ }
79
+ try {
80
+ // Step 1: Select template (only prompts if multiple templates available)
81
+ const selectedTemplate = await selectTemplate(branch);
82
+ // Show the selected template name with branch if specified
83
+ const branchInfo = branch ? chalk.gray(` (branch: ${branch})`) : '';
84
+ console.log(chalk.blue.bold(`\n🚀 Create ${selectedTemplate.name}`) + branchInfo + '\n');
85
+ // Step 2: Detect and select package manager
86
+ const packageManager = await selectPackageManager();
87
+ // Step 3: Download template from GitHub
88
+ await downloadTemplate(projectName, selectedTemplate.repository);
89
+ // Step 4: Read template configuration
90
+ const templateConfig = readTemplateConfig(projectName);
91
+ // Step 5: Prompt user for configuration
92
+ const answers = await promptUser(projectName, templateConfig);
93
+ // Step 5: Replace variables in files
94
+ replaceVariables(projectName, templateConfig, answers);
95
+ // Step 6: Adjust package.json (name and workspace dependencies)
96
+ adjustPackageJson(projectName, answers);
97
+ // Step 7: Handle conditional removes
98
+ if (templateConfig.conditionalRemove) {
99
+ handleConditionalRemoves(projectName, templateConfig, answers);
100
+ }
101
+ // Step 8: Remove meta files
102
+ removeMetaFiles(projectName, templateConfig);
103
+ // Step 9: Install dependencies
104
+ await installDependencies(projectName, packageManager);
105
+ // Step 10: Success!
106
+ showSuccess(projectName, packageManager, selectedTemplate.name, selectedTemplate.repository);
107
+ }
108
+ catch (error) {
109
+ console.log(chalk.red(`\n❌ Installation failed: ${error instanceof Error ? error.message : 'Unknown error'}\n`));
110
+ // Cleanup on failure
111
+ if (fs.existsSync(projectName)) {
112
+ console.log(chalk.gray('Cleaning up...'));
113
+ fs.rmSync(projectName, { recursive: true, force: true });
114
+ }
115
+ process.exit(1);
116
+ }
117
+ }
118
+ /**
119
+ * Show success message
120
+ */
121
+ function showSuccess(projectName, packageManager, templateName, repository) {
122
+ console.log(chalk.green.bold('✅ Project created successfully!\n'));
123
+ console.log(chalk.gray('Next steps:\n'));
124
+ console.log(chalk.cyan(` cd ${projectName}`));
125
+ console.log(chalk.cyan(` ${packageManager} dev`));
126
+ console.log();
127
+ console.log(chalk.gray(`Documentation: ${config.docsUrl}`));
128
+ console.log(chalk.gray(`Template: ${templateName}`));
129
+ console.log(chalk.gray(`Repository: ${repository}\n`));
130
+ }
131
+ /**
132
+ * Show help message
133
+ */
134
+ function showHelp() {
135
+ console.log(chalk.blue.bold('\nVertesia Project Generator\n'));
136
+ console.log('Usage:');
137
+ console.log(chalk.gray(' pnpm create @vertesia/tool-server <project-name> [options]'));
138
+ console.log(chalk.gray(' npm create @vertesia/tool-server <project-name> [options]'));
139
+ console.log(chalk.gray(' npx @vertesia/create-tool-server <project-name> [options]\n'));
140
+ console.log('Options:');
141
+ console.log(chalk.gray(' -h, --help Show this help message'));
142
+ console.log(chalk.gray(' -b, --branch <branch> Use specific branch (default: configured branch or main)\n'));
143
+ console.log('Examples:');
144
+ console.log(chalk.gray(' pnpm create @vertesia/tool-server my-tool-server'));
145
+ console.log(chalk.gray(' npm create @vertesia/tool-server my-api-tools -b develop'));
146
+ console.log(chalk.gray(' npx @vertesia/create-tool-server my-project --branch v1.0.0\n'));
147
+ console.log('Available Templates:');
148
+ config.templates.forEach(template => {
149
+ console.log(chalk.gray(` - ${template.name}`));
150
+ });
151
+ console.log();
152
+ console.log(`Documentation: ${chalk.cyan(config.docsUrl)}\n`);
153
+ }
154
+ // Run the installer
155
+ main().catch((error) => {
156
+ console.error(chalk.red(`\n❌ Fatal error: ${error.message}\n`));
157
+ process.exit(1);
158
+ });
159
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,SAAS,SAAS,CAAC,IAAc;IAC/B,IAAI,WAA+B,CAAC;IACpC,IAAI,MAA0B,CAAC;IAE/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,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O,CAAC,IAAI,CAAC,CAAC;AAChE,CAAC;AAED,oBAAoB;AACpB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,oBAAoB,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;IAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Detect available package managers and let user choose
3
+ * Returns the selected package manager ('pnpm' or 'npm')
4
+ */
5
+ export declare function selectPackageManager(): Promise<string>;
6
+ /**
7
+ * Install dependencies using the specified package manager
8
+ */
9
+ export declare function installDependencies(projectName: string, packageManager: string): Promise<void>;
10
+ //# sourceMappingURL=package-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../src/package-manager.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,CAmC5D;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAapG"}