rapidkit 0.25.1 → 0.25.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/{chunk-3MJ2BD56.js → chunk-CD534JH4.js} +3 -3
- package/dist/{create-PELQEDCF.js → create-UUKDMKMT.js} +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +160 -160
- package/dist/package.json +1 -1
- package/dist/{workspace-PIBFBNRA.js → workspace-M2Y2ZVTK.js} +32 -11
- package/package.json +1 -1
|
@@ -109,7 +109,7 @@ npx rapidkit dev
|
|
|
109
109
|
cd <project-name>
|
|
110
110
|
npx rapidkit init
|
|
111
111
|
npx rapidkit dev
|
|
112
|
-
`)+"```\n","utf-8"),!e){w.start("Initializing git repository");try{await execa("git",["init"],{cwd:i}),await execa("git",["add","."],{cwd:i}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:i}),w.succeed("Git repository initialized");}catch{w.warn("Could not initialize git repository");}}try{let{registerWorkspace:k}=await import('./workspace-
|
|
112
|
+
`)+"```\n","utf-8"),!e){w.start("Initializing git repository");try{await execa("git",["init"],{cwd:i}),await execa("git",["add","."],{cwd:i}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:i}),w.succeed("Git repository initialized");}catch{w.warn("Could not initialize git repository");}}try{let{registerWorkspace:k}=await import('./workspace-M2Y2ZVTK.js');await k(i,d);}catch{}if(console.log(n.green(`
|
|
113
113
|
\u2728 Workspace created!
|
|
114
114
|
`)),console.log(n.cyan("\u{1F4C2} Location:"),n.white(i)),console.log(n.cyan(`
|
|
115
115
|
\u{1F680} Get started:
|
|
@@ -123,7 +123,7 @@ npx rapidkit dev
|
|
|
123
123
|
`)),console.log(n.cyan(`\u{1F4A1} How to install Python:
|
|
124
124
|
`)),console.log(n.white(" Ubuntu / Debian: sudo apt install python3.10")),console.log(n.white(" macOS (Homebrew): brew install python@3.10")),console.log(n.white(` Windows: https://python.org/downloads
|
|
125
125
|
`)),console.log(n.gray(` After installing Python, run: npx rapidkit ${d}
|
|
126
|
-
`)),process.exit(1));}a.step(1,3,"Setting up RapidKit environment");let b=J("Creating directory").start();try{await v.ensureDir(i),b.succeed("Directory created"),b.start("Detecting Python version");let w=null,_=await _t(x.pythonVersion);if(_)w=await ft(_),w?(a.info(` Detected Python ${w}`),b.succeed(`Python ${w} detected`)):b.warn("Could not detect exact Python version");else {let k=$();w=await ft(k),w?b.succeed(`Python ${w} detected`):b.warn("Could not detect Python version, proceeding with defaults");}if(x.installMethod==="poetry"&&!await It()&&(b.warn("Poetry not found \u2014 auto-fallback to pip + venv"),x.installMethod="venv"),await at(i,d,x.installMethod,w||void 0),w&&await Dt(i,w),await lt(i,d,x.installMethod,w||x.pythonVersion,u||h),await Q(i),await st(i,d),x.installMethod==="poetry")try{await jt(i,x.pythonVersion,b,r,g,p);}catch(k){let j=k?.details||k?.message||String(k);if(j.includes("pyenv")||j.includes("exit status 127")||j.includes("returned non-zero exit status 127")){b.warn("Poetry encountered Python discovery issues, trying venv method"),a.debug(`Poetry error (attempting venv fallback): ${j}`);try{await dt(i,x.pythonVersion,b,r,g),x.installMethod="venv";}catch(pt){throw pt}}else throw k}else x.installMethod==="venv"?await dt(i,x.pythonVersion,b,r,g):await Et(i,b,r,g,p);if(await Rt(i,x.installMethod),await Ct(i,x.installMethod),b.succeed("RapidKit environment ready!"),!o.skipGit){b.start("Initializing git repository");try{await execa("git",["init"],{cwd:i}),await execa("git",["add","."],{cwd:i}),await execa("git",["commit","-m","Initial commit: RapidKit environment"],{cwd:i}),b.succeed("Git repository initialized");}catch{b.warn("Could not initialize git repository");}}try{let{registerWorkspace:k}=await import('./workspace-
|
|
126
|
+
`)),process.exit(1));}a.step(1,3,"Setting up RapidKit environment");let b=J("Creating directory").start();try{await v.ensureDir(i),b.succeed("Directory created"),b.start("Detecting Python version");let w=null,_=await _t(x.pythonVersion);if(_)w=await ft(_),w?(a.info(` Detected Python ${w}`),b.succeed(`Python ${w} detected`)):b.warn("Could not detect exact Python version");else {let k=$();w=await ft(k),w?b.succeed(`Python ${w} detected`):b.warn("Could not detect Python version, proceeding with defaults");}if(x.installMethod==="poetry"&&!await It()&&(b.warn("Poetry not found \u2014 auto-fallback to pip + venv"),x.installMethod="venv"),await at(i,d,x.installMethod,w||void 0),w&&await Dt(i,w),await lt(i,d,x.installMethod,w||x.pythonVersion,u||h),await Q(i),await st(i,d),x.installMethod==="poetry")try{await jt(i,x.pythonVersion,b,r,g,p);}catch(k){let j=k?.details||k?.message||String(k);if(j.includes("pyenv")||j.includes("exit status 127")||j.includes("returned non-zero exit status 127")){b.warn("Poetry encountered Python discovery issues, trying venv method"),a.debug(`Poetry error (attempting venv fallback): ${j}`);try{await dt(i,x.pythonVersion,b,r,g),x.installMethod="venv";}catch(pt){throw pt}}else throw k}else x.installMethod==="venv"?await dt(i,x.pythonVersion,b,r,g):await Et(i,b,r,g,p);if(await Rt(i,x.installMethod),await Ct(i,x.installMethod),b.succeed("RapidKit environment ready!"),!o.skipGit){b.start("Initializing git repository");try{await execa("git",["init"],{cwd:i}),await execa("git",["add","."],{cwd:i}),await execa("git",["commit","-m","Initial commit: RapidKit environment"],{cwd:i}),b.succeed("Git repository initialized");}catch{b.warn("Could not initialize git repository");}}try{let{registerWorkspace:k}=await import('./workspace-M2Y2ZVTK.js');await k(i,d);}catch{console.warn(n.gray("Note: Could not register workspace in shared registry"));}if(console.log(n.green(`
|
|
127
127
|
\u2728 RapidKit environment created successfully!
|
|
128
128
|
`)),console.log(n.cyan("\u{1F4C2} Location:"),n.white(i)),console.log(n.cyan(`\u{1F680} Get started:
|
|
129
129
|
`)),console.log(n.white(` cd ${d}`)),x.installMethod==="poetry"){let k="source $(poetry env info --path)/bin/activate";try{T();let{stdout:j}=await execa("poetry",["--version"]),A=j.match(/Poetry.*?(\d+)\.(\d+)/);A&&(parseInt(A[1])>=2?k="source $(poetry env info --path)/bin/activate":k="poetry shell");}catch{}console.log(n.white(` ${k} # Or: poetry run rapidkit`)),console.log(n.white(" rapidkit create # Interactive mode")),console.log(n.white(" cd <project-name>")),console.log(n.white(" rapidkit init")),console.log(n.white(" rapidkit dev"));}else x.installMethod==="venv"?(console.log(n.white(" source .venv/bin/activate # On Windows: .venv\\Scripts\\activate")),console.log(n.white(" rapidkit create # Interactive mode")),console.log(n.white(" cd <project-name>")),console.log(n.white(" rapidkit init")),console.log(n.white(" rapidkit dev"))):(console.log(n.white(" rapidkit create # Interactive mode")),console.log(n.white(" cd <project-name>")),console.log(n.white(" rapidkit init")),console.log(n.white(" rapidkit dev")));console.log(n.white(`
|
|
@@ -164,7 +164,7 @@ Possible solutions:
|
|
|
164
164
|
1. Check your internet connection
|
|
165
165
|
2. Try installing manually: cd ${m.basename(t)} && ${f(".venv")} -m pip install rapidkit-core
|
|
166
166
|
3. Use Poetry instead: npx rapidkit ${m.basename(t)} --install-method=poetry`))}}e.succeed("RapidKit installed in project virtualenv");try{let{checkRapidkitCoreAvailable:y}=await import('./pythonRapidkitExec-K2SFGAYJ.js');if(!await y()&&!r){e.start("Checking optional global pipx installation");let d=await X(e,true);try{e.start("Installing RapidKit globally with pipx for CLI access"),await O(d,["install","rapidkit-core"]),e.succeed("RapidKit installed globally");}catch(i){e.warn("Could not install globally (non-fatal, project virtualenv has RapidKit)"),a.debug(`pipx install failed: ${i}`);}}}catch(y){e.succeed("Skipped optional global pipx installation"),a.debug(`Global install check skipped: ${y}`);}}async function Et(t,o,e,r,a$1=false){let c=await X(o,a$1);if(o.start("Installing RapidKit globally with pipx"),e){let p=L(r||{});if(!p)throw new I("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a.debug(`Installing from local path: ${p}`),o.text="Installing RapidKit from local path (test mode)",await O(c,["install","-e",p]);}else {o.text="Installing RapidKit from PyPI";try{await O(c,["install","rapidkit-core"]);}catch{throw new K}}o.succeed("RapidKit installed globally"),await v.outputFile(m.join(t,".rapidkit-global"),`RapidKit installed globally with pipx
|
|
167
|
-
`,"utf-8");}async function xe(t,o){let{skipGit:e=false,testMode:r=false,userConfig:a$1={},yes:c=false,installMethod:p,pythonVersion:g="3.10"}=o||{},y=p||a$1.defaultInstallMethod||await(async()=>{try{return await execa("poetry",["--version"],{timeout:3e3}),"poetry"}catch{return a.warn("Poetry not found \u2014 auto-selecting venv. Pass --install-method poetry to override."),"venv"}})(),h=y==="poetry"&&!await It()?"venv":y;await at(t,m.basename(t),h),await Q(t),await lt(t,m.basename(t),h,g,o?.profile);let d=J("Registering workspace").start();try{h==="poetry"?(await st(t,m.basename(t)),await jt(t,g,d,r,a$1,c)):h==="venv"?await dt(t,g,d,r,a$1):await Et(t,d,r,a$1,c),await Rt(t,h),await Ct(t,h),d.succeed("Workspace registered");try{let{registerWorkspace:i}=await import('./workspace-
|
|
167
|
+
`,"utf-8");}async function xe(t,o){let{skipGit:e=false,testMode:r=false,userConfig:a$1={},yes:c=false,installMethod:p,pythonVersion:g="3.10"}=o||{},y=p||a$1.defaultInstallMethod||await(async()=>{try{return await execa("poetry",["--version"],{timeout:3e3}),"poetry"}catch{return a.warn("Poetry not found \u2014 auto-selecting venv. Pass --install-method poetry to override."),"venv"}})(),h=y==="poetry"&&!await It()?"venv":y;await at(t,m.basename(t),h),await Q(t),await lt(t,m.basename(t),h,g,o?.profile);let d=J("Registering workspace").start();try{h==="poetry"?(await st(t,m.basename(t)),await jt(t,g,d,r,a$1,c)):h==="venv"?await dt(t,g,d,r,a$1):await Et(t,d,r,a$1,c),await Rt(t,h),await Ct(t,h),d.succeed("Workspace registered");try{let{registerWorkspace:i}=await import('./workspace-M2Y2ZVTK.js');await i(t,m.basename(t));}catch{}if(!e){d.start("Initializing git repository");try{await execa("git",["init"],{cwd:t}),await execa("git",["add","."],{cwd:t}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:t}),d.succeed("Git repository initialized");}catch{d.warn("Could not initialize git repository");}}}catch(i){throw d.fail("Failed to register workspace"),i}}async function Ct(t,o){let e=o==="poetry"?`source $(poetry env info --path)/bin/activate
|
|
168
168
|
# Or simply use: poetry run rapidkit <command>`:o==="venv"?"source .venv/bin/activate # On Windows: .venv\\Scripts\\activate":"N/A (globally installed)",r=o==="poetry"?`# No activation needed (recommended):
|
|
169
169
|
./rapidkit --help
|
|
170
170
|
# or:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{h as createProject,i as registerWorkspaceAtPath,f as syncWorkspaceFoundationFiles,g as writeWorkspaceLauncher}from'./chunk-
|
|
1
|
+
export{h as createProject,i as registerWorkspaceAtPath,f as syncWorkspaceFoundationFiles,g as writeWorkspaceLauncher}from'./chunk-CD534JH4.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
declare function handleCreateOrFallback(args: string[]): Promise<number>;
|
|
3
3
|
declare const NPM_ONLY_TOP_LEVEL_COMMANDS: readonly ["doctor", "workspace", "bootstrap", "setup", "cache", "mirror", "ai", "config", "shell"];
|
|
4
|
+
declare const WRAPPER_ORCHESTRATED_PROJECT_COMMANDS: readonly ["init"];
|
|
4
5
|
declare function handleBootstrapCommand(args: string[], initRunner?: (nextArgs: string[]) => Promise<number>): Promise<number>;
|
|
5
6
|
declare function handleSetupCommand(args: string[]): Promise<number>;
|
|
6
7
|
declare function handleCacheCommand(args: string[]): Promise<number>;
|
|
@@ -8,4 +9,4 @@ declare function handleMirrorCommand(args: string[]): Promise<number>;
|
|
|
8
9
|
declare function handleInitCommand(args: string[]): Promise<number>;
|
|
9
10
|
declare function shouldForwardToCore(args: string[]): Promise<boolean>;
|
|
10
11
|
|
|
11
|
-
export { NPM_ONLY_TOP_LEVEL_COMMANDS, handleBootstrapCommand, handleCacheCommand, handleCreateOrFallback, handleInitCommand, handleMirrorCommand, handleSetupCommand, shouldForwardToCore };
|
|
12
|
+
export { NPM_ONLY_TOP_LEVEL_COMMANDS, WRAPPER_ORCHESTRATED_PROJECT_COMMANDS, handleBootstrapCommand, handleCacheCommand, handleCreateOrFallback, handleInitCommand, handleMirrorCommand, handleSetupCommand, shouldForwardToCore };
|