@devkong/cli 0.0.10 → 0.0.11

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  3. Build kong-cli: `npx nx run-many -t build -p kong-cli kong-cli-nx`
6
6
  4. Publish kong-cli: `npx nx release publish --git-commit=false`
7
7
  5. Install kong-cli: `npm i -g @devkong/cli@latest --registry="http://localhost:4873/"`
8
- 6. Generate test template: `kong generate my-extension`
8
+ 6. Generate test template: `kong generate <extension-name>`
9
9
 
10
10
  ## Publish to the @devkong
11
11
 
@@ -14,7 +14,7 @@
14
14
  3. Build kong-cli: `npx nx run-many -t build -p kong-cli kong-cli-nx`
15
15
  4. Publish kong-cli: `npx nx release publish --git-commit=false --access=public`
16
16
  5. Install kong-cli: `npm i -g @devkong/cli@latest`
17
- 6. Generate test template: `kong generate my-extension`
17
+ 6. Generate test template: `kong generate <extension-name>`
18
18
 
19
19
  ## Publish to the Nexus
20
20
 
package/index.js CHANGED
@@ -66959,6 +66959,18 @@ var ConfigureCommand = class {
66959
66959
 
66960
66960
  // packages/kong-cli/src/commands/generateCommand.ts
66961
66961
  var import_create_nx_workspace = __toESM(require_create_nx_workspace());
66962
+ var GenerateCommand = class {
66963
+ async execute(extensionName, sdk, presetVersion) {
66964
+ const id = generateShortId();
66965
+ await (0, import_create_nx_workspace.createWorkspace)(`@devkong/cli-nx@${presetVersion}`, {
66966
+ name: extensionName,
66967
+ id,
66968
+ platform: sdk,
66969
+ nxCloud: "skip",
66970
+ packageManager: "npm"
66971
+ });
66972
+ }
66973
+ };
66962
66974
 
66963
66975
  // node_modules/listr2/node_modules/eventemitter3/index.mjs
66964
66976
  var import_index2 = __toESM(require_eventemitter3(), 1);
@@ -69501,24 +69513,6 @@ var InstallCommand = class {
69501
69513
  }
69502
69514
  };
69503
69515
 
69504
- // packages/kong-cli/src/commands/generateCommand.ts
69505
- var GenerateCommand = class {
69506
- constructor(verbose = false) {
69507
- this.verbose = verbose;
69508
- }
69509
- async execute(extensionName, sdk, presetVersion) {
69510
- const id = generateShortId();
69511
- const workspace = await (0, import_create_nx_workspace.createWorkspace)(`@devkong/cli-nx@${presetVersion}`, {
69512
- name: extensionName,
69513
- id,
69514
- platform: sdk,
69515
- nxCloud: "skip",
69516
- packageManager: "npm"
69517
- });
69518
- await new InstallCommand(this.verbose).execute(workspace.directory);
69519
- }
69520
- };
69521
-
69522
69516
  // packages/kong-cli/src/common/kongJson.ts
69523
69517
  var import_fs3 = __toESM(require("fs"));
69524
69518
  var import_json_schema = __toESM(require_validate());
@@ -69806,8 +69800,8 @@ var RegistryClient = class {
69806
69800
  }
69807
69801
  };
69808
69802
 
69809
- // packages/kong-cli/src/commands/publishCommand.ts
69810
- var PublishCommand = class {
69803
+ // packages/kong-cli/src/commands/publishVersionCommand.ts
69804
+ var PublishVersionCommand = class {
69811
69805
  constructor(profile, verbose = false) {
69812
69806
  this.verbose = verbose;
69813
69807
  this.isWin = process.platform === "win32";
@@ -69930,10 +69924,7 @@ var PublishCommand = class {
69930
69924
  return `${this.wslPrefix} /bin/bash -c 'echo ${password} |docker login -u ${username} --password-stdin ${registry3}'`;
69931
69925
  }
69932
69926
  getSchemaCmdText() {
69933
- let engine = ".\\.venv\\Scripts\\python.exe";
69934
- if (process.platform !== "win32") {
69935
- engine = "./.venv/bin/python";
69936
- }
69927
+ const engine = this.isWin ? ".\\.venv\\Scripts\\python.exe" : "./.venv/bin/python";
69937
69928
  const mainPyPath = resolveProjectPath("src/main.py");
69938
69929
  return `${engine} ${mainPyPath} --schema`;
69939
69930
  }
@@ -70034,7 +70025,7 @@ async function main() {
70034
70025
  ).addOption(new Option("--verbose", "Show full logs during command execution")).action(async (name, options) => {
70035
70026
  try {
70036
70027
  const presetVersion = getPresetVersion();
70037
- await new GenerateCommand(options.verbose).execute(name, options.sdk, presetVersion);
70028
+ await new GenerateCommand().execute(name, options.sdk, presetVersion);
70038
70029
  } catch (ex) {
70039
70030
  printError("generate command failed", ex);
70040
70031
  }
@@ -70056,7 +70047,7 @@ async function main() {
70056
70047
  ).addOption(new Option("--profile <name>", "Configured Kong profile to use").default("default")).addOption(new Option("--verbose", "Show full logs during command execution")).addOption(new Option("--notes [text]", "Optional version notes").default("")).action(async (options) => {
70057
70048
  try {
70058
70049
  const kongJson = getKongJson();
70059
- await new PublishCommand(getProfile(options.profile), options.verbose).execute(
70050
+ await new PublishVersionCommand(getProfile(options.profile), options.verbose).execute(
70060
70051
  kongJson.name,
70061
70052
  options.notes
70062
70053
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devkong/cli",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "type": "commonjs",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
@@ -1,5 +1,3 @@
1
1
  export declare class GenerateCommand {
2
- private verbose;
3
- constructor(verbose?: boolean);
4
2
  execute(extensionName: string, sdk: "kotlin" | "python", presetVersion: string): Promise<void>;
5
3
  }
@@ -1,5 +1,5 @@
1
1
  import { Profile } from "../common/profile";
2
- export declare class PublishCommand {
2
+ export declare class PublishVersionCommand {
3
3
  private verbose;
4
4
  private readonly isWin;
5
5
  private registryClient;