@akanjs/cli 0.9.58-canary.5 → 0.9.59

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/cjs/index.js CHANGED
@@ -5871,17 +5871,17 @@ ${import_chalk6.default.green("\u27A4")} Authentication Required`));
5871
5871
  );
5872
5872
  Logger.info("All libraries are published to npm");
5873
5873
  }
5874
- async update(workspace) {
5874
+ async update(workspace, tag = "latest") {
5875
5875
  if (!workspace.exists("package.json"))
5876
- await workspace.spawn("npm", ["update", "-g", "@akanjs/cli", "--latest"]);
5876
+ await workspace.spawn("npm", ["update", "-g", "@akanjs/cli", "--latest", `--tag=${tag}`]);
5877
5877
  else
5878
5878
  await Promise.all([
5879
- workspace.spawn("npm", ["update", "-g", "@akanjs/cli", "--latest"]),
5880
- this.#updateAkanPkgs(workspace)
5879
+ workspace.spawn("npm", ["update", "-g", "@akanjs/cli", "--latest", `--tag=${tag}`]),
5880
+ this.#updateAkanPkgs(workspace, tag)
5881
5881
  ]);
5882
5882
  }
5883
- async #updateAkanPkgs(workspace) {
5884
- const latestPublishedVersionOfBase = await (0, import_latest_version.default)("@akanjs/base");
5883
+ async #updateAkanPkgs(workspace, tag = "latest") {
5884
+ const latestPublishedVersionOfBase = await (0, import_latest_version.default)("@akanjs/base", { version: tag });
5885
5885
  const rootPackageJson = workspace.getPackageJson();
5886
5886
  if (!rootPackageJson.dependencies)
5887
5887
  throw new Error("No dependencies found in package.json");
@@ -5925,9 +5925,9 @@ var CloudScript = class {
5925
5925
  );
5926
5926
  await this.#runner.deployAkan(workspace, akanPkgs);
5927
5927
  }
5928
- async update(workspace) {
5928
+ async update(workspace, tag = "latest") {
5929
5929
  const spinner = workspace.spinning("Updating Akan.js packages and CLI...");
5930
- await this.#runner.update(workspace);
5930
+ await this.#runner.update(workspace, tag);
5931
5931
  spinner.succeed("Akan.js packages and CLI updated, global version is below");
5932
5932
  Logger.raw("> Akan version: ");
5933
5933
  await workspace.spawn("akan", ["--version"], { stdio: "inherit" });
@@ -5955,8 +5955,8 @@ var CloudCommand = class {
5955
5955
  async deployAkan(workspace) {
5956
5956
  await this.cloudScript.deployAkan(workspace);
5957
5957
  }
5958
- async update(workspace) {
5959
- await this.cloudScript.update(workspace);
5958
+ async update(workspace, tag) {
5959
+ await this.cloudScript.update(workspace, tag);
5960
5960
  }
5961
5961
  };
5962
5962
  __decorateClass([
@@ -5986,7 +5986,12 @@ __decorateClass([
5986
5986
  ], CloudCommand.prototype, "deployAkan", 1);
5987
5987
  __decorateClass([
5988
5988
  Target.Public(),
5989
- __decorateParam(0, Workspace())
5989
+ __decorateParam(0, Workspace()),
5990
+ __decorateParam(1, Option("tag", {
5991
+ desc: "tag of the update",
5992
+ default: "latest",
5993
+ enum: ["latest", "dev", "canary", "beta", "rc", "alpha"]
5994
+ }))
5990
5995
  ], CloudCommand.prototype, "update", 1);
5991
5996
  CloudCommand = __decorateClass([
5992
5997
  Commands()
@@ -1,7 +1,6 @@
1
- import { env as shared } from "@shared/server";
2
-
3
1
  import type { ModulesOptions } from "../lib/option";
2
+ import { libEnv } from "./env.server.type";
4
3
 
5
4
  export const env: ModulesOptions = {
6
- ...shared,
5
+ ...libEnv,
7
6
  };
@@ -1,7 +1,6 @@
1
- import { env as shared } from "@shared/server";
2
-
3
1
  import type { ModulesOptions } from "../lib/option";
2
+ import { libEnv } from "./env.server.type";
4
3
 
5
4
  export const env: ModulesOptions = {
6
- ...shared,
5
+ ...libEnv,
7
6
  };
@@ -1,7 +1,6 @@
1
- import { env as shared } from "@shared/server";
2
-
3
1
  import type { ModulesOptions } from "../lib/option";
2
+ import { libEnv } from "./env.server.type";
4
3
 
5
4
  export const env: ModulesOptions = {
6
- ...shared,
5
+ ...libEnv,
7
6
  };
package/esm/index.js CHANGED
@@ -5852,17 +5852,17 @@ ${chalk6.green("\u27A4")} Authentication Required`));
5852
5852
  );
5853
5853
  Logger.info("All libraries are published to npm");
5854
5854
  }
5855
- async update(workspace) {
5855
+ async update(workspace, tag = "latest") {
5856
5856
  if (!workspace.exists("package.json"))
5857
- await workspace.spawn("npm", ["update", "-g", "@akanjs/cli", "--latest"]);
5857
+ await workspace.spawn("npm", ["update", "-g", "@akanjs/cli", "--latest", `--tag=${tag}`]);
5858
5858
  else
5859
5859
  await Promise.all([
5860
- workspace.spawn("npm", ["update", "-g", "@akanjs/cli", "--latest"]),
5861
- this.#updateAkanPkgs(workspace)
5860
+ workspace.spawn("npm", ["update", "-g", "@akanjs/cli", "--latest", `--tag=${tag}`]),
5861
+ this.#updateAkanPkgs(workspace, tag)
5862
5862
  ]);
5863
5863
  }
5864
- async #updateAkanPkgs(workspace) {
5865
- const latestPublishedVersionOfBase = await latestVersion("@akanjs/base");
5864
+ async #updateAkanPkgs(workspace, tag = "latest") {
5865
+ const latestPublishedVersionOfBase = await latestVersion("@akanjs/base", { version: tag });
5866
5866
  const rootPackageJson = workspace.getPackageJson();
5867
5867
  if (!rootPackageJson.dependencies)
5868
5868
  throw new Error("No dependencies found in package.json");
@@ -5906,9 +5906,9 @@ var CloudScript = class {
5906
5906
  );
5907
5907
  await this.#runner.deployAkan(workspace, akanPkgs);
5908
5908
  }
5909
- async update(workspace) {
5909
+ async update(workspace, tag = "latest") {
5910
5910
  const spinner = workspace.spinning("Updating Akan.js packages and CLI...");
5911
- await this.#runner.update(workspace);
5911
+ await this.#runner.update(workspace, tag);
5912
5912
  spinner.succeed("Akan.js packages and CLI updated, global version is below");
5913
5913
  Logger.raw("> Akan version: ");
5914
5914
  await workspace.spawn("akan", ["--version"], { stdio: "inherit" });
@@ -5936,8 +5936,8 @@ var CloudCommand = class {
5936
5936
  async deployAkan(workspace) {
5937
5937
  await this.cloudScript.deployAkan(workspace);
5938
5938
  }
5939
- async update(workspace) {
5940
- await this.cloudScript.update(workspace);
5939
+ async update(workspace, tag) {
5940
+ await this.cloudScript.update(workspace, tag);
5941
5941
  }
5942
5942
  };
5943
5943
  __decorateClass([
@@ -5967,7 +5967,12 @@ __decorateClass([
5967
5967
  ], CloudCommand.prototype, "deployAkan", 1);
5968
5968
  __decorateClass([
5969
5969
  Target.Public(),
5970
- __decorateParam(0, Workspace())
5970
+ __decorateParam(0, Workspace()),
5971
+ __decorateParam(1, Option("tag", {
5972
+ desc: "tag of the update",
5973
+ default: "latest",
5974
+ enum: ["latest", "dev", "canary", "beta", "rc", "alpha"]
5975
+ }))
5971
5976
  ], CloudCommand.prototype, "update", 1);
5972
5977
  CloudCommand = __decorateClass([
5973
5978
  Commands()
@@ -1,7 +1,6 @@
1
- import { env as shared } from "@shared/server";
2
-
3
1
  import type { ModulesOptions } from "../lib/option";
2
+ import { libEnv } from "./env.server.type";
4
3
 
5
4
  export const env: ModulesOptions = {
6
- ...shared,
5
+ ...libEnv,
7
6
  };
@@ -1,7 +1,6 @@
1
- import { env as shared } from "@shared/server";
2
-
3
1
  import type { ModulesOptions } from "../lib/option";
2
+ import { libEnv } from "./env.server.type";
4
3
 
5
4
  export const env: ModulesOptions = {
6
- ...shared,
5
+ ...libEnv,
7
6
  };
@@ -1,7 +1,6 @@
1
- import { env as shared } from "@shared/server";
2
-
3
1
  import type { ModulesOptions } from "../lib/option";
2
+ import { libEnv } from "./env.server.type";
4
3
 
5
4
  export const env: ModulesOptions = {
6
- ...shared,
5
+ ...libEnv,
7
6
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "sourceType": "module",
4
4
  "name": "@akanjs/cli",
5
- "version": "0.9.58-canary.5",
5
+ "version": "0.9.59",
6
6
  "bin": {
7
7
  "akan": "esm/index.js"
8
8
  },
@@ -8,5 +8,5 @@ export declare class CloudCommand {
8
8
  resetLlm(workspace: Workspace): void;
9
9
  ask(question: string, workspace: Workspace): Promise<void>;
10
10
  deployAkan(workspace: Workspace): Promise<void>;
11
- update(workspace: Workspace): Promise<void>;
11
+ update(workspace: Workspace, tag: string): Promise<void>;
12
12
  }
@@ -7,5 +7,5 @@ export declare class CloudRunner {
7
7
  resetLlm(): void;
8
8
  getAkanPkgs(workspace: Workspace): Promise<string[]>;
9
9
  deployAkan(workspace: Workspace, akanPkgs: string[]): Promise<void>;
10
- update(workspace: Workspace): Promise<void>;
10
+ update(workspace: Workspace, tag?: string): Promise<void>;
11
11
  }
@@ -7,5 +7,5 @@ export declare class CloudScript {
7
7
  resetLlm(workspace: Workspace): void;
8
8
  ask(question: string, workspace: Workspace): Promise<void>;
9
9
  deployAkan(workspace: Workspace): Promise<void>;
10
- update(workspace: Workspace): Promise<void>;
10
+ update(workspace: Workspace, tag?: string): Promise<void>;
11
11
  }
@@ -1,10 +0,0 @@
1
- // import { PageAgent } from "@akanjs/next";
2
- // import { expect, test } from "@playwright/test";
3
-
4
- // test.describe("index page", () => {
5
- // test("has title", async ({ page }) => {
6
- // const agent = new PageAgent(page);
7
- // await agent.goto("/");
8
- // expect(agent.page).toBeTruthy();
9
- // });
10
- // });
@@ -1,6 +0,0 @@
1
- //! will be replaced with akan.config.ts
2
- import { withBase } from "@akanjs/test/playwright.config.base";
3
-
4
- const config = withBase(__filename);
5
-
6
- export default config;
@@ -1,10 +0,0 @@
1
- // import { PageAgent } from "@akanjs/next";
2
- // import { expect, test } from "@playwright/test";
3
-
4
- // test.describe("index page", () => {
5
- // test("has title", async ({ page }) => {
6
- // const agent = new PageAgent(page);
7
- // await agent.goto("/");
8
- // expect(agent.page).toBeTruthy();
9
- // });
10
- // });
@@ -1,6 +0,0 @@
1
- //! will be replaced with akan.config.ts
2
- import { withBase } from "@akanjs/test/playwright.config.base";
3
-
4
- const config = withBase(__filename);
5
-
6
- export default config;