diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml
index 21338101f..deebec5f9 100644
--- a/.github/workflows/e2e-tests.yml
+++ b/.github/workflows/e2e-tests.yml
@@ -42,6 +42,10 @@ jobs:
run: |
dfx start --background
+ - name: setup
+ id: setup
+ run: npm run setup --workspaces --if-present
+
- run: npm run e2e --workspaces --if-present
env:
CI: true
diff --git a/.github/workflows/mitm.yml b/.github/workflows/mitm.yml
index d2fa2d52b..1890237fd 100644
--- a/.github/workflows/mitm.yml
+++ b/.github/workflows/mitm.yml
@@ -7,6 +7,7 @@ on:
- reopened
- edited
- synchronize
+ workflow_dispatch:
jobs:
test:
@@ -37,8 +38,8 @@ jobs:
- uses: actions/setup-python@v2
with:
- python-version: '3.8'
- - run: pip3 install mitmproxy~=8.0.0
+ python-version: '3.11'
+ - run: pip3 install mitmproxy~=10.0.0
- run: echo y | sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
@@ -51,17 +52,15 @@ jobs:
id: mitmdump
run: |
set -ex
- mitmdump -p 8888 --mode reverse:http://127.0.0.1:4943 \
+ mitmdump -p 8888 --mode reverse:https://icp-api.io \
--modify-headers '/~s/Transfer-Encoding/' \
--modify-body '/~s/Hello/Hullo' \
&
- sleep 5
+ sleep 20
- name: mitm e2e
env:
CI: true
- REPLICA_PORT: 8888
- MITM: true
run: npm run mitm --workspaces --if-present
aggregate:
diff --git a/demos/sample-javascript/README.md b/demos/sample-javascript/README.md
index 5b3647013..59a063859 100644
--- a/demos/sample-javascript/README.md
+++ b/demos/sample-javascript/README.md
@@ -6,4 +6,4 @@
1. Ensure all dependencies are installed: `npm install`
2. Run the development server `npm run develop`
-3. Visit the running site at http://localhost:8080
+3. Visit the running site at http://127.0.0.1:8080
diff --git a/docs/generated/changelog.html b/docs/generated/changelog.html
index 0581bc387..491c78ecd 100644
--- a/docs/generated/changelog.html
+++ b/docs/generated/changelog.html
@@ -12,6 +12,10 @@
Agent-JS Changelog
Version x.x.x
+ -
+ chore: replaces use of localhost with 127.0.0.1 for better node 18 support. Also swaps
+ Jest for vitest, runs mitm against mainnet, and updates some packages
+
- feat: retry logic will catch and retry for thrown errors
-
feat!: adds certificate logic to decode subnet and node key paths from the hashtree.
diff --git a/e2e/browser/.proxyrc b/e2e/browser/.proxyrc
index e85d9991a..4e68b07fe 100644
--- a/e2e/browser/.proxyrc
+++ b/e2e/browser/.proxyrc
@@ -1,5 +1,5 @@
{
"/api": {
- "target": "http://localhost:4943/",
+ "target": "http://127.0.0.1:4943/"
}
}
diff --git a/e2e/browser/cypress/e2e/ecdsa.cy.js b/e2e/browser/cypress/e2e/ecdsa.cy.js
index d390b56c3..4fe1fb1e4 100644
--- a/e2e/browser/cypress/e2e/ecdsa.cy.js
+++ b/e2e/browser/cypress/e2e/ecdsa.cy.js
@@ -2,11 +2,19 @@ import { ECDSAKeyIdentity } from '@dfinity/identity';
import { get, set } from 'idb-keyval';
import { createActor } from '../utils/actor';
import ids from '../../.dfx/local/canister_ids.json';
+import fetchPolyfill from 'isomorphic-fetch';
const canisterId = ids.whoami.local;
const setup = async () => {
const identity1 = await ECDSAKeyIdentity.generate();
- const whoami1 = createActor(ids.whoami.local, { agentOptions: { identity: identity1 } });
+ const whoami1 = createActor(ids.whoami.local, {
+ agentOptions: {
+ verifyQuerySignatures: false,
+ identity: identity1,
+ fetch: fetchPolyfill,
+ host: 'http://127.0.0.1:4943/',
+ },
+ });
const principal1 = await whoami1.whoami();
@@ -34,7 +42,14 @@ describe('ECDSAKeyIdentity tests with SubtleCrypto', () => {
const identity2 = await ECDSAKeyIdentity.fromKeyPair(storedKeyPair);
- const whoami2 = createActor(canisterId, { agentOptions: { identity: identity2 } });
+ const whoami2 = createActor(canisterId, {
+ agentOptions: {
+ verifyQuerySignatures: false,
+ identity: identity2,
+ fetchPolyfill,
+ host: 'http://127.0.0.1:4943/',
+ },
+ });
const principal2 = await whoami2.whoami();
diff --git a/e2e/browser/package.json b/e2e/browser/package.json
index ea54b7b79..4c3368403 100644
--- a/e2e/browser/package.json
+++ b/e2e/browser/package.json
@@ -4,9 +4,10 @@
"version": "0.19.3",
"scripts": {
"ci": "npm run e2e",
- "pree2e": "dfx deploy; dfx generate; pm2 --name parcel start npm -- start",
- "e2e": "cypress run",
- "poste2e": "pm2 delete 0",
+ "setup": "dfx deploy; dfx generate; pm2 --name parcel start npm -- start",
+ "cypress": "cypress run",
+ "e2e": "npm run cypress",
+ "poste2e": "pm2 kill",
"eslint:fix": "npm run lint -- --fix",
"eslint": "eslint --ext '.js,.jsx,.ts,.tsx' cypress *.js",
"lint": "npm run eslint",
@@ -15,7 +16,7 @@
"publish:release": "",
"test:coverage": "",
"test": "",
- "start": "parcel --watch-for-stdin src/index.html"
+ "start": "parcel src/index.html"
},
"devDependencies": {
"@types/node": "^18.0.6",
@@ -28,7 +29,6 @@
},
"dependencies": {
"@dfinity/agent": "^0.19.3",
- "@dfinity/authentication": "^0.14.1",
"@dfinity/identity": "^0.19.3",
"@dfinity/principal": "^0.19.3",
"idb-keyval": "^6.2.0"
diff --git a/e2e/node/basic/assets.test.ts b/e2e/node/basic/assets.test.ts
index b075cfa6f..58516c384 100644
--- a/e2e/node/basic/assets.test.ts
+++ b/e2e/node/basic/assets.test.ts
@@ -1,12 +1,10 @@
-/**
- * @jest-environment node
- */
import { existsSync, readFileSync, unlinkSync } from 'fs';
import path from 'path';
import agent from '../utils/agent';
import { Actor } from '@dfinity/agent';
import { Principal } from '@dfinity/principal';
import { AssetManager } from '@dfinity/assets';
+import { test, describe, it, expect, beforeAll, afterEach } from 'vitest';
/**
* Create (pseudo) random bytes Readable
@@ -43,7 +41,6 @@ const testFile = {
target: path.join(__dirname, '../package_copy.json'),
};
-jest.setTimeout(100000);
describe('assets', () => {
let canisterId: Principal;
@@ -84,9 +81,17 @@ describe('assets', () => {
}
});
- it('store, get and delete 1MB asset (single chunk)', () => testRandomBytes('1MB.bin', 1000000));
+ it(
+ 'store, get and delete 1MB asset (single chunk)',
+ () => testRandomBytes('1MB.bin', 1000000),
+ 100000,
+ );
- it('store, get and delete 3MB asset (multiple chunk)', () => testRandomBytes('3MB.bin', 3000000));
+ it(
+ 'store, get and delete 3MB asset (multiple chunk)',
+ () => testRandomBytes('3MB.bin', 3000000),
+ 100000,
+ );
it('batch process assets and verify asset list', async () => {
const assetManager = new AssetManager({ canisterId, agent: await agent });
diff --git a/e2e/node/basic/basic.test.ts b/e2e/node/basic/basic.test.ts
index e42dae552..ad5365760 100644
--- a/e2e/node/basic/basic.test.ts
+++ b/e2e/node/basic/basic.test.ts
@@ -5,6 +5,7 @@ import { ActorMethod, Certificate, getManagementCanister } from '@dfinity/agent'
import { IDL } from '@dfinity/candid';
import { Principal } from '@dfinity/principal';
import agent from '../utils/agent';
+import { test, expect } from 'vitest';
test('read_state', async () => {
const resolvedAgent = await agent;
diff --git a/e2e/node/basic/canisterStatus.test.ts b/e2e/node/basic/canisterStatus.test.ts
index dc58c6cee..21dc0d00c 100644
--- a/e2e/node/basic/canisterStatus.test.ts
+++ b/e2e/node/basic/canisterStatus.test.ts
@@ -1,15 +1,16 @@
import { CanisterStatus, HttpAgent } from '@dfinity/agent';
import { Principal } from '@dfinity/principal';
import counter from '../canisters/counter';
+import { makeAgent } from '../utils/agent';
+import { describe, it, afterEach, expect } from 'vitest';
-jest.setTimeout(30_000);
afterEach(async () => {
await Promise.resolve();
});
describe('canister status', () => {
it('should fetch successfully', async () => {
const counterObj = await (await counter)();
- const agent = new HttpAgent({ host: `http://localhost:${process.env.REPLICA_PORT}` });
+ const agent = await makeAgent();
await agent.fetchRootKey();
const request = await CanisterStatus.request({
canisterId: Principal.from(counterObj.canisterId),
@@ -21,7 +22,10 @@ describe('canister status', () => {
});
it('should throw an error if fetchRootKey has not been called', async () => {
const counterObj = await (await counter)();
- const agent = new HttpAgent({ host: `http://localhost:${process.env.REPLICA_PORT}` });
+ const agent = new HttpAgent({
+ host: `http://127.0.0.1:${process.env.REPLICA_PORT ?? 4943}`,
+ verifyQuerySignatures: false,
+ });
const shouldThrow = async () => {
// eslint-disable-next-line no-useless-catch
try {
diff --git a/e2e/node/basic/counter.test.ts b/e2e/node/basic/counter.test.ts
index 21e9bf303..bb346c412 100644
--- a/e2e/node/basic/counter.test.ts
+++ b/e2e/node/basic/counter.test.ts
@@ -1,9 +1,6 @@
-/**
- * @jest-environment node
- */
import counterCanister, { noncelessCanister, createActor } from '../canisters/counter';
+import { it, expect, describe, vi } from 'vitest';
-jest.setTimeout(40000);
describe('counter', () => {
it('should greet', async () => {
const { actor: counter } = await counterCanister();
@@ -12,7 +9,7 @@ describe('counter', () => {
} catch (error) {
console.error(error);
}
- });
+ }, 40000);
it('should submit distinct requests with nonce by default', async () => {
const { actor: counter } = await counterCanister();
const values = await Promise.all(new Array(4).fill(undefined).map(() => counter.inc_read()));
@@ -23,7 +20,7 @@ describe('counter', () => {
// Sets of unique results should be the same length
expect(set1.size).toBe(values.length);
expect(set2.size).toEqual(values2.length);
- });
+ }, 40000);
it('should submit duplicate requests if nonce is disabled', async () => {
const { actor: counter } = await noncelessCanister();
const values = await Promise.all(new Array(4).fill(undefined).map(() => counter.inc_read()));
@@ -32,7 +29,7 @@ describe('counter', () => {
const set2 = new Set(values2);
expect(set1.size < values.length || set2.size < values2.length).toBe(true);
- });
+ }, 40000);
it('should increment', async () => {
const { actor: counter } = await noncelessCanister();
@@ -41,13 +38,12 @@ describe('counter', () => {
expect(Number(await counter.read())).toEqual(1);
await counter.inc();
expect(Number(await counter.read())).toEqual(2);
- });
+ }, 40000);
});
describe('retrytimes', () => {
it('should retry after a failure', async () => {
- jest.spyOn(console, 'warn').mockImplementation();
let count = 0;
- const fetchMock = jest.fn(function (...args) {
+ const fetchMock = vi.fn(function (...args) {
if (count <= 1) {
count += 1;
return new Response('Test error - ignore', {
@@ -68,5 +64,5 @@ describe('retrytimes', () => {
} catch (error) {
console.error(error);
}
- });
+ }, 40000);
});
diff --git a/e2e/node/basic/identity.test.ts b/e2e/node/basic/identity.test.ts
index 964abdf29..978f6d182 100644
--- a/e2e/node/basic/identity.test.ts
+++ b/e2e/node/basic/identity.test.ts
@@ -1,6 +1,3 @@
-/**
- * @jest-environment node
- */
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Actor, HttpAgent, SignIdentity } from '@dfinity/agent';
import { IDL } from '@dfinity/candid';
@@ -12,8 +9,9 @@ import {
ECDSAKeyIdentity,
} from '@dfinity/identity';
import { Secp256k1KeyIdentity } from '@dfinity/identity-secp256k1';
-import agent from '../utils/agent';
+import agent, { makeAgent } from '../utils/agent';
import identityCanister from '../canisters/identity';
+import { test, expect } from 'vitest';
function createIdentity(seed: number): SignIdentity {
const seed1 = new Array(32).fill(0);
@@ -33,7 +31,7 @@ async function createIdentityActor(
idl: IDL.InterfaceFactory,
): Promise {
const identity = createIdentity(seed);
- const agent1 = new HttpAgent({ source: await agent, identity });
+ const agent1 = await makeAgent({ identity });
return Actor.createActor(idl, {
canisterId,
agent: agent1,
@@ -52,7 +50,7 @@ async function createSecp256k1IdentityActor(
}
const identity = Secp256k1KeyIdentity.generate(seed1);
- const agent1 = new HttpAgent({ source: await agent, identity });
+ const agent1 = await makeAgent({ identity });
return Actor.createActor(idl, {
canisterId,
agent: agent1,
@@ -70,7 +68,9 @@ async function createEcdsaIdentityActor(
} else {
effectiveIdentity = await ECDSAKeyIdentity.generate();
}
- const agent1 = new HttpAgent({ source: await agent, identity: effectiveIdentity });
+ const agent1 = await makeAgent({
+ identity: effectiveIdentity,
+ });
return Actor.createActor(idl, {
canisterId,
agent: agent1,
@@ -88,7 +88,6 @@ async function installIdentityCanister(): Promise<{
};
}
-jest.setTimeout(30000);
test('identity: query and call gives same principal', async () => {
const { canisterId, idl } = await installIdentityCanister();
const identity = Actor.createActor(idl, {
@@ -98,9 +97,8 @@ test('identity: query and call gives same principal', async () => {
const callPrincipal = await identity.whoami();
const queryPrincipal = await identity.whoami_query();
expect(callPrincipal).toEqual(queryPrincipal);
-});
+}, 30000);
-jest.setTimeout(30000);
test('identity: two different Ed25519 keys should have a different principal', async () => {
const { canisterId, idl } = await installIdentityCanister();
const identity1 = await createIdentityActor(0, canisterId, idl);
@@ -109,9 +107,7 @@ test('identity: two different Ed25519 keys should have a different principal', a
const principal1 = await identity1.whoami_query();
const principal2 = await identity2.whoami_query();
expect(principal1).not.toEqual(principal2);
-});
-
-jest.setTimeout(30000);
+}, 30000);
test('identity: two different Secp256k1 keys should have a different principal', async () => {
const { canisterId, idl } = await installIdentityCanister();
// Seeded identity
@@ -122,9 +118,8 @@ test('identity: two different Secp256k1 keys should have a different principal',
const principal1 = await identity1.whoami_query();
const principal2 = await identity2.whoami_query();
expect(principal1).not.toEqual(principal2);
-});
+}, 30000);
-jest.setTimeout(30000);
test('identity: two different Ecdsa keys should have a different principal', async () => {
const { canisterId, idl } = await installIdentityCanister();
const identity1 = await createEcdsaIdentityActor(canisterId, idl);
@@ -133,9 +128,8 @@ test('identity: two different Ecdsa keys should have a different principal', asy
const principal1 = await identity1.whoami_query();
const principal2 = await identity2.whoami_query();
expect(principal1).not.toEqual(principal2);
-});
+}, 30000);
-jest.setTimeout(30000);
test('delegation: principal is the same between delegated keys with secp256k1', async () => {
const { canisterId, idl } = await installIdentityCanister();
@@ -147,15 +141,19 @@ test('delegation: principal is the same between delegated keys with secp256k1',
const identityActor1 = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: masterKey }),
+ agent: await makeAgent({
+ identity: masterKey,
+ }),
}) as any;
const identityActor2 = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: sessionKey }),
+ agent: await makeAgent({
+ identity: sessionKey,
+ }),
}) as any;
const identityActor3 = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: id3 }),
+ agent: await makeAgent({ identity: id3 }),
}) as any;
const principal1 = await identityActor1.whoami_query();
@@ -164,9 +162,8 @@ test('delegation: principal is the same between delegated keys with secp256k1',
expect(principal1).not.toEqual(principal2);
expect(principal1).toEqual(principal3);
expect(principal2).not.toEqual(principal3);
-});
+}, 30000);
-jest.setTimeout(30000);
test('delegation: principal is the same between delegated keys', async () => {
const { canisterId, idl } = await installIdentityCanister();
@@ -178,15 +175,19 @@ test('delegation: principal is the same between delegated keys', async () => {
const identityActor1 = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: masterKey }),
+ agent: await makeAgent({
+ identity: masterKey,
+ }),
}) as any;
const identityActor2 = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: sessionKey }),
+ agent: await makeAgent({
+ identity: sessionKey,
+ }),
}) as any;
const identityActor3 = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: id3 }),
+ agent: await makeAgent({ identity: id3 }),
}) as any;
const principal1 = await identityActor1.whoami_query();
@@ -195,9 +196,8 @@ test('delegation: principal is the same between delegated keys', async () => {
expect(principal1).not.toEqual(principal2);
expect(principal1).toEqual(principal3);
expect(principal2).not.toEqual(principal3);
-});
+}, 30000);
-jest.setTimeout(30000);
test('delegation: works with 3 keys', async () => {
const { canisterId, idl } = await installIdentityCanister();
@@ -215,19 +215,27 @@ test('delegation: works with 3 keys', async () => {
const identityActorBottom = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: bottomKey }),
+ agent: await makeAgent({
+ identity: bottomKey,
+ }),
}) as any;
const identityActorMiddle = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: middleKey }),
+ agent: await makeAgent({
+ identity: middleKey,
+ }),
}) as any;
const identityActorRoot = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: rootKey }),
+ agent: await makeAgent({
+ identity: rootKey,
+ }),
}) as any;
const identityActorDelegated = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: idDelegated }),
+ agent: await makeAgent({
+ identity: idDelegated,
+ }),
}) as any;
const principalBottom = await identityActorBottom.whoami_query();
@@ -238,9 +246,8 @@ test('delegation: works with 3 keys', async () => {
expect(principalMiddle).not.toEqual(principalRoot);
expect(principalBottom).not.toEqual(principalRoot);
expect(principalRoot).toEqual(principalDelegated);
-});
+}, 30000);
-jest.setTimeout(30000);
test('delegation: works with 4 keys', async () => {
const { canisterId, idl } = await installIdentityCanister();
@@ -267,23 +274,33 @@ test('delegation: works with 4 keys', async () => {
const identityActorBottom = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: bottomKey }),
+ agent: await makeAgent({
+ identity: bottomKey,
+ }),
}) as any;
const identityActorMiddle = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: middleKey }),
+ agent: await makeAgent({
+ identity: middleKey,
+ }),
}) as any;
const identityActorMiddle2 = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: middle2Key }),
+ agent: await makeAgent({
+ identity: middle2Key,
+ }),
}) as any;
const identityActorRoot = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: rootKey }),
+ agent: await makeAgent({
+ identity: rootKey,
+ }),
}) as any;
const identityActorDelegated = Actor.createActor(idl, {
canisterId,
- agent: new HttpAgent({ source: await agent, identity: idDelegated }),
+ agent: await makeAgent({
+ identity: idDelegated,
+ }),
}) as any;
const principalBottom = await identityActorBottom.whoami_query();
@@ -297,4 +314,4 @@ test('delegation: works with 4 keys', async () => {
expect(principalBottom).not.toEqual(principalRoot);
expect(principalBottom).not.toEqual(principalMiddle2);
expect(principalRoot).toEqual(principalDelegated);
-});
+}, 30000);
diff --git a/e2e/node/basic/mainnet.test.ts b/e2e/node/basic/mainnet.test.ts
new file mode 100644
index 000000000..8d6118534
--- /dev/null
+++ b/e2e/node/basic/mainnet.test.ts
@@ -0,0 +1,115 @@
+import { Actor, AnonymousIdentity, HttpAgent, Identity } from '@dfinity/agent';
+import { IDL } from '@dfinity/candid';
+import { Ed25519KeyIdentity } from '@dfinity/identity';
+import { Principal } from '@dfinity/principal';
+import { describe, it, expect, vi } from 'vitest';
+import { makeAgent } from '../utils/agent';
+
+const createWhoamiActor = async (identity: Identity) => {
+ const canisterId = 'ivcos-eqaaa-aaaab-qablq-cai';
+ const idlFactory = () => {
+ return IDL.Service({
+ whoami: IDL.Func([], [IDL.Principal], ['query']),
+ });
+ };
+ vi.useFakeTimers();
+ new Date(Date.now());
+
+ const agent = await makeAgent({ host: 'https://icp-api.io', identity });
+
+ return Actor.createActor(idlFactory, {
+ agent,
+ canisterId,
+ });
+};
+
+describe('certified query', () => {
+ it('should verify a query certificate', async () => {
+ const actor = await createWhoamiActor(new AnonymousIdentity());
+
+ const result = await actor.whoami();
+ expect(Principal.from(result)).toBeInstanceOf(Principal);
+ }, 100_000);
+ it('should verify lots of query certificates', async () => {
+ let count = 0;
+ const identities = Array.from({ length: 20 }).map(() => {
+ const newIdentity = Ed25519KeyIdentity.generate(new Uint8Array(32).fill(count));
+ count++;
+ return newIdentity;
+ });
+ const actors = await identities.map(async identity => await createWhoamiActor(identity));
+
+ const promises = actors.map(async actor => (await actor).whoami());
+
+ const results = await Promise.all(promises);
+ results.forEach(result => {
+ expect(Principal.from(result)).toBeInstanceOf(Principal);
+ });
+ expect(results.length).toBe(20);
+
+ expect(results).toMatchInlineSnapshot(`
+ [
+ {
+ "__principal__": "535yc-uxytb-gfk7h-tny7p-vjkoe-i4krp-3qmcl-uqfgr-cpgej-yqtjq-rqe",
+ },
+ {
+ "__principal__": "wf3fv-4c4nr-7ks2b-xa4u7-kf3no-32glf-lf7e4-4ng4a-wwtlu-a2vnq-nae",
+ },
+ {
+ "__principal__": "52mr2-fw2ng-2ofst-7jekz-xbymo-3ysz7-itwdk-bgstz-r7g4g-oz5vi-pqe",
+ },
+ {
+ "__principal__": "skpwg-42fe4-eyep5-nfyz7-66wvg-hthea-q3eek-vonbv-5wpxs-nxhmh-fqe",
+ },
+ {
+ "__principal__": "ghaya-cncjm-ntxgt-af5pp-6hzsz-tvwlv-hrlfc-ocq3t-ai7vk-vyixr-cqe",
+ },
+ {
+ "__principal__": "ebtho-zkeqd-ebs74-f5if3-lk6js-3a5q5-37xt4-3ylns-h7r4n-tkhly-aqe",
+ },
+ {
+ "__principal__": "5zqn5-627q2-spx2w-mt6bm-llsnz-gipvv-5femn-3box4-vzuh6-bn723-sae",
+ },
+ {
+ "__principal__": "tek7g-2zmny-nzjwg-ansf7-rkxv6-z32x6-3flbb-ous5d-pygjx-wkhlc-jae",
+ },
+ {
+ "__principal__": "jjn6g-sh75l-r3cxb-wxrkl-frqld-6p6qq-d4ato-wske5-op7s5-n566f-bqe",
+ },
+ {
+ "__principal__": "447dk-byguq-fqkfn-7h4r6-lpk74-itbnh-mkutj-m6tmy-igaff-hmfel-cqe",
+ },
+ {
+ "__principal__": "muo3f-ines5-bxbwm-6wi5e-z663m-3zte2-r7d4x-pleey-xqvxt-scwc5-jae",
+ },
+ {
+ "__principal__": "snzff-yj2qd-fjns7-lqhvw-rsgq7-tohk2-fjnw4-uq3d6-wtk56-pxgry-mqe",
+ },
+ {
+ "__principal__": "pb54o-aqais-24v7j-msopl-bqeuv-paefp-vuoqc-gkezk-grujb-oetl6-sae",
+ },
+ {
+ "__principal__": "bf37n-7ybos-wmqt6-yiov5-24q4m-ajpjk-madkr-snuj2-ngruk-tspnh-aqe",
+ },
+ {
+ "__principal__": "tbjmy-vay5e-hqvv6-sval4-zfxmm-aii6f-b7p55-hwtz5-dejtl-qcuh2-aqe",
+ },
+ {
+ "__principal__": "7d3pe-dh4ov-fp5xz-nctjc-5rduh-gzv3t-5ioyh-4dvx3-x4lgj-hz63t-dqe",
+ },
+ {
+ "__principal__": "37axv-sazcg-75pi3-owhxr-kollq-xnzjz-zfxsv-nzdbp-yaelp-shcul-jae",
+ },
+ {
+ "__principal__": "r772c-4dz5f-rpg4e-qzxgg-7bxlb-67zpu-bitgb-vsx7k-mmagd-6zk3d-4qe",
+ },
+ {
+ "__principal__": "knkon-d3kx7-du4wt-r2fo6-uwc5a-hwhkk-m7snf-nxfhu-6bhgb-k6dn5-wae",
+ },
+ {
+ "__principal__": "entn3-mas6a-37smu-vadtg-wgsno-zokif-vyphu-umase-lfwqe-dmcrk-kae",
+ },
+ ]
+ `);
+ });
+});
diff --git a/e2e/node/basic/mitm.test.ts b/e2e/node/basic/mitm.test.ts
index 1cae8e3dc..eba715353 100644
--- a/e2e/node/basic/mitm.test.ts
+++ b/e2e/node/basic/mitm.test.ts
@@ -1,16 +1,21 @@
-/**
- * @jest-environment node
- */
-import counterCanister from '../canisters/counter';
+import { createActor } from '../canisters/declarations/counter/index';
+import { test, expect } from 'vitest';
+import { makeAgent } from '../utils/agent';
-let mitmTest = test;
+let mitmTest: any = test;
if (!process.env['MITM']) {
mitmTest = test.skip;
}
-
-jest.setTimeout(30000);
-mitmTest('mitm greet', async () => {
- const { actor: counter } = await counterCanister();
- await expect(counter.greet('counter')).rejects.toThrow(/Invalid certificate/);
- expect(await counter.queryGreet('counter')).toEqual('Hullo, counter!');
-});
+mitmTest(
+ 'mitm greet',
+ async () => {
+ const counter = await createActor('tnnnb-2yaaa-aaaab-qaiiq-cai', {
+ agent: await makeAgent({
+ host: 'http://127.0.0.1:8888',
+ }),
+ });
+ await expect(counter.greet('counter')).rejects.toThrow(/Invalid certificate/);
+ expect(await counter.queryGreet('counter')).toEqual('Hullo, counter!');
+ },
+ { timeout: 30000 },
+);
diff --git a/e2e/node/canisters/counter.ts b/e2e/node/canisters/counter.ts
index 6c92442b1..e022d62e8 100644
--- a/e2e/node/canisters/counter.ts
+++ b/e2e/node/canisters/counter.ts
@@ -1,9 +1,9 @@
-import { Actor, HttpAgent, HttpAgentOptions } from '@dfinity/agent';
+import { Actor, HttpAgentOptions } from '@dfinity/agent';
import { IDL } from '@dfinity/candid';
import { Principal } from '@dfinity/principal';
import { readFileSync } from 'fs';
import path from 'path';
-import agent, { port, identity } from '../utils/agent';
+import agent, { identity, makeAgent } from '../utils/agent';
let cache: {
canisterId: Principal;
@@ -52,15 +52,9 @@ export async function noncelessCanister(): Promise<{
actor: any;
}> {
const module = readFileSync(path.join(__dirname, 'counter.wasm'));
- const disableNonceAgent = await Promise.resolve(
- new HttpAgent({
- host: 'http://127.0.0.1:' + port,
- identity,
- disableNonce: true,
- }),
- ).then(async agent => {
- await agent.fetchRootKey();
- return agent;
+ const disableNonceAgent = await makeAgent({
+ identity,
+ disableNonce: true,
});
const canisterId = await Actor.createCanister({ agent: disableNonceAgent });
@@ -84,11 +78,19 @@ export async function noncelessCanister(): Promise<{
export const createActor = async (options?: HttpAgentOptions) => {
const module = readFileSync(path.join(__dirname, 'counter.wasm'));
- const agent = new HttpAgent({ host: `http://localhost:${process.env.REPLICA_PORT}`, ...options });
- await agent.fetchRootKey();
+ const agent = await makeAgent({
+ ...options,
+ });
+ try {
+ if (!options?.host?.includes('icp-api')) {
+ await agent.fetchRootKey();
+ }
+ } catch (_) {
+ //
+ }
const canisterId = await Actor.createCanister({ agent });
- await Actor.install({ module }, { canisterId, agent: await agent });
+ await Actor.install({ module }, { canisterId, agent });
const idl: IDL.InterfaceFactory = ({ IDL }) => {
return IDL.Service({
inc: IDL.Func([], [], []),
@@ -98,5 +100,5 @@ export const createActor = async (options?: HttpAgentOptions) => {
queryGreet: IDL.Func([IDL.Text], [IDL.Text], ['query']),
});
};
- return Actor.createActor(idl, { canisterId, agent: await agent }) as any;
+ return Actor.createActor(idl, { canisterId, agent }) as any;
};
diff --git a/e2e/node/canisters/declarations/counter/counter.did b/e2e/node/canisters/declarations/counter/counter.did
new file mode 100644
index 000000000..6bddc58e9
--- /dev/null
+++ b/e2e/node/canisters/declarations/counter/counter.did
@@ -0,0 +1,8 @@
+service : {
+ greet: (text) -> (text);
+ inc: () -> ();
+ inc_read: () -> (nat);
+ queryGreet: (text) -> (text) query;
+ read: () -> (nat) query;
+ write: (nat) -> ();
+}
diff --git a/e2e/node/canisters/declarations/counter/counter.did.d.ts b/e2e/node/canisters/declarations/counter/counter.did.d.ts
new file mode 100644
index 000000000..601b20f38
--- /dev/null
+++ b/e2e/node/canisters/declarations/counter/counter.did.d.ts
@@ -0,0 +1,11 @@
+import type { Principal } from '@dfinity/principal';
+import type { ActorMethod } from '@dfinity/agent';
+
+export interface _SERVICE {
+ greet: ActorMethod<[string], string>;
+ inc: ActorMethod<[], undefined>;
+ inc_read: ActorMethod<[], bigint>;
+ queryGreet: ActorMethod<[string], string>;
+ read: ActorMethod<[], bigint>;
+ write: ActorMethod<[bigint], undefined>;
+}
diff --git a/e2e/node/canisters/declarations/counter/counter.did.js b/e2e/node/canisters/declarations/counter/counter.did.js
new file mode 100644
index 000000000..553ad25d9
--- /dev/null
+++ b/e2e/node/canisters/declarations/counter/counter.did.js
@@ -0,0 +1,13 @@
+export const idlFactory = ({ IDL }) => {
+ return IDL.Service({
+ greet: IDL.Func([IDL.Text], [IDL.Text], []),
+ inc: IDL.Func([], [], []),
+ inc_read: IDL.Func([], [IDL.Nat], []),
+ queryGreet: IDL.Func([IDL.Text], [IDL.Text], ['query']),
+ read: IDL.Func([], [IDL.Nat], ['query']),
+ write: IDL.Func([IDL.Nat], [], []),
+ });
+};
+export const init = ({ IDL }) => {
+ return [];
+};
diff --git a/e2e/node/canisters/declarations/counter/index.d.ts b/e2e/node/canisters/declarations/counter/index.d.ts
new file mode 100644
index 000000000..cdd77d9ab
--- /dev/null
+++ b/e2e/node/canisters/declarations/counter/index.d.ts
@@ -0,0 +1,45 @@
+import type { ActorSubclass, HttpAgentOptions, ActorConfig, Agent } from '@dfinity/agent';
+import type { Principal } from '@dfinity/principal';
+import type { IDL } from '@dfinity/candid';
+
+import { _SERVICE } from './counter.did';
+
+export declare const idlFactory: IDL.InterfaceFactory;
+export declare const canisterId: string;
+
+export declare interface CreateActorOptions {
+ /**
+ * @see {@link Agent}
+ */
+ agent?: Agent;
+ /**
+ * @see {@link HttpAgentOptions}
+ */
+ agentOptions?: HttpAgentOptions;
+ /**
+ * @see {@link ActorConfig}
+ */
+ actorOptions?: ActorConfig;
+}
+
+/**
+ * Intializes an {@link ActorSubclass}, configured with the provided SERVICE interface of a canister.
+ * @constructs {@link ActorSubClass}
+ * @param {string | Principal} canisterId - ID of the canister the {@link Actor} will talk to
+ * @param {CreateActorOptions} options - see {@link CreateActorOptions}
+ * @param {CreateActorOptions["agent"]} options.agent - a pre-configured agent you'd like to use. Supercedes agentOptions
+ * @param {CreateActorOptions["agentOptions"]} options.agentOptions - options to set up a new agent
+ * @see {@link HttpAgentOptions}
+ * @param {CreateActorOptions["actorOptions"]} options.actorOptions - options for the Actor
+ * @see {@link ActorConfig}
+ */
+export declare const createActor: (
+ canisterId: string | Principal,
+ options?: CreateActorOptions,
+) => ActorSubclass<_SERVICE>;
+
+/**
+ * Intialized Actor using default settings, ready to talk to a canister using its candid interface
+ * @constructs {@link ActorSubClass}
+ */
+export declare const counter: ActorSubclass<_SERVICE>;
diff --git a/e2e/node/canisters/declarations/counter/index.ts b/e2e/node/canisters/declarations/counter/index.ts
new file mode 100644
index 000000000..700142ab0
--- /dev/null
+++ b/e2e/node/canisters/declarations/counter/index.ts
@@ -0,0 +1,37 @@
+import { Actor, HttpAgent } from '@dfinity/agent';
+
+// Imports and re-exports candid interface
+import { idlFactory } from './counter.did.js';
+export { idlFactory } from './counter.did.js';
+
+/* CANISTER_ID is replaced by webpack based on node environment
+ * Note: canister environment variable will be standardized as
+ * process.env.CANISTER_ID_
+ * beginning in dfx 0.15.0
+ */
+export const canisterId = process.env.CANISTER_ID_COUNTER || process.env.COUNTER_CANISTER_ID;
+
+export const createActor = (canisterId, options = {}) => {
+ const agent = options.agent || new HttpAgent({ ...options.agentOptions });
+
+ if (options.agent && options.agentOptions) {
+ console.warn(
+ 'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.',
+ );
+ }
+
+ // Fetch root key for certificate validation during development
+ if (process.env.DFX_NETWORK !== 'ic') {
+ agent.fetchRootKey().catch(err => {
+ console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
+ console.error(err);
+ });
+ }
+
+ // Creates an actor with using the candid interface and the HttpAgent
+ return Actor.createActor(idlFactory, {
+ agent,
+ canisterId,
+ ...options.actorOptions,
+ });
+};
diff --git a/e2e/node/jest.config.ts b/e2e/node/jest.config.ts
deleted file mode 100644
index acb6e025d..000000000
--- a/e2e/node/jest.config.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import type { Config } from '@jest/types';
-const config: Config.InitialOptions = {
- verbose: true,
- testEnvironment: 'jsdom',
- testPathIgnorePatterns: ['/node_modules/', '/lib/', '/dist/', '/docs/'],
- testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
- roots: [`/e2e/node`],
- bail: false,
- moduleDirectories: ['node_modules'],
- modulePaths: [`/e2e/node/`],
- setupFiles: [`/e2e/node/test-setup.ts`],
- transform: {
- '^.+\\.ts$': 'ts-jest',
- },
- collectCoverageFrom: ['**/*.{ts,tsx}'],
- displayName: 'e2e-node',
- rootDir: '../..',
-};
-
-export default config;
diff --git a/e2e/node/package.json b/e2e/node/package.json
index 28381406c..36055d949 100644
--- a/e2e/node/package.json
+++ b/e2e/node/package.json
@@ -4,11 +4,11 @@
"version": "0.19.3",
"scripts": {
"ci": "npm run e2e",
- "e2e": "jest --verbose",
+ "e2e": "vitest",
"eslint:fix": "npm run lint -- --fix",
"eslint": "eslint --ext '.js,.jsx,.ts,.tsx' basic canisters utils *.ts",
"lint": "npm run eslint",
- "mitm": "jest -i basic/mitm.test.ts",
+ "mitm": "MITM=true vitest ./basic/mitm.test.ts",
"build": "",
"lint:fix": "npm run lint -- --fix",
"publish:release": "",
@@ -30,23 +30,20 @@
"@tsconfig/node17": "^1.0.1",
"@types/base64-js": "^1.3.0",
"@types/isomorphic-fetch": "^0.0.36",
- "@types/jest": "^28.1.4",
"@types/text-encoding": "^0.0.36",
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
"esbuild": "^0.15.16",
- "eslint-plugin-jsdoc": "^39.3.3",
"eslint": "^8.19.0",
+ "eslint-plugin-jsdoc": "^39.3.3",
"isomorphic-fetch": "^3.0.0",
- "jest-environment-jsdom": "^28.1.3",
- "jest": "^28.1.2",
"locus": "^2.0.4",
"node-webcrypto-p11": "^2.5.0",
"size-limit": "^8.2.6",
"text-encoding": "^0.7.0",
- "ts-jest": "^28.0.5",
"ts-node": "^10.8.2",
"typescript": "^4.7.4",
+ "vitest": "^0.34.6",
"webcrypto-core": "^1.7.5"
}
}
diff --git a/e2e/node/tsconfig.json b/e2e/node/tsconfig.json
index 33aa32796..eb0694373 100644
--- a/e2e/node/tsconfig.json
+++ b/e2e/node/tsconfig.json
@@ -1,10 +1,10 @@
{
- "extends": "@tsconfig/node16/tsconfig.json",
+ "extends": "../../tsconfig.json",
"compilerOptions": {
"incremental": true,
- "target": "es2021",
- "module": "esnext",
- "lib": ["es2021"],
+ "target": "ESNext",
+ "module": "ESNext",
+ "lib": ["ES2023"],
"declaration": true,
"sourceMap": true,
"tsBuildInfoFile": "./build_info.json",
@@ -14,9 +14,5 @@
"moduleResolution": "node",
"forceConsistentCasingInFileNames": true
},
- "references": [
- { "path": "../../packages/agent" },
- { "path": "../../packages/authentication" },
- { "path": "../../packages/identity" }
- ]
+ "references": [{ "path": "../../packages/agent" }, { "path": "../../packages/identity" }]
}
diff --git a/e2e/node/utils/agent.ts b/e2e/node/utils/agent.ts
index 23e7e97dc..dd8aacd6c 100644
--- a/e2e/node/utils/agent.ts
+++ b/e2e/node/utils/agent.ts
@@ -1,19 +1,30 @@
-import { HttpAgent } from '@dfinity/agent';
+import { HttpAgent, HttpAgentOptions } from '@dfinity/agent';
import { Ed25519KeyIdentity } from '@dfinity/identity';
+import fetch from 'isomorphic-fetch';
export const identity = Ed25519KeyIdentity.generate();
export const principal = identity.getPrincipal();
-export const port = parseInt(process.env['REPLICA_PORT'] || '', 10);
+export const port = parseInt(process.env['REPLICA_PORT'] || '4943', 10);
if (Number.isNaN(port)) {
throw new Error('The environment variable REPLICA_PORT is not a number.');
}
-const agent = Promise.resolve(new HttpAgent({ host: 'http://127.0.0.1:' + port, identity })).then(
- async agent => {
+export const makeAgent = async (options?: HttpAgentOptions) => {
+ const agent = new HttpAgent({
+ host: `http://127.0.0.1:${process.env.REPLICA_PORT ?? 4943}`,
+ fetch: global.fetch ?? fetch,
+ verifyQuerySignatures: false,
+ ...options,
+ });
+ try {
await agent.fetchRootKey();
- return agent;
- },
-);
+ } catch (_) {
+ //
+ }
+ return agent;
+};
+
+const agent = makeAgent();
export default agent;
diff --git a/e2e/node/vitest.config.ts b/e2e/node/vitest.config.ts
new file mode 100644
index 000000000..285af81da
--- /dev/null
+++ b/e2e/node/vitest.config.ts
@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+
+export default defineConfig({
+ test: {
+ setupFiles: ['./test-setup.ts'],
+ testTimeout: 100_000,
+ },
+});
diff --git a/package-lock.json b/package-lock.json
index c1bb5763f..800f58be2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,9 @@
"name": "@dfinity/agent-monorepo",
"version": "0.19.3",
"license": "Apache-2.0",
+ "dependencies": {
+ "vitest": "^0.34.6"
+ },
"devDependencies": {
"@jest/types": "28.1.3",
"@size-limit/preset-small-lib": "^8.2.6",
@@ -87,7 +90,6 @@
"version": "0.19.3",
"dependencies": {
"@dfinity/agent": "^0.19.3",
- "@dfinity/authentication": "^0.14.1",
"@dfinity/identity": "^0.19.3",
"@dfinity/principal": "^0.19.3",
"idb-keyval": "^6.2.0"
@@ -120,7 +122,6 @@
"@tsconfig/node17": "^1.0.1",
"@types/base64-js": "^1.3.0",
"@types/isomorphic-fetch": "^0.0.36",
- "@types/jest": "^28.1.4",
"@types/text-encoding": "^0.0.36",
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
@@ -128,15 +129,13 @@
"eslint": "^8.19.0",
"eslint-plugin-jsdoc": "^39.3.3",
"isomorphic-fetch": "^3.0.0",
- "jest": "^28.1.2",
- "jest-environment-jsdom": "^28.1.3",
"locus": "^2.0.4",
"node-webcrypto-p11": "^2.5.0",
"size-limit": "^8.2.6",
"text-encoding": "^0.7.0",
- "ts-jest": "^28.0.5",
"ts-node": "^10.8.2",
"typescript": "^4.7.4",
+ "vitest": "^0.34.6",
"webcrypto-core": "^1.7.5"
}
},
@@ -153,11 +152,13 @@
}
},
"node_modules/@babel/code-frame": {
- "version": "7.18.6",
+ "version": "7.22.13",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
+ "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "@babel/highlight": "^7.18.6"
+ "@babel/highlight": "^7.22.13",
+ "chalk": "^2.4.2"
},
"engines": {
"node": ">=6.9.0"
@@ -201,12 +202,14 @@
}
},
"node_modules/@babel/generator": {
- "version": "7.19.0",
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",
+ "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "@babel/types": "^7.19.0",
+ "@babel/types": "^7.23.0",
"@jridgewell/gen-mapping": "^0.3.2",
+ "@jridgewell/trace-mapping": "^0.3.17",
"jsesc": "^2.5.1"
},
"engines": {
@@ -244,31 +247,34 @@
}
},
"node_modules/@babel/helper-environment-visitor": {
- "version": "7.18.9",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
+ "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
"dev": true,
- "license": "MIT",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-function-name": {
- "version": "7.19.0",
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
+ "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "@babel/template": "^7.18.10",
- "@babel/types": "^7.19.0"
+ "@babel/template": "^7.22.15",
+ "@babel/types": "^7.23.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-hoist-variables": {
- "version": "7.18.6",
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
+ "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "@babel/types": "^7.18.6"
+ "@babel/types": "^7.22.5"
},
"engines": {
"node": ">=6.9.0"
@@ -323,28 +329,31 @@
}
},
"node_modules/@babel/helper-split-export-declaration": {
- "version": "7.18.6",
+ "version": "7.22.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
+ "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "@babel/types": "^7.18.6"
+ "@babel/types": "^7.22.5"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-string-parser": {
- "version": "7.18.10",
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
+ "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
"dev": true,
- "license": "MIT",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-validator-identifier": {
- "version": "7.18.6",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
+ "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
"dev": true,
- "license": "MIT",
"engines": {
"node": ">=6.9.0"
}
@@ -371,12 +380,13 @@
}
},
"node_modules/@babel/highlight": {
- "version": "7.18.6",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
+ "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "@babel/helper-validator-identifier": "^7.18.6",
- "chalk": "^2.0.0",
+ "@babel/helper-validator-identifier": "^7.22.20",
+ "chalk": "^2.4.2",
"js-tokens": "^4.0.0"
},
"engines": {
@@ -384,9 +394,10 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.19.0",
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
+ "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
"dev": true,
- "license": "MIT",
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -544,31 +555,33 @@
}
},
"node_modules/@babel/template": {
- "version": "7.18.10",
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
+ "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "@babel/code-frame": "^7.18.6",
- "@babel/parser": "^7.18.10",
- "@babel/types": "^7.18.10"
+ "@babel/code-frame": "^7.22.13",
+ "@babel/parser": "^7.22.15",
+ "@babel/types": "^7.22.15"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
- "version": "7.19.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/code-frame": "^7.18.6",
- "@babel/generator": "^7.19.0",
- "@babel/helper-environment-visitor": "^7.18.9",
- "@babel/helper-function-name": "^7.19.0",
- "@babel/helper-hoist-variables": "^7.18.6",
- "@babel/helper-split-export-declaration": "^7.18.6",
- "@babel/parser": "^7.19.0",
- "@babel/types": "^7.19.0",
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",
+ "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.22.13",
+ "@babel/generator": "^7.23.0",
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-function-name": "^7.23.0",
+ "@babel/helper-hoist-variables": "^7.22.5",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "@babel/parser": "^7.23.0",
+ "@babel/types": "^7.23.0",
"debug": "^4.1.0",
"globals": "^11.1.0"
},
@@ -577,12 +590,13 @@
}
},
"node_modules/@babel/types": {
- "version": "7.19.0",
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
+ "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "@babel/helper-string-parser": "^7.18.10",
- "@babel/helper-validator-identifier": "^7.18.6",
+ "@babel/helper-string-parser": "^7.22.5",
+ "@babel/helper-validator-identifier": "^7.22.20",
"to-fast-properties": "^2.0.0"
},
"engines": {
@@ -1954,7 +1968,7 @@
},
"node_modules/@jridgewell/set-array": {
"version": "1.1.2",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"engines": {
"node": ">=6.0.0"
@@ -1962,7 +1976,7 @@
},
"node_modules/@jridgewell/source-map": {
"version": "0.3.2",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.0",
@@ -1971,7 +1985,7 @@
},
"node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": {
"version": "0.3.2",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"@jridgewell/set-array": "^1.0.1",
@@ -1983,16 +1997,18 @@
}
},
"node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.4.14",
- "license": "MIT"
+ "version": "1.4.15",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
},
"node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.15",
- "dev": true,
- "license": "MIT",
+ "version": "0.3.20",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
+ "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
+ "devOptional": true,
"dependencies": {
- "@jridgewell/resolve-uri": "^3.0.3",
- "@jridgewell/sourcemap-codec": "^1.4.10"
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@leichtgewicht/ip-codec": {
@@ -4228,7 +4244,7 @@
},
"node_modules/@tootallnate/once": {
"version": "2.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"engines": {
"node": ">= 10"
@@ -4363,6 +4379,19 @@
"@types/node": "*"
}
},
+ "node_modules/@types/chai": {
+ "version": "4.3.9",
+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.9.tgz",
+ "integrity": "sha512-69TtiDzu0bcmKQv3yg1Zx409/Kd7r0b5F1PfpYJfSHzLGtB53547V4u+9iqKYsTu/O2ai6KTb0TInNpvuQ3qmg=="
+ },
+ "node_modules/@types/chai-subset": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.4.tgz",
+ "integrity": "sha512-CCWNXrJYSUIojZ1149ksLl3AN9cmZ5djf+yUoVVV+NuYrtydItQVlL2ZDqyC6M6O9LWRnVf8yYDxbXHO2TfQZg==",
+ "dependencies": {
+ "@types/chai": "*"
+ }
+ },
"node_modules/@types/connect": {
"version": "3.4.35",
"dev": true,
@@ -4838,6 +4867,182 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
+ "node_modules/@vitest/expect": {
+ "version": "0.34.6",
+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.34.6.tgz",
+ "integrity": "sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==",
+ "dependencies": {
+ "@vitest/spy": "0.34.6",
+ "@vitest/utils": "0.34.6",
+ "chai": "^4.3.10"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
+ "node_modules/@vitest/runner": {
+ "version": "0.34.6",
+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.34.6.tgz",
+ "integrity": "sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==",
+ "dependencies": {
+ "@vitest/utils": "0.34.6",
+ "p-limit": "^4.0.0",
+ "pathe": "^1.1.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
+ "node_modules/@vitest/runner/node_modules/p-limit": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
+ "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
+ "dependencies": {
+ "yocto-queue": "^1.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@vitest/runner/node_modules/yocto-queue": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
+ "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==",
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@vitest/snapshot": {
+ "version": "0.34.6",
+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.34.6.tgz",
+ "integrity": "sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==",
+ "dependencies": {
+ "magic-string": "^0.30.1",
+ "pathe": "^1.1.1",
+ "pretty-format": "^29.5.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
+ "node_modules/@vitest/snapshot/node_modules/@jest/schemas": {
+ "version": "29.6.3",
+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
+ "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
+ "dependencies": {
+ "@sinclair/typebox": "^0.27.8"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@vitest/snapshot/node_modules/@sinclair/typebox": {
+ "version": "0.27.8",
+ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
+ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA=="
+ },
+ "node_modules/@vitest/snapshot/node_modules/ansi-styles": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/@vitest/snapshot/node_modules/pretty-format": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
+ "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==",
+ "dependencies": {
+ "@jest/schemas": "^29.6.3",
+ "ansi-styles": "^5.0.0",
+ "react-is": "^18.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@vitest/spy": {
+ "version": "0.34.6",
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.34.6.tgz",
+ "integrity": "sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==",
+ "dependencies": {
+ "tinyspy": "^2.1.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
+ "node_modules/@vitest/utils": {
+ "version": "0.34.6",
+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.34.6.tgz",
+ "integrity": "sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==",
+ "dependencies": {
+ "diff-sequences": "^29.4.3",
+ "loupe": "^2.3.6",
+ "pretty-format": "^29.5.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
+ "node_modules/@vitest/utils/node_modules/@jest/schemas": {
+ "version": "29.6.3",
+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
+ "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
+ "dependencies": {
+ "@sinclair/typebox": "^0.27.8"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@vitest/utils/node_modules/@sinclair/typebox": {
+ "version": "0.27.8",
+ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
+ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA=="
+ },
+ "node_modules/@vitest/utils/node_modules/ansi-styles": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/@vitest/utils/node_modules/diff-sequences": {
+ "version": "29.6.3",
+ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz",
+ "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==",
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@vitest/utils/node_modules/pretty-format": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
+ "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==",
+ "dependencies": {
+ "@jest/schemas": "^29.6.3",
+ "ansi-styles": "^5.0.0",
+ "react-is": "^18.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
"node_modules/@web-std/blob": {
"version": "3.0.4",
"dev": true,
@@ -5045,7 +5250,7 @@
},
"node_modules/abab": {
"version": "2.0.6",
- "dev": true,
+ "devOptional": true,
"license": "BSD-3-Clause"
},
"node_modules/abortcontroller-polyfill": {
@@ -5066,8 +5271,9 @@
}
},
"node_modules/acorn": {
- "version": "8.8.0",
- "license": "MIT",
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
+ "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
"bin": {
"acorn": "bin/acorn"
},
@@ -5077,7 +5283,7 @@
},
"node_modules/acorn-globals": {
"version": "6.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"acorn": "^7.1.1",
@@ -5086,7 +5292,7 @@
},
"node_modules/acorn-globals/node_modules/acorn": {
"version": "7.4.1",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
@@ -5113,7 +5319,7 @@
},
"node_modules/acorn-walk": {
"version": "7.2.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"engines": {
"node": ">=0.4.0"
@@ -5121,7 +5327,7 @@
},
"node_modules/agent-base": {
"version": "6.0.2",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"debug": "4"
@@ -5396,6 +5602,14 @@
"node": ">=0.8"
}
},
+ "node_modules/assertion-error": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
+ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/ast-types": {
"version": "0.13.4",
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
@@ -5445,7 +5659,7 @@
},
"node_modules/asynckit": {
"version": "0.4.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/at-least-node": {
@@ -5933,7 +6147,7 @@
},
"node_modules/browser-process-hrtime": {
"version": "1.0.0",
- "dev": true,
+ "devOptional": true,
"license": "BSD-2-Clause"
},
"node_modules/browserslist": {
@@ -6032,7 +6246,7 @@
},
"node_modules/buffer-from": {
"version": "1.1.2",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/builtin-modules": {
@@ -6059,6 +6273,14 @@
"node": ">= 0.8"
}
},
+ "node_modules/cac": {
+ "version": "6.7.14",
+ "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
+ "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/cachedir": {
"version": "2.3.0",
"dev": true,
@@ -6137,6 +6359,23 @@
"integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==",
"dev": true
},
+ "node_modules/chai": {
+ "version": "4.3.10",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz",
+ "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==",
+ "dependencies": {
+ "assertion-error": "^1.1.0",
+ "check-error": "^1.0.3",
+ "deep-eql": "^4.1.3",
+ "get-func-name": "^2.0.2",
+ "loupe": "^2.3.6",
+ "pathval": "^1.1.1",
+ "type-detect": "^4.0.8"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/chalk": {
"version": "2.4.2",
"dev": true,
@@ -6171,6 +6410,17 @@
"dev": true,
"license": "MIT/X11"
},
+ "node_modules/check-error": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz",
+ "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==",
+ "dependencies": {
+ "get-func-name": "^2.0.2"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/check-more-types": {
"version": "2.24.0",
"dev": true,
@@ -6471,7 +6721,7 @@
},
"node_modules/combined-stream": {
"version": "1.0.8",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"delayed-stream": "~1.0.0"
@@ -6886,12 +7136,12 @@
},
"node_modules/cssom": {
"version": "0.5.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/cssstyle": {
"version": "2.3.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"cssom": "~0.3.6"
@@ -6902,7 +7152,7 @@
},
"node_modules/cssstyle/node_modules/cssom": {
"version": "0.3.8",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/culvert": {
@@ -7235,7 +7485,7 @@
},
"node_modules/data-urls": {
"version": "3.0.2",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"abab": "^2.0.6",
@@ -7248,7 +7498,7 @@
},
"node_modules/data-urls/node_modules/whatwg-url": {
"version": "11.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"tr46": "^3.0.0",
@@ -7296,7 +7546,6 @@
},
"node_modules/debug": {
"version": "4.3.4",
- "dev": true,
"license": "MIT",
"dependencies": {
"ms": "2.1.2"
@@ -7312,7 +7561,7 @@
},
"node_modules/decimal.js": {
"version": "10.4.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/dedent": {
@@ -7320,6 +7569,17 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/deep-eql": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz",
+ "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==",
+ "dependencies": {
+ "type-detect": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/deep-is": {
"version": "0.1.4",
"dev": true,
@@ -7383,7 +7643,7 @@
},
"node_modules/delayed-stream": {
"version": "1.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"engines": {
"node": ">=0.4.0"
@@ -7529,7 +7789,7 @@
},
"node_modules/domexception": {
"version": "4.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"webidl-conversions": "^7.0.0"
@@ -8270,7 +8530,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz",
"integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==",
- "dev": true,
+ "devOptional": true,
"dependencies": {
"esprima": "^4.0.1",
"estraverse": "^5.2.0",
@@ -8289,7 +8549,7 @@
},
"node_modules/escodegen/node_modules/estraverse": {
"version": "5.3.0",
- "dev": true,
+ "devOptional": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=4.0"
@@ -8605,7 +8865,7 @@
},
"node_modules/esprima": {
"version": "4.0.1",
- "dev": true,
+ "devOptional": true,
"license": "BSD-2-Clause",
"bin": {
"esparse": "bin/esparse.js",
@@ -8663,7 +8923,7 @@
},
"node_modules/esutils": {
"version": "2.0.3",
- "dev": true,
+ "devOptional": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.10.0"
@@ -9168,7 +9428,7 @@
},
"node_modules/form-data": {
"version": "4.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
@@ -9235,7 +9495,6 @@
},
"node_modules/fsevents": {
"version": "2.3.2",
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -9296,6 +9555,14 @@
"node": "6.* || 8.* || >= 10.*"
}
},
+ "node_modules/get-func-name": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
+ "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/get-intrinsic": {
"version": "1.1.2",
"dev": true,
@@ -9666,7 +9933,7 @@
},
"node_modules/html-encoding-sniffer": {
"version": "3.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"whatwg-encoding": "^2.0.0"
@@ -9839,7 +10106,7 @@
},
"node_modules/http-proxy-agent": {
"version": "5.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"@tootallnate/once": "2",
@@ -9889,7 +10156,7 @@
},
"node_modules/https-proxy-agent": {
"version": "5.0.1",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"agent-base": "6",
@@ -9923,7 +10190,7 @@
},
"node_modules/iconv-lite": {
"version": "0.6.3",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
@@ -10348,7 +10615,7 @@
},
"node_modules/is-potential-custom-element-name": {
"version": "1.0.1",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/is-promise": {
@@ -12161,8 +12428,9 @@
},
"node_modules/js-tokens": {
"version": "4.0.0",
- "dev": true,
- "license": "MIT"
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
},
"node_modules/js-yaml": {
"version": "4.1.0",
@@ -12191,7 +12459,7 @@
},
"node_modules/jsdom": {
"version": "19.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"abab": "^2.0.5",
@@ -12292,7 +12560,6 @@
},
"node_modules/jsonc-parser": {
"version": "3.2.0",
- "dev": true,
"license": "MIT"
},
"node_modules/jsonfile": {
@@ -12447,6 +12714,17 @@
"node": ">=6.11.5"
}
},
+ "node_modules/local-pkg": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz",
+ "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
"node_modules/locate-path": {
"version": "6.0.0",
"dev": true,
@@ -12678,6 +12956,14 @@
"node": ">=8"
}
},
+ "node_modules/loupe": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz",
+ "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==",
+ "dependencies": {
+ "get-func-name": "^2.0.1"
+ }
+ },
"node_modules/lower-case": {
"version": "2.0.2",
"dev": true,
@@ -12710,6 +12996,17 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/magic-string": {
+ "version": "0.30.5",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
+ "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.4.15"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/make-dir": {
"version": "3.1.0",
"dev": true,
@@ -12858,7 +13155,7 @@
},
"node_modules/mime-db": {
"version": "1.52.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"engines": {
"node": ">= 0.6"
@@ -12866,7 +13163,7 @@
},
"node_modules/mime-types": {
"version": "2.1.35",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"mime-db": "1.52.0"
@@ -12922,6 +13219,17 @@
"mkdirp": "bin/cmd.js"
}
},
+ "node_modules/mlly": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz",
+ "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==",
+ "dependencies": {
+ "acorn": "^8.10.0",
+ "pathe": "^1.1.1",
+ "pkg-types": "^1.0.3",
+ "ufo": "^1.3.0"
+ }
+ },
"node_modules/module-details-from-path": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz",
@@ -12938,7 +13246,6 @@
},
"node_modules/ms": {
"version": "2.1.2",
- "dev": true,
"license": "MIT"
},
"node_modules/msgpackr": {
@@ -13010,7 +13317,6 @@
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
- "dev": true,
"funding": [
{
"type": "github",
@@ -13271,7 +13577,7 @@
},
"node_modules/nwsapi": {
"version": "2.2.2",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/object-inspect": {
@@ -13702,7 +14008,7 @@
},
"node_modules/parse5": {
"version": "6.0.1",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/parseurl": {
@@ -13786,6 +14092,19 @@
"inherits": "2.0.3"
}
},
+ "node_modules/pathe": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz",
+ "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q=="
+ },
+ "node_modules/pathval": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
+ "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/pbkdf2": {
"version": "3.1.2",
"license": "MIT",
@@ -13814,7 +14133,6 @@
},
"node_modules/picocolors": {
"version": "1.0.0",
- "dev": true,
"license": "ISC"
},
"node_modules/picomatch": {
@@ -13948,6 +14266,16 @@
"node": ">=8"
}
},
+ "node_modules/pkg-types": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz",
+ "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==",
+ "dependencies": {
+ "jsonc-parser": "^3.2.0",
+ "mlly": "^1.2.0",
+ "pathe": "^1.1.0"
+ }
+ },
"node_modules/pm2": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/pm2/-/pm2-5.3.0.tgz",
@@ -14228,8 +14556,9 @@
}
},
"node_modules/postcss": {
- "version": "8.4.16",
- "dev": true,
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"funding": [
{
"type": "opencollective",
@@ -14238,13 +14567,14 @@
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
}
],
- "license": "MIT",
- "optional": true,
- "peer": true,
"dependencies": {
- "nanoid": "^3.3.4",
+ "nanoid": "^3.3.6",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
@@ -14690,7 +15020,7 @@
},
"node_modules/psl": {
"version": "1.9.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/pump": {
@@ -14704,7 +15034,7 @@
},
"node_modules/punycode": {
"version": "2.1.1",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -14748,7 +15078,7 @@
},
"node_modules/querystringify": {
"version": "2.2.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/queue-microtask": {
@@ -14817,7 +15147,6 @@
},
"node_modules/react-is": {
"version": "18.2.0",
- "dev": true,
"license": "MIT"
},
"node_modules/react-refresh": {
@@ -15031,7 +15360,7 @@
},
"node_modules/requires-port": {
"version": "1.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/resolve": {
@@ -15150,6 +15479,21 @@
"inherits": "^2.0.1"
}
},
+ "node_modules/rollup": {
+ "version": "3.29.4",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
+ "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=14.18.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
"node_modules/run-parallel": {
"version": "1.2.0",
"dev": true,
@@ -15211,7 +15555,7 @@
},
"node_modules/safer-buffer": {
"version": "2.1.2",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/sax": {
@@ -15221,7 +15565,7 @@
},
"node_modules/saxes": {
"version": "5.0.1",
- "dev": true,
+ "devOptional": true,
"license": "ISC",
"dependencies": {
"xmlchars": "^2.2.0"
@@ -15498,6 +15842,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/siginfo": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
+ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g=="
+ },
"node_modules/signal-exit": {
"version": "3.0.7",
"dev": true,
@@ -15672,7 +16021,7 @@
},
"node_modules/source-map": {
"version": "0.6.1",
- "dev": true,
+ "devOptional": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
@@ -15680,10 +16029,7 @@
},
"node_modules/source-map-js": {
"version": "1.0.2",
- "dev": true,
"license": "BSD-3-Clause",
- "optional": true,
- "peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -15816,6 +16162,11 @@
"node": ">=8"
}
},
+ "node_modules/stackback": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
+ "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="
+ },
"node_modules/statuses": {
"version": "2.0.1",
"dev": true,
@@ -15824,6 +16175,11 @@
"node": ">= 0.8"
}
},
+ "node_modules/std-env": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.4.3.tgz",
+ "integrity": "sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q=="
+ },
"node_modules/stream": {
"version": "0.0.2",
"dev": true,
@@ -15955,6 +16311,17 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/strip-literal": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz",
+ "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==",
+ "dependencies": {
+ "acorn": "^8.10.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
"node_modules/supports-color": {
"version": "5.5.0",
"dev": true,
@@ -16121,7 +16488,7 @@
},
"node_modules/symbol-tree": {
"version": "3.2.4",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/systeminformation": {
@@ -16187,7 +16554,7 @@
},
"node_modules/terser": {
"version": "5.15.0",
- "dev": true,
+ "devOptional": true,
"license": "BSD-2-Clause",
"dependencies": {
"@jridgewell/source-map": "^0.3.2",
@@ -16272,7 +16639,7 @@
},
"node_modules/terser/node_modules/source-map-support": {
"version": "0.5.21",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"buffer-from": "^1.0.0",
@@ -16332,6 +16699,27 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/tinybench": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.1.tgz",
+ "integrity": "sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg=="
+ },
+ "node_modules/tinypool": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.7.0.tgz",
+ "integrity": "sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/tinyspy": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.0.tgz",
+ "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
"node_modules/tmp": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
@@ -16380,7 +16768,7 @@
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
"integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",
- "dev": true,
+ "devOptional": true,
"dependencies": {
"psl": "^1.1.33",
"punycode": "^2.1.1",
@@ -16393,7 +16781,7 @@
},
"node_modules/tr46": {
"version": "3.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"punycode": "^2.1.1"
@@ -16681,7 +17069,6 @@
},
"node_modules/type-detect": {
"version": "4.0.8",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=4"
@@ -16813,6 +17200,11 @@
"node": ">=10"
}
},
+ "node_modules/ufo": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.1.tgz",
+ "integrity": "sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw=="
+ },
"node_modules/unbox-primitive": {
"version": "1.0.2",
"dev": true,
@@ -16829,7 +17221,7 @@
},
"node_modules/universalify": {
"version": "0.2.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"engines": {
"node": ">= 4.0.0"
@@ -16895,7 +17287,7 @@
},
"node_modules/url-parse": {
"version": "1.5.10",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"querystringify": "^2.1.1",
@@ -16997,6 +17389,532 @@
"extsprintf": "^1.2.0"
}
},
+ "node_modules/vite": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz",
+ "integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==",
+ "dependencies": {
+ "esbuild": "^0.18.10",
+ "postcss": "^8.4.27",
+ "rollup": "^3.27.1"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ },
+ "peerDependencies": {
+ "@types/node": ">= 14",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vite-node": {
+ "version": "0.34.6",
+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.34.6.tgz",
+ "integrity": "sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==",
+ "dependencies": {
+ "cac": "^6.7.14",
+ "debug": "^4.3.4",
+ "mlly": "^1.4.0",
+ "pathe": "^1.1.1",
+ "picocolors": "^1.0.0",
+ "vite": "^3.0.0 || ^4.0.0 || ^5.0.0-0"
+ },
+ "bin": {
+ "vite-node": "vite-node.mjs"
+ },
+ "engines": {
+ "node": ">=v14.18.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/android-arm": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
+ "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==",
+ "cpu": [
+ "arm"
+ ],
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/android-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz",
+ "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/android-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz",
+ "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/darwin-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz",
+ "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/darwin-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz",
+ "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz",
+ "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/freebsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz",
+ "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-arm": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz",
+ "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==",
+ "cpu": [
+ "arm"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz",
+ "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-ia32": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz",
+ "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==",
+ "cpu": [
+ "ia32"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-loong64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz",
+ "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==",
+ "cpu": [
+ "loong64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-mips64el": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz",
+ "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==",
+ "cpu": [
+ "mips64el"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-ppc64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz",
+ "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-riscv64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz",
+ "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==",
+ "cpu": [
+ "riscv64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-s390x": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz",
+ "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==",
+ "cpu": [
+ "s390x"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz",
+ "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/netbsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz",
+ "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/openbsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz",
+ "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/sunos-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz",
+ "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/win32-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz",
+ "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/win32-ia32": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz",
+ "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==",
+ "cpu": [
+ "ia32"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/win32-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz",
+ "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/esbuild": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
+ "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==",
+ "hasInstallScript": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/android-arm": "0.18.20",
+ "@esbuild/android-arm64": "0.18.20",
+ "@esbuild/android-x64": "0.18.20",
+ "@esbuild/darwin-arm64": "0.18.20",
+ "@esbuild/darwin-x64": "0.18.20",
+ "@esbuild/freebsd-arm64": "0.18.20",
+ "@esbuild/freebsd-x64": "0.18.20",
+ "@esbuild/linux-arm": "0.18.20",
+ "@esbuild/linux-arm64": "0.18.20",
+ "@esbuild/linux-ia32": "0.18.20",
+ "@esbuild/linux-loong64": "0.18.20",
+ "@esbuild/linux-mips64el": "0.18.20",
+ "@esbuild/linux-ppc64": "0.18.20",
+ "@esbuild/linux-riscv64": "0.18.20",
+ "@esbuild/linux-s390x": "0.18.20",
+ "@esbuild/linux-x64": "0.18.20",
+ "@esbuild/netbsd-x64": "0.18.20",
+ "@esbuild/openbsd-x64": "0.18.20",
+ "@esbuild/sunos-x64": "0.18.20",
+ "@esbuild/win32-arm64": "0.18.20",
+ "@esbuild/win32-ia32": "0.18.20",
+ "@esbuild/win32-x64": "0.18.20"
+ }
+ },
+ "node_modules/vitest": {
+ "version": "0.34.6",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.34.6.tgz",
+ "integrity": "sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==",
+ "dependencies": {
+ "@types/chai": "^4.3.5",
+ "@types/chai-subset": "^1.3.3",
+ "@types/node": "*",
+ "@vitest/expect": "0.34.6",
+ "@vitest/runner": "0.34.6",
+ "@vitest/snapshot": "0.34.6",
+ "@vitest/spy": "0.34.6",
+ "@vitest/utils": "0.34.6",
+ "acorn": "^8.9.0",
+ "acorn-walk": "^8.2.0",
+ "cac": "^6.7.14",
+ "chai": "^4.3.10",
+ "debug": "^4.3.4",
+ "local-pkg": "^0.4.3",
+ "magic-string": "^0.30.1",
+ "pathe": "^1.1.1",
+ "picocolors": "^1.0.0",
+ "std-env": "^3.3.3",
+ "strip-literal": "^1.0.1",
+ "tinybench": "^2.5.0",
+ "tinypool": "^0.7.0",
+ "vite": "^3.1.0 || ^4.0.0 || ^5.0.0-0",
+ "vite-node": "0.34.6",
+ "why-is-node-running": "^2.2.2"
+ },
+ "bin": {
+ "vitest": "vitest.mjs"
+ },
+ "engines": {
+ "node": ">=v14.18.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ },
+ "peerDependencies": {
+ "@edge-runtime/vm": "*",
+ "@vitest/browser": "*",
+ "@vitest/ui": "*",
+ "happy-dom": "*",
+ "jsdom": "*",
+ "playwright": "*",
+ "safaridriver": "*",
+ "webdriverio": "*"
+ },
+ "peerDependenciesMeta": {
+ "@edge-runtime/vm": {
+ "optional": true
+ },
+ "@vitest/browser": {
+ "optional": true
+ },
+ "@vitest/ui": {
+ "optional": true
+ },
+ "happy-dom": {
+ "optional": true
+ },
+ "jsdom": {
+ "optional": true
+ },
+ "playwright": {
+ "optional": true
+ },
+ "safaridriver": {
+ "optional": true
+ },
+ "webdriverio": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vitest/node_modules/acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
"node_modules/vizion": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/vizion/-/vizion-2.2.1.tgz",
@@ -17033,7 +17951,7 @@
},
"node_modules/w3c-hr-time": {
"version": "1.0.2",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"browser-process-hrtime": "^1.0.0"
@@ -17041,7 +17959,7 @@
},
"node_modules/w3c-xmlserializer": {
"version": "3.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"xml-name-validator": "^4.0.0"
@@ -17115,7 +18033,7 @@
},
"node_modules/webidl-conversions": {
"version": "7.0.0",
- "dev": true,
+ "devOptional": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
@@ -17438,7 +18356,7 @@
},
"node_modules/whatwg-encoding": {
"version": "2.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"iconv-lite": "0.6.3"
@@ -17453,7 +18371,7 @@
},
"node_modules/whatwg-mimetype": {
"version": "3.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"engines": {
"node": ">=12"
@@ -17461,7 +18379,7 @@
},
"node_modules/whatwg-url": {
"version": "10.0.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"dependencies": {
"tr46": "^3.0.0",
@@ -17519,6 +18437,21 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/why-is-node-running": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz",
+ "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==",
+ "dependencies": {
+ "siginfo": "^2.0.0",
+ "stackback": "0.0.2"
+ },
+ "bin": {
+ "why-is-node-running": "cli.js"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/wildcard": {
"version": "2.0.0",
"dev": true,
@@ -17613,7 +18546,7 @@
},
"node_modules/ws": {
"version": "8.8.1",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"engines": {
"node": ">=10.0.0"
@@ -17633,7 +18566,7 @@
},
"node_modules/xml-name-validator": {
"version": "4.0.0",
- "dev": true,
+ "devOptional": true,
"license": "Apache-2.0",
"engines": {
"node": ">=12"
@@ -17641,7 +18574,7 @@
},
"node_modules/xmlchars": {
"version": "2.2.0",
- "dev": true,
+ "devOptional": true,
"license": "MIT"
},
"node_modules/xxhash-wasm": {
diff --git a/packages/agent/README.md b/packages/agent/README.md
index db33fd334..ca7759b18 100644
--- a/packages/agent/README.md
+++ b/packages/agent/README.md
@@ -86,7 +86,7 @@ For example,
import fetch from 'isomorphic-fetch';
import { HttpAgent } from '@dfinity/agent';
-const host = process.env.DFX_NETWORK === 'local' ? 'http://localhost:4943' : 'https://icp-api.io';
+const host = process.env.DFX_NETWORK === 'local' ? 'http://127.0.0.1:4943' : 'https://icp-api.io';
const agent = new HttpAgent({ fetch, host });
```
@@ -99,7 +99,7 @@ For example,
import fetch from 'isomorphic-fetch';
import { HttpAgent } from '@dfinity/agent';
-const host = process.env.DFX_NETWORK === 'local' ? 'http://localhost:4943' : 'https://ic0.app';
+const host = process.env.DFX_NETWORK === 'local' ? 'http://127.0.0.1:4943' : 'https://ic0.app';
/**
* @type {RequestInit}
diff --git a/packages/agent/src/actor.test.ts b/packages/agent/src/actor.test.ts
index b1f56fffa..cdb845b3f 100644
--- a/packages/agent/src/actor.test.ts
+++ b/packages/agent/src/actor.test.ts
@@ -149,7 +149,7 @@ describe('makeActor', () => {
expect(calls.length).toBe(5);
expect(calls[0]).toEqual([
- `http://localhost/api/v2/canister/${canisterId.toText()}/call`,
+ `http://127.0.0.1/api/v2/canister/${canisterId.toText()}/call`,
{
method: 'POST',
headers: {
@@ -160,7 +160,7 @@ describe('makeActor', () => {
]);
expect(calls[1]).toEqual([
- `http://localhost/api/v2/canister/${canisterId.toText()}/read_state`,
+ `http://127.0.0.1/api/v2/canister/${canisterId.toText()}/read_state`,
{
method: 'POST',
headers: {
@@ -176,7 +176,7 @@ describe('makeActor', () => {
},
]);
- expect(calls[2][0]).toBe('http://localhost/api/v1/read');
+ expect(calls[2][0]).toBe('http://127.0.0.1/api/v1/read');
expect(calls[2][1]).toEqual({
method: 'POST',
headers: {
@@ -191,7 +191,7 @@ describe('makeActor', () => {
}),
});
- expect(calls[3][0]).toBe('http://localhost/api/v1/read');
+ expect(calls[3][0]).toBe('http://127.0.0.1/api/v1/read');
expect(calls[3][1]).toEqual({
method: 'POST',
headers: {
@@ -206,7 +206,7 @@ describe('makeActor', () => {
}),
});
- expect(calls[4][0]).toBe('http://localhost/api/v1/read');
+ expect(calls[4][0]).toBe('http://127.0.0.1/api/v1/read');
expect(calls[4][1]).toEqual({
method: 'POST',
headers: {
@@ -221,7 +221,7 @@ describe('makeActor', () => {
}),
});
- expect(calls[5][0]).toBe('http://localhost/api/v1/call');
+ expect(calls[5][0]).toBe('http://127.0.0.1/api/v1/call');
expect(calls[5][1]).toEqual({
method: 'POST',
headers: {
@@ -273,7 +273,7 @@ describe('makeActor', () => {
// todo: add method to test update call after Certificate changes have been adjusted
});
};
- const httpAgent = new HttpAgent({ fetch: mockFetch, host: 'http://localhost' });
+ const httpAgent = new HttpAgent({ fetch: mockFetch, host: 'http://127.0.0.1' });
const canisterId = Principal.fromText('2chl6-4hpzw-vqaaa-aaaaa-c');
const actor = Actor.createActor(actorInterface, { canisterId, agent: httpAgent });
const actorWithHttpDetails = Actor.createActorWithHttpDetails(actorInterface, {
@@ -312,7 +312,7 @@ describe('makeActor', () => {
greet: IDL.Func([IDL.Text], [IDL.Text]),
});
};
- const httpAgent = new HttpAgent({ fetch: mockFetch, host: 'http://localhost' });
+ const httpAgent = new HttpAgent({ fetch: mockFetch, host: 'http://127.0.0.1' });
const canisterId = Principal.fromText('2chl6-4hpzw-vqaaa-aaaaa-c');
const actor = Actor.createActor(actorInterface, { canisterId, agent: httpAgent });
@@ -327,7 +327,7 @@ describe('makeActor', () => {
}
});
it('should throw a helpful error if the canisterId is not set', async () => {
- const httpAgent = new HttpAgent({ host: 'http://localhost' });
+ const httpAgent = new HttpAgent({ host: 'http://127.0.0.1' });
const actorInterface = () => {
return IDL.Service({
greet: IDL.Func([IDL.Text], [IDL.Text]),
diff --git a/packages/agent/src/agent/http/http.test.ts b/packages/agent/src/agent/http/http.test.ts
index d0c12ec86..063d9b9b5 100644
--- a/packages/agent/src/agent/http/http.test.ts
+++ b/packages/agent/src/agent/http/http.test.ts
@@ -22,7 +22,7 @@ const { window } = new JSDOM(`
Hello world
`);
window.fetch = global.fetch;
(global as any).window = window;
-const HTTP_AGENT_HOST = 'http://localhost:4943';
+const HTTP_AGENT_HOST = 'http://127.0.0.1:4943';
const DEFAULT_INGRESS_EXPIRY_DELTA_IN_MSECS = 5 * 60 * 1000;
const REPLICA_PERMITTED_DRIFT_MILLISECONDS = 60 * 1000;
@@ -72,7 +72,7 @@ test('call', async () => {
const nonce = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7]) as Nonce;
const principal = Principal.anonymous();
- const httpAgent = new HttpAgent({ fetch: mockFetch, host: 'http://localhost' });
+ const httpAgent = new HttpAgent({ fetch: mockFetch, host: 'http://127.0.0.1' });
const methodName = 'greet';
const arg = new Uint8Array([]);
@@ -108,7 +108,7 @@ test('call', async () => {
expect(requestId).toEqual(expectedRequestId);
const call1 = calls[0][0];
const call2 = calls[0][1];
- expect(call1).toBe(`http://localhost/api/v2/canister/${canisterId.toText()}/call`);
+ expect(call1).toBe(`http://127.0.0.1/api/v2/canister/${canisterId.toText()}/call`);
expect(call2.method).toEqual('POST');
expect(call2.body).toEqual(cbor.encode(expectedRequest));
expect(call2.headers['Content-Type']).toEqual('application/cbor');
@@ -138,7 +138,7 @@ test('queries with the same content should have the same signature', async () =>
const httpAgent = new HttpAgent({
fetch: mockFetch,
- host: 'http://localhost',
+ host: 'http://127.0.0.1',
disableNonce: true,
});
httpAgent.addTransform(makeNonceTransform(() => nonce));
@@ -197,7 +197,7 @@ test('readState should not call transformers if request is passed', async () =>
const httpAgent = new HttpAgent({
fetch: mockFetch,
- host: 'http://localhost',
+ host: 'http://127.0.0.1',
disableNonce: true,
});
httpAgent.addTransform(makeNonceTransform(() => nonce));
@@ -287,7 +287,7 @@ test('use anonymous principal if unspecified', async () => {
const httpAgent = new HttpAgent({
fetch: mockFetch,
- host: 'http://localhost',
+ host: 'http://127.0.0.1',
disableNonce: true,
});
httpAgent.addTransform(makeNonceTransform(() => nonce));
@@ -325,7 +325,7 @@ test('use anonymous principal if unspecified', async () => {
expect(calls.length).toBe(1);
expect(requestId).toEqual(expectedRequestId);
- expect(calls[0][0]).toBe(`http://localhost/api/v2/canister/${canisterId.toText()}/call`);
+ expect(calls[0][0]).toBe(`http://127.0.0.1/api/v2/canister/${canisterId.toText()}/call`);
const call2 = calls[0][1];
expect(call2.method).toEqual('POST');
expect(call2.body).toEqual(cbor.encode(expectedRequest));
@@ -375,14 +375,14 @@ describe('invalidate identity', () => {
const mockFetch: jest.Mock = jest.fn();
it('should allow its identity to be invalidated', () => {
const identity = new AnonymousIdentity();
- const agent = new HttpAgent({ identity, fetch: mockFetch, host: 'http://localhost' });
+ const agent = new HttpAgent({ identity, fetch: mockFetch, host: 'http://127.0.0.1' });
const invalidate = () => agent.invalidateIdentity();
expect(invalidate).not.toThrowError();
});
it('should throw an error instead of making a call if its identity is invalidated', async () => {
const canisterId: Principal = Principal.fromText('2chl6-4hpzw-vqaaa-aaaaa-c');
const identity = new AnonymousIdentity();
- const agent = new HttpAgent({ identity, fetch: mockFetch, host: 'http://localhost' });
+ const agent = new HttpAgent({ identity, fetch: mockFetch, host: 'http://127.0.0.1' });
agent.invalidateIdentity();
const expectedError =
@@ -420,7 +420,7 @@ describe('replace identity', () => {
const mockFetch: jest.Mock = jest.fn();
it('should allow an actor to replace its identity', () => {
const identity = new AnonymousIdentity();
- const agent = new HttpAgent({ identity, fetch: mockFetch, host: 'http://localhost' });
+ const agent = new HttpAgent({ identity, fetch: mockFetch, host: 'http://127.0.0.1' });
const identity2 = new AnonymousIdentity();
const replace = () => agent.replaceIdentity(identity2);
@@ -439,7 +439,7 @@ describe('replace identity', () => {
const canisterId: Principal = Principal.fromText('2chl6-4hpzw-vqaaa-aaaaa-c');
const identity = new AnonymousIdentity();
- const agent = new HttpAgent({ identity, fetch: mockFetch, host: 'http://localhost' });
+ const agent = new HttpAgent({ identity, fetch: mockFetch, host: 'http://127.0.0.1' });
// First invalidate identity
agent.invalidateIdentity();
await agent
@@ -733,7 +733,7 @@ test('should fetch with given call options and fetch options', async () => {
const canisterId: Principal = Principal.fromText('2chl6-4hpzw-vqaaa-aaaaa-c');
const httpAgent = new HttpAgent({
fetch: mockFetch,
- host: 'http://localhost',
+ host: 'http://127.0.0.1',
callOptions: {
reactNative: { textStreaming: true },
},
@@ -771,7 +771,7 @@ describe('default host', () => {
expect((agent as any)._host.hostname).toBe('icp-api.io');
});
it('should use the existing host if the agent is used on a known hostname', () => {
- const knownHosts = ['ic0.app', 'icp0.io', 'localhost', '127.0.0.1'];
+ const knownHosts = ['ic0.app', 'icp0.io', '127.0.0.1', '127.0.0.1'];
for (const host of knownHosts) {
delete window.location;
window.location = {
@@ -783,7 +783,7 @@ describe('default host', () => {
}
});
it('should correctly handle subdomains on known hosts', () => {
- const knownHosts = ['ic0.app', 'icp0.io', 'localhost', '127.0.0.1'];
+ const knownHosts = ['ic0.app', 'icp0.io', '127.0.0.1', '127.0.0.1'];
for (const host of knownHosts) {
delete window.location;
window.location = {
@@ -795,8 +795,8 @@ describe('default host', () => {
expect((agent as any)._host.hostname).toBe(host);
}
});
- it('should handle port numbers for localhost', () => {
- const knownHosts = ['localhost', '127.0.0.1'];
+ it('should handle port numbers for 127.0.0.1', () => {
+ const knownHosts = ['127.0.0.1', '127.0.0.1'];
for (const host of knownHosts) {
delete window.location;
// hostname is different from host when port is specified
diff --git a/packages/agent/src/agent/http/index.ts b/packages/agent/src/agent/http/index.ts
index 0e4df3a04..b0d0cdfca 100644
--- a/packages/agent/src/agent/http/index.ts
+++ b/packages/agent/src/agent/http/index.ts
@@ -215,7 +215,7 @@ export class HttpAgent implements Agent {
);
}
// Mainnet and local will have the api route available
- const knownHosts = ['ic0.app', 'icp0.io', 'localhost', '127.0.0.1'];
+ const knownHosts = ['ic0.app', 'icp0.io', '127.0.0.1', '127.0.0.1'];
const hostname = location?.hostname;
let knownHost;
if (hostname && typeof hostname === 'string') {
@@ -260,7 +260,7 @@ export class HttpAgent implements Agent {
public isLocal(): boolean {
const hostname = this._host.hostname;
- return hostname === '127.0.0.1' || hostname.endsWith('localhost');
+ return hostname === '127.0.0.1' || hostname.endsWith('127.0.0.1');
}
public addTransform(fn: HttpAgentRequestTransformFn, priority = fn.priority || 0): void {
diff --git a/packages/agent/src/fetch_candid.test.ts b/packages/agent/src/fetch_candid.test.ts
index 5f6ae1335..b2df5c1e9 100644
--- a/packages/agent/src/fetch_candid.test.ts
+++ b/packages/agent/src/fetch_candid.test.ts
@@ -19,7 +19,7 @@ test('simulate fetching a Candid interface', async () => {
);
});
- const agent = new HttpAgent({ fetch: mockFetch, host: 'http://localhost' });
+ const agent = new HttpAgent({ fetch: mockFetch, host: 'http://127.0.0.1' });
const candid = await fetchCandid('ryjl3-tyaaa-aaaaa-aaaba-cai', agent);
diff --git a/packages/auth-client/src/index.test.ts b/packages/auth-client/src/index.test.ts
index 4e249d1ba..02964c4fc 100644
--- a/packages/auth-client/src/index.test.ts
+++ b/packages/auth-client/src/index.test.ts
@@ -84,10 +84,10 @@ describe('Auth Client', () => {
(window as any).location = {
reload: jest.fn(),
fetch,
- hostname: 'localhost',
+ hostname: '127.0.0.1',
protocol: 'http:',
port: '4943',
- toString: jest.fn(() => 'http://localhost:4943'),
+ toString: jest.fn(() => 'http://127.0.0.1:4943'),
};
const identity = Ed25519KeyIdentity.generate();
@@ -444,13 +444,13 @@ describe('Auth Client login', () => {
setup();
const client = await AuthClient.create();
// Try without #authorize hash.
- await client.login({ identityProvider: 'http://localhost' });
- expect(global.open).toBeCalledWith('http://localhost/#authorize', 'idpWindow', undefined);
+ await client.login({ identityProvider: 'http://127.0.0.1' });
+ expect(global.open).toBeCalledWith('http://127.0.0.1/#authorize', 'idpWindow', undefined);
// Try with #authorize hash.
global.open = jest.fn();
- await client.login({ identityProvider: 'http://localhost#authorize' });
- expect(global.open).toBeCalledWith('http://localhost/#authorize', 'idpWindow', undefined);
+ await client.login({ identityProvider: 'http://127.0.0.1#authorize' });
+ expect(global.open).toBeCalledWith('http://127.0.0.1/#authorize', 'idpWindow', undefined);
// Default url
global.open = jest.fn();
@@ -477,14 +477,14 @@ describe('Auth Client login', () => {
const client = await AuthClient.create();
// Try without #authorize hash.
await client.login({
- identityProvider: 'http://localhost',
- derivationOrigin: 'http://localhost:1234',
+ identityProvider: 'http://127.0.0.1',
+ derivationOrigin: 'http://127.0.0.1:1234',
});
- idpMock.ready('http://localhost');
+ idpMock.ready('http://127.0.0.1');
const call = (idpWindow.postMessage as jest.Mock).mock.calls[0][0];
- expect(call['derivationOrigin']).toBe('http://localhost:1234');
+ expect(call['derivationOrigin']).toBe('http://127.0.0.1:1234');
});
it('should ignore authorize-ready events with bad origin', async () => {
diff --git a/packages/auth-client/src/index.ts b/packages/auth-client/src/index.ts
index 29a1803a4..2b73fe829 100644
--- a/packages/auth-client/src/index.ts
+++ b/packages/auth-client/src/index.ts
@@ -416,7 +416,7 @@ export class AuthClient {
* @example
* const authClient = await AuthClient.create();
* authClient.login({
- * identityProvider: 'http://.localhost:8000',
+ * identityProvider: 'http://.127.0.0.1:8000',
* maxTimeToLive: BigInt (7) * BigInt(24) * BigInt(3_600_000_000_000), // 1 week
* windowOpenerFeatures: "toolbar=0,location=0,menubar=0,width=500,height=500,left=100,top=100",
* onSuccess: () => {