"dependencies": {
"@squeep/amqp-helper": "git+https://git.squeep.com/squeep-amqp-helper#v1.0.0",
"@squeep/api-dingus": "git+https://git.squeep.com/squeep-api-dingus/#v1.2.9",
- "@squeep/authentication-module": "git+https://git.squeep.com/squeep-authentication-module/#v1.2.12",
+ "@squeep/authentication-module": "git+https://git.squeep.com/squeep-authentication-module/#v1.3.0",
"@squeep/chores": "git+https://git.squeep.com/squeep-chores/#v1.0.0",
"@squeep/html-template-helper": "git+https://git.squeep.com/squeep-html-template-helper#v1.4.0",
"@squeep/indieauth-helper": "git+https://git.squeep.com/squeep-indieauth-helper/#v1.2.2",
"@squeep/logger-json-console": "git+https://git.squeep.com/squeep-logger-json-console#v1.0.2",
- "@squeep/mystery-box": "^1.2.2",
+ "@squeep/mystery-box": "^2.0.1",
"@squeep/resource-authentication-module": "git+https://git.squeep.com/squeep-resource-authentication-module#v1.0.0",
"@squeep/roman": "^1.0.0",
"@squeep/web-linking": "^1.0.7",
}
},
"node_modules/@squeep/authentication-module": {
- "version": "1.2.12",
- "resolved": "git+https://git.squeep.com/squeep-authentication-module/#9a7d5352698481c0857ba8827e31c7cb97625133",
+ "version": "1.3.0",
+ "resolved": "git+https://git.squeep.com/squeep-authentication-module/#6557437fcef1d780b54e39ab93e07a6be36e4447",
"license": "ISC",
"dependencies": {
"@squeep/api-dingus": "git+https://git.squeep.com/squeep-api-dingus/#v1.2.9",
"@squeep/html-template-helper": "git+https://git.squeep.com/squeep-html-template-helper#v1.4.0",
- "@squeep/indieauth-helper": "git+https://git.squeep.com/squeep-indieauth-helper/#v1.1.7",
- "@squeep/mystery-box": "^1.2.0"
+ "@squeep/indieauth-helper": "git+https://git.squeep.com/squeep-indieauth-helper/#v1.2.0",
+ "@squeep/mystery-box": "^2.0.1"
},
"engines": {
"node": ">=14"
},
"optionalDependencies": {
- "argon2": "^0.30.1",
+ "argon2": "^0.30.3",
"node-linux-pam": "^0.2.1"
}
},
}
},
"node_modules/@squeep/mystery-box": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/@squeep/mystery-box/-/mystery-box-1.2.2.tgz",
- "integrity": "sha512-pbepyJEqnA48ABzthhnOXUFMOGP417gKbZiIRit54iYZ0ZaMg1NWAs2ha5c//Q7hU94A8jPnsRFDtyMCvliNeg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@squeep/mystery-box/-/mystery-box-2.0.1.tgz",
+ "integrity": "sha512-is8Uqvcm27pm49ZaQL/KOizo89SiTuTZElQoyuPX34TvcnsOTN2eN2YxdVSwKusZwYi+mmE8brrAtBcM/Ttpwg==",
"engines": {
"node": "^14 >=14.18.0 || >=15.7.0"
}
}
},
"node_modules/aproba": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
+ "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
"optional": true
},
"node_modules/archy": {
"node": ">=0.10.0"
}
},
+ "node_modules/node-linux-pam/node_modules/aproba": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "optional": true
+ },
"node_modules/node-linux-pam/node_modules/are-we-there-yet": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz",
}
},
"@squeep/authentication-module": {
- "version": "git+https://git.squeep.com/squeep-authentication-module/#9a7d5352698481c0857ba8827e31c7cb97625133",
- "from": "@squeep/authentication-module@git+https://git.squeep.com/squeep-authentication-module/#v1.2.12",
+ "version": "git+https://git.squeep.com/squeep-authentication-module/#6557437fcef1d780b54e39ab93e07a6be36e4447",
+ "from": "@squeep/authentication-module@git+https://git.squeep.com/squeep-authentication-module/#v1.3.0",
"requires": {
"@squeep/api-dingus": "git+https://git.squeep.com/squeep-api-dingus/#v1.2.9",
"@squeep/html-template-helper": "git+https://git.squeep.com/squeep-html-template-helper#v1.4.0",
- "@squeep/indieauth-helper": "git+https://git.squeep.com/squeep-indieauth-helper/#v1.1.7",
- "@squeep/mystery-box": "^1.2.0",
- "argon2": "^0.30.1",
+ "@squeep/indieauth-helper": "git+https://git.squeep.com/squeep-indieauth-helper/#v1.2.0",
+ "@squeep/mystery-box": "^2.0.1",
+ "argon2": "^0.30.3",
"node-linux-pam": "^0.2.1"
}
},
"from": "@squeep/logger-json-console@git+https://git.squeep.com/squeep-logger-json-console#v1.0.2"
},
"@squeep/mystery-box": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/@squeep/mystery-box/-/mystery-box-1.2.2.tgz",
- "integrity": "sha512-pbepyJEqnA48ABzthhnOXUFMOGP417gKbZiIRit54iYZ0ZaMg1NWAs2ha5c//Q7hU94A8jPnsRFDtyMCvliNeg=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@squeep/mystery-box/-/mystery-box-2.0.1.tgz",
+ "integrity": "sha512-is8Uqvcm27pm49ZaQL/KOizo89SiTuTZElQoyuPX34TvcnsOTN2eN2YxdVSwKusZwYi+mmE8brrAtBcM/Ttpwg=="
},
"@squeep/resource-authentication-module": {
"version": "git+https://git.squeep.com/squeep-resource-authentication-module#69a2f5e7d73dd3f58e07b652c306daa8b253245d",
}
},
"aproba": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
+ "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
"optional": true
},
"archy": {
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
"optional": true
},
+ "aproba": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "optional": true
+ },
"are-we-there-yet": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz",
"dependencies": {
"@squeep/amqp-helper": "git+https://git.squeep.com/squeep-amqp-helper#v1.0.0",
"@squeep/api-dingus": "git+https://git.squeep.com/squeep-api-dingus/#v1.2.9",
- "@squeep/authentication-module": "git+https://git.squeep.com/squeep-authentication-module/#v1.2.12",
+ "@squeep/authentication-module": "git+https://git.squeep.com/squeep-authentication-module/#v1.3.0",
"@squeep/chores": "git+https://git.squeep.com/squeep-chores/#v1.0.0",
"@squeep/html-template-helper": "git+https://git.squeep.com/squeep-html-template-helper#v1.4.0",
"@squeep/indieauth-helper": "git+https://git.squeep.com/squeep-indieauth-helper/#v1.2.2",
"@squeep/logger-json-console": "git+https://git.squeep.com/squeep-logger-json-console#v1.0.2",
- "@squeep/mystery-box": "^1.2.2",
+ "@squeep/mystery-box": "^2.0.1",
"@squeep/resource-authentication-module": "git+https://git.squeep.com/squeep-resource-authentication-module#v1.0.0",
"@squeep/roman": "^1.0.0",
"@squeep/web-linking": "^1.0.7",
'use strict';
const assert = require('assert');
+const sinon = require('sinon');
+const StubLogger = require('../stub-logger');
const common = require('../../src/common');
describe('Common', function () {
});
}); // dateToEpoch
+ describe('omit', function () {
+ it('covers', function () {
+ const obj = {
+ foo: true,
+ bar: 'bar',
+ baz: {
+ quux: false,
+ },
+ };
+ const omitted = ['bar', 'baz'];
+ const expected = {
+ foo: true,
+ };
+ const result = common.omit(obj, omitted);
+ assert.deepStrictEqual(result, expected);
+ });
+ }); // omit
+
+ describe('mysteryBoxLogger', function () {
+ let mbl, stubLogger;
+ beforeEach(function () {
+ stubLogger = new StubLogger();
+ stubLogger._reset();
+ mbl = common.mysteryBoxLogger(stubLogger, 'test:scope');
+ });
+ afterEach(function () {
+ sinon.restore();
+ });
+ it('covers', function () {
+ const stat = {
+ packageName: 'fake-mystery-box',
+ packageVersion: '0.0.0',
+ data: 'exists',
+ };
+ mbl(stat);
+ assert(stubLogger.debug.called);
+ });
+ }); // mysteryBoxLogger
+
}); // Common