@mcp-tool-kit/shared 0.0.1 → 0.0.2

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/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{isString as r}from"./string.js";import{createProject as o,installDependencies as t,sleep as p}from"./projectSetup.js";export{o as createProject,t as installDependencies,r as isString,p as sleep};
@@ -0,0 +1,2 @@
1
+ import{setTimeout as t}from"timers/promises";import{cp as i,mkdir as r,readFile as o,readdir as e,rename as n,stat as s,writeFile as a}from"fs/promises";import c from"path";import{spawn as f}from"child_process";function m(t){return new Promise((i,r)=>{const o=f("npm",["install"],{cwd:t,stdio:"pipe"});o.on("close",t=>{0===t?i():r(new Error(`npm install failed with code ${t}`))}),o.on("error",r)})}async function p(t,f,m){await r(t,{recursive:!0}),await i(f,t,{recursive:!0}),await async function(t){const i={_env:".env",_gitignore:".gitignore",_git:".git",_nvmrc:".nvmrc",_prettierrc:".prettierrc",_husky:".husky",_github:".github"},r=await e(t,{recursive:!0});for(const o of r)o in i&&await n(c.join(t,o),c.join(t,i[o]))}(t),await async function(t,i){const r={"{{PROJECT_NAME}}":i.projectName,"{{YEAR}}":(new Date).getFullYear().toString()},n=await e(t,{recursive:!0});for(const i of n){const e=c.join(t,i);if(!(await s(e)).isDirectory())for(const[t,i]of Object.entries(r)){const r=await o(e,"utf-8"),n=new RegExp(t,"g"),s=r.replace(n,i);await a(e,s,"utf-8")}}}(t,m)}export{p as createProject,m as installDependencies,t as sleep};
2
+ //# sourceMappingURL=projectSetup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectSetup.js","names":[],"sources":["../../src/projectSetup.ts"],"sourcesContent":[],"mappings":"mNAkDA,SAAgB,EAAoB,GAClC,OAAO,IAAI,QAAc,CAAC,EAAS,KACjC,MAAM,EAAM,EAAM,MAAO,CAAC,WAAY,CACpC,IAAK,EACL,MAAO,SAGT,EAAI,GAAG,QAAS,IACD,IAAT,EACF,IAEA,EAAO,IAAI,MAAM,gCAAgC,QAIrD,EAAI,GAAG,QAAS,IAEnB,CAED,eAAsB,EACpB,EACA,EACA,SAIM,EAAM,EAAY,CAAE,WAAW,UAC/B,EAAG,EAAc,EAAY,CAAE,WAAW,UAxElD,eAA2B,GACzB,MAAM,EAAY,CAChB,KAAM,OACN,WAAY,aACZ,KAAM,OACN,OAAQ,SACR,YAAa,cACb,OAAQ,SACR,QAAS,WAEL,QAAc,EAAQ,EAAY,CAAE,WAAW,IACrD,IAAK,MAAM,KAAQ,EACX,KAAQ,SAGR,EAAO,EAAK,KAAK,EAAY,GAAO,EAAK,KAAK,EAAY,EAAU,IAE7E,CAwDO,CAAY,SAtDpB,eACE,EACA,GAIA,MAAM,EAAY,CAChB,mBAAoB,EAAa,YACjC,YAAY,IAAI,MAAO,cAAc,YAEjC,QAAc,EAAQ,EAAY,CAAE,WAAW,IACrD,IAAK,MAAM,KAAQ,EAAO,CACxB,MAAM,EAAW,EAAK,KAAK,EAAY,GAEvC,WADuB,EAAK,IACf,cAGb,IAAK,MAAO,EAAK,KAAU,OAAO,QAAQ,GAAY,CACpD,MAAM,QAAgB,EAAS,EAAU,SACnC,EAAQ,IAAI,OAAO,EAAK,KACxB,EAAa,EAAQ,QAAQ,EAAO,SACpC,EAAU,EAAU,EAAY,QACvC,CACF,CACF,CA+BO,CAAiB,EAAY,EACpC"}
package/dist/string.js ADDED
@@ -0,0 +1,2 @@
1
+ function t(t){return"string"==typeof t}export{t as isString};
2
+ //# sourceMappingURL=string.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.js","names":[],"sources":["../../src/string.ts"],"sourcesContent":[],"mappings":"AAAA,SAAgB,EAAS,GACvB,MAAwB,iBAAV,CACf"}
@@ -0,0 +1,2 @@
1
+ export * from './string';
2
+ export * from './projectSetup';
@@ -0,0 +1,6 @@
1
+ import { setTimeout as sleep } from 'timers/promises';
2
+ export declare function installDependencies(currentDir: string): Promise<void>;
3
+ export declare function createProject(targetPath: string, templatePath: string, replacements: {
4
+ projectName: string;
5
+ }): Promise<void>;
6
+ export { sleep };
@@ -0,0 +1 @@
1
+ export declare function isString(value: any): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-tool-kit/shared",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "mcp tool kit shared",
5
5
  "type": "module",
6
6
  "author": "zhensherlock",