@akanjs/cli 2.3.5-rc.1 → 2.3.5-rc.10
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/index.js
CHANGED
|
@@ -13892,7 +13892,8 @@ class WorkspaceRunner extends runner("workspace") {
|
|
|
13892
13892
|
dirname: dirname2 = ".",
|
|
13893
13893
|
init = true,
|
|
13894
13894
|
akanVersion,
|
|
13895
|
-
registryUrl
|
|
13895
|
+
registryUrl,
|
|
13896
|
+
owner = ""
|
|
13896
13897
|
}) {
|
|
13897
13898
|
const cwdPath = process.cwd();
|
|
13898
13899
|
const workspaceRoot = path41.join(cwdPath, dirname2, repoName);
|
|
@@ -13906,7 +13907,7 @@ class WorkspaceRunner extends runner("workspace") {
|
|
|
13906
13907
|
await workspace.applyTemplate({
|
|
13907
13908
|
basePath: ".",
|
|
13908
13909
|
template: "workspaceRoot",
|
|
13909
|
-
dict: { repoName, appName, serveDomain: "localhost" }
|
|
13910
|
+
dict: { repoName, appName, serveDomain: "localhost", owner }
|
|
13910
13911
|
});
|
|
13911
13912
|
if (normalizedRegistryUrl)
|
|
13912
13913
|
await workspace.writeFile(".npmrc", `registry=${normalizedRegistryUrl}/
|
|
@@ -14039,14 +14040,16 @@ class WorkspaceScript extends script("workspace", [
|
|
|
14039
14040
|
dirname: dirname2 = ".",
|
|
14040
14041
|
installLibs = false,
|
|
14041
14042
|
init = true,
|
|
14042
|
-
registryUrl
|
|
14043
|
+
registryUrl,
|
|
14044
|
+
owner
|
|
14043
14045
|
}) {
|
|
14044
14046
|
const akanVersion = await this.packageScript.version(null, { log: false });
|
|
14045
14047
|
const workspace = await this.workspaceRunner.createWorkspace(repoName, appName, {
|
|
14046
14048
|
dirname: dirname2,
|
|
14047
14049
|
init,
|
|
14048
14050
|
akanVersion,
|
|
14049
|
-
...registryUrl ? { registryUrl } : {}
|
|
14051
|
+
...registryUrl ? { registryUrl } : {},
|
|
14052
|
+
...owner ? { owner } : {}
|
|
14050
14053
|
});
|
|
14051
14054
|
if (installLibs) {
|
|
14052
14055
|
await this.libraryScript.installLibrary(workspace, "util");
|
|
@@ -14153,9 +14156,19 @@ class WorkspaceCommand extends command("workspace", [WorkspaceScript], ({ public
|
|
|
14153
14156
|
}).option("registry", String, {
|
|
14154
14157
|
desc: "npm registry URL for installing Akan packages",
|
|
14155
14158
|
default: process.env.AKAN_NPM_REGISTRY ?? "https://registry.npmjs.org"
|
|
14156
|
-
}).
|
|
14159
|
+
}).option("owner", String, {
|
|
14160
|
+
desc: "owner of the workspace",
|
|
14161
|
+
default: process.env.GITHUB_OWNER,
|
|
14162
|
+
nullable: true
|
|
14163
|
+
}).exec(async function(workspaceName, app, dir, libs, init, registry, owner) {
|
|
14157
14164
|
const appName = app || "app";
|
|
14158
|
-
await this.workspaceScript.createWorkspace(workspaceName.toLowerCase().replace(/ /g, "-"), appName.toLowerCase().replace(/ /g, "-"), {
|
|
14165
|
+
await this.workspaceScript.createWorkspace(workspaceName.toLowerCase().replace(/ /g, "-"), appName.toLowerCase().replace(/ /g, "-"), {
|
|
14166
|
+
dirname: dir,
|
|
14167
|
+
installLibs: libs,
|
|
14168
|
+
init,
|
|
14169
|
+
owner,
|
|
14170
|
+
...registry ? { registryUrl: registry } : {}
|
|
14171
|
+
});
|
|
14159
14172
|
}),
|
|
14160
14173
|
generateAgentRules: target({ desc: "Generate AGENTS.md and optional Cursor rules for Akan coding agents" }).option("overwrite", Boolean, { desc: "Overwrite existing agent rule files", default: false }).option("cursorRules", Boolean, { desc: "Generate .cursor/rules/akan.mdc", default: true }).with(Workspace).exec(async function(overwrite, cursorRules, workspace) {
|
|
14161
14174
|
await this.workspaceScript.generateAgentRules(workspace, { overwrite, cursorRules });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "2.3.5-rc.
|
|
3
|
+
"version": "2.3.5-rc.10",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@langchain/openai": "^1.4.6",
|
|
36
36
|
"@tailwindcss/node": "^4.3.0",
|
|
37
37
|
"@trapezedev/project": "^7.1.4",
|
|
38
|
-
"akanjs": "2.3.5-rc.
|
|
38
|
+
"akanjs": "2.3.5-rc.10",
|
|
39
39
|
"chalk": "^5.6.2",
|
|
40
40
|
"commander": "^14.0.3",
|
|
41
41
|
"daisyui": "^5.5.20",
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Akan.js",
|
|
3
|
+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
|
|
4
|
+
"features": {
|
|
5
|
+
"ghcr.io/devcontainers-extra/features/bun:1": {}
|
|
6
|
+
},
|
|
7
|
+
"containerEnv": {
|
|
8
|
+
"BUN_INSTALL": "/home/vscode/.bun",
|
|
9
|
+
"PATH": "/home/vscode/.bun/bin:${containerEnv:PATH}"
|
|
10
|
+
},
|
|
11
|
+
"onCreateCommand": "bun add -g @akanjs/cli@latest",
|
|
12
|
+
"postCreateCommand": "bun install",
|
|
13
|
+
"forwardPorts": [8282, 8283, 8284, 8285, 8286, 8287, 8288, 8289, 8290],
|
|
14
|
+
"portsAttributes": {
|
|
15
|
+
"8282": { "label": "Akan dev server#1", "onAutoForward": "openPreview" },
|
|
16
|
+
"8283": { "label": "Akan dev server#2", "onAutoForward": "openPreview" },
|
|
17
|
+
"8284": { "label": "Akan dev server#3", "onAutoForward": "openPreview" },
|
|
18
|
+
"8285": { "label": "Akan dev server#4", "onAutoForward": "openPreview" },
|
|
19
|
+
"8286": { "label": "Akan dev server#5", "onAutoForward": "openPreview" },
|
|
20
|
+
"8287": { "label": "Akan dev server#6", "onAutoForward": "openPreview" },
|
|
21
|
+
"8288": { "label": "Akan dev server#7", "onAutoForward": "openPreview" },
|
|
22
|
+
"8289": { "label": "Akan dev server#8", "onAutoForward": "openPreview" },
|
|
23
|
+
"8290": { "label": "Akan dev server#9", "onAutoForward": "openPreview" }
|
|
24
|
+
},
|
|
25
|
+
"customizations": {
|
|
26
|
+
"extensions": ["oven.bun-vscode", "biomejs.biome"],
|
|
27
|
+
"settings": {
|
|
28
|
+
"typescript.tsdk": "node_modules/typescript/lib",
|
|
29
|
+
"editor.defaultFormatter": "biomejs.biome",
|
|
30
|
+
"editor.formatOnSave": true,
|
|
31
|
+
"editor.codeActionsOnSave": {
|
|
32
|
+
"source.fixAll.biome": "explicit"
|
|
33
|
+
},
|
|
34
|
+
"[typescript]": {
|
|
35
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
36
|
+
},
|
|
37
|
+
"[typescriptreact]": {
|
|
38
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
39
|
+
},
|
|
40
|
+
"[javascript]": {
|
|
41
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
42
|
+
},
|
|
43
|
+
"[javascriptreact]": {
|
|
44
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
45
|
+
},
|
|
46
|
+
"[json]": {
|
|
47
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
interface Dict {
|
|
2
|
+
appName: string;
|
|
3
|
+
owner?: string;
|
|
4
|
+
repoName: string;
|
|
5
|
+
}
|
|
6
|
+
export default function getContent(_scanInfo: null, dict: Dict) {
|
|
7
|
+
const codespacesUrl = `https://codespaces.new/${dict.owner}/${dict.repoName}?quickstart=1`;
|
|
8
|
+
const codespacesBadge = dict.owner
|
|
9
|
+
? `[](${codespacesUrl})`
|
|
10
|
+
: "";
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
filename: "README.md",
|
|
14
|
+
content: `${codespacesBadge}
|
|
15
|
+
# ${dict.repoName}
|
|
16
|
+
|
|
17
|
+
This workspace was created with [Akan.js](https://akanjs.com), a Bun-first full-stack TypeScript framework.
|
|
18
|
+
|
|
19
|
+
Akan lets you write business code once and connect it across web, server, fetch clients, state, database contracts,
|
|
20
|
+
and deployment artifacts with strict conventions.
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
Install dependencies:
|
|
25
|
+
|
|
26
|
+
\`\`\`bash
|
|
27
|
+
bun install
|
|
28
|
+
bun install -g @akanjs/cli
|
|
29
|
+
\`\`\`
|
|
30
|
+
|
|
31
|
+
Start the app:
|
|
32
|
+
|
|
33
|
+
\`\`\`bash
|
|
34
|
+
akan start ${dict.appName} --open
|
|
35
|
+
\`\`\`
|
|
36
|
+
|
|
37
|
+
Build for production:
|
|
38
|
+
|
|
39
|
+
\`\`\`bash
|
|
40
|
+
akan build ${dict.appName}
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
## Project Structure
|
|
44
|
+
|
|
45
|
+
\`\`\`text
|
|
46
|
+
apps/${dict.appName}/
|
|
47
|
+
|-- akan.config.ts # app configuration
|
|
48
|
+
|-- page/ # route pages
|
|
49
|
+
|-- lib/ # app domain modules
|
|
50
|
+
|-- ui/ # app UI components
|
|
51
|
+
|-- env/ # runtime environment contracts
|
|
52
|
+
\`-- public/ # static assets
|
|
53
|
+
|
|
54
|
+
libs/ # shared libraries for multiple apps
|
|
55
|
+
pkgs/ # local packages, if your workspace grows into them
|
|
56
|
+
\`\`\`
|
|
57
|
+
|
|
58
|
+
## Where To Start
|
|
59
|
+
|
|
60
|
+
- Edit \`apps/${dict.appName}/page/_index.tsx\` to change the first page.
|
|
61
|
+
- Edit \`apps/${dict.appName}/akan.config.ts\` when the app needs routes, domains, base paths, or deployment options.
|
|
62
|
+
- Add business modules under \`apps/${dict.appName}/lib/\` when your app needs typed domain logic.
|
|
63
|
+
|
|
64
|
+
## Useful Commands
|
|
65
|
+
|
|
66
|
+
\`\`\`bash
|
|
67
|
+
akan start ${dict.appName}
|
|
68
|
+
akan build ${dict.appName}
|
|
69
|
+
akan lint ${dict.appName}
|
|
70
|
+
\`\`\`
|
|
71
|
+
|
|
72
|
+
## Learn More
|
|
73
|
+
|
|
74
|
+
- Akan.js docs: https://akanjs.com/docs
|
|
75
|
+
- Package: https://www.npmjs.com/package/akanjs
|
|
76
|
+
`,
|
|
77
|
+
};
|
|
78
|
+
}
|