@lakitu/sdk 0.1.9 → 0.1.11
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../cli/commands/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAcH,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../cli/commands/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAcH,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAsQD,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,iBAiBhD"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* 4. Build E2B template with pre-built state baked in
|
|
11
11
|
*/
|
|
12
12
|
import { Template, defaultBuildLogger, waitForPort } from "e2b";
|
|
13
|
-
import { existsSync, mkdirSync, rmSync, cpSync, writeFileSync, readFileSync } from "fs";
|
|
13
|
+
import { existsSync, mkdirSync, rmSync, cpSync, writeFileSync, readFileSync, readdirSync } from "fs";
|
|
14
14
|
import { join, dirname } from "path";
|
|
15
15
|
import { execSync, spawn } from "child_process";
|
|
16
16
|
import { fileURLToPath } from "url";
|
|
@@ -207,17 +207,21 @@ async function buildCustom(apiKey, baseId) {
|
|
|
207
207
|
console.log("📦 Preparing build context...");
|
|
208
208
|
rmSync(buildDir, { recursive: true, force: true });
|
|
209
209
|
mkdirSync(buildDir, { recursive: true });
|
|
210
|
-
// Copy lakitu source (excluding node_modules, .git, template, cli)
|
|
210
|
+
// Copy lakitu source (excluding node_modules, .git, template, cli, dist)
|
|
211
211
|
const excludes = ["node_modules", ".git", "template", "cli", "dist"];
|
|
212
212
|
cpSync(PACKAGE_ROOT, join(buildDir, "lakitu"), {
|
|
213
213
|
recursive: true,
|
|
214
|
-
filter: (src) =>
|
|
214
|
+
filter: (src) => {
|
|
215
|
+
// Get path relative to PACKAGE_ROOT to avoid matching parent directories
|
|
216
|
+
const rel = src.slice(PACKAGE_ROOT.length);
|
|
217
|
+
return !excludes.some(ex => rel.includes(`/${ex}`));
|
|
218
|
+
},
|
|
215
219
|
});
|
|
216
220
|
// Copy user's project KSAs from lakitu/ folder (if exists)
|
|
217
221
|
const userKsaDir = join(process.cwd(), "lakitu");
|
|
218
222
|
if (existsSync(userKsaDir)) {
|
|
219
223
|
console.log(" Copying project KSAs from lakitu/...");
|
|
220
|
-
const ksaFiles =
|
|
224
|
+
const ksaFiles = readdirSync(userKsaDir).filter((f) => f.endsWith(".ts"));
|
|
221
225
|
for (const file of ksaFiles) {
|
|
222
226
|
cpSync(join(userKsaDir, file), join(buildDir, "lakitu/ksa", file));
|
|
223
227
|
}
|