const axios = require('axios');
const { mf2 } = require('microformats-parser');
+const { base64ToBase64URL } = require('@squeep/base64url');
const { parse: parseLinkHeader } = require('@squeep/web-linking');
const { Iconv } = require('iconv');
const { version: packageVersion, name: packageName } = require('../package.json');
static _challengeFromVerifier(verifier) {
const hash = createHash('sha256');
hash.update(verifier);
- return common.base64ToBase64URL(hash.digest('base64'));
+ return base64ToBase64URL(hash.digest('base64'));
}
/**
const bufferLength = Math.floor(length * 3 / 4);
const randomBuffer = await randomBytesAsync(bufferLength);
- const verifier = common.base64ToBase64URL(randomBuffer.toString('base64'));
+ const verifier = base64ToBase64URL(randomBuffer.toString('base64'));
const challenge = Communication._challengeFromVerifier(verifier);
"version": "1.1.4",
"license": "ISC",
"dependencies": {
- "@squeep/web-linking": "git+https://git.squeep.com/squeep-web-linking/#v1.0.6",
+ "@squeep/base64url": "^1.0.3",
+ "@squeep/web-linking": "^1.0.7",
"axios": "^0.27.2",
"iconv": "^3.0.1",
"microformats-parser": "^1.4.1"
},
"devDependencies": {
- "eslint": "^8.18.0",
+ "eslint": "^8.20.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-security": "^1.5.0",
- "eslint-plugin-sonarjs": "^0.13.0",
+ "eslint-plugin-sonarjs": "^0.14.0",
"mocha": "^10.0.0",
"nyc": "^15.1.0",
"pre-commit": "^1.2.2",
"integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==",
"dev": true
},
+ "node_modules/@squeep/base64url": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@squeep/base64url/-/base64url-1.0.3.tgz",
+ "integrity": "sha512-0yFGRBMjVKkj2mir0bJStbyaVbZhduP1UYFkbTSaGtVgwY0LsUzuf05S1D22v1ZBeG318ITiQeG3LJcqVf0Rxg==",
+ "engines": {
+ "node": ">=14"
+ }
+ },
"node_modules/@squeep/web-linking": {
- "version": "1.0.6",
- "resolved": "git+https://git.squeep.com/squeep-web-linking/#b24731414817523f3a78f10bcbeab8b692797cb8",
- "license": "ISC",
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/@squeep/web-linking/-/web-linking-1.0.7.tgz",
+ "integrity": "sha512-9d3QijrWc/WNE7p/K7NLUHbmPf92CURRqfzDLV0cGqYNA4QWAPfzwC8hxWpdUkUnep3KakvLKK60l0kEBMM3ag==",
"engines": {
"node": ">=14.0"
}
}
},
"node_modules/eslint": {
- "version": "8.18.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz",
- "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==",
+ "version": "8.20.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz",
+ "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==",
"dev": true,
"dependencies": {
"@eslint/eslintrc": "^1.3.0",
}
},
"node_modules/eslint-plugin-sonarjs": {
- "version": "0.13.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.13.0.tgz",
- "integrity": "sha512-t3m7ta0EspzDxSOZh3cEOJIJVZgN/TlJYaBGnQlK6W/PZNbWep8q4RQskkJkA7/zwNpX0BaoEOSUUrqaADVoqA==",
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.14.0.tgz",
+ "integrity": "sha512-0X0q3fB8ghppms19cR2oIK2ajoFp7DEy3AVGDqO7WX02r1aWOzkrHa+veatGZw+R7amgBvfcF0qHCG66p9Zoag==",
"dev": true,
"engines": {
"node": ">=12"
"integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==",
"dev": true
},
+ "@squeep/base64url": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@squeep/base64url/-/base64url-1.0.3.tgz",
+ "integrity": "sha512-0yFGRBMjVKkj2mir0bJStbyaVbZhduP1UYFkbTSaGtVgwY0LsUzuf05S1D22v1ZBeG318ITiQeG3LJcqVf0Rxg=="
+ },
"@squeep/web-linking": {
- "version": "git+https://git.squeep.com/squeep-web-linking/#b24731414817523f3a78f10bcbeab8b692797cb8",
- "from": "@squeep/web-linking@git+https://git.squeep.com/squeep-web-linking/#v1.0.6"
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/@squeep/web-linking/-/web-linking-1.0.7.tgz",
+ "integrity": "sha512-9d3QijrWc/WNE7p/K7NLUHbmPf92CURRqfzDLV0cGqYNA4QWAPfzwC8hxWpdUkUnep3KakvLKK60l0kEBMM3ag=="
},
"@ungap/promise-all-settled": {
"version": "1.1.2",
"dev": true
},
"eslint": {
- "version": "8.18.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz",
- "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==",
+ "version": "8.20.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz",
+ "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==",
"dev": true,
"requires": {
"@eslint/eslintrc": "^1.3.0",
}
},
"eslint-plugin-sonarjs": {
- "version": "0.13.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.13.0.tgz",
- "integrity": "sha512-t3m7ta0EspzDxSOZh3cEOJIJVZgN/TlJYaBGnQlK6W/PZNbWep8q4RQskkJkA7/zwNpX0BaoEOSUUrqaADVoqA==",
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.14.0.tgz",
+ "integrity": "sha512-0X0q3fB8ghppms19cR2oIK2ajoFp7DEy3AVGDqO7WX02r1aWOzkrHa+veatGZw+R7amgBvfcF0qHCG66p9Zoag==",
"dev": true,
"requires": {}
},
"author": "Justin Wind <jwind-npm@squeep.com>",
"license": "ISC",
"dependencies": {
- "@squeep/web-linking": "git+https://git.squeep.com/squeep-web-linking/#v1.0.6",
+ "@squeep/base64url": "^1.0.3",
+ "@squeep/web-linking": "^1.0.7",
"axios": "^0.27.2",
"iconv": "^3.0.1",
"microformats-parser": "^1.4.1"
},
"devDependencies": {
- "eslint": "^8.18.0",
+ "eslint": "^8.20.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-security": "^1.5.0",
- "eslint-plugin-sonarjs": "^0.13.0",
+ "eslint-plugin-sonarjs": "^0.14.0",
"mocha": "^10.0.0",
"nyc": "^15.1.0",
"pre-commit": "^1.2.2",