rapidkit 0.25.0 → 0.25.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/README.md +13 -1
- package/dist/{chunk-T62GANVU.js → chunk-3MJ2BD56.js} +57 -57
- package/dist/{chunk-D46IWAXH.js → chunk-UOGFCKQ5.js} +1 -1
- package/dist/chunk-Z5LKRG57.js +1 -0
- package/dist/{create-EFY5NQWP.js → create-PELQEDCF.js} +1 -1
- package/dist/index.js +147 -147
- package/dist/package.json +1 -1
- package/dist/{pythonRapidkitExec-7LPE3JUQ.js → pythonRapidkitExec-K2SFGAYJ.js} +1 -1
- package/dist/{workspace-J5UUDMHW.js → workspace-PIBFBNRA.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-FXRDNZGB.js +0 -1
package/dist/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "rapidkit",
|
|
3
3
|
"version": "0.25.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Official CLI for RapidKit, an open-source workspace platform that standardizes how teams build, scale, and deploy backend services.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"rapidkit",
|
|
8
8
|
"cli",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{j as __test__,b as checkRapidkitCoreAvailable,h as getCachedCoreTopLevelCommands,g as getCoreTopLevelCommands,i as getModulesCatalog,c as resolveRapidkitPython,d as runCoreRapidkit,f as runCoreRapidkitCapture,e as runCoreRapidkitStreamed}from'./chunk-
|
|
1
|
+
export{j as __test__,b as checkRapidkitCoreAvailable,h as getCachedCoreTopLevelCommands,g as getCoreTopLevelCommands,i as getModulesCatalog,c as resolveRapidkitPython,d as runCoreRapidkit,f as runCoreRapidkitCapture,e as runCoreRapidkitStreamed}from'./chunk-UOGFCKQ5.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {c}from'./chunk-N64Z3XVF.js';import {j}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-N64Z3XVF.js';import {j}from'./chunk-Z5LKRG57.js';import {promises}from'fs';import d from'path';import r from'chalk';import w from'ora';import {execa}from'execa';function $(e){let t=d.resolve(e);return process.platform==="win32"?t.toLowerCase():t}function N(e){let t=$(e.path),i=Array.isArray(e.projects)?e.projects:[],a=[],o=new Set;for(let c of i){if(!c||typeof c.name!="string"||typeof c.path!="string")continue;let n=$(c.path);o.has(n)||(o.add(n),a.push({name:c.name,path:n}));}return {name:e.name,path:t,mode:e.mode,projects:a}}function v(e){let t=[],i=new Set;for(let a of e.workspaces||[]){if(!a||typeof a.name!="string"||typeof a.path!="string")continue;let o=N(a);i.has(o.path)||(i.add(o.path),t.push(o));}return {workspaces:t}}async function S(e,t){try{let i=$(e),a=j(),o=d.join(a,"workspaces.json");await promises.mkdir(a,{recursive:true});let c={workspaces:[]};try{let s=await promises.readFile(o,"utf8"),m=JSON.parse(s);m&&Array.isArray(m.workspaces)&&(c=v(m));}catch{}c.workspaces.some(s=>s.path===i)||(c.workspaces.push({name:t,path:i,mode:"full",projects:[]}),await promises.writeFile(o,JSON.stringify(c,null,2)));}catch{console.warn(r.gray("Note: Could not register workspace in shared registry"));}}async function z(e,t=false){try{let i=$(e),a=j(),o=d.join(a,"workspaces.json"),c={workspaces:[]};try{let p=await promises.readFile(o,"utf8"),g=JSON.parse(p);g&&Array.isArray(g.workspaces)&&(c=v(g));}catch{t||console.log("\u26A0\uFE0F Workspace registry not found");return}let n=c.workspaces.find(p=>p.path===i);if(!n){t||console.log("\u26A0\uFE0F Workspace not registered in registry");return}Array.isArray(n.projects)||(n.projects=[]);let s=await promises.readdir(e,{withFileTypes:true}),m=0,h=0;for(let p of s)if(p.isDirectory()&&!p.name.startsWith(".")){let g=$(d.join(e,p.name)),C=d.join(g,".rapidkit","context.json"),j=d.join(g,".rapidkit","project.json");try{let k=false;try{await promises.access(C),k=true;}catch{await promises.access(j),k=true;}k&&(n.projects.some(x=>x.path===g||x.name===p.name)?h++:(n.projects.push({name:p.name,path:g}),m++,t||console.log(`\u2714 Added: ${p.name}`)));}catch{}}m>0?(await promises.writeFile(o,JSON.stringify(c,null,2)),t||console.log(`
|
|
2
2
|
\u2705 Synced ${m} project(s) to registry`)):t||console.log(`
|
|
3
3
|
\u2705 All projects already registered (${h} found)`);}catch(i){t||console.error("\u274C Failed to sync projects:",i.message);}}async function J(e,t,i){try{let a=$(e),o=$(i),c=j(),n=d.join(c,"workspaces.json"),s={workspaces:[]};try{let p=await promises.readFile(n,"utf8"),g=JSON.parse(p);g&&Array.isArray(g.workspaces)&&(s=v(g));}catch{return}let m=s.workspaces.find(p=>p.path===a);if(!m)return;Array.isArray(m.projects)||(m.projects=[]),m.projects.some(p=>p.path===o||p.name===t)||(m.projects.push({name:t,path:o}),await promises.writeFile(n,JSON.stringify(s,null,2)));}catch{}}async function K(e,t){let i=w("Creating RapidKit workspace...").start();try{await promises.mkdir(e,{recursive:true}),await promises.mkdir(d.join(e,".rapidkit"),{recursive:true});let a={workspace_name:t.name,author:t.author,rapidkit_version:c(),created_at:new Date().toISOString(),type:"workspace"};await promises.writeFile(d.join(e,".rapidkit","config.json"),JSON.stringify(a,null,2));let o=E();await promises.writeFile(d.join(e,"rapidkit"),o),await promises.chmod(d.join(e,"rapidkit"),493);let c$1=A(t.name);if(await promises.writeFile(d.join(e,"README.md"),c$1),await promises.writeFile(d.join(e,".gitignore"),`# RapidKit workspace
|
|
4
4
|
.env
|
package/package.json
CHANGED
package/dist/chunk-FXRDNZGB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import p from'os';import r from'path';function a(o=process.platform){return o==="win32"?"windows":o==="linux"?"linux":o==="darwin"?"macos":"other"}function n(o=process.platform){return a(o)==="windows"}function u(o=process.platform){return n(o)}function l(o=process.platform){return n(o)?"python":"python3"}function g(o=process.platform){return n(o)?["python","py","python3"]:["python3","python"]}function h(o=14,t=10,s=process.platform){let i=[];if(n(s)){for(let e=o;e>=t;e-=1)i.push({command:"py",args:[`-3.${e}`,"--version"]});return i.push({command:"py",args:["-3","--version"]}),i.push({command:"python",args:["--version"]}),i}for(let e=o;e>=t;e-=1)i.push({command:`python3.${e}`,args:["--version"]});return i.push({command:"python3",args:["--version"]}),i.push({command:"python",args:["--version"]}),i}function P(o,t=process.platform){return n(t)?r.join(o,"Scripts","python.exe"):r.join(o,"bin","python")}function y(o,t=process.platform){return n(t)?r.join(o,"Scripts","rapidkit.exe"):r.join(o,"bin","rapidkit")}function S(o,t=process.platform){return n(t)?r.join(o,"Scripts","activate"):r.join(o,"bin","activate")}function x(o,t=process.platform){return n(t)?[r.join(o,"rapidkit.cmd"),r.join(o,".rapidkit","rapidkit.cmd")]:[r.join(o,"rapidkit"),r.join(o,".rapidkit","rapidkit")]}function j(o=process.env,t=process.platform){let s=o.XDG_CONFIG_HOME||o.APPDATA||r.join(p.homedir(),".config");return n(t)?r.join(s,"rapidkit"):r.join(p.homedir(),".rapidkit")}export{n as a,u as b,l as c,g as d,h as e,P as f,y as g,S as h,x as i,j};
|