Skip to content

Commit

Permalink
fixed some issues with latest dep dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
juanelas committed Apr 16, 2023
1 parent fa98063 commit 58c6997
Show file tree
Hide file tree
Showing 63 changed files with 570 additions and 678 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/automatic-publication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
node:
name: build and tests in node.js
name: Tests in node.js
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
19 changes: 8 additions & 11 deletions build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export default [
plugins: [
replace({
IS_BROWSER: true,
environment: 'browser',
_MODULE_TYPE: "'ESM'",
preventAssignment: true
}),
Expand Down Expand Up @@ -142,6 +143,7 @@ export default [
plugins: [
replace({
IS_BROWSER: true,
environment: 'browser',
_MODULE_TYPE: "'BUNDLE'",
preventAssignment: true
}),
Expand All @@ -162,19 +164,15 @@ export default [
...sourcemapOutputOptions,
format: 'cjs',
exports: 'auto',
plugins: [
terser()
]
interop: 'auto',
dynamicImportInCjs: false,
plugins: [terser()]
}
],
plugins: [
replace({
'await import(': 'require(',
delimiters: ['', ''],
preventAssignment: true
}),
replace({
IS_BROWSER: false,
environment: 'nodejs',
_MODULE_TYPE: "'CJS'",
preventAssignment: true
}),
Expand All @@ -197,14 +195,13 @@ export default [
file: join(rootDir, pkgJson.exports['.'].node.import.default),
...sourcemapOutputOptions,
format: 'es',
plugins: [
terser()
]
plugins: [terser()]
}
],
plugins: [
replace({
IS_BROWSER: false,
environment: 'nodejs',
_MODULE_TYPE: "'ESM'",
__filename: 'fileURLToPath(import.meta.url)',
__dirname: 'fileURLToPath(new URL(\'.\', import.meta.url))',
Expand Down
4 changes: 2 additions & 2 deletions build/testing/browser/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ const opts = {
// puppeteer options
puppeteerOptions: {
headless: false,
devtools: true
devtools: true,
// slowMo: 100,
// timeout: 10000
timeout: 0
},
logWarnings: false, // log warnings in Node console (usually not needed)
keepServerRunning: false, // keep server running until manually closed with ctrl-c. In combination with puppeteerOptions.headless (or just connecting any browser to the test page) allows debugging in browser
Expand Down
69 changes: 57 additions & 12 deletions dist/bundle.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ var _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({

var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty$1);

bn$1.exports;

(function (module) {
(function (module, exports) {

Expand Down Expand Up @@ -10900,15 +10902,26 @@ var jwtPayload = (protectedHeader, encodedPayload, options = {}) => {
if (!isObject$1(payload)) {
throw new JWTInvalid('JWT Claims Set must be a top-level JSON object');
}
const { issuer } = options;
const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options;
if (maxTokenAge !== undefined)
requiredClaims.push('iat');
if (audience !== undefined)
requiredClaims.push('aud');
if (subject !== undefined)
requiredClaims.push('sub');
if (issuer !== undefined)
requiredClaims.push('iss');
for (const claim of new Set(requiredClaims.reverse())) {
if (!(claim in payload)) {
throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, claim, 'missing');
}
}
if (issuer && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) {
throw new JWTClaimValidationFailed('unexpected "iss" claim value', 'iss', 'check_failed');
}
const { subject } = options;
if (subject && payload.sub !== subject) {
throw new JWTClaimValidationFailed('unexpected "sub" claim value', 'sub', 'check_failed');
}
const { audience } = options;
if (audience &&
!checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) {
throw new JWTClaimValidationFailed('unexpected "aud" claim value', 'aud', 'check_failed');
Expand All @@ -10929,7 +10942,7 @@ var jwtPayload = (protectedHeader, encodedPayload, options = {}) => {
}
const { currentDate } = options;
const now = epoch(currentDate || new Date());
if ((payload.iat !== undefined || options.maxTokenAge) && typeof payload.iat !== 'number') {
if ((payload.iat !== undefined || maxTokenAge) && typeof payload.iat !== 'number') {
throw new JWTClaimValidationFailed('"iat" claim must be a number', 'iat', 'invalid');
}
if (payload.nbf !== undefined) {
Expand All @@ -10948,9 +10961,9 @@ var jwtPayload = (protectedHeader, encodedPayload, options = {}) => {
throw new JWTExpired('"exp" claim timestamp check failed', 'exp', 'check_failed');
}
}
if (options.maxTokenAge) {
if (maxTokenAge) {
const age = now - payload.iat;
const max = typeof options.maxTokenAge === 'number' ? options.maxTokenAge : secs(options.maxTokenAge);
const max = typeof maxTokenAge === 'number' ? maxTokenAge : secs(maxTokenAge);
if (age - tolerance > max) {
throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', 'iat', 'check_failed');
}
Expand Down Expand Up @@ -11552,6 +11565,8 @@ async function sha(input, algorithm) {

var bn = {exports: {}};

bn.exports;

(function (module) {
(function (module, exports) {

Expand Down Expand Up @@ -32471,7 +32486,7 @@ class I3mWalletAgent extends EthersIoAgent {
else {
resolve({
...dltConfig,
rpcProviderUrl
rpcProviderUrl: (typeof rpcProviderUrl === 'string') ? rpcProviderUrl : rpcProviderUrl[0]
});
}
}).catch((reason) => { reject(reason); });
Expand Down Expand Up @@ -32500,7 +32515,7 @@ class I3mServerWalletAgent extends EthersIoAgent {
else {
resolve({
...dltConfig,
rpcProviderUrl
rpcProviderUrl: (typeof rpcProviderUrl === 'string') ? rpcProviderUrl : rpcProviderUrl[0]
});
}
}).catch((reason) => { reject(reason); });
Expand Down Expand Up @@ -35333,8 +35348,23 @@ var paths = {
example: "i3m"
},
rpcUrl: {
type: "string",
example: "http://95.211.3.250:8545"
oneOf: [
{
type: "string",
example: "http://95.211.3.250:8545"
},
{
type: "array",
items: {
type: "string"
},
uniqueItems: true,
example: [
"http://95.211.3.249:8545",
"http://95.211.3.250:8545"
]
}
]
}
},
additionalProperties: true
Expand Down Expand Up @@ -38064,8 +38094,23 @@ var components = {
example: "i3m"
},
rpcUrl: {
type: "string",
example: "http://95.211.3.250:8545"
oneOf: [
{
type: "string",
example: "http://95.211.3.250:8545"
},
{
type: "array",
items: {
type: "string"
},
uniqueItems: true,
example: [
"http://95.211.3.249:8545",
"http://95.211.3.250:8545"
]
}
]
}
},
additionalProperties: true
Expand Down
4 changes: 2 additions & 2 deletions dist/bundle.esm.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/bundle.iife.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/bundle.umd.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.browser.esm.js

Large diffs are not rendered by default.

Loading

0 comments on commit 58c6997

Please sign in to comment.