@akanjs/cli 2.3.10 → 2.3.11-rc.1

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
@@ -17458,21 +17458,21 @@ class CloudScript extends script("cloud", [CloudRunner, ApplicationScript, Packa
17458
17458
  const session = new AiSession("general", { workspace, isContinued: true });
17459
17459
  await session.ask(question);
17460
17460
  }
17461
- async downloadEnv(workspace, workspaceId = workspace.getWorkspaceId({ allowEmpty: true })) {
17461
+ async downloadEnv(workspace, workspaceId = workspace.getWorkspaceId({ allowEmpty: true }), { host = GlobalConfig.akanCloudHost } = {}) {
17462
17462
  if (workspaceId) {
17463
- await this.login(workspace);
17464
- const cloudApi2 = await CloudApi.fromHost(workspace);
17463
+ await this.login(workspace, host);
17464
+ const cloudApi2 = await CloudApi.fromHost(workspace, host);
17465
17465
  await this.cloudRunner.downloadEnv(cloudApi2, workspace, workspaceId);
17466
17466
  return;
17467
17467
  }
17468
17468
  await this.cloudRunner.downloadEnvByScp(workspace);
17469
17469
  }
17470
- async uploadEnv(workspace) {
17470
+ async uploadEnv(workspace, { host = GlobalConfig.akanCloudHost } = {}) {
17471
17471
  const workspaceId = workspace.getWorkspaceId({ allowEmpty: true });
17472
17472
  const { path: path46 } = await this.cloudRunner.gatherEnvFiles(workspace);
17473
17473
  if (workspaceId) {
17474
- await this.login(workspace);
17475
- const cloudApi2 = await CloudApi.fromHost(workspace);
17474
+ await this.login(workspace, host);
17475
+ const cloudApi2 = await CloudApi.fromHost(workspace, host);
17476
17476
  await this.cloudRunner.uploadEnv(cloudApi2, workspaceId, path46);
17477
17477
  return;
17478
17478
  }
@@ -17557,13 +17557,13 @@ class CloudCommand extends command("cloud", [CloudScript], ({ public: target })
17557
17557
  }),
17558
17558
  downloadEnv: target({
17559
17559
  desc: "Download environment variables from cloud or SCP server"
17560
- }).with(Workspace).exec(async function(workspace) {
17561
- await this.cloudScript.downloadEnv(workspace);
17560
+ }).option("host", String, { desc: "host of the cloud to target", default: GlobalConfig.akanCloudHost }).with(Workspace).exec(async function(host, workspace) {
17561
+ await this.cloudScript.downloadEnv(workspace, undefined, { host });
17562
17562
  }),
17563
17563
  uploadEnv: target({
17564
17564
  desc: "Upload environment variables to cloud or SCP server"
17565
- }).with(Workspace).exec(async function(workspace) {
17566
- await this.cloudScript.uploadEnv(workspace);
17565
+ }).option("host", String, { desc: "host of the cloud to target", default: GlobalConfig.akanCloudHost }).with(Workspace).exec(async function(host, workspace) {
17566
+ await this.cloudScript.uploadEnv(workspace, { host });
17567
17567
  })
17568
17568
  })) {
17569
17569
  }
@@ -21307,7 +21307,7 @@ class WorkspaceScript extends script("workspace", [
21307
21307
  for (const appName of appNames)
21308
21308
  await this.applicationScript.sync(AppExecutor.from(workspace, appName));
21309
21309
  }
21310
- async init(devProjectId, workspace) {
21310
+ async init(devProjectId, workspace, { host } = {}) {
21311
21311
  const [bunfigExists, packageJsonExists, tsconfigExists] = await Promise.all([
21312
21312
  workspace.exists("bunfig.toml"),
21313
21313
  workspace.exists("package.json"),
@@ -21319,7 +21319,7 @@ class WorkspaceScript extends script("workspace", [
21319
21319
  const spinner2 = workspace.spinning("Initializing workspace...");
21320
21320
  try {
21321
21321
  await this.workspaceRunner.writeTopLevelEnv(workspace, devProjectId);
21322
- await this.cloudScript.downloadEnv(workspace, devProjectId);
21322
+ await this.cloudScript.downloadEnv(workspace, devProjectId, { host });
21323
21323
  spinner2.succeed("Workspace initialized");
21324
21324
  } catch (error) {
21325
21325
  spinner2.fail("Workspace initialization failed");
@@ -21379,8 +21379,8 @@ class WorkspaceCommand extends command("workspace", [WorkspaceScript], ({ public
21379
21379
  syncAll: target({ desc: "Sync dependencies and configuration for all apps and libraries" }).with(Workspace).exec(async function(workspace) {
21380
21380
  await this.workspaceScript.syncAll(workspace);
21381
21381
  }),
21382
- init: target({ desc: "Initialize the workspace", runsOnWorkspaceRoot: false }).arg("devProjectId", String, { desc: "the ID of the workspace" }).with(Workspace).exec(async function(devProjectId, workspace) {
21383
- await this.workspaceScript.init(devProjectId, workspace);
21382
+ init: target({ desc: "Initialize the workspace", runsOnWorkspaceRoot: false }).arg("devProjectId", String, { desc: "the ID of the workspace" }).option("host", String, { desc: "host of the cloud to target", default: GlobalConfig.akanCloudHost }).with(Workspace).exec(async function(devProjectId, host, workspace) {
21383
+ await this.workspaceScript.init(devProjectId, workspace, { host });
21384
21384
  })
21385
21385
  })) {
21386
21386
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "2.3.10",
3
+ "version": "2.3.11-rc.1",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -34,7 +34,7 @@
34
34
  "@langchain/openai": "^1.4.6",
35
35
  "@tailwindcss/node": "^4.3.0",
36
36
  "@trapezedev/project": "^7.1.4",
37
- "akanjs": "2.3.10",
37
+ "akanjs": "2.3.11-rc.1",
38
38
  "chalk": "^5.6.2",
39
39
  "commander": "^14.0.3",
40
40
  "daisyui": "5.5.23",
@@ -31,7 +31,7 @@ export const dictionary = makeDictionary(${libs.length ? libs.join(", ") : "base
31
31
  ${[
32
32
  ...databaseModules.map((module) => {
33
33
  const Module = capitalize(module);
34
- return `${module}: registerModelTrans<"${module}", ${module}Cnst.${Module}, ${module}Cnst.${Module}Insight, ${module}Doc.${Module}Filter, ${module}Sig.${Module}Slice, ${module}Sig.${Module}Endpoint, any>(${module}.dictionary.applyBaseSignal("${module}" as const) as any)`;
34
+ return `${module}: registerModelTrans<"${module}", ${module}Cnst.${Module}, ${module}Cnst.${Module}Insight, ${module}Doc.${Module}Filter, ${module}Sig.${Module}Slice, ${module}Sig.${Module}Endpoint, typeof ${module}.dictionary>(${module}.dictionary.applyBaseSignal("${module}" as const))`;
35
35
  }),
36
36
  ...scalarModules.map(
37
37
  (module) =>