@akanjs/cli 3.2.0-rc.16 → 3.2.0-rc.18
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 +2 -2
- package/{CodeAgent-18qg03re.js → CodeAgent-w96z7fm7.js} +2 -2
- package/{CodeTui-zkm51zf3.js → CodeTui-496f55hh.js} +1 -1
- package/TunnelShare-tyj8nb0z.js +19 -0
- package/{agent.command-5k2zegmj.js → agent.command-81h65wcv.js} +20 -20
- package/akanCode.js +2 -2
- package/{appExecutor-1bgs9a69.js → appExecutor-g4wq24v1.js} +3 -3
- package/{application.command-ge27047n.js → application.command-rcw4h1gh.js} +15 -15
- package/{applicationBuildRunner-7skfg8zn.js → applicationBuildRunner-emhp6rh0.js} +10 -10
- package/buildBatch.proc.js +10 -10
- package/{cloud.command-d18qj1v2.js → cloud.command-k47h3kma.js} +22 -22
- package/cloud.script-b4smdpa5.js +35 -0
- package/{code.command-tz4x5zm6.js → code.command-dam01a2f.js} +10 -10
- package/{context.command-x1smtm5q.js → context.command-44carkt5.js} +22 -22
- package/context.runner-xtr9ngpa.js +34 -0
- package/{guideline.command-rdcwxf8g.js → guideline.command-ccxs69br.js} +6 -6
- package/incrementalBuilder.proc.js +11 -11
- package/{index-dp7sht3v.js → index-1j1jmmac.js} +8 -8
- package/{index-39byv35b.js → index-286djj0d.js} +2 -2
- package/{index-3641r8q0.js → index-2hwjhe8r.js} +4 -4
- package/{index-trp7jdr1.js → index-4279crca.js} +7 -6
- package/{index-nd39rssn.js → index-a42cf737.js} +58 -46
- package/{index-dtpeyts6.js → index-a85n83t6.js} +1 -1
- package/{index-gh4brxzn.js → index-aw7at6j6.js} +1 -1
- package/{index-6p02be7n.js → index-b061e6fn.js} +9 -9
- package/{index-neassptx.js → index-bbd1727m.js} +5 -5
- package/{index-bzdq8wfw.js → index-cef0fxf2.js} +3 -3
- package/{index-9mx3b3zh.js → index-ctrx7asj.js} +4 -4
- package/{index-0c8zj1da.js → index-e4w015qt.js} +1 -1
- package/{index-vm6pr11y.js → index-g95rbz83.js} +2 -2
- package/{index-b2sptt87.js → index-gd9tkq2k.js} +5 -5
- package/{index-669sg3yp.js → index-ggmwp14t.js} +4 -4
- package/{index-n8mxyy3f.js → index-gkfpqdm8.js} +1 -1
- package/{index-e82xwj3x.js → index-h9356zmz.js} +1 -1
- package/{index-q4e18ne4.js → index-her656ng.js} +3 -3
- package/{index-g56xae1n.js → index-hw2eammf.js} +6 -6
- package/{index-fcrr79gh.js → index-jeqq717b.js} +11 -11
- package/{index-yr5jv8yd.js → index-k1p29hdp.js} +3 -3
- package/{index-dqsc1b5t.js → index-k2kr1wd4.js} +1 -1
- package/{index-emf3wzvh.js → index-kqf2s304.js} +7 -7
- package/{index-1ts8vfsk.js → index-ktvyva62.js} +1 -1
- package/{index-z7t6neq1.js → index-mgvvtjp1.js} +4 -4
- package/{index-h7yd92c8.js → index-nwbdpnna.js} +1 -1
- package/{index-sp331bww.js → index-pcqr0r0m.js} +1 -1
- package/{index-xywq95wk.js → index-pqf6d5ff.js} +6 -6
- package/{index-bjnebzzc.js → index-ptpdd9hw.js} +4 -4
- package/{index-q57rsax4.js → index-qrh7kdb1.js} +3 -3
- package/{index-g7e58wz2.js → index-r790hx48.js} +6 -6
- package/{index-t329y8am.js → index-rj406y9n.js} +8 -8
- package/{index-er2ja34m.js → index-rxxjkbj2.js} +5 -5
- package/{index-ttfz2sc7.js → index-s21zxj7p.js} +6 -6
- package/{index-d2r762fk.js → index-sa8g94se.js} +8 -47
- package/{index-s75h0455.js → index-tkrg58qv.js} +1 -1
- package/{index-jfkh776h.js → index-tpr9nqkj.js} +1 -1
- package/{index-t8tysbxv.js → index-vh8q7mrq.js} +3 -3
- package/{index-j2eqe3jk.js → index-wy7qcqsd.js} +11 -11
- package/{index-bxqbt5p3.js → index-y27cxjd6.js} +1 -1
- package/{index-f482h2hj.js → index-y71v7grx.js} +1 -1
- package/index.js +27 -27
- package/{libExecutor-hxe5eqfh.js → libExecutor-mmrzd606.js} +2 -2
- package/{library.command-83shs8fw.js → library.command-brkcat13.js} +7 -7
- package/{localRegistry.command-sz713jg3.js → localRegistry.command-qwzy3t7w.js} +21 -21
- package/{module.command-jhhm0nmw.js → module.command-t5emqxkr.js} +10 -10
- package/{package.command-42syy96v.js → package.command-xv04dbxf.js} +10 -10
- package/package.json +2 -2
- package/{page.command-jkv29zzs.js → page.command-yhgq9tj8.js} +7 -7
- package/{pipeline.command-6sg9g4hq.js → pipeline.command-x3nkf9kc.js} +6 -6
- package/{pkgExecutor-6p82w5y1.js → pkgExecutor-4cbe3sgr.js} +2 -2
- package/{primitive.command-tt6aq7m9.js → primitive.command-jv60b759.js} +11 -11
- package/{projectTypecheck-wfrz0cxr.js → projectTypecheck-fbfq9rm9.js} +1 -1
- package/{quality.command-tqar7ss5.js → quality.command-mdjardf1.js} +9 -9
- package/{repair.command-qkcn329t.js → repair.command-s22j5xbe.js} +10 -10
- package/{routeSourceValidator-8aph1dsr.js → routeSourceValidator-8n6j1vn7.js} +3 -1
- package/{scalar.command-6nvq11ag.js → scalar.command-a6qs7012.js} +9 -9
- package/{subspace.command-dvwds4cv.js → subspace.command-26hkjqf9.js} +12 -12
- package/templates/biomeForm.ts +1 -1
- package/templates/env/_env.server.type.ts +1 -1
- package/templates/facetIndex/index.ts +2 -37
- package/{tunnel.command-h8r69a7v.js → tunnel.command-83sfgz5z.js} +11 -11
- package/{verify.command-ynec8kt2.js → verify.command-krm1rrf1.js} +17 -17
- package/{workflow.command-f70fx73a.js → workflow.command-z05y7amj.js} +15 -15
- package/{workspace.command-vagjy1q9.js → workspace.command-qga6cn1n.js} +36 -36
- package/TunnelShare-6t4rwyc0.js +0 -19
- package/cloud.script-0hbhm3mw.js +0 -35
- package/context.runner-vb7jc0k8.js +0 -34
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
runner,
|
|
4
4
|
script,
|
|
5
5
|
markCliErrorPrinted
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-bbd1727m.js";
|
|
7
7
|
import {
|
|
8
8
|
CliError
|
|
9
9
|
} from "./index-j4yvgfhr.js";
|
|
@@ -15,16 +15,16 @@ import {
|
|
|
15
15
|
upsertAgentBlock,
|
|
16
16
|
renderRecipeEntries,
|
|
17
17
|
CLAUDE_COMMENT_RULE
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-hw2eammf.js";
|
|
19
19
|
import {
|
|
20
20
|
AppExecutor2
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-4279crca.js";
|
|
22
22
|
import {
|
|
23
23
|
LibExecutor2
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-gkfpqdm8.js";
|
|
25
25
|
import {
|
|
26
26
|
AkanContextAnalyzer
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-rxxjkbj2.js";
|
|
28
28
|
import {
|
|
29
29
|
collectRecipeSources2,
|
|
30
30
|
scanRecipes2
|
|
@@ -39,15 +39,15 @@ import {
|
|
|
39
39
|
import {
|
|
40
40
|
ApplicationRunner,
|
|
41
41
|
VerifyScope
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-wy7qcqsd.js";
|
|
43
43
|
import {
|
|
44
44
|
WorkspaceRunner
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-s21zxj7p.js";
|
|
46
46
|
import {
|
|
47
47
|
VerifyComments,
|
|
48
48
|
VerifyPipeline,
|
|
49
49
|
VerifyReport
|
|
50
|
-
} from "./index-
|
|
50
|
+
} from "./index-pqf6d5ff.js";
|
|
51
51
|
|
|
52
52
|
// pkgs/@akanjs/cli/agent/agent.script.ts
|
|
53
53
|
import { Logger as Logger3 } from "akanjs/common";
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-bbd1727m.js";
|
|
6
6
|
import {
|
|
7
7
|
generatedFilesForSync,
|
|
8
8
|
createPassedPrimitiveReport,
|
|
9
9
|
scalarChangedFiles
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ggmwp14t.js";
|
|
11
11
|
import {
|
|
12
12
|
pluralizeName
|
|
13
13
|
} from "./index-nz8prx9g.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
script
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-bbd1727m.js";
|
|
5
5
|
import {
|
|
6
6
|
jsonText
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-ggmwp14t.js";
|
|
8
8
|
import {
|
|
9
9
|
akanMcpInstallTargets
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-rxxjkbj2.js";
|
|
11
11
|
import {
|
|
12
12
|
ContextRunner2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-b061e6fn.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/cli/context/context.script.ts
|
|
16
16
|
import { Logger } from "akanjs/common";
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
AkanAppConfig,
|
|
8
8
|
increaseBuildNum,
|
|
9
9
|
decreaseBuildNum
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-hw2eammf.js";
|
|
11
11
|
import {
|
|
12
12
|
FileSys2
|
|
13
13
|
} from "./index-by2tvsq6.js";
|
|
14
14
|
import {
|
|
15
15
|
LibExecutor2
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-gkfpqdm8.js";
|
|
17
17
|
|
|
18
18
|
// pkgs/@akanjs/devkit/executors/appExecutor.ts
|
|
19
19
|
import { cp as cpEntry, lstat, mkdir, readdir as readDirEntries, realpath, symlink } from "fs/promises";
|
|
@@ -261,8 +261,8 @@ const userLayout: LayoutModule = {};
|
|
|
261
261
|
process.env.AKAN_PUBLIC_RENDER_ENV === "csr"
|
|
262
262
|
? await UserLayout({ params, searchParams, children })
|
|
263
263
|
: ${userLayoutElement};
|
|
264
|
+
` : opts.includeSystemProvider ? ` const layout = ${userLayoutElement};
|
|
264
265
|
` : "";
|
|
265
|
-
const layoutChild = isAsyncUserLayout ? "{layout}" : userLayoutElement;
|
|
266
266
|
const layoutReturn = isAsyncUserLayout ? "layout" : userLayoutElement;
|
|
267
267
|
const headLayouts = opts.includeSystemProvider ? "[inheritedLayout, userLayout]" : "[userLayout]";
|
|
268
268
|
const guardExport = opts.includeSystemProvider ? "export const guard = RouteGuards.compose(inheritedLayout.guard, userLayout.guard);" : "export const guard = userLayout.guard;";
|
|
@@ -286,6 +286,7 @@ import { assertGuardOnChain, loadFonts, RouteGuards, resolveRouteModule, RouteHe
|
|
|
286
286
|
import type { ReactNode } from "react";
|
|
287
287
|
import { System } from "${ROOT_LAYOUT_SYSTEM.specifier}";
|
|
288
288
|
import type { McpAppRootProps } from "akanjs/webkit";
|
|
289
|
+
import { RouteLevelBoundary } from "akanjs/webkit/RouteLevelBoundary.tsx";
|
|
289
290
|
import { env } from "@apps/${opts.appName}/env/env.client";
|
|
290
291
|
import { allDictionary } from ${JSON.stringify(dictMacroSpecifier)};
|
|
291
292
|
${storeImport}${inheritedImport}${userImport}
|
|
@@ -297,7 +298,7 @@ const defaultFontClassName = defaultFont ? (defaultFont.className ?? \`font-\${d
|
|
|
297
298
|
export const theme = userLayout.theme ?? inheritedLayout.theme;
|
|
298
299
|
export const viewport = userLayout.viewport ?? inheritedLayout.viewport;
|
|
299
300
|
export const manifest = userLayout.manifest ?? inheritedLayout.manifest;
|
|
300
|
-
export
|
|
301
|
+
export const LevelBoundary = process.env.AKAN_PUBLIC_RENDER_ENV === "csr" ? undefined : RouteLevelBoundary;
|
|
301
302
|
|
|
302
303
|
${layoutExports}(
|
|
303
304
|
<System.Provider
|
|
@@ -316,7 +317,7 @@ ${layoutExports}(
|
|
|
316
317
|
wsConnect={userLayout.wsConnect ?? inheritedLayout.wsConnect}
|
|
317
318
|
allDictionary={process.env.AKAN_PUBLIC_RENDER_ENV === "ssr" ? allDictionary : undefined}
|
|
318
319
|
>
|
|
319
|
-
|
|
320
|
+
{process.env.AKAN_PUBLIC_RENDER_ENV === "csr" ? layout : <RouteLevelBoundary>{layout}</RouteLevelBoundary>}
|
|
320
321
|
</System.Provider>
|
|
321
322
|
);
|
|
322
323
|
}
|
|
@@ -396,7 +397,7 @@ async function resolveSsrPageEntriesForApp(app, pageKeys) {
|
|
|
396
397
|
class AppExecutor2 extends SysExecutor {
|
|
397
398
|
static #routeSourceValidator = null;
|
|
398
399
|
static async#getRouteSourceValidator() {
|
|
399
|
-
AppExecutor2.#routeSourceValidator ??= (await import("./routeSourceValidator-
|
|
400
|
+
AppExecutor2.#routeSourceValidator ??= (await import("./routeSourceValidator-8n6j1vn7.js")).RouteSourceValidator;
|
|
400
401
|
return AppExecutor2.#routeSourceValidator;
|
|
401
402
|
}
|
|
402
403
|
dist;
|
|
@@ -110,6 +110,9 @@ ${at.file}` : null;
|
|
|
110
110
|
return node.fields ? { ...node, fields: node.fields.map(({ digest: _field, ...field }) => field) } : node;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
+
// pkgs/@akanjs/language/guardResolver.ts
|
|
114
|
+
import { barrelFacetDirs, facetBarrelNamesOf } from "akanjs/common/facetBarrel.ts";
|
|
115
|
+
|
|
113
116
|
// pkgs/@akanjs/language/escapeRegExp.ts
|
|
114
117
|
var regExpSpecials = /[\\^$.*+?()[\]{}|]/g;
|
|
115
118
|
var escapeRegExp = (text) => text.replace(regExpSpecials, (special) => `\\${special}`);
|
|
@@ -780,6 +783,7 @@ var aliasPattern = /^@(apps|libs)\/([^/]+)/;
|
|
|
780
783
|
var maxMapDepth = 4;
|
|
781
784
|
var identifierPattern = /^[\p{ID_Start}$_][\p{ID_Continue}$\u200c\u200d]*$/u;
|
|
782
785
|
var starExportPattern = /export\s*\*\s*from\s*["']([^"']+)["']/g;
|
|
786
|
+
var facetEntryPattern = new RegExp(`^((?:apps|libs)/[^/]+/(${barrelFacetDirs.map(escapeRegExp).join("|")}))/([^/]+)(/)?`);
|
|
783
787
|
var exportingPatternOf = (name) => new RegExp(`export\\s*\\{(?:[^}]*?[\\s,])?${escapeRegExp(name)}(?![\\w$])`);
|
|
784
788
|
var declaringPatternOf = (name, isAnyBinding) => {
|
|
785
789
|
const escaped = escapeRegExp(name);
|
|
@@ -805,6 +809,7 @@ class GuardResolver {
|
|
|
805
809
|
#moduleExports = new Map;
|
|
806
810
|
#ownerFiles = null;
|
|
807
811
|
#modules = null;
|
|
812
|
+
#barrels = null;
|
|
808
813
|
constructor(source, routes) {
|
|
809
814
|
this.#source = source;
|
|
810
815
|
this.#routes = routes;
|
|
@@ -932,7 +937,7 @@ ${name}`, guard);
|
|
|
932
937
|
const own = this.#nearest(candidates.filter((other) => other.owner === from), ({ site }) => site.fileName, near);
|
|
933
938
|
if (own)
|
|
934
939
|
return own;
|
|
935
|
-
const reexport = from && depth < maxMapDepth ? this
|
|
940
|
+
const reexport = from && depth < maxMapDepth ? this.#reexportOf(from, name, near) : null;
|
|
936
941
|
if (reexport)
|
|
937
942
|
return this.#factoryAt(factories, reexport.local, reexport.site, depth + 1);
|
|
938
943
|
return from && near ? this.#throughStar(candidates, from, name, near) : undefined;
|
|
@@ -970,13 +975,13 @@ ${name}`, guard);
|
|
|
970
975
|
const visible = isBase ? undefined : declared.find((other) => this.visible(other.owner, site.owner));
|
|
971
976
|
return visible ? { guard: visible } : { name, from };
|
|
972
977
|
}
|
|
973
|
-
const reexport = from && depth < maxMapDepth ? this
|
|
978
|
+
const reexport = from && depth < maxMapDepth ? this.#reexportOf(from, name, near) : null;
|
|
974
979
|
if (reexport)
|
|
975
980
|
return this.#findGuard(reexport.local, reexport.site, depth + 1, isBase);
|
|
976
981
|
const reached = from && near ? this.#throughStar(declared, from, name, near) : undefined;
|
|
977
982
|
return reached ? { guard: reached } : { name, from };
|
|
978
983
|
}
|
|
979
|
-
reexportOf(owner, name, near) {
|
|
984
|
+
#reexportOf(owner, name, near) {
|
|
980
985
|
const key = `${owner}
|
|
981
986
|
${name}
|
|
982
987
|
${near ?? ""}`;
|
|
@@ -1133,20 +1138,24 @@ ${near}`;
|
|
|
1133
1138
|
return cached;
|
|
1134
1139
|
const found = { owners: [], packages: [], paths: [near], isOpaque: false };
|
|
1135
1140
|
this.#starExports.set(key, found);
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1141
|
+
const reach = (specifier, path, target) => {
|
|
1142
|
+
if (path === null && !found.packages.includes(specifier))
|
|
1143
|
+
found.packages.push(specifier);
|
|
1144
|
+
if (target === undefined || target === frameworkOwner || path === null)
|
|
1145
|
+
found.isOpaque = true;
|
|
1146
|
+
else if (!found.paths.includes(path))
|
|
1147
|
+
found.paths.push(path);
|
|
1148
|
+
if (target && target !== frameworkOwner && target !== owner && !found.owners.includes(target))
|
|
1149
|
+
found.owners.push(target);
|
|
1150
|
+
};
|
|
1151
|
+
for (let idx = 0;idx < found.paths.length; idx++) {
|
|
1152
|
+
const path = found.paths[idx] ?? "";
|
|
1153
|
+
for (const module of this.#barrelAt(path) ?? [])
|
|
1154
|
+
reach(module, module, ownerOf(module) ?? undefined);
|
|
1155
|
+
for (const fileName of this.#modulesAt(path))
|
|
1156
|
+
for (const [, specifier = ""] of this.#source.readText(fileName)?.matchAll(starExportPattern) ?? [])
|
|
1157
|
+
reach(specifier, this.pathOfSpecifier(fileName, specifier), this.ownerOfSpecifier(fileName, specifier));
|
|
1158
|
+
}
|
|
1150
1159
|
return found;
|
|
1151
1160
|
}
|
|
1152
1161
|
exportsAt(path, name) {
|
|
@@ -1155,7 +1164,7 @@ ${name}`;
|
|
|
1155
1164
|
const cached = this.#moduleExports.get(key);
|
|
1156
1165
|
if (cached)
|
|
1157
1166
|
return cached;
|
|
1158
|
-
const found = { named: null, stars: [] };
|
|
1167
|
+
const found = { named: null, stars: this.#barrelAt(path) ?? [] };
|
|
1159
1168
|
const exporting = exportingPatternOf(name);
|
|
1160
1169
|
for (const fileName of this.#modulesAt(path)) {
|
|
1161
1170
|
const text = this.#source.readText(fileName);
|
|
@@ -1187,21 +1196,23 @@ ${name}`;
|
|
|
1187
1196
|
}
|
|
1188
1197
|
return this.#modules.get(path) ?? [];
|
|
1189
1198
|
}
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1199
|
+
#barrelAt(path) {
|
|
1200
|
+
if (!this.#barrels) {
|
|
1201
|
+
const entries = new Map;
|
|
1202
|
+
for (const [fileName] of this.#source.files) {
|
|
1203
|
+
const [, folder, facet, entry, nested] = this.#source.relative(fileName).match(facetEntryPattern) ?? [];
|
|
1204
|
+
if (!folder || !facet || !entry)
|
|
1205
|
+
continue;
|
|
1206
|
+
const found = entries.get(folder) ?? { facet, files: new Set, dirs: new Set };
|
|
1207
|
+
(nested ? found.dirs : found.files).add(entry);
|
|
1208
|
+
entries.set(folder, found);
|
|
1209
|
+
}
|
|
1210
|
+
this.#barrels = new Map([...entries].map(([folder, { facet, files, dirs }]) => [
|
|
1211
|
+
folder,
|
|
1212
|
+
facetBarrelNamesOf(facet, [...files], [...dirs]).map((name) => `${folder}/${name}`)
|
|
1213
|
+
]));
|
|
1203
1214
|
}
|
|
1204
|
-
return
|
|
1215
|
+
return this.#modulesAt(path).length ? undefined : this.#barrels.get(path);
|
|
1205
1216
|
}
|
|
1206
1217
|
declares(owner, name) {
|
|
1207
1218
|
const declaring = declaringPatternOf(name, true);
|
|
@@ -1262,7 +1273,9 @@ export
|
|
|
1262
1273
|
}
|
|
1263
1274
|
|
|
1264
1275
|
// pkgs/@akanjs/language/adaptorResolver.ts
|
|
1265
|
-
var
|
|
1276
|
+
var packageOf = (specifier) => specifier.split("/").slice(0, specifier.startsWith("@") ? 2 : 1).join("/");
|
|
1277
|
+
var packageKeyOf = ({ name, from }) => `${packageOf(from)}
|
|
1278
|
+
${name}`;
|
|
1266
1279
|
|
|
1267
1280
|
class AdaptorResolver {
|
|
1268
1281
|
#source;
|
|
@@ -1353,8 +1366,6 @@ ${field}`))
|
|
|
1353
1366
|
return own.find((adaptor) => adaptor.fileName === fileName) ?? first;
|
|
1354
1367
|
if (own.length === 1)
|
|
1355
1368
|
return first;
|
|
1356
|
-
if (!this.#resolver.hasModule(path))
|
|
1357
|
-
return own.find((adaptor) => this.#source.relative(adaptor.fileName).startsWith(`${path}/`)) ?? first;
|
|
1358
1369
|
const exported = this.#exportedAt(name, path, new Set).filter((item) => first || ("fact" in item));
|
|
1359
1370
|
const [only] = exported;
|
|
1360
1371
|
if (only)
|
|
@@ -1364,7 +1375,7 @@ ${field}`))
|
|
|
1364
1375
|
#exportedAt(name, path, seen) {
|
|
1365
1376
|
const key = `${path}
|
|
1366
1377
|
${name}`;
|
|
1367
|
-
if (seen.has(key)
|
|
1378
|
+
if (seen.has(key))
|
|
1368
1379
|
return [];
|
|
1369
1380
|
seen.add(key);
|
|
1370
1381
|
const here = (this.#adaptors.get(name) ?? []).filter((adaptor) => {
|
|
@@ -1380,25 +1391,26 @@ ${name}`;
|
|
|
1380
1391
|
const target = named.from === null ? path : this.#resolver.pathOfSpecifier(named.fileName, named.from);
|
|
1381
1392
|
return target === null ? [] : this.#exportedAt(named.name, target, seen);
|
|
1382
1393
|
}
|
|
1383
|
-
|
|
1394
|
+
const reached = stars.flatMap((star) => this.#exportedAt(name, star, seen));
|
|
1395
|
+
return [...new Map(reached.map((item) => ["fact" in item ? item.id : packageKeyOf(item), item])).values()];
|
|
1384
1396
|
}
|
|
1385
1397
|
#packageAdaptorOf(name, specifier) {
|
|
1386
1398
|
if (frameworkPattern.test(specifier))
|
|
1387
1399
|
return this.#sink.addNode(this.#sink.key("adaptor", null, name), "adaptor", null, name, null, [frameworkOwner]).id;
|
|
1388
|
-
const pkg =
|
|
1400
|
+
const pkg = packageOf(specifier);
|
|
1389
1401
|
return this.#sink.addNode(this.#sink.key("adaptor", pkg, name), "adaptor", null, name, null, [pkg]).id;
|
|
1390
1402
|
}
|
|
1391
1403
|
#packageShimOf(owner, name, near) {
|
|
1392
|
-
|
|
1393
|
-
const [shim] = reexport?.site.imports ?? [];
|
|
1394
|
-
if (reexport && shim && this.#resolver.pathOfSpecifier(reexport.site.fileName, shim.from) === null)
|
|
1395
|
-
return { name: reexport.local === "default" ? name : reexport.local, from: shim.from };
|
|
1396
|
-
if (reexport || !near)
|
|
1404
|
+
if (!near)
|
|
1397
1405
|
return null;
|
|
1398
|
-
const
|
|
1406
|
+
const shims = this.#exportedAt(name, near, new Set).filter((item) => !("fact" in item));
|
|
1407
|
+
const [shim] = shims;
|
|
1408
|
+
if (shim)
|
|
1409
|
+
return shims.length === 1 ? shim : null;
|
|
1410
|
+
const { packages, paths } = this.#resolver.starExportsOf(owner, near);
|
|
1399
1411
|
const [only] = packages;
|
|
1400
|
-
const isDeclared =
|
|
1401
|
-
return packages.
|
|
1412
|
+
const isDeclared = paths.some((path) => this.#resolver.declaresAt(path, name));
|
|
1413
|
+
return only && new Set(packages.map(packageOf)).size === 1 && !isDeclared ? { name, from: only } : null;
|
|
1402
1414
|
}
|
|
1403
1415
|
#nodeOf({ fact, owner, fileName, id }) {
|
|
1404
1416
|
const detail = fact.refName ? [fact.refName] : [];
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
runner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-bbd1727m.js";
|
|
5
5
|
import {
|
|
6
6
|
AppExecutor2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-4279crca.js";
|
|
8
8
|
import {
|
|
9
9
|
jsonText,
|
|
10
10
|
workflowStatus,
|
|
11
11
|
createWorkflowBaselineSummary,
|
|
12
12
|
buildAkanModuleContextIndex,
|
|
13
13
|
toolingRolloutGate
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-ggmwp14t.js";
|
|
15
15
|
import {
|
|
16
16
|
buildResourceList,
|
|
17
17
|
codexMcpConfigPath,
|
|
@@ -21,29 +21,29 @@ import {
|
|
|
21
21
|
upsertCodexMcpServerBlock,
|
|
22
22
|
renderDoctorText,
|
|
23
23
|
AkanContextAnalyzer
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-rxxjkbj2.js";
|
|
25
25
|
import {
|
|
26
26
|
Prompter2
|
|
27
27
|
} from "./index-89x8tp7z.js";
|
|
28
28
|
import {
|
|
29
29
|
NativeApp
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-qrh7kdb1.js";
|
|
31
31
|
import {
|
|
32
32
|
isPlaceholderAppId
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-tpr9nqkj.js";
|
|
34
34
|
import {
|
|
35
35
|
getMobileTargets,
|
|
36
36
|
appIdsOf
|
|
37
37
|
} from "./index-m9jj544v.js";
|
|
38
38
|
import {
|
|
39
39
|
WorkspaceGraph
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-pcqr0r0m.js";
|
|
41
41
|
import {
|
|
42
42
|
RepairRunner
|
|
43
|
-
} from "./index-
|
|
43
|
+
} from "./index-cef0fxf2.js";
|
|
44
44
|
import {
|
|
45
45
|
WorkflowRunner
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-rj406y9n.js";
|
|
47
47
|
|
|
48
48
|
// pkgs/@akanjs/devkit/context/akanMcpContract.ts
|
|
49
49
|
import { lstatSync, realpathSync } from "fs";
|
|
@@ -5,23 +5,23 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
Executor,
|
|
7
7
|
WorkspaceExecutor
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-hw2eammf.js";
|
|
9
9
|
import {
|
|
10
10
|
getDirname2,
|
|
11
11
|
FileSys2
|
|
12
12
|
} from "./index-by2tvsq6.js";
|
|
13
13
|
import {
|
|
14
14
|
AppExecutor2
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-4279crca.js";
|
|
16
16
|
import {
|
|
17
17
|
LibExecutor2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-gkfpqdm8.js";
|
|
19
19
|
import {
|
|
20
20
|
PkgExecutor2
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-a85n83t6.js";
|
|
22
22
|
import {
|
|
23
23
|
ModuleExecutor
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-k2kr1wd4.js";
|
|
25
25
|
|
|
26
26
|
// pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
|
|
27
27
|
var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
runner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-bbd1727m.js";
|
|
5
5
|
import {
|
|
6
6
|
writeWorkflowRunArtifact,
|
|
7
7
|
generatedFilePathsForTarget,
|
|
8
8
|
writeGeneratedSyncState,
|
|
9
9
|
createRepairReport,
|
|
10
10
|
renderRepairReport
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-ggmwp14t.js";
|
|
12
12
|
import {
|
|
13
13
|
AkanContextAnalyzer
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-rxxjkbj2.js";
|
|
15
15
|
import {
|
|
16
16
|
isWorkflowSysName,
|
|
17
17
|
isWorkflowModuleName
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ROOT_LAYOUT_SYSTEM,
|
|
4
4
|
isImplicitRootLayoutKey,
|
|
5
5
|
resolveSsrPageEntriesForApp
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-4279crca.js";
|
|
7
7
|
import {
|
|
8
8
|
computeRouteSeedIndex,
|
|
9
9
|
saveRouteSeedIndex,
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
ClientEntriesBundler,
|
|
12
12
|
VENDOR_SPECIFIERS,
|
|
13
13
|
RouteClientBuilder
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-sa8g94se.js";
|
|
15
15
|
import {
|
|
16
16
|
SOURCE_EXTS,
|
|
17
17
|
FontOptimizer,
|
|
18
18
|
FontPruner
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-ktvyva62.js";
|
|
20
20
|
import {
|
|
21
21
|
BarrelAnalyzer,
|
|
22
22
|
createTsconfigPackageResolver,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
CsrEntryFiles,
|
|
25
25
|
toClientReferencePath,
|
|
26
26
|
PagesBundleBuilder
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-nwbdpnna.js";
|
|
28
28
|
import {
|
|
29
29
|
CssBlockParser
|
|
30
30
|
} from "./index-62md4dwy.js";
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
UpdatePackFolder,
|
|
10
10
|
NativePublicEnv,
|
|
11
11
|
NativeApp
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-qrh7kdb1.js";
|
|
13
13
|
import {
|
|
14
14
|
ExitCodeError
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-bbd1727m.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigLock
|
|
18
18
|
} from "./index-bqbf654f.js";
|
|
@@ -6,23 +6,23 @@ import {
|
|
|
6
6
|
CloudApi,
|
|
7
7
|
CloudUpdates,
|
|
8
8
|
PipelineSecrets
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-g95rbz83.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveMobileTargets
|
|
12
12
|
} from "./index-m9jj544v.js";
|
|
13
13
|
import {
|
|
14
14
|
WorkspaceExecutor
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-hw2eammf.js";
|
|
16
16
|
import {
|
|
17
17
|
AppExecutor2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-4279crca.js";
|
|
19
19
|
import {
|
|
20
20
|
NativeApp
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-qrh7kdb1.js";
|
|
22
22
|
import {
|
|
23
23
|
runner,
|
|
24
24
|
assertPromptable
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-bbd1727m.js";
|
|
26
26
|
import {
|
|
27
27
|
getNpmRegistryUrl,
|
|
28
28
|
getPublishedVersions,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AppExecutor2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-4279crca.js";
|
|
5
5
|
import {
|
|
6
6
|
LibExecutor2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-gkfpqdm8.js";
|
|
8
8
|
import {
|
|
9
9
|
createAst,
|
|
10
10
|
AkanIndex
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-a42cf737.js";
|
|
12
12
|
import {
|
|
13
13
|
sysNamePattern,
|
|
14
14
|
identifierPattern
|
|
15
15
|
} from "./index-va90m8nd.js";
|
|
16
16
|
import {
|
|
17
17
|
camelToKebabCase
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-bbd1727m.js";
|
|
19
19
|
|
|
20
20
|
// pkgs/@akanjs/devkit/workflow/artifacts.ts
|
|
21
21
|
import { capitalize as capitalize2 } from "akanjs/common";
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-bbd1727m.js";
|
|
6
6
|
import {
|
|
7
7
|
CommandExecutionError,
|
|
8
8
|
LibSource,
|
|
9
9
|
formatLibStatuses
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-hw2eammf.js";
|
|
11
11
|
import {
|
|
12
12
|
LibExecutor2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-gkfpqdm8.js";
|
|
14
14
|
import {
|
|
15
15
|
assertPlainName
|
|
16
16
|
} from "./index-va90m8nd.js";
|