@squiz/db-lib 1.35.1-alpha.22 → 1.35.1-alpha.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,20 +3,20 @@
3
3
  2 info using node@v18.15.0
4
4
  3 timing npm:load:whichnode Completed in 1ms
5
5
  4 timing config:load:defaults Completed in 2ms
6
- 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
7
- 6 timing config:load:builtin Completed in 0ms
6
+ 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
7
+ 6 timing config:load:builtin Completed in 1ms
8
8
  7 timing config:load:cli Completed in 2ms
9
9
  8 timing config:load:env Completed in 1ms
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
11
+ 10 timing config:load:file:/builds/developer-experience/cmp/.npmrc Completed in 1ms
12
12
  11 timing config:load:project Completed in 22ms
13
- 12 timing config:load:file:/root/.npmrc Completed in 0ms
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
16
  15 timing config:load:global Completed in 0ms
17
17
  16 timing config:load:setEnvs Completed in 1ms
18
- 17 timing config:load Completed in 31ms
19
- 18 timing npm:load:configload Completed in 31ms
18
+ 17 timing config:load Completed in 30ms
19
+ 18 timing npm:load:configload Completed in 30ms
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
@@ -24,14 +24,14 @@
24
24
  23 timing npm:load:setTitle Completed in 1ms
25
25
  24 timing config:load:flatten Completed in 4ms
26
26
  25 timing npm:load:display Completed in 6ms
27
- 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-06-09T02_41_46_565Z-
28
- 27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-06-09T02_41_46_565Z-debug-0.log
29
- 28 timing npm:load:logFile Completed in 4ms
27
+ 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-06-12T02_18_30_057Z-
28
+ 27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-06-12T02_18_30_057Z-debug-0.log
29
+ 28 timing npm:load:logFile Completed in 3ms
30
30
  29 timing npm:load:timers Completed in 0ms
31
31
  30 timing npm:load:configScope Completed in 0ms
32
- 31 timing npm:load Completed in 44ms
32
+ 31 timing npm:load Completed in 43ms
33
33
  32 silly logfile done cleaning log files
34
- 33 timing command:run Completed in 3525ms
34
+ 33 timing command:run Completed in 3120ms
35
35
  34 verbose exit 0
36
- 35 timing npm Completed in 3582ms
36
+ 35 timing npm Completed in 3176ms
37
37
  36 info ok
package/lib/index.js CHANGED
@@ -49343,11 +49343,11 @@ var require_CloudflareApiKeyService = __commonJS({
49343
49343
  "../dx-common-lib/lib/api-key-validation/CloudflareApiKeyService.js"(exports2) {
49344
49344
  "use strict";
49345
49345
  Object.defineProperty(exports2, "__esModule", { value: true });
49346
- exports2.CloudflareApiKeyService = void 0;
49346
+ exports2.CloudflareApiKeyService = exports2.validKeys = void 0;
49347
49347
  var client_secrets_manager_1 = require_dist_cjs51();
49348
49348
  var UnAuthenticatedRequestError_1 = require_UnAuthenticatedRequestError();
49349
49349
  var dx_logger_lib_1 = require_lib4();
49350
- var validKeys = {
49350
+ exports2.validKeys = {
49351
49351
  keys: [],
49352
49352
  "matrix-keys": []
49353
49353
  };
@@ -49365,16 +49365,16 @@ var require_CloudflareApiKeyService = __commonJS({
49365
49365
  this.logger = logger2;
49366
49366
  }
49367
49367
  keyIsValid(key) {
49368
- if (validKeys.keys.length == 0) {
49368
+ if (exports2.validKeys.keys.length == 0) {
49369
49369
  throw new UnAuthenticatedRequestError_1.UnAuthenticatedRequestError("No api keys to check against");
49370
49370
  }
49371
- return validKeys.keys.includes(key);
49371
+ return exports2.validKeys.keys.includes(key);
49372
49372
  }
49373
49373
  matrixKeyIsValid(key) {
49374
- if (validKeys["matrix-keys"].length == 0) {
49374
+ if (exports2.validKeys["matrix-keys"].length == 0) {
49375
49375
  throw new UnAuthenticatedRequestError_1.UnAuthenticatedRequestError("No api keys to check against");
49376
49376
  }
49377
- return validKeys["matrix-keys"].includes(key);
49377
+ return exports2.validKeys["matrix-keys"].includes(key);
49378
49378
  }
49379
49379
  async getValidApiKeys() {
49380
49380
  let secretValue;
@@ -49401,8 +49401,8 @@ var require_CloudflareApiKeyService = __commonJS({
49401
49401
  }
49402
49402
  async refreshApiKeys() {
49403
49403
  this.logger.info("refreshing keys");
49404
- validKeys = await this.getValidApiKeys();
49405
- this.logger.info(`number of valid keys found: ${validKeys.keys.length}`);
49404
+ exports2.validKeys = await this.getValidApiKeys();
49405
+ this.logger.info(`number of valid keys found: ${exports2.validKeys.keys.length}`);
49406
49406
  if (!refreshInterval) {
49407
49407
  refreshInterval = setInterval(async () => {
49408
49408
  await this.refreshApiKeys();