@axe-core/watcher 1.2.0-next.2d86b445 → 1.2.0-next.bfbeb36d

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.
@@ -4,9 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var sync_request_1 = __importDefault(require("sync-request"));
7
+ var assert_1 = __importDefault(require("assert"));
7
8
  /** Validate the given `apiKey`. This method is blocking and should not be called unnecessarily. */
8
9
  var validateApiKey = function (_a) {
9
10
  var apiKey = _a.apiKey, serverURL = _a.serverURL;
11
+ (0, assert_1.default)(apiKey, 'API key is required');
10
12
  var url = new URL("/api/api-keys/".concat(apiKey, "/validate/axe-devtools-watcher"), serverURL);
11
13
  var res = (0, sync_request_1.default)('GET', url.toString(), {
12
14
  maxRedirects: 2,
@@ -1 +1 @@
1
- {"version":3,"file":"validateApiKey.js","sourceRoot":"","sources":["../src/validateApiKey.ts"],"names":[],"mappings":";;;;;AAAA,8DAAkC;AAOlC,mGAAmG;AACnG,IAAM,cAAc,GAAG,UAAC,EAA6B;QAA3B,MAAM,YAAA,EAAE,SAAS,eAAA;IACzC,IAAM,GAAG,GAAG,IAAI,GAAG,CACjB,wBAAiB,MAAM,mCAAgC,EACvD,SAAS,CACV,CAAA;IACD,IAAM,GAAG,GAAG,IAAA,sBAAO,EAAC,KAAK,EAAE,GAAG,CAAC,QAAQ,EAAE,EAAE;QACzC,YAAY,EAAE,CAAC;QACf,eAAe,EAAE,IAAI;QACrB,UAAU,EAAE,CAAC;QACb,KAAK,EAAE,IAAI;QACX,UAAU,EAAE,GAAG;KAChB,CAAC,CAAA;IACF,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5C,IAAI,IAAI,CAAC,KAAK,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC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