rapidkit 0.34.0 → 0.36.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 +137 -706
- package/contracts/backend-import-stack-parity.snapshot.json +36 -36
- package/contracts/infra-stack.v1.json +190 -47
- package/contracts/module-layout.v1.json +12 -3
- package/contracts/module-support.v1.json +20 -0
- package/contracts/runtime-command-surface.v1.json +139 -22
- package/contracts/workspace-intelligence/workspace-context.v1.json +59 -0
- package/contracts/workspace-intelligence/workspace-impact.v1.json +84 -0
- package/contracts/workspace-intelligence/workspace-model-diff.v1.json +105 -0
- package/contracts/workspace-intelligence/workspace-model-snapshot.v1.json +36 -0
- package/contracts/workspace-intelligence/workspace-model.v1.json +50 -0
- package/contracts/workspace-intelligence/workspace-verify.v1.json +111 -0
- package/dist/analyze-HXO6R656.js +1 -0
- package/dist/autopilot-release-FMQ5KND5.js +1 -0
- package/dist/chunk-45KNNNAB.js +2 -0
- package/dist/chunk-7ZSURMR2.js +4 -0
- package/dist/chunk-A5FBGRJA.js +1 -0
- package/dist/{chunk-3TBSWOTY.js → chunk-DC44JPI3.js} +13 -13
- package/dist/chunk-HHJAANUC.js +1 -0
- package/dist/{chunk-2PGMJSO5.js → chunk-HUQ5WRUF.js} +86 -86
- package/dist/chunk-KIB4KHBF.js +3 -0
- package/dist/chunk-KMUWWZRT.js +1 -0
- package/dist/chunk-MCLLP6MW.js +2 -0
- package/dist/chunk-OCGZNSOE.js +1 -0
- package/dist/chunk-TC2PSHT6.js +50 -0
- package/dist/chunk-UY4LZEXK.js +7 -0
- package/dist/chunk-UZW5QFRW.js +5 -0
- package/dist/chunk-VPNHGQIV.js +1 -0
- package/dist/chunk-Y2ZPG7KN.js +9 -0
- package/dist/chunk-YBS2HGO3.js +2 -0
- package/dist/chunk-YJ24EV3P.js +1 -0
- package/dist/create-7R4CGABE.js +1 -0
- package/dist/{doctor-3SBEO7XU.js → doctor-DG3TBPZN.js} +1 -1
- package/dist/imported-projects-registry-ZOCHFWMK.js +1 -0
- package/dist/index.d.ts +29 -2
- package/dist/index.js +135 -129
- package/dist/module-layout-NZ43RSC5.js +1 -0
- package/dist/pipeline-23AEXNF2.js +5 -0
- package/dist/{workspace-AG2MQFTY.js → workspace-ZDL5IQU4.js} +1 -1
- package/dist/workspace-context-YFQQROOZ.js +2 -0
- package/dist/{workspace-contract-Z5VYUF3T.js → workspace-contract-A6QP7FPA.js} +1 -1
- package/dist/workspace-foundation-QVWALXMP.js +1 -0
- package/dist/workspace-intelligence-VLA2RILM.js +1 -0
- package/dist/workspace-model-OO4WOBJS.js +1 -0
- package/dist/workspace-run-NIKH2IKF.js +1 -0
- package/dist/workspace-verify-XEXRCET7.js +1 -0
- package/package.json +14 -4
- package/dist/analyze-SVYRQNLO.js +0 -1
- package/dist/autopilot-release-LBKCP73F.js +0 -1
- package/dist/chunk-4E6ZGX6V.js +0 -1
- package/dist/chunk-ILY6QARY.js +0 -9
- package/dist/chunk-JIECGCLV.js +0 -4
- package/dist/chunk-KXTXQODI.js +0 -5
- package/dist/chunk-QCZGNOTH.js +0 -2
- package/dist/chunk-QUNCXYYK.js +0 -1
- package/dist/chunk-RGXFDBYB.js +0 -7
- package/dist/chunk-SAIWD6VM.js +0 -3
- package/dist/chunk-Y3UKTEZO.js +0 -2
- package/dist/chunk-YV7IQDBM.js +0 -50
- package/dist/create-BO2I3ESU.js +0 -1
- package/dist/module-layout-J56LHEGH.js +0 -1
- package/dist/pipeline-VUQ6AXKF.js +0 -5
- package/dist/workspace-foundation-G74V6K4U.js +0 -1
- package/dist/workspace-run-EDM3SUPA.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1,c,i,g as g$1,h}from'./chunk-UZW5QFRW.js';import E from'fs';import a from'path';function S(e,t){let n=g$1({runtime:typeof e?.runtime=="string"?e.runtime:void 0,framework:typeof e?.framework=="string"?e.framework:void 0,kitName:typeof e?.kit_name=="string"?e.kit_name:typeof e?.kit=="string"?e.kit:void 0});return n.runtime!=="unknown"?n.runtime:i(t,e).runtime}function q(e){let t=e;for(;;){let n=a.join(t,".rapidkit","project.json");if(E.existsSync(n))try{return JSON.parse(E.readFileSync(n,"utf8"))}catch{return null}let r=a.dirname(t);if(r===t)break;t=r;}return null}function Ke(e,t){return S(e,t)==="go"}function Ge(e,t){return S(e,t)==="node"}function Je(e,t){return S(e,t)==="java"}function $e(e,t){return S(e,t)==="dotnet"}function We(e,t){return S(e,t)==="python"}var ue={dev:["dev","start:dev"],start:["start","start:prod","preview"],build:["build"],test:["test","test:unit","test:ci"],lint:["lint"],format:["format","prettier"]},H={nestjs:{dev:["dev","start:dev"],start:["start","start:prod"],build:["build"],test:["test","test:e2e"],lint:["lint"],format:["format"]},express:{dev:["dev","start:dev"],start:["start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},fastify:{dev:["dev","start:dev"],start:["start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},koa:{dev:["dev","start:dev"],start:["start"],build:["build"],test:["test"],lint:["lint"],format:["format"]}};function ce(e){let t=a.join(e,"package.json");if(!E.existsSync(t))return {};try{let r=JSON.parse(E.readFileSync(t,"utf8")).scripts??{};return Object.fromEntries(Object.entries(r).filter(i=>typeof i[1]=="string"))}catch{return {}}}function le(e,t){let n=t?c(t):"unknown",r=n!=="unknown"?a$1(n,e):[],i=t?H[t]?.[e]??[]:[],m=ue[e]??[],f=[...r,...i,...m];return [...new Set(f)]}function V(e,t,n){let r=ce(e),i=new Set(Object.keys(r));if(i.has(t))return {scriptName:t,source:"package.json"};for(let m of le(t,n?.framework))if(i.has(m))return {scriptName:m,source:a$1(c(n?.framework??"unknown"),t).includes(m)||H[n?.framework??""]?.[t]?.includes(m)?"framework-candidate":"generic-candidate"};return null}function F(e){return E.existsSync(a.join(e,"package.json"))}var de=["build","dev","start","test","lint","format"],O=["init","test","build","start"],Ze=["lint","format","docs"];function et(e){return !!e&&de.includes(e)}var g=["init","dev","start","build","test","lint","format","help"],X={python:{runtime:"python",displayName:"Python",tier:"first-class",scaffoldSupport:true,importSupport:true,lifecycleCommands:g,moduleCommands:true,doctorSupport:"full",notes:["Core-backed Python projects support RapidKit modules and lifecycle commands."]},node:{runtime:"node",displayName:"Node.js",tier:"extended",scaffoldSupport:true,importSupport:true,lifecycleCommands:g,moduleCommands:true,doctorSupport:"full",notes:["Node projects support npm-owned lifecycle commands; NestJS is the first-class Node framework."]},go:{runtime:"go",displayName:"Go",tier:"extended",scaffoldSupport:true,importSupport:true,lifecycleCommands:g,moduleCommands:false,doctorSupport:"readiness",notes:["Go projects support workspace governance and lifecycle commands via Go tooling."]},java:{runtime:"java",displayName:"Java / Spring Boot",tier:"extended",scaffoldSupport:true,importSupport:true,lifecycleCommands:g,moduleCommands:false,doctorSupport:"readiness",notes:["Java projects support Maven/Gradle lifecycle commands and workspace governance."]},dotnet:{runtime:"dotnet",displayName:".NET / ASP.NET Core",tier:"extended",scaffoldSupport:true,importSupport:true,lifecycleCommands:g,moduleCommands:false,doctorSupport:"readiness",notes:[".NET projects support dotnet CLI lifecycle commands and workspace governance."]},php:{runtime:"php",displayName:"PHP",tier:"observed",scaffoldSupport:false,importSupport:true,lifecycleCommands:["help"],moduleCommands:false,doctorSupport:"observed",notes:["PHP projects are importable and governed as observed projects until a kit exists."]},ruby:{runtime:"ruby",displayName:"Ruby",tier:"observed",scaffoldSupport:false,importSupport:true,lifecycleCommands:["help"],moduleCommands:false,doctorSupport:"observed",notes:["Ruby projects are importable and governed as observed projects until a kit exists."]},rust:{runtime:"rust",displayName:"Rust",tier:"observed",scaffoldSupport:false,importSupport:true,lifecycleCommands:["help"],moduleCommands:false,doctorSupport:"observed",notes:["Rust projects are importable and governed as observed projects until a kit exists."]},elixir:{runtime:"elixir",displayName:"Elixir",tier:"observed",scaffoldSupport:false,importSupport:true,lifecycleCommands:["help"],moduleCommands:false,doctorSupport:"observed",notes:["Elixir projects are importable and governed as observed projects until a kit exists."]},clojure:{runtime:"clojure",displayName:"Clojure",tier:"observed",scaffoldSupport:false,importSupport:true,lifecycleCommands:["help"],moduleCommands:false,doctorSupport:"observed",notes:["Clojure projects are importable and governed as observed projects until a kit exists."]},scala:{runtime:"scala",displayName:"Scala",tier:"observed",scaffoldSupport:false,importSupport:true,lifecycleCommands:["help"],moduleCommands:false,doctorSupport:"observed",notes:["Scala projects are importable and governed as observed projects until a kit exists."]},kotlin:{runtime:"kotlin",displayName:"Kotlin",tier:"observed",scaffoldSupport:false,importSupport:true,lifecycleCommands:["help"],moduleCommands:false,doctorSupport:"observed",notes:["Kotlin projects are importable and governed as observed projects until a kit exists."]},deno:{runtime:"deno",displayName:"Deno",tier:"observed",scaffoldSupport:false,importSupport:true,lifecycleCommands:["help"],moduleCommands:false,doctorSupport:"observed",notes:["Deno projects are importable and governed as observed projects until a kit exists."]},bun:{runtime:"bun",displayName:"Bun",tier:"observed",scaffoldSupport:false,importSupport:true,lifecycleCommands:["help"],moduleCommands:false,doctorSupport:"observed",notes:["Bun projects are importable and governed as observed projects until a kit exists."]},unknown:{runtime:"unknown",displayName:"Unknown",tier:"observed",scaffoldSupport:false,importSupport:true,lifecycleCommands:["help"],moduleCommands:false,doctorSupport:"observed",notes:["Unknown projects are tracked safely but require manual command configuration."]}},pe=["fastapi","nestjs"],fe=["django","flask","nextjs","remix","nuxt","react","vite","vue","sveltekit","svelte","angular","astro","solid","express","fastify","koa","echo","gofiber","gogin","springboot","dotnet","laravel","symfony","rails","sinatra","actix","axum","rocket","phoenix","clojure","scala","kotlin","deno","bun"];function x(e){return X[e||"unknown"]??X.unknown}function z(e){return pe.includes(e)?"first-class":fe.includes(e)?"extended":"observed"}function Q(e){let t=x(e.runtime);return {lifecycleCommands:t.lifecycleCommands,moduleCommands:e.moduleSupport&&t.moduleCommands,unsupportedLifecycleCommands:g.filter(n=>!t.lifecycleCommands.includes(n))}}var ye=["python","node","go","java","dotnet"];function b(e){return !!e&&ye.includes(e)}function N(e,t){return t!=="lint"&&t!=="format"&&t!=="docs"?false:e==="python"}function Z(e){let t=x(e),n=b(t.runtime),r=Ce[t.runtime]??[],i=ge[t.runtime]??[];return {runtime:t.runtime,displayName:t.displayName,lifecycleCommands:t.lifecycleCommands,hasExecutor:n,packageManagers:r,primaryFiles:i,notes:t.notes}}var Ce={python:["poetry","pip","uv"],node:["npm","pnpm","yarn","bun"],go:["go"],java:["maven","gradle"],dotnet:["dotnet"],php:["composer"],ruby:["bundle"],rust:["cargo"],elixir:["mix"],kotlin:["gradle"],deno:["deno"],bun:["bun"]},ge={python:["pyproject.toml","requirements.txt","requirements.in"],node:["package.json"],go:["go.mod"],java:["pom.xml","build.gradle","build.gradle.kts"],dotnet:["*.csproj","*.sln"],php:["composer.json"],ruby:["Gemfile"],rust:["Cargo.toml"],elixir:["mix.exs"],kotlin:["settings.gradle.kts"],deno:["deno.json","deno.jsonc"],bun:["package.json","bunfig.toml"]};function be(e){let t=a.join(e,".rapidkit","context.json");if(!E.existsSync(t))return null;try{return JSON.parse(E.readFileSync(t,"utf8"))}catch{return null}}function ke(e){let t=e?.engine;return t==="npm"||t==="pip"||t==="python"?t:"unknown"}function Se(e,t,n){return e?.module_support===false||t?.module_support===false?false:e?.module_support===true||t?.module_support===true?true:!e&&t?false:n.runtime==="python"||n.runtime==="node"}function xe(e,t,n){let r=g$1({runtime:typeof t?.runtime=="string"?t.runtime:typeof n?.runtime=="string"?n.runtime:void 0,framework:typeof t?.framework=="string"?t.framework:typeof n?.framework=="string"?n.framework:void 0,kitName:typeof t?.kit_name=="string"?t.kit_name:typeof t?.kit=="string"?t.kit:typeof n?.kit=="string"?n.kit:void 0});return r.key!=="unknown"?r:i(e,t)}function ee(e){let t=a.resolve(e),n=a.join(t,".rapidkit","project.json"),r=a.join(t,".rapidkit","context.json");if(!E.existsSync(n)&&!E.existsSync(r))return null;let i=q(t),m=be(t),f=xe(t,i,m);return {projectRoot:t,projectJson:i,contextJson:m,detection:f,moduleSupport:Se(i,m,f),engine:ke(m)}}function te(e){let t=Z(e);return t.runtime==="unknown"&&e!=="unknown"?null:{runtime:t.runtime,displayName:t.displayName,supportedCommands:t.lifecycleCommands,packageManagers:t.packageManagers,primaryFiles:t.primaryFiles,notes:t.notes,hasExecutor:t.hasExecutor}}function s(e){try{return E.existsSync(e)}catch{return false}}function p(e){try{return s(e)?E.readFileSync(e,"utf8"):""}catch{return ""}}function u(e,t){let n=p(a.join(e,"Makefile"));return n?new RegExp(`^${t}\\s*:`).test(n):false}function je(e){let t=[e];for(;t.length>0;){let n=t.shift();if(!n)break;let r=[];try{r=E.readdirSync(n,{withFileTypes:true});}catch{continue}for(let i of r){if(i.name==="node_modules"||i.name===".git"||i.name==="dist")continue;let m=a.join(n,i.name);if(i.isFile()&&i.name.endsWith(".csproj"))return true;i.isDirectory()&&t.push(m);}}return false}function ne(e,t){let n=s(a.join(e,"pyproject.toml")),r=s(a.join(e,"requirements.txt"))||s(a.join(e,"requirements.in")),i=s(a.join(e,"manage.py"));switch(t){case "init":return n||r;case "dev":case "start":return n||i||r;case "test":return n||r||s(a.join(e,"tests"));case "build":return n||r;case "lint":case "format":return n||r||i||s(a.join(e,"setup.py"))||s(a.join(e,"setup.cfg"));default:return false}}function Re(e,t){if(!s(a.join(e,"go.mod")))return false;switch(t){case "init":return true;case "dev":return u(e,"run")||s(a.join(e,"main.go"));case "test":return true;case "build":return true;case "start":return u(e,"run")||s(a.join(e,"main.go"))||s(a.join(e,"cmd"));case "lint":return s(a.join(e,".golangci.yml"))||s(a.join(e,".golangci.yaml"))||u(e,"lint");case "format":return u(e,"fmt")||u(e,"format");default:return false}}function he(e,t){let n=s(a.join(e,"pom.xml")),r=s(a.join(e,"build.gradle"))||s(a.join(e,"build.gradle.kts"));if(!n&&!r)return false;switch(t){case "init":case "test":case "build":case "dev":case "start":return true;case "lint":return u(e,"lint")||p(a.join(e,"pom.xml")).includes("checkstyle")||p(a.join(e,"build.gradle")).includes("checkstyle")||p(a.join(e,"build.gradle.kts")).includes("checkstyle");case "format":return u(e,"format")||p(a.join(e,"build.gradle")).includes("spotless")||p(a.join(e,"build.gradle.kts")).includes("spotless");default:return false}}function Ne(e,t){if(!je(e))return false;switch(t){case "init":case "dev":case "test":case "build":case "start":return true;case "lint":return u(e,"lint")||p(a.join(e,"Directory.Build.props")).includes("EnforceCodeStyleInBuild");case "format":return u(e,"format")||s(a.join(e,".editorconfig"));default:return false}}function ve(e,t,n){return t==="init"?F(e):V(e,t,{framework:n})!==null}function Ee(e,t,n){switch(t){case "php":return n==="init"&&s(a.join(e,"composer.json"));case "ruby":return n==="init"&&s(a.join(e,"Gemfile"));case "rust":return s(a.join(e,"Cargo.toml"))?n==="init"||n==="test"||n==="build"||n==="start":false;case "elixir":return n==="init"&&s(a.join(e,"mix.exs"));case "deno":return s(a.join(e,"deno.json"))||s(a.join(e,"deno.jsonc"))?n==="init"||n==="dev"||n==="test"||n==="start":n==="init"&&s(a.join(e,"package.json"));case "bun":return s(a.join(e,"bunfig.toml"))||s(a.join(e,"bun.lock"))?n==="init"||n==="dev"||n==="test"||n==="build"||n==="start":n==="init"&&s(a.join(e,"package.json"));default:return false}}function P(e,t,n,r){if(N(t,n))return ne(e,n);if(!b(t))return Ee(e,t,n);switch(t){case "node":return ve(e,n,r);case "python":return ne(e,n);case "go":return Re(e,n);case "java":return he(e,n);case "dotnet":return Ne(e,n);default:return false}}function Pe(e,t,n){return ["init","dev","start","build","test","lint","format"].filter(i=>P(e,t,i,n))}function re(e){let t=Q({runtime:e.runtime,moduleSupport:e.moduleSupport});if(!e.projectPath)return t;let n=Pe(e.projectPath,e.runtime,e.framework),r=new Set(["help"]);for(let m of n)t.lifecycleCommands.includes(m)&&r.add(m);e.runtime==="node"&&F(e.projectPath)&&r.add("init");let i=[...r].sort();return {lifecycleCommands:i,moduleCommands:t.moduleCommands,unsupportedLifecycleCommands:t.lifecycleCommands.filter(m=>!i.includes(m)).sort()}}var T=["version","commands","doctor","project","help"],w=["init","dev","start","build","test","lint","format"],B=["add","modules","upgrade","diff","merge","reconcile","rollback","uninstall","checkpoint","snapshot","optimize"],I=["create","list","info","frameworks","license"];T.filter(e=>e!=="help");function we(e){let t=a.resolve(e);for(;;){let n=a.join(t,".rapidkit"),r=a.join(n,"project.json"),i=a.join(n,"context.json");if(E.existsSync(r)||E.existsSync(i))return t;let m=a.dirname(t);if(m===t)break;t=m;}return null}function j(e,t){return {command:e,...t}}var Me=new Set(["dev","lint","format"]),_e=new Set(O);function Ae(e,t){return t?_e.has(e)?{executionScope:"fleet",fleetEligible:true}:Me.has(e)?{executionScope:"local-only",fleetEligible:false}:{executionScope:"local-only",fleetEligible:false}:{executionScope:"local-only",fleetEligible:false}}function Le(e,t){return N(t.runtime,e)?"core":"runtime"}function Fe(e,t,n,r){return !e||!r.lifecycleCommands.includes(t)?false:P(e,n.runtime,t,n.key)}function Oe(e,t){let n=!!e&&(t.runtime==="python"||b(t.runtime)&&P(e,t.runtime,"build",t.key));return j("docs",{owner:t.runtime==="python"?"core":"runtime",status:n?"supported":"unsupported",reason:n?t.runtime==="python"?"Documentation generation is delegated to Python Core for this project.":"Project documentation commands are available through the npm wrapper for this runtime.":"Documentation commands require a supported Python or npm-executor project manifest."})}function De(e){let t=a.resolve(e),n=we(e);return n||(h(t).length>0?t:null)}function Te(e=process.cwd()){let t=De(e),n=t?ee(t):null,r=n?.detection??i(e,n?.projectJson??null),i$1=n?.moduleSupport??false,m=n?.engine??"unknown",f=te(r.runtime),U=x(r.runtime),ae=re({runtime:r.runtime,moduleSupport:i$1,projectPath:t??void 0,framework:r.key}),d={};for(let o of T)d[o]=j(o,{owner:o==="project"?"core":"npm",status:"supported",reason:o==="project"?"Project detection is a Core contract; workspace project lifecycle remains npm-owned.":o==="help"?"Help is available for every RapidKit project through the npm CLI.":"Universal command available across RapidKit project types."});for(let o of w){let y=Fe(t,o,r,ae),G=Le(o,r),M=Ae(o,y);d[o]=j(o,{owner:G,status:y?"supported":"unsupported",executionScope:M.executionScope,fleetEligible:M.fleetEligible,reason:y?G==="core"?`Delegated to Python Core for ${r.displayName} projects.`:M.fleetEligible?`Handled by runtime adapter and eligible for workspace fleet stages (${o}).`:o==="dev"?"Local development command only; workspace fleet excludes dev by design.":r.runtime==="node"?`Handled by npm/pnpm/yarn via the resolved ${o} script in package.json.`:`Handled by the ${f?.displayName??r.displayName} runtime adapter for local project execution.`:t?r.runtime==="node"?`No ${o} script was found in package.json for this ${r.displayName} project.`:b(r.runtime)?`The ${r.displayName} runtime is tracked, but ${o} is not available from detected project manifests.`:`${r.displayName} is tracked as an observed runtime; ${o} requires project manifests or explicit scripts.`:"No RapidKit project was detected."});}d.docs=Oe(t,r);for(let o of B)d[o]=j(o,{owner:i$1?"core":"none",status:i$1?"supported":"unsupported",reason:i$1?"Core module/template command supported for this project.":`Core module/template commands are not available for ${r.displayName} projects.`});for(let o of I)d[o]=j(o,{owner:o==="create"?"npm":"core",status:"global",reason:o==="create"?"Create is orchestrated by npm for multi-language workspace support.":"Engine catalog command; not specific to the selected project runtime."});let R=Object.values(d),K=R.filter(o=>w.includes(o.command)).filter(o=>o.status==="supported"),se=O.filter(o=>K.some(y=>y.fleetEligible===true&&y.command===o)),me=K.filter(o=>o.executionScope==="local-only").map(o=>o.command).sort();return {schemaVersion:1,scope:"project",projectRoot:t,engine:m,runtime:r.runtime,framework:r.key,frameworkDisplayName:r.displayName,frameworkConfidence:r.confidence,frameworkSupportTier:z(r.key),runtimeSupportTier:U.tier,runtimeDoctorSupport:U.doctorSupport,moduleSupport:i$1,fleetStages:se,localOnlyCommands:me,commandMap:d,supportedCommands:R.filter(o=>o.status==="supported").map(o=>o.command).sort(),unsupportedCommands:R.filter(o=>o.status==="unsupported").map(o=>o.command).sort(),globalCommands:R.filter(o=>o.status==="global").map(o=>o.command).sort()}}function It(e,t=process.cwd()){let n=e[0];return n?Te(t).commandMap[n]??null:null}function Ut(e){if(e[0]==="project"&&e[1]==="commands")return true;if(e[0]==="commands"&&e.includes("--scope")){let t=e.indexOf("--scope");return e[t+1]==="project"}return e.some(t=>t==="--scope=project")&&e[0]==="commands"}function Kt(e,t){return [`RapidKit command not supported for this project: ${e.command}`,"",`Project: ${t.projectRoot??"not detected"}`,`Runtime: ${t.runtime}`,`Framework: ${t.frameworkDisplayName}`,`Reason: ${e.reason??"Unsupported for this project type."}`,"","Run `rapidkit project commands` to inspect supported commands for this project."].join(`
|
|
2
|
+
`)}export{q as a,Ke as b,Ge as c,Je as d,$e as e,We as f,V as g,de as h,Ze as i,et as j,x as k,z as l,b as m,ee as n,re as o,we as p,Te as q,It as r,Ut as s,Kt as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import i from'path';import s from'fs-extra';var l=new Set(["service","frontend","worker","library","infra","docs","test-suite","unknown"]);async function d(n){try{if(!await s.pathExists(n))return null;let e=await s.readJSON(n);return e&&typeof e=="object"?e:null}catch{return null}}function u(n){if(typeof n!="string")return null;let e=n.trim().toLowerCase();return l.has(e)?e:null}async function m(n,e){let o=e??await d(i.join(n,".rapidkit","project.json")),a=u(o?.kind)??u(o?.type);if(a)return a;let t=await d(i.join(n,"package.json"));if(t){let r={...t.dependencies??{},...t.devDependencies??{}},f=t.scripts??{},c=Object.values(f).filter(p=>typeof p=="string").join(" ").toLowerCase();if(r.next||r.react||r.vue||r.svelte||r.vite||r["@angular/core"]||c.includes("next ")||c.includes("vite "))return "frontend";if(t.private===true&&!r.express&&!r["@nestjs/core"])return "library"}return await s.pathExists(i.join(n,"Dockerfile"))||await s.pathExists(i.join(n,"docker-compose.yml"))||await s.pathExists(i.join(n,"terraform.tf"))?"infra":"service"}export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{c as PYTHON_FREE_WORKSPACE_PROFILES,a as buildWorkspaceManifest,f as createProject,g as registerWorkspaceAtPath,d as resolvePythonFreeFallbackProfile,b as syncWorkspaceFoundationFiles,e as writeWorkspaceLauncher}from'./chunk-HUQ5WRUF.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as computeDoctorGateExitCode,b as runDoctor}from'./chunk-
|
|
1
|
+
export{a as computeDoctorGateExitCode,b as runDoctor}from'./chunk-TC2PSHT6.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as readImportedProjectsRegistry,c as removeImportedProjectsRegistryEntries,b as upsertImportedProjectsRegistry}from'./chunk-HHJAANUC.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
declare const PROJECT_COMMANDS_CORE_FALLBACK: readonly ["lint", "format", "docs"];
|
|
3
|
+
|
|
2
4
|
declare function handleCreateOrFallback(args: string[]): Promise<number>;
|
|
3
|
-
declare const NPM_ONLY_TOP_LEVEL_COMMANDS: readonly ["analyze", "readiness", "doctor", "autopilot", "pipeline", "import", "snapshot", "workspace", "bootstrap", "setup", "cache", "mirror", "ai", "config", "product", "infra", "shell", "commands"];
|
|
5
|
+
declare const NPM_ONLY_TOP_LEVEL_COMMANDS: readonly ["analyze", "readiness", "doctor", "autopilot", "pipeline", "import", "adopt", "snapshot", "workspace", "bootstrap", "setup", "cache", "mirror", "ai", "config", "product", "infra", "shell", "commands"];
|
|
4
6
|
declare const NPM_ONLY_SCOPED_COMMANDS: readonly [readonly ["project", "commands"], readonly ["project", "archives"], readonly ["project", "archive"], readonly ["project", "restore"], readonly ["project", "delete"]];
|
|
5
7
|
declare const WRAPPER_ORCHESTRATED_PROJECT_COMMANDS: readonly ["init"];
|
|
6
8
|
declare function isNpmExecInvocation(env?: NodeJS.ProcessEnv): boolean;
|
|
9
|
+
declare function getGlobalCommandCapabilities(): {
|
|
10
|
+
scope: string;
|
|
11
|
+
cli: string;
|
|
12
|
+
version: string;
|
|
13
|
+
cwd: string;
|
|
14
|
+
commands: {
|
|
15
|
+
npmOwned: string[];
|
|
16
|
+
coreBacked: string[];
|
|
17
|
+
projectScoped: string[];
|
|
18
|
+
};
|
|
19
|
+
commandMap: any;
|
|
20
|
+
};
|
|
7
21
|
interface DoctorWorkspaceShadowDiagnostic {
|
|
8
22
|
detected: boolean;
|
|
9
23
|
candidatePath?: string;
|
|
@@ -18,10 +32,23 @@ declare function handleImportCommand(source: string, options: {
|
|
|
18
32
|
name?: string;
|
|
19
33
|
git?: boolean;
|
|
20
34
|
json?: boolean;
|
|
35
|
+
enableModules?: boolean;
|
|
21
36
|
}, dependencies?: {
|
|
22
37
|
syncWorkspaceProjects?: (workspacePath: string) => Promise<void>;
|
|
23
38
|
rollbackImportedProjectImport?: (workspacePath: string, projectPath: string) => Promise<void>;
|
|
24
39
|
}): Promise<number>;
|
|
40
|
+
declare function handleAdoptCommand(source: string | undefined, options: {
|
|
41
|
+
workspace?: string;
|
|
42
|
+
name?: string;
|
|
43
|
+
dryRun?: boolean;
|
|
44
|
+
json?: boolean;
|
|
45
|
+
enableModules?: boolean;
|
|
46
|
+
}, dependencies?: {
|
|
47
|
+
syncWorkspaceProjects?: (workspacePath: string) => Promise<void>;
|
|
48
|
+
registerWorkspace?: (workspacePath: string, workspaceName: string) => Promise<void>;
|
|
49
|
+
registerProjectInWorkspace?: (workspacePath: string, projectName: string, projectPath: string) => Promise<void>;
|
|
50
|
+
rollbackAdoptedProjectImport?: (workspacePath: string, projectPath: string, previousProjectJson: Record<string, unknown> | null) => Promise<void>;
|
|
51
|
+
}): Promise<number>;
|
|
25
52
|
declare function installWorkspaceDependencies(workspacePath: string): Promise<number>;
|
|
26
53
|
declare function handleBootstrapCommand(args: string[], initRunner?: (nextArgs: string[]) => Promise<number>): Promise<number>;
|
|
27
54
|
declare function handleSetupCommand(args: string[]): Promise<number>;
|
|
@@ -30,4 +57,4 @@ declare function handleMirrorCommand(args: string[]): Promise<number>;
|
|
|
30
57
|
declare function handleInitCommand(args: string[]): Promise<number>;
|
|
31
58
|
declare function shouldForwardToCore(args: string[]): Promise<boolean>;
|
|
32
59
|
|
|
33
|
-
export { type DoctorWorkspaceShadowDiagnostic, NPM_ONLY_SCOPED_COMMANDS, NPM_ONLY_TOP_LEVEL_COMMANDS, WRAPPER_ORCHESTRATED_PROJECT_COMMANDS, detectWindowsDoctorWorkspaceShadow, handleBootstrapCommand, handleCacheCommand, handleCreateOrFallback, handleImportCommand, handleInitCommand, handleMirrorCommand, handleSetupCommand, installWorkspaceDependencies, isNpmExecInvocation, shouldForwardToCore };
|
|
60
|
+
export { type DoctorWorkspaceShadowDiagnostic, NPM_ONLY_SCOPED_COMMANDS, NPM_ONLY_TOP_LEVEL_COMMANDS, PROJECT_COMMANDS_CORE_FALLBACK, WRAPPER_ORCHESTRATED_PROJECT_COMMANDS, detectWindowsDoctorWorkspaceShadow, getGlobalCommandCapabilities, handleAdoptCommand, handleBootstrapCommand, handleCacheCommand, handleCreateOrFallback, handleImportCommand, handleInitCommand, handleMirrorCommand, handleSetupCommand, installWorkspaceDependencies, isNpmExecInvocation, shouldForwardToCore };
|