@keystrokehq/cli 0.0.65 → 0.0.66
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/{cat-TSFMZVYS-Qzyhqpeq.mjs → cat-TSFMZVYS-RwFYGRgl.mjs} +2 -2
- package/dist/{cat-TSFMZVYS-Qzyhqpeq.mjs.map → cat-TSFMZVYS-RwFYGRgl.mjs.map} +1 -1
- package/dist/{cut-OKARJCCV-UOo5blGN.mjs → cut-OKARJCCV-7cebiTlb.mjs} +2 -2
- package/dist/{cut-OKARJCCV-UOo5blGN.mjs.map → cut-OKARJCCV-7cebiTlb.mjs.map} +1 -1
- package/dist/{dist-CMxQJtOA.mjs → dist-CrZVpQSd.mjs} +2 -2
- package/dist/{dist-CMxQJtOA.mjs.map → dist-CrZVpQSd.mjs.map} +1 -1
- package/dist/{dist-D2apKUWN-BDQ3166v.mjs → dist-DRPUD4yJ-3gMinGsn.mjs} +82 -9
- package/dist/dist-DRPUD4yJ-3gMinGsn.mjs.map +1 -0
- package/dist/{du-572XNP42-4gdN6HgU.mjs → du-572XNP42-RgaK1Rqq.mjs} +2 -2
- package/dist/{du-572XNP42-4gdN6HgU.mjs.map → du-572XNP42-RgaK1Rqq.mjs.map} +1 -1
- package/dist/{emit-route-manifest-DRcNXHCP-BHonsCIQ.mjs → emit-route-manifest-DRcNXHCP-DN1BpGOi.mjs} +31 -13
- package/dist/{emit-route-manifest-DRcNXHCP-BHonsCIQ.mjs.map → emit-route-manifest-DRcNXHCP-DN1BpGOi.mjs.map} +1 -1
- package/dist/index.mjs +146 -28
- package/dist/index.mjs.map +1 -1
- package/dist/{jq-4XLYLOS5-D_rIiq4w.mjs → jq-4XLYLOS5-DNvJFpkY.mjs} +2 -2
- package/dist/{jq-4XLYLOS5-D_rIiq4w.mjs.map → jq-4XLYLOS5-DNvJFpkY.mjs.map} +1 -1
- package/dist/{ls-ZJGQER7M-B-eSANU2.mjs → ls-ZJGQER7M-DHpAibRp.mjs} +2 -2
- package/dist/{ls-ZJGQER7M-B-eSANU2.mjs.map → ls-ZJGQER7M-DHpAibRp.mjs.map} +1 -1
- package/dist/{mistral-CCsOaxvh-FZsMk4KR.mjs → mistral-R2FX6jgL-C3TQNHh7.mjs} +3 -3
- package/dist/{mistral-CCsOaxvh-FZsMk4KR.mjs.map → mistral-R2FX6jgL-C3TQNHh7.mjs.map} +1 -1
- package/dist/{sort-SW2YEO5B-BaN_eY3l.mjs → sort-SW2YEO5B-BD_P9Q6n.mjs} +2 -2
- package/dist/{sort-SW2YEO5B-BaN_eY3l.mjs.map → sort-SW2YEO5B-BD_P9Q6n.mjs.map} +1 -1
- package/dist/{tree-YLD52CNT-BZJomf0H.mjs → tree-YLD52CNT-C9IR00tM.mjs} +2 -2
- package/dist/{tree-YLD52CNT-BZJomf0H.mjs.map → tree-YLD52CNT-C9IR00tM.mjs.map} +1 -1
- package/dist/{uniq-XSIZR6PB-Ajuixkb6.mjs → uniq-XSIZR6PB-gU1BpRGX.mjs} +2 -2
- package/dist/{uniq-XSIZR6PB-Ajuixkb6.mjs.map → uniq-XSIZR6PB-gU1BpRGX.mjs.map} +1 -1
- package/dist/{wc-LF7NU4LA-DiSdKP_u.mjs → wc-LF7NU4LA-DwSj8_V4.mjs} +2 -2
- package/dist/{wc-LF7NU4LA-DiSdKP_u.mjs.map → wc-LF7NU4LA-DwSj8_V4.mjs.map} +1 -1
- package/dist/{xan-Y6WF3IRG-COQGCVSz.mjs → xan-Y6WF3IRG-CAgH4sE_.mjs} +2 -2
- package/dist/{xan-Y6WF3IRG-COQGCVSz.mjs.map → xan-Y6WF3IRG-CAgH4sE_.mjs.map} +1 -1
- package/package.json +14 -14
- package/dist/dist-D2apKUWN-BDQ3166v.mjs.map +0 -1
|
@@ -4,7 +4,7 @@ import "./chunk-BZUGFHVS-CPWRFwK8.mjs";
|
|
|
4
4
|
import "./chunk-NRSASXYY-CuWyREpD.mjs";
|
|
5
5
|
import { t as x } from "./chunk-QIQMJJZ4-BwKdslXs.mjs";
|
|
6
6
|
import { n as w } from "./chunk-YCLFEX4T-COc1AThz.mjs";
|
|
7
|
-
import "./emit-route-manifest-DRcNXHCP-
|
|
7
|
+
import "./emit-route-manifest-DRcNXHCP-DN1BpGOi.mjs";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
//#region ../../node_modules/.pnpm/just-bash@3.0.1/node_modules/just-bash/dist/bundle/chunks/chunk-4N6J7B5P.js
|
|
10
10
|
createRequire(import.meta.url);
|
|
@@ -60,4 +60,4 @@ createRequire(import.meta.url);
|
|
|
60
60
|
//#endregion
|
|
61
61
|
export { L as catCommand };
|
|
62
62
|
|
|
63
|
-
//# sourceMappingURL=cat-TSFMZVYS-
|
|
63
|
+
//# sourceMappingURL=cat-TSFMZVYS-RwFYGRgl.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-TSFMZVYS-
|
|
1
|
+
{"version":3,"file":"cat-TSFMZVYS-RwFYGRgl.mjs","names":["p","m","d","s","f","o"],"sources":["../../../node_modules/.pnpm/just-bash@3.0.1/node_modules/just-bash/dist/bundle/chunks/chunk-4N6J7B5P.js","../../../node_modules/.pnpm/just-bash@3.0.1/node_modules/just-bash/dist/bundle/chunks/cat-TSFMZVYS.js"],"sourcesContent":["import{createRequire} from\"node:module\";const require=createRequire(import.meta.url);\nimport{a as f}from\"./chunk-YCLFEX4T.js\";import{a as d}from\"./chunk-QIQMJJZ4.js\";import{a as m,b as p}from\"./chunk-QAYAQNCG.js\";var b={name:\"cat\",summary:\"concatenate files and print on the standard output\",usage:\"cat [OPTION]... [FILE]...\",options:[\"-n, --number number all output lines\",\" --help display this help and exit\"]},g={number:{short:\"n\",long:\"number\",type:\"boolean\"}},L={name:\"cat\",async execute(t,o){if(p(t))return m(b);let e=d(\"cat\",t,g);if(!e.ok)return e.error;let r=e.result.flags.number,s=e.result.positional,a=await f(o,s,{cmdName:\"cat\",allowStdinMarker:!0,stopOnError:!1}),n=\"\",l=1;for(let{content:i}of a.files){let u=i;if(r){let c=y(u,l);n+=c.content,l=c.nextLineNumber}else n+=u}return{stdout:n,stderr:a.stderr,exitCode:a.exitCode,stdoutEncoding:\"binary\"}}};function y(t,o){let e=t.split(`\n`),r=t.endsWith(`\n`),s=r?e.slice(0,-1):e;return{content:s.map((n,l)=>`${String(o+l).padStart(6,\" \")}\t${n}`).join(`\n`)+(r?`\n`:\"\"),nextLineNumber:o+s.length}}var T={name:\"cat\",flags:[{flag:\"-n\",type:\"boolean\"},{flag:\"-A\",type:\"boolean\"},{flag:\"-b\",type:\"boolean\"},{flag:\"-s\",type:\"boolean\"},{flag:\"-v\",type:\"boolean\"},{flag:\"-e\",type:\"boolean\"},{flag:\"-t\",type:\"boolean\"}],stdinType:\"text\",needsFiles:!0};export{L as a,T as b};\n","import{createRequire} from\"node:module\";const require=createRequire(import.meta.url);\nimport{a,b}from\"./chunk-4N6J7B5P.js\";import\"./chunk-YCLFEX4T.js\";import\"./chunk-NRSASXYY.js\";import\"./chunk-STHBFACM.js\";import\"./chunk-QIQMJJZ4.js\";import\"./chunk-QAYAQNCG.js\";import\"./chunk-BZUGFHVS.js\";export{a as catCommand,b as flagsForFuzzing};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;AAAsD,cAAc,OAAO,KAAK,GAAG;AAC4C,IAAI,IAAE;CAAC,MAAK;CAAM,SAAQ;CAAqD,OAAM;CAA4B,SAAQ,CAAC,kDAAiD,mDAAmD;AAAC,GAAE,IAAE,EAAC,QAAO;CAAC,OAAM;CAAI,MAAK;CAAS,MAAK;AAAS,EAAC,GAAE,IAAE;CAAC,MAAK;CAAM,MAAM,QAAQ,GAAE,KAAE;EAAC,IAAGA,EAAE,CAAC,GAAE,OAAOC,EAAE,CAAC;EAAE,IAAI,IAAEC,EAAE,OAAM,GAAE,CAAC;EAAE,IAAG,CAAC,EAAE,IAAG,OAAO,EAAE;EAAM,IAAI,IAAE,EAAE,OAAO,MAAM,QAAOC,MAAE,EAAE,OAAO,YAAW,IAAE,MAAMC,EAAEC,KAAEF,KAAE;GAAC,SAAQ;GAAM,kBAAiB,CAAC;GAAE,aAAY,CAAC;EAAC,CAAC,GAAE,IAAE,IAAG,IAAE;EAAE,KAAI,IAAG,EAAC,SAAQ,OAAK,EAAE,OAAM;GAAC,IAAI,IAAE;GAAE,IAAG,GAAE;IAAC,IAAI,IAAE,EAAE,GAAE,CAAC;IAAE,KAAG,EAAE,SAAQ,IAAE,EAAE;GAAc,OAAM,KAAG;EAAC;EAAC,OAAM;GAAC,QAAO;GAAE,QAAO,EAAE;GAAO,UAAS,EAAE;GAAS,gBAAe;EAAQ;CAAC;AAAC;AAAE,SAAS,EAAE,GAAE,GAAE;CAAC,IAAI,IAAE,EAAE,MAAM;CACh0B,GAAE,IAAE,EAAE,SAAS;CACf,GAAE,IAAE,IAAE,EAAE,MAAM,GAAE,EAAE,IAAE;CAAE,OAAM;EAAC,SAAQ,EAAE,KAAK,GAAE,MAAI,GAAG,OAAO,IAAE,CAAC,EAAE,SAAS,GAAE,GAAG,EAAE,GAAG,GAAG,EAAE,KAAK;CAC9F,KAAG,IAAE;IACJ;EAAI,gBAAe,IAAE,EAAE;CAAM;AAAC;;;ACLsB,cAAc,OAAO,KAAK,GAAG"}
|
|
@@ -3,7 +3,7 @@ import { n as r, r as s, t as o } from "./chunk-QAYAQNCG-Bl0Kbd53.mjs";
|
|
|
3
3
|
import "./chunk-BZUGFHVS-CPWRFwK8.mjs";
|
|
4
4
|
import { r as x } from "./chunk-NRSASXYY-CuWyREpD.mjs";
|
|
5
5
|
import { t as T$1 } from "./chunk-YCLFEX4T-COc1AThz.mjs";
|
|
6
|
-
import "./emit-route-manifest-DRcNXHCP-
|
|
6
|
+
import "./emit-route-manifest-DRcNXHCP-DN1BpGOi.mjs";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
//#region ../../node_modules/.pnpm/just-bash@3.0.1/node_modules/just-bash/dist/bundle/chunks/chunk-7JHM3L42.js
|
|
9
9
|
createRequire(import.meta.url);
|
|
@@ -116,4 +116,4 @@ createRequire(import.meta.url);
|
|
|
116
116
|
//#endregion
|
|
117
117
|
export { E as cutCommand };
|
|
118
118
|
|
|
119
|
-
//# sourceMappingURL=cut-OKARJCCV-
|
|
119
|
+
//# sourceMappingURL=cut-OKARJCCV-7cebiTlb.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cut-OKARJCCV-
|
|
1
|
+
{"version":3,"file":"cut-OKARJCCV-7cebiTlb.mjs","names":["I","s","x","r","m","v","y"],"sources":["../../../node_modules/.pnpm/just-bash@3.0.1/node_modules/just-bash/dist/bundle/chunks/chunk-7JHM3L42.js","../../../node_modules/.pnpm/just-bash@3.0.1/node_modules/just-bash/dist/bundle/chunks/cut-OKARJCCV.js"],"sourcesContent":["import{createRequire} from\"node:module\";const require=createRequire(import.meta.url);\nimport{b as v}from\"./chunk-YCLFEX4T.js\";import{c as y}from\"./chunk-NRSASXYY.js\";import{a as x,b as I,c as m}from\"./chunk-QAYAQNCG.js\";var T={name:\"cut\",summary:\"remove sections from each line of files\",usage:\"cut [OPTION]... [FILE]...\",options:[\"-c LIST select only these characters\",\"-d DELIM use DELIM instead of TAB for field delimiter\",\"-f LIST select only these fields\",\"-s, --only-delimited do not print lines without delimiters\",\" --help display this help and exit\"]};function b(s){let c=[],l=s.split(\",\");for(let n of l)if(n.includes(\"-\")){let[t,r]=n.split(\"-\");c.push({start:t?parseInt(t,10):1,end:r?parseInt(r,10):null})}else{let t=parseInt(n,10);c.push({start:t,end:t})}return c}function w(s,c){let l=[];for(let n of c){let t=n.start-1,r=n.end===null?s.length:n.end;for(let i=t;i<r&&i<s.length;i++)i>=0&&!l.includes(s[i])&&l.push(s[i])}return l}var E={name:\"cut\",async execute(s,c){if(I(s))return x(T);let l=\"\t\",n=null,t=null,r=!1,i=[];for(let o=0;o<s.length;o++){let e=s[o];if(e===\"-d\")l=s[++o]||\"\t\";else if(e.startsWith(\"-d\"))l=e.slice(2);else if(e===\"-f\")n=s[++o];else if(e.startsWith(\"-f\"))n=e.slice(2);else if(e===\"-c\")t=s[++o];else if(e.startsWith(\"-c\"))t=e.slice(2);else if(e===\"-s\"||e===\"--only-delimited\")r=!0;else{if(e.startsWith(\"--\"))return m(\"cut\",e);if(e.startsWith(\"-\")){let f=!1;for(let u of e.slice(1))if(u===\"s\")r=!0;else if(!\"dfc\".includes(u)){f=!0;break}if(f)return m(\"cut\",e)}else i.push(e)}}if(!n&&!t)return{stdout:\"\",stderr:`cut: you must specify a list of bytes, characters, or fields\n`,exitCode:1};let p=await v(c,i,{cmdName:\"cut\"});if(!p.ok)return p.error;let a=(t?y(p.content):p.content).split(`\n`);a.length>0&&a[a.length-1]===\"\"&&a.pop();let g=b(n||t||\"1\"),h=\"\";for(let o of a)if(t){let e=Array.from(o),f=[];for(let u of g){let F=u.start-1,H=u.end===null?e.length:u.end;for(let d=F;d<H&&d<e.length;d++)d>=0&&f.push(e[d])}h+=`${f.join(\"\")}\n`}else{if(r&&!o.includes(l))continue;let e=o.split(l),f=w(e,g);h+=`${f.join(l)}\n`}return t?{stdout:h,stderr:\"\",exitCode:0}:{stdout:h,stderr:\"\",exitCode:0,stdoutKind:\"bytes\",stdoutEncoding:\"binary\"}}},S={name:\"cut\",flags:[{flag:\"-d\",type:\"value\",valueHint:\"delimiter\"},{flag:\"-f\",type:\"value\",valueHint:\"string\"},{flag:\"-c\",type:\"value\",valueHint:\"string\"},{flag:\"-s\",type:\"boolean\"}],stdinType:\"text\",needsFiles:!0};export{E as a,S as b};\n","import{createRequire} from\"node:module\";const require=createRequire(import.meta.url);\nimport{a,b}from\"./chunk-7JHM3L42.js\";import\"./chunk-YCLFEX4T.js\";import\"./chunk-NRSASXYY.js\";import\"./chunk-STHBFACM.js\";import\"./chunk-QAYAQNCG.js\";import\"./chunk-BZUGFHVS.js\";export{a as cutCommand,b as flagsForFuzzing};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;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E,IAAE,EAAE,QAAM,OAAK,EAAE,SAAO,EAAE;IAAI,KAAI,IAAI,IAAE,GAAE,IAAE,KAAG,IAAE,EAAE,QAAO,KAAI,KAAG,KAAG,EAAE,KAAK,EAAE,EAAE;GAAC;GAAC,KAAG,GAAG,EAAE,KAAK,EAAE,EAAE;;EAClP,OAAK;GAAC,IAAGH,OAAG,CAAC,EAAE,SAAS,CAAC,GAAE;GAAS,IAAiB,IAAE,EAAb,EAAE,MAAM,CAAO,GAAE,CAAC;GAAE,KAAG,GAAG,EAAE,KAAK,CAAC,EAAE;;EAC9E;EAAC,OAAO,IAAE;GAAC,QAAO;GAAE,QAAO;GAAG,UAAS;EAAC,IAAE;GAAC,QAAO;GAAE,QAAO;GAAG,UAAS;GAAE,YAAW;GAAQ,gBAAe;EAAQ;CAAC;AAAC;;;ACLhE,cAAc,OAAO,KAAK,GAAG"}
|
|
@@ -206,7 +206,7 @@ async function buildApp(options = {}) {
|
|
|
206
206
|
root
|
|
207
207
|
}));
|
|
208
208
|
if (options.emitRouteManifest !== false) {
|
|
209
|
-
const { emitRouteManifest } = await import("./emit-route-manifest-DRcNXHCP-
|
|
209
|
+
const { emitRouteManifest } = await import("./emit-route-manifest-DRcNXHCP-DN1BpGOi.mjs");
|
|
210
210
|
await emitRouteManifest(root);
|
|
211
211
|
}
|
|
212
212
|
} finally {
|
|
@@ -226,4 +226,4 @@ async function watchApp(options = {}) {
|
|
|
226
226
|
//#endregion
|
|
227
227
|
export { buildApp, resolveRuntimeBuildArtifact, watchApp };
|
|
228
228
|
|
|
229
|
-
//# sourceMappingURL=dist-
|
|
229
|
+
//# sourceMappingURL=dist-CrZVpQSd.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dist-CMxQJtOA.mjs","names":[],"sources":["../../../packages/tsdown-config/deps.js","../../../packages/tsdown-config/index.js","../../../packages/build/dist/index.mjs"],"sourcesContent":["import { isBuiltin } from \"node:module\";\n\n/** Native addons kept external — resolved from the CLI runtime at app start. */\nexport const NATIVE_RUNTIME_DEPS = [\"pg\", \"better-sqlite3\"];\n\n/** Kept external so .d.ts emission does not inline internal/inferred types. */\nexport const LIBRARY_EXTERNAL_DEPS = [\"better-auth\", /^@better-auth\\//, /^better-auth\\//];\n\n/** Non-auth runtime deps kept external for published entry bundles (platform, etc.). */\nexport const BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS = [\n ...NATIVE_RUNTIME_DEPS,\n \"dockerode\",\n \"ssh2\",\n \"cpu-features\",\n \"microsandbox\",\n /^@aws-sdk\\//,\n /^@napi-rs\\//,\n \"hono\",\n /^@hono\\//,\n \"undici\",\n];\n\n/** Kept external when bundling published entry points (cli, keystroke, platform). */\nexport const BUNDLED_ENTRY_EXTERNAL_DEPS = [\n ...BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS,\n ...LIBRARY_EXTERNAL_DEPS,\n];\n\n/** Bundle into CLI — device login uses Better Auth client only. */\nexport const BETTER_AUTH_CLIENT_BUNDLE_PATTERNS = [\n /^better-auth\\/client$/,\n /^better-auth\\/client\\//,\n];\n\n/** Server adapters and root entry — must not ship in the CLI bundle. */\nexport const BETTER_AUTH_SERVER_EXTERNAL_PATTERNS = [\n /^better-auth$/,\n /^@better-auth\\//,\n /^better-auth\\/(?!client(\\/|$)).+/,\n];\n\nexport function isNativeRuntimeDep(id) {\n return NATIVE_RUNTIME_DEPS.some((dep) => id === dep || id.startsWith(`${dep}/`));\n}\n\nfunction packageName(id) {\n if (id.startsWith(\"@\")) {\n const [scope, name] = id.split(\"/\");\n return name ? `${scope}/${name}` : id;\n }\n\n return id.split(\"/\")[0] ?? id;\n}\n\nfunction isRuntimeExternal(id) {\n const name = packageName(id);\n if (isNativeRuntimeDep(name)) {\n return true;\n }\n\n if (name.startsWith(\"@keystrokehq/\")) {\n return true;\n }\n\n if (name === \"better-auth\" || name.startsWith(\"@better-auth/\")) {\n return true;\n }\n\n return false;\n}\n\n/** Library packages resolve npm deps from node_modules at runtime. */\nexport function libraryBuildDepsConfig() {\n return {\n alwaysBundle: (_id) => null,\n neverBundle: [...NATIVE_RUNTIME_DEPS, /^@keystrokehq\\//, ...LIBRARY_EXTERNAL_DEPS],\n onlyBundle: false,\n };\n}\n\n/** Bundle npm deps into dist; resolve @keystrokehq/* and natives from the runtime. */\nexport function userAppBuildDepsConfig() {\n return {\n alwaysBundle: (id, _importer) => {\n if (id.startsWith(\".\") || id.startsWith(\"/\") || isBuiltin(id)) {\n return null;\n }\n\n return isRuntimeExternal(id) ? null : true;\n },\n neverBundle: [...NATIVE_RUNTIME_DEPS, /^@keystrokehq\\//, ...LIBRARY_EXTERNAL_DEPS],\n onlyBundle: false,\n };\n}\n\n/**\n * Published entry packages (cli, keystroke, platform): workspace packages live in\n * devDependencies and are bundled when imported. Runtime npm deps stay external.\n */\nexport function bundledEntryDepsConfig() {\n return {\n alwaysBundle: [/^@keystrokehq\\//],\n neverBundle: [...BUNDLED_ENTRY_EXTERNAL_DEPS],\n /** devDependencies (@keystrokehq/*) bundle when imported; suppress d.ts transitive noise */\n onlyBundle: false,\n };\n}\n\n/** Published CLI: inline better-auth client + @better-auth/*; keep server adapters external. */\nexport const BETTER_AUTH_CLI_BUNDLE_PATTERNS = [\n ...BETTER_AUTH_CLIENT_BUNDLE_PATTERNS,\n /^@better-auth\\//,\n];\n\nexport const BETTER_AUTH_CLI_EXTERNAL_PATTERNS = [\n /^better-auth$/,\n /^better-auth\\/(?!client(\\/|$)).+/,\n /^@better-auth\\/drizzle-adapter/,\n \"drizzle-orm\",\n];\n\n/** Rolldown/tsdown — native bindings; stay in CLI node_modules at runtime. */\nexport const CLI_BUILD_TOOL_EXTERNAL_PATTERNS = [\"tsdown\", \"rolldown\", /^@rolldown\\//, \"tsx\"];\n\n/** CLI: inline better-auth/client; keep server + drizzle adapters external. */\nexport function cliBundledEntryDepsConfig() {\n return {\n alwaysBundle: [/^@keystrokehq\\//, ...BETTER_AUTH_CLI_BUNDLE_PATTERNS],\n neverBundle: [\n ...BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS,\n ...BETTER_AUTH_CLI_EXTERNAL_PATTERNS,\n ...CLI_BUILD_TOOL_EXTERNAL_PATTERNS,\n ],\n onlyBundle: false,\n };\n}\n","import { bundledEntryDepsConfig, libraryBuildDepsConfig, userAppBuildDepsConfig } from \"./deps.js\";\n\nexport {\n isNativeRuntimeDep,\n NATIVE_RUNTIME_DEPS,\n bundledEntryDepsConfig,\n cliBundledEntryDepsConfig,\n libraryBuildDepsConfig,\n userAppBuildDepsConfig,\n} from \"./deps.js\";\n\nexport const baseTsdownConfig = {\n format: [\"esm\", \"cjs\"],\n dts: true,\n clean: true,\n sourcemap: true,\n target: \"node20\",\n deps: libraryBuildDepsConfig(),\n};\n\n/** tsdown config for published bundles (cli, keystroke, platform). */\nexport const bundledEntryTsdownConfig = {\n format: [\"esm\", \"cjs\"],\n dts: true,\n clean: true,\n sourcemap: true,\n target: \"node20\",\n deps: bundledEntryDepsConfig(),\n};\n","import { existsSync, mkdirSync, readdirSync, statSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport { entryIdFromFile } from \"@keystrokehq/server/discovery\";\nimport { packAssetDirs } from \"@keystrokehq/sandbox/files\";\nimport { baseTsdownConfig, userAppBuildDepsConfig } from \"@keystrokehq/tsdown-config\";\nimport { build, mergeConfig } from \"tsdown\";\n//#region src/resolve-runtime-artifact.ts\nfunction packageRoot(nodeModules, scope, name) {\n\tconst direct = scope ? join(nodeModules, scope, name) : join(nodeModules, name);\n\tif (existsSync(join(direct, \"package.json\"))) return direct;\n\tconst pnpmDir = join(nodeModules, \".pnpm\");\n\tif (!existsSync(pnpmDir)) return null;\n\tfor (const entry of readdirSync(pnpmDir)) {\n\t\tconst candidate = scope ? join(pnpmDir, entry, \"node_modules\", scope, name) : join(pnpmDir, entry, \"node_modules\", name);\n\t\tif (existsSync(join(candidate, \"package.json\"))) return candidate;\n\t}\n\treturn null;\n}\n/** Resolve a file shipped with `@keystrokehq/build` inside the CLI runtime. */\nfunction resolveRuntimeBuildArtifact(runtimeNodeModules, relativePath) {\n\tconst pkgRoot = packageRoot(runtimeNodeModules, \"@keystrokehq\", \"build\");\n\tif (!pkgRoot) throw new Error(\"Keystroke runtime is missing @keystrokehq/build\");\n\tconst artifact = join(pkgRoot, relativePath);\n\tif (!existsSync(artifact)) throw new Error(`Keystroke runtime artifact not found: ${relativePath}`);\n\treturn artifact;\n}\n//#endregion\n//#region src/vitest-plugin.ts\nconst ASSETS_MODULE$1 = \"@keystrokehq/assets\";\nconst virtualPrefix = `\\0${ASSETS_MODULE$1}:`;\n/** Vitest plugin resolving `@keystrokehq/assets` from disk. */\nfunction agentAssetsVitestPlugin(appRoot = process.cwd()) {\n\tlet manifest = null;\n\treturn {\n\t\tname: \"keystroke-assets\",\n\t\tresolveId(source) {\n\t\t\tif (source !== ASSETS_MODULE$1) return null;\n\t\t\treturn `${virtualPrefix}manifest`;\n\t\t},\n\t\tload(id) {\n\t\t\tif (id !== `${virtualPrefix}manifest`) return null;\n\t\t\tmanifest ??= packAssetDirs(appRoot);\n\t\t\treturn `export default ${JSON.stringify(manifest)};`;\n\t\t}\n\t};\n}\nfunction findAppRootFromConfig(configFile) {\n\tif (!configFile) return process.cwd();\n\treturn dirname(configFile);\n}\nfunction agentAssetsVitestPluginFromConfig(configFile) {\n\treturn agentAssetsVitestPlugin(findAppRootFromConfig(configFile));\n}\n//#endregion\n//#region src/index.ts\nconst ASSETS_MODULE = \"@keystrokehq/assets\";\nconst VIRTUAL_PREFIX = `\\0${ASSETS_MODULE}:`;\nfunction walkTypeScriptSources(dir) {\n\tif (!existsSync(dir)) return [];\n\tconst files = [];\n\tfor (const name of readdirSync(dir)) {\n\t\tconst path = join(dir, name);\n\t\tif (statSync(path).isDirectory()) files.push(...walkTypeScriptSources(path));\n\t\telse if (/\\.(ts|mts)$/.test(name) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(name)) files.push(path);\n\t}\n\treturn files;\n}\nfunction discoveredEntries(dir, nestedEntry, prefix) {\n\tconst entries = {};\n\tfor (const filePath of walkTypeScriptSources(dir)) {\n\t\tconst id = entryIdFromFile(dir, filePath, { nestedEntry });\n\t\tif (!id) continue;\n\t\tentries[`${prefix}/${id}`] = filePath;\n\t}\n\treturn entries;\n}\nfunction renderAssetModule(manifest) {\n\treturn `export default ${JSON.stringify(manifest)};\\n`;\n}\n/** Rolldown plugin: pack src/skills + src/files and expose `@keystrokehq/assets`. */\nfunction agentAssetsPlugin(options) {\n\tconst srcDir = options.srcDir ?? \"src\";\n\tlet manifest = null;\n\treturn {\n\t\tname: \"keystroke-assets\",\n\t\tbuildStart() {\n\t\t\tmanifest = packAssetDirs(options.root, srcDir);\n\t\t},\n\t\tresolveId(source) {\n\t\t\tif (source !== ASSETS_MODULE) return null;\n\t\t\treturn `${VIRTUAL_PREFIX}manifest`;\n\t\t},\n\t\tload(id) {\n\t\t\tif (id !== `${VIRTUAL_PREFIX}manifest` || !manifest) return null;\n\t\t\treturn renderAssetModule(manifest);\n\t\t},\n\t\tbuildEnd() {\n\t\t\tif (!manifest) return;\n\t\t\tconst outDir = join(options.root, options.outDir ?? \"dist\", \".keystroke\");\n\t\t\tmkdirSync(outDir, { recursive: true });\n\t\t\twriteFileSync(join(outDir, \"assets.mjs\"), renderAssetModule(manifest));\n\t\t}\n\t};\n}\n/** Full tsdown config for user keystroke apps (config + discovered modules only). */\nfunction createAppBuildConfig(options = {}) {\n\tconst root = options.root ?? process.cwd();\n\tconst srcDir = options.srcDir ?? \"src\";\n\tconst outDir = options.outDir ?? \"dist\";\n\tconst srcRoot = join(root, srcDir);\n\tconst configEntry = existsSync(join(root, \"keystroke.config.ts\")) ? join(root, \"keystroke.config.ts\") : void 0;\n\tconst entries = {\n\t\t...configEntry ? { config: configEntry } : {},\n\t\t...discoveredEntries(join(srcRoot, \"agents\"), \"agent\", \"agents\"),\n\t\t...discoveredEntries(join(srcRoot, \"workflows\"), \"workflow\", \"workflows\"),\n\t\t...discoveredEntries(join(srcRoot, \"triggers\"), \"trigger\", \"triggers\")\n\t};\n\tif (Object.keys(entries).length === 0) throw new Error(\"Nothing to build — add keystroke.config.ts or modules under src/\");\n\treturn mergeConfig(baseTsdownConfig, {\n\t\tentry: entries,\n\t\tformat: [\"esm\"],\n\t\toutDir: join(root, outDir),\n\t\tclean: options.clean ?? true,\n\t\tdts: false,\n\t\tloader: { \".md\": \"text\" },\n\t\tdeps: userAppBuildDepsConfig(),\n\t\tplugins: [agentAssetsPlugin({\n\t\t\troot,\n\t\t\tsrcDir,\n\t\t\toutDir\n\t\t})]\n\t});\n}\n/** Build user agents, workflows, triggers, and config to `dist/`. */\nasync function buildApp(options = {}) {\n\tconst root = options.root ?? process.cwd();\n\tconst previous = process.cwd();\n\ttry {\n\t\tprocess.chdir(root);\n\t\tawait build(createAppBuildConfig({\n\t\t\t...options,\n\t\t\troot\n\t\t}));\n\t\tif (options.emitRouteManifest !== false) {\n\t\t\tconst { emitRouteManifest } = await import(\"./emit-route-manifest-DRcNXHCP.mjs\");\n\t\t\tawait emitRouteManifest(root);\n\t\t}\n\t} finally {\n\t\tprocess.chdir(previous);\n\t}\n}\n/**\n* Watch `src/` and rebuild `dist/` on change.\n*\n* NOT true hot reload — each change runs a full tsdown rebuild. Callers should\n* restart the API server in `onRebuild` so discovery picks up new/changed modules.\n*/\nasync function watchApp(options = {}) {\n\tconst { runWatchApp } = await import(\"./watch-app-DTIeKrbl.mjs\");\n\tawait runWatchApp(buildApp, options);\n}\n//#endregion\nexport { agentAssetsVitestPlugin, agentAssetsVitestPluginFromConfig, buildApp, createAppBuildConfig, resolveRuntimeBuildArtifact, watchApp };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;AAGA,MAAa,sBAAsB,CAAC,MAAM,gBAAgB;;AAG1D,MAAa,wBAAwB;CAAC;CAAe;CAAmB;AAAgB;;AAiBxF,MAAa,8BAA8B,CACzC,GAAG;CAdH,GAAG;CACH;CACA;CACA;CACA;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KAAK,SAAS,QAAQ,GAAG,SAAS,QAAQ;EAC/D,GAAG,kBAAkB,KAAK,SAAS,WAAW,GAAG,YAAY,WAAW;EACxE,GAAG,kBAAkB,KAAK,SAAS,UAAU,GAAG,WAAW,UAAU;CACtE;CACA,IAAI,OAAO,KAAK,OAAO,EAAE,WAAW,GAAG,MAAM,IAAI,MAAM,kEAAkE;CACzH,OAAO,YAAY,kBAAkB;EACpC,OAAO;EACP,QAAQ,CAAC,KAAK;EACd,QAAQ,KAAK,MAAM,MAAM;EACzB,OAAO,QAAQ,SAAS;EACxB,KAAK;EACL,QAAQ,EAAE,OAAO,OAAO;EACxB,MAAM,uBAAuB;EAC7B,SAAS,CAAC,kBAAkB;GAC3B;GACA;GACA;EACD,CAAC,CAAC;CACH,CAAC;AACF;;AAEA,eAAe,SAAS,UAAU,CAAC,GAAG;CACrC,MAAM,OAAO,QAAQ,QAAQ,QAAQ,IAAI;CACzC,MAAM,WAAW,QAAQ,IAAI;CAC7B,IAAI;EACH,QAAQ,MAAM,IAAI;EAClB,MAAM,MAAM,qBAAqB;GAChC,GAAG;GACH;EACD,CAAC,CAAC;EACF,IAAI,QAAQ,sBAAsB,OAAO;GACxC,MAAM,EAAE,sBAAsB,MAAM,OAAO;GAC3C,MAAM,kBAAkB,IAAI;EAC7B;CACD,UAAU;EACT,QAAQ,MAAM,QAAQ;CACvB;AACD;;;;;;;AAOA,eAAe,SAAS,UAAU,CAAC,GAAG;CACrC,MAAM,EAAE,gBAAgB,MAAM,OAAO;CACrC,MAAM,YAAY,UAAU,OAAO;AACpC"}
|
|
1
|
+
{"version":3,"file":"dist-CrZVpQSd.mjs","names":[],"sources":["../../../packages/tsdown-config/deps.js","../../../packages/tsdown-config/index.js","../../../packages/build/dist/index.mjs"],"sourcesContent":["import { isBuiltin } from \"node:module\";\n\n/** Native addons kept external — resolved from the CLI runtime at app start. */\nexport const NATIVE_RUNTIME_DEPS = [\"pg\", \"better-sqlite3\"];\n\n/** Kept external so .d.ts emission does not inline internal/inferred types. */\nexport const LIBRARY_EXTERNAL_DEPS = [\"better-auth\", /^@better-auth\\//, /^better-auth\\//];\n\n/** Non-auth runtime deps kept external for published entry bundles (platform, etc.). */\nexport const BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS = [\n ...NATIVE_RUNTIME_DEPS,\n \"dockerode\",\n \"ssh2\",\n \"cpu-features\",\n \"microsandbox\",\n /^@aws-sdk\\//,\n /^@napi-rs\\//,\n \"hono\",\n /^@hono\\//,\n \"undici\",\n];\n\n/** Kept external when bundling published entry points (cli, keystroke, platform). */\nexport const BUNDLED_ENTRY_EXTERNAL_DEPS = [\n ...BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS,\n ...LIBRARY_EXTERNAL_DEPS,\n];\n\n/** Bundle into CLI — device login uses Better Auth client only. */\nexport const BETTER_AUTH_CLIENT_BUNDLE_PATTERNS = [\n /^better-auth\\/client$/,\n /^better-auth\\/client\\//,\n];\n\n/** Server adapters and root entry — must not ship in the CLI bundle. */\nexport const BETTER_AUTH_SERVER_EXTERNAL_PATTERNS = [\n /^better-auth$/,\n /^@better-auth\\//,\n /^better-auth\\/(?!client(\\/|$)).+/,\n];\n\nexport function isNativeRuntimeDep(id) {\n return NATIVE_RUNTIME_DEPS.some((dep) => id === dep || id.startsWith(`${dep}/`));\n}\n\nfunction packageName(id) {\n if (id.startsWith(\"@\")) {\n const [scope, name] = id.split(\"/\");\n return name ? `${scope}/${name}` : id;\n }\n\n return id.split(\"/\")[0] ?? id;\n}\n\nfunction isRuntimeExternal(id) {\n const name = packageName(id);\n if (isNativeRuntimeDep(name)) {\n return true;\n }\n\n if (name.startsWith(\"@keystrokehq/\")) {\n return true;\n }\n\n if (name === \"better-auth\" || name.startsWith(\"@better-auth/\")) {\n return true;\n }\n\n return false;\n}\n\n/** Library packages resolve npm deps from node_modules at runtime. */\nexport function libraryBuildDepsConfig() {\n return {\n alwaysBundle: (_id) => null,\n neverBundle: [...NATIVE_RUNTIME_DEPS, /^@keystrokehq\\//, ...LIBRARY_EXTERNAL_DEPS],\n onlyBundle: false,\n };\n}\n\n/** Bundle npm deps into dist; resolve @keystrokehq/* and natives from the runtime. */\nexport function userAppBuildDepsConfig() {\n return {\n alwaysBundle: (id, _importer) => {\n if (id.startsWith(\".\") || id.startsWith(\"/\") || isBuiltin(id)) {\n return null;\n }\n\n return isRuntimeExternal(id) ? null : true;\n },\n neverBundle: [...NATIVE_RUNTIME_DEPS, /^@keystrokehq\\//, ...LIBRARY_EXTERNAL_DEPS],\n onlyBundle: false,\n };\n}\n\n/**\n * Published entry packages (cli, keystroke, platform): workspace packages live in\n * devDependencies and are bundled when imported. Runtime npm deps stay external.\n */\nexport function bundledEntryDepsConfig() {\n return {\n alwaysBundle: [/^@keystrokehq\\//],\n neverBundle: [...BUNDLED_ENTRY_EXTERNAL_DEPS],\n /** devDependencies (@keystrokehq/*) bundle when imported; suppress d.ts transitive noise */\n onlyBundle: false,\n };\n}\n\n/** Published CLI: inline better-auth client + @better-auth/*; keep server adapters external. */\nexport const BETTER_AUTH_CLI_BUNDLE_PATTERNS = [\n ...BETTER_AUTH_CLIENT_BUNDLE_PATTERNS,\n /^@better-auth\\//,\n];\n\nexport const BETTER_AUTH_CLI_EXTERNAL_PATTERNS = [\n /^better-auth$/,\n /^better-auth\\/(?!client(\\/|$)).+/,\n /^@better-auth\\/drizzle-adapter/,\n \"drizzle-orm\",\n];\n\n/** Rolldown/tsdown — native bindings; stay in CLI node_modules at runtime. */\nexport const CLI_BUILD_TOOL_EXTERNAL_PATTERNS = [\"tsdown\", \"rolldown\", /^@rolldown\\//, \"tsx\"];\n\n/** CLI: inline better-auth/client; keep server + drizzle adapters external. */\nexport function cliBundledEntryDepsConfig() {\n return {\n alwaysBundle: [/^@keystrokehq\\//, ...BETTER_AUTH_CLI_BUNDLE_PATTERNS],\n neverBundle: [\n ...BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS,\n ...BETTER_AUTH_CLI_EXTERNAL_PATTERNS,\n ...CLI_BUILD_TOOL_EXTERNAL_PATTERNS,\n ],\n onlyBundle: false,\n };\n}\n","import { bundledEntryDepsConfig, libraryBuildDepsConfig, userAppBuildDepsConfig } from \"./deps.js\";\n\nexport {\n isNativeRuntimeDep,\n NATIVE_RUNTIME_DEPS,\n bundledEntryDepsConfig,\n cliBundledEntryDepsConfig,\n libraryBuildDepsConfig,\n userAppBuildDepsConfig,\n} from \"./deps.js\";\n\nexport const baseTsdownConfig = {\n format: [\"esm\", \"cjs\"],\n dts: true,\n clean: true,\n sourcemap: true,\n target: \"node20\",\n deps: libraryBuildDepsConfig(),\n};\n\n/** tsdown config for published bundles (cli, keystroke, platform). */\nexport const bundledEntryTsdownConfig = {\n format: [\"esm\", \"cjs\"],\n dts: true,\n clean: true,\n sourcemap: true,\n target: \"node20\",\n deps: bundledEntryDepsConfig(),\n};\n","import { existsSync, mkdirSync, readdirSync, statSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport { entryIdFromFile } from \"@keystrokehq/server/discovery\";\nimport { packAssetDirs } from \"@keystrokehq/sandbox/files\";\nimport { baseTsdownConfig, userAppBuildDepsConfig } from \"@keystrokehq/tsdown-config\";\nimport { build, mergeConfig } from \"tsdown\";\n//#region src/resolve-runtime-artifact.ts\nfunction packageRoot(nodeModules, scope, name) {\n\tconst direct = scope ? join(nodeModules, scope, name) : join(nodeModules, name);\n\tif (existsSync(join(direct, \"package.json\"))) return direct;\n\tconst pnpmDir = join(nodeModules, \".pnpm\");\n\tif (!existsSync(pnpmDir)) return null;\n\tfor (const entry of readdirSync(pnpmDir)) {\n\t\tconst candidate = scope ? join(pnpmDir, entry, \"node_modules\", scope, name) : join(pnpmDir, entry, \"node_modules\", name);\n\t\tif (existsSync(join(candidate, \"package.json\"))) return candidate;\n\t}\n\treturn null;\n}\n/** Resolve a file shipped with `@keystrokehq/build` inside the CLI runtime. */\nfunction resolveRuntimeBuildArtifact(runtimeNodeModules, relativePath) {\n\tconst pkgRoot = packageRoot(runtimeNodeModules, \"@keystrokehq\", \"build\");\n\tif (!pkgRoot) throw new Error(\"Keystroke runtime is missing @keystrokehq/build\");\n\tconst artifact = join(pkgRoot, relativePath);\n\tif (!existsSync(artifact)) throw new Error(`Keystroke runtime artifact not found: ${relativePath}`);\n\treturn artifact;\n}\n//#endregion\n//#region src/vitest-plugin.ts\nconst ASSETS_MODULE$1 = \"@keystrokehq/assets\";\nconst virtualPrefix = `\\0${ASSETS_MODULE$1}:`;\n/** Vitest plugin resolving `@keystrokehq/assets` from disk. */\nfunction agentAssetsVitestPlugin(appRoot = process.cwd()) {\n\tlet manifest = null;\n\treturn {\n\t\tname: \"keystroke-assets\",\n\t\tresolveId(source) {\n\t\t\tif (source !== ASSETS_MODULE$1) return null;\n\t\t\treturn `${virtualPrefix}manifest`;\n\t\t},\n\t\tload(id) {\n\t\t\tif (id !== `${virtualPrefix}manifest`) return null;\n\t\t\tmanifest ??= packAssetDirs(appRoot);\n\t\t\treturn `export default ${JSON.stringify(manifest)};`;\n\t\t}\n\t};\n}\nfunction findAppRootFromConfig(configFile) {\n\tif (!configFile) return process.cwd();\n\treturn dirname(configFile);\n}\nfunction agentAssetsVitestPluginFromConfig(configFile) {\n\treturn agentAssetsVitestPlugin(findAppRootFromConfig(configFile));\n}\n//#endregion\n//#region src/index.ts\nconst ASSETS_MODULE = \"@keystrokehq/assets\";\nconst VIRTUAL_PREFIX = `\\0${ASSETS_MODULE}:`;\nfunction walkTypeScriptSources(dir) {\n\tif (!existsSync(dir)) return [];\n\tconst files = [];\n\tfor (const name of readdirSync(dir)) {\n\t\tconst path = join(dir, name);\n\t\tif (statSync(path).isDirectory()) files.push(...walkTypeScriptSources(path));\n\t\telse if (/\\.(ts|mts)$/.test(name) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(name)) files.push(path);\n\t}\n\treturn files;\n}\nfunction discoveredEntries(dir, nestedEntry, prefix) {\n\tconst entries = {};\n\tfor (const filePath of walkTypeScriptSources(dir)) {\n\t\tconst id = entryIdFromFile(dir, filePath, { nestedEntry });\n\t\tif (!id) continue;\n\t\tentries[`${prefix}/${id}`] = filePath;\n\t}\n\treturn entries;\n}\nfunction renderAssetModule(manifest) {\n\treturn `export default ${JSON.stringify(manifest)};\\n`;\n}\n/** Rolldown plugin: pack src/skills + src/files and expose `@keystrokehq/assets`. */\nfunction agentAssetsPlugin(options) {\n\tconst srcDir = options.srcDir ?? \"src\";\n\tlet manifest = null;\n\treturn {\n\t\tname: \"keystroke-assets\",\n\t\tbuildStart() {\n\t\t\tmanifest = packAssetDirs(options.root, srcDir);\n\t\t},\n\t\tresolveId(source) {\n\t\t\tif (source !== ASSETS_MODULE) return null;\n\t\t\treturn `${VIRTUAL_PREFIX}manifest`;\n\t\t},\n\t\tload(id) {\n\t\t\tif (id !== `${VIRTUAL_PREFIX}manifest` || !manifest) return null;\n\t\t\treturn renderAssetModule(manifest);\n\t\t},\n\t\tbuildEnd() {\n\t\t\tif (!manifest) return;\n\t\t\tconst outDir = join(options.root, options.outDir ?? \"dist\", \".keystroke\");\n\t\t\tmkdirSync(outDir, { recursive: true });\n\t\t\twriteFileSync(join(outDir, \"assets.mjs\"), renderAssetModule(manifest));\n\t\t}\n\t};\n}\n/** Full tsdown config for user keystroke apps (config + discovered modules only). */\nfunction createAppBuildConfig(options = {}) {\n\tconst root = options.root ?? process.cwd();\n\tconst srcDir = options.srcDir ?? \"src\";\n\tconst outDir = options.outDir ?? \"dist\";\n\tconst srcRoot = join(root, srcDir);\n\tconst configEntry = existsSync(join(root, \"keystroke.config.ts\")) ? join(root, \"keystroke.config.ts\") : void 0;\n\tconst entries = {\n\t\t...configEntry ? { config: configEntry } : {},\n\t\t...discoveredEntries(join(srcRoot, \"agents\"), \"agent\", \"agents\"),\n\t\t...discoveredEntries(join(srcRoot, \"workflows\"), \"workflow\", \"workflows\"),\n\t\t...discoveredEntries(join(srcRoot, \"triggers\"), \"trigger\", \"triggers\")\n\t};\n\tif (Object.keys(entries).length === 0) throw new Error(\"Nothing to build — add keystroke.config.ts or modules under src/\");\n\treturn mergeConfig(baseTsdownConfig, {\n\t\tentry: entries,\n\t\tformat: [\"esm\"],\n\t\toutDir: join(root, outDir),\n\t\tclean: options.clean ?? true,\n\t\tdts: false,\n\t\tloader: { \".md\": \"text\" },\n\t\tdeps: userAppBuildDepsConfig(),\n\t\tplugins: [agentAssetsPlugin({\n\t\t\troot,\n\t\t\tsrcDir,\n\t\t\toutDir\n\t\t})]\n\t});\n}\n/** Build user agents, workflows, triggers, and config to `dist/`. */\nasync function buildApp(options = {}) {\n\tconst root = options.root ?? process.cwd();\n\tconst previous = process.cwd();\n\ttry {\n\t\tprocess.chdir(root);\n\t\tawait build(createAppBuildConfig({\n\t\t\t...options,\n\t\t\troot\n\t\t}));\n\t\tif (options.emitRouteManifest !== false) {\n\t\t\tconst { emitRouteManifest } = await import(\"./emit-route-manifest-DRcNXHCP.mjs\");\n\t\t\tawait emitRouteManifest(root);\n\t\t}\n\t} finally {\n\t\tprocess.chdir(previous);\n\t}\n}\n/**\n* Watch `src/` and rebuild `dist/` on change.\n*\n* NOT true hot reload — each change runs a full tsdown rebuild. Callers should\n* restart the API server in `onRebuild` so discovery picks up new/changed modules.\n*/\nasync function watchApp(options = {}) {\n\tconst { runWatchApp } = await import(\"./watch-app-DTIeKrbl.mjs\");\n\tawait runWatchApp(buildApp, options);\n}\n//#endregion\nexport { agentAssetsVitestPlugin, agentAssetsVitestPluginFromConfig, buildApp, createAppBuildConfig, resolveRuntimeBuildArtifact, watchApp };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;AAGA,MAAa,sBAAsB,CAAC,MAAM,gBAAgB;;AAG1D,MAAa,wBAAwB;CAAC;CAAe;CAAmB;AAAgB;;AAiBxF,MAAa,8BAA8B,CACzC,GAAG;CAdH,GAAG;CACH;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAKG,GACH,GAAG,qBACL;;AAGA,MAAa,qCAAqC,CAChD,yBACA,wBAC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YAAY,WAAW;EACxE,GAAG,kBAAkB,KAAK,SAAS,UAAU,GAAG,WAAW,UAAU;CACtE;CACA,IAAI,OAAO,KAAK,OAAO,EAAE,WAAW,GAAG,MAAM,IAAI,MAAM,kEAAkE;CACzH,OAAO,YAAY,kBAAkB;EACpC,OAAO;EACP,QAAQ,CAAC,KAAK;EACd,QAAQ,KAAK,MAAM,MAAM;EACzB,OAAO,QAAQ,SAAS;EACxB,KAAK;EACL,QAAQ,EAAE,OAAO,OAAO;EACxB,MAAM,uBAAuB;EAC7B,SAAS,CAAC,kBAAkB;GAC3B;GACA;GACA;EACD,CAAC,CAAC;CACH,CAAC;AACF;;AAEA,eAAe,SAAS,UAAU,CAAC,GAAG;CACrC,MAAM,OAAO,QAAQ,QAAQ,QAAQ,IAAI;CACzC,MAAM,WAAW,QAAQ,IAAI;CAC7B,IAAI;EACH,QAAQ,MAAM,IAAI;EAClB,MAAM,MAAM,qBAAqB;GAChC,GAAG;GACH;EACD,CAAC,CAAC;EACF,IAAI,QAAQ,sBAAsB,OAAO;GACxC,MAAM,EAAE,sBAAsB,MAAM,OAAO;GAC3C,MAAM,kBAAkB,IAAI;EAC7B;CACD,UAAU;EACT,QAAQ,MAAM,QAAQ;CACvB;AACD;;;;;;;AAOA,eAAe,SAAS,UAAU,CAAC,GAAG;CACrC,MAAM,EAAE,gBAAgB,MAAM,OAAO;CACrC,MAAM,YAAY,UAAU,OAAO;AACpC"}
|
|
@@ -27,7 +27,7 @@ const ZodIssueCode = {
|
|
|
27
27
|
var ZodFirstPartyTypeKind;
|
|
28
28
|
(function(ZodFirstPartyTypeKind) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
29
29
|
//#endregion
|
|
30
|
-
//#region ../../packages/keystroke/dist/dist-
|
|
30
|
+
//#region ../../packages/keystroke/dist/dist-D_ZSj4pO.mjs
|
|
31
31
|
/** Auth, session, and account-entry URL segments. */
|
|
32
32
|
const AUTH_ACCOUNT_SLUGS = [
|
|
33
33
|
"2fa",
|
|
@@ -676,14 +676,18 @@ const ProjectStatusSchema = _enum([
|
|
|
676
676
|
"active",
|
|
677
677
|
"failed"
|
|
678
678
|
]);
|
|
679
|
-
const OrganizationUserRoleSchema = _enum([
|
|
680
|
-
|
|
679
|
+
const OrganizationUserRoleSchema = _enum([
|
|
680
|
+
"owner",
|
|
681
|
+
"admin",
|
|
682
|
+
"builder"
|
|
683
|
+
]);
|
|
684
|
+
const isoDateTime$2 = string().datetime();
|
|
681
685
|
const OrganizationSchema = object({
|
|
682
686
|
id: string(),
|
|
683
687
|
name: string(),
|
|
684
688
|
slug: OrganizationSlugSchema,
|
|
685
|
-
createdAt: isoDateTime$
|
|
686
|
-
updatedAt: isoDateTime$
|
|
689
|
+
createdAt: isoDateTime$2,
|
|
690
|
+
updatedAt: isoDateTime$2
|
|
687
691
|
});
|
|
688
692
|
const ProjectSchema = object({
|
|
689
693
|
id: string(),
|
|
@@ -693,8 +697,8 @@ const ProjectSchema = object({
|
|
|
693
697
|
baseUrl: string().nullable(),
|
|
694
698
|
runtimeId: string().nullable(),
|
|
695
699
|
lastError: string().nullable(),
|
|
696
|
-
createdAt: isoDateTime$
|
|
697
|
-
updatedAt: isoDateTime$
|
|
700
|
+
createdAt: isoDateTime$2,
|
|
701
|
+
updatedAt: isoDateTime$2
|
|
698
702
|
});
|
|
699
703
|
const UserOrganizationSchema = object({
|
|
700
704
|
organization: OrganizationSchema,
|
|
@@ -1099,6 +1103,57 @@ object({ triggers: array(object({
|
|
|
1099
1103
|
workflowKey: string()
|
|
1100
1104
|
})) });
|
|
1101
1105
|
object({ endpoint: string().min(1).optional() });
|
|
1106
|
+
const OrganizationMemberRoleSchema = _enum([
|
|
1107
|
+
"owner",
|
|
1108
|
+
"admin",
|
|
1109
|
+
"builder"
|
|
1110
|
+
]);
|
|
1111
|
+
const OrganizationMemberStatusSchema = _enum([
|
|
1112
|
+
"invited",
|
|
1113
|
+
"active",
|
|
1114
|
+
"rejected",
|
|
1115
|
+
"suspended"
|
|
1116
|
+
]);
|
|
1117
|
+
const InvitableOrganizationMemberRoleSchema = _enum(["admin", "builder"]);
|
|
1118
|
+
const isoDateTime$1 = string().datetime();
|
|
1119
|
+
const OrganizationMemberSchema = object({
|
|
1120
|
+
id: string(),
|
|
1121
|
+
name: string(),
|
|
1122
|
+
email: string().email(),
|
|
1123
|
+
role: OrganizationMemberRoleSchema,
|
|
1124
|
+
status: OrganizationMemberStatusSchema,
|
|
1125
|
+
avatarUrl: string().optional(),
|
|
1126
|
+
joinedAt: isoDateTime$1.optional(),
|
|
1127
|
+
lastActiveAt: isoDateTime$1.nullable().optional()
|
|
1128
|
+
});
|
|
1129
|
+
object({ members: array(OrganizationMemberSchema) });
|
|
1130
|
+
object({
|
|
1131
|
+
emails: array(string().trim().email()).min(1),
|
|
1132
|
+
role: InvitableOrganizationMemberRoleSchema
|
|
1133
|
+
});
|
|
1134
|
+
const InviteOrganizationMemberResultStatusSchema = _enum([
|
|
1135
|
+
"sent",
|
|
1136
|
+
"already_member",
|
|
1137
|
+
"pending",
|
|
1138
|
+
"invalid"
|
|
1139
|
+
]);
|
|
1140
|
+
object({ results: array(object({
|
|
1141
|
+
email: string(),
|
|
1142
|
+
status: InviteOrganizationMemberResultStatusSchema,
|
|
1143
|
+
invitationId: string().optional()
|
|
1144
|
+
})) });
|
|
1145
|
+
object({ role: InvitableOrganizationMemberRoleSchema });
|
|
1146
|
+
object({ member: OrganizationMemberSchema });
|
|
1147
|
+
object({ invitations: array(object({
|
|
1148
|
+
id: string(),
|
|
1149
|
+
organizationName: string(),
|
|
1150
|
+
organizationSlug: OrganizationSlugSchema,
|
|
1151
|
+
invitedByName: string().optional(),
|
|
1152
|
+
invitedByEmail: string().email().optional(),
|
|
1153
|
+
role: OrganizationMemberRoleSchema
|
|
1154
|
+
})) });
|
|
1155
|
+
object({ organization: UserOrganizationSchema });
|
|
1156
|
+
object({ success: literal(true) });
|
|
1102
1157
|
const ProjectArtifactStatusSchema = _enum(["pending", "ready"]);
|
|
1103
1158
|
const isoDateTime = string().datetime();
|
|
1104
1159
|
const ProjectArtifactSchema = object({
|
|
@@ -1130,7 +1185,7 @@ object({
|
|
|
1130
1185
|
});
|
|
1131
1186
|
new AsyncLocalStorage();
|
|
1132
1187
|
//#endregion
|
|
1133
|
-
//#region ../../packages/keystroke/dist/dist-
|
|
1188
|
+
//#region ../../packages/keystroke/dist/dist-DRPUD4yJ.mjs
|
|
1134
1189
|
const RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
1135
1190
|
/**
|
|
1136
1191
|
* Assert 'object' type schema.
|
|
@@ -14364,10 +14419,27 @@ const organizationUsers = pgTable("organization_users", {
|
|
|
14364
14419
|
organizationId: text$1("organization_id").notNull().references(() => organizations.id, { onDelete: "cascade" }),
|
|
14365
14420
|
userId: text$1("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
14366
14421
|
role: text$1("role").notNull().$type(),
|
|
14422
|
+
status: text$1("status").notNull().$type().default("active"),
|
|
14367
14423
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
14368
14424
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull(),
|
|
14369
14425
|
deletedAt: timestamp("deleted_at", { withTimezone: true })
|
|
14370
14426
|
}, (table) => [primaryKey$1({ columns: [table.organizationId, table.userId] }), index$1("organization_users_user_id_idx").on(table.userId)]);
|
|
14427
|
+
const organizationInvitations = pgTable("organization_invitations", {
|
|
14428
|
+
id: text$1("id").primaryKey(),
|
|
14429
|
+
organizationId: text$1("organization_id").notNull().references(() => organizations.id, { onDelete: "cascade" }),
|
|
14430
|
+
userId: text$1("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
14431
|
+
email: text$1("email").notNull(),
|
|
14432
|
+
role: text$1("role").notNull().$type(),
|
|
14433
|
+
status: text$1("status").notNull().$type(),
|
|
14434
|
+
invitedByUserId: text$1("invited_by_user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
14435
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
14436
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull(),
|
|
14437
|
+
expiresAt: timestamp("expires_at", { withTimezone: true })
|
|
14438
|
+
}, (table) => [
|
|
14439
|
+
index$1("organization_invitations_user_id_idx").on(table.userId),
|
|
14440
|
+
index$1("organization_invitations_organization_id_idx").on(table.organizationId),
|
|
14441
|
+
uniqueIndex$1("organization_invitations_org_user_pending_unique").on(table.organizationId, table.userId).where(sql`${table.status} = 'pending'`)
|
|
14442
|
+
]);
|
|
14371
14443
|
const projectStatusEnum = pgEnum("project_status", [
|
|
14372
14444
|
"inactive",
|
|
14373
14445
|
"starting",
|
|
@@ -14410,6 +14482,7 @@ const secretValues = pgTable("secret_values", {
|
|
|
14410
14482
|
buildPgSchema({
|
|
14411
14483
|
organizations: { pg: organizations },
|
|
14412
14484
|
organizationUsers: { pg: organizationUsers },
|
|
14485
|
+
organizationInvitations: { pg: organizationInvitations },
|
|
14413
14486
|
projects: { pg: projects },
|
|
14414
14487
|
projectArtifacts: { pg: projectArtifacts },
|
|
14415
14488
|
users: { pg: users },
|
|
@@ -14509,4 +14582,4 @@ async function withSpan(input, fn) {
|
|
|
14509
14582
|
//#endregion
|
|
14510
14583
|
export { createSession as a, isCredentialError as c, withSpan as d, zodToJsonSchema as f, captureConsole as i, listMessageEvents as l, ZodIssueCode as m, appendEvent as n, getSession as o, defineCredential as p, buildCredentialRunContext as r, getTraceContext as s, MESSAGE_EVENT_TYPE as t, touchSession as u };
|
|
14511
14584
|
|
|
14512
|
-
//# sourceMappingURL=dist-
|
|
14585
|
+
//# sourceMappingURL=dist-DRPUD4yJ-3gMinGsn.mjs.map
|