init-xmcp 0.3.1 → 0.3.2-canary.1
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/.turbo/turbo-build.log +1 -1
- package/dist/helpers/init.d.ts +1 -0
- package/dist/helpers/init.js +2 -2
- package/dist/helpers/install.d.ts +2 -1
- package/dist/helpers/install.js +3 -2
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/src/helpers/init.ts +3 -1
- package/src/helpers/install.ts +4 -2
- package/src/index.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
package/dist/helpers/init.d.ts
CHANGED
package/dist/helpers/init.js
CHANGED
|
@@ -8,9 +8,9 @@ import { createRoute } from "./create-handler.js";
|
|
|
8
8
|
import { createPrompt } from "./create-prompt.js";
|
|
9
9
|
import { createResources } from "./create-resources.js";
|
|
10
10
|
export async function init(options) {
|
|
11
|
-
const { projectRoot, framework, toolsPath, promptsPath, resourcesPath, routePath, packageManager, } = options;
|
|
11
|
+
const { projectRoot, framework, toolsPath, promptsPath, resourcesPath, routePath, packageManager, version, } = options;
|
|
12
12
|
generateConfig(projectRoot, framework, toolsPath, promptsPath, resourcesPath);
|
|
13
|
-
await install(projectRoot, packageManager);
|
|
13
|
+
await install(projectRoot, packageManager, version);
|
|
14
14
|
updatePackageJson(projectRoot);
|
|
15
15
|
updateTsConfig(projectRoot);
|
|
16
16
|
updateGitignore(projectRoot);
|
|
@@ -7,5 +7,6 @@ export declare function detectPackageManager(projectPath: string): "npm" | "yarn
|
|
|
7
7
|
/**
|
|
8
8
|
* Install xmcp dependencies using the specified package manager
|
|
9
9
|
* @param packageManager - Package manager to use (npm, yarn, pnpm, or bun)
|
|
10
|
+
* @param version - Version of init-xmcp to match xmcp version
|
|
10
11
|
*/
|
|
11
|
-
export declare function install(projectPath: string, packageManager: "npm" | "pnpm" | "yarn" | "bun"): Promise<void>;
|
|
12
|
+
export declare function install(projectPath: string, packageManager: "npm" | "pnpm" | "yarn" | "bun", version: string): Promise<void>;
|
package/dist/helpers/install.js
CHANGED
|
@@ -27,9 +27,10 @@ export function detectPackageManager(projectPath) {
|
|
|
27
27
|
/**
|
|
28
28
|
* Install xmcp dependencies using the specified package manager
|
|
29
29
|
* @param packageManager - Package manager to use (npm, yarn, pnpm, or bun)
|
|
30
|
+
* @param version - Version of init-xmcp to match xmcp version
|
|
30
31
|
*/
|
|
31
|
-
export async function install(projectPath, packageManager) {
|
|
32
|
-
const dependencies = [
|
|
32
|
+
export async function install(projectPath, packageManager, version) {
|
|
33
|
+
const dependencies = [`xmcp@${version}`, "zod@^3.25.76"]; // pin zod to specific version to avoid compilation errors
|
|
33
34
|
const devDependencies = ["swc-loader"];
|
|
34
35
|
const commands = {
|
|
35
36
|
npm: `npm install ${dependencies.join(" ")} && npm install --save-dev ${devDependencies.join(" ")}`,
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/helpers/init.ts
CHANGED
|
@@ -17,6 +17,7 @@ interface InitOptions {
|
|
|
17
17
|
resourcesPath: string | undefined;
|
|
18
18
|
routePath: string | undefined;
|
|
19
19
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
20
|
+
version: string;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export async function init(options: InitOptions) {
|
|
@@ -28,11 +29,12 @@ export async function init(options: InitOptions) {
|
|
|
28
29
|
resourcesPath,
|
|
29
30
|
routePath,
|
|
30
31
|
packageManager,
|
|
32
|
+
version,
|
|
31
33
|
} = options;
|
|
32
34
|
|
|
33
35
|
generateConfig(projectRoot, framework, toolsPath, promptsPath, resourcesPath);
|
|
34
36
|
|
|
35
|
-
await install(projectRoot, packageManager);
|
|
37
|
+
await install(projectRoot, packageManager, version);
|
|
36
38
|
|
|
37
39
|
updatePackageJson(projectRoot);
|
|
38
40
|
|
package/src/helpers/install.ts
CHANGED
|
@@ -34,12 +34,14 @@ export function detectPackageManager(
|
|
|
34
34
|
/**
|
|
35
35
|
* Install xmcp dependencies using the specified package manager
|
|
36
36
|
* @param packageManager - Package manager to use (npm, yarn, pnpm, or bun)
|
|
37
|
+
* @param version - Version of init-xmcp to match xmcp version
|
|
37
38
|
*/
|
|
38
39
|
export async function install(
|
|
39
40
|
projectPath: string,
|
|
40
|
-
packageManager: "npm" | "pnpm" | "yarn" | "bun"
|
|
41
|
+
packageManager: "npm" | "pnpm" | "yarn" | "bun",
|
|
42
|
+
version: string
|
|
41
43
|
) {
|
|
42
|
-
const dependencies = [
|
|
44
|
+
const dependencies = [`xmcp@${version}`, "zod@^3.25.76"]; // pin zod to specific version to avoid compilation errors
|
|
43
45
|
const devDependencies = ["swc-loader"];
|
|
44
46
|
|
|
45
47
|
const commands = {
|