@akanjs/cli 3.0.0-beta.13 → 3.0.0-beta.14

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.
Files changed (43) hide show
  1. package/.build-stamp +1 -1
  2. package/{TunnelShare-2kwqb1j6.js → TunnelShare-r5tc2qk5.js} +2 -2
  3. package/{agent.command-7357vxd8.js → agent.command-bhwsc2aj.js} +1 -1
  4. package/{application.command-8s8ns95d.js → application.command-436y543n.js} +1 -11
  5. package/{cloud.command-p5dnhft9.js → cloud.command-3xn0xpz8.js} +4 -17
  6. package/{cloud.script-gxpbhras.js → cloud.script-0a76c2g8.js} +4 -5
  7. package/commandManifest.json +1 -1
  8. package/{context.command-wsjt98c1.js → context.command-hxh96cc3.js} +4 -6
  9. package/{devTui-myg3pqeg.js → devTui-4ted58a6.js} +1 -1
  10. package/{devTuiView-gz2fbf4v.js → devTuiView-1dj2yq7t.js} +1 -1
  11. package/guideline.command-cyw8c0m0.js +48 -0
  12. package/guidelines/agentRule/agentRule.instruction.md +24 -13
  13. package/guidelines/conventions/conventions.instruction.md +6 -3
  14. package/guidelines/moduleCodegen/moduleCodegen.instruction.md +1 -1
  15. package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +1 -0
  16. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +62 -0
  17. package/index-1mrmve4s.js +61 -0
  18. package/{index-s3fvrydw.js → index-31hmq4ys.js} +1 -1
  19. package/{index-t3c045et.js → index-8tcj5wk8.js} +6 -19
  20. package/index-9fbk3dbh.js +234 -0
  21. package/{index-j7rwsd23.js → index-fad0hhty.js} +3 -3
  22. package/{index-wmb05v4q.js → index-gm76f0qb.js} +1 -1
  23. package/{index-649svkyt.js → index-myj01w9r.js} +8 -15
  24. package/{index-h3g1152j.js → index-r73ha1rf.js} +1 -1
  25. package/{index-cnzm1wn5.js → index-sg1bgdhe.js} +65 -68
  26. package/{index-bz10w9t2.js → index-tt6kzwj5.js} +5 -15
  27. package/index.js +14 -14
  28. package/{localRegistry.command-w6w35j4r.js → localRegistry.command-4cbgz63s.js} +3 -4
  29. package/{module.command-8zkq0q9q.js → module.command-ew0484va.js} +4 -7
  30. package/package.json +2 -5
  31. package/{primitive.command-qm7tybpn.js → primitive.command-50ecfzg4.js} +2 -5
  32. package/{quality.command-5evdd263.js → quality.command-a2jytczs.js} +63 -3
  33. package/{scalar.command-a1ewkmab.js → scalar.command-bptz6aj6.js} +3 -6
  34. package/{subspace.command-3w5x13a1.js → subspace.command-kmemx1vm.js} +2 -2
  35. package/{tunnel.command-09n8h4s1.js → tunnel.command-67q8vsg5.js} +2 -2
  36. package/{workflow.command-y3fct1rq.js → workflow.command-2ze5y2xp.js} +4 -7
  37. package/{workspace.command-p6td4qad.js → workspace.command-2n385jkt.js} +9 -10
  38. package/abstractCompactor-g04vqcff.js +0 -102
  39. package/guideline.command-snqzfyt0.js +0 -360
  40. package/index-5tw8t1ts.js +0 -338
  41. package/index-j1tajctp.js +0 -229
  42. package/index-kpnp2e10.js +0 -841
  43. package/index-meh558jy.js +0 -65
package/index-meh558jy.js DELETED
@@ -1,65 +0,0 @@
1
- // @bun
2
- // pkgs/@akanjs/devkit/abstractDoc.ts
3
- class AbstractDoc {
4
- path;
5
- content;
6
- siblingFiles;
7
- static suffix = ".abstract.md";
8
- static maxLines = 300;
9
- static compactMinLines = 40;
10
- static #facetRoots = "{lib,ui,webkit,srvkit,common,plugin}";
11
- static isAbstractPath(filePath) {
12
- return filePath.endsWith(AbstractDoc.suffix);
13
- }
14
- static lineCountOf(content) {
15
- return content.split(/\r?\n/).length;
16
- }
17
- static kindOf(filePath) {
18
- const [root, folder, ...rest] = filePath.split("/");
19
- if (root !== "lib" || !folder)
20
- return "other";
21
- if (folder === "__scalar")
22
- return rest.length === 2 ? "scalar" : "other";
23
- if (rest.length !== 1)
24
- return "other";
25
- return folder.startsWith("_") ? "service" : "domain";
26
- }
27
- static async findAll(sys, { module } = {}) {
28
- const filePaths = (await sys.getAllFiles(`${AbstractDoc.#facetRoots}/**/*${AbstractDoc.suffix}`)).sort();
29
- const docs = await Promise.all(filePaths.map((filePath) => AbstractDoc.read(sys, filePath)));
30
- if (!module)
31
- return docs;
32
- return docs.filter((doc) => doc.moduleName === module || doc.folderName === module);
33
- }
34
- static async read(sys, filePath) {
35
- const dirPath = filePath.split("/").slice(0, -1).join("/");
36
- const [content, folderFiles] = await Promise.all([sys.readFile(filePath), sys.readdir(dirPath)]);
37
- return new AbstractDoc(filePath, content, folderFiles.filter((fileName) => !AbstractDoc.isAbstractPath(fileName)));
38
- }
39
- constructor(path, content, siblingFiles) {
40
- this.path = path;
41
- this.content = content;
42
- this.siblingFiles = siblingFiles;
43
- }
44
- get kind() {
45
- return AbstractDoc.kindOf(this.path);
46
- }
47
- get folderName() {
48
- return this.path.split("/").at(-2) ?? "";
49
- }
50
- get moduleName() {
51
- return (this.path.split("/").at(-1) ?? "").slice(0, -AbstractDoc.suffix.length);
52
- }
53
- get lineCount() {
54
- return AbstractDoc.lineCountOf(this.content);
55
- }
56
- canReplaceWith(candidate) {
57
- const next = candidate.trim();
58
- if (!next.startsWith("#"))
59
- return false;
60
- const lineCount = AbstractDoc.lineCountOf(next);
61
- return lineCount >= 3 && lineCount < this.lineCount;
62
- }
63
- }
64
-
65
- export { AbstractDoc };