@dragonshorn-studios/elyseum-cli 0.1.1 → 0.1.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.
@@ -0,0 +1,17 @@
1
+ import { CustomConfig } from "../config";
2
+ export interface Command {
3
+ run(args: any): Promise<void>;
4
+ config?: CustomConfig;
5
+ name: string;
6
+ }
7
+ export interface CommandMap {
8
+ [key: string]: Command;
9
+ }
10
+ export declare class CommandFactory {
11
+ commands: CommandMap;
12
+ constructor();
13
+ getCommand(args: any): Command | undefined;
14
+ getAvailableCommands(): string[];
15
+ addCommandArgs(yargs: any): void;
16
+ }
17
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/commands/command.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,WAAW,OAAO;IACtB,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,qBAAa,cAAc;IACzB,QAAQ,EAAE,UAAU,CAAM;;IAM1B,UAAU,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,GAAG,SAAS;IAQ1C,oBAAoB;IAQpB,cAAc,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;CAgBjC"}
@@ -1,5 +1,7 @@
1
- export declare class CoverageCommand {
2
- constructor();
1
+ import { Command, CommandMap } from "./command";
2
+ export declare class CoverageCommand implements Command {
3
+ name: string;
4
+ constructor(commands: CommandMap);
3
5
  run(args: any): Promise<void>;
4
6
  private calculateCoverage;
5
7
  private getCoverageReport;
@@ -1 +1 @@
1
- {"version":3,"file":"coverage-command.d.ts","sourceRoot":"","sources":["../../src/commands/coverage-command.ts"],"names":[],"mappings":"AASA,qBAAa,eAAe;;IAGb,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;YAoB5B,iBAAiB;YA4DjB,iBAAiB;CAWhC"}
1
+ {"version":3,"file":"coverage-command.d.ts","sourceRoot":"","sources":["../../src/commands/coverage-command.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEhD,qBAAa,eAAgB,YAAW,OAAO;IAC7C,IAAI,EAAE,MAAM,CAAc;gBACd,QAAQ,EAAE,UAAU;IAInB,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;YAoB5B,iBAAiB;YA4DjB,iBAAiB;CAWhC"}
@@ -1,5 +1,9 @@
1
- export declare class DiffCoverageCommand {
2
- constructor();
1
+ import { Command, CommandMap } from "./command";
2
+ import { CustomConfig } from "../config";
3
+ export declare class DiffCoverageCommand implements Command {
4
+ name: string;
5
+ config?: CustomConfig;
6
+ constructor(commands: CommandMap);
3
7
  run(args: any): Promise<void>;
4
8
  private calculateDiffCoverage;
5
9
  private getCoverageReport;
@@ -1 +1 @@
1
- {"version":3,"file":"diff-coverage-command.d.ts","sourceRoot":"","sources":["../../src/commands/diff-coverage-command.ts"],"names":[],"mappings":"AAaA,qBAAa,mBAAmB;;IAGjB,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;YAuD5B,qBAAqB;YAuIrB,iBAAiB;YAYjB,eAAe;CA4E9B"}
1
+ {"version":3,"file":"diff-coverage-command.d.ts","sourceRoot":"","sources":["../../src/commands/diff-coverage-command.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEjD,qBAAa,mBAAoB,YAAW,OAAO;IACjD,IAAI,EAAE,MAAM,CAAmB;IAC/B,MAAM,CAAC,EAAE,YAAY,CAanB;gBACU,QAAQ,EAAE,UAAU;IAInB,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;YAuD5B,qBAAqB;YAuIrB,iBAAiB;YAYjB,eAAe;CA4E9B"}
package/dist/config.d.ts CHANGED
@@ -1,3 +1,14 @@
1
+ export interface ConfigElement {
2
+ help: string;
3
+ type: string;
4
+ default: any;
5
+ options?: any[];
6
+ action?: string;
7
+ required?: boolean;
8
+ }
9
+ export interface CustomConfig {
10
+ [key: string]: ConfigElement;
11
+ }
1
12
  declare class Config {
2
13
  private static instance;
3
14
  private config;
@@ -5,6 +16,7 @@ declare class Config {
5
16
  static getInstance(args?: any): Config;
6
17
  get(key: string, defaultValue?: any): any;
7
18
  getFirst(keys: string[], defaultValue?: any): any;
19
+ static get(context: string, keys: string[] | string, defaultValue?: any): any;
8
20
  }
9
21
  export default Config;
10
22
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,cAAM,MAAM;IACV,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,OAAO,CAAC,MAAM,CAAM;IAEpB,OAAO;WA6BO,WAAW,CAAC,IAAI,GAAE,GAAQ,GAAG,MAAM;IAO1C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,GAAE,GAAU,GAAG,GAAG;IAa/C,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,GAAE,GAAU,GAAG,GAAG;CAS/D;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAC9B;AAED,cAAM,MAAM;IACV,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,OAAO,CAAC,MAAM,CAAM;IAEpB,OAAO;WA6BO,WAAW,CAAC,IAAI,GAAE,GAAQ,GAAG,MAAM;IAO1C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,GAAE,GAAU,GAAG,GAAG;IAa/C,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,GAAE,GAAU,GAAG,GAAG;WAUhD,GAAG,CACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EACvB,YAAY,GAAE,GAAU,GACvB,GAAG;CASP;AAED,eAAe,MAAM,CAAC"}