@akanjs/cli 3.1.0-rc.3 → 3.1.0-rc.5
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-ctk4fh2b.js → CodeAgent-rkjyxgec.js} +2 -2
- package/{CodeTui-mrxtrdzw.js → CodeTui-h7pyj6xa.js} +1 -1
- package/TunnelShare-661cxz5e.js +14 -0
- package/{agent.command-ncre6kwz.js → agent.command-3qxf4xcj.js} +5 -5
- package/akanCode.js +2 -2
- package/{application.command-54mawreg.js → application.command-m1kcd7jf.js} +12 -11
- package/{applicationBuildRunner-8573zr2w.js → applicationBuildRunner-dj0xkrep.js} +16 -9
- package/buildBatch.proc.js +7 -7
- package/{cloud.command-nyemv0m3.js → cloud.command-3jzym8q7.js} +17 -16
- package/cloud.script-r4nskbc6.js +24 -0
- package/{code.command-spsrzg63.js → code.command-0ad6gw2a.js} +6 -6
- package/{context.command-768zv7z4.js → context.command-0qx447mb.js} +17 -16
- package/context.runner-1vsjztjg.js +25 -0
- package/{dependencyScanner-06z2dmrr.js → dependencyScanner-3afj2vt1.js} +1 -1
- package/{guideline.command-4ycwc51q.js → guideline.command-cv5bmrx2.js} +2 -2
- package/guidelines/conventions/conventions.instruction.md +450 -1084
- package/guidelines/cssRule/cssRule.instruction.md +16 -1
- package/guidelines/fieldRule/fieldRule.instruction.md +57 -0
- package/guidelines/framework/framework.instruction.md +4 -7
- package/guidelines/mcpRule/mcpRule.instruction.md +11 -8
- package/guidelines/modelConstant/modelConstant.instruction.md +2 -1
- package/guidelines/modelStore/modelStore.instruction.md +9 -0
- package/guidelines/pageRule/pageRule.instruction.md +80 -0
- package/guidelines/queryRule/queryRule.instruction.md +35 -8
- package/guidelines/runtimeRule/runtimeRule.instruction.md +89 -2
- package/guidelines/ssrRule/ssrRule.instruction.md +13 -0
- package/guidelines/transportRule/transportRule.instruction.md +76 -8
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +4 -4
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +49 -4
- package/incrementalBuilder.proc.js +4 -4
- package/{index-ec080x99.js → index-192ha4xh.js} +356 -307
- package/{index-c4h5b5nq.js → index-1p98exm2.js} +2 -2
- package/{index-xf40a295.js → index-1xj2t7cb.js} +7 -7
- package/{index-3675mvjw.js → index-20bxxyvn.js} +80 -80
- package/{index-c9zjb3tw.js → index-35hc95h5.js} +1 -1
- package/{index-w9b71b6y.js → index-4mhy6qme.js} +4 -4
- package/{index-vhfjzda3.js → index-5edzv8fn.js} +5 -5
- package/{index-k9rrten6.js → index-5nd1wtkv.js} +92 -94
- package/index-62md4dwy.js +260 -0
- package/{index-2z3kykvd.js → index-665zp9rs.js} +38 -15
- package/{index-qvghfv6v.js → index-6xn2n442.js} +4 -4
- package/{index-00seamy5.js → index-86jt2a0e.js} +1 -1
- package/{index-xm5tmpv0.js → index-8fp3b47h.js} +419 -418
- package/{index-91rt5bye.js → index-9z426msb.js} +17 -12
- package/{index-fjqvd5mx.js → index-awbdfcf2.js} +4 -4
- package/{index-3hx1z96c.js → index-bqbf654f.js} +1 -1
- package/{index-wjqbc7sf.js → index-cpb3nvma.js} +57 -58
- package/{index-1a7nhq56.js → index-d47ypebv.js} +17 -15
- package/{index-r5d6rq19.js → index-d72hfmdm.js} +13 -13
- package/{index-1nyxvz8j.js → index-fmzcs8v6.js} +4 -4
- package/{index-wanhh011.js → index-fyq1z6kt.js} +29 -27
- package/{index-qf8g88j9.js → index-g1mbppa9.js} +238 -236
- package/{index-jj7yapwq.js → index-h47cf1gg.js} +7 -7
- package/{index-q5abh0jq.js → index-j4mkhz93.js} +3 -3
- package/{index-3x7yeecy.js → index-jw1zm273.js} +28 -30
- package/{index-q958tqqg.js → index-m9jj544v.js} +1 -1
- package/{index-8935h3n1.js → index-mdjc93e1.js} +1 -1
- package/{index-dmsvd2rv.js → index-pydbnfez.js} +2 -2
- package/{index-3ddt3qjg.js → index-qwa5k1j8.js} +1 -1
- package/{index-8eqkxwsx.js → index-tamvyvj3.js} +3 -3
- package/{index-wdze51wz.js → index-trpasv9q.js} +260 -259
- package/{index-2ahj896a.js → index-tvehn2sp.js} +1 -1
- package/{index-bv210r6t.js → index-va06nr10.js} +1086 -1074
- package/{index-kmamh5bv.js → index-vk0pa0mn.js} +20 -21
- package/{index-fvn6f5wx.js → index-w44cy4vs.js} +2216 -2216
- package/index.js +22 -22
- package/{library.command-88ahgych.js → library.command-erp2f56n.js} +3 -3
- package/{localRegistry.command-ykea1m7b.js → localRegistry.command-xxpqgxjw.js} +15 -14
- package/{module.command-zky4b7m9.js → module.command-gs2r615e.js} +5 -5
- package/{package.command-vh8pcedh.js → package.command-7343f74r.js} +4 -4
- package/package.json +2 -2
- package/{page.command-fyqeqxc3.js → page.command-4h4a8pnh.js} +3 -3
- package/{pipeline.command-r5t30py6.js → pipeline.command-a2nrk26m.js} +3 -3
- package/{primitive.command-a0516zfk.js → primitive.command-w6t0asqz.js} +6 -6
- package/{projectTypecheck-7djd4z50.js → projectTypecheck-f534enqj.js} +1 -1
- package/{quality.command-k7jcnfn0.js → quality.command-77x7vbbx.js} +4 -4
- package/{repair.command-85zg2an3.js → repair.command-y6sstev7.js} +5 -5
- package/{scalar.command-g5vmqwca.js → scalar.command-20b8cy0k.js} +4 -4
- package/{subspace.command-mp4evgsj.js → subspace.command-92xkc0s0.js} +11 -10
- package/templates/lib/cnst.ts +0 -1
- package/templates/workspaceRoot/.gitignore.template +24 -53
- package/{tunnel.command-kbnr99sj.js → tunnel.command-2kw8vt9g.js} +8 -7
- package/{workflow.command-9y9p1n8y.js → workflow.command-2djwmpqf.js} +10 -10
- package/{workspace.command-jmec2kjg.js → workspace.command-5se6spqb.js} +28 -27
- package/TunnelShare-rj74jd6x.js +0 -13
- package/cloud.script-ht6yb203.js +0 -23
- package/context.runner-tf1b53qq.js +0 -24
- package/index-n68jx79w.js +0 -120
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
resolveSsrPageEntriesForApp
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-va06nr10.js";
|
|
5
5
|
import {
|
|
6
6
|
computeRouteSeedIndex,
|
|
7
7
|
saveRouteSeedIndex,
|
|
@@ -9,17 +9,20 @@ import {
|
|
|
9
9
|
ClientEntriesBundler,
|
|
10
10
|
VENDOR_SPECIFIERS,
|
|
11
11
|
RouteClientBuilder
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-w44cy4vs.js";
|
|
13
13
|
import {
|
|
14
14
|
SOURCE_EXTS
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-5nd1wtkv.js";
|
|
16
16
|
import {
|
|
17
17
|
CsrEntryFiles,
|
|
18
18
|
BarrelAnalyzer,
|
|
19
19
|
createTsconfigPackageResolver,
|
|
20
20
|
rewriteBarrelImports,
|
|
21
21
|
PagesBundleBuilder
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-192ha4xh.js";
|
|
23
|
+
import {
|
|
24
|
+
CssBlockParser
|
|
25
|
+
} from "./index-62md4dwy.js";
|
|
23
26
|
var __require = import.meta.require;
|
|
24
27
|
|
|
25
28
|
// pkgs/@akanjs/devkit/frontendBuild/allRoutesBuilder.ts
|
|
@@ -127,7 +130,6 @@ class AllRoutesBuilder {
|
|
|
127
130
|
this.#knownSet.add(abs);
|
|
128
131
|
}
|
|
129
132
|
}
|
|
130
|
-
|
|
131
133
|
// pkgs/@akanjs/devkit/frontendBuild/cssCompiler.ts
|
|
132
134
|
import path3 from "path";
|
|
133
135
|
import { Logger } from "akanjs/common";
|
|
@@ -651,13 +653,19 @@ function isIgnoredNodeModuleSource(filePath) {
|
|
|
651
653
|
return NODE_MODULES_RE.test(filePath) && !AKANJS_NODE_MODULE_RE.test(filePath);
|
|
652
654
|
}
|
|
653
655
|
function declaredCustomProperties(css) {
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
+
const names = new Set;
|
|
657
|
+
CssBlockParser.walk(CssBlockParser.parse(css), true, (node) => {
|
|
658
|
+
if (node.kind === "block")
|
|
659
|
+
return node.atRule === "@theme" ? null : true;
|
|
660
|
+
if (node.property.startsWith("--"))
|
|
661
|
+
names.add(node.property);
|
|
662
|
+
return null;
|
|
663
|
+
});
|
|
664
|
+
return [...names];
|
|
656
665
|
}
|
|
657
666
|
function getPageKeyBasePath(pageKey, basePaths) {
|
|
658
667
|
return CsrEntryFiles.basePathOfPageKey(pageKey, basePaths);
|
|
659
668
|
}
|
|
660
|
-
|
|
661
669
|
// pkgs/@akanjs/devkit/frontendBuild/fontOptimizer.ts
|
|
662
670
|
import { mkdir, stat as stat2 } from "fs/promises";
|
|
663
671
|
import path4 from "path";
|
|
@@ -1045,7 +1053,7 @@ class FontOptimizer {
|
|
|
1045
1053
|
const filePaths = [];
|
|
1046
1054
|
for await (const filePath of glob.scan({ cwd: root, absolute: true }))
|
|
1047
1055
|
filePaths.push(filePath);
|
|
1048
|
-
for (const filePath of filePaths.sort())
|
|
1056
|
+
for (const filePath of filePaths.sort((a, b) => a < b ? -1 : a > b ? 1 : 0))
|
|
1049
1057
|
parts.push(await Bun.file(filePath).text());
|
|
1050
1058
|
}
|
|
1051
1059
|
return parts.join("");
|
|
@@ -1146,7 +1154,6 @@ ${declarations.map(([prop, value]) => ` ${prop}: ${value};`).join(`
|
|
|
1146
1154
|
return JSON.stringify(value);
|
|
1147
1155
|
}
|
|
1148
1156
|
}
|
|
1149
|
-
|
|
1150
1157
|
// pkgs/@akanjs/devkit/frontendBuild/fontPruner.ts
|
|
1151
1158
|
import { rm, rmdir, stat as stat3 } from "fs/promises";
|
|
1152
1159
|
import path5 from "path";
|
|
@@ -1310,7 +1317,6 @@ class FontPruner {
|
|
|
1310
1317
|
return await stat3(dir).then((entry) => entry.isDirectory(), () => false);
|
|
1311
1318
|
}
|
|
1312
1319
|
}
|
|
1313
|
-
|
|
1314
1320
|
// pkgs/@akanjs/devkit/frontendBuild/precompressArtifacts.ts
|
|
1315
1321
|
import fs from "fs";
|
|
1316
1322
|
import path6 from "path";
|
|
@@ -1370,7 +1376,6 @@ async function shouldPrecompress(filePath) {
|
|
|
1370
1376
|
return false;
|
|
1371
1377
|
return file.size >= MIN_COMPRESS_BYTES;
|
|
1372
1378
|
}
|
|
1373
|
-
|
|
1374
1379
|
// pkgs/@akanjs/devkit/frontendBuild/ssrBaseArtifactBuilder.ts
|
|
1375
1380
|
import path7 from "path";
|
|
1376
1381
|
import { optimize } from "@tailwindcss/node";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
script
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-jw1zm273.js";
|
|
5
5
|
import {
|
|
6
6
|
AppExecutor,
|
|
7
7
|
LibExecutor,
|
|
8
8
|
ModuleExecutor
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-va06nr10.js";
|
|
10
10
|
import {
|
|
11
11
|
workflowStatus,
|
|
12
12
|
compactDiagnostics,
|
|
@@ -41,10 +41,10 @@ import {
|
|
|
41
41
|
hasSignalFactoryEntry,
|
|
42
42
|
insertSignalFactoryEntry,
|
|
43
43
|
addFieldUiPolicyForType
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-trpasv9q.js";
|
|
45
45
|
import {
|
|
46
46
|
ModuleScript
|
|
47
|
-
} from "./index-
|
|
47
|
+
} from "./index-fmzcs8v6.js";
|
|
48
48
|
|
|
49
49
|
// pkgs/@akanjs/cli/primitive/primitive.script.ts
|
|
50
50
|
import { capitalize, lowerlize } from "akanjs/common";
|
|
@@ -26,7 +26,7 @@ class ConfigLock {
|
|
|
26
26
|
}
|
|
27
27
|
static async#take(lockPath) {
|
|
28
28
|
const handle = await open(lockPath, "wx", 384).catch((error) => {
|
|
29
|
-
if (error.code === "EEXIST")
|
|
29
|
+
if (error.code === "EEXIST" || process.platform === "win32" && error.code === "EPERM")
|
|
30
30
|
return null;
|
|
31
31
|
throw error;
|
|
32
32
|
});
|
|
@@ -2,23 +2,73 @@
|
|
|
2
2
|
import {
|
|
3
3
|
FileSys2
|
|
4
4
|
} from "./index-52w0fvh8.js";
|
|
5
|
+
import {
|
|
6
|
+
resolveMobileTargets
|
|
7
|
+
} from "./index-m9jj544v.js";
|
|
5
8
|
import {
|
|
6
9
|
NativePublicEnv,
|
|
7
10
|
UpdatePackFolder,
|
|
8
11
|
NativeApp
|
|
9
|
-
} from "./index-
|
|
10
|
-
import {
|
|
11
|
-
resolveMobileTargets
|
|
12
|
-
} from "./index-q958tqqg.js";
|
|
12
|
+
} from "./index-g1mbppa9.js";
|
|
13
13
|
import {
|
|
14
14
|
ExitCodeError
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-jw1zm273.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigLock
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-bqbf654f.js";
|
|
19
|
+
|
|
20
|
+
// pkgs/@akanjs/devkit/cloud/cloudHttpError.ts
|
|
21
|
+
import { isRecord } from "akanjs/common";
|
|
22
|
+
|
|
23
|
+
class CloudHttpError extends Error {
|
|
24
|
+
status;
|
|
25
|
+
statusText;
|
|
26
|
+
url;
|
|
27
|
+
body;
|
|
28
|
+
headers;
|
|
29
|
+
static #errKey = /^[\w$-]+\.error\.[\w$-]+$/;
|
|
30
|
+
name = "CloudHttpError";
|
|
31
|
+
constructor(status, statusText, url, body, headers = new Headers) {
|
|
32
|
+
super(`${status} ${statusText} from ${url}: ${body.slice(0, 200)}`);
|
|
33
|
+
this.status = status;
|
|
34
|
+
this.statusText = statusText;
|
|
35
|
+
this.url = url;
|
|
36
|
+
this.body = body;
|
|
37
|
+
this.headers = headers;
|
|
38
|
+
}
|
|
39
|
+
static async of(response, url) {
|
|
40
|
+
return new CloudHttpError(response.status, response.statusText, url, await response.text(), response.headers);
|
|
41
|
+
}
|
|
42
|
+
static statusOf(error) {
|
|
43
|
+
return error instanceof CloudHttpError ? error.status : null;
|
|
44
|
+
}
|
|
45
|
+
get error() {
|
|
46
|
+
try {
|
|
47
|
+
const parsed = JSON.parse(this.body);
|
|
48
|
+
return isRecord(parsed) && typeof parsed.error === "string" ? parsed.error : null;
|
|
49
|
+
} catch {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
get errKey() {
|
|
54
|
+
const { error } = this;
|
|
55
|
+
return error && CloudHttpError.#errKey.test(error) ? error : null;
|
|
56
|
+
}
|
|
57
|
+
get retryAfterMs() {
|
|
58
|
+
return CloudHttpError.retryAfterMs(this.headers.get("retry-after"));
|
|
59
|
+
}
|
|
60
|
+
static retryAfterMs(header) {
|
|
61
|
+
const value = header?.trim() ?? "";
|
|
62
|
+
if (!value)
|
|
63
|
+
return null;
|
|
64
|
+
const ms = /^\d+$/.test(value) ? Number(value) * 1000 : Date.parse(value) - Date.now();
|
|
65
|
+
return Number.isFinite(ms) ? Math.max(0, ms) : null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
19
68
|
|
|
20
69
|
// pkgs/@akanjs/devkit/cloud/globalConfig.ts
|
|
21
70
|
import { mkdir, rm, writeFile } from "fs/promises";
|
|
71
|
+
import { trimTrailingSlashes } from "akanjs/common";
|
|
22
72
|
import dayjs from "dayjs";
|
|
23
73
|
|
|
24
74
|
// pkgs/@akanjs/devkit/cloud/constants.ts
|
|
@@ -68,7 +118,7 @@ class GlobalConfig {
|
|
|
68
118
|
}
|
|
69
119
|
static #normalizeHost(host) {
|
|
70
120
|
const url = URL.canParse(host) ? new URL(host) : null;
|
|
71
|
-
return url && (url.protocol === "https:" || url.protocol === "http:") ? `${url.origin}${url.pathname
|
|
121
|
+
return url && (url.protocol === "https:" || url.protocol === "http:") ? `${url.origin}${trimTrailingSlashes(url.pathname)}` : trimTrailingSlashes(host);
|
|
72
122
|
}
|
|
73
123
|
static async getHostConfig(host = GlobalConfig.akanCloudHost) {
|
|
74
124
|
const akanConfig = await GlobalConfig.#getAkanGlobalConfig();
|
|
@@ -169,55 +219,6 @@ class GlobalConfig {
|
|
|
169
219
|
}
|
|
170
220
|
}
|
|
171
221
|
|
|
172
|
-
// pkgs/@akanjs/devkit/cloud/cloudHttpError.ts
|
|
173
|
-
import { isRecord } from "akanjs/common";
|
|
174
|
-
|
|
175
|
-
class CloudHttpError extends Error {
|
|
176
|
-
status;
|
|
177
|
-
statusText;
|
|
178
|
-
url;
|
|
179
|
-
body;
|
|
180
|
-
headers;
|
|
181
|
-
static #errKey = /^[\w$-]+\.error\.[\w$-]+$/;
|
|
182
|
-
name = "CloudHttpError";
|
|
183
|
-
constructor(status, statusText, url, body, headers = new Headers) {
|
|
184
|
-
super(`${status} ${statusText} from ${url}: ${body.slice(0, 200)}`);
|
|
185
|
-
this.status = status;
|
|
186
|
-
this.statusText = statusText;
|
|
187
|
-
this.url = url;
|
|
188
|
-
this.body = body;
|
|
189
|
-
this.headers = headers;
|
|
190
|
-
}
|
|
191
|
-
static async of(response, url) {
|
|
192
|
-
return new CloudHttpError(response.status, response.statusText, url, await response.text(), response.headers);
|
|
193
|
-
}
|
|
194
|
-
static statusOf(error) {
|
|
195
|
-
return error instanceof CloudHttpError ? error.status : null;
|
|
196
|
-
}
|
|
197
|
-
get error() {
|
|
198
|
-
try {
|
|
199
|
-
const parsed = JSON.parse(this.body);
|
|
200
|
-
return isRecord(parsed) && typeof parsed.error === "string" ? parsed.error : null;
|
|
201
|
-
} catch {
|
|
202
|
-
return null;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
get errKey() {
|
|
206
|
-
const { error } = this;
|
|
207
|
-
return error && CloudHttpError.#errKey.test(error) ? error : null;
|
|
208
|
-
}
|
|
209
|
-
get retryAfterMs() {
|
|
210
|
-
return CloudHttpError.retryAfterMs(this.headers.get("retry-after"));
|
|
211
|
-
}
|
|
212
|
-
static retryAfterMs(header) {
|
|
213
|
-
const value = header?.trim() ?? "";
|
|
214
|
-
if (!value)
|
|
215
|
-
return null;
|
|
216
|
-
const ms = /^\d+$/.test(value) ? Number(value) * 1000 : Date.parse(value) - Date.now();
|
|
217
|
-
return Number.isFinite(ms) ? Math.max(0, ms) : null;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
222
|
// pkgs/@akanjs/devkit/cloud/cloudApi.ts
|
|
222
223
|
class HttpClient {
|
|
223
224
|
baseUrl;
|
|
@@ -370,7 +371,6 @@ class CloudApi {
|
|
|
370
371
|
}
|
|
371
372
|
}
|
|
372
373
|
}
|
|
373
|
-
|
|
374
374
|
// pkgs/@akanjs/devkit/cloud/cloudUpdates.ts
|
|
375
375
|
import path2 from "path";
|
|
376
376
|
import { Logger as Logger2 } from "akanjs/common";
|
|
@@ -585,7 +585,6 @@ ${(release.problems ?? []).map((problem) => ` - ${problem}`).join(`
|
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
|
|
589
588
|
// pkgs/@akanjs/devkit/cloud/pipelineSecrets.ts
|
|
590
589
|
import { capitalize, Logger as Logger3, PipelineNames } from "akanjs/common";
|
|
591
590
|
class PipelineSecrets {
|
|
@@ -35,44 +35,44 @@ import {
|
|
|
35
35
|
filesChangedSince,
|
|
36
36
|
HmrWatcher,
|
|
37
37
|
WatchRootResolver
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-5nd1wtkv.js";
|
|
39
39
|
import {
|
|
40
40
|
runner,
|
|
41
41
|
script,
|
|
42
42
|
assertPromptable
|
|
43
|
-
} from "./index-
|
|
43
|
+
} from "./index-jw1zm273.js";
|
|
44
44
|
import {
|
|
45
45
|
WorkspaceExecutor,
|
|
46
46
|
AppExecutor,
|
|
47
47
|
LibExecutor,
|
|
48
48
|
PkgExecutor
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-va06nr10.js";
|
|
50
50
|
import {
|
|
51
51
|
DesktopServerStage,
|
|
52
52
|
UpdateUploader
|
|
53
|
-
} from "./index-
|
|
53
|
+
} from "./index-vk0pa0mn.js";
|
|
54
|
+
import {
|
|
55
|
+
resolveMobileTargets,
|
|
56
|
+
resolveAppId
|
|
57
|
+
} from "./index-m9jj544v.js";
|
|
54
58
|
import {
|
|
55
59
|
NativePublicEnv,
|
|
56
60
|
UpdatePackFolder,
|
|
57
61
|
NativeApp
|
|
58
|
-
} from "./index-
|
|
62
|
+
} from "./index-g1mbppa9.js";
|
|
59
63
|
import {
|
|
60
64
|
LibraryScript
|
|
61
|
-
} from "./index-
|
|
65
|
+
} from "./index-pydbnfez.js";
|
|
62
66
|
import {
|
|
63
67
|
stripAnsi
|
|
64
68
|
} from "./index-7md2g9vw.js";
|
|
65
69
|
import {
|
|
66
70
|
SlicePlanner,
|
|
67
71
|
formatSlicePlan
|
|
68
|
-
} from "./index-
|
|
72
|
+
} from "./index-35hc95h5.js";
|
|
69
73
|
import {
|
|
70
74
|
openBrowser
|
|
71
75
|
} from "./index-9dp031by.js";
|
|
72
|
-
import {
|
|
73
|
-
resolveMobileTargets,
|
|
74
|
-
resolveAppId
|
|
75
|
-
} from "./index-q958tqqg.js";
|
|
76
76
|
|
|
77
77
|
// pkgs/@akanjs/cli/application/application.script.ts
|
|
78
78
|
import { confirm } from "@inquirer/prompts";
|
|
@@ -196,7 +196,9 @@ var closeBunSocket = (socket, error) => {
|
|
|
196
196
|
|
|
197
197
|
// pkgs/@akanjs/devkit/createTunnel.ts
|
|
198
198
|
var createTunnel = async (service, { app, environment, port = service === "postgres" ? 5432 : 6379 }) => {
|
|
199
|
-
const
|
|
199
|
+
const baseDevEnv = WorkspaceExecutor.getBaseDevEnv();
|
|
200
|
+
WorkspaceExecutor.assertDeployableEnv(baseDevEnv, environment, `The ${service} tunnel`);
|
|
201
|
+
const { serveDomain, repoName } = baseDevEnv;
|
|
200
202
|
const host = `${app.name}-${environment}.${serveDomain}`;
|
|
201
203
|
const sshPort = process.env.SSH_TUNNEL_PORT ? parseInt(process.env.SSH_TUNNEL_PORT) : 32767;
|
|
202
204
|
const dstHost = `${service}-0.${service}-svc.${app.name}-${environment}.svc.cluster.local`;
|
|
@@ -1894,7 +1896,7 @@ ${uniqueCandidates.map((candidate) => ` - ${candidate}`).join(`
|
|
|
1894
1896
|
|
|
1895
1897
|
// pkgs/@akanjs/cli/application/application.runner.ts
|
|
1896
1898
|
import { Logger as Logger3, toError } from "akanjs/common";
|
|
1897
|
-
var loadBuildRunner = async () => (await import("./applicationBuildRunner-
|
|
1899
|
+
var loadBuildRunner = async () => (await import("./applicationBuildRunner-dj0xkrep.js")).ApplicationBuildRunner;
|
|
1898
1900
|
var loadPrompts = async () => await import("@inquirer/prompts");
|
|
1899
1901
|
|
|
1900
1902
|
class ApplicationRunner extends runner("application") {
|
|
@@ -2055,7 +2057,7 @@ try {
|
|
|
2055
2057
|
await new (await loadBuildRunner())(app).typecheck(options);
|
|
2056
2058
|
}
|
|
2057
2059
|
async typecheckLibrary(lib, options = {}) {
|
|
2058
|
-
const { ProjectTypecheck } = await import("./projectTypecheck-
|
|
2060
|
+
const { ProjectTypecheck } = await import("./projectTypecheck-f534enqj.js");
|
|
2059
2061
|
const root = lib.workspace.workspaceRoot;
|
|
2060
2062
|
await new ProjectTypecheck(lib.cwdPath, root, { ...process.env, AKAN_WORKSPACE_ROOT: root }).run([
|
|
2061
2063
|
"../../server.ts",
|
|
@@ -3633,7 +3635,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
3633
3635
|
await Promise.all(shares.map(async (share) => await share.close()));
|
|
3634
3636
|
}, "Abandoning the tunnel release; the shares expire on their own.");
|
|
3635
3637
|
await Promise.all(apps.map(async (app) => {
|
|
3636
|
-
const { TunnelShare } = await import("./TunnelShare-
|
|
3638
|
+
const { TunnelShare } = await import("./TunnelShare-661cxz5e.js");
|
|
3637
3639
|
const share = await TunnelShare.open(app, { workspace: app.workspace });
|
|
3638
3640
|
shares.push(share);
|
|
3639
3641
|
urls.set(app.name, share.url);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AppExecutor
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-va06nr10.js";
|
|
5
5
|
import {
|
|
6
6
|
jsonText,
|
|
7
7
|
createWorkflowBaselineSummary,
|
|
8
8
|
buildAkanModuleContextIndex,
|
|
9
9
|
toolingRolloutGate
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-trpasv9q.js";
|
|
11
11
|
import {
|
|
12
12
|
buildResourceList,
|
|
13
13
|
codexMcpConfigPath,
|
|
@@ -17,29 +17,29 @@ import {
|
|
|
17
17
|
upsertCodexMcpServerBlock,
|
|
18
18
|
renderDoctorText,
|
|
19
19
|
AkanContextAnalyzer
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-5edzv8fn.js";
|
|
21
21
|
import {
|
|
22
22
|
runner
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-jw1zm273.js";
|
|
24
24
|
import {
|
|
25
25
|
isPlaceholderAppId
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-vk0pa0mn.js";
|
|
27
|
+
import {
|
|
28
|
+
getMobileTargets,
|
|
29
|
+
appIdsOf
|
|
30
|
+
} from "./index-m9jj544v.js";
|
|
27
31
|
import {
|
|
28
32
|
NativeApp
|
|
29
|
-
} from "./index-
|
|
33
|
+
} from "./index-g1mbppa9.js";
|
|
30
34
|
import {
|
|
31
35
|
Prompter2
|
|
32
36
|
} from "./index-zzvvc845.js";
|
|
33
37
|
import {
|
|
34
38
|
RepairRunner
|
|
35
|
-
} from "./index-
|
|
39
|
+
} from "./index-j4mkhz93.js";
|
|
36
40
|
import {
|
|
37
41
|
WorkflowRunner
|
|
38
|
-
} from "./index-
|
|
39
|
-
import {
|
|
40
|
-
getMobileTargets,
|
|
41
|
-
appIdsOf
|
|
42
|
-
} from "./index-q958tqqg.js";
|
|
42
|
+
} from "./index-1xj2t7cb.js";
|
|
43
43
|
|
|
44
44
|
// pkgs/@akanjs/devkit/akanMcpContract.ts
|
|
45
45
|
import path from "path";
|
|
@@ -127,7 +127,7 @@ var inspectAkanContextInputSchema = {
|
|
|
127
127
|
},
|
|
128
128
|
required: ["question", "draft", "review", "request"]
|
|
129
129
|
};
|
|
130
|
-
var slugPart = (value) => typeof value === "string" ? value.trim().replace(/[^a-zA-Z0-9]+/g, "-").replace(
|
|
130
|
+
var slugPart = (value) => typeof value === "string" ? value.trim().replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-|-$/g, "").toLowerCase() : "";
|
|
131
131
|
var optionalString = (args, key) => {
|
|
132
132
|
const value = args[key];
|
|
133
133
|
return typeof value === "string" && value ? value : undefined;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-jw1zm273.js";
|
|
6
6
|
import {
|
|
7
7
|
ModuleExecutor
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-va06nr10.js";
|
|
9
9
|
import {
|
|
10
10
|
sourceFile,
|
|
11
11
|
moduleSourcePaths,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
createPassedPrimitiveReport,
|
|
14
14
|
bilingualLabelForField,
|
|
15
15
|
bilingualDescriptionForField
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-trpasv9q.js";
|
|
17
17
|
import {
|
|
18
18
|
PageScript
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-86jt2a0e.js";
|
|
20
20
|
import {
|
|
21
21
|
pluralizeName
|
|
22
22
|
} from "./index-nz8prx9g.js";
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
CloudApi,
|
|
6
6
|
CloudUpdates,
|
|
7
7
|
PipelineSecrets
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-cpb3nvma.js";
|
|
9
9
|
import {
|
|
10
10
|
WorkspaceExecutor,
|
|
11
11
|
AppExecutor
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-va06nr10.js";
|
|
13
13
|
import {
|
|
14
14
|
runner,
|
|
15
15
|
assertPromptable
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-jw1zm273.js";
|
|
17
17
|
import {
|
|
18
18
|
SubspaceConfig
|
|
19
19
|
} from "./index-4pf8g7ff.js";
|
|
@@ -21,6 +21,25 @@ import {
|
|
|
21
21
|
openBrowser
|
|
22
22
|
} from "./index-9dp031by.js";
|
|
23
23
|
|
|
24
|
+
// pkgs/@akanjs/cli/npmRegistry.ts
|
|
25
|
+
var defaultNpmRegistry = "https://registry.npmjs.org";
|
|
26
|
+
var getNpmRegistryUrl = (registryUrl = process.env.AKAN_NPM_REGISTRY ?? defaultNpmRegistry) => registryUrl.replace(/\/+$/, "");
|
|
27
|
+
async function getLatestPackageVersion(packageName, tag = "latest", registryUrl) {
|
|
28
|
+
const registry = getNpmRegistryUrl(registryUrl);
|
|
29
|
+
const url = `${registry}/${encodeURIComponent(packageName).replace(/^%40/, "@")}`;
|
|
30
|
+
const res = await fetch(url);
|
|
31
|
+
if (!res.ok)
|
|
32
|
+
throw new Error(`Failed to fetch ${packageName} metadata from ${registry}`);
|
|
33
|
+
const metadata = await res.json();
|
|
34
|
+
const version = metadata["dist-tags"]?.[tag];
|
|
35
|
+
if (!version)
|
|
36
|
+
throw new Error(`No npm dist-tag "${tag}" found for ${packageName}`);
|
|
37
|
+
return version;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// pkgs/@akanjs/cli/cloud/cloud.runner.ts
|
|
41
|
+
import path7 from "path";
|
|
42
|
+
|
|
24
43
|
// pkgs/@akanjs/devkit/platformTest/PlatformTestRun.ts
|
|
25
44
|
import path6 from "path";
|
|
26
45
|
import chalk from "chalk";
|
|
@@ -208,11 +227,13 @@ class PlatformTestTarget {
|
|
|
208
227
|
const install = await this.exec("bun install --frozen-lockfile", logPath, PlatformTestTarget.installIdleMs);
|
|
209
228
|
if (install.exitCode === 0)
|
|
210
229
|
return;
|
|
211
|
-
const
|
|
212
|
-
|
|
230
|
+
const failedPackages = [
|
|
231
|
+
...install.output.matchAll(/(?:pre|post)?install script from "([^"]+)" exited|failed to link binaries for package: (@?[^@\s]+)@/g)
|
|
232
|
+
].map((match) => match[1] ?? match[2] ?? "");
|
|
233
|
+
const tolerable = failedPackages.length > 0 && failedPackages.every((pkg) => this.tolerateScriptFailures.includes(pkg));
|
|
213
234
|
if (!tolerable)
|
|
214
235
|
throw new Error(`bun install failed \u2014 see ${logPath}`);
|
|
215
|
-
envWarnings.push(`install
|
|
236
|
+
envWarnings.push(`install failed for ${failedPackages.join(", ")} \u2014 tolerated on ${this.platform}`);
|
|
216
237
|
const relink = await this.exec("bun install --frozen-lockfile --ignore-scripts", this.#logPath(context, "install-relink"), PlatformTestTarget.installIdleMs);
|
|
217
238
|
if (relink.exitCode !== 0)
|
|
218
239
|
throw new Error(`bun install --ignore-scripts failed \u2014 see ${logPath}`);
|
|
@@ -249,7 +270,7 @@ class LinuxDockerTarget extends PlatformTestTarget {
|
|
|
249
270
|
}
|
|
250
271
|
static dockerfile = [
|
|
251
272
|
`FROM oven/bun:${Bun.version}-slim`,
|
|
252
|
-
"RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates procps lsof && rm -rf /var/lib/apt/lists/*"
|
|
273
|
+
"RUN sed -i 's|http://|https://|g' /etc/apt/sources.list.d/debian.sources && apt-get update && apt-get install -y --no-install-recommends git ca-certificates procps lsof && rm -rf /var/lib/apt/lists/*"
|
|
253
274
|
].join(`
|
|
254
275
|
`);
|
|
255
276
|
get image() {
|
|
@@ -412,7 +433,7 @@ import path5 from "path";
|
|
|
412
433
|
class WindowsSshTarget extends PlatformTestTarget {
|
|
413
434
|
static utmctlPath = "/Applications/UTM.app/Contents/MacOS/utmctl";
|
|
414
435
|
static defaultWorkRoot = "C:\\akan-test";
|
|
415
|
-
static defaultTolerateScriptFailures = ["sharp", "puppeteer"];
|
|
436
|
+
static defaultTolerateScriptFailures = ["sharp", "puppeteer", "msgpackr"];
|
|
416
437
|
static #runDirPattern = "^\\d{8}-\\d{6}$";
|
|
417
438
|
static #keptRuns = 2;
|
|
418
439
|
platform = "windows";
|
|
@@ -653,29 +674,10 @@ class PlatformTestRun {
|
|
|
653
674
|
}
|
|
654
675
|
|
|
655
676
|
// pkgs/@akanjs/cli/cloud/cloud.runner.ts
|
|
656
|
-
import path7 from "path";
|
|
657
677
|
import { confirm, input, select } from "@inquirer/prompts";
|
|
658
678
|
import { Logger, sleep } from "akanjs/common";
|
|
659
679
|
import chalk2 from "chalk";
|
|
660
680
|
import * as QRcode from "qrcode";
|
|
661
|
-
|
|
662
|
-
// pkgs/@akanjs/cli/npmRegistry.ts
|
|
663
|
-
var defaultNpmRegistry = "https://registry.npmjs.org";
|
|
664
|
-
var getNpmRegistryUrl = (registryUrl = process.env.AKAN_NPM_REGISTRY ?? defaultNpmRegistry) => registryUrl.replace(/\/+$/, "");
|
|
665
|
-
async function getLatestPackageVersion(packageName, tag = "latest", registryUrl) {
|
|
666
|
-
const registry = getNpmRegistryUrl(registryUrl);
|
|
667
|
-
const url = `${registry}/${encodeURIComponent(packageName).replace(/^%40/, "@")}`;
|
|
668
|
-
const res = await fetch(url);
|
|
669
|
-
if (!res.ok)
|
|
670
|
-
throw new Error(`Failed to fetch ${packageName} metadata from ${registry}`);
|
|
671
|
-
const metadata = await res.json();
|
|
672
|
-
const version = metadata["dist-tags"]?.[tag];
|
|
673
|
-
if (!version)
|
|
674
|
-
throw new Error(`No npm dist-tag "${tag}" found for ${packageName}`);
|
|
675
|
-
return version;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
// pkgs/@akanjs/cli/cloud/cloud.runner.ts
|
|
679
681
|
var addRemoteEnvServerValue = "__addRemoteEnvServer";
|
|
680
682
|
var removeRemoteEnvServerValue = "__removeRemoteEnvServer";
|
|
681
683
|
|