@akanjs/cli 3.0.2-rc.0 → 3.0.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 +1 -1
- package/{application.command-fyjy9ryc.js → application.command-gk69v1xs.js} +2 -2
- package/{applicationBuildRunner-etrzfwjj.js → applicationBuildRunner-wx09n9g6.js} +2 -2
- package/buildBatch.proc.js +3 -3
- package/{cloud.command-c0rnwy65.js → cloud.command-tw06613r.js} +3 -3
- package/{cloud.script-6ba8e9v8.js → cloud.script-64gzba8r.js} +3 -3
- package/incrementalBuilder.proc.js +2 -2
- package/{index-krjcg4y6.js → index-gtjgnv36.js} +1 -1
- package/{index-senscydg.js → index-k9rrten6.js} +6 -1
- package/{index-61mmsdjg.js → index-nwd6qzvv.js} +37 -18
- package/{index-gvpvxdm1.js → index-t91a7339.js} +1 -1
- package/{index-d95tfg3n.js → index-z750gk1j.js} +2 -2
- package/index.js +5 -5
- package/{localRegistry.command-vacc2njh.js → localRegistry.command-kda81jyk.js} +2 -2
- package/package.json +2 -2
- package/{subspace.command-j7ayp382.js → subspace.command-ft65qvc4.js} +1 -1
- package/templates/app/tsconfig.json.template +1 -6
- package/{workspace.command-17c46dbp.js → workspace.command-vp6vmx3z.js} +3 -3
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ed6c6a9442699bc1b0b2b6ddbe72d0cdd440f78e0d21be5e06bc85a7790491eb
|
|
@@ -12,11 +12,11 @@ import"./index-50wb2a26.js";
|
|
|
12
12
|
import {
|
|
13
13
|
getMobileTargetChoices
|
|
14
14
|
} from "./index-jk9xnck6.js";
|
|
15
|
-
import"./index-
|
|
15
|
+
import"./index-k9rrten6.js";
|
|
16
16
|
import"./index-1bjkfvm9.js";
|
|
17
17
|
import {
|
|
18
18
|
ApplicationScript
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-nwd6qzvv.js";
|
|
20
20
|
import"./index-7md2g9vw.js";
|
|
21
21
|
import"./index-50jjwg8y.js";
|
|
22
22
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Spinner
|
|
4
4
|
} from "./index-50wb2a26.js";
|
|
5
|
-
import"./index-
|
|
5
|
+
import"./index-gtjgnv36.js";
|
|
6
6
|
import {
|
|
7
7
|
AllRoutesBuilder,
|
|
8
8
|
CsrArtifactBuilder,
|
|
9
9
|
FontPruner,
|
|
10
10
|
precompressArtifacts,
|
|
11
11
|
SsrBaseArtifactBuilder
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-z750gk1j.js";
|
|
13
13
|
import"./index-52w0fvh8.js";
|
|
14
14
|
import"./index-n68jx79w.js";
|
|
15
15
|
|
package/buildBatch.proc.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ApplicationBuildReporter
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-k9rrten6.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveSsrPageEntriesForApp,
|
|
7
7
|
WorkspaceExecutor,
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
PagesBundleBuilder,
|
|
15
15
|
CsrDevBundler,
|
|
16
16
|
SsrDevBundler
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-gtjgnv36.js";
|
|
18
18
|
import"./index-52w0fvh8.js";
|
|
19
19
|
import {
|
|
20
20
|
CsrArtifactBuilder,
|
|
21
21
|
CssCompiler,
|
|
22
22
|
FontOptimizer,
|
|
23
23
|
SsrBaseArtifactBuilder
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-z750gk1j.js";
|
|
25
25
|
import"./index-n68jx79w.js";
|
|
26
26
|
|
|
27
27
|
// pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
|
|
@@ -11,16 +11,16 @@ import"./index-50wb2a26.js";
|
|
|
11
11
|
import {
|
|
12
12
|
PlatformTestRun
|
|
13
13
|
} from "./index-hxnnfy57.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-k9rrten6.js";
|
|
15
15
|
import"./index-jk9xnck6.js";
|
|
16
16
|
import"./index-1bjkfvm9.js";
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-nwd6qzvv.js";
|
|
18
18
|
import"./index-7md2g9vw.js";
|
|
19
19
|
import"./index-2ahj896a.js";
|
|
20
20
|
import"./index-3xmzr1p1.js";
|
|
21
21
|
import {
|
|
22
22
|
CloudScript2
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-t91a7339.js";
|
|
24
24
|
import"./index-50jjwg8y.js";
|
|
25
25
|
|
|
26
26
|
// pkgs/@akanjs/cli/cloud/cloud.command.ts
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
CloudScript2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-t91a7339.js";
|
|
5
5
|
import"./index-hxnnfy57.js";
|
|
6
6
|
import"./index-3xmzr1p1.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-nwd6qzvv.js";
|
|
8
8
|
import"./index-50jjwg8y.js";
|
|
9
9
|
import"./index-1bjkfvm9.js";
|
|
10
10
|
import"./index-jk9xnck6.js";
|
|
11
11
|
import"./index-94s080qm.js";
|
|
12
12
|
import"./index-q6ft9fkc.js";
|
|
13
13
|
import"./index-7md2g9vw.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-k9rrten6.js";
|
|
15
15
|
import"./index-50wb2a26.js";
|
|
16
16
|
import"./index-2ahj896a.js";
|
|
17
17
|
import"./index-52w0fvh8.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ApplicationBuildReporter,
|
|
4
4
|
HmrWatcher,
|
|
5
5
|
WatchRootResolver
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-k9rrten6.js";
|
|
7
7
|
import {
|
|
8
8
|
CodegenLock,
|
|
9
9
|
WorkspaceExecutor,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
DevChangePlanner,
|
|
21
21
|
DevGeneratedIndexSync,
|
|
22
22
|
SsrDevBundler
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-gtjgnv36.js";
|
|
24
24
|
import {
|
|
25
25
|
prepareDevWatchBatch
|
|
26
26
|
} from "./index-a5vmm6x4.js";
|
|
@@ -80,6 +80,11 @@ import path3 from "path";
|
|
|
80
80
|
|
|
81
81
|
// pkgs/@akanjs/devkit/akanApp/devHostPolicy.ts
|
|
82
82
|
import path2 from "path";
|
|
83
|
+
var UNAVAILABLE_REDIS_HOST = "redis-tunnel-unavailable.invalid";
|
|
84
|
+
var redisTunnelPolicy = ({
|
|
85
|
+
environment,
|
|
86
|
+
databaseMode
|
|
87
|
+
}) => environment === "local" ? "none" : databaseMode === "single" ? "optional" : "required";
|
|
83
88
|
var BACKEND_RECOVERY_MAX_ATTEMPTS = 5;
|
|
84
89
|
var HELD_BUILDER_REQUEST_LIMIT = 64;
|
|
85
90
|
var BUILDER_MIN_RSS_RECYCLE_INTERVAL_MS = 30000;
|
|
@@ -833,4 +838,4 @@ class WatchRootResolver {
|
|
|
833
838
|
}
|
|
834
839
|
}
|
|
835
840
|
|
|
836
|
-
export { ApplicationBuildReporter, BUILDER_MIN_RSS_RECYCLE_INTERVAL_MS, SOURCE_EXTS, shouldRestartBackendByDevPlan, shouldRestartBuilderByDevPlan, shouldAbandonBackendRecovery, normalizeBackendReportedGeneration, shouldRestartDevHostByDevPlan, devHostStateOf, isLegacyBackendFallbackFile, shouldMarkBuildPhaseRecovered, shouldKeepBuildFailure, createBackendBuildStatus, backendRestartReasonFromMessage, mergeBackendRestartReasons, shouldReplaceLastGoodMessage, shouldQueueBuildStatusReplay, hasBuildFailureForGeneration, decideBuilderRssRecycle, decideBuilderRssSettle, decideIdleSuspend, resolveIdleSuspendMs, hasAnyBuildFailure, shouldRefreshConfigOnIdleWake, shouldHoldForReturningBuilder, shouldWarnBuilderRssCeilingTight, isRssCeilingUnreachable, shouldRelayRecycledFrontendState, mergeInvalidateMessages, buildStatusReplaySequence, filesChangedSince, HmrWatcher, WatchRootResolver };
|
|
841
|
+
export { ApplicationBuildReporter, UNAVAILABLE_REDIS_HOST, redisTunnelPolicy, BUILDER_MIN_RSS_RECYCLE_INTERVAL_MS, SOURCE_EXTS, shouldRestartBackendByDevPlan, shouldRestartBuilderByDevPlan, shouldAbandonBackendRecovery, normalizeBackendReportedGeneration, shouldRestartDevHostByDevPlan, devHostStateOf, isLegacyBackendFallbackFile, shouldMarkBuildPhaseRecovered, shouldKeepBuildFailure, createBackendBuildStatus, backendRestartReasonFromMessage, mergeBackendRestartReasons, shouldReplaceLastGoodMessage, shouldQueueBuildStatusReplay, hasBuildFailureForGeneration, decideBuilderRssRecycle, decideBuilderRssSettle, decideIdleSuspend, resolveIdleSuspendMs, hasAnyBuildFailure, shouldRefreshConfigOnIdleWake, shouldHoldForReturningBuilder, shouldWarnBuilderRssCeilingTight, isRssCeilingUnreachable, shouldRelayRecycledFrontendState, mergeInvalidateMessages, buildStatusReplaySequence, filesChangedSince, HmrWatcher, WatchRootResolver };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ApplicationBuildReporter,
|
|
4
|
+
UNAVAILABLE_REDIS_HOST,
|
|
5
|
+
redisTunnelPolicy,
|
|
4
6
|
BUILDER_MIN_RSS_RECYCLE_INTERVAL_MS,
|
|
5
7
|
SOURCE_EXTS,
|
|
6
8
|
shouldRestartBackendByDevPlan,
|
|
@@ -33,7 +35,7 @@ import {
|
|
|
33
35
|
filesChangedSince,
|
|
34
36
|
HmrWatcher,
|
|
35
37
|
WatchRootResolver
|
|
36
|
-
} from "./index-
|
|
38
|
+
} from "./index-k9rrten6.js";
|
|
37
39
|
import {
|
|
38
40
|
runner,
|
|
39
41
|
script
|
|
@@ -187,20 +189,29 @@ var closeBunSocket = (socket, error) => {
|
|
|
187
189
|
// pkgs/@akanjs/devkit/createTunnel.ts
|
|
188
190
|
var createTunnel = async (service, { app, environment, port = service === "postgres" ? 5432 : 6379 }) => {
|
|
189
191
|
const { serveDomain, repoName } = WorkspaceExecutor.getBaseDevEnv();
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
192
|
+
const host = `${app.name}-${environment}.${serveDomain}`;
|
|
193
|
+
const sshPort = process.env.SSH_TUNNEL_PORT ? parseInt(process.env.SSH_TUNNEL_PORT) : 32767;
|
|
194
|
+
const dstHost = `${service}-0.${service}-svc.${app.name}-${environment}.svc.cluster.local`;
|
|
195
|
+
const dstPort = service === "postgres" ? 5432 : 6379;
|
|
196
|
+
try {
|
|
197
|
+
await createSshTunnel({
|
|
198
|
+
localHost: "0.0.0.0",
|
|
199
|
+
localPort: port,
|
|
200
|
+
srcHost: "0.0.0.0",
|
|
201
|
+
srcPort: port,
|
|
202
|
+
dstHost,
|
|
203
|
+
dstPort,
|
|
204
|
+
sshOptions: {
|
|
205
|
+
host: host.endsWith(".localhost") ? "localhost" : host,
|
|
206
|
+
port: sshPort,
|
|
207
|
+
username: process.env.SSH_TUNNEL_USERNAME ?? "root",
|
|
208
|
+
password: process.env.SSH_TUNNEL_PASSWORD ?? repoName
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
} catch (error) {
|
|
212
|
+
const reasons = error instanceof AggregateError ? error.errors.map((reason) => reason instanceof Error ? reason.message : String(reason)).join("; ") : error instanceof Error ? error.message : String(error);
|
|
213
|
+
throw new Error(`Could not open the ${service} tunnel for ${app.name}-${environment}: SSH ${host}:${sshPort} -> ${dstHost}:${dstPort} failed (${reasons})`, { cause: error });
|
|
214
|
+
}
|
|
204
215
|
return `localhost:${port}`;
|
|
205
216
|
};
|
|
206
217
|
// pkgs/@akanjs/devkit/incrementalBuilder/incrementalBuilder.host.ts
|
|
@@ -818,9 +829,17 @@ class AkanAppHost {
|
|
|
818
829
|
}
|
|
819
830
|
async#prepareDatabase(type) {
|
|
820
831
|
const environment = WorkspaceExecutor.getBaseDevEnv().env;
|
|
821
|
-
|
|
832
|
+
const policy = redisTunnelPolicy({ environment, databaseMode: this.env.AKAN_DATABASE_MODE });
|
|
833
|
+
if (policy === "none")
|
|
822
834
|
return "localhost";
|
|
823
|
-
|
|
835
|
+
if (policy === "required")
|
|
836
|
+
return await createTunnel(type, { app: this.app, environment });
|
|
837
|
+
try {
|
|
838
|
+
return await createTunnel(type, { app: this.app, environment });
|
|
839
|
+
} catch (error) {
|
|
840
|
+
this.logger.warn(`${error instanceof Error ? error.message : String(error)} - continuing without Redis: the single database mode does not use it unless an app adaptor does`);
|
|
841
|
+
return UNAVAILABLE_REDIS_HOST;
|
|
842
|
+
}
|
|
824
843
|
}
|
|
825
844
|
#startBackend(startStatus = null) {
|
|
826
845
|
if (this.#stopping)
|
|
@@ -1867,7 +1886,7 @@ ${uniqueCandidates.map((candidate) => ` - ${candidate}`).join(`
|
|
|
1867
1886
|
|
|
1868
1887
|
// pkgs/@akanjs/cli/application/application.runner.ts
|
|
1869
1888
|
import { Logger as Logger3 } from "akanjs/common";
|
|
1870
|
-
var loadBuildRunner = async () => (await import("./applicationBuildRunner-
|
|
1889
|
+
var loadBuildRunner = async () => (await import("./applicationBuildRunner-wx09n9g6.js")).ApplicationBuildRunner;
|
|
1871
1890
|
var loadPrompts = async () => await import("@inquirer/prompts");
|
|
1872
1891
|
|
|
1873
1892
|
class ApplicationRunner extends runner("application") {
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
CsrEntryFiles,
|
|
17
17
|
PagesEntrySourceGenerator,
|
|
18
18
|
PagesBundleBuilder
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-gtjgnv36.js";
|
|
20
20
|
import {
|
|
21
21
|
SOURCE_EXTS
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-k9rrten6.js";
|
|
23
23
|
var __require = import.meta.require;
|
|
24
24
|
|
|
25
25
|
// pkgs/@akanjs/devkit/frontendBuild/allRoutesBuilder.ts
|
package/index.js
CHANGED
|
@@ -13,18 +13,18 @@ import path from "path";
|
|
|
13
13
|
|
|
14
14
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
15
15
|
var commandModules = {
|
|
16
|
-
workspace: async () => (await import("./workspace.command-
|
|
16
|
+
workspace: async () => (await import("./workspace.command-vp6vmx3z.js")).WorkspaceCommand,
|
|
17
17
|
agent: async () => (await import("./agent.command-np1dffkb.js")).AgentCommand,
|
|
18
18
|
code: async () => (await import("./code.command-hmtx14b2.js")).CodeCommand,
|
|
19
|
-
application: async () => (await import("./application.command-
|
|
19
|
+
application: async () => (await import("./application.command-gk69v1xs.js")).ApplicationCommand,
|
|
20
20
|
library: async () => (await import("./library.command-9m2rdwwz.js")).LibraryCommand,
|
|
21
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
21
|
+
localRegistry: async () => (await import("./localRegistry.command-kda81jyk.js")).LocalRegistryCommand,
|
|
22
22
|
package: async () => (await import("./package.command-y2jh0m99.js")).PackageCommand,
|
|
23
23
|
module: async () => (await import("./module.command-q63dffya.js")).ModuleCommand,
|
|
24
24
|
page: async () => (await import("./page.command-f3e4cwhh.js")).PageCommand,
|
|
25
25
|
context: async () => (await import("./context.command-6aqvdx43.js")).ContextCommand,
|
|
26
|
-
cloud: async () => (await import("./cloud.command-
|
|
27
|
-
subspace: async () => (await import("./subspace.command-
|
|
26
|
+
cloud: async () => (await import("./cloud.command-tw06613r.js")).CloudCommand,
|
|
27
|
+
subspace: async () => (await import("./subspace.command-ft65qvc4.js")).SubspaceCommand,
|
|
28
28
|
guideline: async () => (await import("./guideline.command-axvf68gc.js")).GuidelineCommand,
|
|
29
29
|
scalar: async () => (await import("./scalar.command-kddn7av4.js")).ScalarCommand,
|
|
30
30
|
primitive: async () => (await import("./primitive.command-r4kq75qj.js")).PrimitiveCommand,
|
|
@@ -9,12 +9,12 @@ import"./index-52w0fvh8.js";
|
|
|
9
9
|
import {
|
|
10
10
|
PkgExecutor
|
|
11
11
|
} from "./index-50wb2a26.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-k9rrten6.js";
|
|
13
13
|
import"./index-jk9xnck6.js";
|
|
14
14
|
import"./index-1bjkfvm9.js";
|
|
15
15
|
import {
|
|
16
16
|
ApplicationScript
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-nwd6qzvv.js";
|
|
18
18
|
import"./index-7md2g9vw.js";
|
|
19
19
|
import"./index-94s080qm.js";
|
|
20
20
|
import {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "3.0.2
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@earendil-works/pi-tui": "0.86.1",
|
|
40
40
|
"@inquirer/prompts": "^8.4.3",
|
|
41
41
|
"@tailwindcss/node": "^4.3.0",
|
|
42
|
-
"akanjs": "3.0.2
|
|
42
|
+
"akanjs": "3.0.2",
|
|
43
43
|
"chalk": "^5.6.2",
|
|
44
44
|
"commander": "^14.0.3",
|
|
45
45
|
"dayjs": "^1.11.20",
|
|
@@ -714,7 +714,7 @@ class SubspaceRunner extends runner("subspace") {
|
|
|
714
714
|
if (!asked)
|
|
715
715
|
return { name: subspace.name, workspaceId, host, apps, libs: [], outcome: "cancelled", files: [] };
|
|
716
716
|
const { libs } = await subspace.slice();
|
|
717
|
-
const { CloudScript } = await import("./cloud.script-
|
|
717
|
+
const { CloudScript } = await import("./cloud.script-64gzba8r.js");
|
|
718
718
|
const { files } = await CommandContainer.get(CloudScript).uploadEnv(workspace, {
|
|
719
719
|
host,
|
|
720
720
|
workspaceId,
|
|
@@ -38,14 +38,14 @@ import"./index-zzvvc845.js";
|
|
|
38
38
|
import {
|
|
39
39
|
AgentScript
|
|
40
40
|
} from "./index-1gs9g12n.js";
|
|
41
|
-
import"./index-
|
|
41
|
+
import"./index-k9rrten6.js";
|
|
42
42
|
import"./index-jk9xnck6.js";
|
|
43
43
|
import {
|
|
44
44
|
LibraryScript
|
|
45
45
|
} from "./index-1bjkfvm9.js";
|
|
46
46
|
import {
|
|
47
47
|
ApplicationScript
|
|
48
|
-
} from "./index-
|
|
48
|
+
} from "./index-nwd6qzvv.js";
|
|
49
49
|
import"./index-7md2g9vw.js";
|
|
50
50
|
import"./index-2ahj896a.js";
|
|
51
51
|
import {
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
} from "./index-hxnnfy57.js";
|
|
58
58
|
import {
|
|
59
59
|
CloudScript2
|
|
60
|
-
} from "./index-
|
|
60
|
+
} from "./index-t91a7339.js";
|
|
61
61
|
import"./index-j38qkvkk.js";
|
|
62
62
|
import"./index-hp3stk1m.js";
|
|
63
63
|
import"./index-g38nhv87.js";
|