@devkong/cli 0.0.67-alpha.1 → 0.0.67-alpha.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/index.js
CHANGED
|
@@ -60750,10 +60750,8 @@ async function spawnCommand(commandText, logger = null, shell = false) {
|
|
|
60750
60750
|
}
|
|
60751
60751
|
async function spawnCommandWithArgs(command, commandArgs, logger = null, shell = false) {
|
|
60752
60752
|
return new Promise((resolve2, reject) => {
|
|
60753
|
-
const
|
|
60754
|
-
|
|
60755
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
60756
|
-
});
|
|
60753
|
+
const useShell = shell || process.platform !== "win32";
|
|
60754
|
+
const child = useShell ? (0, import_child_process.spawn)([command, ...commandArgs].join(" "), { shell: true, stdio: ["pipe", "pipe", "pipe"] }) : (0, import_child_process.spawn)(command, commandArgs, { shell: false, stdio: ["pipe", "pipe", "pipe"] });
|
|
60757
60755
|
let stdout = "";
|
|
60758
60756
|
let stderr = "";
|
|
60759
60757
|
child.stdout.on("data", (data) => {
|
|
@@ -63586,7 +63584,7 @@ var SetAliasCommand = class {
|
|
|
63586
63584
|
const ticker = setInterval(render, 1e3);
|
|
63587
63585
|
try {
|
|
63588
63586
|
const result = await pollDeployment(this.managementClient, {
|
|
63589
|
-
objectType: "
|
|
63587
|
+
objectType: "EXTENSION_ALIAS",
|
|
63590
63588
|
basedOnId: ctx.kongJson.id,
|
|
63591
63589
|
aliasName,
|
|
63592
63590
|
timeoutSeconds,
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { AppAuditLog
|
|
1
|
+
import { AppAuditLog } from "@kong/contract";
|
|
2
2
|
import { Loading } from "@kong/ts";
|
|
3
3
|
import { ManagementClient } from "../services/managementClient";
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Audit object types that carry a deployment trail. These are the management
|
|
6
|
+
* `AuditObjectType` JVM enum *constant names* (not the `extension_alias` JSON
|
|
7
|
+
* wire value): the `/v1/audit` `objectType` query param is resolved server-side
|
|
8
|
+
* via `Enum.valueOf`, which matches the constant name.
|
|
9
|
+
*/
|
|
10
|
+
export type DeployObjectType = "EXTENSION_ALIAS" | "PROCESS_ALIAS";
|
|
6
11
|
export interface DeploymentQuery {
|
|
7
12
|
objectType: DeployObjectType;
|
|
8
13
|
basedOnId: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AppAuditLog, AppExtension, AppExtensionAlias, AppSnapshot, AppSnapshotDetails
|
|
1
|
+
import { AppAuditLog, AppExtension, AppExtensionAlias, AppSnapshot, AppSnapshotDetails } from "@kong/contract";
|
|
2
2
|
import { Optional, UrlText } from "@kong/ts";
|
|
3
|
+
import { DeployObjectType } from "../common/deployment";
|
|
3
4
|
import { RequestConfigProvider } from "./api";
|
|
4
5
|
export declare class ManagementClient {
|
|
5
6
|
private requestConfigProvider;
|
|
@@ -10,5 +11,5 @@ export declare class ManagementClient {
|
|
|
10
11
|
getExtensionSnapshot(extensionId: AppExtension["id"], extensionSnapshotVersion: AppSnapshot["version"]): Promise<Optional<AppSnapshotDetails>>;
|
|
11
12
|
getExtensionSnapshotVersions(extensionId: AppExtension["id"]): Promise<AppSnapshot[]>;
|
|
12
13
|
getExtensionSnapshotAliases(extensionId: AppExtension["id"]): Promise<AppExtensionAlias[]>;
|
|
13
|
-
getAuditLog(objectType:
|
|
14
|
+
getAuditLog(objectType: DeployObjectType, objectId: string): Promise<AppAuditLog[]>;
|
|
14
15
|
}
|