@devkong/cli 0.0.27 → 0.0.28

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
@@ -77623,6 +77623,7 @@ function getExtensionContract(filePath) {
77623
77623
  }
77624
77624
 
77625
77625
  // packages/kong-cli/src/commands/publishVersionCommand.ts
77626
+ var import_child_process2 = require("child_process");
77626
77627
  var PublishVersionCommand = class {
77627
77628
  constructor(profile, verbose = false, contractPath = null) {
77628
77629
  this.verbose = verbose;
@@ -77635,9 +77636,11 @@ var PublishVersionCommand = class {
77635
77636
  const clientHeaderProvider = headerProvider(profile);
77636
77637
  this.registryClient = new RegistryClient(profile.kongBaseUrl, clientHeaderProvider);
77637
77638
  this.managementClient = new ManagementClient(profile.kongBaseUrl, clientHeaderProvider);
77639
+ const dockerVersion = (0, import_child_process2.spawnSync)("docker", ["--version"]);
77640
+ this.hasDocker = !dockerVersion.error;
77638
77641
  }
77639
77642
  get wslPrefix() {
77640
- return this.isWin ? "wsl" : "";
77643
+ return this.isWin && !this.hasDocker ? "wsl" : "";
77641
77644
  }
77642
77645
  async execute(repoName, notes) {
77643
77646
  await new Listr([...this.flowFactory(repoName, notes)], {
@@ -77753,7 +77756,8 @@ var PublishVersionCommand = class {
77753
77756
  return `${this.wslPrefix} docker push ${imageName}`;
77754
77757
  }
77755
77758
  dockerLoginCmdText(username, password, registry3) {
77756
- return `${this.wslPrefix} /bin/bash -c 'echo ${password} |docker login -u ${username} --password-stdin ${registry3}'`;
77759
+ const baseCommand = `echo ${password} |docker login -u ${username} --password-stdin ${registry3}`;
77760
+ return this.wslPrefix ? `${this.wslPrefix} /bin/bash -c '${baseCommand}'` : `powershell -c '${baseCommand}'`;
77757
77761
  }
77758
77762
  getPythonSchemaCmdText() {
77759
77763
  const engine = this.isWin ? ".\\.venv\\Scripts\\python.exe" : "./.venv/bin/python";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devkong/cli",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "type": "commonjs",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
@@ -4,6 +4,7 @@ export declare class PublishVersionCommand {
4
4
  private verbose;
5
5
  private contractPath;
6
6
  private readonly isWin;
7
+ private readonly hasDocker;
7
8
  private registryClient;
8
9
  private managementClient;
9
10
  private defaultRendererOptions;
@@ -12,6 +12,7 @@ export type { AppExtensionSnapshot } from "./lib/appExtensionSnapshot";
12
12
  export type { AppExtensionSnapshotDetails } from "./lib/appExtensionSnapshotDetails";
13
13
  export type { AppPresignedUrl } from "./lib/appPresignedUrl";
14
14
  export type { AppProcessAlias } from "./lib/appProcessAlias";
15
+ export type { AppProcessAliasDetails } from "./lib/appProcessAliasDetails";
15
16
  export type { AppProcessAliasUse } from "./lib/appProcessAliasUse";
16
17
  export type { AppProcessInstanceId } from "./lib/appProcessInstanceId";
17
18
  export type { AppProcessStartRequest } from "./lib/appProcessStartRequest";
@@ -0,0 +1,7 @@
1
+ import { KongSpecProcessRef } from "@kong/spec";
2
+ import { AppAlias } from "./appAlias";
3
+ import { AppProcessAliasUse } from "./appProcessAliasUse";
4
+ export type AppProcessAliasDetails = AppAlias<AppProcessAliasUse> & {
5
+ name: KongSpecProcessRef["aliasName"];
6
+ basedOnName: KongSpecProcessRef["basedOn"];
7
+ };