Skip to content

Commit

Permalink
bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldoakes committed Nov 5, 2023
1 parent 34f5edf commit 06c134b
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 128 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

![build](https://github.com/ply-ct/ply-testkube/workflows/build/badge.svg)

[Testkube](https://testkube.io/) executor for [Ply](https://ply-ct.org/ply/).
[Testkube](https://testkube.io/) executor for [Ply](https://ply-ct.org/ply/) API testing.
143 changes: 28 additions & 115 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "@ply-ct/ply-testkube",
"version": "1.1.0",
"version": "1.1.1",
"description": "Ply executor for testkube",
"license": "MIT",
"publisher": "ply-ct",
"private": "true",
"repository": {
"type": "git",
"url": "git+https://github.com/ply-ct/ply-testkube.git"
Expand All @@ -26,8 +28,8 @@
"delete-test": "kubectl testkube delete test ply-demo"
},
"dependencies": {
"@ply-ct/ply": "^3.2.6",
"@ply-ct/ply-api": "^1.3.0",
"@ply-ct/ply": "^3.2.18",
"@ply-ct/ply-api": "^1.3.13",
"camelcase": "^6.3.0",
"glob": "^8.1.0",
"ts-node": "^10.9.1"
Expand Down
2 changes: 1 addition & 1 deletion src/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class PlyArgs {
const argOptions = this.parse(args);
output.debug('Parsed options', argOptions);

const allOptions = {
const allOptions: ply.PlyOptions & { runOptions?: ply.RunOptions } & ArgOptions = {
...new ply.Config(defaults as ply.PlyOptions, true).options,
...argOptions
};
Expand Down
17 changes: 11 additions & 6 deletions src/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface OutputOptions {
enabled?: boolean;
indent?: number;
}

export class Output implements ply.Log {
readonly options: OutputOptions;

Expand All @@ -20,14 +21,14 @@ export class Output implements ply.Log {
this.options = { enabled: true, indent: 2, ...options };
}

private log(level: OutputLevel = 'info', message: string, obj?: any) {
private out(level: OutputLevel = 'info', message: string, obj?: any) {
if (!this.options.enabled) return;
if (level === 'debug' && !this.options.debug) return;
if (typeof message !== 'string') message = '' + message;

if (obj !== undefined) {
if (obj.stack) {
this.log(level, message);
this.out(level, message);
console.log(
JSON.stringify({
type: level === 'error' ? 'error' : 'log',
Expand All @@ -36,7 +37,7 @@ export class Output implements ply.Log {
})
);
} else {
this.log(level, message + ': ' + JSON.stringify(obj, null, this.options.indent));
this.out(level, message + ': ' + JSON.stringify(obj, null, this.options.indent));
}
} else {
console.log(
Expand All @@ -49,16 +50,20 @@ export class Output implements ply.Log {
}
}

log(message: string, obj?: any): void {
this.out('info', message, obj);
}

error(message: string, obj?: any) {
this.log('error', message, obj);
this.out('error', message, obj);
}

info(message: string, obj?: any) {
this.log('info', message, obj);
this.out('info', message, obj);
}

debug(message: string, obj?: any) {
this.log('debug', message, obj);
this.out('debug', message, obj);
}

result(status: ExecutionStatus, output: string, message?: string) {
Expand Down
4 changes: 2 additions & 2 deletions src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const version = '1.1.0';
export const plyVersion = '3.2.6';
export const version = '1.1.1';
export const plyVersion = '3.2.18';

0 comments on commit 06c134b

Please sign in to comment.