Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion types/dockerode/dockerode-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ async function foo() {
for (const container of containers) {
const foo = await docker7.getContainer(container.Id);
const inspect = await foo.inspect();
const healthCheck = inspect.Config.Healthcheck;
}

const images = await docker5.listImages();
Expand All @@ -90,6 +91,7 @@ async function foo() {
const inspect = await foo.inspect({ manifests: true });
const imageDescriptor = inspect.Descriptor;
const imageManifests = inspect.Manifests;
const healthCheck = inspect.Config.Healthcheck;
await foo.remove();
}

Expand Down Expand Up @@ -668,7 +670,7 @@ docker.run(
"ubuntu",
["bash", "-c", "uname -a"],
process.stdout,
{ name: "foo", platform: "linux/amd64" },
{ name: "foo", platform: "linux/amd64", Healthcheck: { Test: ["CMD-SHELL", "echo 'pass' && exit 0"] } },
(err, data) => {
console.log(data.StatusCode);
},
Expand Down
2 changes: 2 additions & 0 deletions types/dockerode/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ declare namespace Dockerode {
Entrypoint?: string | string[] | undefined;
OnBuild?: any;
Labels: { [label: string]: string };
Healthcheck?: HealthConfig | undefined;
};
NetworkSettings: {
Bridge: string;
Expand Down Expand Up @@ -989,6 +990,7 @@ declare namespace Dockerode {
Entrypoint?: string | string[] | undefined;
OnBuild: any[];
Labels: { [label: string]: string };
Healthcheck?: HealthConfig | undefined;
};
Architecture: string;
Variant?: string | undefined;
Expand Down
24 changes: 10 additions & 14 deletions types/node-forge/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,6 @@ declare module "node-forge" {
}
var oids: oids;

interface MDSigner {
sign(md: md.MessageDigest): Bytes;
}

namespace rsa {
type EncryptionScheme = "RSAES-PKCS1-V1_5" | "RSA-OAEP" | "RAW" | "NONE" | null;
type SignatureScheme = "RSASSA-PKCS1-V1_5" | pss.PSS | "NONE" | null;
Expand Down Expand Up @@ -476,10 +472,10 @@ declare module "node-forge" {
/**
* Signs this certificate using the given private key.
*
* @param signer the signer used to sign this csr
* @param key the private key to sign with.
* @param md the message digest object to use (defaults to forge.md.sha1).
*/
sign(signer: MDSigner, md?: md.MessageDigest): void;
sign(key: pki.rsa.PrivateKey, md?: md.MessageDigest): void;
/**
* Attempts verify the signature on the passed certificate using this
* certificate's public key.
Expand Down Expand Up @@ -571,10 +567,10 @@ declare module "node-forge" {
/**
* Signs this csr using the given private key.
*
* @param signer the signer used to sign this csr
* @param key the private key to sign with.
* @param md the message digest object to use (defaults to forge.md.sha1).
*/
sign(signer: MDSigner, md?: md.MessageDigest): void;
sign(key: pki.rsa.PrivateKey, md?: md.MessageDigest): void;
/**
* Attempts verify the signature on this csr using this
* csr's public key.
Expand Down Expand Up @@ -768,23 +764,23 @@ declare module "node-forge" {
/**
* @description Encodes a private RSA key as an OpenSSH file
*/
function privateKeyToOpenSSH(privateKey: pki.PrivateKey, passphrase?: string): string;
function privateKeyToOpenSSH(privateKey: pki.rsa.PrivateKey, passphrase?: string): string;

/**
* @description Encodes (and optionally encrypts) a private RSA key as a Putty PPK file
*/
function privateKeyToPutty(privateKey: pki.PrivateKey, passphrase?: string, comment?: string): string;
function privateKeyToPutty(privateKey: pki.rsa.PrivateKey, passphrase?: string, comment?: string): string;

/**
* @description Encodes a public RSA key as an OpenSSH file
*/
function publicKeyToOpenSSH(publicKey: pki.PublicKey, comment?: string): string | pki.PEM;
function publicKeyToOpenSSH(publicKey: pki.rsa.PublicKey, comment?: string): string | pki.PEM;

/**
* @description Gets the SSH fingerprint for the given public key
*/
function getPublicKeyFingerprint(
publicKey: pki.PublicKey,
publicKey: pki.rsa.PublicKey,
options?: FingerprintOptions,
): util.ByteStringBuffer | Hex | string;
}
Expand Down Expand Up @@ -970,7 +966,7 @@ declare module "node-forge" {
interface Bag {
type: string;
attributes: any;
key?: pki.PrivateKey | undefined;
key?: pki.rsa.PrivateKey | undefined;
cert?: pki.Certificate | undefined;
asn1: asn1.Asn1;
}
Expand All @@ -994,7 +990,7 @@ declare module "node-forge" {
function pkcs12FromAsn1(obj: any, password?: string): Pkcs12Pfx;

function toPkcs12Asn1(
key: pki.PrivateKey | null,
key: pki.rsa.PrivateKey | null,
cert: pki.Certificate | pki.Certificate[],
password: string | null,
options?: {
Expand Down
1 change: 1 addition & 0 deletions types/node-forge/node-forge-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ let privateKeyFromAsn1 = forge.pki.privateKeyFromAsn1(privateKeyAsn1);
let byteBufferString = forge.pki.pemToDer(privateKeyPem);
let cert = forge.pki.createCertificate();
cert.publicKey = keypair.publicKey;
// explicitly cast as PrivateKey to ensure expected typings are accepted
cert.sign(keypair.privateKey);
forge.pki.certificateFromAsn1(forge.pki.certificateToAsn1(cert));
let certPem = forge.pki.certificateToPem(cert);
Expand Down