@aipt/cli 0.1.19 → 0.1.23

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.js CHANGED
@@ -1,4 +1,4 @@
1
- var h=Object.create;var y=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var O=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}};var v=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of C(n))!b.call(e,o)&&o!==t&&y(e,o,{get:()=>n[o],enumerable:!(r=w(n,o))||r.enumerable});return e};var N=(e,n,t)=>(t=e!=null?h(E(e)):{},v(n||!e||!e.__esModule?y(t,"default",{value:e,enumerable:!0}):t,e));var F="0.1.19",c={DEPENDENCIES_NOT_INSTALLED:4,VERIFIER_RUNTIME_INVALID:4},S=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/u;function f(e,n){return typeof e=="string"&&e.length>0&&e.length<=n&&!S.test(e)}function D(e){let n={schemaVersion:1,kind:"dyyto-cli-domain-error",code:e.code,message:e.message,exitCode:c[e.code],...e.nextStep===void 0?{}:{nextStep:e.nextStep}},t=m(n);if(t===null)throw new TypeError("CLI domain error input is invalid");return t}function m(e){try{if(typeof e!="object"||e===null||Object.getPrototypeOf(e)!==Object.prototype)return null;let n=Object.getOwnPropertyDescriptors(e);if(Reflect.ownKeys(n).some(i=>typeof i=="symbol"))return null;let t=Object.keys(n).sort(),r="nextStep"in n?["code","exitCode","kind","message","nextStep","schemaVersion"]:["code","exitCode","kind","message","schemaVersion"];if(t.length!==r.length||t.some((i,k)=>i!==r[k])||Object.values(n).some(i=>!("value"in i)))return null;let o=i=>n[i]?.value,a=o("code");if(o("schemaVersion")!==1||o("kind")!=="dyyto-cli-domain-error"||typeof a!="string"||!(a in c)||o("exitCode")!==c[a]||!f(o("message"),500))return null;let d=o("nextStep");return d!==void 0&&!f(d,500)?null:Object.freeze({schemaVersion:1,kind:"dyyto-cli-domain-error",code:a,message:o("message"),exitCode:4,...d===void 0?{}:{nextStep:d}})}catch{return null}}function T(e){if(e instanceof l&&e.domainError!==void 0)return e.domainError;try{if(typeof e!="object"||e===null)return null;let n=Object.getOwnPropertyDescriptor(e,"domainError");return n!==void 0&&"value"in n?m(n.value):null}catch{return null}}var l=class extends Error{code;exitCode;nextStep;domainError;constructor(n){super(n.message),this.name="CliError",this.code=n.code,this.exitCode=n.exitCode,this.nextStep=n.nextStep,this.domainError=n.code in c&&n.exitCode===c[n.code]?D({code:n.code,message:n.message,...n.nextStep===void 0?{}:{nextStep:n.nextStep}}):void 0}};var _=`Dyyto Engineering Platform CLI
1
+ var h=Object.create;var y=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var O=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}};var v=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of w(n))!b.call(e,o)&&o!==t&&y(e,o,{get:()=>n[o],enumerable:!(r=C(n,o))||r.enumerable});return e};var N=(e,n,t)=>(t=e!=null?h(E(e)):{},v(n||!e||!e.__esModule?y(t,"default",{value:e,enumerable:!0}):t,e));var F="0.1.23",c={DEPENDENCIES_NOT_INSTALLED:4,VERIFIER_RUNTIME_INVALID:4},D=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/u;function f(e,n){return typeof e=="string"&&e.length>0&&e.length<=n&&!D.test(e)}function S(e){let n={schemaVersion:1,kind:"dyyto-cli-domain-error",code:e.code,message:e.message,exitCode:c[e.code],...e.nextStep===void 0?{}:{nextStep:e.nextStep}},t=m(n);if(t===null)throw new TypeError("CLI domain error input is invalid");return t}function m(e){try{if(typeof e!="object"||e===null||Object.getPrototypeOf(e)!==Object.prototype)return null;let n=Object.getOwnPropertyDescriptors(e);if(Reflect.ownKeys(n).some(i=>typeof i=="symbol"))return null;let t=Object.keys(n).sort(),r="nextStep"in n?["code","exitCode","kind","message","nextStep","schemaVersion"]:["code","exitCode","kind","message","schemaVersion"];if(t.length!==r.length||t.some((i,k)=>i!==r[k])||Object.values(n).some(i=>!("value"in i)))return null;let o=i=>n[i]?.value,a=o("code");if(o("schemaVersion")!==1||o("kind")!=="dyyto-cli-domain-error"||typeof a!="string"||!(a in c)||o("exitCode")!==c[a]||!f(o("message"),500))return null;let d=o("nextStep");return d!==void 0&&!f(d,500)?null:Object.freeze({schemaVersion:1,kind:"dyyto-cli-domain-error",code:a,message:o("message"),exitCode:4,...d===void 0?{}:{nextStep:d}})}catch{return null}}function T(e){if(e instanceof l&&e.domainError!==void 0)return e.domainError;try{if(typeof e!="object"||e===null)return null;let n=Object.getOwnPropertyDescriptor(e,"domainError");return n!==void 0&&"value"in n?m(n.value):null}catch{return null}}var l=class extends Error{code;exitCode;nextStep;domainError;constructor(n){super(n.message),this.name="CliError",this.code=n.code,this.exitCode=n.exitCode,this.nextStep=n.nextStep,this.domainError=n.code in c&&n.exitCode===c[n.code]?S({code:n.code,message:n.message,...n.nextStep===void 0?{}:{nextStep:n.nextStep}}):void 0}};var z=`Dyyto Engineering Platform CLI
2
2
 
3
3
  Usage:
4
4
  dyyto <command> [options]
@@ -11,7 +11,7 @@ Commands:
11
11
  dyyto docs show --id ID \u8BFB\u53D6npm\u5305\u5185\u7A33\u5B9A\u6587\u6863
12
12
  dyyto create Initialize a project manifest and plan
13
13
  dyyto scaffold example Plan or apply a Catalog-driven example under .examples
14
- dyyto retrofit Safely initialize a manifest in an existing pnpm workspace
14
+ dyyto retrofit \u4E3A\u65E2\u6709Workspace\u6216\u663E\u5F0FProfile\u9879\u76EE\u751F\u6210Manifest Plan
15
15
  dyyto baseline Plan seed-file adoption for a historical Next.js project
16
16
  dyyto dev Run the template's supported foreground development server
17
17
  dyyto build Run the template's supported build command
@@ -51,4 +51,4 @@ Options:
51
51
  --json Emit one machine-readable JSON object
52
52
  --help Show help
53
53
  --version Show version
54
- `;import{lstat as x,readFile as I,readdir as R}from"node:fs/promises";import p from"node:path";var g={"workspace-node-application":"foundation.workspace-node-application@1.1.0","workspace-web-application":"foundation.workspace-web-application@1.1.0","workspace-expo-application":"foundation.workspace-expo-application@1.0.0","nextjs-full-stack-application":"foundation.nextjs-full-stack-application@1.0.0"};function j(e,n="package"){let t=n==="fixture"?"fixtures":"packages";return new RegExp(`^${t}/[a-z0-9][a-z0-9._-]*$`).test(e)?void 0:`Package path must be exactly ${t}/<lowercase-slug>.`}function P(e,n,t){if(!(n in g))return"Add application requires a supported --profile.";let r=g[n];if(t!==r)return`Add application with profile ${n} requires --capability ${r}.`;if(!/^apps\/[a-z0-9][a-z0-9._-]*$/.test(e))return/^services\/[a-z0-9][a-z0-9._-]*$/.test(e)?n==="workspace-node-application"?void 0:"Service applications require profile workspace-node-application.":"Application path must be exactly apps/<lowercase-slug> or services/<lowercase-slug>."}function s(e,n){let t=e.indexOf(n);return t<0?void 0:e[t+1]}async function u(e,n,t){for(let r of await R(p.join(e,n),{withFileTypes:!0}).catch(()=>[]))if(!(!r.isDirectory()||r.isSymbolicLink()))try{if(JSON.parse(await I(p.join(e,n,r.name,"project-capabilities.json"),"utf8")).profile?.parameters?.name===t)return!0}catch(o){if(o.code!=="ENOENT")throw o}return!1}async function A(e,n){return await u(e,"apps",n)||await u(e,"services",n)}async function B(e){if(e[0]!=="add")return;let n=s(e,"--path");if(n===void 0)return;let t=s(e,"--workspace"),r=s(e,"--name");if(e[1]==="package"){let a=s(e,"--kind")==="fixture"?"fixture":"package",d=j(n,a);return d!==void 0||t===void 0||r===void 0?d:await x(p.join(t,"package.json")).then(i=>i.isFile()).catch(()=>!1)?await u(t,a==="fixture"?"fixtures":"packages",r)?"A workspace package already uses this npm name.":void 0:"Workspace root must be applied and free of drift before adding a package."}if(e[1]!=="application")return;let o=P(n,s(e,"--profile")??"workspace-node-application",s(e,"--capability"));return o!==void 0||t===void 0||r===void 0?o:await x(p.join(t,"package.json")).then(a=>a.isFile()).catch(()=>!1)?await A(t,r)?"A workspace application already uses this name.":void 0:"Workspace root must be applied and free of drift before adding an application."}export{O as a,N as b,F as c,T as d,l as e,_ as f,j as g,P as h,u as i,A as j,B as k};
54
+ `;import{lstat as x,readFile as I,readdir as R}from"node:fs/promises";import p from"node:path";var g={"workspace-node-application":"foundation.workspace-node-application@1.1.0","workspace-web-application":"foundation.workspace-web-application@1.1.0","workspace-expo-application":"foundation.workspace-expo-application@1.0.0","nextjs-full-stack-application":"foundation.nextjs-full-stack-application@1.0.0"};function j(e,n="package"){let t=n==="fixture"?"fixtures":"packages";return new RegExp(`^${t}/[a-z0-9][a-z0-9._-]*$`).test(e)?void 0:`Package path must be exactly ${t}/<lowercase-slug>.`}function P(e,n,t){if(!(n in g))return"Add application requires a supported --profile.";let r=g[n];if(t!==r)return`Add application with profile ${n} requires --capability ${r}.`;if(!/^apps\/[a-z0-9][a-z0-9._-]*$/.test(e))return/^services\/[a-z0-9][a-z0-9._-]*$/.test(e)?n==="workspace-node-application"?void 0:"Service applications require profile workspace-node-application.":"Application path must be exactly apps/<lowercase-slug> or services/<lowercase-slug>."}function s(e,n){let t=e.indexOf(n);return t<0?void 0:e[t+1]}async function u(e,n,t){for(let r of await R(p.join(e,n),{withFileTypes:!0}).catch(()=>[]))if(!(!r.isDirectory()||r.isSymbolicLink()))try{if(JSON.parse(await I(p.join(e,n,r.name,"project-capabilities.json"),"utf8")).profile?.parameters?.name===t)return!0}catch(o){if(o.code!=="ENOENT")throw o}return!1}async function A(e,n){return await u(e,"apps",n)||await u(e,"services",n)}async function B(e){if(e[0]!=="add")return;let n=s(e,"--path");if(n===void 0)return;let t=s(e,"--workspace"),r=s(e,"--name");if(e[1]==="package"){let a=s(e,"--kind")==="fixture"?"fixture":"package",d=j(n,a);return d!==void 0||t===void 0||r===void 0?d:await x(p.join(t,"package.json")).then(i=>i.isFile()).catch(()=>!1)?await u(t,a==="fixture"?"fixtures":"packages",r)?"A workspace package already uses this npm name.":void 0:"Workspace root must be applied and free of drift before adding a package."}if(e[1]!=="application")return;let o=P(n,s(e,"--profile")??"workspace-node-application",s(e,"--capability"));return o!==void 0||t===void 0||r===void 0?o:await x(p.join(t,"package.json")).then(a=>a.isFile()).catch(()=>!1)?await A(t,r)?"A workspace application already uses this name.":void 0:"Workspace root must be applied and free of drift before adding an application."}export{O as a,N as b,F as c,T as d,l as e,z as f,j as g,P as h,u as i,A as j,B as k};