rapidkit 0.28.0 → 0.29.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 +63 -20
- package/dist/{autopilot-release-AITKKEK7.js → autopilot-release-OXPBKTUE.js} +1 -1
- package/dist/{create-TWGGH5XC.js → create-RDLT34XT.js} +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +180 -175
- package/dist/{workspace-YKWUI37R.js → workspace-2JHFIZ3J.js} +1 -1
- package/dist/workspace-run-7BBFCVLB.js +1 -0
- package/package.json +4 -2
- package/dist/workspace-run-OFT4T3NU.js +0 -1
- /package/dist/{chunk-TXJX4GUZ.js → chunk-7IOVUL7V.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {a as a$1}from'./chunk-VKLL63TL.js';import {c}from'./chunk-NFUXULIF.js';import {j as j$1}from'./chunk-Z5LKRG57.js';import {b as b$1}from'./chunk-AC6KIKII.js';import {promises}from'fs';import a from'path';import i from'chalk';import b from'ora';import {execa}from'execa';function j(e){let t=a.resolve(e);return process.platform==="win32"?t.toLowerCase():t}function A(e){let t=j(e.path),r=Array.isArray(e.projects)?e.projects:[],o=[],n=new Set;for(let s of r){if(!s||typeof s.name!="string"||typeof s.path!="string")continue;let c=j(s.path);n.has(c)||(n.add(c),o.push({name:s.name,path:c}));}return {name:e.name,path:t,mode:e.mode,projects:o}}function x(e){let t=[],r=new Set;for(let o of e.workspaces||[]){if(!o||typeof o.name!="string"||typeof o.path!="string")continue;let n=A(o);r.has(n.path)||(r.add(n.path),t.push(n));}return {workspaces:t}}async function F(e,t){try{let r=j(e),o=j$1(),n=a.join(o,"workspaces.json");await promises.mkdir(o,{recursive:true});let s={workspaces:[]};try{let p=await promises.readFile(n,"utf8"),d=JSON.parse(p);d&&Array.isArray(d.workspaces)&&(s=x(d));}catch{}s.workspaces.some(p=>p.path===r)||(s.workspaces.push({name:t,path:r,mode:"full",projects:[]}),await promises.writeFile(n,JSON.stringify(s,null,2)));}catch{console.warn(i.gray("Note: Could not register workspace in shared registry"));}}async function re(e,t=false){try{let r=j(e),o=j$1(),n=a.join(o,"workspaces.json"),s={workspaces:[]};try{let g=await promises.readFile(n,"utf8"),f=JSON.parse(g);f&&Array.isArray(f.workspaces)&&(s=x(f));}catch{t||console.log("\u26A0\uFE0F Workspace registry not found");return}let c=s.workspaces.find(g=>g.path===r);if(!c){t||console.log("\u26A0\uFE0F Workspace not registered in registry");return}Array.isArray(c.projects)||(c.projects=[]);let p=0,d=0,u=[e],m=new Set;for(;u.length>0;){let g=u.shift();if(!g||m.has(g))continue;m.add(g);let f=await promises.readdir(g,{withFileTypes:true});for(let y of f){if(!y.isDirectory()||y.name.startsWith(".")||["node_modules","dist","build","target","coverage","htmlcov"].includes(y.name))continue;let k=a.join(g,y.name),h=j(k),v=a.join(h,".rapidkit","context.json"),E=a.join(h,".rapidkit","project.json");try{let _=false;try{await promises.access(v),_=true;}catch{await promises.access(E),_=true;}if(_){let $=a.basename(h);c.projects.some(R=>R.path===h||R.name===$)?d++:(c.projects.push({name:$,path:h}),p++,t||console.log(`\u2714 Added: ${a.relative(e,h)}`));continue}}catch{}u.push(k);}}p>0?(await promises.writeFile(n,JSON.stringify(s,null,2)),t||console.log(`
|
|
2
2
|
\u2705 Synced ${p} project(s) to registry`)):t||console.log(`
|
|
3
|
-
\u2705 All projects already registered (${d} found)`);}catch(r){t||console.error("\u274C Failed to sync projects:",r.message);}}async function ie(e,t,r){try{let o=j(e),n=j(r),s=j$1(),c=a.join(s,"workspaces.json"),p={workspaces:[]};try{let m=await promises.readFile(c,"utf8"),g=JSON.parse(m);g&&Array.isArray(g.workspaces)&&(p=x(g));}catch{return}let d=p.workspaces.find(m=>m.path===o);if(!d)return;Array.isArray(d.projects)||(d.projects=[]),d.projects.some(m=>m.path===n||m.name===t)||(d.projects.push({name:t,path:n}),await promises.writeFile(c,JSON.stringify(p,null,2)));}catch{}}async function oe(e,t){let r=b("Creating RapidKit workspace...").start();try{await promises.mkdir(e,{recursive:true}),await promises.mkdir(a.join(e,".rapidkit"),{recursive:true});let o={workspace_name:t.name,author:t.author,rapidkit_version:b$1(),created_at:new Date().toISOString(),type:"workspace"};await promises.writeFile(a.join(e,".rapidkit","config.json"),JSON.stringify(o,null,2));let{syncWorkspaceFoundationFiles:n}=await import('./create-
|
|
3
|
+
\u2705 All projects already registered (${d} found)`);}catch(r){t||console.error("\u274C Failed to sync projects:",r.message);}}async function ie(e,t,r){try{let o=j(e),n=j(r),s=j$1(),c=a.join(s,"workspaces.json"),p={workspaces:[]};try{let m=await promises.readFile(c,"utf8"),g=JSON.parse(m);g&&Array.isArray(g.workspaces)&&(p=x(g));}catch{return}let d=p.workspaces.find(m=>m.path===o);if(!d)return;Array.isArray(d.projects)||(d.projects=[]),d.projects.some(m=>m.path===n||m.name===t)||(d.projects.push({name:t,path:n}),await promises.writeFile(c,JSON.stringify(p,null,2)));}catch{}}async function oe(e,t){let r=b("Creating RapidKit workspace...").start();try{await promises.mkdir(e,{recursive:true}),await promises.mkdir(a.join(e,".rapidkit"),{recursive:true});let o={workspace_name:t.name,author:t.author,rapidkit_version:b$1(),created_at:new Date().toISOString(),type:"workspace"};await promises.writeFile(a.join(e,".rapidkit","config.json"),JSON.stringify(o,null,2));let{syncWorkspaceFoundationFiles:n}=await import('./create-RDLT34XT.js');await n(e,{workspaceName:t.name,installMethod:"venv",writeMarker:true,writeGitignore:false,onlyIfMissing:true});let s=O();await promises.writeFile(a.join(e,"rapidkit"),s),await promises.chmod(a.join(e,"rapidkit"),493);let c=B();await promises.writeFile(a.join(e,"rapidkit.cmd"),c);let p=T(t.name);if(await promises.writeFile(a.join(e,"README.md"),p),await promises.writeFile(a.join(e,".gitignore"),`# RapidKit workspace
|
|
4
4
|
.env
|
|
5
5
|
.env.*
|
|
6
6
|
!.env.example
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as runWorkspaceStage}from'./chunk-7IOVUL7V.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rapidkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Official CLI for RapidKit, an open-source workspace platform that standardizes how teams build, scale, and deploy backend services.",
|
|
6
6
|
"keywords": [
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"ai",
|
|
10
10
|
"cli",
|
|
11
11
|
"create",
|
|
12
|
+
"workspace",
|
|
12
13
|
"fastapi",
|
|
13
14
|
"nestjs",
|
|
14
15
|
"springboot",
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
"gogin",
|
|
18
19
|
"backend",
|
|
19
20
|
"microservices",
|
|
21
|
+
"api",
|
|
20
22
|
"generator",
|
|
21
23
|
"scaffold"
|
|
22
24
|
],
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
"license": "MIT",
|
|
25
27
|
"repository": {
|
|
26
28
|
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/
|
|
29
|
+
"url": "git+https://github.com/rapidkitlabs/rapidkit-npm.git"
|
|
28
30
|
},
|
|
29
31
|
"bin": {
|
|
30
32
|
"rapidkit": "dist/index.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as runWorkspaceStage}from'./chunk-TXJX4GUZ.js';
|
|
File without changes
|