@akanjs/cli 3.0.0-beta.20 → 3.0.0-beta.22
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/{CodeAgent-awv258wb.js → CodeAgent-0dh9fzzg.js} +2 -2
- package/{CodeTui-1nqh35ez.js → CodeTui-drwdvwg9.js} +1 -1
- package/{agent.command-1s9ag7sb.js → agent.command-ttn09rx3.js} +5 -5
- package/akanCode.js +2 -2
- package/{application.command-49hwy6va.js → application.command-mm5v2gzp.js} +43 -41
- package/{applicationBuildRunner-ybyp97pv.js → applicationBuildRunner-38exmejd.js} +2 -2
- package/buildBatch.proc.js +10 -4
- package/{cloud.command-d7rqtzt9.js → cloud.command-f1pnvp2a.js} +9 -8
- package/cloud.script-d61mcf0q.js +20 -0
- package/{code.command-nn48xzej.js → code.command-1jgk14tc.js} +6 -6
- package/commandManifest.json +1 -1
- package/{context.command-s3mcmvpa.js → context.command-4vpjmg22.js} +13 -13
- package/context.runner-ehjs419v.js +21 -0
- package/{guideline.command-sct4qnt5.js → guideline.command-7jk47fgq.js} +2 -2
- package/guidelines/agentRule/agentRule.instruction.md +3 -3
- package/guidelines/conventions/conventions.instruction.md +17 -5
- package/guidelines/runtimeRule/runtimeRule.instruction.md +3 -3
- package/incrementalBuilder.proc.js +1 -1
- package/{index-5pc1qrbv.js → index-1db2cw0y.js} +2 -2
- package/{index-13ffe9wp.js → index-2gh9sndr.js} +4 -4
- package/{index-ahemdr5n.js → index-4dn1p115.js} +3 -3
- package/{index-ygn77a5w.js → index-9629w7ns.js} +5 -3
- package/{index-ddxvdd1p.js → index-aadpbnt2.js} +5 -5
- package/{index-xsjh6nzh.js → index-aaz7n8s2.js} +3 -3
- package/{index-9d9bgcx4.js → index-ga6hygxr.js} +514 -480
- package/{index-ztp3e73t.js → index-hb8sgepf.js} +1 -1
- package/{index-xqpzbab5.js → index-m0ms3n1c.js} +7 -7
- package/{index-ww4z397j.js → index-m79y8b2h.js} +82 -168
- package/{index-as7xmyz8.js → index-mgfx3mfs.js} +5 -4
- package/{index-3sq321ak.js → index-pp54p5zk.js} +2 -2
- package/{index-xqjwd384.js → index-q44jbw48.js} +1 -1
- package/{index-w2zdcw3k.js → index-rmcw8yc8.js} +1 -1
- package/{index-dzf3r49a.js → index-rnt66vym.js} +1 -1
- package/{index-8sf7wmdr.js → index-sz0myv9k.js} +5 -5
- package/{index-8mna0947.js → index-tgjy8xf3.js} +4 -4
- package/{index-nv5976x3.js → index-vj1cwwy5.js} +24 -13
- package/{index-przybvy5.js → index-wp43xrjv.js} +4 -4
- package/{index-31yr441d.js → index-ya5qbmyg.js} +3 -3
- package/{index-axzjaqve.js → index-yjkte9aj.js} +5 -4
- package/index-ys6f0bvh.js +471 -0
- package/{index-myhc3c1j.js → index-yy4s1j72.js} +1 -1
- package/index.js +21 -21
- package/{library.command-1gx04jgn.js → library.command-ccb1cp92.js} +3 -3
- package/{localRegistry.command-zndxj1q6.js → localRegistry.command-pgbr7vjj.js} +8 -7
- package/{module.command-3waddk95.js → module.command-5k6h407d.js} +5 -5
- package/{package.command-zrc7br1y.js → package.command-e6ntvpez.js} +3 -3
- package/package.json +2 -3
- package/{page.command-vpjgardh.js → page.command-v4f90wb8.js} +3 -3
- package/{primitive.command-sz84tk4t.js → primitive.command-g6km57q5.js} +6 -6
- package/{quality.command-g869hafs.js → quality.command-de3p36pz.js} +5 -4
- package/{repair.command-chsnjvvv.js → repair.command-d3x1javq.js} +5 -5
- package/{scalar.command-2v21newx.js → scalar.command-7ezrac2b.js} +4 -4
- package/{subspace.command-ckcbwfp1.js → subspace.command-g2tq9nrn.js} +4 -4
- package/templates/workspaceRoot/.gitignore.template +0 -1
- package/{tunnel.command-kd2yr4fx.js → tunnel.command-hsrv2mny.js} +2 -2
- package/{workflow.command-44252cqv.js → workflow.command-z2p32nmf.js} +10 -10
- package/{workspace.command-fqcztt5p.js → workspace.command-s82wd61q.js} +20 -20
- package/applicationReleasePackager-esnrphw8.js +0 -224
- package/capacitorApp-1synz4en.js +0 -11
- package/cloud.script-bkbpcr96.js +0 -19
- package/context.runner-k99nb5pk.js +0 -21
- package/index-5e0n4hqx.js +0 -75
- package/index-mxav6j3c.js +0 -1377
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
App,
|
|
4
4
|
Module,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-rmcw8yc8.js";
|
|
7
7
|
import"./index-5b6tavv3.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-ga6hygxr.js";
|
|
9
9
|
import {
|
|
10
10
|
PageScript
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-rnt66vym.js";
|
|
12
12
|
|
|
13
13
|
// pkgs/@akanjs/cli/page/page.command.ts
|
|
14
14
|
class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-rmcw8yc8.js";
|
|
6
6
|
import"./index-5b6tavv3.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-ga6hygxr.js";
|
|
8
8
|
import {
|
|
9
9
|
renderPrimitiveReport
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
} from "./index-yy4s1j72.js";
|
|
11
|
+
import"./index-rnt66vym.js";
|
|
12
|
+
import"./index-tgjy8xf3.js";
|
|
13
13
|
import {
|
|
14
14
|
PrimitiveScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-wp43xrjv.js";
|
|
16
16
|
|
|
17
17
|
// pkgs/@akanjs/cli/primitive/primitive.command.ts
|
|
18
18
|
import { Logger } from "akanjs/common";
|
|
@@ -3,13 +3,14 @@ import {
|
|
|
3
3
|
Workspace,
|
|
4
4
|
script,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-rmcw8yc8.js";
|
|
7
7
|
import"./index-5b6tavv3.js";
|
|
8
8
|
import {
|
|
9
9
|
rootAllowedFiles,
|
|
10
10
|
rootAllowedDirs,
|
|
11
|
-
isAllowedLibFacetRootFile
|
|
12
|
-
|
|
11
|
+
isAllowedLibFacetRootFile,
|
|
12
|
+
rootEntryHintOf
|
|
13
|
+
} from "./index-ga6hygxr.js";
|
|
13
14
|
|
|
14
15
|
// pkgs/@akanjs/devkit/qualityScanner.ts
|
|
15
16
|
import { createHash } from "crypto";
|
|
@@ -696,7 +697,7 @@ class AkanQualityScanner {
|
|
|
696
697
|
const allowed = isDir ? rootAllowedDirs[type].has(name) : rootAllowedFiles[type].has(name);
|
|
697
698
|
const kind = isDir ? "folder" : "file";
|
|
698
699
|
if (!allowed)
|
|
699
|
-
warnings.push(fileWarning(`akan.layout.${type}-root-${kind}`, "layout", sourceFile.file, `Unexpected ${type} root ${kind} "${name}". Keep ${type} code in conventional ${type} folders.`));
|
|
700
|
+
warnings.push(fileWarning(`akan.layout.${type}-root-${kind}`, "layout", sourceFile.file, `Unexpected ${type} root ${kind} "${name}". ${rootEntryHintOf(type, name) ?? `Keep ${type} code in conventional ${type} folders.`}`));
|
|
700
701
|
}
|
|
701
702
|
const libFacetFile = getLibFacetRootFile(sourceFile.file);
|
|
702
703
|
if (libFacetFile && !isAllowedLibFacetRootFile(libFacetFile))
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
Workspace,
|
|
4
4
|
script,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-rmcw8yc8.js";
|
|
7
7
|
import"./index-5b6tavv3.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-ga6hygxr.js";
|
|
9
9
|
import"./index-hj6w4ka1.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
import"./index-yy4s1j72.js";
|
|
11
|
+
import"./index-9629w7ns.js";
|
|
12
12
|
import {
|
|
13
13
|
RepairRunner
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-ya5qbmyg.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/repair/repair.script.ts
|
|
17
17
|
import { Logger } from "akanjs/common";
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Sys,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-rmcw8yc8.js";
|
|
6
6
|
import"./index-5b6tavv3.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-ga6hygxr.js";
|
|
8
8
|
import {
|
|
9
9
|
renderPrimitiveReport
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-yy4s1j72.js";
|
|
11
11
|
import {
|
|
12
12
|
ScalarScript
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-pp54p5zk.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/cli/scalar/scalar.command.ts
|
|
16
16
|
import { Logger, lowerlize } from "akanjs/common";
|
|
@@ -11,15 +11,15 @@ import {
|
|
|
11
11
|
runner,
|
|
12
12
|
script,
|
|
13
13
|
command
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-rmcw8yc8.js";
|
|
15
15
|
import {
|
|
16
16
|
Executor,
|
|
17
17
|
WorkspaceExecutor,
|
|
18
18
|
AppExecutor
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-ga6hygxr.js";
|
|
20
20
|
import {
|
|
21
21
|
SlicePlanner
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-q44jbw48.js";
|
|
23
23
|
import {
|
|
24
24
|
LibSource
|
|
25
25
|
} from "./index-bjwxs904.js";
|
|
@@ -716,7 +716,7 @@ class SubspaceRunner extends runner("subspace") {
|
|
|
716
716
|
if (!asked)
|
|
717
717
|
return { name: subspace.name, workspaceId, host, apps, libs: [], outcome: "cancelled", files: [] };
|
|
718
718
|
const { libs } = await subspace.slice();
|
|
719
|
-
const { CloudScript } = await import("./cloud.script-
|
|
719
|
+
const { CloudScript } = await import("./cloud.script-d61mcf0q.js");
|
|
720
720
|
const { files } = await CommandContainer.get(CloudScript).uploadEnv(workspace, {
|
|
721
721
|
host,
|
|
722
722
|
workspaceId,
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
runner,
|
|
10
10
|
script,
|
|
11
11
|
command
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-rmcw8yc8.js";
|
|
13
13
|
import {
|
|
14
14
|
AppExecutor
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-ga6hygxr.js";
|
|
16
16
|
import {
|
|
17
17
|
TunnelShare2
|
|
18
18
|
} from "./index-smme4r47.js";
|
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
Workspace,
|
|
4
4
|
script,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-rmcw8yc8.js";
|
|
7
7
|
import"./index-5b6tavv3.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-ga6hygxr.js";
|
|
9
9
|
import"./index-hj6w4ka1.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
10
|
+
import"./index-yy4s1j72.js";
|
|
11
|
+
import"./index-9629w7ns.js";
|
|
12
|
+
import"./index-rnt66vym.js";
|
|
13
|
+
import"./index-tgjy8xf3.js";
|
|
14
|
+
import"./index-wp43xrjv.js";
|
|
15
|
+
import"./index-ya5qbmyg.js";
|
|
16
|
+
import"./index-pp54p5zk.js";
|
|
17
17
|
import {
|
|
18
18
|
WorkflowRunner
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-m0ms3n1c.js";
|
|
20
20
|
|
|
21
21
|
// pkgs/@akanjs/cli/workflow/workflow.script.ts
|
|
22
22
|
import { Logger } from "akanjs/common";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
runner,
|
|
12
12
|
script,
|
|
13
13
|
command
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-rmcw8yc8.js";
|
|
15
15
|
import {
|
|
16
16
|
extractAgentBlock,
|
|
17
17
|
collectScopeRecipeSources,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
AppExecutor,
|
|
23
23
|
LibExecutor,
|
|
24
24
|
PkgExecutor
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-ga6hygxr.js";
|
|
26
26
|
import {
|
|
27
27
|
countBlocking,
|
|
28
28
|
formatStyleContract,
|
|
@@ -32,43 +32,43 @@ import {
|
|
|
32
32
|
collectRecipeSources2,
|
|
33
33
|
scanRecipes2
|
|
34
34
|
} from "./index-hj6w4ka1.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
35
|
+
import"./index-yy4s1j72.js";
|
|
36
|
+
import"./index-9629w7ns.js";
|
|
37
37
|
import"./index-0bq14vr1.js";
|
|
38
38
|
import {
|
|
39
39
|
AgentScript
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-4dn1p115.js";
|
|
41
41
|
import"./index-khpfpcsd.js";
|
|
42
42
|
import {
|
|
43
43
|
LibraryScript
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-1db2cw0y.js";
|
|
45
45
|
import {
|
|
46
46
|
ApplicationScript
|
|
47
|
-
} from "./index-
|
|
47
|
+
} from "./index-m79y8b2h.js";
|
|
48
|
+
import"./index-ys6f0bvh.js";
|
|
48
49
|
import"./index-7md2g9vw.js";
|
|
49
50
|
import"./index-3t7g9e4r.js";
|
|
50
51
|
import {
|
|
51
52
|
PackageScript
|
|
52
|
-
} from "./index-
|
|
53
|
+
} from "./index-mgfx3mfs.js";
|
|
53
54
|
import {
|
|
54
55
|
getNpmRegistryUrl,
|
|
55
56
|
getLatestPackageVersion
|
|
56
|
-
} from "./index-
|
|
57
|
+
} from "./index-yjkte9aj.js";
|
|
57
58
|
import {
|
|
58
59
|
CloudScript2
|
|
59
|
-
} from "./index-
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
62
|
-
import"./index-
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
66
|
-
import"./index-
|
|
67
|
-
import"./index-xqpzbab5.js";
|
|
60
|
+
} from "./index-sz0myv9k.js";
|
|
61
|
+
import"./index-vj1cwwy5.js";
|
|
62
|
+
import"./index-ya5qbmyg.js";
|
|
63
|
+
import"./index-rnt66vym.js";
|
|
64
|
+
import"./index-tgjy8xf3.js";
|
|
65
|
+
import"./index-wp43xrjv.js";
|
|
66
|
+
import"./index-pp54p5zk.js";
|
|
67
|
+
import"./index-m0ms3n1c.js";
|
|
68
68
|
import {
|
|
69
69
|
ContextScript
|
|
70
|
-
} from "./index-
|
|
71
|
-
import"./index-
|
|
70
|
+
} from "./index-2gh9sndr.js";
|
|
71
|
+
import"./index-q44jbw48.js";
|
|
72
72
|
|
|
73
73
|
// pkgs/@akanjs/cli/workspace/workspace.runner.ts
|
|
74
74
|
import path from "path";
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
FileSys2
|
|
4
|
-
} from "./index-5b6tavv3.js";
|
|
5
|
-
import {
|
|
6
|
-
Spinner
|
|
7
|
-
} from "./index-9d9bgcx4.js";
|
|
8
|
-
|
|
9
|
-
// pkgs/@akanjs/devkit/applicationReleasePackager.ts
|
|
10
|
-
import { cp, mkdir, rm } from "fs/promises";
|
|
11
|
-
import path from "path";
|
|
12
|
-
|
|
13
|
-
// pkgs/@akanjs/devkit/uploadRelease.ts
|
|
14
|
-
import { Logger, RestClient } from "akanjs/common";
|
|
15
|
-
var spinning = (message) => new Spinner(message, { prefix: message, enableSpin: true }).start();
|
|
16
|
-
var uploadRelease = async (appName, {
|
|
17
|
-
workspaceRoot,
|
|
18
|
-
environment,
|
|
19
|
-
buildNum,
|
|
20
|
-
platformVersion,
|
|
21
|
-
os,
|
|
22
|
-
local
|
|
23
|
-
}) => {
|
|
24
|
-
const logger = new Logger("uploadRelease");
|
|
25
|
-
const basePath = local ? "http://localhost:8282/backend" : "https://cloud.akanjs.com/backend";
|
|
26
|
-
const httpClient = new RestClient(basePath);
|
|
27
|
-
const readingFilesSpinner = spinning("Reading files...");
|
|
28
|
-
try {
|
|
29
|
-
const uploads = [
|
|
30
|
-
[`builds/${appName}-release.tar.gz`, `${appName}-release.tar.gz`],
|
|
31
|
-
[`sources/${appName}-source.tar.gz`, `${appName}-source.tar.gz`],
|
|
32
|
-
[`builds/${appName}-appBuild.zip`, `${appName}-appBuild.zip`]
|
|
33
|
-
].map(([relativePath, name]) => ({ file: Bun.file(`${workspaceRoot}/releases/${relativePath}`), name }));
|
|
34
|
-
const metas = uploads.map(({ file }) => ({ lastModifiedAt: new Date(file.lastModified), size: file.size }));
|
|
35
|
-
readingFilesSpinner.succeed("Reading files... done");
|
|
36
|
-
const preparingFormSpinner = spinning("Preparing form data...");
|
|
37
|
-
const formData = new FormData;
|
|
38
|
-
for (const { file, name } of uploads)
|
|
39
|
-
formData.append("files", file, name);
|
|
40
|
-
formData.append("metas", JSON.stringify(metas));
|
|
41
|
-
formData.append("type", "release");
|
|
42
|
-
preparingFormSpinner.succeed("Preparing form data... done");
|
|
43
|
-
try {
|
|
44
|
-
const uploadingFilesSpinner = spinning("Uploading files to server...");
|
|
45
|
-
const [buildFile, sourceFile, appBuildFile] = await httpClient.post("/file/addFiles", formData);
|
|
46
|
-
uploadingFilesSpinner.succeed("Uploading files to server... done");
|
|
47
|
-
const fetchingAppSpinner = spinning(`Fetching dev app information for ${appName}...`);
|
|
48
|
-
const major = platformVersion ? parseInt(platformVersion.split(".")[0]) : 1;
|
|
49
|
-
const minor = platformVersion ? parseInt(platformVersion.split(".")[1]) : 0;
|
|
50
|
-
const patch = platformVersion ? parseInt(platformVersion.split(".")[2]) : 0;
|
|
51
|
-
const devApp = await httpClient.get(`/devApp/devAppInName/${appName}`);
|
|
52
|
-
fetchingAppSpinner.succeed(`Fetching dev app information for ${appName}... done`);
|
|
53
|
-
const pushingReleaseSpinner = spinning(`Pushing release to ${environment} environment...`);
|
|
54
|
-
const release = await httpClient.post(`/release/pushRelease/${devApp.id}/${environment}/${major}/${minor}/${patch}/${sourceFile.id}/${buildFile.id}/${appBuildFile.id}${os ? `/${os}` : ""}`);
|
|
55
|
-
pushingReleaseSpinner.succeed(`Pushing release to ${environment} environment... done`);
|
|
56
|
-
new Spinner(`Successfully pushed release to ${appName}-${environment} server. `, {
|
|
57
|
-
prefix: `Successfully pushed release to ${appName}-${environment} server. `,
|
|
58
|
-
enableSpin: false
|
|
59
|
-
}).succeed(`Successfully pushed release to ${appName}-${environment} server. `);
|
|
60
|
-
return release;
|
|
61
|
-
} catch (e) {
|
|
62
|
-
const errorMessage = e instanceof Error ? e.message : "Unknown error";
|
|
63
|
-
logger.error(`Upload release failed: ${errorMessage}`);
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
} catch (e) {
|
|
67
|
-
const errorMessage = e instanceof Error ? e.message : "Unknown error";
|
|
68
|
-
readingFilesSpinner.fail(`Reading files failed: ${errorMessage}`);
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
// pkgs/@akanjs/devkit/applicationReleasePackager.ts
|
|
74
|
-
class ApplicationReleasePackager {
|
|
75
|
-
#app;
|
|
76
|
-
#build;
|
|
77
|
-
constructor(app, options) {
|
|
78
|
-
this.#app = app;
|
|
79
|
-
this.#build = options.build;
|
|
80
|
-
}
|
|
81
|
-
async releaseSource({
|
|
82
|
-
rebuild,
|
|
83
|
-
buildNum = 0,
|
|
84
|
-
environment = "debug",
|
|
85
|
-
local = true
|
|
86
|
-
} = {}) {
|
|
87
|
-
const { platformVersion } = await this.#prepareReleaseBuild({ rebuild, buildNum });
|
|
88
|
-
await this.#writeSourceArchive({ readme: this.#confidentialReadme() });
|
|
89
|
-
await uploadRelease(this.#app.name, {
|
|
90
|
-
local,
|
|
91
|
-
buildNum,
|
|
92
|
-
environment,
|
|
93
|
-
platformVersion,
|
|
94
|
-
workspaceRoot: this.#app.workspace.cwdPath
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
async compressProjectFiles({ rebuild, buildNum = 0 } = {}) {
|
|
98
|
-
await this.#prepareReleaseBuild({ rebuild, buildNum });
|
|
99
|
-
await this.#writeSourceArchive({ readme: this.#publicReadme() });
|
|
100
|
-
}
|
|
101
|
-
async#prepareReleaseBuild({ rebuild, buildNum }) {
|
|
102
|
-
const akanConfig = await this.#app.getConfig();
|
|
103
|
-
const platformVersion = akanConfig.mobile.version;
|
|
104
|
-
const buildRoot = `${this.#app.workspace.workspaceRoot}/releases/builds/${this.#app.name}`;
|
|
105
|
-
if (await FileSys2.dirExists(buildRoot))
|
|
106
|
-
await rm(buildRoot, { recursive: true, force: true });
|
|
107
|
-
await mkdir(buildRoot, { recursive: true });
|
|
108
|
-
if (rebuild || !await FileSys2.dirExists(`${this.#app.dist.cwdPath}/backend`))
|
|
109
|
-
await this.#build();
|
|
110
|
-
const buildVersion = `${platformVersion}-${buildNum}`;
|
|
111
|
-
const buildPath = `${buildRoot}/${buildVersion}`;
|
|
112
|
-
await mkdir(buildPath, { recursive: true });
|
|
113
|
-
await cp(`${this.#app.dist.cwdPath}/backend`, `${buildPath}/backend`, { recursive: true });
|
|
114
|
-
await cp(this.#app.dist.cwdPath, buildRoot, { recursive: true });
|
|
115
|
-
await rm(`${buildRoot}/frontend/.next`, { recursive: true, force: true });
|
|
116
|
-
const releaseRoot = this.#app.workspace.workspaceRoot;
|
|
117
|
-
await this.#tar(releaseRoot, `${releaseRoot}/releases/builds/${this.#app.name}-release.tar.gz`, buildRoot);
|
|
118
|
-
await this.#writeCsrZipIfPresent();
|
|
119
|
-
return { platformVersion };
|
|
120
|
-
}
|
|
121
|
-
async#writeCsrZipIfPresent() {
|
|
122
|
-
if (!await FileSys2.dirExists(`${this.#app.dist.cwdPath}/csr`))
|
|
123
|
-
return;
|
|
124
|
-
await cp(`${this.#app.dist.cwdPath}/csr`, "./csr", { recursive: true });
|
|
125
|
-
await this.#app.workspace.spawn("zip", [
|
|
126
|
-
"-r",
|
|
127
|
-
`${this.#app.workspace.workspaceRoot}/releases/builds/${this.#app.name}-appBuild.zip`,
|
|
128
|
-
"./csr"
|
|
129
|
-
]);
|
|
130
|
-
await rm("./csr", { recursive: true, force: true });
|
|
131
|
-
}
|
|
132
|
-
async#writeSourceArchive({ readme }) {
|
|
133
|
-
const sourceRoot = `${this.#app.workspace.workspaceRoot}/releases/sources/${this.#app.name}`;
|
|
134
|
-
await this.#resetSourceRoot(sourceRoot);
|
|
135
|
-
await cp(this.#app.dist.cwdPath, `${sourceRoot}/apps/${this.#app.name}`, { recursive: true });
|
|
136
|
-
const libDeps = ["social", "shared", "platform", "util"];
|
|
137
|
-
await Promise.all(libDeps.map((lib) => cp(`${this.#app.workspace.cwdPath}/libs/${lib}`, `${sourceRoot}/libs/${lib}`, { recursive: true })));
|
|
138
|
-
await Promise.all([".next", "ios", "android", "public/libs"].map(async (path2) => {
|
|
139
|
-
const targetPath = `${sourceRoot}/apps/${this.#app.name}/${path2}`;
|
|
140
|
-
if (await FileSys2.dirExists(targetPath))
|
|
141
|
-
await rm(targetPath, { recursive: true, force: true });
|
|
142
|
-
}));
|
|
143
|
-
const syncPaths = [".husky", ".gitignore", "package.json"];
|
|
144
|
-
await Promise.all(syncPaths.map((path2) => cp(`${this.#app.workspace.cwdPath}/${path2}`, `${sourceRoot}/${path2}`, { recursive: true })));
|
|
145
|
-
await this.#writeSourceTsconfig(sourceRoot, libDeps);
|
|
146
|
-
await Bun.write(`${sourceRoot}/README.md`, readme);
|
|
147
|
-
const sourceCwd = this.#app.workspace.cwdPath;
|
|
148
|
-
await this.#tar(sourceCwd, `${sourceCwd}/releases/sources/${this.#app.name}-source.tar.gz`, sourceRoot);
|
|
149
|
-
}
|
|
150
|
-
async#tar(cwd, archivePath, sourceDir) {
|
|
151
|
-
const relativeArchivePath = path.relative(cwd, archivePath).split(path.sep).join("/");
|
|
152
|
-
await this.#app.workspace.spawn("tar", ["-zcf", relativeArchivePath, "-C", sourceDir, "./"], { cwd });
|
|
153
|
-
}
|
|
154
|
-
async#resetSourceRoot(sourceRoot) {
|
|
155
|
-
if (await FileSys2.dirExists(sourceRoot))
|
|
156
|
-
for (let attempt = 0;attempt < 3; attempt++)
|
|
157
|
-
await rm(sourceRoot, { recursive: true, force: true }).catch(() => {
|
|
158
|
-
return;
|
|
159
|
-
});
|
|
160
|
-
await mkdir(sourceRoot, { recursive: true });
|
|
161
|
-
}
|
|
162
|
-
async#writeSourceTsconfig(sourceRoot, libDeps) {
|
|
163
|
-
const tsconfig = await this.#app.workspace.readJson("tsconfig.json");
|
|
164
|
-
const pathEntries = [[`@${this.#app.name}/*`, [`apps/${this.#app.name}/*`]]];
|
|
165
|
-
for (const lib of libDeps) {
|
|
166
|
-
pathEntries.push([`@${lib}`, [`libs/${lib}/index.ts`]], [`@${lib}/*`, [`libs/${lib}/*`]]);
|
|
167
|
-
}
|
|
168
|
-
tsconfig.compilerOptions.paths = Object.fromEntries(pathEntries);
|
|
169
|
-
await Bun.write(`${sourceRoot}/tsconfig.json`, JSON.stringify(tsconfig, null, 2));
|
|
170
|
-
}
|
|
171
|
-
static #envSetup = ` cat <<EOF >> .env
|
|
172
|
-
# ENV For Server => debug | debug.local | develop | develop.local | main | main.local
|
|
173
|
-
SERVER_ENV=debug.local
|
|
174
|
-
# Run Mode For Server => federation | batch | all
|
|
175
|
-
SERVER_MODE=federation
|
|
176
|
-
# ENV For Client => debug | debug.local | develop | develop.local | main | main.local
|
|
177
|
-
AKAN_PUBLIC_CLIENT_ENV=debug.local
|
|
178
|
-
ANALYZE=false
|
|
179
|
-
EOF
|
|
180
|
-
`;
|
|
181
|
-
#confidentialReadme() {
|
|
182
|
-
return `# ${this.#app.name}
|
|
183
|
-
\uBCF8 \uD504\uB85C\uC81D\uD2B8\uC758 \uC18C\uC2A4\uCF54\uB4DC \uBC0F \uAD00\uB828\uC790\uB8CC\uB294 \uBAA8\uB450 \uBE44\uBC00\uC815\uBCF4\uB85C \uAD00\uB9AC\uB429\uB2C8\uB2E4.
|
|
184
|
-
|
|
185
|
-
## Get Started
|
|
186
|
-
Run the code below.
|
|
187
|
-
\`\`\`
|
|
188
|
-
bun install -g bun
|
|
189
|
-
bun i
|
|
190
|
-
|
|
191
|
-
${ApplicationReleasePackager.#envSetup}
|
|
192
|
-
akn start-backend ${this.#app.name}
|
|
193
|
-
# or akn start-frontend ${this.#app.name}, etc
|
|
194
|
-
\`\`\`
|
|
195
|
-
|
|
196
|
-
## Build
|
|
197
|
-
Run the code below.
|
|
198
|
-
\`\`\`
|
|
199
|
-
akn build-backend ${this.#app.name}
|
|
200
|
-
# or akn build-frontend ${this.#app.name}, etc
|
|
201
|
-
\`\`\`
|
|
202
|
-
`;
|
|
203
|
-
}
|
|
204
|
-
#publicReadme() {
|
|
205
|
-
return `# ${this.#app.name}
|
|
206
|
-
## Get Started
|
|
207
|
-
Run the code below.
|
|
208
|
-
\`\`\`
|
|
209
|
-
${ApplicationReleasePackager.#envSetup}
|
|
210
|
-
akan start ${this.#app.name}
|
|
211
|
-
\`\`\`
|
|
212
|
-
|
|
213
|
-
## Build
|
|
214
|
-
Run the code below.
|
|
215
|
-
\`\`\`
|
|
216
|
-
akan build ${this.#app.name}
|
|
217
|
-
# or akn build-frontend ${this.#app.name}, etc
|
|
218
|
-
\`\`\`
|
|
219
|
-
`;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
export {
|
|
223
|
-
ApplicationReleasePackager
|
|
224
|
-
};
|
package/capacitorApp-1synz4en.js
DELETED
package/cloud.script-bkbpcr96.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
CloudScript2
|
|
4
|
-
} from "./index-8sf7wmdr.js";
|
|
5
|
-
import"./index-axzjaqve.js";
|
|
6
|
-
import"./index-ww4z397j.js";
|
|
7
|
-
import"./index-xqjwd384.js";
|
|
8
|
-
import"./index-5pc1qrbv.js";
|
|
9
|
-
import"./index-as7xmyz8.js";
|
|
10
|
-
import"./index-22d57v4c.js";
|
|
11
|
-
import"./index-w2zdcw3k.js";
|
|
12
|
-
import"./index-7md2g9vw.js";
|
|
13
|
-
import"./index-khpfpcsd.js";
|
|
14
|
-
import"./index-9d9bgcx4.js";
|
|
15
|
-
import"./index-3t7g9e4r.js";
|
|
16
|
-
import"./index-5b6tavv3.js";
|
|
17
|
-
export {
|
|
18
|
-
CloudScript2 as CloudScript
|
|
19
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
ContextRunner2
|
|
4
|
-
} from "./index-nv5976x3.js";
|
|
5
|
-
import"./index-xqpzbab5.js";
|
|
6
|
-
import"./index-3sq321ak.js";
|
|
7
|
-
import"./index-przybvy5.js";
|
|
8
|
-
import"./index-31yr441d.js";
|
|
9
|
-
import"./index-8mna0947.js";
|
|
10
|
-
import"./index-dzf3r49a.js";
|
|
11
|
-
import"./index-ygn77a5w.js";
|
|
12
|
-
import"./index-myhc3c1j.js";
|
|
13
|
-
import"./index-0bq14vr1.js";
|
|
14
|
-
import"./index-mxav6j3c.js";
|
|
15
|
-
import"./index-w2zdcw3k.js";
|
|
16
|
-
import"./index-9d9bgcx4.js";
|
|
17
|
-
import"./index-hj6w4ka1.js";
|
|
18
|
-
import"./index-5b6tavv3.js";
|
|
19
|
-
export {
|
|
20
|
-
ContextRunner2 as ContextRunner
|
|
21
|
-
};
|
package/index-5e0n4hqx.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// pkgs/@akanjs/devkit/mobile/mobileTarget.ts
|
|
3
|
-
var trimSlashes = (value) => value.replace(/^\/+|\/+$/g, "");
|
|
4
|
-
var getMobileTargets = async (app) => {
|
|
5
|
-
const config = await app.getConfig();
|
|
6
|
-
return Object.entries(config.mobile.targets).map(([name, target]) => ({ name, config: target }));
|
|
7
|
-
};
|
|
8
|
-
var getMobileTargetChoices = async (app) => {
|
|
9
|
-
const config = await app.getConfig();
|
|
10
|
-
const targetNames = Object.keys(config.mobile.targets);
|
|
11
|
-
if (targetNames.length > 0)
|
|
12
|
-
return targetNames;
|
|
13
|
-
return [...config.basePaths];
|
|
14
|
-
};
|
|
15
|
-
var resolveMobileTargetByBasePath = (targets, basePath) => {
|
|
16
|
-
const normalizedBasePath = trimSlashes(basePath);
|
|
17
|
-
const byBasePath = targets.find(({ config }) => config.basePath !== undefined && trimSlashes(config.basePath) === normalizedBasePath);
|
|
18
|
-
if (byBasePath)
|
|
19
|
-
return byBasePath;
|
|
20
|
-
const [template] = targets;
|
|
21
|
-
if (!template)
|
|
22
|
-
return;
|
|
23
|
-
return {
|
|
24
|
-
name: normalizedBasePath,
|
|
25
|
-
config: { ...template.config, name: normalizedBasePath, basePath: normalizedBasePath }
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
var resolveMobileTargets = async (app, selection) => {
|
|
29
|
-
const config = await app.getConfig();
|
|
30
|
-
const targets = await getMobileTargets(app);
|
|
31
|
-
if (targets.length === 0)
|
|
32
|
-
throw new Error(`No mobile targets configured for ${app.name}`);
|
|
33
|
-
if (!selection && targets.length === 1)
|
|
34
|
-
return targets;
|
|
35
|
-
if (!selection) {
|
|
36
|
-
const choices = await getMobileTargetChoices(app);
|
|
37
|
-
if (choices.length === 1)
|
|
38
|
-
return resolveMobileTargets(app, choices[0]);
|
|
39
|
-
throw new Error(`Multiple mobile targets found for ${app.name}. Pass --target <${choices.join("|")}|all>.`);
|
|
40
|
-
}
|
|
41
|
-
if (selection === "all") {
|
|
42
|
-
if (Object.keys(config.mobile.targets).length > 1)
|
|
43
|
-
return targets;
|
|
44
|
-
const basePaths = [...config.basePaths];
|
|
45
|
-
if (basePaths.length > 1) {
|
|
46
|
-
return basePaths.flatMap((basePath) => {
|
|
47
|
-
const resolved = resolveMobileTargetByBasePath(targets, basePath);
|
|
48
|
-
return resolved ? [resolved] : [];
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return targets;
|
|
52
|
-
}
|
|
53
|
-
const target = targets.find((candidate) => candidate.name === selection);
|
|
54
|
-
if (target)
|
|
55
|
-
return [target];
|
|
56
|
-
const basePathTarget = resolveMobileTargetByBasePath(targets, selection);
|
|
57
|
-
if (basePathTarget && config.basePaths.has(trimSlashes(selection)))
|
|
58
|
-
return [basePathTarget];
|
|
59
|
-
const choices = await getMobileTargetChoices(app);
|
|
60
|
-
throw new Error(`Mobile target '${selection}' was not found. Available: ${choices.join(", ")}`);
|
|
61
|
-
};
|
|
62
|
-
var resolveMobilePath = (target, pathname) => {
|
|
63
|
-
const basePath = trimSlashes(target.basePath ?? "");
|
|
64
|
-
const normalizedPath = `/${pathname.replace(/^\/+/, "")}`;
|
|
65
|
-
if (!basePath)
|
|
66
|
-
return normalizedPath;
|
|
67
|
-
if (normalizedPath === `/${basePath}` || normalizedPath.startsWith(`/${basePath}/`))
|
|
68
|
-
return normalizedPath;
|
|
69
|
-
return `/${basePath}${normalizedPath === "/" ? "" : normalizedPath}`;
|
|
70
|
-
};
|
|
71
|
-
var targetHtmlFilename = (target) => {
|
|
72
|
-
const basePath = trimSlashes(target.basePath ?? "");
|
|
73
|
-
return basePath ? `${basePath}.html` : "index.html";
|
|
74
|
-
};
|
|
75
|
-
export { getMobileTargets, getMobileTargetChoices, resolveMobileTargets, resolveMobilePath, targetHtmlFilename };
|