rapidkit 0.27.6 → 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.
@@ -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-TWGGH5XC.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
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.27.6",
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/getrapidkit/rapidkit-npm.git"
29
+ "url": "git+https://github.com/rapidkitlabs/rapidkit-npm.git"
28
30
  },
29
31
  "bin": {
30
32
  "rapidkit": "dist/index.js"
package/dist/package.json DELETED
@@ -1,142 +0,0 @@
1
- {
2
- "name": "rapidkit",
3
- "version": "0.27.6",
4
- "type": "module",
5
- "description": "Official CLI for RapidKit, an open-source workspace platform that standardizes how teams build, scale, and deploy backend services.",
6
- "keywords": [
7
- "rapidkit",
8
- "workspai",
9
- "ai",
10
- "cli",
11
- "create",
12
- "fastapi",
13
- "nestjs",
14
- "springboot",
15
- "spring",
16
- "gofiber",
17
- "gogin",
18
- "backend",
19
- "microservices",
20
- "generator",
21
- "scaffold"
22
- ],
23
- "author": "RapidKit Team",
24
- "license": "MIT",
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/getrapidkit/rapidkit-npm.git"
28
- },
29
- "bin": {
30
- "rapidkit": "dist/index.js"
31
- },
32
- "files": [
33
- "dist",
34
- "scripts/enforce-package-manager.cjs"
35
- ],
36
- "publishConfig": {
37
- "registry": "https://registry.npmjs.org",
38
- "access": "public"
39
- },
40
- "scripts": {
41
- "preinstall": "node scripts/enforce-package-manager.cjs",
42
- "sync-kits": "bash scripts/sync-kits.sh",
43
- "build": "tsup",
44
- "build:watch": "tsup --watch",
45
- "dev": "tsup --watch",
46
- "dev:local": "npm run build && npm link",
47
- "install:local": "npm unlink -g rapidkit && npm run build && npm link",
48
- "uninstall:local": "npm unlink -g rapidkit",
49
- "prepare": "husky",
50
- "test:e2e:first-install": "bash scripts/e2e-first-install.sh",
51
- "test:e2e:user-first-install": "bash scripts/e2e-user-first-install.sh",
52
- "test": "vitest run",
53
- "test:drift": "RAPIDKIT_DRIFT_GUARD=1 vitest run src/__tests__/drift-guard.test.ts",
54
- "sync:parity-snapshot": "node scripts/sync-import-stack-parity-snapshot.mjs",
55
- "check:parity-snapshot": "node scripts/sync-import-stack-parity-snapshot.mjs --check",
56
- "test:parity-contract": "npm run sync:parity-snapshot -- --npm-only && vitest run src/__tests__/contracts/import-stack-parity.snapshot.test.ts",
57
- "test:watch": "vitest",
58
- "test:coverage": "vitest run --coverage",
59
- "test:prepare-embeddings": "npx tsx scripts/generate-mock-embeddings.ts",
60
- "test:e2e": "vitest run src/__tests__/e2e.test.ts",
61
- "test:scenarios": "bash scripts/scenario-matrix-local.sh",
62
- "test:scenarios:full": "RAPIDKIT_SCENARIO_FULL_BOOTSTRAP=1 bash scripts/scenario-matrix-local.sh",
63
- "test:scenarios:docker": "bash scripts/scenario-matrix.sh",
64
- "lint": "eslint src --ext .ts",
65
- "lint:fix": "eslint src --ext .ts --fix",
66
- "format": "prettier --write \"src/**/*.ts\"",
67
- "format:check": "prettier --check \"src/**/*.ts\"",
68
- "typecheck": "tsc --noEmit",
69
- "validate": "npm run typecheck && npm run lint && npm run format:check && npm test",
70
- "security": "npm audit --audit-level=moderate",
71
- "security:fix": "npm audit fix",
72
- "metrics": "npx tsx scripts/metrics.ts",
73
- "validate:docs-examples": "node scripts/validate-doc-examples.mjs",
74
- "check:markdown-links": "node scripts/check-markdown-links.mjs",
75
- "check:docs-drift": "node scripts/docs-drift-guard.mjs",
76
- "smoke:readme": "node scripts/smoke-readme-commands.mjs",
77
- "validate:docs": "npm run check:markdown-links && npm run check:docs-drift && npm run validate:docs-examples && npm run smoke:readme",
78
- "sync:contracts": "node scripts/sync-contracts.mjs",
79
- "check:contracts": "node scripts/sync-contracts.mjs --check",
80
- "bundle-size": "npm run build && du -sh dist/ && ls -lh dist/",
81
- "analyze": "npm run build && node scripts/analyze-dist.mjs",
82
- "size-check": "npm run build && size-limit",
83
- "bench": "npx tsx scripts/benchmarks.ts",
84
- "quality": "npm run typecheck && npm run lint && npm run format:check && npm test && npm run size-check",
85
- "act-matrix": "act -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-22.04 -P macos-latest=ghcr.io/catthehacker/ubuntu:act-22.04 -P windows-latest=ghcr.io/catthehacker/ubuntu:act-22.04 --pull=false -j build-test-matrix",
86
- "release:dry": "bash scripts/release.sh --no-publish --yes --allow-dirty",
87
- "release:patch": "bash scripts/release.sh patch",
88
- "release:minor": "bash scripts/release.sh minor",
89
- "release:major": "bash scripts/release.sh major"
90
- },
91
- "dependencies": {
92
- "chalk": "^5.3.0",
93
- "cli-progress": "^3.12.0",
94
- "commander": "^12.1.0",
95
- "execa": "^9.3.1",
96
- "fs-extra": "^11.2.0",
97
- "inquirer": "^13.2.2",
98
- "nunjucks": "^3.2.4",
99
- "openai": "^6.22.0",
100
- "ora": "^8.0.1",
101
- "validate-npm-package-name": "^5.0.1"
102
- },
103
- "devDependencies": {
104
- "@eslint/eslintrc": "^3.3.3",
105
- "@size-limit/preset-big-lib": "^12.0.0",
106
- "@types/cli-progress": "^3.11.6",
107
- "@types/fs-extra": "^11.0.4",
108
- "@types/inquirer": "^9.0.7",
109
- "@types/node": "^20.14.0",
110
- "@types/nunjucks": "^3.2.6",
111
- "@types/validate-npm-package-name": "^4.0.2",
112
- "@typescript-eslint/eslint-plugin": "^8.46.2",
113
- "@typescript-eslint/parser": "^8.46.2",
114
- "@vitest/coverage-v8": "^4.0.15",
115
- "@vitest/ui": "^4.0.15",
116
- "eslint": "^9.39.2",
117
- "husky": "^9.1.7",
118
- "lint-staged": "^15.5.2",
119
- "prettier": "^3.6.2",
120
- "size-limit": "^12.0.0",
121
- "tsup": "^8.5.0",
122
- "typescript": "^5.5.0",
123
- "vite-bundle-visualizer": "^1.2.1",
124
- "vitest": "^4.0.15"
125
- },
126
- "optionalDependencies": {
127
- "@rollup/rollup-win32-x64-msvc": "*"
128
- },
129
- "engines": {
130
- "node": ">=20.19.6"
131
- },
132
- "lint-staged": {
133
- "*.ts": [
134
- "eslint --fix",
135
- "prettier --write"
136
- ]
137
- },
138
- "overrides": {
139
- "minimatch": "^10.2.1"
140
- },
141
- "packageManager": "npm@10.8.2"
142
- }