@akanjs/cli 3.2.1-rc.1 → 3.2.1-rc.2
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-xdw73nbz.js → CodeAgent-9t00vd1t.js} +2 -2
- package/{CodeTui-0gewm71c.js → CodeTui-6pzd57d9.js} +1 -1
- package/TunnelShare-ystnpd6r.js +16 -0
- package/{agent.command-g1mj34wz.js → agent.command-mx412p4j.js} +17 -17
- package/akanCode.js +2 -2
- package/{appExecutor-rrx10jya.js → appExecutor-5rqem8rw.js} +3 -3
- package/{application.command-3w4v7t40.js → application.command-6qec3fkg.js} +13 -13
- package/{applicationBuildRunner-y5xbetyz.js → applicationBuildRunner-3sgyp4kc.js} +13 -10
- package/buildBatch.proc.js +10 -10
- package/{cloud.command-ph0rz6sw.js → cloud.command-zcm1vwep.js} +18 -18
- package/cloud.script-zv6bxdvg.js +30 -0
- package/{code.command-9b967qpg.js → code.command-9ve10cys.js} +10 -10
- package/{context.command-ndzs5rbf.js → context.command-f1sqfvws.js} +18 -18
- package/context.runner-7d1zp6sp.js +32 -0
- package/{csrArtifactBuilder-gtvff6k7.js → csrArtifactBuilder-9zvt4tqd.js} +2 -3
- package/{guideline.command-y8qz9kxy.js → guideline.command-6rezhb4j.js} +6 -6
- package/guidelines/akanApi/akanApi.instruction.md +7 -2
- package/guidelines/conventions/core.md +6 -11
- package/guidelines/conventions/rules/app.md +1 -2
- package/guidelines/conventions/rules/auth.md +18 -27
- package/guidelines/conventions/rules/config.md +14 -46
- package/guidelines/conventions/rules/page.md +19 -34
- package/guidelines/conventions/rules/server.md +1 -4
- package/guidelines/conventions/rules/ssr.md +3 -4
- package/guidelines/conventions/rules/ts.md +2 -1
- package/guidelines/cssRule/cssRule.instruction.md +1 -0
- package/guidelines/pageRule/pageRule.instruction.md +6 -53
- package/incrementalBuilder.proc.js +8 -8
- package/{index-4a1n0nym.js → index-2fw81aak.js} +1 -1
- package/{index-whvhsb5f.js → index-2qhrmtb0.js} +1 -1
- package/{index-dr1carpr.js → index-3jzx6k0e.js} +4 -4
- package/{index-2kh4xj3m.js → index-5fwhv8kp.js} +1 -1
- package/{index-scfsqen7.js → index-6z5cwvq1.js} +3 -3
- package/{index-y2g0s9tn.js → index-7jknrhws.js} +1 -1
- package/{index-6j351de4.js → index-8vger8r0.js} +2 -2
- package/{index-1c2807kg.js → index-94a2xrv1.js} +3 -3
- package/{index-ymgsvhc5.js → index-adbcqv0k.js} +4 -4
- package/{index-45aprybg.js → index-akep88g2.js} +2 -2
- package/{index-652f3bs8.js → index-c1sfw20m.js} +5 -5
- package/{index-cm9rb480.js → index-c7zk1gtv.js} +5 -6
- package/{index-b0t92k71.js → index-cryyzd80.js} +11 -11
- package/{index-82cmbpxc.js → index-d9qkd87g.js} +7 -7
- package/{index-6gepp8yn.js → index-ep31fxe8.js} +60 -19
- package/{index-ankyx6dj.js → index-f0qe3x4t.js} +3 -3
- package/{index-38x8ynrx.js → index-f52d0acp.js} +2 -2
- package/{index-twjgmryg.js → index-f5s9w5bq.js} +4 -4
- package/{index-pc42gxa5.js → index-g4hta169.js} +4 -4
- package/{index-ktxdfqg5.js → index-gxe8nyxd.js} +1 -1
- package/{index-2vn0m9z5.js → index-h2g1qt9p.js} +3 -3
- package/{index-4zgm54wf.js → index-havp958b.js} +7 -7
- package/{index-qh81drde.js → index-mj9mzss7.js} +8 -8
- package/{index-3569fr49.js → index-nawk3ttc.js} +5 -5
- package/{index-0wa5z6rm.js → index-pad3djxk.js} +1 -1
- package/{index-gtydr9qc.js → index-q7ct22a1.js} +8 -8
- package/{index-0csk6jqm.js → index-qc4xk6ng.js} +3 -3
- package/{index-jdw9m5c4.js → index-qk2evkwr.js} +4 -4
- package/{index-b372rck5.js → index-smjm20t4.js} +14 -7
- package/{index-d0n78fzc.js → index-tc9k9sgg.js} +11 -11
- package/{index-jg5rwrf7.js → index-wjecpeyq.js} +226 -21
- package/{index-f2arv0mv.js → index-xftdwcdj.js} +1 -1
- package/{index-1p9bxjmt.js → index-xrmcq5hx.js} +2 -2
- package/{index-q8h4eg5y.js → index-y9tadrbb.js} +6 -6
- package/{index-02v45hh9.js → index-yjq1e8ge.js} +3 -3
- package/{index-9rymt8d6.js → index-yq1rfscr.js} +1 -1
- package/{index-0z8sbdme.js → index-zswfx1y8.js} +1 -1
- package/{index-mnhrqjjq.js → index-zxvw9wme.js} +1 -1
- package/index.js +27 -27
- package/{libExecutor-nstr00s7.js → libExecutor-6we2k5s7.js} +2 -2
- package/{library.command-b02aw1hm.js → library.command-3d276hfe.js} +7 -7
- package/{localRegistry.command-3hg1p4aj.js → localRegistry.command-0k4wbbw3.js} +17 -17
- package/{module.command-bd9gz6cv.js → module.command-2efp8hnc.js} +9 -9
- package/{package.command-xmr0mxze.js → package.command-jbmhv4ka.js} +8 -8
- package/package.json +3 -2
- package/{page.command-x94qf58g.js → page.command-bmn5mqg4.js} +7 -7
- package/{pipeline.command-n2843k6t.js → pipeline.command-wy27rp6n.js} +6 -6
- package/{pkgExecutor-cka27e3c.js → pkgExecutor-zg3p4wzh.js} +2 -2
- package/{primitive.command-cs7v376h.js → primitive.command-c1zhx2k0.js} +10 -10
- package/{projectTypecheck-za2n3nbr.js → projectTypecheck-2nrmqybz.js} +1 -1
- package/{quality.command-nqngh1jd.js → quality.command-s7k6hd9v.js} +8 -8
- package/{repair.command-v2medwsm.js → repair.command-whzxzzwt.js} +9 -9
- package/{scalar.command-61cjmxn1.js → scalar.command-9h6jj42g.js} +8 -8
- package/skills/akan-page/SKILL.md +18 -13
- package/skills/akan-runtime/SKILL.md +21 -16
- package/skills/akan-service/SKILL.md +2 -2
- package/{subspace.command-dtv8nfh7.js → subspace.command-n39bhv0c.js} +10 -10
- package/{tunnel.command-fmwm5fgb.js → tunnel.command-n5ezcmfs.js} +9 -9
- package/{verify.command-4f260t53.js → verify.command-c7xn9jkn.js} +14 -14
- package/{workflow.command-tm5q9xsm.js → workflow.command-7jf64z5f.js} +14 -14
- package/{workspace.command-75gc280j.js → workspace.command-h55z8b42.js} +31 -31
- package/TunnelShare-cccfdgbm.js +0 -16
- package/cloud.script-8bs9tp4j.js +0 -30
- package/context.runner-bmstpng2.js +0 -32
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
AkanAppConfig,
|
|
8
8
|
increaseBuildNum,
|
|
9
9
|
decreaseBuildNum
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-g4hta169.js";
|
|
11
11
|
import {
|
|
12
12
|
FileSys2
|
|
13
13
|
} from "./index-zyjztrvc.js";
|
|
14
14
|
import {
|
|
15
15
|
LibExecutor2
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-xftdwcdj.js";
|
|
17
17
|
|
|
18
18
|
// pkgs/@akanjs/devkit/executors/appExecutor.ts
|
|
19
19
|
import { cp as cpEntry, lstat, mkdir, readdir as readDirEntries, realpath, rm as rm2, stat, symlink } from "fs/promises";
|
|
@@ -409,6 +409,11 @@ class AppExecutor2 extends SysExecutor {
|
|
|
409
409
|
static from(executor, name) {
|
|
410
410
|
return new AppExecutor2({ workspace: executor instanceof WorkspaceExecutor ? executor : executor.workspace, name });
|
|
411
411
|
}
|
|
412
|
+
#verifyBuild = false;
|
|
413
|
+
useVerifyDist() {
|
|
414
|
+
this.dist = new Executor(`dist/verify/${this.name}`, `${this.workspace.workspaceRoot}/dist/verify/${this.name}`);
|
|
415
|
+
this.#verifyBuild = true;
|
|
416
|
+
}
|
|
412
417
|
static #keptOnStart = [path3.join(".akan", "cache")];
|
|
413
418
|
static #legacyNative = path3.join(".akan", "native");
|
|
414
419
|
async#removeDevOutput(dir = ".akan") {
|
|
@@ -486,11 +491,13 @@ class AppExecutor2 extends SysExecutor {
|
|
|
486
491
|
this.#excludeDevOnlyPages = true;
|
|
487
492
|
this.#pageKeys = null;
|
|
488
493
|
await this.dist.removeDir(this.dist.cwdPath);
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
+
if (!this.#verifyBuild) {
|
|
495
|
+
await Promise.all([this.dist.mkdir("private"), this.dist.mkdir("public")]);
|
|
496
|
+
await Promise.all([
|
|
497
|
+
this.cp("private", `${this.dist.cwdPath}/private`, { dereference: true }),
|
|
498
|
+
...akanConfig.web.ssr ? [this.cp("public", `${this.dist.cwdPath}/public`, { dereference: true })] : []
|
|
499
|
+
]);
|
|
500
|
+
}
|
|
494
501
|
} else {
|
|
495
502
|
await this.#removeDevOutput();
|
|
496
503
|
if (!akanConfig.web.ssr || !akanConfig.web.csr)
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
SysExecutor,
|
|
5
5
|
AppInfo,
|
|
6
6
|
WorkspaceExecutor
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-g4hta169.js";
|
|
8
8
|
import {
|
|
9
9
|
FileSys2
|
|
10
10
|
} from "./index-zyjztrvc.js";
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
} from "./index-j4yvgfhr.js";
|
|
14
14
|
import {
|
|
15
15
|
AppExecutor2
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-smjm20t4.js";
|
|
17
17
|
import {
|
|
18
18
|
LibExecutor2
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-xftdwcdj.js";
|
|
20
20
|
import {
|
|
21
21
|
PkgExecutor2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-zxvw9wme.js";
|
|
23
23
|
import {
|
|
24
24
|
UNAVAILABLE_REDIS_HOST,
|
|
25
25
|
redisTunnelPolicy,
|
|
@@ -55,27 +55,27 @@ import {
|
|
|
55
55
|
filesChangedSince,
|
|
56
56
|
HmrWatcher,
|
|
57
57
|
WatchRootResolver
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-8vger8r0.js";
|
|
59
59
|
import {
|
|
60
60
|
runner,
|
|
61
61
|
assertPromptable
|
|
62
|
-
} from "./index-
|
|
62
|
+
} from "./index-c1sfw20m.js";
|
|
63
63
|
import {
|
|
64
64
|
UpdatePackFolder,
|
|
65
65
|
UpdateUploader,
|
|
66
66
|
NativePublicEnv,
|
|
67
67
|
NativeApp
|
|
68
|
-
} from "./index-
|
|
68
|
+
} from "./index-adbcqv0k.js";
|
|
69
69
|
import {
|
|
70
70
|
DesktopServerStage
|
|
71
|
-
} from "./index-
|
|
71
|
+
} from "./index-5fwhv8kp.js";
|
|
72
72
|
import {
|
|
73
73
|
resolveMobileTargets,
|
|
74
74
|
resolveAppId
|
|
75
75
|
} from "./index-m9jj544v.js";
|
|
76
76
|
import {
|
|
77
77
|
SlicePlanner
|
|
78
|
-
} from "./index-
|
|
78
|
+
} from "./index-yq1rfscr.js";
|
|
79
79
|
import {
|
|
80
80
|
openBrowser
|
|
81
81
|
} from "./index-9dp031by.js";
|
|
@@ -2481,7 +2481,7 @@ var reportsNoTestFile = (exec) => {
|
|
|
2481
2481
|
};
|
|
2482
2482
|
|
|
2483
2483
|
// pkgs/@akanjs/cli/application/application.runner.ts
|
|
2484
|
-
var loadBuildRunner = async () => (await import("./applicationBuildRunner-
|
|
2484
|
+
var loadBuildRunner = async () => (await import("./applicationBuildRunner-3sgyp4kc.js")).ApplicationBuildRunner;
|
|
2485
2485
|
var loadPrompts = async () => await import("@inquirer/prompts");
|
|
2486
2486
|
|
|
2487
2487
|
class ApplicationRunner extends runner("application") {
|
|
@@ -2682,7 +2682,7 @@ if (loaded) process.exitCode = await loaded.migrations.command(loaded.server, ar
|
|
|
2682
2682
|
await new (await loadBuildRunner())(app).typecheck(options);
|
|
2683
2683
|
}
|
|
2684
2684
|
async typecheckLibrary(lib, options = {}) {
|
|
2685
|
-
const { ProjectTypecheck } = await import("./projectTypecheck-
|
|
2685
|
+
const { ProjectTypecheck } = await import("./projectTypecheck-2nrmqybz.js");
|
|
2686
2686
|
const root = lib.workspace.workspaceRoot;
|
|
2687
2687
|
await new ProjectTypecheck(lib.cwdPath, root, { ...process.env, AKAN_WORKSPACE_ROOT: root }).run([
|
|
2688
2688
|
"../../server.ts",
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ROOT_LAYOUT_SYSTEM,
|
|
4
4
|
isImplicitRootLayoutKey,
|
|
5
5
|
resolveSsrPageEntriesForApp
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-smjm20t4.js";
|
|
7
7
|
import {
|
|
8
8
|
computeRouteSeedIndex,
|
|
9
9
|
saveRouteSeedIndex,
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
ClientEntriesBundler,
|
|
12
12
|
VENDOR_SPECIFIERS,
|
|
13
13
|
RouteClientBuilder
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-6z5cwvq1.js";
|
|
15
15
|
import {
|
|
16
16
|
SOURCE_EXTS,
|
|
17
17
|
buildCacheStamp,
|
|
18
18
|
isBuildCacheStamp,
|
|
19
19
|
FontOptimizer
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-8vger8r0.js";
|
|
21
21
|
import {
|
|
22
22
|
BarrelAnalyzer,
|
|
23
23
|
createTsconfigPackageResolver,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
CsrEntryFiles,
|
|
26
26
|
toClientReferencePath,
|
|
27
27
|
PagesBundleBuilder
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-zswfx1y8.js";
|
|
29
29
|
import {
|
|
30
30
|
FileSys2
|
|
31
31
|
} from "./index-zyjztrvc.js";
|
|
@@ -406,6 +406,200 @@ class CssImportResolver {
|
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
+
// pkgs/@akanjs/devkit/frontendBuild/plainStylesheet.ts
|
|
410
|
+
var TAILWIND_AT_RULES = new Set([
|
|
411
|
+
"@tailwind",
|
|
412
|
+
"@apply",
|
|
413
|
+
"@plugin",
|
|
414
|
+
"@config",
|
|
415
|
+
"@theme",
|
|
416
|
+
"@utility",
|
|
417
|
+
"@variant",
|
|
418
|
+
"@custom-variant",
|
|
419
|
+
"@slot",
|
|
420
|
+
"@source",
|
|
421
|
+
"@reference"
|
|
422
|
+
]);
|
|
423
|
+
var TAILWIND_FUNCTION_RE = /(?:--alpha|--spacing|theme)\(/;
|
|
424
|
+
var TAILWIND_CONDITION_RE = /\b(?:source|prefix|theme)\(|(?:^|\s)(?:important|reference)(?=\s|$)/i;
|
|
425
|
+
var TAILWIND_PACKAGE_RE = /^tailwindcss(?:\/|$)/;
|
|
426
|
+
var REMOTE_URI_RE = /^(?:data:|https?:\/\/)/i;
|
|
427
|
+
var COMMENT_RE = /\/\*[\s\S]*?\*\//g;
|
|
428
|
+
var AT_KEYWORD_RE = /@[\w-]+/y;
|
|
429
|
+
var QUOTED_IMPORT_RE = /^\s*(["'])((?:\\[\s\S]|(?!\1)[^\\\n])*)\1([\s\S]*)$/;
|
|
430
|
+
var LAYER_RE = /^layer(?:\(\s*([^()]*?)\s*\))?(?![\w(-])/i;
|
|
431
|
+
var MAX_IMPORT_DEPTH = 100;
|
|
432
|
+
|
|
433
|
+
class PlainStylesheet {
|
|
434
|
+
static async bundle(css, base, load, depth = 0) {
|
|
435
|
+
if (depth > MAX_IMPORT_DEPTH)
|
|
436
|
+
return null;
|
|
437
|
+
const imports = PlainStylesheet.scan(css);
|
|
438
|
+
if (!imports)
|
|
439
|
+
return null;
|
|
440
|
+
const parts = [];
|
|
441
|
+
let cursor = 0;
|
|
442
|
+
for (const rule of imports) {
|
|
443
|
+
const loaded = await load(rule.uri, base);
|
|
444
|
+
const inner = await PlainStylesheet.bundle(loaded.content, loaded.base, load, depth + 1);
|
|
445
|
+
if (inner === null)
|
|
446
|
+
return null;
|
|
447
|
+
parts.push(css.slice(cursor, rule.start), PlainStylesheet.#wrap(inner, rule));
|
|
448
|
+
cursor = rule.end;
|
|
449
|
+
}
|
|
450
|
+
parts.push(css.slice(cursor));
|
|
451
|
+
return parts.join("");
|
|
452
|
+
}
|
|
453
|
+
static scan(css) {
|
|
454
|
+
const imports = [];
|
|
455
|
+
const code = [];
|
|
456
|
+
let segmentStart = 0;
|
|
457
|
+
let parenDepth = 0;
|
|
458
|
+
let braceDepth = 0;
|
|
459
|
+
let atRule = null;
|
|
460
|
+
let idx = 0;
|
|
461
|
+
while (idx < css.length) {
|
|
462
|
+
const char = css[idx];
|
|
463
|
+
if (char === "/" && css[idx + 1] === "*") {
|
|
464
|
+
const end = css.indexOf("*/", idx + 2);
|
|
465
|
+
if (end === -1)
|
|
466
|
+
return null;
|
|
467
|
+
code.push(css.slice(segmentStart, idx));
|
|
468
|
+
idx = segmentStart = end + 2;
|
|
469
|
+
continue;
|
|
470
|
+
}
|
|
471
|
+
if (char === "\\") {
|
|
472
|
+
idx += 2;
|
|
473
|
+
continue;
|
|
474
|
+
}
|
|
475
|
+
if (char === '"' || char === "'") {
|
|
476
|
+
code.push(css.slice(segmentStart, idx));
|
|
477
|
+
idx = segmentStart = PlainStylesheet.#skipString(css, idx);
|
|
478
|
+
continue;
|
|
479
|
+
}
|
|
480
|
+
if (char === "@" && !atRule && parenDepth === 0) {
|
|
481
|
+
AT_KEYWORD_RE.lastIndex = idx;
|
|
482
|
+
const keyword = AT_KEYWORD_RE.exec(css);
|
|
483
|
+
if (keyword) {
|
|
484
|
+
const name = keyword[0].toLowerCase();
|
|
485
|
+
if (TAILWIND_AT_RULES.has(name))
|
|
486
|
+
return null;
|
|
487
|
+
atRule = { name, start: idx, preludeStart: idx + keyword[0].length };
|
|
488
|
+
idx += keyword[0].length;
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
if (char === "(")
|
|
493
|
+
parenDepth += 1;
|
|
494
|
+
else if (char === ")")
|
|
495
|
+
parenDepth = Math.max(0, parenDepth - 1);
|
|
496
|
+
else if (parenDepth === 0 && (char === ";" || char === "{" || char === "}")) {
|
|
497
|
+
if (atRule && !PlainStylesheet.#closeAtRule(css, atRule, idx, char, imports))
|
|
498
|
+
return null;
|
|
499
|
+
atRule = null;
|
|
500
|
+
braceDepth += char === "{" ? 1 : char === "}" ? -1 : 0;
|
|
501
|
+
if (braceDepth < 0)
|
|
502
|
+
return null;
|
|
503
|
+
}
|
|
504
|
+
idx += 1;
|
|
505
|
+
}
|
|
506
|
+
if (atRule && !PlainStylesheet.#closeAtRule(css, atRule, css.length, "", imports))
|
|
507
|
+
return null;
|
|
508
|
+
if (braceDepth !== 0 || parenDepth !== 0)
|
|
509
|
+
return null;
|
|
510
|
+
code.push(css.slice(segmentStart));
|
|
511
|
+
return TAILWIND_FUNCTION_RE.test(code.join(" ")) ? null : imports;
|
|
512
|
+
}
|
|
513
|
+
static #closeAtRule(css, atRule, end, terminator, imports) {
|
|
514
|
+
const prelude = css.slice(atRule.preludeStart, end).replace(COMMENT_RE, " ");
|
|
515
|
+
const verdict = PlainStylesheet.#readAtRule(atRule.name, prelude, terminator === "{");
|
|
516
|
+
if (verdict === "tailwind")
|
|
517
|
+
return false;
|
|
518
|
+
if (verdict !== "plain")
|
|
519
|
+
imports.push({ ...verdict, start: atRule.start, end: terminator === ";" ? end + 1 : end });
|
|
520
|
+
return true;
|
|
521
|
+
}
|
|
522
|
+
static #readAtRule(name, prelude, opensBlock) {
|
|
523
|
+
if (name === "@media")
|
|
524
|
+
return TAILWIND_CONDITION_RE.test(prelude) ? "tailwind" : "plain";
|
|
525
|
+
if (name !== "@import")
|
|
526
|
+
return "plain";
|
|
527
|
+
const match = QUOTED_IMPORT_RE.exec(prelude);
|
|
528
|
+
if (!match)
|
|
529
|
+
return "plain";
|
|
530
|
+
const [, , uri = "", rest = ""] = match;
|
|
531
|
+
if (TAILWIND_PACKAGE_RE.test(uri) || TAILWIND_CONDITION_RE.test(rest) || opensBlock)
|
|
532
|
+
return "tailwind";
|
|
533
|
+
if (REMOTE_URI_RE.test(uri))
|
|
534
|
+
return "plain";
|
|
535
|
+
const conditions = PlainStylesheet.#parseConditions(rest.trim());
|
|
536
|
+
return conditions ? { uri, ...conditions } : "tailwind";
|
|
537
|
+
}
|
|
538
|
+
static #parseConditions(text) {
|
|
539
|
+
let rest = text;
|
|
540
|
+
let layer = null;
|
|
541
|
+
let supports = null;
|
|
542
|
+
const layerMatch = LAYER_RE.exec(rest);
|
|
543
|
+
if (layerMatch) {
|
|
544
|
+
layer = layerMatch[1] ?? "";
|
|
545
|
+
rest = rest.slice(layerMatch[0].length).trim();
|
|
546
|
+
}
|
|
547
|
+
if (/^supports\(/i.test(rest)) {
|
|
548
|
+
const close = PlainStylesheet.#closingParen(rest, "supports".length);
|
|
549
|
+
if (close === -1)
|
|
550
|
+
return null;
|
|
551
|
+
supports = rest.slice("supports(".length, close).trim();
|
|
552
|
+
rest = rest.slice(close + 1).trim();
|
|
553
|
+
}
|
|
554
|
+
if (/["']|\burl\(|\blayer\b|\bsupports\(/i.test(rest))
|
|
555
|
+
return null;
|
|
556
|
+
return { layer, supports, media: rest || null };
|
|
557
|
+
}
|
|
558
|
+
static #closingParen(text, open) {
|
|
559
|
+
let depth = 0;
|
|
560
|
+
for (let idx = open;idx < text.length; idx++) {
|
|
561
|
+
if (text[idx] === "(")
|
|
562
|
+
depth += 1;
|
|
563
|
+
else if (text[idx] === ")" && --depth === 0)
|
|
564
|
+
return idx;
|
|
565
|
+
}
|
|
566
|
+
return -1;
|
|
567
|
+
}
|
|
568
|
+
static #wrap(css, { layer, media, supports }) {
|
|
569
|
+
let wrapped = css;
|
|
570
|
+
if (layer !== null)
|
|
571
|
+
wrapped = `@layer${layer ? ` ${layer}` : ""} {
|
|
572
|
+
${wrapped}
|
|
573
|
+
}`;
|
|
574
|
+
if (media !== null)
|
|
575
|
+
wrapped = `@media ${media} {
|
|
576
|
+
${wrapped}
|
|
577
|
+
}`;
|
|
578
|
+
if (supports !== null)
|
|
579
|
+
wrapped = `@supports ${supports.startsWith("(") ? supports : `(${supports})`} {
|
|
580
|
+
${wrapped}
|
|
581
|
+
}`;
|
|
582
|
+
return wrapped;
|
|
583
|
+
}
|
|
584
|
+
static #skipString(css, start) {
|
|
585
|
+
const quote = css[start];
|
|
586
|
+
let idx = start + 1;
|
|
587
|
+
while (idx < css.length) {
|
|
588
|
+
const char = css[idx];
|
|
589
|
+
if (char === "\\")
|
|
590
|
+
idx += 2;
|
|
591
|
+
else if (char === quote)
|
|
592
|
+
return idx + 1;
|
|
593
|
+
else if (char === `
|
|
594
|
+
`)
|
|
595
|
+
return idx;
|
|
596
|
+
else
|
|
597
|
+
idx += 1;
|
|
598
|
+
}
|
|
599
|
+
return css.length;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
409
603
|
// pkgs/@akanjs/devkit/frontendBuild/cssCompiler.ts
|
|
410
604
|
var NON_SOURCE_EXT_RE = /\.(json|svg|png|jpe?g|webp|gif|avif|ico|woff2?|ttf|otf|mp3|mp4|wav)$/i;
|
|
411
605
|
var NODE_MODULES_RE = /[\\/]node_modules[\\/]/;
|
|
@@ -599,34 +793,27 @@ class CssCompiler {
|
|
|
599
793
|
if (cssPaths.length === 0)
|
|
600
794
|
return { css: "", imported: [] };
|
|
601
795
|
const compileStarted = Date.now();
|
|
602
|
-
const compilers = await Promise.all(cssPaths.map(
|
|
603
|
-
const css = await Bun.file(cssPath).text();
|
|
604
|
-
const base = path3.dirname(cssPath);
|
|
605
|
-
const imported = new Map;
|
|
606
|
-
const compiler = await compile(css, {
|
|
607
|
-
base,
|
|
608
|
-
loadStylesheet: (id, fromBase) => this.#loadStylesheet(id, fromBase, imported),
|
|
609
|
-
loadModule: (id, fromBase) => this.#loadModule(id, fromBase)
|
|
610
|
-
});
|
|
611
|
-
return { cssPath, compiler, imported };
|
|
612
|
-
}));
|
|
796
|
+
const compilers = await Promise.all(cssPaths.map((cssPath) => this.#compileStylesheet(cssPath)));
|
|
613
797
|
const sourceDirs = new Set;
|
|
614
798
|
for (const entry of compilers) {
|
|
615
|
-
for (const s of entry.compiler
|
|
799
|
+
for (const s of entry.compiler?.sources ?? [])
|
|
616
800
|
sourceDirs.add(s.base);
|
|
617
801
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
802
|
+
let candidates = [];
|
|
803
|
+
if (compilers.some((entry) => entry.compiler)) {
|
|
804
|
+
const scanStarted = Date.now();
|
|
805
|
+
candidates = await this.#scanCandidates(sourcePaths, [...sourceDirs]);
|
|
806
|
+
this.#logger.verbose(`css candidates scanned count=${candidates.length} sources=${sourcePaths.length} dirs=${sourceDirs.size} in ${Date.now() - scanStarted}ms`);
|
|
807
|
+
}
|
|
621
808
|
const parts = [];
|
|
622
809
|
const imported = [];
|
|
623
810
|
for (const entry of compilers) {
|
|
624
|
-
const part = entry.compiler.build(candidates);
|
|
811
|
+
const part = entry.compiler ? entry.compiler.build(candidates) : entry.plainCss;
|
|
625
812
|
parts.push(part);
|
|
626
813
|
for (const [cssPath, content] of entry.imported) {
|
|
627
814
|
const declaredNames = declaredCustomProperties(content);
|
|
628
815
|
imported.push({ cssPath, declaredNames });
|
|
629
|
-
if (declaredNames.length === 0 || declaredNames.some((name) => part.includes(`${name}:`)))
|
|
816
|
+
if (!entry.compiler || declaredNames.length === 0 || declaredNames.some((name) => part.includes(`${name}:`)))
|
|
630
817
|
continue;
|
|
631
818
|
this.#logger.warn(`css @import ${cssPath} was loaded by ${entry.cssPath} but none of its ${declaredNames.length} declaration(s) reached the compiled CSS`);
|
|
632
819
|
}
|
|
@@ -635,6 +822,24 @@ class CssCompiler {
|
|
|
635
822
|
return { css: parts.join(`
|
|
636
823
|
`), imported };
|
|
637
824
|
}
|
|
825
|
+
async#compileStylesheet(cssPath) {
|
|
826
|
+
const css = await Bun.file(cssPath).text();
|
|
827
|
+
const base = path3.dirname(cssPath);
|
|
828
|
+
const imported = new Map;
|
|
829
|
+
const loadStylesheet = (id, fromBase) => this.#loadStylesheet(id, fromBase, imported);
|
|
830
|
+
const plainCss = await PlainStylesheet.bundle(css, base, loadStylesheet);
|
|
831
|
+
if (plainCss !== null) {
|
|
832
|
+
this.#logger.verbose(`css ${cssPath} uses no Tailwind; passed through with ${imported.size} import(s) inlined`);
|
|
833
|
+
return { cssPath, compiler: null, plainCss, imported };
|
|
834
|
+
}
|
|
835
|
+
imported.clear();
|
|
836
|
+
const compiler = await compile(css, {
|
|
837
|
+
base,
|
|
838
|
+
loadStylesheet,
|
|
839
|
+
loadModule: (id, fromBase) => this.#loadModule(id, fromBase)
|
|
840
|
+
});
|
|
841
|
+
return { cssPath, compiler, plainCss: "", imported };
|
|
842
|
+
}
|
|
638
843
|
async#loadStylesheet(id, fromBase, imported) {
|
|
639
844
|
const p = await this.#resolveCssImport(id, fromBase);
|
|
640
845
|
this.#discoveredCssPaths.add(p);
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-c1sfw20m.js";
|
|
6
6
|
import {
|
|
7
7
|
generatedFilesForSync,
|
|
8
8
|
createPassedPrimitiveReport,
|
|
9
9
|
scalarChangedFiles
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-94a2xrv1.js";
|
|
11
11
|
import {
|
|
12
12
|
pluralizeName
|
|
13
13
|
} from "./index-nz8prx9g.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
script
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-c1sfw20m.js";
|
|
5
5
|
import {
|
|
6
6
|
AppExecutor2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-smjm20t4.js";
|
|
8
8
|
import {
|
|
9
9
|
LibExecutor2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-xftdwcdj.js";
|
|
11
11
|
import {
|
|
12
12
|
InteractionScaffold,
|
|
13
13
|
workflowStatus,
|
|
@@ -46,16 +46,16 @@ import {
|
|
|
46
46
|
nextActionsForTarget,
|
|
47
47
|
createPrimitiveWriteReport,
|
|
48
48
|
insertTemplateField
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-94a2xrv1.js";
|
|
50
50
|
import {
|
|
51
51
|
ModuleScript
|
|
52
|
-
} from "./index-
|
|
52
|
+
} from "./index-3jzx6k0e.js";
|
|
53
53
|
import {
|
|
54
54
|
plainNameProblem
|
|
55
55
|
} from "./index-va90m8nd.js";
|
|
56
56
|
import {
|
|
57
57
|
ModuleExecutor
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-2qhrmtb0.js";
|
|
59
59
|
|
|
60
60
|
// pkgs/@akanjs/cli/primitive/primitive.script.ts
|
|
61
61
|
import { capitalize, lowerlize } from "akanjs/common";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
SubagentPool2,
|
|
20
20
|
McpSignIn,
|
|
21
21
|
AkanCodeCompaction2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-pad3djxk.js";
|
|
23
23
|
import {
|
|
24
24
|
codeAgentIsLoopback,
|
|
25
25
|
codeAgentHostListed,
|
|
@@ -676,7 +676,7 @@ class AkanToolPack2 {
|
|
|
676
676
|
return { name: "akan-tools", factory: async (pi) => await this.#register(pi) };
|
|
677
677
|
}
|
|
678
678
|
async names() {
|
|
679
|
-
const { ContextRunner } = await import("./context.runner-
|
|
679
|
+
const { ContextRunner } = await import("./context.runner-7d1zp6sp.js");
|
|
680
680
|
return [
|
|
681
681
|
...new ContextRunner().listMcpTools(this.#options.mode).map((tool) => tool.name),
|
|
682
682
|
AkanToolPack2.verifyToolName
|
|
@@ -684,7 +684,7 @@ class AkanToolPack2 {
|
|
|
684
684
|
}
|
|
685
685
|
static verifyToolName = "akan_verify";
|
|
686
686
|
async#register(pi) {
|
|
687
|
-
const { ContextRunner } = await import("./context.runner-
|
|
687
|
+
const { ContextRunner } = await import("./context.runner-7d1zp6sp.js");
|
|
688
688
|
const runner = new ContextRunner;
|
|
689
689
|
const guidelineNames = await AkanToolPack2.#guidelineNames();
|
|
690
690
|
for (const tool of runner.listMcpTools(this.#options.mode, { guidelineNames })) {
|
package/index.js
CHANGED
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
getTargetMetas,
|
|
5
5
|
getTargetCommandNames,
|
|
6
6
|
runCommands
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-c1sfw20m.js";
|
|
8
8
|
import"./index-j4yvgfhr.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-g4hta169.js";
|
|
10
10
|
import"./index-zyjztrvc.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
11
|
+
import"./index-smjm20t4.js";
|
|
12
|
+
import"./index-xftdwcdj.js";
|
|
13
|
+
import"./index-zxvw9wme.js";
|
|
14
|
+
import"./index-2qhrmtb0.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/bunVersionGuard.ts
|
|
17
17
|
class BunVersionGuard {
|
|
@@ -27,27 +27,27 @@ import path from "path";
|
|
|
27
27
|
|
|
28
28
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
29
29
|
var commandModules = {
|
|
30
|
-
workspace: async () => (await import("./workspace.command-
|
|
31
|
-
agent: async () => (await import("./agent.command-
|
|
32
|
-
code: async () => (await import("./code.command-
|
|
33
|
-
application: async () => (await import("./application.command-
|
|
34
|
-
library: async () => (await import("./library.command-
|
|
35
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
36
|
-
package: async () => (await import("./package.command-
|
|
37
|
-
module: async () => (await import("./module.command-
|
|
38
|
-
page: async () => (await import("./page.command-
|
|
39
|
-
context: async () => (await import("./context.command-
|
|
40
|
-
cloud: async () => (await import("./cloud.command-
|
|
41
|
-
subspace: async () => (await import("./subspace.command-
|
|
42
|
-
guideline: async () => (await import("./guideline.command-
|
|
43
|
-
scalar: async () => (await import("./scalar.command-
|
|
44
|
-
primitive: async () => (await import("./primitive.command-
|
|
45
|
-
quality: async () => (await import("./quality.command-
|
|
46
|
-
verify: async () => (await import("./verify.command-
|
|
47
|
-
repair: async () => (await import("./repair.command-
|
|
48
|
-
workflow: async () => (await import("./workflow.command-
|
|
49
|
-
pipeline: async () => (await import("./pipeline.command-
|
|
50
|
-
tunnel: async () => (await import("./tunnel.command-
|
|
30
|
+
workspace: async () => (await import("./workspace.command-h55z8b42.js")).WorkspaceCommand,
|
|
31
|
+
agent: async () => (await import("./agent.command-mx412p4j.js")).AgentCommand,
|
|
32
|
+
code: async () => (await import("./code.command-9ve10cys.js")).CodeCommand,
|
|
33
|
+
application: async () => (await import("./application.command-6qec3fkg.js")).ApplicationCommand,
|
|
34
|
+
library: async () => (await import("./library.command-3d276hfe.js")).LibraryCommand,
|
|
35
|
+
localRegistry: async () => (await import("./localRegistry.command-0k4wbbw3.js")).LocalRegistryCommand,
|
|
36
|
+
package: async () => (await import("./package.command-jbmhv4ka.js")).PackageCommand,
|
|
37
|
+
module: async () => (await import("./module.command-2efp8hnc.js")).ModuleCommand,
|
|
38
|
+
page: async () => (await import("./page.command-bmn5mqg4.js")).PageCommand,
|
|
39
|
+
context: async () => (await import("./context.command-f1sqfvws.js")).ContextCommand,
|
|
40
|
+
cloud: async () => (await import("./cloud.command-zcm1vwep.js")).CloudCommand,
|
|
41
|
+
subspace: async () => (await import("./subspace.command-n39bhv0c.js")).SubspaceCommand,
|
|
42
|
+
guideline: async () => (await import("./guideline.command-6rezhb4j.js")).GuidelineCommand,
|
|
43
|
+
scalar: async () => (await import("./scalar.command-9h6jj42g.js")).ScalarCommand,
|
|
44
|
+
primitive: async () => (await import("./primitive.command-c1zhx2k0.js")).PrimitiveCommand,
|
|
45
|
+
quality: async () => (await import("./quality.command-s7k6hd9v.js")).QualityCommand,
|
|
46
|
+
verify: async () => (await import("./verify.command-c7xn9jkn.js")).VerifyCommand,
|
|
47
|
+
repair: async () => (await import("./repair.command-whzxzzwt.js")).RepairCommand,
|
|
48
|
+
workflow: async () => (await import("./workflow.command-7jf64z5f.js")).WorkflowCommand,
|
|
49
|
+
pipeline: async () => (await import("./pipeline.command-wy27rp6n.js")).PipelineCommand,
|
|
50
|
+
tunnel: async () => (await import("./tunnel.command-n5ezcmfs.js")).TunnelCommand
|
|
51
51
|
};
|
|
52
52
|
var commandModuleIds = Object.keys(commandModules);
|
|
53
53
|
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
Lib,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-c1sfw20m.js";
|
|
7
7
|
import"./index-j4yvgfhr.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-g4hta169.js";
|
|
9
9
|
import"./index-zyjztrvc.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
import"./index-smjm20t4.js";
|
|
11
|
+
import"./index-xftdwcdj.js";
|
|
12
|
+
import"./index-zxvw9wme.js";
|
|
13
13
|
import {
|
|
14
14
|
LibraryScript
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
} from "./index-qc4xk6ng.js";
|
|
16
|
+
import"./index-2qhrmtb0.js";
|
|
17
17
|
|
|
18
18
|
// pkgs/@akanjs/cli/library/library.command.ts
|
|
19
19
|
class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
|