@squiz/db-lib 1.50.1-alpha.1 → 1.50.1-alpha.11

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.
@@ -8,30 +8,30 @@
8
8
  7 timing config:load:cli Completed in 2ms
9
9
  8 timing config:load:env Completed in 2ms
10
10
  9 info found workspace root at /builds/developer-experience/cmp
11
- 10 timing config:load:file:/builds/developer-experience/cmp/.npmrc Completed in 0ms
12
- 11 timing config:load:project Completed in 33ms
11
+ 10 timing config:load:file:/builds/developer-experience/cmp/.npmrc Completed in 1ms
12
+ 11 timing config:load:project Completed in 30ms
13
13
  12 timing config:load:file:/root/.npmrc Completed in 1ms
14
14
  13 timing config:load:user Completed in 1ms
15
15
  14 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
16
- 15 timing config:load:global Completed in 0ms
16
+ 15 timing config:load:global Completed in 1ms
17
17
  16 timing config:load:setEnvs Completed in 1ms
18
- 17 timing config:load Completed in 43ms
19
- 18 timing npm:load:configload Completed in 44ms
18
+ 17 timing config:load Completed in 40ms
19
+ 18 timing npm:load:configload Completed in 41ms
20
20
  19 timing npm:load:mkdirpcache Completed in 1ms
21
21
  20 timing npm:load:mkdirplogs Completed in 0ms
22
22
  21 verbose title npm run compile
23
23
  22 verbose argv "run" "compile" "--"
24
24
  23 timing npm:load:setTitle Completed in 2ms
25
- 24 timing config:load:flatten Completed in 5ms
26
- 25 timing npm:load:display Completed in 7ms
27
- 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-08-30T11_25_39_737Z-
28
- 27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-08-30T11_25_39_737Z-debug-0.log
29
- 28 timing npm:load:logFile Completed in 4ms
25
+ 24 timing config:load:flatten Completed in 7ms
26
+ 25 timing npm:load:display Completed in 9ms
27
+ 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-09-06T06_08_48_018Z-
28
+ 27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-09-06T06_08_48_018Z-debug-0.log
29
+ 28 timing npm:load:logFile Completed in 5ms
30
30
  29 timing npm:load:timers Completed in 0ms
31
31
  30 timing npm:load:configScope Completed in 0ms
32
32
  31 timing npm:load Completed in 60ms
33
33
  32 silly logfile done cleaning log files
34
- 33 timing command:run Completed in 4282ms
34
+ 33 timing command:run Completed in 4815ms
35
35
  34 verbose exit 0
36
- 35 timing npm Completed in 4358ms
36
+ 35 timing npm Completed in 4891ms
37
37
  36 info ok
package/lib/index.js CHANGED
@@ -49378,7 +49378,6 @@ var require_CloudflareApiKeyService = __commonJS({
49378
49378
  var UnAuthenticatedRequestError_1 = require_UnAuthenticatedRequestError();
49379
49379
  var dx_logger_lib_1 = require_lib4();
49380
49380
  var validKeys = {
49381
- "matrix-keys": [],
49382
49381
  "inter-service-keys": []
49383
49382
  };
49384
49383
  var refreshInterval;
@@ -49394,23 +49393,6 @@ var require_CloudflareApiKeyService = __commonJS({
49394
49393
  }
49395
49394
  this.logger = logger2;
49396
49395
  }
49397
- /**
49398
- * @deprecated Suggest moving towards using JWT authentication.
49399
- */
49400
- matrixKeyIsValid(key, request) {
49401
- var _a;
49402
- if (validKeys["matrix-keys"].length == 0) {
49403
- throw new UnAuthenticatedRequestError_1.UnAuthenticatedRequestError("No api keys to check against");
49404
- }
49405
- if (validKeys["matrix-keys"].includes(key)) {
49406
- this.logger.info("Request authenticated using legacy Matrix API key", {
49407
- url: request.url,
49408
- userAgent: (_a = request.headers) === null || _a === void 0 ? void 0 : _a["user-agent"]
49409
- });
49410
- return true;
49411
- }
49412
- return false;
49413
- }
49414
49396
  interServiceKeyIsValid(key) {
49415
49397
  if (validKeys["inter-service-keys"].length == 0) {
49416
49398
  throw new UnAuthenticatedRequestError_1.UnAuthenticatedRequestError("No inter service api keys to check against");
@@ -49432,7 +49414,7 @@ var require_CloudflareApiKeyService = __commonJS({
49432
49414
  throw new Error("cloudflare api key SecretString undefined");
49433
49415
  }
49434
49416
  const secret = JSON.parse(secretValue.SecretString);
49435
- if (secret["matrix-keys"] && secret["inter-service-keys"]) {
49417
+ if (secret["inter-service-keys"]) {
49436
49418
  return secret;
49437
49419
  }
49438
49420
  throw new Error("api keys retrieved and decoded successfully but contained no values");
@@ -49443,7 +49425,6 @@ var require_CloudflareApiKeyService = __commonJS({
49443
49425
  async refreshApiKeys() {
49444
49426
  this.logger.info("refreshing keys");
49445
49427
  validKeys = await this.getValidApiKeys();
49446
- this.logger.info(`found ${validKeys["matrix-keys"].length} valid matrix keys`);
49447
49428
  this.logger.info(`found ${validKeys["inter-service-keys"].length} valid inter service keys`);
49448
49429
  if (!refreshInterval) {
49449
49430
  refreshInterval = setInterval(async () => {