@akanjs/cli 3.1.1-rc.0 → 3.1.1-rc.10
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/.build-stamp +1 -1
- package/{CodeAgent-4pnxwptq.js → CodeAgent-8d5qs787.js} +2 -2
- package/{CodeTui-hhndze8h.js → CodeTui-z5vkm9ea.js} +1 -1
- package/TunnelShare-qkm8zp03.js +14 -0
- package/{agent.command-p02330r6.js → agent.command-ydftceda.js} +5 -5
- package/akanCode.js +2 -2
- package/{application.command-ywks5ywm.js → application.command-wthg8nn9.js} +18 -13
- package/{applicationBuildRunner-9cnnsdm5.js → applicationBuildRunner-t2r84sz6.js} +72 -26
- package/buildBatch.proc.js +5 -5
- package/{cloud.command-1tzkvje1.js → cloud.command-sz11hpre.js} +22 -17
- package/cloud.script-nqevg5qw.js +24 -0
- package/{code.command-16pm1p2v.js → code.command-9h3yrzhe.js} +6 -6
- package/{context.command-6ys86sqf.js → context.command-15j9b7c0.js} +16 -16
- package/context.runner-8gg030b0.js +25 -0
- package/{guideline.command-3zay3d8g.js → guideline.command-snh85ctf.js} +2 -2
- package/guidelines/agentRule/agentRule.instruction.md +21 -4
- package/guidelines/conventions/conventions.instruction.md +17 -10
- package/guidelines/mcpRule/mcpRule.instruction.md +13 -6
- package/guidelines/pageRule/pageRule.instruction.md +21 -5
- package/guidelines/queryRule/queryRule.instruction.md +13 -1
- package/guidelines/runtimeRule/runtimeRule.instruction.md +20 -2
- package/guidelines/ssrRule/ssrRule.instruction.md +6 -1
- package/guidelines/transportRule/transportRule.instruction.md +12 -5
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +2 -1
- package/incrementalBuilder.proc.js +3 -3
- package/{index-jgs8z8xb.js → index-0fz95kxe.js} +1 -1
- package/{index-1f33g2z5.js → index-2azahjaw.js} +81 -28
- package/{index-kcbq2qcf.js → index-2mwc0g0d.js} +1 -1
- package/{index-qkcwsg6r.js → index-2xcc2ax5.js} +2 -2
- package/{index-68c3gzvg.js → index-301pdbzz.js} +56 -9
- package/{index-z6v7k9sb.js → index-31es1yev.js} +24 -2
- package/{index-p4dnj2wc.js → index-3wypz6xj.js} +59 -8
- package/{index-e9e9cebg.js → index-40brg4px.js} +3 -3
- package/{index-tk3jg2bm.js → index-42j4a8zq.js} +2 -2
- package/{index-1mfyyxh5.js → index-4vgbysa0.js} +3 -3
- package/{index-9hbhm6cs.js → index-55j120r8.js} +1 -1
- package/{index-vg28jsf9.js → index-6txx6a9p.js} +214 -71
- package/{index-zn6bn1s2.js → index-74tjjsnc.js} +4 -4
- package/{index-g2s33373.js → index-905qdgqp.js} +1 -1
- package/{index-qtkycaqn.js → index-9th4gszy.js} +38 -21
- package/{index-bb4hj03s.js → index-a58emady.js} +10 -10
- package/{index-4w3skd33.js → index-a5dhqkdr.js} +3 -3
- package/{index-sh9mmp5v.js → index-b70zct19.js} +7 -7
- package/{index-z9xepn8t.js → index-bt438yxm.js} +556 -142
- package/{index-ngpn9hzy.js → index-espk51ah.js} +2 -2
- package/{index-b5vptvnt.js → index-hmt54t45.js} +4 -4
- package/{index-qfzfaq96.js → index-j9vyj3dj.js} +3 -3
- package/{index-ekpp5tax.js → index-js6geqjn.js} +4 -97
- package/{index-fmder14z.js → index-pcwzkdqb.js} +1 -1
- package/{index-jaa81e9r.js → index-qfp55x1y.js} +4 -4
- package/{index-sng3vt0p.js → index-skk9zc1x.js} +2 -2
- package/{index-rr7jk14m.js → index-wcej7g4z.js} +13 -10
- package/{index-q8age5az.js → index-xb8809yb.js} +2 -2
- package/{index-ynqxpwx6.js → index-xjf5j657.js} +1 -1
- package/index.js +22 -22
- package/{library.command-a8n9h8j4.js → library.command-gycrwhf1.js} +3 -3
- package/{localRegistry.command-1e6m7w2f.js → localRegistry.command-jtd8gaes.js} +12 -12
- package/{module.command-b6f1p1xa.js → module.command-v6hgs1bc.js} +5 -5
- package/{package.command-tc27ftmy.js → package.command-shzpcfph.js} +3 -3
- package/package.json +2 -2
- package/{page.command-m5wyqfkd.js → page.command-ptxn5kqk.js} +3 -3
- package/{pipeline.command-4qxyafpz.js → pipeline.command-zz31pgax.js} +2 -2
- package/{primitive.command-9yaatk0d.js → primitive.command-a1vse91z.js} +6 -6
- package/{projectTypecheck-87k6z6ab.js → projectTypecheck-2ztky9cf.js} +1 -1
- package/{quality.command-ht1wjhv8.js → quality.command-ah8qcakd.js} +387 -73
- package/{repair.command-evg9g911.js → repair.command-cvazbz99.js} +5 -5
- package/{scalar.command-xsejjeq1.js → scalar.command-0acvyp26.js} +4 -4
- package/{subspace.command-ps12q5y7.js → subspace.command-822qx2bx.js} +8 -8
- package/templates/app/tsconfig.json.template +2 -7
- package/templates/env/_env.server.type.ts +10 -5
- package/templates/facetIndex/index.ts +2 -2
- package/templates/workspaceRoot/bunfig.toml.template +0 -4
- package/{tunnel.command-khzgvrj8.js → tunnel.command-ycmja19q.js} +7 -7
- package/{workflow.command-qpyq0ya5.js → workflow.command-abb1d5xy.js} +10 -10
- package/{workspace.command-3dq7e9g2.js → workspace.command-qm7cw29v.js} +33 -32
- package/TunnelShare-zmq6bbar.js +0 -14
- package/cloud.script-8g83xqdg.js +0 -24
- package/context.runner-3jrypwe3.js +0 -25
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9f13c17293990cc526572e2a8a0f31695c50d7a90bd552aa5ed3dc2137b8c279
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
TunnelShare2
|
|
4
|
+
} from "./index-2mwc0g0d.js";
|
|
5
|
+
import"./index-2azahjaw.js";
|
|
6
|
+
import"./index-bt438yxm.js";
|
|
7
|
+
import"./index-m9jj544v.js";
|
|
8
|
+
import"./index-xb8809yb.js";
|
|
9
|
+
import"./index-0fz95kxe.js";
|
|
10
|
+
import"./index-wcej7g4z.js";
|
|
11
|
+
import"./index-52w0fvh8.js";
|
|
12
|
+
export {
|
|
13
|
+
TunnelShare2 as TunnelShare
|
|
14
|
+
};
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-3wypz6xj.js";
|
|
6
6
|
import"./index-52w0fvh8.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-wcej7g4z.js";
|
|
8
8
|
import"./index-hj6w4ka1.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
import"./index-xjf5j657.js";
|
|
10
|
+
import"./index-31es1yev.js";
|
|
11
11
|
import"./index-zzvvc845.js";
|
|
12
12
|
import {
|
|
13
13
|
AgentScript
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-4vgbysa0.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/agent/agent.command.ts
|
|
17
17
|
class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
|
package/akanCode.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
CodeMailbox2,
|
|
29
29
|
CodeSessionFork2,
|
|
30
30
|
CodeAgent2
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-a5dhqkdr.js";
|
|
32
32
|
import {
|
|
33
33
|
akanCodeDefaultModel2,
|
|
34
34
|
akanCodeModel2,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
SubagentPool2,
|
|
41
41
|
akanCodePaths2,
|
|
42
42
|
AkanCodeCompaction2
|
|
43
|
-
} from "./index-
|
|
43
|
+
} from "./index-55j120r8.js";
|
|
44
44
|
import"./index-7md2g9vw.js";
|
|
45
45
|
import {
|
|
46
46
|
CodeAgentRpcHost2
|
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
Exec,
|
|
8
8
|
Workspace,
|
|
9
9
|
command
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-3wypz6xj.js";
|
|
11
11
|
import"./index-52w0fvh8.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-wcej7g4z.js";
|
|
13
13
|
import"./index-5nd1wtkv.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-bt438yxm.js";
|
|
15
|
+
import"./index-js6geqjn.js";
|
|
15
16
|
import"./index-m9jj544v.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-qkcwsg6r.js";
|
|
17
|
+
import"./index-xb8809yb.js";
|
|
18
|
+
import"./index-0fz95kxe.js";
|
|
19
|
+
import"./index-2xcc2ax5.js";
|
|
20
20
|
import {
|
|
21
21
|
ApplicationScript
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-9th4gszy.js";
|
|
23
23
|
import"./index-7md2g9vw.js";
|
|
24
24
|
import {
|
|
25
25
|
writeOption,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
allowLocalOption,
|
|
29
29
|
publicEnvOption
|
|
30
30
|
} from "./index-mdjc93e1.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-pcwzkdqb.js";
|
|
32
32
|
|
|
33
33
|
// pkgs/@akanjs/cli/application/application.command.ts
|
|
34
34
|
import { MigrationCommand } from "akanjs/server/migration/migrationCommand";
|
|
@@ -130,8 +130,13 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
|
|
|
130
130
|
typecheck: target({ short: true, desc: "Typecheck an app or a library, its tests and specs included" }).with(SysOrOnlyApp).option("write", Boolean, writeOption).option("clean", Boolean, { desc: "clear typecheck cache before running", default: false }).option("incremental", Boolean, { desc: "reuse TypeScript incremental cache", default: true }).option("tests", Boolean, { desc: "check its *.test.ts / *.spec.ts too, which nothing imports", default: true }).exec(async function(sys, write, clean, incremental, tests) {
|
|
131
131
|
await this.applicationScript.typecheck(sys, { write, clean, incremental, tests });
|
|
132
132
|
}),
|
|
133
|
-
test: target({ desc: "Prepare and test an app, library, or package" }).with(Exec).
|
|
134
|
-
|
|
133
|
+
test: target({ desc: "Prepare and test an app, library, or package" }).with(Exec).arg("files", String, {
|
|
134
|
+
desc: "test files or folders to run, relative to the target or the workspace root, comma-separated (default: all)",
|
|
135
|
+
example: "lib/user/user.signal.test.ts",
|
|
136
|
+
nullable: true
|
|
137
|
+
}).option("write", Boolean, writeOption).exec(async function(exec, files, write) {
|
|
138
|
+
const testFiles = (files ?? "").split(",").map((file) => file.trim()).filter(Boolean);
|
|
139
|
+
await this.applicationScript.test(exec, { write, files: testFiles });
|
|
135
140
|
}),
|
|
136
141
|
buildIos: target({ short: true, desc: "Build the iOS app on the native runtime" }).with(App).option("target", String, nativeTargetOption).option("env", String, buildEnvOption).option("debug", Boolean, { desc: "debug build instead of release", default: false }).option("write", Boolean, writeOption).exec(async function(app, target, env, debug, write) {
|
|
137
142
|
await this.applicationScript.buildIos(app, { target, env, profile: debug ? "debug" : "release", write });
|
|
@@ -261,11 +266,11 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
|
|
|
261
266
|
desc: `${signDesc}; a signed app takes only a release signed the same way`,
|
|
262
267
|
default: false
|
|
263
268
|
}).option("notarize", Boolean, { desc: notarizeDesc, default: false }).option("revoke", String, {
|
|
264
|
-
desc: "
|
|
269
|
+
desc: "keyIds of updates.publicKeys this release starts revoking, comma-separated (update-keygen prints a key's); it is signed with a key listed after them",
|
|
265
270
|
nullable: true
|
|
266
271
|
}).option("resetSequence", Boolean, {
|
|
267
272
|
flag: "R",
|
|
268
|
-
desc: "
|
|
273
|
+
desc: "with --revoke, apps compare the release with their own build instead of the running release",
|
|
269
274
|
default: false
|
|
270
275
|
}).option("write", Boolean, writeOption).option("allowLocalRelease", Boolean, allowLocalOption("release")).exec(async function(app, platform, target, env, channel, upload, arch, sign, notarize, revoke, resetSequence, write, allowLocalRelease) {
|
|
271
276
|
const revoked = revoke?.split(",").map((keyId) => keyId.trim()).filter(Boolean);
|
|
@@ -4,27 +4,60 @@ import {
|
|
|
4
4
|
Spinner,
|
|
5
5
|
ProjectTypecheck2,
|
|
6
6
|
WorkspaceExecutor
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-wcej7g4z.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
import"./index-espk51ah.js";
|
|
10
|
+
import"./index-0fz95kxe.js";
|
|
11
11
|
import {
|
|
12
12
|
AllRoutesBuilder,
|
|
13
13
|
FontPruner,
|
|
14
14
|
precompressArtifacts,
|
|
15
15
|
SsrBaseArtifactBuilder
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-40brg4px.js";
|
|
17
17
|
import {
|
|
18
18
|
CsrArtifactBuilder
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-xb8809yb.js";
|
|
20
20
|
import"./index-62md4dwy.js";
|
|
21
21
|
|
|
22
22
|
// pkgs/@akanjs/devkit/applicationBuildRunner.ts
|
|
23
|
-
import
|
|
23
|
+
import path3 from "path";
|
|
24
|
+
import { toError } from "akanjs/common";
|
|
25
|
+
|
|
26
|
+
// pkgs/@akanjs/devkit/akanConfig/productionLockfile.ts
|
|
27
|
+
import { mkdtemp, rm } from "fs/promises";
|
|
28
|
+
import os from "os";
|
|
29
|
+
import path from "path";
|
|
30
|
+
|
|
31
|
+
class ProductionLockfile {
|
|
32
|
+
static fileName = "bun.lock";
|
|
33
|
+
static async prune(workspaceRoot, packageJson) {
|
|
34
|
+
const workspaceLock = Bun.file(path.join(workspaceRoot, ProductionLockfile.fileName));
|
|
35
|
+
if (!await workspaceLock.exists())
|
|
36
|
+
throw new Error(`the workspace root has no ${ProductionLockfile.fileName}`);
|
|
37
|
+
const dir = await mkdtemp(path.join(os.tmpdir(), "akan-production-lock-"));
|
|
38
|
+
try {
|
|
39
|
+
await Promise.all([
|
|
40
|
+
Bun.write(path.join(dir, "package.json"), JSON.stringify(packageJson, null, 2)),
|
|
41
|
+
Bun.write(path.join(dir, ProductionLockfile.fileName), workspaceLock)
|
|
42
|
+
]);
|
|
43
|
+
const install = Bun.spawn([process.execPath, "install", "--lockfile-only", "--no-progress"], {
|
|
44
|
+
cwd: dir,
|
|
45
|
+
stdout: "ignore",
|
|
46
|
+
stderr: "pipe"
|
|
47
|
+
});
|
|
48
|
+
const [exitCode, stderr] = await Promise.all([install.exited, new Response(install.stderr).text()]);
|
|
49
|
+
if (exitCode !== 0)
|
|
50
|
+
throw new Error(stderr.trim() || `bun install --lockfile-only exited with ${exitCode}`);
|
|
51
|
+
return await Bun.file(path.join(dir, ProductionLockfile.fileName)).text();
|
|
52
|
+
} finally {
|
|
53
|
+
await rm(dir, { recursive: true, force: true });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
24
57
|
|
|
25
58
|
// pkgs/@akanjs/devkit/transforms/serverEnvPlugin.ts
|
|
26
59
|
import { existsSync, realpathSync } from "fs";
|
|
27
|
-
import
|
|
60
|
+
import path2 from "path";
|
|
28
61
|
var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
29
62
|
var createServerEnvPlugin = ({
|
|
30
63
|
envDir,
|
|
@@ -34,7 +67,7 @@ var createServerEnvPlugin = ({
|
|
|
34
67
|
onLibEnv
|
|
35
68
|
}) => {
|
|
36
69
|
const others = [...new Set(environments)].filter((name) => name !== environment);
|
|
37
|
-
const dirs = new Set([
|
|
70
|
+
const dirs = new Set([path2.resolve(envDir), existsSync(envDir) ? realpathSync.native(envDir) : envDir]);
|
|
38
71
|
const folder = `^(?:${[...dirs].map(escapeRegExp).join("|")})[\\\\/]env\\.server\\.`;
|
|
39
72
|
const filter = new RegExp(`${folder}(?:${others.map(escapeRegExp).join("|")})\\.ts$`);
|
|
40
73
|
const own = new RegExp(`${folder}${escapeRegExp(environment)}\\.ts$`);
|
|
@@ -50,11 +83,11 @@ var createServerEnvPlugin = ({
|
|
|
50
83
|
if (profile)
|
|
51
84
|
build.onLoad({ filter: own }, async (args) => ({
|
|
52
85
|
loader: "ts",
|
|
53
|
-
contents: await ServerEnvProfile.sourceInPlaceOf(
|
|
86
|
+
contents: await ServerEnvProfile.sourceInPlaceOf(path2.join(path2.dirname(args.path), ServerEnvProfile.fileName(environment, profile)), args.path, profile)
|
|
54
87
|
}));
|
|
55
88
|
if (others.length)
|
|
56
89
|
build.onLoad({ filter }, async (args) => {
|
|
57
|
-
const name =
|
|
90
|
+
const name = path2.basename(args.path, ".ts").slice("env.server.".length);
|
|
58
91
|
const { exports } = new Bun.Transpiler({ loader: "ts" }).scan(await Bun.file(args.path).text());
|
|
59
92
|
const message = `env/env.server.${name}.ts is not in this build: \`akan build\` bundles the server env of AKAN_PUBLIC_ENV=${environment} alone, the environment its image runs. To run ${name}, build for it: AKAN_PUBLIC_ENV=${name} in the workspace's .env, which outranks the shell, or --env ${name} on a desktop or mobile build.`;
|
|
60
93
|
return {
|
|
@@ -69,8 +102,8 @@ var createServerEnvPlugin = ({
|
|
|
69
102
|
});
|
|
70
103
|
if (profile)
|
|
71
104
|
build.onLoad({ filter: ServerEnvProfile.envFilePattern }, async (args) => {
|
|
72
|
-
const name =
|
|
73
|
-
if (dirs.has(
|
|
105
|
+
const name = path2.basename(args.path, ".ts").slice("env.server.".length);
|
|
106
|
+
if (dirs.has(path2.dirname(args.path)) || name === "type" || name === "example")
|
|
74
107
|
return { loader: "ts", contents: await Bun.file(args.path).text() };
|
|
75
108
|
if (!libEnvs.has(args.path))
|
|
76
109
|
libEnvs.set(args.path, libEnv(args.path));
|
|
@@ -122,7 +155,7 @@ class ApplicationBuildRunner {
|
|
|
122
155
|
this.#profile = profile;
|
|
123
156
|
}
|
|
124
157
|
get #envDir() {
|
|
125
|
-
return
|
|
158
|
+
return path3.join(this.#app.cwdPath, "env");
|
|
126
159
|
}
|
|
127
160
|
#pinImageEnv(baseDevEnv, environment) {
|
|
128
161
|
const imageEnv = {
|
|
@@ -159,14 +192,14 @@ class ApplicationBuildRunner {
|
|
|
159
192
|
phases: this.#phases,
|
|
160
193
|
durationMs: Date.now() - this.#startedAt,
|
|
161
194
|
outputDir: this.#app.dist.cwdPath,
|
|
162
|
-
artifactDir:
|
|
195
|
+
artifactDir: path3.join(this.#app.dist.cwdPath, ".akan/artifact")
|
|
163
196
|
};
|
|
164
197
|
}
|
|
165
198
|
async typecheck(options = {}) {
|
|
166
199
|
await this.#app.getPageKeys({ refresh: true });
|
|
167
200
|
const typecheck = new ProjectTypecheck2(this.#app.cwdPath, this.#app.workspace.workspaceRoot, this.#app.getCommandEnv());
|
|
168
201
|
const libPageIncludes = (await this.#app.getPageRoots()).filter((root) => root.keyPrefix).flatMap((root) => {
|
|
169
|
-
const rel =
|
|
202
|
+
const rel = path3.relative(typecheck.typecheckDir, root.realDir).split(path3.sep).join("/");
|
|
170
203
|
return [`${rel}/**/*.ts`, `${rel}/**/*.tsx`];
|
|
171
204
|
});
|
|
172
205
|
await typecheck.run([
|
|
@@ -198,9 +231,14 @@ class ApplicationBuildRunner {
|
|
|
198
231
|
}
|
|
199
232
|
async buildAppMeta() {
|
|
200
233
|
const akanConfig = await this.#app.getConfig();
|
|
201
|
-
const
|
|
234
|
+
const packageJson = akanConfig.getProductionPackageJson();
|
|
235
|
+
const lockfile = await this.#pruneLockfile(packageJson);
|
|
236
|
+
const dockerfile = akanConfig.dockerfileFor(this.#environment ?? akanConfig.baseDevEnv.env, {
|
|
237
|
+
lockfile: lockfile !== null
|
|
238
|
+
});
|
|
202
239
|
await Promise.all([
|
|
203
|
-
this.#app.dist.writeJson("package.json",
|
|
240
|
+
this.#app.dist.writeJson("package.json", packageJson),
|
|
241
|
+
...lockfile !== null ? [this.#app.dist.writeFile(`${this.#app.dist.cwdPath}/${ProductionLockfile.fileName}`, lockfile)] : [],
|
|
204
242
|
this.#app.dist.writeFile(`${this.#app.dist.cwdPath}/Dockerfile`, dockerfile),
|
|
205
243
|
this.#app.dist.writeJson("akan.build.json", {
|
|
206
244
|
buildId: await this.#resolveBuildId(),
|
|
@@ -209,6 +247,14 @@ class ApplicationBuildRunner {
|
|
|
209
247
|
})
|
|
210
248
|
]);
|
|
211
249
|
}
|
|
250
|
+
async#pruneLockfile(packageJson) {
|
|
251
|
+
try {
|
|
252
|
+
return await ProductionLockfile.prune(this.#app.workspace.workspaceRoot, packageJson);
|
|
253
|
+
} catch (error) {
|
|
254
|
+
this.#app.logger.warn(`The image installs its dependencies unlocked, at the newest versions package.json allows: ${toError(error).message}`);
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
212
258
|
async#resolveBuildId() {
|
|
213
259
|
const fromEnv = process.env.AKAN_BUILD_ID?.trim();
|
|
214
260
|
if (fromEnv)
|
|
@@ -236,8 +282,8 @@ class ApplicationBuildRunner {
|
|
|
236
282
|
if (profileFile || !stripped.length || this.#warnedLibEnvs.has(file))
|
|
237
283
|
return;
|
|
238
284
|
this.#warnedLibEnvs.add(file);
|
|
239
|
-
const lib =
|
|
240
|
-
this.#app.logger.warn(`${lib}: the "${this.#profile}" build leaves out ${stripped.join(", ")}. Give the lib ${
|
|
285
|
+
const lib = path3.relative(this.#app.workspace.workspaceRoot, file);
|
|
286
|
+
this.#app.logger.warn(`${lib}: the "${this.#profile}" build leaves out ${stripped.join(", ")}. Give the lib ${path3.basename(ServerEnvProfile.profileFileOf(file, this.#profile ?? ""))} to say what this profile runs with.`);
|
|
241
287
|
}
|
|
242
288
|
});
|
|
243
289
|
return this.#serverEnv;
|
|
@@ -283,7 +329,7 @@ class ApplicationBuildRunner {
|
|
|
283
329
|
};
|
|
284
330
|
}
|
|
285
331
|
async#writeConsoleShim() {
|
|
286
|
-
await Bun.write(
|
|
332
|
+
await Bun.write(path3.join(this.#app.dist.cwdPath, "console.js"), `process.env.AKAN_COMMAND_TYPE = "console";
|
|
287
333
|
const { cnst, db, dict, option, server, sig, srv } = await import("./server.js");
|
|
288
334
|
const { assertAkanConsoleAllowed, startAkanConsole } = await import("./console-runtime.js");
|
|
289
335
|
|
|
@@ -307,14 +353,14 @@ void run().catch((error) => {
|
|
|
307
353
|
try {
|
|
308
354
|
return Bun.resolveSync("akanjs/server/rsc-worker", import.meta.dir);
|
|
309
355
|
} catch {
|
|
310
|
-
return
|
|
356
|
+
return path3.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server/rscWorker.tsx");
|
|
311
357
|
}
|
|
312
358
|
}
|
|
313
359
|
#resolveConsoleRuntimeBuildEntry() {
|
|
314
360
|
try {
|
|
315
|
-
return
|
|
361
|
+
return path3.join(path3.dirname(Bun.resolveSync("akanjs/server", import.meta.dir)), "console.ts");
|
|
316
362
|
} catch {
|
|
317
|
-
return
|
|
363
|
+
return path3.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server/console.ts");
|
|
318
364
|
}
|
|
319
365
|
}
|
|
320
366
|
async#buildSsr() {
|
|
@@ -332,13 +378,13 @@ void run().catch((error) => {
|
|
|
332
378
|
}
|
|
333
379
|
async#buildOrThrow(label, config) {
|
|
334
380
|
const flag = process.env.AKAN_BUILD_METAFILE;
|
|
335
|
-
const metafileDir = flag && flag !== "0" && flag !== "false" ?
|
|
381
|
+
const metafileDir = flag && flag !== "0" && flag !== "false" ? path3.join(this.#app.workspace.workspaceRoot, "local", "build-meta", path3.basename(this.#app.cwdPath)) : null;
|
|
336
382
|
const result = await Bun.build(metafileDir ? { ...config, metafile: true } : config);
|
|
337
383
|
if (!result.success)
|
|
338
384
|
throw new AggregateError(result.logs, `[${label}] Bun.build failed`);
|
|
339
385
|
if (metafileDir && result.metafile) {
|
|
340
|
-
const entry =
|
|
341
|
-
await Bun.write(
|
|
386
|
+
const entry = path3.parse(String(config.entrypoints[0] ?? label)).name;
|
|
387
|
+
await Bun.write(path3.join(metafileDir, `${entry}.json`), JSON.stringify(result.metafile));
|
|
342
388
|
}
|
|
343
389
|
return result;
|
|
344
390
|
}
|
package/buildBatch.proc.js
CHANGED
|
@@ -6,26 +6,26 @@ import {
|
|
|
6
6
|
resolveSsrPageEntriesForApp,
|
|
7
7
|
WorkspaceExecutor,
|
|
8
8
|
AppExecutor
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-wcej7g4z.js";
|
|
10
10
|
import {
|
|
11
11
|
computeRouteSeedIndex,
|
|
12
12
|
saveRouteSeedIndex,
|
|
13
13
|
CsrDevBundler,
|
|
14
14
|
SsrDevBundler
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-espk51ah.js";
|
|
16
16
|
import"./index-52w0fvh8.js";
|
|
17
17
|
import {
|
|
18
18
|
ServerGraphFile,
|
|
19
19
|
PagesBundleBuilder
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-0fz95kxe.js";
|
|
21
21
|
import {
|
|
22
22
|
CssCompiler,
|
|
23
23
|
FontOptimizer,
|
|
24
24
|
SsrBaseArtifactBuilder
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-40brg4px.js";
|
|
26
26
|
import {
|
|
27
27
|
CsrArtifactBuilder
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-xb8809yb.js";
|
|
29
29
|
import"./index-62md4dwy.js";
|
|
30
30
|
|
|
31
31
|
// pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
App,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-3wypz6xj.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
import"./index-wcej7g4z.js";
|
|
9
|
+
import"./index-2azahjaw.js";
|
|
10
10
|
import {
|
|
11
11
|
PlatformTestRun
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
} from "./index-6txx6a9p.js";
|
|
13
|
+
import"./index-bt438yxm.js";
|
|
14
|
+
import"./index-js6geqjn.js";
|
|
14
15
|
import"./index-m9jj544v.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-jgs8z8xb.js";
|
|
16
|
+
import"./index-xb8809yb.js";
|
|
17
|
+
import"./index-0fz95kxe.js";
|
|
18
18
|
import"./index-5nd1wtkv.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
19
|
+
import"./index-2xcc2ax5.js";
|
|
20
|
+
import"./index-9th4gszy.js";
|
|
21
21
|
import"./index-7md2g9vw.js";
|
|
22
22
|
import"./index-tvehn2sp.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-42j4a8zq.js";
|
|
24
24
|
import {
|
|
25
25
|
CloudScript2
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-301pdbzz.js";
|
|
27
27
|
import {
|
|
28
28
|
writeOption,
|
|
29
29
|
oneNativeTargetOption,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
hostOption,
|
|
35
35
|
subspaceOption
|
|
36
36
|
} from "./index-mdjc93e1.js";
|
|
37
|
-
import"./index-
|
|
37
|
+
import"./index-pcwzkdqb.js";
|
|
38
38
|
|
|
39
39
|
// pkgs/@akanjs/cli/cloud/cloud.command.ts
|
|
40
40
|
var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
|
|
@@ -96,10 +96,14 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
|
|
|
96
96
|
await this.cloudScript.update(workspace, tag, { registryUrl: resolveRegistryUrl(registry) });
|
|
97
97
|
}),
|
|
98
98
|
pushUpdate: target({
|
|
99
|
-
desc: "Pack an over-the-air update of a phone's web bundle, or take the folder `akan pack-update` wrote, and upload it to the Akan Cloud project, which signs and publishes it. Exits 2 when the pack needs a new store build or the project rejects it, 1 on any other failure"
|
|
99
|
+
desc: "Pack an over-the-air update of a phone's web bundle, or take the folder `akan pack-update` wrote, and upload it to the Akan Cloud project, which signs and publishes it; or upload the desktop release `akan publish-update` signed, as it is. Exits 2 when the pack needs a new store build or the project rejects it, 1 on any other failure"
|
|
100
100
|
}).with(App).option("platform", String, {
|
|
101
|
-
enum: ["ios", "android"],
|
|
102
|
-
desc: "the app it updates (with --pack, default: the pack's)",
|
|
101
|
+
enum: ["ios", "android", "desktop", "macos", "windows", "linux"],
|
|
102
|
+
desc: "the app it updates; desktop is this computer's OS (with --pack, default: the pack's)",
|
|
103
|
+
nullable: true
|
|
104
|
+
}).option("arch", String, {
|
|
105
|
+
desc: "desktop: the CPU of the release, arm64 or x64 (default this computer's)",
|
|
106
|
+
enum: ["arm64", "x64"],
|
|
103
107
|
nullable: true
|
|
104
108
|
}).option("target", String, {
|
|
105
109
|
desc: "native target name, a key of native.targets (default: the only one; with --pack, the pack's)",
|
|
@@ -116,9 +120,10 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
|
|
|
116
120
|
flag: "d",
|
|
117
121
|
desc: "a folder `akan pack-update` wrote, uploaded instead of packing; --platform, --target and --env must match it",
|
|
118
122
|
nullable: true
|
|
119
|
-
}).option("publicEnv", String, publicEnvOption("the update")).with(Workspace).exec(async function(app, platform, target, env, channel, notes, subspace, host, write, allowLocalRelease, pack, publicEnv, workspace) {
|
|
123
|
+
}).option("publicEnv", String, publicEnvOption("the update")).with(Workspace).exec(async function(app, platform, arch, target, env, channel, notes, subspace, host, write, allowLocalRelease, pack, publicEnv, workspace) {
|
|
120
124
|
await this.cloudScript.pushUpdate(workspace, app, {
|
|
121
125
|
platform,
|
|
126
|
+
arch,
|
|
122
127
|
target,
|
|
123
128
|
env,
|
|
124
129
|
channel,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CloudScript2
|
|
4
|
+
} from "./index-301pdbzz.js";
|
|
5
|
+
import"./index-6txx6a9p.js";
|
|
6
|
+
import"./index-9th4gszy.js";
|
|
7
|
+
import"./index-pcwzkdqb.js";
|
|
8
|
+
import"./index-2xcc2ax5.js";
|
|
9
|
+
import"./index-42j4a8zq.js";
|
|
10
|
+
import"./index-js6geqjn.js";
|
|
11
|
+
import"./index-2azahjaw.js";
|
|
12
|
+
import"./index-bt438yxm.js";
|
|
13
|
+
import"./index-m9jj544v.js";
|
|
14
|
+
import"./index-3wypz6xj.js";
|
|
15
|
+
import"./index-7md2g9vw.js";
|
|
16
|
+
import"./index-xb8809yb.js";
|
|
17
|
+
import"./index-5nd1wtkv.js";
|
|
18
|
+
import"./index-0fz95kxe.js";
|
|
19
|
+
import"./index-wcej7g4z.js";
|
|
20
|
+
import"./index-tvehn2sp.js";
|
|
21
|
+
import"./index-52w0fvh8.js";
|
|
22
|
+
export {
|
|
23
|
+
CloudScript2 as CloudScript
|
|
24
|
+
};
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-3wypz6xj.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-wcej7g4z.js";
|
|
10
10
|
import {
|
|
11
11
|
akanCodeDefaultModel2,
|
|
12
12
|
CodeAgentStreamPrinter2
|
|
@@ -19,7 +19,7 @@ class CodeRunner extends runner("code") {
|
|
|
19
19
|
async serve(options, listen) {
|
|
20
20
|
await import("./consoleToStderr-h5bryj94.js");
|
|
21
21
|
const [{ CodeAgent }, { CodeAgentRpcHost }, { CodeAgentRpcListener }] = await Promise.all([
|
|
22
|
-
import("./CodeAgent-
|
|
22
|
+
import("./CodeAgent-8d5qs787.js"),
|
|
23
23
|
import("./CodeAgentRpcHost-9g27hmer.js"),
|
|
24
24
|
import("./CodeAgentRpcListener-7p7z5dd7.js")
|
|
25
25
|
]);
|
|
@@ -34,8 +34,8 @@ class CodeRunner extends runner("code") {
|
|
|
34
34
|
}
|
|
35
35
|
async tui(options, seed) {
|
|
36
36
|
const [{ CodeAgent }, { CodeTui }] = await Promise.all([
|
|
37
|
-
import("./CodeAgent-
|
|
38
|
-
import("./CodeTui-
|
|
37
|
+
import("./CodeAgent-8d5qs787.js"),
|
|
38
|
+
import("./CodeTui-z5vkm9ea.js")
|
|
39
39
|
]);
|
|
40
40
|
const agentOptions = await CodeRunner.#agentOptions(options, false);
|
|
41
41
|
let resume = options.resume;
|
|
@@ -67,7 +67,7 @@ class CodeRunner extends runner("code") {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
async run(prompt, options) {
|
|
70
|
-
const { CodeAgent } = await import("./CodeAgent-
|
|
70
|
+
const { CodeAgent } = await import("./CodeAgent-8d5qs787.js");
|
|
71
71
|
const agent = await CodeAgent.create(await CodeRunner.#agentOptions(options, false));
|
|
72
72
|
const printer = new CodeAgentStreamPrinter2({ json: options.json, thinking: options.thinking });
|
|
73
73
|
agent.on((event) => printer.print(event));
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-3wypz6xj.js";
|
|
6
6
|
import"./index-52w0fvh8.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-wcej7g4z.js";
|
|
8
8
|
import"./index-hj6w4ka1.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
9
|
+
import"./index-xjf5j657.js";
|
|
10
|
+
import"./index-31es1yev.js";
|
|
11
|
+
import"./index-a58emady.js";
|
|
12
|
+
import"./index-bt438yxm.js";
|
|
13
|
+
import"./index-js6geqjn.js";
|
|
13
14
|
import"./index-m9jj544v.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-jgs8z8xb.js";
|
|
15
|
+
import"./index-xb8809yb.js";
|
|
16
|
+
import"./index-0fz95kxe.js";
|
|
17
17
|
import"./index-zzvvc845.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
18
|
+
import"./index-j9vyj3dj.js";
|
|
19
|
+
import"./index-905qdgqp.js";
|
|
20
|
+
import"./index-hmt54t45.js";
|
|
21
|
+
import"./index-74tjjsnc.js";
|
|
22
|
+
import"./index-skk9zc1x.js";
|
|
23
|
+
import"./index-b70zct19.js";
|
|
24
24
|
import {
|
|
25
25
|
ContextScript
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-qfp55x1y.js";
|
|
27
27
|
|
|
28
28
|
// pkgs/@akanjs/cli/context/context.command.ts
|
|
29
29
|
class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ContextRunner2
|
|
4
|
+
} from "./index-a58emady.js";
|
|
5
|
+
import"./index-b70zct19.js";
|
|
6
|
+
import"./index-skk9zc1x.js";
|
|
7
|
+
import"./index-74tjjsnc.js";
|
|
8
|
+
import"./index-j9vyj3dj.js";
|
|
9
|
+
import"./index-hmt54t45.js";
|
|
10
|
+
import"./index-905qdgqp.js";
|
|
11
|
+
import"./index-js6geqjn.js";
|
|
12
|
+
import"./index-bt438yxm.js";
|
|
13
|
+
import"./index-m9jj544v.js";
|
|
14
|
+
import"./index-31es1yev.js";
|
|
15
|
+
import"./index-xjf5j657.js";
|
|
16
|
+
import"./index-zzvvc845.js";
|
|
17
|
+
import"./index-3wypz6xj.js";
|
|
18
|
+
import"./index-xb8809yb.js";
|
|
19
|
+
import"./index-0fz95kxe.js";
|
|
20
|
+
import"./index-wcej7g4z.js";
|
|
21
|
+
import"./index-hj6w4ka1.js";
|
|
22
|
+
import"./index-52w0fvh8.js";
|
|
23
|
+
export {
|
|
24
|
+
ContextRunner2 as ContextRunner
|
|
25
|
+
};
|