wdio-obsidian-service 0.2.2 → 0.2.4

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,60 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/reporter.ts
31
+ var reporter_exports = {};
32
+ __export(reporter_exports, {
33
+ default: () => reporter_default
34
+ });
35
+ module.exports = __toCommonJS(reporter_exports);
36
+ var import_spec_reporter = __toESM(require("@wdio/spec-reporter"), 1);
37
+ var ObsidianReporter = class extends import_spec_reporter.default {
38
+ constructor(options) {
39
+ super({ showPreface: false, ...options });
40
+ }
41
+ // Override this method to change the label shown for each capability
42
+ getHeaderDisplay(runner) {
43
+ const obsidianOptions = runner.config.capabilities?.["wdio:obsidianOptions"];
44
+ let combo;
45
+ if (obsidianOptions) {
46
+ const appVersion = obsidianOptions.appVersion;
47
+ const installerVersion = obsidianOptions.installerVersion;
48
+ combo = `obsidian v${appVersion} (installer: v${installerVersion})`;
49
+ } else {
50
+ combo = this.getEnviromentCombo(runner.capabilities, void 0, runner.isMultiremote).trim();
51
+ }
52
+ const output = [`Running: ${combo}`];
53
+ if (runner.capabilities.sessionId) {
54
+ output.push(`Session ID: ${runner.capabilities.sessionId}`);
55
+ }
56
+ return output;
57
+ }
58
+ };
59
+ var reporter_default = ObsidianReporter;
60
+ //# sourceMappingURL=reporter.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/reporter.ts"],"sourcesContent":["import SpecReporter from '@wdio/spec-reporter';\nimport { RunnerStats } from \"@wdio/reporter\"\nimport { Reporters } from \"@wdio/types\"\n\n\n/**\n * Simple extension of SpecReporter that print the Obsidian version instead of the Chrome version.\n */\nclass ObsidianReporter extends SpecReporter {\n constructor(options: any) {\n super({showPreface: false, ...options})\n }\n\n // Override this method to change the label shown for each capability \n getHeaderDisplay(runner: RunnerStats) {\n const obsidianOptions = (runner.config as any).capabilities?.['wdio:obsidianOptions']\n\n let combo: string\n if (obsidianOptions) {\n const appVersion = obsidianOptions.appVersion;\n const installerVersion = obsidianOptions.installerVersion;\n combo = `obsidian v${appVersion} (installer: v${installerVersion})`\n } else { // fall back to SpecReporter behavior\n combo = this.getEnviromentCombo(runner.capabilities, undefined, runner.isMultiremote).trim()\n }\n \n // Spec file name and enviroment information\n const output = [`Running: ${combo}`]\n\n if ((runner.capabilities as any).sessionId) {\n output.push(`Session ID: ${(runner.capabilities as any).sessionId}`)\n }\n\n return output\n }\n}\n\nexport default ObsidianReporter as Reporters.ReporterClass\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAyB;AAQzB,IAAM,mBAAN,cAA+B,qBAAAA,QAAa;AAAA,EACxC,YAAY,SAAc;AACtB,UAAM,EAAC,aAAa,OAAO,GAAG,QAAO,CAAC;AAAA,EAC1C;AAAA;AAAA,EAGA,iBAAiB,QAAqB;AAClC,UAAM,kBAAmB,OAAO,OAAe,eAAe,sBAAsB;AAEpF,QAAI;AACJ,QAAI,iBAAiB;AACjB,YAAM,aAAa,gBAAgB;AACnC,YAAM,mBAAmB,gBAAgB;AACzC,cAAQ,aAAa,UAAU,iBAAiB,gBAAgB;AAAA,IACpE,OAAO;AACH,cAAQ,KAAK,mBAAmB,OAAO,cAAc,QAAW,OAAO,aAAa,EAAE,KAAK;AAAA,IAC/F;AAGA,UAAM,SAAS,CAAC,YAAY,KAAK,EAAE;AAEnC,QAAK,OAAO,aAAqB,WAAW;AACxC,aAAO,KAAK,eAAgB,OAAO,aAAqB,SAAS,EAAE;AAAA,IACvE;AAEA,WAAO;AAAA,EACX;AACJ;AAEA,IAAO,mBAAQ;","names":["SpecReporter"]}
@@ -0,0 +1,5 @@
1
+ import { Reporters } from '@wdio/types';
2
+
3
+ declare const _default: Reporters.ReporterClass;
4
+
5
+ export { _default as default };
@@ -0,0 +1,5 @@
1
+ import { Reporters } from '@wdio/types';
2
+
3
+ declare const _default: Reporters.ReporterClass;
4
+
5
+ export { _default as default };
@@ -0,0 +1,29 @@
1
+ // src/reporter.ts
2
+ import SpecReporter from "@wdio/spec-reporter";
3
+ var ObsidianReporter = class extends SpecReporter {
4
+ constructor(options) {
5
+ super({ showPreface: false, ...options });
6
+ }
7
+ // Override this method to change the label shown for each capability
8
+ getHeaderDisplay(runner) {
9
+ const obsidianOptions = runner.config.capabilities?.["wdio:obsidianOptions"];
10
+ let combo;
11
+ if (obsidianOptions) {
12
+ const appVersion = obsidianOptions.appVersion;
13
+ const installerVersion = obsidianOptions.installerVersion;
14
+ combo = `obsidian v${appVersion} (installer: v${installerVersion})`;
15
+ } else {
16
+ combo = this.getEnviromentCombo(runner.capabilities, void 0, runner.isMultiremote).trim();
17
+ }
18
+ const output = [`Running: ${combo}`];
19
+ if (runner.capabilities.sessionId) {
20
+ output.push(`Session ID: ${runner.capabilities.sessionId}`);
21
+ }
22
+ return output;
23
+ }
24
+ };
25
+ var reporter_default = ObsidianReporter;
26
+ export {
27
+ reporter_default as default
28
+ };
29
+ //# sourceMappingURL=reporter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/reporter.ts"],"sourcesContent":["import SpecReporter from '@wdio/spec-reporter';\nimport { RunnerStats } from \"@wdio/reporter\"\nimport { Reporters } from \"@wdio/types\"\n\n\n/**\n * Simple extension of SpecReporter that print the Obsidian version instead of the Chrome version.\n */\nclass ObsidianReporter extends SpecReporter {\n constructor(options: any) {\n super({showPreface: false, ...options})\n }\n\n // Override this method to change the label shown for each capability \n getHeaderDisplay(runner: RunnerStats) {\n const obsidianOptions = (runner.config as any).capabilities?.['wdio:obsidianOptions']\n\n let combo: string\n if (obsidianOptions) {\n const appVersion = obsidianOptions.appVersion;\n const installerVersion = obsidianOptions.installerVersion;\n combo = `obsidian v${appVersion} (installer: v${installerVersion})`\n } else { // fall back to SpecReporter behavior\n combo = this.getEnviromentCombo(runner.capabilities, undefined, runner.isMultiremote).trim()\n }\n \n // Spec file name and enviroment information\n const output = [`Running: ${combo}`]\n\n if ((runner.capabilities as any).sessionId) {\n output.push(`Session ID: ${(runner.capabilities as any).sessionId}`)\n }\n\n return output\n }\n}\n\nexport default ObsidianReporter as Reporters.ReporterClass\n"],"mappings":";AAAA,OAAO,kBAAkB;AAQzB,IAAM,mBAAN,cAA+B,aAAa;AAAA,EACxC,YAAY,SAAc;AACtB,UAAM,EAAC,aAAa,OAAO,GAAG,QAAO,CAAC;AAAA,EAC1C;AAAA;AAAA,EAGA,iBAAiB,QAAqB;AAClC,UAAM,kBAAmB,OAAO,OAAe,eAAe,sBAAsB;AAEpF,QAAI;AACJ,QAAI,iBAAiB;AACjB,YAAM,aAAa,gBAAgB;AACnC,YAAM,mBAAmB,gBAAgB;AACzC,cAAQ,aAAa,UAAU,iBAAiB,gBAAgB;AAAA,IACpE,OAAO;AACH,cAAQ,KAAK,mBAAmB,OAAO,cAAc,QAAW,OAAO,aAAa,EAAE,KAAK;AAAA,IAC/F;AAGA,UAAM,SAAS,CAAC,YAAY,KAAK,EAAE;AAEnC,QAAK,OAAO,aAAqB,WAAW;AACxC,aAAO,KAAK,eAAgB,OAAO,aAAqB,SAAS,EAAE;AAAA,IACvE;AAEA,WAAO;AAAA,EACX;AACJ;AAEA,IAAO,mBAAQ;","names":[]}
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "wdio-obsidian-service",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "TODO",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": "./dist/index.js",
10
+ "./reporter": "./dist/reporter.js"
11
+ },
8
12
  "files": [
9
13
  "dist",
10
14
  "helper-plugin"
@@ -49,7 +53,7 @@
49
53
  },
50
54
  "dependencies": {
51
55
  "lodash": "^4.17.21",
52
- "obsidian-launcher": "^0.2.2",
56
+ "obsidian-launcher": "^0.2.4",
53
57
  "semver": "^7.7.1"
54
58
  },
55
59
  "peerDependencies": {