@akanjs/cli 3.0.0-alpha.75 → 3.0.0-alpha.76
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/{agent.command-z0cam80t.js → agent.command-j4744bct.js} +6 -6
- package/{application.command-2dct57za.js → application.command-1sq0zwqx.js} +5 -5
- package/{applicationBuildRunner-ds8acdfz.js → applicationBuildRunner-8tqhxjd0.js} +2 -2
- package/buildBatch.proc.js +3 -3
- package/{capacitorApp-md7dnt25.js → capacitorApp-nqnvsbv2.js} +3 -3
- package/{cloud.command-8j7xrxsm.js → cloud.command-ajkhg234.js} +8 -8
- package/{context.command-xjf4y7em.js → context.command-jxga9cc9.js} +13 -13
- package/{guideline.command-yzm0qevv.js → guideline.command-2fts4m5x.js} +3 -3
- package/incrementalBuilder.proc.js +2 -2
- package/{index-h9cybjep.js → index-004ah39s.js} +1 -1
- package/{index-eed7vc38.js → index-0zabybjx.js} +10 -10
- package/{index-a341yqdh.js → index-120pzxb2.js} +3 -3
- package/{index-61x7qthy.js → index-25qfm3at.js} +1123 -1172
- package/{index-9gqzgfsd.js → index-2j5xrm1c.js} +2 -2
- package/{index-hvbdre8z.js → index-3qa4f4j7.js} +2 -2
- package/{index-te6r1b79.js → index-5yxz0zzc.js} +3 -3
- package/{index-akz5xvyw.js → index-6wsjpt7b.js} +1 -1
- package/{index-116w1dap.js → index-85rdqkfx.js} +3 -3
- package/{index-bmz9crym.js → index-aczwndks.js} +2 -2
- package/{index-q0s2dp3y.js → index-aevn8b0n.js} +1 -1
- package/{index-f39512t6.js → index-dp66vwr6.js} +117 -24
- package/{index-q13s3e01.js → index-j8rp2kdv.js} +3 -3
- package/{index-763h7h9g.js → index-mk1x6sad.js} +1 -1
- package/{index-ym9g9ggs.js → index-mpka7dq4.js} +1 -1
- package/{index-z52nhkjs.js → index-peg7zphh.js} +4 -4
- package/{index-y3wyqcsp.js → index-qgzzz44h.js} +5 -5
- package/{index-qge1hc70.js → index-qhy7zdmz.js} +2 -2
- package/{index-vrra4ttx.js → index-v6p94mz1.js} +4 -4
- package/{index-5r4e65hb.js → index-yzsp0jgb.js} +5 -5
- package/index.js +19 -19
- package/{library.command-w8b53vtt.js → library.command-tfkfhbcb.js} +4 -4
- package/{localRegistry.command-ymrgda7e.js → localRegistry.command-rhn2mh9j.js} +7 -7
- package/{module.command-7pje37dv.js → module.command-29xg1kzr.js} +6 -6
- package/{package.command-jg4qk8ts.js → package.command-j6yn5c7h.js} +4 -4
- package/package.json +2 -2
- package/{page.command-abbpj96j.js → page.command-vgxetvga.js} +4 -4
- package/{primitive.command-jw4yv918.js → primitive.command-k85cvm2z.js} +7 -7
- package/{quality.command-06j6qy6n.js → quality.command-9dsv2jw7.js} +3 -3
- package/{repair.command-x6resn10.js → repair.command-mzdh4yby.js} +6 -6
- package/{scalar.command-mj2vx6rj.js → scalar.command-0cgq46dj.js} +5 -5
- package/{workflow.command-pmw2tere.js → workflow.command-2yxpvpg3.js} +10 -10
- package/{workspace.command-x32k2vma.js → workspace.command-42yrde58.js} +19 -19
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
createPassedPrimitiveReport,
|
|
10
10
|
generatedFilesForSync,
|
|
11
11
|
scalarChangedFiles
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-aevn8b0n.js";
|
|
13
13
|
import {
|
|
14
14
|
Prompter
|
|
15
15
|
} from "./index-k7731a4v.js";
|
|
16
16
|
import {
|
|
17
17
|
runner,
|
|
18
18
|
script
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-6wsjpt7b.js";
|
|
20
20
|
|
|
21
21
|
// pkgs/@akanjs/cli/scalar/scalar.prompt.ts
|
|
22
22
|
import { input } from "@inquirer/prompts";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-6wsjpt7b.js";
|
|
6
6
|
import {
|
|
7
7
|
LibExecutor
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-004ah39s.js";
|
|
9
9
|
|
|
10
10
|
// pkgs/@akanjs/cli/semver.ts
|
|
11
11
|
var stripRangeOperator = (version) => version.replace(/^[\s^~>=<v]+/, "").trim();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AkanContextAnalyzer
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-aczwndks.js";
|
|
5
5
|
import {
|
|
6
6
|
Prompter
|
|
7
7
|
} from "./index-k7731a4v.js";
|
|
8
8
|
import {
|
|
9
9
|
runner,
|
|
10
10
|
script
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-6wsjpt7b.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT_BLOCK_END,
|
|
14
14
|
AGENT_BLOCK_START,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
renderRecipeEntries,
|
|
20
20
|
stampBlockVersion,
|
|
21
21
|
upsertAgentBlock
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-004ah39s.js";
|
|
23
23
|
import {
|
|
24
24
|
collectRecipeSources,
|
|
25
25
|
scanRecipes
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
} from "./index-safgeq9a.js";
|
|
8
8
|
import {
|
|
9
9
|
openBrowser
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-yzsp0jgb.js";
|
|
11
11
|
import {
|
|
12
12
|
runner
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-6wsjpt7b.js";
|
|
14
14
|
import {
|
|
15
15
|
AppExecutor,
|
|
16
16
|
WorkspaceExecutor
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-004ah39s.js";
|
|
18
18
|
|
|
19
19
|
// pkgs/@akanjs/cli/npmRegistry.ts
|
|
20
20
|
var defaultNpmRegistry = "https://registry.npmjs.org";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
workflowRunArtifactPath,
|
|
4
4
|
workflowSyncDir
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-aevn8b0n.js";
|
|
6
6
|
import {
|
|
7
7
|
AppExecutor,
|
|
8
8
|
LibExecutor,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
readDevkitVersion,
|
|
12
12
|
rootAllowedDirs,
|
|
13
13
|
rootAllowedFiles
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-004ah39s.js";
|
|
15
15
|
import {
|
|
16
16
|
collectRecipeSources,
|
|
17
17
|
findInlineRecipeDuplicates,
|
|
@@ -1,19 +1,102 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
__require
|
|
4
|
+
} from "./index-yb2wsc7f.js";
|
|
5
|
+
|
|
2
6
|
// pkgs/@akanjs/devkit/artifact/implicitRootLayout.ts
|
|
3
7
|
import { mkdir } from "fs/promises";
|
|
8
|
+
import path2 from "path";
|
|
9
|
+
|
|
10
|
+
// pkgs/@akanjs/devkit/transforms/asyncDefaultExportDetector.ts
|
|
11
|
+
import fs from "fs";
|
|
4
12
|
import path from "path";
|
|
13
|
+
|
|
14
|
+
class AsyncDefaultExportDetector {
|
|
15
|
+
static #typescriptLoad;
|
|
16
|
+
static #loadTypescript() {
|
|
17
|
+
AsyncDefaultExportDetector.#typescriptLoad ??= import("typescript").then((mod) => mod.default ?? mod);
|
|
18
|
+
return AsyncDefaultExportDetector.#typescriptLoad;
|
|
19
|
+
}
|
|
20
|
+
static async detect(moduleAbsPath) {
|
|
21
|
+
try {
|
|
22
|
+
const typescript = await AsyncDefaultExportDetector.#loadTypescript();
|
|
23
|
+
const source = fs.readFileSync(path.resolve(moduleAbsPath), "utf8");
|
|
24
|
+
const sourceFile = typescript.createSourceFile(moduleAbsPath, source, typescript.ScriptTarget.Latest, true, AsyncDefaultExportDetector.#scriptKind(typescript, moduleAbsPath));
|
|
25
|
+
return new AsyncDefaultExportDetector(typescript).detectInSourceFile(sourceFile);
|
|
26
|
+
} catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
#ts;
|
|
31
|
+
constructor(typescript) {
|
|
32
|
+
this.#ts = typescript;
|
|
33
|
+
}
|
|
34
|
+
detectInSourceFile(sourceFile) {
|
|
35
|
+
const ts = this.#ts;
|
|
36
|
+
const asyncBindings = new Map;
|
|
37
|
+
let defaultIdentifier = null;
|
|
38
|
+
for (const statement of sourceFile.statements) {
|
|
39
|
+
if (ts.isFunctionDeclaration(statement)) {
|
|
40
|
+
if (this.#hasModifier(statement, ts.SyntaxKind.DefaultKeyword)) {
|
|
41
|
+
return this.#hasModifier(statement, ts.SyntaxKind.AsyncKeyword);
|
|
42
|
+
}
|
|
43
|
+
if (statement.name) {
|
|
44
|
+
asyncBindings.set(statement.name.text, this.#hasModifier(statement, ts.SyntaxKind.AsyncKeyword));
|
|
45
|
+
}
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (ts.isVariableStatement(statement)) {
|
|
49
|
+
for (const declaration of statement.declarationList.declarations) {
|
|
50
|
+
if (!ts.isIdentifier(declaration.name))
|
|
51
|
+
continue;
|
|
52
|
+
asyncBindings.set(declaration.name.text, this.#isAsyncFunctionExpression(declaration.initializer));
|
|
53
|
+
}
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (ts.isExportAssignment(statement)) {
|
|
57
|
+
if (this.#isAsyncFunctionExpression(statement.expression))
|
|
58
|
+
return true;
|
|
59
|
+
if (ts.isIdentifier(statement.expression))
|
|
60
|
+
defaultIdentifier = statement.expression.text;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (ts.isExportDeclaration(statement) && statement.exportClause && ts.isNamedExports(statement.exportClause)) {
|
|
64
|
+
const exportClause = statement.exportClause;
|
|
65
|
+
for (const specifier of exportClause.elements) {
|
|
66
|
+
if (specifier.name.text !== "default")
|
|
67
|
+
continue;
|
|
68
|
+
defaultIdentifier = specifier.propertyName?.text ?? specifier.name.text;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return defaultIdentifier ? asyncBindings.get(defaultIdentifier) === true : false;
|
|
73
|
+
}
|
|
74
|
+
#hasModifier(node, kind) {
|
|
75
|
+
const ts = this.#ts;
|
|
76
|
+
return ts.canHaveModifiers(node) && (ts.getModifiers(node)?.some((modifier) => modifier.kind === kind) ?? false);
|
|
77
|
+
}
|
|
78
|
+
#isAsyncFunctionExpression(node) {
|
|
79
|
+
const ts = this.#ts;
|
|
80
|
+
return Boolean(node && (ts.isArrowFunction(node) || ts.isFunctionExpression(node)) && this.#hasModifier(node, ts.SyntaxKind.AsyncKeyword));
|
|
81
|
+
}
|
|
82
|
+
static #scriptKind(typescript, moduleAbsPath) {
|
|
83
|
+
return moduleAbsPath.endsWith(".tsx") || moduleAbsPath.endsWith(".jsx") ? typescript.ScriptKind.TSX : typescript.ScriptKind.TS;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// pkgs/@akanjs/devkit/artifact/implicitRootLayout.ts
|
|
5
88
|
var LAYOUT_KEY_RE = /^\.\/(.+\/)?_layout\.(tsx|ts|jsx|js)$/;
|
|
6
89
|
async function appHasStModule(appCwdPath) {
|
|
7
|
-
return Bun.file(
|
|
90
|
+
return Bun.file(path2.join(appCwdPath, "lib", "st.ts")).exists();
|
|
8
91
|
}
|
|
9
|
-
var IMPLICIT_LAYOUT_DIR =
|
|
10
|
-
var IMPLICIT_DICT_DIR =
|
|
11
|
-
var IMPLICIT_OVERRIDES_DIR =
|
|
92
|
+
var IMPLICIT_LAYOUT_DIR = path2.join(".akan", "generated", "root-layouts");
|
|
93
|
+
var IMPLICIT_DICT_DIR = path2.join(".akan", "generated", "dict");
|
|
94
|
+
var IMPLICIT_OVERRIDES_DIR = path2.join(".akan", "generated", "overrides");
|
|
12
95
|
var OVERRIDES_KEY_RE = /^\.\/(.+\/)?_overrides\.(tsx|ts|jsx|js)$/;
|
|
13
96
|
async function writeGeneratedOverridesLayoutFile(opts) {
|
|
14
97
|
const filename = `${opts.key.replace(/^\.\//, "").replace(/[^a-zA-Z0-9]+/g, "_")}.tsx`;
|
|
15
|
-
const absPath =
|
|
16
|
-
const userRel =
|
|
98
|
+
const absPath = path2.join(path2.resolve(opts.appCwdPath), IMPLICIT_OVERRIDES_DIR, filename);
|
|
99
|
+
const userRel = path2.relative(path2.dirname(absPath), opts.userAbsPath).split(path2.sep).join("/");
|
|
17
100
|
const userSpecifier = userRel.startsWith(".") ? userRel : `./${userRel}`;
|
|
18
101
|
const source = `"use client";
|
|
19
102
|
import { UiOverrideProvider } from "akanjs/ui";
|
|
@@ -41,10 +124,10 @@ function implicitRootLayoutKey(segments) {
|
|
|
41
124
|
}
|
|
42
125
|
function implicitRootLayoutAbsPath(appCwdPath, segments) {
|
|
43
126
|
const filename = segments.length ? `${segments.join("__")}__root_layout.tsx` : "__root_layout.tsx";
|
|
44
|
-
return
|
|
127
|
+
return path2.join(path2.resolve(appCwdPath), IMPLICIT_LAYOUT_DIR, filename);
|
|
45
128
|
}
|
|
46
129
|
function implicitDictionaryMacroAbsPath(appCwdPath) {
|
|
47
|
-
return
|
|
130
|
+
return path2.join(path2.resolve(appCwdPath), IMPLICIT_DICT_DIR, "useDict.ts");
|
|
48
131
|
}
|
|
49
132
|
function isRootBoundarySegments(segments, basePaths) {
|
|
50
133
|
const firstVisibleIndex = segments.findIndex((segment) => !/^\(.+\)$/.test(segment));
|
|
@@ -67,7 +150,7 @@ function findRootBoundaries(pageKeys, appCwdPath, basePaths) {
|
|
|
67
150
|
const id = segments.join("/");
|
|
68
151
|
boundaries.set(id, {
|
|
69
152
|
sourceKey: key,
|
|
70
|
-
sourceAbsPath:
|
|
153
|
+
sourceAbsPath: path2.resolve(appCwdPath, "page", key.replace(/^\.\//, "")),
|
|
71
154
|
segments
|
|
72
155
|
});
|
|
73
156
|
}
|
|
@@ -85,21 +168,21 @@ function findExplicitRootLayoutAbsPath(pageKeys, appCwdPath) {
|
|
|
85
168
|
const segments = getRootBoundarySegments(key);
|
|
86
169
|
return segments !== null && segments.length === 0;
|
|
87
170
|
});
|
|
88
|
-
return rootLayoutKey ?
|
|
171
|
+
return rootLayoutKey ? path2.resolve(appCwdPath, "page", rootLayoutKey.replace(/^\.\//, "")) : null;
|
|
89
172
|
}
|
|
90
173
|
function routePrefixForSegments(segments) {
|
|
91
174
|
const visible = segments.filter((segment) => !/^\(.+\)$/.test(segment));
|
|
92
175
|
return visible[0] ?? null;
|
|
93
176
|
}
|
|
94
177
|
async function assertEnvClientConvention(appCwdPath, appName) {
|
|
95
|
-
const envPath =
|
|
178
|
+
const envPath = path2.join(appCwdPath, "env", "env.client.ts");
|
|
96
179
|
if (!await Bun.file(envPath).exists()) {
|
|
97
180
|
throw new Error(`[route-convention] app "${appName}" must provide env/env.client.ts exporting "env" for generated System.Provider`);
|
|
98
181
|
}
|
|
99
182
|
}
|
|
100
183
|
async function writeGeneratedDictionaryMacroFile(appCwdPath, appName) {
|
|
101
184
|
const absPath = implicitDictionaryMacroAbsPath(appCwdPath);
|
|
102
|
-
await mkdir(
|
|
185
|
+
await mkdir(path2.dirname(absPath), { recursive: true });
|
|
103
186
|
await Bun.write(absPath, `import { getAllDictionary } from "@apps/${appName}/lib/dict" with { type: "macro" };
|
|
104
187
|
|
|
105
188
|
export const allDictionary = getAllDictionary();
|
|
@@ -110,13 +193,13 @@ async function writeGeneratedRootLayoutFile(opts) {
|
|
|
110
193
|
await assertEnvClientConvention(opts.appCwdPath, opts.appName);
|
|
111
194
|
const dictMacroAbsPath = opts.includeSystemProvider ? await writeGeneratedDictionaryMacroFile(opts.appCwdPath, opts.appName) : null;
|
|
112
195
|
const absPath = implicitRootLayoutAbsPath(opts.appCwdPath, opts.boundary.segments);
|
|
113
|
-
await mkdir(
|
|
114
|
-
const dictMacroRel = dictMacroAbsPath ?
|
|
196
|
+
await mkdir(path2.dirname(absPath), { recursive: true });
|
|
197
|
+
const dictMacroRel = dictMacroAbsPath ? path2.relative(path2.dirname(absPath), dictMacroAbsPath).split(path2.sep).join("/") : null;
|
|
115
198
|
const dictMacroSpecifier = dictMacroRel ? dictMacroRel.startsWith(".") ? dictMacroRel : `./${dictMacroRel}` : null;
|
|
116
|
-
const sourceRel = opts.boundary.sourceAbsPath ?
|
|
199
|
+
const sourceRel = opts.boundary.sourceAbsPath ? path2.relative(path2.dirname(absPath), opts.boundary.sourceAbsPath).split(path2.sep).join("/") : null;
|
|
117
200
|
const sourceSpecifier = sourceRel ? sourceRel.startsWith(".") ? sourceRel : `./${sourceRel}` : null;
|
|
118
201
|
const inheritedSourceAbsPath = opts.rootSourceAbsPath && opts.rootSourceAbsPath !== opts.boundary.sourceAbsPath ? opts.rootSourceAbsPath : null;
|
|
119
|
-
const inheritedSourceRel = inheritedSourceAbsPath ?
|
|
202
|
+
const inheritedSourceRel = inheritedSourceAbsPath ? path2.relative(path2.dirname(absPath), inheritedSourceAbsPath).split(path2.sep).join("/") : null;
|
|
120
203
|
const inheritedSourceSpecifier = inheritedSourceRel ? inheritedSourceRel.startsWith(".") ? inheritedSourceRel : `./${inheritedSourceRel}` : null;
|
|
121
204
|
const clientImport = opts.includeStInit ? `import { st } from "@apps/${opts.appName}/client";
|
|
122
205
|
void st;
|
|
@@ -130,6 +213,16 @@ void st;
|
|
|
130
213
|
` : `const UserLayout = ({ children }) => children;
|
|
131
214
|
const userLayout = {};
|
|
132
215
|
`;
|
|
216
|
+
const isAsyncUserLayout = opts.boundary.sourceAbsPath ? await AsyncDefaultExportDetector.detect(opts.boundary.sourceAbsPath) : false;
|
|
217
|
+
const userLayoutElement = "<UserLayout params={params} searchParams={searchParams}>{children}</UserLayout>";
|
|
218
|
+
const layoutSignature = isAsyncUserLayout ? "export default async function GeneratedLayout" : "export default function GeneratedLayout";
|
|
219
|
+
const layoutBinding = isAsyncUserLayout ? ` const layout =
|
|
220
|
+
process.env.AKAN_PUBLIC_RENDER_ENV === "csr"
|
|
221
|
+
? await UserLayout({ params, searchParams, children })
|
|
222
|
+
: ${userLayoutElement};
|
|
223
|
+
` : "";
|
|
224
|
+
const layoutChild = isAsyncUserLayout ? "{layout}" : userLayoutElement;
|
|
225
|
+
const layoutReturn = isAsyncUserLayout ? "layout" : userLayoutElement;
|
|
133
226
|
const source = opts.includeSystemProvider ? `import type { LayoutProps, PageProps } from "akanjs/client";
|
|
134
227
|
import { loadFonts } from "akanjs/client";
|
|
135
228
|
import { System } from "akanjs/ui";
|
|
@@ -160,8 +253,8 @@ export const NotFound = userLayout.NotFound ?? inheritedLayout.NotFound;
|
|
|
160
253
|
export const Error = userLayout.Error ?? inheritedLayout.Error;
|
|
161
254
|
export const pageConfig = userLayout.pageConfig ?? inheritedLayout.pageConfig;
|
|
162
255
|
|
|
163
|
-
|
|
164
|
-
return (
|
|
256
|
+
${layoutSignature}({ children, params, searchParams }: LayoutProps) {
|
|
257
|
+
${layoutBinding} return (
|
|
165
258
|
<System.Provider
|
|
166
259
|
of={GeneratedLayout as never}
|
|
167
260
|
appName=${JSON.stringify(opts.appName)}
|
|
@@ -178,7 +271,7 @@ export default function GeneratedLayout({ children, params, searchParams }: Layo
|
|
|
178
271
|
wsConnect={userLayout.wsConnect ?? inheritedLayout.wsConnect ?? true}
|
|
179
272
|
allDictionary={process.env.AKAN_PUBLIC_RENDER_ENV === "ssr" ? allDictionary : undefined}
|
|
180
273
|
>
|
|
181
|
-
|
|
274
|
+
${layoutChild}
|
|
182
275
|
</System.Provider>
|
|
183
276
|
);
|
|
184
277
|
}
|
|
@@ -202,15 +295,15 @@ export const NotFound = userLayout.NotFound ?? inheritedLayout.NotFound;
|
|
|
202
295
|
export const Error = userLayout.Error ?? inheritedLayout.Error;
|
|
203
296
|
export const pageConfig = userLayout.pageConfig ?? inheritedLayout.pageConfig;
|
|
204
297
|
|
|
205
|
-
|
|
206
|
-
return
|
|
298
|
+
${layoutSignature}({ children, params, searchParams }: LayoutProps) {
|
|
299
|
+
${layoutBinding} return ${layoutReturn};
|
|
207
300
|
}
|
|
208
301
|
`;
|
|
209
302
|
await Bun.write(absPath, source);
|
|
210
303
|
return absPath;
|
|
211
304
|
}
|
|
212
305
|
async function resolveSsrPageEntries(opts) {
|
|
213
|
-
const absPageDir =
|
|
306
|
+
const absPageDir = path2.resolve(opts.appCwdPath, "page");
|
|
214
307
|
const hasSt = await appHasStModule(opts.appCwdPath);
|
|
215
308
|
const basePaths = opts.basePaths ?? [];
|
|
216
309
|
const rootSourceAbsPath = findExplicitRootLayoutAbsPath(opts.pageKeys, opts.appCwdPath);
|
|
@@ -220,7 +313,7 @@ async function resolveSsrPageEntries(opts) {
|
|
|
220
313
|
return segments !== null && isRootBoundarySegments(segments, basePaths);
|
|
221
314
|
}));
|
|
222
315
|
const base = await Promise.all(opts.pageKeys.filter((key) => !rootLayoutKeys.has(key)).map(async (key) => {
|
|
223
|
-
const userAbsPath =
|
|
316
|
+
const userAbsPath = path2.resolve(absPageDir, key);
|
|
224
317
|
if (OVERRIDES_KEY_RE.test(key)) {
|
|
225
318
|
const moduleAbsPath = await writeGeneratedOverridesLayoutFile({
|
|
226
319
|
appCwdPath: opts.appCwdPath,
|
|
@@ -252,4 +345,4 @@ async function resolveSsrPageEntriesForApp(app, pageKeys) {
|
|
|
252
345
|
return resolveSsrPageEntries({ appCwdPath: app.cwdPath, appName: app.name, pageKeys, basePaths: config.basePaths });
|
|
253
346
|
}
|
|
254
347
|
|
|
255
|
-
export { getRootBoundarySegments, isRootBoundarySegments, resolveSsrPageEntriesForApp };
|
|
348
|
+
export { AsyncDefaultExportDetector, getRootBoundarySegments, isRootBoundarySegments, resolveSsrPageEntriesForApp };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AkanContextAnalyzer
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-aczwndks.js";
|
|
5
5
|
import {
|
|
6
6
|
createRepairReport,
|
|
7
7
|
generatedFilePathsForTarget,
|
|
8
8
|
renderRepairReport,
|
|
9
9
|
writeGeneratedSyncState,
|
|
10
10
|
writeWorkflowRunArtifact
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-aevn8b0n.js";
|
|
12
12
|
import {
|
|
13
13
|
runner
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-6wsjpt7b.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/repair/repair.runner.ts
|
|
17
17
|
var commandForShell = (command) => command.startsWith("akan ") ? `bun run ${command}` : command;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ModuleScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-v6p94mz1.js";
|
|
5
5
|
import {
|
|
6
6
|
addFieldUiPolicyForType,
|
|
7
7
|
coerceFieldDefault,
|
|
@@ -34,15 +34,15 @@ import {
|
|
|
34
34
|
sourceFile,
|
|
35
35
|
validationCommandsForTarget,
|
|
36
36
|
viaBuilderParameterName
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-aevn8b0n.js";
|
|
38
38
|
import {
|
|
39
39
|
script
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-6wsjpt7b.js";
|
|
41
41
|
import {
|
|
42
42
|
AppExecutor,
|
|
43
43
|
LibExecutor,
|
|
44
44
|
ModuleExecutor
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-004ah39s.js";
|
|
46
46
|
|
|
47
47
|
// pkgs/@akanjs/cli/primitive/primitive.script.ts
|
|
48
48
|
import { capitalize } from "akanjs/common";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
CloudRunner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-85rdqkfx.js";
|
|
5
5
|
import {
|
|
6
6
|
PackageScript
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-qhy7zdmz.js";
|
|
8
8
|
import {
|
|
9
9
|
AiSession,
|
|
10
10
|
CloudApi,
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
} from "./index-safgeq9a.js";
|
|
13
13
|
import {
|
|
14
14
|
ApplicationScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-yzsp0jgb.js";
|
|
16
16
|
import {
|
|
17
17
|
script
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-6wsjpt7b.js";
|
|
19
19
|
import {
|
|
20
20
|
PkgExecutor
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-004ah39s.js";
|
|
22
22
|
|
|
23
23
|
// pkgs/@akanjs/cli/cloud/cloud.script.ts
|
|
24
24
|
import { Logger } from "akanjs/common";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-6wsjpt7b.js";
|
|
6
6
|
import {
|
|
7
7
|
PkgExecutor
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-004ah39s.js";
|
|
9
9
|
import {
|
|
10
10
|
TypeScriptDependencyScanner
|
|
11
11
|
} from "./index-h5sr2nnj.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./index-ss469dec.js";
|
|
5
5
|
import {
|
|
6
6
|
PageScript
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-mk1x6sad.js";
|
|
8
8
|
import {
|
|
9
9
|
AiSession
|
|
10
10
|
} from "./index-safgeq9a.js";
|
|
@@ -15,17 +15,17 @@ import {
|
|
|
15
15
|
generatedFilesForSync,
|
|
16
16
|
moduleSourcePaths,
|
|
17
17
|
sourceFile
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-aevn8b0n.js";
|
|
19
19
|
import {
|
|
20
20
|
Prompter
|
|
21
21
|
} from "./index-k7731a4v.js";
|
|
22
22
|
import {
|
|
23
23
|
runner,
|
|
24
24
|
script
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-6wsjpt7b.js";
|
|
26
26
|
import {
|
|
27
27
|
ModuleExecutor
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-004ah39s.js";
|
|
29
29
|
import {
|
|
30
30
|
FileSys
|
|
31
31
|
} from "./index-67546d0j.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
LibraryScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-3qa4f4j7.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveMobileTargets
|
|
7
7
|
} from "./index-76rn3g2c.js";
|
|
8
8
|
import {
|
|
9
9
|
runner,
|
|
10
10
|
script
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-6wsjpt7b.js";
|
|
12
12
|
import {
|
|
13
13
|
HmrWatcher,
|
|
14
14
|
WatchRootResolver
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
LibExecutor,
|
|
19
19
|
PkgExecutor,
|
|
20
20
|
WorkspaceExecutor
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-004ah39s.js";
|
|
22
22
|
import {
|
|
23
23
|
__require
|
|
24
24
|
} from "./index-yb2wsc7f.js";
|
|
@@ -1915,9 +1915,9 @@ function openBrowser(url) {
|
|
|
1915
1915
|
}
|
|
1916
1916
|
|
|
1917
1917
|
// pkgs/@akanjs/cli/application/application.runner.ts
|
|
1918
|
-
var loadBuildRunner = async () => (await import("./applicationBuildRunner-
|
|
1918
|
+
var loadBuildRunner = async () => (await import("./applicationBuildRunner-8tqhxjd0.js")).ApplicationBuildRunner;
|
|
1919
1919
|
var loadReleasePackager = async () => (await import("./applicationReleasePackager-0jf6ejr4.js")).ApplicationReleasePackager;
|
|
1920
|
-
var loadCapacitorApp = async () => (await import("./capacitorApp-
|
|
1920
|
+
var loadCapacitorApp = async () => (await import("./capacitorApp-nqnvsbv2.js")).CapacitorApp;
|
|
1921
1921
|
var loadAbstractCompactor = async () => (await import("./abstractCompactor-8yjc9sj4.js")).AbstractCompactor;
|
|
1922
1922
|
var loadPrompts = async () => await import("@inquirer/prompts");
|
|
1923
1923
|
|
package/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
getTargetCommandNames,
|
|
5
5
|
getTargetMetas,
|
|
6
6
|
runCommands
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
7
|
+
} from "./index-6wsjpt7b.js";
|
|
8
|
+
import"./index-004ah39s.js";
|
|
9
|
+
import"./index-dp66vwr6.js";
|
|
10
10
|
import"./index-mxvakhsm.js";
|
|
11
11
|
import"./index-1577bej2.js";
|
|
12
12
|
import"./index-67546d0j.js";
|
|
@@ -19,22 +19,22 @@ import path from "path";
|
|
|
19
19
|
|
|
20
20
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
21
21
|
var commandModules = {
|
|
22
|
-
workspace: async () => (await import("./workspace.command-
|
|
23
|
-
agent: async () => (await import("./agent.command-
|
|
24
|
-
application: async () => (await import("./application.command-
|
|
25
|
-
library: async () => (await import("./library.command-
|
|
26
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
27
|
-
package: async () => (await import("./package.command-
|
|
28
|
-
module: async () => (await import("./module.command-
|
|
29
|
-
page: async () => (await import("./page.command-
|
|
30
|
-
context: async () => (await import("./context.command-
|
|
31
|
-
cloud: async () => (await import("./cloud.command-
|
|
32
|
-
guideline: async () => (await import("./guideline.command-
|
|
33
|
-
scalar: async () => (await import("./scalar.command-
|
|
34
|
-
primitive: async () => (await import("./primitive.command-
|
|
35
|
-
quality: async () => (await import("./quality.command-
|
|
36
|
-
repair: async () => (await import("./repair.command-
|
|
37
|
-
workflow: async () => (await import("./workflow.command-
|
|
22
|
+
workspace: async () => (await import("./workspace.command-42yrde58.js")).WorkspaceCommand,
|
|
23
|
+
agent: async () => (await import("./agent.command-j4744bct.js")).AgentCommand,
|
|
24
|
+
application: async () => (await import("./application.command-1sq0zwqx.js")).ApplicationCommand,
|
|
25
|
+
library: async () => (await import("./library.command-tfkfhbcb.js")).LibraryCommand,
|
|
26
|
+
localRegistry: async () => (await import("./localRegistry.command-rhn2mh9j.js")).LocalRegistryCommand,
|
|
27
|
+
package: async () => (await import("./package.command-j6yn5c7h.js")).PackageCommand,
|
|
28
|
+
module: async () => (await import("./module.command-29xg1kzr.js")).ModuleCommand,
|
|
29
|
+
page: async () => (await import("./page.command-vgxetvga.js")).PageCommand,
|
|
30
|
+
context: async () => (await import("./context.command-jxga9cc9.js")).ContextCommand,
|
|
31
|
+
cloud: async () => (await import("./cloud.command-ajkhg234.js")).CloudCommand,
|
|
32
|
+
guideline: async () => (await import("./guideline.command-2fts4m5x.js")).GuidelineCommand,
|
|
33
|
+
scalar: async () => (await import("./scalar.command-0cgq46dj.js")).ScalarCommand,
|
|
34
|
+
primitive: async () => (await import("./primitive.command-k85cvm2z.js")).PrimitiveCommand,
|
|
35
|
+
quality: async () => (await import("./quality.command-9dsv2jw7.js")).QualityCommand,
|
|
36
|
+
repair: async () => (await import("./repair.command-mzdh4yby.js")).RepairCommand,
|
|
37
|
+
workflow: async () => (await import("./workflow.command-2yxpvpg3.js")).WorkflowCommand
|
|
38
38
|
};
|
|
39
39
|
var commandModuleIds = Object.keys(commandModules);
|
|
40
40
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
LibraryScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-3qa4f4j7.js";
|
|
5
5
|
import {
|
|
6
6
|
Lib,
|
|
7
7
|
Workspace,
|
|
8
8
|
command
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
9
|
+
} from "./index-6wsjpt7b.js";
|
|
10
|
+
import"./index-004ah39s.js";
|
|
11
|
+
import"./index-dp66vwr6.js";
|
|
12
12
|
import"./index-mxvakhsm.js";
|
|
13
13
|
import"./index-1577bej2.js";
|
|
14
14
|
import"./index-67546d0j.js";
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CloudRunner,
|
|
4
4
|
getNpmRegistryUrl
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-85rdqkfx.js";
|
|
6
6
|
import {
|
|
7
7
|
PackageScript
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-qhy7zdmz.js";
|
|
9
9
|
import"./index-safgeq9a.js";
|
|
10
10
|
import {
|
|
11
11
|
ApplicationScript
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
} from "./index-yzsp0jgb.js";
|
|
13
|
+
import"./index-3qa4f4j7.js";
|
|
14
14
|
import"./index-76rn3g2c.js";
|
|
15
15
|
import {
|
|
16
16
|
Workspace,
|
|
17
17
|
command,
|
|
18
18
|
runner,
|
|
19
19
|
script
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-6wsjpt7b.js";
|
|
21
21
|
import"./index-ynf37b66.js";
|
|
22
22
|
import"./index-5vy2jzar.js";
|
|
23
23
|
import {
|
|
24
24
|
PkgExecutor
|
|
25
|
-
} from "./index-
|
|
26
|
-
import"./index-
|
|
25
|
+
} from "./index-004ah39s.js";
|
|
26
|
+
import"./index-dp66vwr6.js";
|
|
27
27
|
import"./index-mxvakhsm.js";
|
|
28
28
|
import"./index-1577bej2.js";
|
|
29
29
|
import"./index-h5sr2nnj.js";
|