frontmcp 0.5.0 → 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.
- package/README.md +3 -3
- package/package.json +2 -4
- package/src/args.d.ts +7 -0
- package/src/args.js +13 -0
- package/src/args.js.map +1 -1
- package/src/cli.js +17 -3
- package/src/cli.js.map +1 -1
- package/src/commands/build/adapters/cloudflare.d.ts +8 -0
- package/src/commands/build/adapters/cloudflare.js +80 -0
- package/src/commands/build/adapters/cloudflare.js.map +1 -0
- package/src/commands/build/adapters/index.d.ts +12 -0
- package/src/commands/build/adapters/index.js +23 -0
- package/src/commands/build/adapters/index.js.map +1 -0
- package/src/commands/build/adapters/lambda.d.ts +11 -0
- package/src/commands/build/adapters/lambda.js +43 -0
- package/src/commands/build/adapters/lambda.js.map +1 -0
- package/src/commands/build/adapters/node.d.ts +7 -0
- package/src/commands/build/adapters/node.js +13 -0
- package/src/commands/build/adapters/node.js.map +1 -0
- package/src/commands/build/adapters/vercel.d.ts +8 -0
- package/src/commands/build/adapters/vercel.js +36 -0
- package/src/commands/build/adapters/vercel.js.map +1 -0
- package/src/commands/build/index.d.ts +22 -0
- package/src/commands/build/index.js +120 -0
- package/src/commands/build/index.js.map +1 -0
- package/src/commands/build/types.d.ts +23 -0
- package/src/commands/build/types.js +3 -0
- package/src/commands/build/types.js.map +1 -0
- package/src/commands/create.d.ts +15 -1
- package/src/commands/create.js +1199 -91
- package/src/commands/create.js.map +1 -1
- package/src/tsconfig.d.ts +1 -1
- package/src/tsconfig.js +1 -1
- package/src/tsconfig.js.map +1 -1
- package/src/commands/build.d.ts +0 -2
- package/src/commands/build.js +0 -43
- package/src/commands/build.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for a deployment adapter.
|
|
3
|
+
* Each adapter defines how to compile and package the FrontMCP server
|
|
4
|
+
* for a specific deployment target.
|
|
5
|
+
*/
|
|
6
|
+
export type AdapterTemplate = {
|
|
7
|
+
/** Module format for TypeScript compilation */
|
|
8
|
+
moduleFormat: 'commonjs' | 'esnext';
|
|
9
|
+
/**
|
|
10
|
+
* Generate the entry point file content.
|
|
11
|
+
* @param mainModulePath - Relative path to the compiled main module (e.g., './main.js')
|
|
12
|
+
* @returns The content for index.js, or empty string if no wrapper needed
|
|
13
|
+
*/
|
|
14
|
+
getEntryTemplate: (mainModulePath: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Generate the deployment platform config file content.
|
|
17
|
+
* @returns Object (for JSON) or string (for TOML/YAML)
|
|
18
|
+
*/
|
|
19
|
+
getConfig?: () => object | string;
|
|
20
|
+
/** Name of the config file (e.g., 'vercel.json', 'wrangler.toml') */
|
|
21
|
+
configFileName?: string;
|
|
22
|
+
};
|
|
23
|
+
export type AdapterName = 'node' | 'vercel' | 'lambda' | 'cloudflare';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/commands/build/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Configuration for a deployment adapter.\n * Each adapter defines how to compile and package the FrontMCP server\n * for a specific deployment target.\n */\nexport type AdapterTemplate = {\n /** Module format for TypeScript compilation */\n moduleFormat: 'commonjs' | 'esnext';\n\n /**\n * Generate the entry point file content.\n * @param mainModulePath - Relative path to the compiled main module (e.g., './main.js')\n * @returns The content for index.js, or empty string if no wrapper needed\n */\n getEntryTemplate: (mainModulePath: string) => string;\n\n /**\n * Generate the deployment platform config file content.\n * @returns Object (for JSON) or string (for TOML/YAML)\n */\n getConfig?: () => object | string;\n\n /** Name of the config file (e.g., 'vercel.json', 'wrangler.toml') */\n configFileName?: string;\n};\n\nexport type AdapterName = 'node' | 'vercel' | 'lambda' | 'cloudflare';\n"]}
|
package/src/commands/create.d.ts
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type DeploymentTarget = 'node' | 'vercel' | 'lambda' | 'cloudflare';
|
|
2
|
+
export type RedisSetup = 'docker' | 'existing' | 'none';
|
|
3
|
+
export interface CreateOptions {
|
|
4
|
+
projectName: string;
|
|
5
|
+
deploymentTarget: DeploymentTarget;
|
|
6
|
+
redisSetup: RedisSetup;
|
|
7
|
+
enableGitHubActions: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface CreateFlags {
|
|
10
|
+
yes?: boolean;
|
|
11
|
+
target?: DeploymentTarget;
|
|
12
|
+
redis?: RedisSetup;
|
|
13
|
+
cicd?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function runCreate(projectArg?: string, flags?: CreateFlags): Promise<void>;
|