diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index c524cd86999289c2e9235f333e7e675069c7fdb3..0000000000000000000000000000000000000000 --- a/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -npm-debug.log -.vscode \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1dcef2d9f2db74bf13c54f973f40239e00717423..0000000000000000000000000000000000000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.env \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index ca0c950a60a87a67ec70af31d6e8e937d622636e..0000000000000000000000000000000000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "editor.tabSize": 2, - "prettier.semi": false, - "javascript.format.semicolons": "remove", - "javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": true, - "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, - "javascript.format.insertSpaceAfterCommaDelimiter": true, - "editor.comments.insertSpace": true, - "javascript.format.insertSpaceAfterSemicolonInForStatements": true, - "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": true, - "javascript.format.insertSpaceBeforeFunctionParenthesis": true, - "editor.useTabStops": true, - "standard.autoFixOnSave": true -} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 688d0f2dbe0e1b56e6e9a6c23357b47103890e62..0000000000000000000000000000000000000000 --- a/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM node:18 - -WORKDIR /usr/src/app -COPY package*.json ./ -RUN npm ci --omit=dev -COPY . . - -CMD node src/indexes.js && node src/main.js diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 1a08648516211caf3eb1e345e1994fdf436082c8..0000000000000000000000000000000000000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Mahdi Yari - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index 1ead873fdf3931ab2412272b5d71eb81a815aaf1..eaff571c75e52817c731fa7f0d9da9f9a456695d 100644 --- a/README.md +++ b/README.md @@ -1,215 +1,4 @@ # HafSQL -Space used by indexes +400GB (non-compressed) -Space used by tables 56GB - -## What is HafSQL -HafSQL is a HAF application that runs inside the HAF database. It will run on the `hafsql` schema inside the HAF database. - -HafSQL provides the following using the data already present in the HAF database: -- All the operations (50 in total) -- - Votes, Comments, Transfers, ... -- All the virtual operations (43 in total) -- Ability to search all the operations by their parameters - - -HafSQL also provides the following additional parsed data: -- Posts and comments -- - Search by `author` and `permlink` or `parent_author` and `parent_permlink` -- - Search by tags -- - Sort by pending payout -- Reblogs -- HP and RC delegations -- Community subs and roles -- Followers -- Mutes + Mute followers -- Blacklists + Blacklist followers -- Proposal voters - - -## How to run: - -#### Requirements -Ubuntu 22 -Nodejs v18 (for manual installation) -HAF 1.27.4 (not compatible with 1.27.3 or 1.27.5) - - -```bash -git clone https://gitlab.com/mahdiyari/hafsql -``` - -To install node.js v18 on Ubuntu 22: -```bash -./run.sh install_node -``` - -Install dependencies: -```bash -npm install -``` - -#### Preperations -You need to have a line for `haf_admin` in you pg_hba.conf to create the indexes. Assuming you are using dockerized haf, the following is the easiest way of doing so. -```bash -cd haf-datadir -mkdir -p haf_postgresql_conf.d -cd haf_postgresql_conf.d -touch custom_postgres.conf -touch custom_pg_hba.conf -``` - -`custom_postgres.conf`: -```conf -hba_file = '/home/hived/datadir/haf_postgresql_conf.d/custom_pg_hba.conf' # Don't change -``` -**^^ Don't change the path in the above line ^^** - - - -`custom_pg_hba.conf`: -```conf -# Necessary for HafSQL index creation - can be removed afterwards -host haf_block_log haf_admin 172.0.0.0/8 trust - -# Defaults included with dockerized setup -host haf_block_log haf_app_admin 172.0.0.0/8 trust -host all pghero 172.0.0.0/8 trust - -# DO NOT DISABLE! -# If you change this first entry you will need to make sure that the -# database superuser can access the database using some other method. -# Noninteractive access to all databases is required during automatic -# maintenance (custom daily cronjobs, replication, and similar tasks). -# -# Database administrative login by Unix domain socket -local all postgres peer -# TYPE DATABASE USER ADDRESS METHOD -# "local" is for Unix domain socket connections only -local all all peer -# IPv4 local connections: -host all all 127.0.0.1/32 md5 -# IPv6 local connections: -host all all ::1/128 md5 -# Allow replication connections from localhost, by a user with the -# replication privilege. -local replication all peer -host replication all 127.0.0.1/32 md5 -host replication all ::1/128 md5 -``` - -Restart the container and you should be good to go. - -##### Configs - -Create `.env` file from `example.env` and edit if necessary. -```bash -cp example.env .env -``` - -Depending on your situation, you can create indexes in two ways. - -1. CONCURRENTLY=true -Creating indexes will not interrupt the live sync of the HAF/hived node. Your node will be running just fine. -It is slower compared to the second option and will take longer. At least 24hours. -This is the default option to not break the operation of a live node. - - -2. CONCURRENTLY=false -The live sync of the HAF/hived will be paused. Other than that, there shouldn't be any other interruptions. -hived will continue syncing just fine after the index creation. -It is faster in creating the indexes. Around 4 hours. - - - -##### STEP 1 - -After deciding your method in .env file, you can create the indexes. - -Note: It is recommended to run the following command inside a `tmux` or `screen` session because it will take a long time. -```bash -npm run create-indexes -``` - -**How to make index creation faster:** -If you have a fast storage like NVMe, you can edit `INDEXMAXTHREADS` in the `.env` file according to the thread count of your CPU and make index creation faster. -I would recommend 8-12 for NVMe and 2-4 for slower storage. Postgresql will use extra CPU threads only if needed. -This is only for the index creation and will not affect the other parts. -Make sure `INDEXMAXTHREADS` <= CPU threads - 1 -Default value is 4 - -My tests: -|Test case|Finish time| -|---------|--------| -|0 threads - 1 index|24m - 100%| -|4 threads - 1 index|9m - 38%| -|8 threads - 1 index|7m - 28%| -|12 threads - 1 index|6m - 25%| - -|Test case|CONCURRENTLY|Finish time| -|---------|--------|--------| -|0 threads - All indexes|true|23h| -|8 threads - All indexes|true|31h| -|0 threads - All indexes|false|16h| -|8 threads - All indexes|false|4h| - -##### STEP 2 - -Start HafSQL: -```bash -npm run start -``` -HafSQL will finish syncing in couple of hours. You can check the logs for its progress. - -See logs: -```bash -npm run logs -``` - -Monitor: -```bash -npm run list -``` - -To stop: -```bash -npm run stop -``` - -To restart: -```bash -npm run restart -``` - -## Dockerized setup -First you need to follow [#Preperations](https://gitlab.com/mahdiyari/hafsql#preperations) and [#Configs](https://gitlab.com/mahdiyari/hafsql#configs) - -Building: -```bash -docker build -t hafsql-v1.0.2 . -``` - -Running: -```bash -docker run --rm -it --name hafsql-sync hafsql-v1.0.2 -``` - -It will create the indexes then start syncing after that. - -*** -#### Options -HafSQL makes it possible to run only what you need. For a public API you probably want all of them to be enabled. Configurable in `.env`. Below are the default values. -```conf -# modular syncing -COMMENTS=true # comments, rewards, reblogs -COMMUNITIES=true -DELEGATIONS=true -RCDELEGATIONS=true -FOLLOWS=true # follows, mutes, blacklists -PROPOSALS=true - -# don't create indexes for operations and virtual operations -# useful if you don't intend to provide a public API and/or search the ops/vops views -SKIPOPERATIONINDEXES=false -``` +https://gitlab.com/mahdiyari/hafsql diff --git a/drop-indexes.sql b/drop-indexes.sql deleted file mode 100644 index 2a86b51dec86caa3f97d2b94142392459f7802a1..0000000000000000000000000000000000000000 --- a/drop-indexes.sql +++ /dev/null @@ -1,144 +0,0 @@ -DO $$ -BEGIN - RAISE NOTICE 'Dropping indexes. This might take a long time. Starting at %', NOW(); -END; $$; - -DROP INDEX IF EXISTS -hive.hafsql_txvote_voter, -hive.hafsql_txvote_author, -hive.hafsql_txvote_permlink, -hive.hafsql_txcomment_author, -hive.hafsql_txcomment_permlink, -hive.hafsql_txcomment_parent_author, -hive.hafsql_txcomment_parent_permlink, -hive.hafsql_txtransfer_from, -hive.hafsql_txtransfer_to, -hive.hafsql_txtransfer_memo, -hive.hafsql_txtransfertovesting_from, -hive.hafsql_txtransfertovesting_to, -hive.hafsql_txwithdrawvesting_account, -hive.hafsql_txlimitordercreate_owner, -hive.hafsql_txlimitordercreate_orderid, -hive.hafsql_txlimitordercancel_owner, -hive.hafsql_txlimitordercancel_orderid, -hive.hafsql_txfeedpublish_publisher, -hive.hafsql_txconvert_owner, -hive.hafsql_txconvert_requestid, -hive.hafsql_txaccountcreate_creator, -hive.hafsql_txaccountcreate_new_account_name, -hive.hafsql_txaccountupdate_account, -hive.hafsql_txwitnessupdate_owner, -hive.hafsql_txaccountwitnessvote_account, -hive.hafsql_txaccountwitnessvote_witness, -hive.hafsql_txaccountwitnessproxy_account, -hive.hafsql_txaccountwitnessproxy_proxy, -hive.hafsql_txcustom_id, -hive.hafsql_txcustom_required_auths, -hive.hafsql_txdeletecomment_author, -hive.hafsql_txdeletecomment_permlink, -hive.hafsql_txcustomjson_id, -hive.hafsql_txcustomjson_required_auths, -hive.hafsql_txcustomjson_required_posting_auths, -hive.hafsql_txcommentoptions_author, -hive.hafsql_txcommentoptions_permlink, -hive.hafsql_txsetwithdrawvestingroute_from_account, -hive.hafsql_txsetwithdrawvestingroute_to_account, -hive.hafsql_txlimitordercreate2_owner, -hive.hafsql_txlimitordercreate2_orderid, -hive.hafsql_txclaimaccount_creator, -hive.hafsql_txcreateclaimedaccount_creator, -hive.hafsql_txcreateclaimedaccount_new_account_name, -hive.hafsql_txrequestaccountrecovery_recovery_account, -hive.hafsql_txrequestaccountrecovery_account_to_recover, -hive.hafsql_txrecoveraccount_account_to_recover, -hive.hafsql_txchangerecoveryaccount_account_to_recover, -hive.hafsql_txchangerecoveryaccount_new_recovery_account, -hive.hafsql_txescrowtransfer_from, -hive.hafsql_txescrowtransfer_to, -hive.hafsql_txescrowtransfer_escrow_id, -hive.hafsql_txescrowtransfer_agent, -hive.hafsql_txescrowdispute_from, -hive.hafsql_txescrowdispute_to, -hive.hafsql_txescrowdispute_agent, -hive.hafsql_txescrowdispute_who, -hive.hafsql_txescrowdispute_escrow_id, -hive.hafsql_txescrowrelease_from, -hive.hafsql_txescrowrelease_to, -hive.hafsql_txescrowrelease_agent, -hive.hafsql_txescrowrelease_who, -hive.hafsql_txescrowrelease_receiver, -hive.hafsql_txescrowrelease_escrow_id, -hive.hafsql_txescrowapprove_from, -hive.hafsql_txescrowapprove_to, -hive.hafsql_txescrowapprove_agent, -hive.hafsql_txescrowapprove_who, -hive.hafsql_txescrowapprove_escrow_id, -hive.hafsql_txtransfertosavings_from, -hive.hafsql_txtransfertosavings_to, -hive.hafsql_txtransfertosavings_memo, -hive.hafsql_txtransferfromsavings_from, -hive.hafsql_txtransferfromsavings_to, -hive.hafsql_txcanceltransferfromsavings_from, -hive.hafsql_txdeclinevotingrights_account, -hive.hafsql_txclaimrewardbalance_account, -hive.hafsql_txdelegatevestingshares_delegator, -hive.hafsql_txdelegatevestingshares_delegatee, -hive.hafsql_txaccountcreatewithdelegation_creator, -hive.hafsql_txaccountcreatewithdelegation_new_account_name, -hive.hafsql_txwitnesssetproperties_owner, -hive.hafsql_txaccountupdate2_account, -hive.hafsql_txcreateproposal_creator, -hive.hafsql_txcreateproposal_receiver, -hive.hafsql_txupdateproposalvotes_voter, -hive.hafsql_txupdateproposalvotes_proposal_ids, -hive.hafsql_txremoveproposal_proposal_owner, -hive.hafsql_txremoveproposal_proposal_ids, -hive.hafsql_txupdateproposal_proposal_id, -hive.hafsql_txupdateproposal_creator, -hive.hafsql_txcollateralizedconvert_owner, -hive.hafsql_txcollateralizedconvert_requestid, -hive.hafsql_txrecurrenttransfer_from, -hive.hafsql_txrecurrenttransfer_to, -hive.hafsql_txrecurrenttransfer_memo; - --- Virtual operation indexes -DROP INDEX IF EXISTS -hive.hafsql_vofillconvertrequest_owner, -hive.hafsql_vofillconvertrequest_requestid, -hive.hafsql_voauthorreward_author, -hive.hafsql_voauthorreward_permlink, -hive.hafsql_vocurationreward_curator, -hive.hafsql_vocommentreward_author, -hive.hafsql_vocommentreward_permlink, -hive.hafsql_vointerestoperation_owner, -hive.hafsql_vofillvestingwithdraw_from_account, -hive.hafsql_vofillvestingwithdraw_to_account, -hive.hafsql_vofillorder_current_owner, -hive.hafsql_vofillorder_current_orderid, -hive.hafsql_vofillorder_open_owner, -hive.hafsql_vofillorder_open_orderid, -hive.hafsql_voshutdownwitness_owner, -hive.hafsql_vofilltransferfromsavings_from, -hive.hafsql_vofilltransferfromsavings_to, -hive.hafsql_voreturnvestingdelegation_account, -hive.hafsql_vocommentbenefactorreward_benefactor, -hive.hafsql_voproducerreward_producer, -hive.hafsql_voproposalpay_proposal_id, -hive.hafsql_voproposalpay_receiver, -hive.hafsql_voeffectivecommentvote_author, -hive.hafsql_voeffectivecommentvote_permlink, -hive.hafsql_vochangedrecoveryaccount_account, -hive.hafsql_voaccountcreated_new_account_name, -hive.hafsql_voaccountcreated_creator, -hive.hafsql_vofillcollateralizedconvertrequest_owner, -hive.hafsql_vofillcollateralizedconvertrequest_requestid, -hive.hafsql_vofillrecurrenttransfer_from, -hive.hafsql_vofillrecurrenttransfer_to, -hive.hafsql_vofillrecurrenttransfer_memo, -hive.hafsql_vocollateralizedconvertimmediateconversion_owner, -hive.hafsql_vocollateralizedconvertimmediateconversion_requestid; - -DO $$ -BEGIN - RAISE NOTICE 'Finished at %', NOW(); -END; $$; \ No newline at end of file diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs deleted file mode 100644 index c850be131a234a673ee0842c8c27aabd96857ac8..0000000000000000000000000000000000000000 --- a/ecosystem.config.cjs +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - apps: [{ - name: 'HafSQL-sync', - script: 'src/main.js', - max_memory_restart: '4G' - }] -} diff --git a/example.env b/example.env deleted file mode 100644 index 87564f573b1e68097c019f79786eb83292dc4002..0000000000000000000000000000000000000000 --- a/example.env +++ /dev/null @@ -1,22 +0,0 @@ -# default haf values -PGDATABASE=haf_block_log -PGUSER=haf_app_admin -PGHOST=172.17.0.2 -PGPORT=5432 -PGPOOLSIZE=2 - -# explained in readme -CONCURRENTLY=true -INDEXMAXTHREADS=4 - -# modular syncing -COMMENTS=true # comments, rewards, reblogs -COMMUNITIES=true -DELEGATIONS=true -RCDELEGATIONS=true -FOLLOWS=true # follows, mutes, blacklists -PROPOSALS=true - -# don't create indexes for operations and virtual operations -# useful if you don't intend to provide a public API and/or search the ops/vops views -SKIPOPERATIONINDEXES=false \ No newline at end of file diff --git a/helpers/database.js b/helpers/database.js deleted file mode 100644 index a043ea11c0eef6d85137d3b7658fe5de7e7f977c..0000000000000000000000000000000000000000 --- a/helpers/database.js +++ /dev/null @@ -1,13 +0,0 @@ -import pg from 'pg' -import { config } from 'dotenv' -config() - -export const pool = new pg.Pool({ - application_name: 'HafSQL-sync', - database: process.env.PGDATABASE || 'haf_block_log', - user: process.env.PGUSER || 'haf_app_admin', - host: process.env.PGHOST || '172.17.0.2', - port: process.env.PGPORT || 5432, - max: process.env.PGPOOLSIZE || 2, - min: 1 -}) diff --git a/helpers/setups/extraViews.js b/helpers/setups/extraViews.js deleted file mode 100644 index c20f2271368dd08e0300b56843c6076abf8907b2..0000000000000000000000000000000000000000 --- a/helpers/setups/extraViews.js +++ /dev/null @@ -1,210 +0,0 @@ -import { pool } from '../database.js' - -export const setupExtraViews = async () => { - // Blocks - await pool.query(`CREATE OR REPLACE VIEW hafsql.blocks - AS SELECT b.num AS block_num, - b.created_at as "timestamp", - b.producer_account_id as witness, - b.extensions as extensions, - b.signing_key as signing_key, - encode(b.hash, 'hex'::text) as hash, - encode(b.prev, 'hex'::text) as prev, - encode(b.witness_signature, 'hex'::text) as signature, - encode(b.transaction_merkle_root, 'hex'::text) as transaction_merkle_root - FROM hive.blocks b;`) - - // Transactions - await pool.query(`CREATE OR REPLACE VIEW hafsql.transactions - AS SELECT x.block_num, - x.trx_in_block, - x.trx_hash AS trx_id, - x.ref_block_num, - x.ref_block_prefix, - x.expiration, - array_fill(encode(x.signature, 'hex'), array[1]) || array(select encode(tm.signature, 'hex') from hive.transactions_multisig tm where tm.trx_hash=x.trx_hash) as signatures - FROM hive.transactions x;`) - - // DynamicGlobalProperties - await pool.query(`CREATE OR REPLACE VIEW hafsql.dynamic_global_properties - AS SELECT b.num AS block_num, - b.created_at as "timestamp", - b.total_vesting_fund_hive as total_vesting_fund_hive, - b.total_vesting_shares as total_vesting_shares, - b.total_reward_fund_hive as total_reward_fund_hive, - b.virtual_supply as virtual_supply, - b.current_supply as current_supply, - b.current_hbd_supply as current_hbd_supply, - b.hbd_interest_rate as hbd_interest_rate, - b.dhf_interval_ledger as dhf_interval_ledger - FROM hive.blocks b;`) - - // Delegations - await pool.query(`CREATE OR REPLACE VIEW hafsql.delegations - AS SELECT x.delegator, - x.delegatee, - x.vests - FROM hafsql.delegations_table x;`) - - // RC Delegations - await pool.query(`CREATE OR REPLACE VIEW hafsql.rc_delegations - AS SELECT x.delegator, - x.delegatee, - x.rc - FROM hafsql.rc_delegations_table x;`) - - // Comments - await pool.query(`CREATE OR REPLACE VIEW hafsql.comments - AS SELECT x.id, - x.author, - x.permlink, - (SELECT parent_author FROM hafsql.op_comment WHERE op_id=x.last_op_id) AS parent_author, - (SELECT parent_permlink FROM hafsql.op_comment WHERE op_id=x.last_op_id) AS parent_permlink, - (SELECT title FROM hafsql.op_comment WHERE op_id=x.last_op_id) AS title, - CASE WHEN x.body_edited = true THEN x.body ELSE (SELECT body FROM hafsql.op_comment WHERE op_id=x.last_op_id) END AS body, - x.created, - (SELECT "timestamp" FROM hafsql.op_comment WHERE op_id=x.last_op_id) AS edited, - CASE WHEN (NOW() AT TIME ZONE 'UTC' - x.created) < '7 days' THEN (x.created + INTERVAL '7 days') ELSE '1969-12-31 23:59:59' END AS cashout_time, - CASE WHEN (NOW() AT TIME ZONE 'UTC' - x.created) < '7 days' THEN (x.created + INTERVAL '7 days') - NOW() AT TIME ZONE 'UTC' ELSE '00:00:00.000' END AS remaining_till_cashout, - CASE WHEN (NOW() AT TIME ZONE 'UTC' - x.created) >= '7 days' THEN (x.created + INTERVAL '7 days') ELSE '1969-12-31 23:59:59' END AS last_payout, - x.tags, - (SELECT json_metadata FROM hafsql.op_comment WHERE op_id=x.last_op_id) AS json_metadata, - x.pending_payout_value, - COALESCE((SELECT SUM(author_rewards::int8) FROM hafsql.vo_comment_reward WHERE author=x.author and permlink=x.permlink), '0') AS author_rewards, - COALESCE((SELECT MAX(total_payout_value) FROM hafsql.vo_comment_reward WHERE author=x.author and permlink=x.permlink), 0) AS total_payout_value, - COALESCE((SELECT MAX(curator_payout_value) FROM hafsql.vo_comment_reward WHERE author=x.author and permlink=x.permlink), 0) AS curator_payout_value, - COALESCE((SELECT MAX(beneficiary_payout_value) FROM hafsql.vo_comment_reward WHERE author=x.author and permlink=x.permlink), 0) AS beneficiary_payout_value, - COALESCE((SELECT extensions::jsonb->0->'value'->>'beneficiaries' FROM hafsql.op_comment_options WHERE author=x.author and permlink=x.permlink ORDER BY op_id DESC LIMIT 1), '[]') AS beneficiaries, - COALESCE((SELECT max_accepted_payout FROM hafsql.op_comment_options WHERE author=x.author and permlink=x.permlink ORDER BY op_id DESC LIMIT 1), 1000000.0) AS max_accepted_payout, - COALESCE((SELECT percent_hbd FROM hafsql.op_comment_options WHERE author=x.author and permlink=x.permlink ORDER BY op_id DESC LIMIT 1), '10000') AS percent_hbd, - COALESCE((SELECT allow_votes FROM hafsql.op_comment_options WHERE author=x.author and permlink=x.permlink ORDER BY op_id DESC LIMIT 1), 'true') AS allow_votes, - COALESCE((SELECT allow_curation_rewards FROM hafsql.op_comment_options WHERE author=x.author and permlink=x.permlink ORDER BY op_id DESC LIMIT 1), 'true') AS allow_curation_rewards, - x.deleted - FROM hafsql.comments_table x;`) - - // Community Subs - await pool.query(`CREATE OR REPLACE VIEW hafsql.community_subs - AS SELECT c.account AS account_id, - c.community AS community_id, - (SELECT a.name FROM hive.accounts a WHERE id=c.account) AS account_name, - (SELECT a.name FROM hive.accounts a WHERE id=c.community) AS community_name - FROM hafsql.community_subs_table c;`) - - // Community Roles - await pool.query(`CREATE OR REPLACE VIEW hafsql.community_roles - AS SELECT c.account AS account_id, - c.community AS community_id, - (SELECT a.name FROM hive.accounts a WHERE id=c.account) AS account_name, - (SELECT a.name FROM hive.accounts a WHERE id=c.community) AS community_name, - CASE WHEN c.role=-2 THEN 'muted' WHEN c.role=8 THEN 'owner' WHEN c.role=2 THEN 'member' WHEN c.role=4 THEN 'mod' WHEN c.role=6 THEN 'admin' ELSE 'guest' END AS role, - c.title - FROM hafsql.community_roles_table c;`) - - // Blacklists - await pool.query(`CREATE OR REPLACE VIEW hafsql.blacklists - AS SELECT x.blacklister AS blacklister_id, - x.blacklisted AS blacklisted_id, - (SELECT a.name FROM hive.accounts a WHERE id=x.blacklister) AS blacklister_name, - (SELECT a.name FROM hive.accounts a WHERE id=x.blacklisted) AS blacklisted_name - FROM hafsql.blacklists_table x;`) - - // Mutes - await pool.query(`CREATE OR REPLACE VIEW hafsql.mutes - AS SELECT x.muter AS muter_id, - x.muted AS muted_id, - (SELECT a.name FROM hive.accounts a WHERE id=x.muter) AS muter_name, - (SELECT a.name FROM hive.accounts a WHERE id=x.muted) AS muted_name - FROM hafsql.mutes_table x;`) - - // Blacklist Follows - await pool.query(`CREATE OR REPLACE VIEW hafsql.blacklist_follows - AS SELECT x.account AS account_id, - x.blacklist AS blacklist_id, - (SELECT a.name FROM hive.accounts a WHERE id=x.account) AS account_name, - (SELECT a.name FROM hive.accounts a WHERE id=x.blacklist) AS blacklist_name - FROM hafsql.blacklist_follows_table x;`) - - // Mute Follows - await pool.query(`CREATE OR REPLACE VIEW hafsql.mute_follows - AS SELECT x.account AS account_id, - x.mute_list AS mute_list_id, - (SELECT a.name FROM hive.accounts a WHERE id=x.account) AS account_name, - (SELECT a.name FROM hive.accounts a WHERE id=x.mute_list) AS mute_list_name - FROM hafsql.mute_follows_table x;`) - - // Follows - await pool.query(`CREATE OR REPLACE VIEW hafsql.follows - AS SELECT x.follower AS follower_id, - x.following AS following_id, - (SELECT a.name FROM hive.accounts a WHERE id=x.follower) AS follower_name, - (SELECT a.name FROM hive.accounts a WHERE id=x.following) AS following_name - FROM hafsql.follows_table x;`) - - // Reblogs - await pool.query(`CREATE OR REPLACE VIEW hafsql.reblogs - AS SELECT x.account AS account_id, - x.post AS post_id, - (SELECT a.name FROM hive.accounts a WHERE id=x.account) AS account_name - FROM hafsql.reblogs_table x;`) - - // Proposal Approvlas - await pool.query(`CREATE OR REPLACE VIEW hafsql.proposal_approvals - AS SELECT x.id AS proposal_id, - x.voter - FROM hafsql.proposal_approvals_table x;`) - - // Accounts - await pool.query(`CREATE OR REPLACE VIEW hafsql.accounts - AS SELECT x.id, - x.name - FROM hive.accounts x;`) - - // Operations - await pool.query(`CREATE OR REPLACE VIEW hafsql.operations - AS SELECT x.id, - x.block_num, - x.trx_in_block, - x.op_pos, - x.op_type_id, - x.timestamp, - x.body - FROM hive.operations x;`) - - // Operation Types - await pool.query(`CREATE OR REPLACE VIEW hafsql.operation_types - AS SELECT x.id, - x.name, - x.is_virtual - FROM hive.operation_types x;`) - - // Applied Hardforks - await pool.query(`CREATE OR REPLACE VIEW hafsql.applied_hardforks - AS SELECT x.hardfork_num, - x.block_num, - x.hardfork_vop_id - FROM hive.applied_hardforks x;`) -} - -export const removeExtraViews = async () => { - await pool.query(`DROP VIEW IF EXISTS - hafsql.blocks, - hafsql.transactions, - hafsql.dynamic_global_properties, - hafsql.delegations, - hafsql.rc_delegations, - hafsql.comments, - hafsql.blacklists, - hafsql.mutes, - hafsql.blacklist_follows, - hafsql.mute_follows, - hafsql.follows, - hafsql.reblogs, - hafsql.proposal_approvals, - hafsql.accounts, - hafsql.operations, - hafsql.operation_types, - hafsql.applied_hardforks, - hafsql.community_subs, - hafsql.community_roles;` - ) -} diff --git a/helpers/setups/functions.js b/helpers/setups/functions.js deleted file mode 100644 index d4d835aafa49497e1c3ca0cf972bb23451a367f1..0000000000000000000000000000000000000000 --- a/helpers/setups/functions.js +++ /dev/null @@ -1,17 +0,0 @@ -import { pool } from '../database.js' - -export const setupFunctions = async () => { - const AssetAmount = `CREATE OR REPLACE FUNCTION hafsql_assetamount(text) RETURNS float - AS $$ SELECT ($1::jsonb->>'amount')::int8 / power(10, ($1::jsonb->>'precision')::int8) $$ - LANGUAGE SQL - IMMUTABLE - RETURNS NULL ON NULL INPUT;` - await pool.query(AssetAmount) - - const AssetSymbol = `CREATE OR REPLACE FUNCTION hafsql_assetsymbol(text) RETURNS text - AS $$ SELECT CASE WHEN $1::jsonb->>'nai' = '@@000000013' THEN 'HBD' WHEN $1::jsonb->>'nai' = '@@000000037' THEN 'VESTS' ELSE 'HIVE' END $$ - LANGUAGE SQL - IMMUTABLE - RETURNS NULL ON NULL INPUT;` - await pool.query(AssetSymbol) -} diff --git a/helpers/setups/operations.js b/helpers/setups/operations.js deleted file mode 100644 index 92f1576a1215ad1ec99e84a5a256b14193abacef..0000000000000000000000000000000000000000 --- a/helpers/setups/operations.js +++ /dev/null @@ -1,594 +0,0 @@ -import { pool } from '../database.js' - -export const setupOperationViews = async () => { - const OpVote = `CREATE OR REPLACE VIEW hafsql.op_vote - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'voter'::text AS "voter", - (o.body::jsonb -> 'value'::text) ->> 'author'::text AS "author", - (o.body::jsonb -> 'value'::text) ->> 'weight'::text AS "weight", - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS "permlink" - FROM hive.operations o - WHERE o.op_type_id = 0;` - await pool.query(OpVote) - - const OpComment = `CREATE OR REPLACE VIEW hafsql.op_comment - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'author'::text AS "author", - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS "permlink", - (o.body::jsonb -> 'value'::text) ->> 'parent_author'::text AS "parent_author", - (o.body::jsonb -> 'value'::text) ->> 'parent_permlink'::text AS "parent_permlink", - (o.body::jsonb -> 'value'::text) ->> 'title'::text AS "title", - (o.body::jsonb -> 'value'::text) ->> 'body'::text AS "body", - (o.body::jsonb -> 'value'::text) ->> 'json_metadata'::text AS "json_metadata" - FROM hive.operations o - WHERE o.op_type_id = 1;` - await pool.query(OpComment) - - const OpTransfer = `CREATE OR REPLACE VIEW hafsql.op_transfer - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS "from", - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS "to", - (o.body::jsonb -> 'value'::text) ->> 'amount'::text AS "amount", - (o.body::jsonb -> 'value'::text) ->> 'memo'::text AS "memo" - FROM hive.operations o - WHERE o.op_type_id = 2;` - await pool.query(OpTransfer) - - const OpTransferToVesting = `CREATE OR REPLACE VIEW hafsql.op_transfer_to_vesting - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS "from", - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS "to", - (o.body::jsonb -> 'value'::text) ->> 'amount'::text AS "amount" - FROM hive.operations o - WHERE o.op_type_id = 3;` - await pool.query(OpTransferToVesting) - - const OpWithdrawVesting = `CREATE OR REPLACE VIEW hafsql.op_withdraw_vesting - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS "account", - (o.body::jsonb -> 'value'::text) ->> 'vesting_shares'::text AS "vesting_shares" - FROM hive.operations o - WHERE o.op_type_id = 4;` - await pool.query(OpWithdrawVesting) - - const OpLimitOrderCreate = `CREATE OR REPLACE VIEW hafsql.op_limit_order_create - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'orderid'::text AS "orderid", - (o.body::jsonb -> 'value'::text) ->> 'amount_to_sell'::text AS "amount_to_sell", - (o.body::jsonb -> 'value'::text) ->> 'min_to_receive'::text AS "min_to_receive", - (o.body::jsonb -> 'value'::text) ->> 'fill_or_kill'::text AS "fill_or_kill", - (o.body::jsonb -> 'value'::text) ->> 'expiration'::text AS "expiration" - FROM hive.operations o - WHERE o.op_type_id = 5;` - await pool.query(OpLimitOrderCreate) - - const OpLimitOrderCancel = `CREATE OR REPLACE VIEW hafsql.op_limit_order_cancel - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'orderid'::text AS "orderid" - FROM hive.operations o - WHERE o.op_type_id = 6;` - await pool.query(OpLimitOrderCancel) - - const OpFeedPublish = `CREATE OR REPLACE VIEW hafsql.op_feed_publish - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'publisher'::text AS "publisher", - (o.body::jsonb -> 'value'::text) ->> 'exchange_rate'::text AS "exchange_rate", - (o.body::jsonb -> 'value'::text) ->> 'quote'::text AS "quote" - FROM hive.operations o - WHERE o.op_type_id = 7;` - await pool.query(OpFeedPublish) - - const OpConvert = `CREATE OR REPLACE VIEW hafsql.op_convert - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'requestid'::text AS "requestid", - (o.body::jsonb -> 'value'::text) ->> 'amount'::text AS "amount" - FROM hive.operations o - WHERE o.op_type_id = 8;` - await pool.query(OpConvert) - - const OpAccountCreate = `CREATE OR REPLACE VIEW hafsql.op_account_create - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'fee'::text AS "fee", - (o.body::jsonb -> 'value'::text) ->> 'creator'::text AS "creator", - (o.body::jsonb -> 'value'::text) ->> 'new_account_name'::text AS "new_account_name", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'active'::text AS "active", - (o.body::jsonb -> 'value'::text) ->> 'posting'::text AS "posting", - (o.body::jsonb -> 'value'::text) ->> 'memo_key'::text AS "memo_key", - (o.body::jsonb -> 'value'::text) ->> 'json_metadata'::text AS "json_metadata" - FROM hive.operations o - WHERE o.op_type_id = 9;` - await pool.query(OpAccountCreate) - - const OpAccountUpdate = `CREATE OR REPLACE VIEW hafsql.op_account_update - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS "account", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'active'::text AS "active", - (o.body::jsonb -> 'value'::text) ->> 'posting'::text AS "posting", - (o.body::jsonb -> 'value'::text) ->> 'memo_key'::text AS "memo_key", - (o.body::jsonb -> 'value'::text) ->> 'json_metadata'::text AS "json_metadata" - FROM hive.operations o - WHERE o.op_type_id = 10;` - await pool.query(OpAccountUpdate) - - const OpWitnessUpdate = `CREATE OR REPLACE VIEW hafsql.op_witness_update - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'url'::text AS "url", - (o.body::jsonb -> 'value'::text) ->> 'block_signing_key'::text AS "block_signing_key", - (o.body::jsonb -> 'value'::text) ->> 'props'::text AS "posting", - (o.body::jsonb -> 'value'::text) ->> 'fee'::text AS "fee" - FROM hive.operations o - WHERE o.op_type_id = 11;` - await pool.query(OpWitnessUpdate) - - const OpAccountWitnessVote = `CREATE OR REPLACE VIEW hafsql.op_account_witness_vote - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS "account", - (o.body::jsonb -> 'value'::text) ->> 'witness'::text AS "witness", - (o.body::jsonb -> 'value'::text) ->> 'approve'::text AS "approve" - FROM hive.operations o - WHERE o.op_type_id = 12;` - await pool.query(OpAccountWitnessVote) - - const OpAccountWitnessProxy = `CREATE OR REPLACE VIEW hafsql.op_account_witness_proxy - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS "account", - (o.body::jsonb -> 'value'::text) ->> 'proxy'::text AS "proxy" - FROM hive.operations o - WHERE o.op_type_id = 13;` - await pool.query(OpAccountWitnessProxy) - - const OpPow = `CREATE OR REPLACE VIEW hafsql.op_pow - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'worker_account'::text AS "worker_account", - (o.body::jsonb -> 'value'::text) ->> 'block_id'::text AS "block_id", - (o.body::jsonb -> 'value'::text) ->> 'nonce'::text AS "nonce", - (o.body::jsonb -> 'value'::text) ->> 'work'::text AS "work", - (o.body::jsonb -> 'value'::text) ->> 'props'::text AS "props" - FROM hive.operations o - WHERE o.op_type_id = 14;` - await pool.query(OpPow) - - const OpCustom = `CREATE OR REPLACE VIEW hafsql.op_custom - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) -> 'required_auths' AS "required_auths", - (o.body::jsonb -> 'value'::text) ->> 'id'::text AS "id", - (o.body::jsonb -> 'value'::text) ->> 'data'::text AS "data" - FROM hive.operations o - WHERE o.op_type_id = 15;` - await pool.query(OpCustom) - - // skipping op_type_id: 16 - witness_block_approve has never been broadcasted apprantly - - const OpDeleteComment = `CREATE OR REPLACE VIEW hafsql.op_delete_comment - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'author'::text AS "author", - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS "permlink" - FROM hive.operations o - WHERE o.op_type_id = 17;` - await pool.query(OpDeleteComment) - - const OpCustomJson = `CREATE OR REPLACE VIEW hafsql.op_custom_json - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) -> 'required_auths' AS "required_auths", - (o.body::jsonb -> 'value'::text) -> 'required_posting_auths' AS "required_posting_auths", - (o.body::jsonb -> 'value'::text) ->> 'id'::text AS "id", - (o.body::jsonb -> 'value'::text) ->> 'json'::text AS "json" - FROM hive.operations o - WHERE o.op_type_id = 18;` - await pool.query(OpCustomJson) - - const OpCommentOptions = `CREATE OR REPLACE VIEW hafsql.op_comment_options - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'author'::text AS "author", - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS "permlink", - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'max_accepted_payout'::text) AS "max_accepted_payout", - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'max_accepted_payout'::text) AS "max_accepted_payout_symbol", - (o.body::jsonb -> 'value'::text) ->> 'percent_hbd'::text AS "percent_hbd", - (o.body::jsonb -> 'value'::text) ->> 'allow_votes'::text AS "allow_votes", - (o.body::jsonb -> 'value'::text) ->> 'allow_curation_rewards'::text AS "allow_curation_rewards", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 19;` - await pool.query(OpCommentOptions) - - const OpSetWithdrawVestingRoute = `CREATE OR REPLACE VIEW hafsql.op_setWithdraw_vesting_route - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from_account'::text AS "from_account", - (o.body::jsonb -> 'value'::text) ->> 'to_account'::text AS "to_account", - (o.body::jsonb -> 'value'::text) ->> 'percent'::text AS "percent", - (o.body::jsonb -> 'value'::text) ->> 'auto_vest'::text AS "auto_vest" - FROM hive.operations o - WHERE o.op_type_id = 20;` - await pool.query(OpSetWithdrawVestingRoute) - - const OpLimitOrderCreate2 = `CREATE OR REPLACE VIEW hafsql.op_limit_order_create2 - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'orderid'::text AS "orderid", - (o.body::jsonb -> 'value'::text) ->> 'amount_to_sell'::text AS "amount_to_sell", - (o.body::jsonb -> 'value'::text) ->> 'exchange_rate'::text AS "exchange_rate", - (o.body::jsonb -> 'value'::text) ->> 'fill_or_kill'::text AS "fill_or_kill", - (o.body::jsonb -> 'value'::text) ->> 'expiration'::text AS "expiration" - FROM hive.operations o - WHERE o.op_type_id = 21;` - await pool.query(OpLimitOrderCreate2) - - const OpClaimAccount = `CREATE OR REPLACE VIEW hafsql.op_claim_account - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'creator'::text AS "creator", - (o.body::jsonb -> 'value'::text) ->> 'fee'::text AS "fee", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 22;` - await pool.query(OpClaimAccount) - - const OpCreateClaimedAccount = `CREATE OR REPLACE VIEW hafsql.op_create_claimed_account - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'creator'::text AS "creator", - (o.body::jsonb -> 'value'::text) ->> 'new_account_name'::text AS "new_account_name", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'active'::text AS "active", - (o.body::jsonb -> 'value'::text) ->> 'posting'::text AS "posting", - (o.body::jsonb -> 'value'::text) ->> 'memo_key'::text AS "memo_key", - (o.body::jsonb -> 'value'::text) ->> 'json_metadata'::text AS "json_metadata", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 23;` - await pool.query(OpCreateClaimedAccount) - - const OpRequestAccountRecovery = `CREATE OR REPLACE VIEW hafsql.op_request_account_recovery - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'recovery_account'::text AS "recovery_account", - (o.body::jsonb -> 'value'::text) ->> 'account_to_recover'::text AS "account_to_recover", - (o.body::jsonb -> 'value'::text) ->> 'new_owner_authority'::text AS "new_owner_authority", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 24;` - await pool.query(OpRequestAccountRecovery) - - const OpRecoverAccount = `CREATE OR REPLACE VIEW hafsql.op_recover_account - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account_to_recover'::text AS "account_to_recover", - (o.body::jsonb -> 'value'::text) ->> 'new_owner_authority'::text AS "new_owner_authority", - (o.body::jsonb -> 'value'::text) ->> 'recent_owner_authority'::text AS "recent_owner_authority", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 25;` - await pool.query(OpRecoverAccount) - - const OpChangeRecoveryAccount = `CREATE OR REPLACE VIEW hafsql.op_change_recovery_account - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account_to_recover'::text AS "account_to_recover", - (o.body::jsonb -> 'value'::text) ->> 'new_recovery_account'::text AS "new_recovery_account", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 26;` - await pool.query(OpChangeRecoveryAccount) - - const OpEscrowTransfer = `CREATE OR REPLACE VIEW hafsql.op_escrow_transfer - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS "from", - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS "to", - (o.body::jsonb -> 'value'::text) ->> 'hbd_amount'::text AS "hbd_amount", - (o.body::jsonb -> 'value'::text) ->> 'hive_amount'::text AS "hive_amount", - (o.body::jsonb -> 'value'::text) ->> 'escrow_id'::text AS "escrow_id", - (o.body::jsonb -> 'value'::text) ->> 'agent'::text AS "agent", - (o.body::jsonb -> 'value'::text) ->> 'fee'::text AS "fee", - (o.body::jsonb -> 'value'::text) ->> 'json_meta'::text AS "json_meta", - (o.body::jsonb -> 'value'::text) ->> 'ratification_deadline'::text AS "ratification_deadline", - (o.body::jsonb -> 'value'::text) ->> 'escrow_expiration'::text AS "escrow_expiration" - FROM hive.operations o - WHERE o.op_type_id = 27;` - await pool.query(OpEscrowTransfer) - - const OpEscrowDispute = `CREATE OR REPLACE VIEW hafsql.op_escrow_dispute - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS "from", - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS "to", - (o.body::jsonb -> 'value'::text) ->> 'agent'::text AS "agent", - (o.body::jsonb -> 'value'::text) ->> 'who'::text AS "who", - (o.body::jsonb -> 'value'::text) ->> 'escrow_id'::text AS "escrow_id" - FROM hive.operations o - WHERE o.op_type_id = 28;` - await pool.query(OpEscrowDispute) - - const OpEscrowRelease = `CREATE OR REPLACE VIEW hafsql.op_escrow_release - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS "from", - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS "to", - (o.body::jsonb -> 'value'::text) ->> 'agent'::text AS "agent", - (o.body::jsonb -> 'value'::text) ->> 'who'::text AS "who", - (o.body::jsonb -> 'value'::text) ->> 'receiver'::text AS "receiver", - (o.body::jsonb -> 'value'::text) ->> 'escrow_id'::text AS "escrow_id", - (o.body::jsonb -> 'value'::text) ->> 'hbd_amount'::text AS "hbd_amount", - (o.body::jsonb -> 'value'::text) ->> 'hive_amount'::text AS "hive_amount" - FROM hive.operations o - WHERE o.op_type_id = 29;` - await pool.query(OpEscrowRelease) - - const OpPow2 = `CREATE OR REPLACE VIEW hafsql.op_pow2 - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'work'::text AS "work", - (o.body::jsonb -> 'value'::text) ->> 'props'::text AS "props" - FROM hive.operations o - WHERE o.op_type_id = 30;` - await pool.query(OpPow2) - - const OpEscrowApprove = `CREATE OR REPLACE VIEW hafsql.op_escrow_approve - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS "from", - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS "to", - (o.body::jsonb -> 'value'::text) ->> 'agent'::text AS "agent", - (o.body::jsonb -> 'value'::text) ->> 'who'::text AS "who", - (o.body::jsonb -> 'value'::text) ->> 'escrow_id'::text AS "escrow_id", - (o.body::jsonb -> 'value'::text) ->> 'approve'::text AS "approve" - FROM hive.operations o - WHERE o.op_type_id = 31;` - await pool.query(OpEscrowApprove) - - const OpTransferToSavings = `CREATE OR REPLACE VIEW hafsql.op_transfer_to_savings - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS "from", - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS "to", - (o.body::jsonb -> 'value'::text) ->> 'amount'::text AS "amount", - (o.body::jsonb -> 'value'::text) ->> 'memo'::text AS "memo" - FROM hive.operations o - WHERE o.op_type_id = 32;` - await pool.query(OpTransferToSavings) - - const OpTransferFromSavings = `CREATE OR REPLACE VIEW hafsql.op_transfer_from_savings - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS "from", - (o.body::jsonb -> 'value'::text) ->> 'request_id'::text AS "request_id", - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS "to", - (o.body::jsonb -> 'value'::text) ->> 'amount'::text AS "amount", - (o.body::jsonb -> 'value'::text) ->> 'memo'::text AS "memo" - FROM hive.operations o - WHERE o.op_type_id = 33;` - await pool.query(OpTransferFromSavings) - - const OpCancelTransferFromSavings = `CREATE OR REPLACE VIEW hafsql.op_cancel_transfer_from_savings - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS "from", - (o.body::jsonb -> 'value'::text) ->> 'request_id'::text AS "request_id" - FROM hive.operations o - WHERE o.op_type_id = 34;` - await pool.query(OpCancelTransferFromSavings) - - // There is no custom_binary 35 broadcasted - skipping - - const OpDeclineVotingRights = `CREATE OR REPLACE VIEW hafsql.op_decline_voting_rights - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS "account", - (o.body::jsonb -> 'value'::text) ->> 'decline'::text AS "decline" - FROM hive.operations o - WHERE o.op_type_id = 36;` - await pool.query(OpDeclineVotingRights) - - // There is no reset_account 37 broadcasted - skipping - // There is no set_reset_account 38 broadcasted - skipping - - const OpClaimRewardBalance = `CREATE OR REPLACE VIEW hafsql.op_claim_reward_balance - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS "account", - (o.body::jsonb -> 'value'::text) ->> 'reward_hive'::text AS "reward_hive", - (o.body::jsonb -> 'value'::text) ->> 'reward_hbd'::text AS "reward_hbd", - (o.body::jsonb -> 'value'::text) ->> 'reward_vests'::text AS "reward_vests" - FROM hive.operations o - WHERE o.op_type_id = 39;` - await pool.query(OpClaimRewardBalance) - - const OpDelegateVestingShares = `CREATE OR REPLACE VIEW hafsql.op_delegate_vesting_shares - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'delegator'::text AS "delegator", - (o.body::jsonb -> 'value'::text) ->> 'delegatee'::text AS "delegatee", - (o.body::jsonb -> 'value'::text) ->> 'vesting_shares'::text AS "vesting_shares" - FROM hive.operations o - WHERE o.op_type_id = 40;` - await pool.query(OpDelegateVestingShares) - - const OpAccountCreateWithDelegation = `CREATE OR REPLACE VIEW hafsql.op_account_create_with_delegation - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'creator'::text AS "creator", - (o.body::jsonb -> 'value'::text) ->> 'new_account_name'::text AS "new_account_name", - (o.body::jsonb -> 'value'::text) ->> 'fee'::text AS "fee", - (o.body::jsonb -> 'value'::text) ->> 'delegation'::text AS "delegation", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'active'::text AS "active", - (o.body::jsonb -> 'value'::text) ->> 'posting'::text AS "posting", - (o.body::jsonb -> 'value'::text) ->> 'memo_key'::text AS "memo_key", - (o.body::jsonb -> 'value'::text) ->> 'json_metadata'::text AS "json_metadata", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 41;` - await pool.query(OpAccountCreateWithDelegation) - - const OpWitnessSetProperties = `CREATE OR REPLACE VIEW hafsql.op_witness_set_properties - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'props'::text AS "props", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 42;` - await pool.query(OpWitnessSetProperties) - - const OpAccountUpdate2 = `CREATE OR REPLACE VIEW hafsql.op_account_update2 - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS "account", - (o.body::jsonb -> 'value'::text) ->> 'json_metadata'::text AS "json_metadata", - (o.body::jsonb -> 'value'::text) ->> 'posting_json_metadata'::text AS "posting_json_metadata", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 43;` - await pool.query(OpAccountUpdate2) - - const OpCreateProposal = `CREATE OR REPLACE VIEW hafsql.op_create_proposal - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'creator'::text AS "creator", - (o.body::jsonb -> 'value'::text) ->> 'receiver'::text AS "receiver", - (o.body::jsonb -> 'value'::text) ->> 'subject'::text AS "subject", - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS "permlink", - (o.body::jsonb -> 'value'::text) ->> 'start_date'::text AS "start_date", - (o.body::jsonb -> 'value'::text) ->> 'end_date'::text AS "end_date", - (o.body::jsonb -> 'value'::text) ->> 'daily_pay'::text AS "daily_pay", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 44;` - await pool.query(OpCreateProposal) - - const OpUpdateProposalVotes = `CREATE OR REPLACE VIEW hafsql.op_update_proposal_votes - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'voter'::text AS "voter", - (o.body::jsonb -> 'value'::text) -> 'proposal_ids' AS "proposal_ids", - (o.body::jsonb -> 'value'::text) ->> 'approve'::text AS "approve", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 45;` - await pool.query(OpUpdateProposalVotes) - - const OpRemoveProposal = `CREATE OR REPLACE VIEW hafsql.op_remove_proposal - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'proposal_owner'::text AS "proposal_owner", - (o.body::jsonb -> 'value'::text) -> 'proposal_ids' AS "proposal_ids", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 46;` - await pool.query(OpRemoveProposal) - - const OpUpdateProposal = `CREATE OR REPLACE VIEW hafsql.op_update_proposal - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'proposal_id'::text AS "proposal_id", - (o.body::jsonb -> 'value'::text) ->> 'creator'::text AS "creator", - (o.body::jsonb -> 'value'::text) ->> 'daily_pay'::text AS "daily_pay", - (o.body::jsonb -> 'value'::text) ->> 'subject'::text AS "subject", - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS "permlink", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 47;` - await pool.query(OpUpdateProposal) - - const OpCollateralizedConvert = `CREATE OR REPLACE VIEW hafsql.op_collateralized_convert - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS "owner", - (o.body::jsonb -> 'value'::text) ->> 'requestid'::text AS "requestid", - (o.body::jsonb -> 'value'::text) ->> 'amount'::text AS "amount" - FROM hive.operations o - WHERE o.op_type_id = 48;` - await pool.query(OpCollateralizedConvert) - - const OpRecurrentTransfer = `CREATE OR REPLACE VIEW hafsql.op_recurrent_transfer - AS SELECT o.id AS op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS "from", - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS "to", - (o.body::jsonb -> 'value'::text) ->> 'amount'::text AS "amount", - (o.body::jsonb -> 'value'::text) ->> 'memo'::text AS "memo", - (o.body::jsonb -> 'value'::text) ->> 'recurrence'::text AS "recurrence", - (o.body::jsonb -> 'value'::text) ->> 'executions'::text AS "executions", - (o.body::jsonb -> 'value'::text) ->> 'extensions'::text AS "extensions" - FROM hive.operations o - WHERE o.op_type_id = 49;` - await pool.query(OpRecurrentTransfer) -} - -export const removeOperationViews = async () => { - const dropViews = `DROP VIEW IF EXISTS - hafsql.op_vote, - hafsql.op_comment, - hafsql.op_transfer, - hafsql.op_transfer_to_vesting, - hafsql.op_withdraw_vesting, - hafsql.op_limit_order_create, - hafsql.op_limit_order_cancel, - hafsql.op_feed_publish, - hafsql.op_convert, - hafsql.op_account_create, - hafsql.op_account_update, - hafsql.op_witness_update, - hafsql.op_account_witness_vote, - hafsql.op_account_witness_proxy, - hafsql.op_pow, - hafsql.op_custom, - hafsql.op_delete_comment, - hafsql.op_custom_json, - hafsql.op_comment_options, - hafsql.op_setWithdraw_vesting_route, - hafsql.op_limit_order_create2, - hafsql.op_claim_account, - hafsql.op_create_claimed_account, - hafsql.op_request_account_recovery, - hafsql.op_recover_account, - hafsql.op_change_recovery_account, - hafsql.op_escrow_transfer, - hafsql.op_escrow_dispute, - hafsql.op_escrow_release, - hafsql.op_pow2, - hafsql.op_escrow_approve, - hafsql.op_transfer_to_savings, - hafsql.op_transfer_from_savings, - hafsql.op_cancel_transfer_from_savings, - hafsql.op_decline_voting_rights, - hafsql.op_claim_reward_balance, - hafsql.op_delegate_vesting_shares, - hafsql.op_account_create_with_delegation, - hafsql.op_witness_set_properties, - hafsql.op_account_update2, - hafsql.op_create_proposal, - hafsql.op_update_proposal_votes, - hafsql.op_remove_proposal, - hafsql.op_update_proposal, - hafsql.op_collateralized_convert, - hafsql.op_recurrent_transfer;` - await pool.query(dropViews) -} diff --git a/helpers/setups/schema.js b/helpers/setups/schema.js deleted file mode 100644 index e75dd5016fbf3630bd7ba155774b1ceace3f2589..0000000000000000000000000000000000000000 --- a/helpers/setups/schema.js +++ /dev/null @@ -1,6 +0,0 @@ -import { pool } from '../database.js' - -export const setupSchema = async () => { - const schema = 'CREATE SCHEMA IF NOT EXISTS hafsql;' - await pool.query(schema) -} diff --git a/helpers/setups/tables.js b/helpers/setups/tables.js deleted file mode 100644 index 4fe659128d45724ee824f89548bd5908209ca8ed..0000000000000000000000000000000000000000 --- a/helpers/setups/tables.js +++ /dev/null @@ -1,151 +0,0 @@ -import { pool } from '../database.js' - -export const setupTables = async () => { - // Sync data - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.sync_data ( - table_name varchar NOT NULL, - last_op_id int8 NOT NULL, - CONSTRAINT hafsql_sync_data_un UNIQUE (table_name) - );`) - await setupSyncDataTable() - - // Delegations - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.delegations_table ( - delegator varchar(16) NOT NULL, - delegatee varchar(16) NOT NULL, - vests varchar NOT NULL, - CONSTRAINT hafsql_delegations_table_un UNIQUE (delegator, delegatee) - );`) - - // RC Delegations - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.rc_delegations_table ( - delegator varchar(16) NOT NULL, - delegatee varchar(16) NOT NULL, - rc varchar NOT NULL, - CONSTRAINT hafsql_rc_delegations_table_un UNIQUE (delegator, delegatee) - );`) - - // Proposal Approvals - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.proposal_approvals_table ( - id int4 NOT NULL, - voter varchar(16) NOT NULL, - CONSTRAINT hafsql_proposal_approvals_table_un UNIQUE (id, voter) - );`) - - // Blacklists - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.blacklists_table ( - blacklister int4 NOT NULL, - blacklisted int4 NOT NULL, - CONSTRAINT hafsql_blacklists_table_un UNIQUE (blacklister, blacklisted) - );`) - - // Blacklist Follows - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.blacklist_follows_table ( - account int4 NOT NULL, - blacklist int4 NOT NULL, - CONSTRAINT hafsql_blacklist_follows_table_un UNIQUE (account, blacklist) - );`) - - // Mute - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.mutes_table ( - muter int4 NOT NULL, - muted int4 NOT NULL, - CONSTRAINT hafsql_mutes_table_un UNIQUE (muter, muted) - );`) - - // Mute Follows - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.mute_follows_table ( - account int4 NOT NULL, - mute_list int4 NOT NULL, - CONSTRAINT hafsql_mute_follows_table_un UNIQUE (account, mute_list) - );`) - - // Reblogs - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.reblogs_table ( - account int4 NOT NULL, - post int8 NOT NULL, - CONSTRAINT hafsql_reblogs_table_un UNIQUE (account, post) - );`) - - // Follows - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.follows_table ( - follower int4 NOT NULL, - following int4 NOT NULL, - CONSTRAINT hafsql_follows_table_un UNIQUE (follower, following) - );`) - - // Comments - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.comments_table ( - id serial4 NOT NULL, - body varchar NULL, - body_edited bool NULL DEFAULT false, - tags jsonb NULL, - author varchar(16) NOT NULL, - permlink varchar(255) NOT NULL, - parent_author varchar(16) NOT NULL, - parent_permlink varchar(255) NOT NULL, - last_op_id int8 NOT NULL, - created timestamp NOT NULL, - pending_payout_value numeric(12, 3) NULL DEFAULT 0, - deleted bool NULL DEFAULT false, - CONSTRAINT hafsql_comments_table_pk PRIMARY KEY (id), - CONSTRAINT hafsql_comments_table_un UNIQUE (author, permlink) - );`) - - // Community Roles - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.community_roles_table ( - account int4 NOT NULL, - community int4 NOT NULL, - "role" int2 NOT NULL DEFAULT 0, - title varchar NULL, - CONSTRAINT hafsql_community_roles_table_un UNIQUE (account, community) - );`) - - // Community Subs - await pool.query(`CREATE TABLE IF NOT EXISTS hafsql.community_subs_table ( - account int4 NOT NULL, - community int4 NOT NULL, - CONSTRAINT hafsql_community_subs_table_un UNIQUE (account, community) - );`) -} - -export const createLastIndexes = async () => { - await pool.query('CREATE INDEX IF NOT EXISTS hafsql_comments_table_pending_payout_value_idx ON hafsql.comments_table USING btree (pending_payout_value);') - await pool.query('CREATE INDEX IF NOT EXISTS hafsql_comments_table_tags_idx ON hafsql.comments_table USING gin (tags);') - await pool.query('CREATE INDEX IF NOT EXISTS hafsql_comments_table_parent_author_parent_permlink_idx ON hafsql.comments_table USING btree (parent_author, parent_permlink);') - await pool.query('CREATE INDEX IF NOT EXISTS hafsql_reblogs_table_post_idx ON hafsql.reblogs_table USING btree (post);') - await pool.query('CREATE INDEX IF NOT EXISTS hafsql_proposal_approvals_voter_idx ON hafsql.proposal_approvals_table USING btree (voter);') - await pool.query( - 'CREATE INDEX IF NOT EXISTS hafsql_rc_delegations_table_delegatee_idx ON hafsql.rc_delegations_table USING btree (delegatee);' - ) - await pool.query( - 'CREATE INDEX IF NOT EXISTS hafsql_delegations_table_delegatee_idx ON hafsql.delegations_table USING btree (delegatee);' - ) -} - -const setupSyncDataTable = async () => { - const tableNames = [ - 'delegations', - 'rc_delegations', - 'proposal_approvals', - 'follows', - 'comments', - 'rewards', - 'reblogs', - 'communities', - 'delete_comments' - ] - for (let i = 0; i < tableNames.length; i++) { - const name = tableNames[i] - const data = await pool.query( - 'SELECT last_op_id FROM hafsql.sync_data WHERE table_name = $1', - [name] - ) - if (!data.rowCount) { - await pool.query( - 'INSERT INTO hafsql.sync_data(table_name, last_op_id) VALUES($1, $2)', - [name, 0] - ) - } - } -} diff --git a/helpers/setups/virtualOperations.js b/helpers/setups/virtualOperations.js deleted file mode 100644 index bf09bffdb76ef4d897c89ea597062a7920d81031..0000000000000000000000000000000000000000 --- a/helpers/setups/virtualOperations.js +++ /dev/null @@ -1,559 +0,0 @@ -import { pool } from '../database.js' - -export const setupVirtualOperationViews = async () => { - // The order of VOps can change on HF so we have to update them - const OPs = 49 - // +1 - const VOFillConvertRequest = `CREATE OR REPLACE VIEW hafsql.vo_fill_convert_request - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS owner, - (o.body::jsonb -> 'value'::text) ->> 'requestid'::text AS requestid, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'amount_in'::text) AS amount_in, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'amount_in'::text) AS amount_in_symbol, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'amount_out'::text) AS amount_out, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'amount_out'::text) AS amount_out_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 1;` - await pool.query(VOFillConvertRequest) - - // +2 - const VOAuthorReward = `CREATE OR REPLACE VIEW hafsql.vo_author_reward - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'author'::text AS author, - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS permlink, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hbd_payout'::text) AS hbd_payout, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hive_payout'::text) AS hive_payout, - (o.body::jsonb -> 'value'::text) ->> 'vesting_payout'::text AS vesting_payout, - (o.body::jsonb -> 'value'::text) ->> 'curators_vesting_payout'::text AS curators_vesting_payout, - (o.body::jsonb -> 'value'::text) ->> 'payout_must_be_claimed'::text AS payout_must_be_claimed - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 2;` - await pool.query(VOAuthorReward) - - // +3 - const VOCurationReward = `CREATE OR REPLACE VIEW hafsql.vo_curation_reward - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'curator'::text AS curator, - (o.body::jsonb -> 'value'::text) ->> 'reward'::text AS reward, - (o.body::jsonb -> 'value'::text) ->> 'comment_author'::text AS comment_author, - (o.body::jsonb -> 'value'::text) ->> 'comment_permlink'::text AS comment_permlink, - (o.body::jsonb -> 'value'::text) ->> 'payout_must_be_claimed'::text AS payout_must_be_claimed - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 3;` - await pool.query(VOCurationReward) - - // +4 - const VOCommentReward = `CREATE OR REPLACE VIEW hafsql.vo_comment_reward - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'author'::text AS author, - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS permlink, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'payout'::text) AS payout, - (o.body::jsonb -> 'value'::text) ->> 'author_rewards'::text AS author_rewards, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'total_payout_value'::text) AS total_payout_value, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'curator_payout_value'::text) AS curator_payout_value, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'beneficiary_payout_value'::text) AS beneficiary_payout_value - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 4;` - await pool.query(VOCommentReward) - - // +5 - const VOLiquidityReward = `CREATE OR REPLACE VIEW hafsql.vo_liquidity_reward - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS owner, - (o.body::jsonb -> 'value'::text) ->> 'payout'::text AS payout - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 5;` - await pool.query(VOLiquidityReward) - - // +6 - const VOInterestOperation = `CREATE OR REPLACE VIEW hafsql.vo_interest_operation - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS owner, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'interest'::text) AS interest, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'interest'::text) AS interest_symbol, - (o.body::jsonb -> 'value'::text) ->> 'is_saved_into_hbd_balance'::text AS is_saved_into_hbd_balance - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 6;` - await pool.query(VOInterestOperation) - - // +7 - const VOFillVestingWithdraw = `CREATE OR REPLACE VIEW hafsql.vo_fill_vesting_withdraw - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from_account'::text AS from_account, - (o.body::jsonb -> 'value'::text) ->> 'to_account'::text AS to_account, - (o.body::jsonb -> 'value'::text) ->> 'withdrawn'::text AS withdrawn, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'deposited'::text) AS deposited, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'deposited'::text) AS deposited_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 7;` - await pool.query(VOFillVestingWithdraw) - - // +8 - const VOFillOrder = `CREATE OR REPLACE VIEW hafsql.vo_fill_order - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'current_owner'::text AS current_owner, - (o.body::jsonb -> 'value'::text) ->> 'open_owner'::text AS open_owner, - (o.body::jsonb -> 'value'::text) ->> 'current_orderid'::text AS current_orderid, - (o.body::jsonb -> 'value'::text) ->> 'open_orderid'::text AS open_orderid, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'current_pays'::text) AS current_pays, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'current_pays'::text) AS current_pays_symbol, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'open_pays'::text) AS open_pays, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'open_pays'::text) AS open_pays_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 8;` - await pool.query(VOFillOrder) - - // +9 - const VOShutdownWitness = `CREATE OR REPLACE VIEW hafsql.vo_shutdown_witness - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS owner - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 9;` - await pool.query(VOShutdownWitness) - - // +10 - const VOFillTransferFromSavings = `CREATE OR REPLACE VIEW hafsql.vo_fill_transfer_from_savings - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS from, - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS to, - (o.body::jsonb -> 'value'::text) ->> 'request_id'::text AS request_id, - (o.body::jsonb -> 'value'::text) ->> 'memo'::text AS memo, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'amount'::text) AS amount, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'amount'::text) AS amount_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 10;` - await pool.query(VOFillTransferFromSavings) - - // +11 - const VOHardfork = `CREATE OR REPLACE VIEW hafsql.vo_hardfork - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'hardfork_id'::text AS hardfork_id - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 11;` - await pool.query(VOHardfork) - - // +12 - const VOCommentPayoutUpdate = `CREATE OR REPLACE VIEW hafsql.vo_comment_payout_update - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'author'::text AS author, - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS permlink - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 12;` - await pool.query(VOCommentPayoutUpdate) - - // +13 - const VOReturnVestingDelegation = `CREATE OR REPLACE VIEW hafsql.vo_return_vesting_delegation - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS account, - (o.body::jsonb -> 'value'::text) ->> 'vesting_shares'::text AS vesting_shares - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 13;` - await pool.query(VOReturnVestingDelegation) - - // +14 - const VOCommentBenefactorReward = `CREATE OR REPLACE VIEW hafsql.vo_comment_benefactor_reward - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'benefactor'::text AS benefactor, - (o.body::jsonb -> 'value'::text) ->> 'author'::text AS author, - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS permlink, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hbd_payout'::text) AS hbd_payout, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'hbd_payout'::text) AS hbd_payout_symbol, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hive_payout'::text) AS hive_payout, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'hive_payout'::text) AS hive_payout_symbol, - (o.body::jsonb -> 'value'::text) ->> 'vesting_payout'::text AS vesting_payout, - (o.body::jsonb -> 'value'::text) ->> 'payout_must_be_claimed'::text AS payout_must_be_claimed - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 14;` - await pool.query(VOCommentBenefactorReward) - - // +15 - const VOProducerReward = `CREATE OR REPLACE VIEW hafsql.vo_producer_reward - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'producer'::text AS producer, - (o.body::jsonb -> 'value'::text) ->> 'vesting_shares'::text AS vesting_shares - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 15;` - await pool.query(VOProducerReward) - - // +16 - const VOClearNullAccountBalance = `CREATE OR REPLACE VIEW hafsql.vo_clear_null_account_balance - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'total_cleared'::text AS total_cleared - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 16;` - await pool.query(VOClearNullAccountBalance) - - // +17 - skipped trx_id & op_in_trx - redundant - const VOProposalPay = `CREATE OR REPLACE VIEW hafsql.vo_proposal_pay - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'proposal_id'::text AS proposal_id, - (o.body::jsonb -> 'value'::text) ->> 'receiver'::text AS receiver, - (o.body::jsonb -> 'value'::text) ->> 'payer'::text AS payer, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'payment'::text) AS payment, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'payment'::text) AS payment_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 17;` - await pool.query(VOProposalPay) - - // +18 - const VODHFFunding = `CREATE OR REPLACE VIEW hafsql.vo_dhf_funding - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'treasury'::text AS treasury, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'additional_funds'::text) AS additional_funds, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'additional_funds'::text) AS additional_funds_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 18;` - await pool.query(VODHFFunding) - - // +19 - const VOHardforkHive = `CREATE OR REPLACE VIEW hafsql.vo_hardfork_hive - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS account, - (o.body::jsonb -> 'value'::text) ->> 'treasury'::text AS treasury, - (o.body::jsonb -> 'value'::text) ->> 'other_affected_accounts'::text AS other_affected_accounts, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hbd_transferred'::text) AS hbd_transferred, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hive_transferred'::text) AS hive_transferred, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'total_hive_from_vests'::text) AS total_hive_from_vests, - (o.body::jsonb -> 'value'::text) ->> 'vests_converted'::text AS vests_converted - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 19;` - await pool.query(VOHardforkHive) - - // +20 - const VOHardforkHiveRestore = `CREATE OR REPLACE VIEW hafsql.vo_hardfork_hive_restore - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS account, - (o.body::jsonb -> 'value'::text) ->> 'treasury'::text AS treasury, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hbd_transferred'::text) AS hbd_transferred, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hive_transferred'::text) AS hive_transferred - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 20;` - await pool.query(VOHardforkHiveRestore) - - // +21 - const VODelayedVoting = `CREATE OR REPLACE VIEW hafsql.vo_delayed_voting - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'voter'::text AS voter, - (o.body::jsonb -> 'value'::text) ->> 'votes'::text AS votes - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 21;` - await pool.query(VODelayedVoting) - - // +22 - const VOConsolidateTreasuryBalance = `CREATE OR REPLACE VIEW hafsql.vo_consolidate_treasury_balance - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'total_moved'::text AS total_moved - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 22;` - await pool.query(VOConsolidateTreasuryBalance) - - // +23 - const VOEffectiveCommentVote = `CREATE OR REPLACE VIEW hafsql.vo_effective_comment_vote - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'voter'::text AS voter, - (o.body::jsonb -> 'value'::text) ->> 'author'::text AS author, - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS permlink, - (o.body::jsonb -> 'value'::text) ->> 'weight'::text AS weight, - (o.body::jsonb -> 'value'::text) ->> 'rshares'::text AS rshares, - (o.body::jsonb -> 'value'::text) ->> 'total_vote_weight'::text AS total_vote_weight, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'pending_payout'::text) AS pending_payout, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'pending_payout'::text) AS pending_payout_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 23;` - await pool.query(VOEffectiveCommentVote) - - // +24 - const VOIneffectiveDeleteComment = `CREATE OR REPLACE VIEW hafsql.vo_ineffective_delete_comment - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'author'::text AS author, - (o.body::jsonb -> 'value'::text) ->> 'permlink'::text AS permlink - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 24;` - await pool.query(VOIneffectiveDeleteComment) - - // +25 - const VODHFConversion = `CREATE OR REPLACE VIEW hafsql.vo_dhf_conversion - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'treasury'::text AS treasury, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hive_amount_in'::text) AS hive_amount_in, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hbd_amount_out'::text) AS hbd_amount_out - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 25;` - await pool.query(VODHFConversion) - - // +26 - const VOExpiredAccountNotification = `CREATE OR REPLACE VIEW hafsql.vo_expired_account_notification - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS account - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 26;` - await pool.query(VOExpiredAccountNotification) - - // +27 - const VOChangedRecoveryAccount = `CREATE OR REPLACE VIEW hafsql.vo_changed_recovery_account - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS account, - (o.body::jsonb -> 'value'::text) ->> 'old_recovery_account'::text AS old_recovery_account, - (o.body::jsonb -> 'value'::text) ->> 'new_recovery_account'::text AS new_recovery_account - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 27;` - await pool.query(VOChangedRecoveryAccount) - - // +28 - const VOTransferToVestingCompleted = `CREATE OR REPLACE VIEW hafsql.vo_transfer_to_vesting_completed - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from_account'::text AS from_account, - (o.body::jsonb -> 'value'::text) ->> 'to_account'::text AS to_account, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hive_vested'::text) AS hive_vested, - (o.body::jsonb -> 'value'::text) ->> 'vesting_shares_received'::text AS vesting_shares_received - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 28;` - await pool.query(VOTransferToVestingCompleted) - - // +29 - const VOPowReward = `CREATE OR REPLACE VIEW hafsql.vo_pow_reward - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'worker'::text AS worker, - (o.body::jsonb -> 'value'::text) ->> 'reward'::text AS reward - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 29;` - await pool.query(VOPowReward) - - // +30 - const VOVestingSharesSplit = `CREATE OR REPLACE VIEW hafsql.vo_vesting_shares_split - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS owner, - (o.body::jsonb -> 'value'::text) ->> 'vesting_shares_before_split'::text AS vesting_shares_before_split, - (o.body::jsonb -> 'value'::text) ->> 'vesting_shares_after_split'::text AS vesting_shares_after_split - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 30;` - await pool.query(VOVestingSharesSplit) - - // +31 - const VOAccountCreated = `CREATE OR REPLACE VIEW hafsql.vo_account_created - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'new_account_name'::text AS new_account_name, - (o.body::jsonb -> 'value'::text) ->> 'creator'::text AS creator, - (o.body::jsonb -> 'value'::text) ->> 'initial_vesting_shares'::text AS initial_vesting_shares, - (o.body::jsonb -> 'value'::text) ->> 'initial_delegation'::text AS initial_delegation - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 31;` - await pool.query(VOAccountCreated) - - // +32 - const VOFillCollateralizedConvertRequest = `CREATE OR REPLACE VIEW hafsql.vo_fill_collateralized_convert_request - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS owner, - (o.body::jsonb -> 'value'::text) ->> 'requestid'::text AS requestid, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'amount_in'::text) AS amount_in, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'amount_in'::text) AS amount_in_symbol, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'amount_out'::text) AS amount_out, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'amount_out'::text) AS amount_out_symbol, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'excess_collateral'::text) AS excess_collateral, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'excess_collateral'::text) AS excess_collateral_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 32;` - await pool.query(VOFillCollateralizedConvertRequest) - - // +33 - const VOSystemWarningOperation = `CREATE OR REPLACE VIEW hafsql.vo_system_warning_operation - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'message'::text AS message - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 33;` - await pool.query(VOSystemWarningOperation) - - // +34 - const VOFillRecurrentTransfer = `CREATE OR REPLACE VIEW hafsql.vo_fill_recurrent_transfer - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS from, - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS to, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'amount'::text) AS amount, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'amount'::text) AS amount_symbol, - (o.body::jsonb -> 'value'::text) ->> 'memo'::text AS memo, - (o.body::jsonb -> 'value'::text) ->> 'remaining_executions'::text AS remaining_executions - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 34;` - await pool.query(VOFillRecurrentTransfer) - - // +35 - const VOFailedRecurrentTransfer = `CREATE OR REPLACE VIEW hafsql.vo_failed_recurrent_transfer - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS from, - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS to, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'amount'::text) AS amount, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'amount'::text) AS amount_symbol, - (o.body::jsonb -> 'value'::text) ->> 'memo'::text AS memo, - (o.body::jsonb -> 'value'::text) ->> 'consecutive_failures'::text AS consecutive_failures, - (o.body::jsonb -> 'value'::text) ->> 'remaining_executions'::text AS remaining_executions, - (o.body::jsonb -> 'value'::text) ->> 'deleted'::text AS deleted - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 35;` - await pool.query(VOFailedRecurrentTransfer) - - // +36 - const VOLimitOrderCancelled = `CREATE OR REPLACE VIEW hafsql.vo_limit_order_cancelled - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'seller'::text AS seller, - (o.body::jsonb -> 'value'::text) ->> 'orderid'::text AS orderid, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'amount_back'::text) AS amount_back, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'amount_back'::text) AS amount_back_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 36;` - await pool.query(VOLimitOrderCancelled) - - // +37 - const VOProducerMissed = `CREATE OR REPLACE VIEW hafsql.vo_producer_missed - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'producer'::text AS producer - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 37;` - await pool.query(VOProducerMissed) - - // +38 - const VOProposalFee = `CREATE OR REPLACE VIEW hafsql.vo_proposal_fee - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'creator'::text AS creator, - (o.body::jsonb -> 'value'::text) ->> 'treasury'::text AS treasury, - (o.body::jsonb -> 'value'::text) ->> 'proposal_id'::text AS proposal_id, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'fee'::text) AS fee, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'fee'::text) AS fee_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 38;` - await pool.query(VOProposalFee) - - // +39 - const VOCollateralizedConvertImmediateConversion = `CREATE OR REPLACE VIEW hafsql.vo_collateralized_convert_immediate_conversion - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'owner'::text AS owner, - (o.body::jsonb -> 'value'::text) ->> 'requestid'::text AS requestid, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hbd_out'::text) AS hbd_out, - hafsql_assetsymbol((o.body::jsonb -> 'value'::text) ->> 'hbd_out'::text) AS hbd_out_symbol - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 39;` - await pool.query(VOCollateralizedConvertImmediateConversion) - - // +40 - const VOEscrowApproved = `CREATE OR REPLACE VIEW hafsql.vo_escrow_approved - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS from, - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS to, - (o.body::jsonb -> 'value'::text) ->> 'agent'::text AS agent, - (o.body::jsonb -> 'value'::text) ->> 'escrow_id'::text AS escrow_id, - (o.body::jsonb -> 'value'::text) ->> 'fee'::text AS fee - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 40;` - await pool.query(VOEscrowApproved) - - // +41 - const VOEscrowRejected = `CREATE OR REPLACE VIEW hafsql.vo_escrow_rejected - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'from'::text AS from, - (o.body::jsonb -> 'value'::text) ->> 'to'::text AS to, - (o.body::jsonb -> 'value'::text) ->> 'agent'::text AS agent, - (o.body::jsonb -> 'value'::text) ->> 'escrow_id'::text AS escrow_id, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hbd_amount'::text) AS hbd_amount, - hafsql_assetamount((o.body::jsonb -> 'value'::text) ->> 'hive_amount'::text) AS hive_amount, - (o.body::jsonb -> 'value'::text) ->> 'fee'::text AS fee - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 41;` - await pool.query(VOEscrowRejected) - - // +42 - const VOProxyCleared = `CREATE OR REPLACE VIEW hafsql.vo_proxy_cleared - AS SELECT o.id as op_id, - o."timestamp", - (o.body::jsonb -> 'value'::text) ->> 'account'::text AS account, - (o.body::jsonb -> 'value'::text) ->> 'proxy'::text AS proxy - FROM hive.operations o - WHERE o.op_type_id = ${OPs} + 42;` - await pool.query(VOProxyCleared) -} - -export const removeVirtualOperationViews = async () => { - const dropViews = `DROP VIEW IF EXISTS - hafsql.vo_fill_convert_request, - hafsql.vo_author_reward, - hafsql.vo_curation_reward, - hafsql.vo_comment_reward, - hafsql.vo_liquidity_reward, - hafsql.vo_interest_operation, - hafsql.vo_fill_vesting_withdraw, - hafsql.vo_fill_order, - hafsql.vo_shutdown_witness, - hafsql.vo_fill_transfer_from_savings, - hafsql.vo_hardfork, - hafsql.vo_comment_payout_update, - hafsql.vo_return_vesting_delegation, - hafsql.vo_comment_benefactor_reward, - hafsql.vo_producer_reward, - hafsql.vo_clear_null_account_balance, - hafsql.vo_proposal_pay, - hafsql.vo_dhf_funding, - hafsql.vo_hardfork_hive, - hafsql.vo_hardfork_hive_restore, - hafsql.vo_delayed_voting, - hafsql.vo_consolidate_treasury_balance, - hafsql.vo_effective_comment_vote, - hafsql.vo_ineffective_delete_comment, - hafsql.vo_dhf_conversion, - hafsql.vo_expired_account_notification, - hafsql.vo_changed_recovery_account, - hafsql.vo_transfer_to_vesting_completed, - hafsql.vo_pow_reward, - hafsql.vo_vesting_shares_split, - hafsql.vo_account_created, - hafsql.vo_fill_collateralized_convert_request, - hafsql.vo_system_warning_operation, - hafsql.vo_fill_recurrent_transfer, - hafsql.vo_failed_recurrent_transfer, - hafsql.vo_limit_order_cancelled, - hafsql.vo_producer_missed, - hafsql.vo_proposal_fee, - hafsql.vo_collateralized_convert_immediate_conversion, - hafsql.vo_escrow_approved, - hafsql.vo_escrow_rejected, - hafsql.vo_proxy_cleared;` - await pool.query(dropViews) -} diff --git a/helpers/syncs/comments.js b/helpers/syncs/comments.js deleted file mode 100644 index 2b298b4658490fa223c7bf8505330284e98b851f..0000000000000000000000000000000000000000 --- a/helpers/syncs/comments.js +++ /dev/null @@ -1,165 +0,0 @@ -import { pool } from '../database.js' -import DiffMatchPatch from 'diff-match-patch' - -let commentsArray = [] - -export const syncComments = async () => { - const intervalTime = 3000 - setInterval(() => { - fillComments(1000) - }, intervalTime) -} - -// 65535 / 7 = ~9000 -// postgres parameters limit = 65535 - -export const fillComments = async (limit = 20000) => { - let start = await pool.query( - 'SELECT last_op_id FROM hafsql.sync_data WHERE table_name=$1;', - ['comments'] - ) - start = start.rows[0].last_op_id - let comments = await getComments(start, limit) - while (comments.rowCount > 0) { - await insertComments(comments.rows) - start = comments.rows[comments.rowCount - 1].op_id - await updateLastOpId(start) - comments = await getComments(start, limit) - } -} - -const getComments = async (start, limit = 10000) => { - return pool.query( - `SELECT op_id, "timestamp", author, permlink, parent_author, parent_permlink, title, body, json_metadata - FROM hafsql.op_comment WHERE op_id > $1 ORDER BY op_id ASC LIMIT $2`, - [start, limit] - ) -} - -const insertComments = async (items) => { - commentsArray = [] - for (let i = 0; i < items.length; i++) { - const item = items[i] - item.bodyEdited = false - const json = item.json_metadata - item.tags = getTags(json) - await commentsHelper(item) - } - const params = [[], [], [], [], [], [], [], [], []] - for (let i = 0; i < commentsArray.length; i++) { - const comment = commentsArray[i] - const body = comment.bodyEdited ? comment.body : '' - params[0].push(comment.author) - params[1].push(comment.permlink) - params[2].push(comment.parent_author) - params[3].push(comment.parent_permlink) - params[4].push(comment.op_id) - params[5].push(comment.bodyEdited) - params[6].push(cleanString(body)) - params[7].push(JSON.stringify(comment.tags)) - params[8].push(comment.timestamp) - } - if (params[0].length > 0) { - await pool.query(`INSERT INTO hafsql.comments_table (author, permlink, parent_author, parent_permlink, last_op_id, body_edited, body, tags, created) - SELECT * FROM UNNEST ($1::text[], $2::text[], $3::text[], $4::text[], $5::int8[], $6::bool[], $7::text[], $8::jsonb[], $9::timestamp[]) - ON CONFLICT ON CONSTRAINT hafsql_comments_table_un DO NOTHING;`, params) - } -} - -const commentsHelper = async (item) => { - try { - for (let i = 0; i < commentsArray.length; i++) { - if ( - commentsArray[i].author === item.author && - commentsArray[i].permlink === item.permlink - ) { - const oldBody = commentsArray[i].body - if (item.body.length > 0 && item.body !== oldBody) { - const editedBody = patchBody(oldBody, item.body) - commentsArray[i].body = editedBody - commentsArray[i].bodyEdited = true - } - commentsArray[i].op_id = item.op_id - return - } - } - const comment = await pool.query( - 'SELECT id, body_edited, last_op_id, body FROM hafsql.comments_table WHERE author=$1 AND permlink=$2;', - [item.author, item.permlink] - ) - if (comment.rowCount > 0) { - let oldBody = '' - if (comment.rows[0].body_edited === true) { - oldBody = comment.rows[0].body - } else { - const temp = await pool.query('SELECT body FROM hafsql.op_comment WHERE author=$1 AND permlink=$2 ORDER BY op_id ASC LIMIT 1', [item.author, item.permlink]) - oldBody = temp.rows[0].body - } - let extraQuery = '' - const params = [JSON.stringify(item.tags), item.op_id, comment.rows[0].id] - if (item.body.length > 0 && item.body !== oldBody) { - const editedBody = patchBody(oldBody, item.body) - extraQuery = ', body=$4, body_edited=$5' - params.push(cleanString(editedBody), true) - } - return pool.query(`UPDATE hafsql.comments_table SET tags=$1, last_op_id=$2 ${extraQuery}WHERE id=$3`, params) - } - commentsArray.push(item) - } catch (e) { - throw new Error(e) - } -} - -const getTags = (jsonMetadata) => { - try { - const temp = [] - if (typeof jsonMetadata === 'string' && jsonMetadata.length > 0) { - const parsedJson = JSON.parse(jsonMetadata) - if (Object.hasOwn(parsedJson, 'tags')) { - const tags = parsedJson.tags - if (Array.isArray(tags)) { - for (let i = 0; i < tags.length; i++) { - if (tags[i].length <= 24) { - temp.push(cleanString(tags[i])) - } - if (i > 10) { - break - } - } - } - } - } - return temp - } catch { - return [] - } -} - -// Charcode 0 is invalid for Postgres -const cleanString = (input) => { - let output = '' - for (let i = 0; i < input.length; i++) { - if (input.charCodeAt(i) !== 0) { - output += input.charAt(i) - } - } - return output -} - -const patchBody = (oldBody, newBody) => { - try { - const dmp = new DiffMatchPatch() - const patch = dmp.patch_fromText(newBody) - const [temp] = dmp.patch_apply(patch, oldBody) - return temp - } catch { - return newBody - } -} - -const updateLastOpId = async (opId) => { - return pool.query( - 'UPDATE hafsql.sync_data SET last_op_id=$1 WHERE table_name=$2;', - [opId, 'comments'] - ) -} diff --git a/helpers/syncs/communities.js b/helpers/syncs/communities.js deleted file mode 100644 index 06d3b7e87cb8569e0a87287b6edbe89b6660208c..0000000000000000000000000000000000000000 --- a/helpers/syncs/communities.js +++ /dev/null @@ -1,276 +0,0 @@ -import { pool } from '../database.js' -import { clearUsername, validateAccountName } from '../validateUsername.js' - -let accountCache = {} -let useCache = true - -const roles = { - muted: -2, - guest: 0, - member: 2, - mod: 4, - admin: 6, - owner: 8 -} - -export const syncCommunities = async () => { - useCache = false - accountCache = {} - const intervalTime = 3000 - setInterval(() => { - fillCommunities(1000) - }, intervalTime) -} - -export const fillCommunities = async (limit = 20000) => { - let start = await pool.query( - 'SELECT last_op_id FROM hafsql.sync_data WHERE table_name=$1;', - ['communities'] - ) - start = start.rows[0].last_op_id - let communities = await getCommunities(start, limit) - while (communities.length > 0) { - await insertCommunities(communities) - start = communities[communities.length - 1].op_id - await updateLastOpId(start) - communities = await getCommunities(start, limit) - } - accountCache = {} -} - -const getCommunities = async (start, limit = 10000) => { - const result = await pool.query( - `SELECT op_id, json, required_posting_auths FROM hafsql.op_custom_json - WHERE id=$1 AND op_id > $2 ORDER BY op_id ASC LIMIT $3`, - ['community', start, limit] - ) - if (result.rowCount <= 0) { - return [] - } - const communitiesArray = [] - for (let i = 0; i < result.rowCount; i++) { - const customJson = result.rows[i] - try { - const parsedJson = JSON.parse(customJson.json) - const postingAuths = customJson.required_posting_auths - if (postingAuths.length < 1) { - continue - } - if (!Array.isArray(parsedJson)) { - continue - } - if (parsedJson.length !== 2) { - continue - } - if (typeof parsedJson[0] !== 'string') { - continue - } - if (typeof parsedJson[1] !== 'object') { - continue - } - if (!Object.hasOwn(parsedJson[1], 'community')) { - continue - } - const { community } = parsedJson[1] - if (validateAccountName(clearUsername(community))) { - continue - } - if (!community.match(/^hive-[1]\d{4,6}$/)) { - continue - } - const accountId = await getUserId(community) - if (!accountId) { - continue - } - communitiesArray.push({ - type: parsedJson[0], - json: parsedJson[1], - postingAuths, - op_id: customJson.op_id - }) - } catch (e) { - continue - } - } - return communitiesArray -} - -const insertCommunities = async (communities) => { - for (let i = 0; i < communities.length; i++) { - const { json, postingAuths, type } = communities[i] - switch (type) { - case 'subscribe': - await subscribe(postingAuths, json) - break - case 'unsubscribe': - await unsubscribe(postingAuths, json) - break - case 'setRole': - await setRole(postingAuths, json) - break - case 'setUserTitle': - await setUserTitle(postingAuths, json) - break - default: - break - } - } -} - -const subscribe = async (postingAuths, json) => { - if (Object.keys(json).length !== 1) { - return - } - const account = await getUserId(postingAuths[0]) - const community = await getUserId(json.community) - await pool.query( - `INSERT INTO hafsql.community_subs_table (account, community) - VALUES($1, $2) ON CONFLICT ON CONSTRAINT hafsql_community_subs_table_un - DO NOTHING;`, - [account, community] - ) -} - -const unsubscribe = async (postingAuths, json) => { - if (Object.keys(json).length !== 1) { - return - } - const account = await getUserId(postingAuths[0]) - const community = await getUserId(json.community) - await pool.query( - 'DELETE FROM hafsql.community_subs_table WHERE account=$1 AND community=$2', - [account, community] - ) -} - -const setRole = async (postingAuths, json) => { - if (Object.keys(json).length !== 3) { - return - } - if (!Object.hasOwn(json, 'account') || !Object.hasOwn(json, 'role')) { - return - } - const actor = await getUserId(postingAuths[0]) - const community = await getUserId(json.community) - const target = await getUserId(json.account) - if (!target) { - return - } - const role = json.role - if (Object.keys(roles).indexOf(role) < 0) { - return - } - let actorRole = await getRole(actor, community) - if (actor === community) { - actorRole = roles.owner - } - // only mods and up can alter roles - if (actorRole < roles.mod) { - return - } - // cannot promote to or above own rank - if (actorRole <= roles[role]) { - return - } - const targetRole = await getRole(target, community) - // don't change the owner role - if (targetRole === roles.owner) { - return - } - if (actor !== target) { - // cant modify higher-role user - if (targetRole >= actorRole) { - return - } - // role would not change - if (targetRole === roles[role]) { - return - } - } - await pool.query( - `INSERT INTO hafsql.community_roles_table (account, community, role) - VALUES($1, $2, $3) ON CONFLICT ON CONSTRAINT hafsql_community_roles_table_un - DO UPDATE SET role=$3;`, - [target, community, roles[role]] - ) -} - -const setUserTitle = async (postingAuths, json) => { - if (Object.keys(json).length !== 3) { - return - } - if (!Object.hasOwn(json, 'account') || !Object.hasOwn(json, 'title')) { - return - } - const actor = await getUserId(postingAuths[0]) - const community = await getUserId(json.community) - const target = await getUserId(json.account) - if (!target) { - return - } - if (typeof json.title !== 'string') { - return - } - const title = cleanString(json.title) - let actorRole = await getRole(actor, community) - if (actor === community) { - actorRole = roles.owner - } - // only mods can set user titles - if (actorRole < roles.mod) { - return - } - await pool.query( - `INSERT INTO hafsql.community_roles_table (account, community, title) - VALUES($1, $2, $3) ON CONFLICT ON CONSTRAINT hafsql_community_roles_table_un - DO UPDATE SET title=$3;`, - [target, community, title] - ) -} - -// Charcode 0 is invalid for Postgres -const cleanString = (input) => { - let output = '' - for (let i = 0; i < input.length; i++) { - if (input.charCodeAt(i) !== 0) { - output += input.charAt(i) - } - } - return output -} - -const getRole = async (account, community) => { - const res = await pool.query( - 'SELECT role FROM hafsql.community_roles_table WHERE account=$1 AND community=$2', - [account, community] - ) - if (res.rowCount < 1) { - return 0 - } - return res.rows[0].role -} - -// Caching ids for duration of the sync -const getUserId = async (username) => { - if (useCache && Object.hasOwn(accountCache, username)) { - return accountCache[username] - } else { - const getId = await pool.query( - 'SELECT a.id FROM hive.accounts a WHERE a.name=$1', - [username] - ) - if (getId.rowCount < 1) { - return null - } - const id = getId.rows[0].id - accountCache[username] = id - return id - } -} - -const updateLastOpId = async (opId) => { - return pool.query( - 'UPDATE hafsql.sync_data SET last_op_id=$1 WHERE table_name=$2;', - [opId, 'communities'] - ) -} diff --git a/helpers/syncs/delegations.js b/helpers/syncs/delegations.js deleted file mode 100644 index 41df851a70fed6f2aa69d4c89c3aefc72903130c..0000000000000000000000000000000000000000 --- a/helpers/syncs/delegations.js +++ /dev/null @@ -1,63 +0,0 @@ -import { pool } from '../database.js' - -export const syncDelegations = async () => { - const intervalTime = 3000 - setInterval(() => { - fillDelegations(1000) - }, intervalTime) -} - -export const fillDelegations = async (limit = 20000) => { - let start = await pool.query( - 'SELECT last_op_id FROM hafsql.sync_data WHERE table_name=$1;', - ['delegations'] - ) - start = start.rows[0].last_op_id - let delegations = await getDelegations(start, limit) - let i = 0 - while (delegations.rowCount > 0) { - await insertDelegations(delegations.rows[i]) - i++ - if (i >= delegations.rowCount) { - i = 0 - const start = delegations.rows[delegations.rowCount - 1].op_id - await updateLastOpId(start) - delegations = await getDelegations(start, limit) - } - } -} - -const getDelegations = async (start, limit = 10000) => { - return pool.query( - `SELECT op_id, delegator, delegatee, vesting_shares FROM hafsql.op_delegate_vesting_shares - WHERE op_id > $1 ORDER BY op_id ASC LIMIT $2`, - [start, limit] - ) -} - -const insertDelegations = async (delegation) => { - const { delegator, delegatee } = delegation - const vestingShares = delegation.vesting_shares - let vests = JSON.parse(vestingShares).amount - if (vests === '0') { - return pool.query( - `DELETE FROM hafsql.delegations_table - WHERE delegator=$1 AND delegatee=$2;`, - [delegator, delegatee] - ) - } - vests = vests.slice(0, -6) + '.' + vests.slice(-6) - return pool.query( - `INSERT INTO hafsql.delegations_table (delegator, delegatee, vests) - VALUES ($1, $2, $3) ON CONFLICT ON CONSTRAINT hafsql_delegations_table_un - DO UPDATE SET vests=$3;`, - [delegator, delegatee, vests] - ) -} - -const updateLastOpId = async (opId) => { - return pool.query( - 'UPDATE hafsql.sync_data SET last_op_id=$1 WHERE table_name=$2;', - [opId, 'delegations'] - ) -} diff --git a/helpers/syncs/deleteComments.js b/helpers/syncs/deleteComments.js deleted file mode 100644 index 12f55788de855e18b8e18a1442b67ccd4b2d88de..0000000000000000000000000000000000000000 --- a/helpers/syncs/deleteComments.js +++ /dev/null @@ -1,79 +0,0 @@ -import { pool } from '../database.js' - -let filling = true - -export const syncDeleteComments = async () => { - const intervalTime = 3000 - filling = false - notDeletedComments = [] - setInterval(() => { - fillDeleteComments(1000) - }, intervalTime) -} - -export const fillDeleteComments = async (limit = 20000) => { - if (filling) { - await getIneffectiveDeleteComments() - } - let start = await pool.query( - 'SELECT last_op_id FROM hafsql.sync_data WHERE table_name=$1;', - ['delete_comments'] - ) - start = start.rows[0].last_op_id - let deletedCms = await getDeleteComments(start, limit) - let i = 0 - while (deletedCms.rowCount > 0) { - await insertDeleteComments(deletedCms.rows[i]) - i++ - if (i >= deletedCms.rowCount) { - i = 0 - const start = deletedCms.rows[deletedCms.rowCount - 1].op_id - await updateLastOpId(start) - deletedCms = await getDeleteComments(start, limit) - } - } -} - -const getDeleteComments = async (start, limit = 10000) => { - return pool.query( - `SELECT op_id, author, permlink FROM hafsql.op_delete_comment - WHERE op_id > $1 ORDER BY op_id ASC LIMIT $2`, - [start, limit] - ) -} - -const insertDeleteComments = async (deletedCm) => { - const { author, permlink } = deletedCm - if (!filling) { - const result = await pool.query('SELECT * FROM hafsql.vo_ineffective_delete_comment WHERE author=$1 AND permlink=$2', [author, permlink]) - if (result.rowCount > 0) { - return - } - } else { - // Use cache when filling - for (let i = 0; i < notDeletedComments.length; i++) { - if (author === notDeletedComments[i].author && permlink === notDeletedComments[i].permlink) { - return - } - } - } - return pool.query( - 'UPDATE hafsql.comments_table SET deleted=true WHERE author=$1 AND permlink=$2;', - [author, permlink] - ) -} - -let notDeletedComments = [] -const getIneffectiveDeleteComments = async () => { - const result = await pool.query('SELECT author, permlink FROM hafsql.vo_ineffective_delete_comment') - if (result.rowCount > 0) { - notDeletedComments = result.rows - } -} - -const updateLastOpId = async (opId) => { - return pool.query( - 'UPDATE hafsql.sync_data SET last_op_id=$1 WHERE table_name=$2;', - [opId, 'delete_comments'] - ) -} diff --git a/helpers/syncs/follows.js b/helpers/syncs/follows.js deleted file mode 100644 index 08821b74c9f1cf5c7127a2347f25d6fc72eff677..0000000000000000000000000000000000000000 --- a/helpers/syncs/follows.js +++ /dev/null @@ -1,448 +0,0 @@ -import { pool } from '../database.js' -import { clearUsername, validateAccountName } from '../validateUsername.js' - -let accountCache = {} -let useCache = true - -let followersArray = [] -let mutesArray = [] - -export const syncFollows = async () => { - useCache = false - accountCache = {} - const intervalTime = 3000 - setInterval(() => { - fillFollows(1000) - }, intervalTime) -} - -// 65535 / 2 = 32000 -// limit must be < 32000 -export const fillFollows = async (limit = 30000) => { - let start = await pool.query( - 'SELECT last_op_id FROM hafsql.sync_data WHERE table_name=$1;', - ['follows'] - ) - start = start.rows[0].last_op_id - let follows = await getFollows(start, limit) - while (follows.length > 0) { - await insertFollows(follows) - const start = follows[follows.length - 1].op_id - await updateLastOpId(start) - follows = await getFollows(start, limit) - } - accountCache = {} -} - -const getFollows = async (start, limit = 10000) => { - const result = await pool.query( - `SELECT op_id, json, required_posting_auths FROM hafsql.op_custom_json - WHERE id=$1 AND op_id > $2 ORDER BY op_id ASC LIMIT $3`, - ['follow', start, limit] - ) - if (result.rowCount <= 0) { - return [] - } - // Validating custom json - const followsArray = [] - for (let i = 0; i < result.rowCount; i++) { - const customJson = result.rows[i] - try { - let parsedJson = JSON.parse(customJson.json) - const postingAuths = customJson.required_posting_auths - if (!Array.isArray(parsedJson)) { - if (typeof parsedJson !== 'object' || customJson.op_id > 27630458) { - continue - } - parsedJson = ['follow', parsedJson] - } - if (parsedJson.length !== 2) { - continue - } - if (parsedJson[0] !== 'follow') { - continue - } - if (typeof parsedJson[1] !== 'object') { - continue - } - const keys = Object.keys(parsedJson[1]) - if (keys.length !== 3) { - continue - } - if ( - !Object.hasOwn(parsedJson[1], 'follower') || - !Object.hasOwn(parsedJson[1], 'following') || - !Object.hasOwn(parsedJson[1], 'what') - ) { - continue - } - const { follower, what } = parsedJson[1] - let { following } = parsedJson[1] - if (!Array.isArray(following)) { - following = [following] - } - if (validateAccountName(clearUsername(follower))) { - continue - } - if (postingAuths[0] !== clearUsername(follower)) { - continue - } - if (!Array.isArray(what) || what.length > 1) { - continue - } - const ids = await processFollowing(follower, following, what) - if (!ids) { - continue - } - followsArray.push({ - follower: ids.follower, - following: ids.following, - what, - op_id: customJson.op_id - }) - } catch (e) { - continue - } - } - return followsArray -} - -const insertFollows = async (follow) => { - followersArray = [] - mutesArray = [] - for (let i = 0; i < follow.length; i++) { - const item = follow[i] - if (item.what.length === 0) { - followersHelper(item, 'unfollow') - mutesHelper(item, 'unmute') - await unfollowUnmute(item) - continue - } - const what = item.what[0] - switch (what) { - case 'blacklist': - await blacklist(item) - break - case 'unblacklist': - await unblacklist(item) - break - case 'follow_blacklist': - await followBlacklist(item) - break - case 'unfollow_blacklist': - await unfollowBlacklist(item) - break - case 'follow_muted': - await followMuted(item) - break - case 'unfollow_muted': - await unfollowMuted(item) - break - case 'follow': - case 'blog': - followersHelper(item, 'follow') - break - case 'ignore': - mutesHelper(item, 'mute') - break - case 'reset_blacklist': - await resetBlacklist(item) - break - case 'reset_following_list': - await resetFollowingList(item) - break - case 'reset_muted_list': - await resetMutedList(item) - break - case 'reset_follow_blacklist': - await resetFollowBlacklist(item) - break - case 'reset_follow_muted_list': - await resetFollowMutedList(item) - break - case 'reset_all_lists': - await resetAllLists(item) - break - default: - break - } - } - if (followersArray.length > 0) { - await actualFollow() - } - if (mutesArray.length > 0) { - await mute() - } -} - -const blacklist = async (item) => { - try { - const { follower, following } = item - for (let i = 0; i < following.length; i++) { - await pool.query( - `INSERT INTO hafsql.blacklists_table (blacklister, blacklisted) - VALUES ($1, $2) ON CONFLICT ON CONSTRAINT hafsql_blacklists_table_un - DO NOTHING;`, - [follower, following[i]] - ) - } - } catch (e) { - throw new Error(e) - } -} -const unblacklist = async (item) => { - try { - const { follower, following } = item - for (let i = 0; i < following.length; i++) { - await pool.query( - `DELETE FROM hafsql.blacklists_table - WHERE blacklister=$1 AND blacklisted=$2;`, - [follower, following[i]] - ) - } - } catch (e) { - throw new Error(e) - } -} -const followBlacklist = async (item) => { - try { - const { follower, following } = item - for (let i = 0; i < following.length; i++) { - await pool.query( - `INSERT INTO hafsql.blacklist_follows_table (account, blacklist) - VALUES ($1, $2) ON CONFLICT ON CONSTRAINT hafsql_blacklist_follows_table_un - DO NOTHING;`, - [follower, following[i]] - ) - } - } catch (e) { - throw new Error(e) - } -} -const unfollowBlacklist = async (item) => { - const { follower, following } = item - for (let i = 0; i < following.length; i++) { - await pool.query( - `DELETE FROM hafsql.blacklist_follows_table - WHERE account=$1 AND blacklist=$2;`, - [follower, following[i]] - ) - } -} -const followMuted = async (item) => { - const { follower, following } = item - for (let i = 0; i < following.length; i++) { - await pool.query( - `INSERT INTO hafsql.mute_follows_table (account, mute_list) - VALUES ($1, $2) ON CONFLICT ON CONSTRAINT hafsql_mute_follows_table_un - DO NOTHING;`, - [follower, following[i]] - ) - } -} -const unfollowMuted = async (item) => { - const { follower, following } = item - for (let i = 0; i < following.length; i++) { - await pool.query( - `DELETE FROM hafsql.mute_follows_table - WHERE account=$1 AND mute_list=$2;`, - [follower, following[i]] - ) - } -} -const actualFollow = async () => { - let queryString = '' - let first = true - for (let i = 0; i < followersArray.length; i++) { - const temp = followersArray[i] - if (typeof temp === 'undefined') { - continue - } - if (!first) { - queryString += ',' - } - queryString += `(${temp.follower}, ${temp.following})` - if (first) { - first = false - } - } - if (queryString.length < 1) { - return - } - try { - await pool.query( - `INSERT INTO hafsql.follows_table (follower, following) - VALUES ${queryString} ON CONFLICT ON CONSTRAINT hafsql_follows_table_un - DO NOTHING;` - ) - } catch (e) { - throw new Error(e) - } -} -const mute = async () => { - let queryString = '' - let first = true - for (let i = 0; i < mutesArray.length; i++) { - const temp = mutesArray[i] - if (typeof temp === 'undefined') { - continue - } - if (!first) { - queryString += ',' - } - queryString += `(${temp.follower}, ${temp.following})` - if (first) { - first = false - } - } - if (queryString.length < 1) { - return - } - try { - await pool.query( - `INSERT INTO hafsql.mutes_table (muter, muted) - VALUES ${queryString} ON CONFLICT ON CONSTRAINT hafsql_mutes_table_un - DO NOTHING;` - ) - } catch (e) { - throw new Error(e) - } -} - -const unfollowUnmute = async (item) => { - const { follower, following } = item - for (let i = 0; i < following.length; i++) { - await pool.query( - `DELETE FROM hafsql.follows_table - WHERE follower=$1 AND following=$2;`, - [follower, following[i]] - ) - await pool.query( - `DELETE FROM hafsql.mutes_table - WHERE muter=$1 AND muted=$2;`, - [follower, following[i]] - ) - } -} - -const resetBlacklist = async (follow) => { - await pool.query(`DELETE FROM hafsql.blacklists_table - WHERE blacklister=$1;`, - [follow.follower]) -} - -const resetFollowingList = async (follow) => { - await pool.query(`DELETE FROM hafsql.follows_table - WHERE follower=$1;`, - [follow.follower]) -} - -const resetMutedList = async (follow) => { - await pool.query(`DELETE FROM hafsql.mutes_table - WHERE muter=$1;`, - [follow.follower]) -} - -const resetFollowBlacklist = async (follow) => { - await pool.query(`DELETE FROM hafsql.blacklist_follows_table - WHERE account=$1;`, - [follow.follower]) -} - -const resetFollowMutedList = async (follow) => { - await pool.query(`DELETE FROM hafsql.mute_follows_table - WHERE account=$1;`, - [follow.follower]) -} - -const resetAllLists = async (follow) => { - await resetBlacklist(follow) - await resetFollowingList(follow) - await resetMutedList(follow) - await resetFollowBlacklist(follow) - await resetFollowMutedList(follow) -} - -const followersHelper = (item, action) => { - const { follower, following } = item - for (let i = 0; i < following.length; i++) { - if (action === 'follow') { - followersArray.push({ follower, following: following[i] }) - } else { - for (let k = 0; k < followersArray.length; k++) { - const temp = followersArray[k] - if (typeof temp === 'undefined') { - continue - } - if (temp.follower === follower && temp.following === following[i]) { - delete followersArray[k] - } - } - } - } -} -const mutesHelper = (item, action) => { - const { follower, following } = item - for (let i = 0; i < following.length; i++) { - if (action === 'mute') { - mutesArray.push({ follower, following: following[i] }) - } else { - for (let k = 0; k < mutesArray.length; k++) { - const temp = mutesArray[k] - if (typeof temp === 'undefined') { - continue - } - if (temp.follower === follower && temp.following === following[i]) { - delete mutesArray[k] - } - } - } - } -} - -const processFollowing = async (follower, following, what) => { - const followingsArray = [] - const ids = {} - ids.follower = await getUserId(follower) - for (let i = 0; i < following.length; i++) { - if (validateAccountName(clearUsername(following[i]))) { - continue - } - if (follower === following[i]) { - continue - } - const followingId = await getUserId(following[i]) - if (!followingId) { - continue - } - followingsArray.push(followingId) - } - if (followingsArray.length < 1 && !what[0].includes('reset_')) { - return null - } - ids.following = followingsArray - return ids -} - -// Caching ids for duration of the sync -const getUserId = async (username) => { - username = clearUsername(username) - if (useCache && Object.hasOwn(accountCache, username)) { - return accountCache[username] - } else { - const getId = await pool.query('SELECT a.id FROM hive.accounts a WHERE a.name=$1', [username]) - if (getId.rowCount < 1) { - return null - } - const id = getId.rows[0].id - accountCache[username] = id - return id - } -} - -const updateLastOpId = async (opId) => { - return pool.query( - 'UPDATE hafsql.sync_data SET last_op_id=$1 WHERE table_name=$2;', - [opId, 'follows'] - ) -} diff --git a/helpers/syncs/proposalApprovals.js b/helpers/syncs/proposalApprovals.js deleted file mode 100644 index fe1a89252bd0410ceb391a02fb8f702c5f4d22e6..0000000000000000000000000000000000000000 --- a/helpers/syncs/proposalApprovals.js +++ /dev/null @@ -1,63 +0,0 @@ -import { pool } from '../database.js' - -export const syncProposalApprovals = async () => { - const intervalTime = 3000 - setInterval(() => { - fillProposalApprovals(1000) - }, intervalTime) -} - -export const fillProposalApprovals = async (limit = 20000) => { - let start = await pool.query( - 'SELECT last_op_id FROM hafsql.sync_data WHERE table_name=$1;', - ['proposal_approvals'] - ) - start = start.rows[0].last_op_id - let approvals = await getProposalApprovals(start, limit) - let i = 0 - while (approvals.rowCount > 0) { - await insertProposalApprovals(approvals.rows[i]) - i++ - if (i >= approvals.rowCount) { - i = 0 - const start = approvals.rows[approvals.rowCount - 1].op_id - await updateLastOpId(start) - approvals = await getProposalApprovals(start, limit) - } - } -} - -const getProposalApprovals = async (start, limit = 10000) => { - return pool.query( - `SELECT op_id, voter, proposal_ids, approve FROM hafsql.op_update_proposal_votes - WHERE op_id > $1 ORDER BY op_id ASC LIMIT $2`, - [start, limit] - ) -} - -const insertProposalApprovals = async (approval) => { - const { voter, approve } = approval - const proposalIds = approval.proposal_ids - for (let i = 0; i < proposalIds.length; i++) { - if (approve === 'false') { - await pool.query( - 'DELETE FROM hafsql.proposal_approvals_table WHERE id=$1 AND voter=$2;', - [proposalIds[i], voter] - ) - } else { - await pool.query( - `INSERT INTO hafsql.proposal_approvals_table (id, voter) - VALUES ($1, $2) ON CONFLICT ON CONSTRAINT hafsql_proposal_approvals_table_un - DO NOTHING;`, - [proposalIds[i], voter] - ) - } - } -} - -const updateLastOpId = async (opId) => { - return pool.query( - 'UPDATE hafsql.sync_data SET last_op_id=$1 WHERE table_name=$2;', - [opId, 'proposal_approvals'] - ) -} diff --git a/helpers/syncs/rcDelegations.js b/helpers/syncs/rcDelegations.js deleted file mode 100644 index 8afe7203a7d89d0f04fcb7c52c0a4ecda6a37e46..0000000000000000000000000000000000000000 --- a/helpers/syncs/rcDelegations.js +++ /dev/null @@ -1,116 +0,0 @@ -import { pool } from '../database.js' -import JSONbig from 'json-bigint' -// Need this to handle large RC numbers -const JSONparser = JSONbig({ storeAsString: true }).parse - -export const syncRCDelegations = async () => { - const intervalTime = 3000 - setInterval(() => { - fillRCDelegations(1000) - }, intervalTime) -} - -export const fillRCDelegations = async (limit = 10000) => { - let start = await pool.query( - 'SELECT last_op_id FROM hafsql.sync_data WHERE table_name=$1;', - ['rc_delegations'] - ) - start = start.rows[0].last_op_id - let delegations = await getRCDelegations(start, limit) - let i = 0 - while (delegations.length > 0) { - await insertRCDelegations(delegations[i]) - i++ - if (i >= delegations.length) { - i = 0 - const start = delegations[delegations.length - 1].op_id - await updateLastOpId(start) - delegations = await getRCDelegations(start, limit) - } - } -} - -const getRCDelegations = async (start, limit = 10000) => { - const result = await pool.query( - `SELECT op_id, json FROM hafsql.op_custom_json - WHERE id=$1 AND op_id > $2 ORDER BY op_id ASC LIMIT $3`, - ['rc', start, limit] - ) - if (result.rowCount <= 0) { - return [] - } - // Validating RC delegtaion - const delegationsArray = [] - for (let i = 0; i < result.rowCount; i++) { - const rcDelegation = result.rows[i] - try { - const parsedJson = JSONparser(rcDelegation.json) - if (!Array.isArray(parsedJson)) { - continue - } - if (parsedJson.length !== 2) { - continue - } - if (parsedJson[0] !== 'delegate_rc' && parsedJson[0] !== 0) { - continue - } - // If the transaction is included in the block, at this point we can assume it is valid - const from = parsedJson[1].from - const delegatees = parsedJson[1].delegatees - let maxRC = parsedJson[1].max_rc - if (typeof maxRC === 'undefined' || maxRC === null) { - maxRC = '0' - } - delegationsArray.push({ - from, - delegatees, - maxRC, - op_id: rcDelegation.op_id - }) - } catch (e) { - continue - } - } - return delegationsArray -} - -const insertRCDelegations = async (delegation) => { - const { maxRC } = delegation - const from = clearUsername(delegation.from) - const delegatees = [...new Set(delegation.delegatees)] - for (let i = 0; i < delegatees.length; i++) { - const delegatee = clearUsername(delegatees[i]) - // if (validateAccountName(from) || validateAccountName(delegatee)) { - // console.error(from, delegatee) - // throw new Error('Bad username') - // } - if (maxRC === '0' || maxRC === 0) { - await pool.query( - `DELETE FROM hafsql.rc_delegations_table - WHERE delegator=$1 AND delegatee=$2;`, - [from, delegatee] - ) - } else { - await pool.query( - `INSERT INTO hafsql.rc_delegations_table (delegator, delegatee, rc) - VALUES ($1, $2, $3) ON CONFLICT ON CONSTRAINT hafsql_rc_delegations_table_un - DO UPDATE SET rc=$3;`, - [from, delegatee, maxRC] - ) - } - } - return true -} - -const clearUsername = (username) => { - // const temp = username.replaceAll('\t', '') - // return temp.replaceAll('\r', '') - return username.slice(0, 16) -} - -const updateLastOpId = async (opId) => { - return pool.query( - 'UPDATE hafsql.sync_data SET last_op_id=$1 WHERE table_name=$2;', - [opId, 'rc_delegations'] - ) -} diff --git a/helpers/syncs/reblogs.js b/helpers/syncs/reblogs.js deleted file mode 100644 index 5473ffee350cccf163988f9b51b93da39515636e..0000000000000000000000000000000000000000 --- a/helpers/syncs/reblogs.js +++ /dev/null @@ -1,200 +0,0 @@ -import { pool } from '../database.js' -import { clearUsername, validateAccountName } from '../validateUsername.js' - -let accountCache = {} -let postCache = {} -let useCache = true - -export const syncReblogs = async () => { - useCache = false - accountCache = {} - postCache = {} - const intervalTime = 3000 - setInterval(() => { - fillReblogs(1000) - }, intervalTime) -} - -export const fillReblogs = async (limit = 40000) => { - let start = await pool.query( - 'SELECT last_op_id FROM hafsql.sync_data WHERE table_name=$1;', - ['reblogs'] - ) - start = start.rows[0].last_op_id - let reblogs = await getReblogs(start, limit) - while (reblogs.length > 0) { - await insertReblogs(reblogs) - start = reblogs[reblogs.length - 1].op_id - await updateLastOpId(start) - reblogs = await getReblogs(start, limit) - } - accountCache = {} - postCache = {} -} - -const getReblogs = async (start, limit = 10000) => { - if (start < 16724280) { - start = 16724280 - } - if (start < 27000000) { - limit = 80000 - } - const result = await pool.query( - `SELECT op_id, json, required_posting_auths, id FROM hafsql.op_custom_json - WHERE id IN('follow', 'reblog') AND op_id > $1 ORDER BY op_id ASC LIMIT $2`, - [start, limit] - ) - if (result.rowCount <= 0) { - return [] - } - const reblogsArray = [] - for (let i = 0; i < result.rowCount; i++) { - const customJson = result.rows[i] - try { - let parsedJson = JSON.parse(customJson.json) - const postingAuths = customJson.required_posting_auths - if (!Array.isArray(parsedJson)) { - if (typeof parsedJson !== 'object' || customJson.op_id > 27630458) { - continue - } - parsedJson = [customJson.id, parsedJson] - } - if (parsedJson.length !== 2) { - continue - } - if (parsedJson[0] !== 'reblog') { - continue - } - if (typeof parsedJson[1] !== 'object') { - continue - } - const keys = Object.keys(parsedJson[1]) - if (keys.length !== 3 && keys.length !== 4) { - continue - } - if ( - !Object.hasOwn(parsedJson[1], 'account') || - !Object.hasOwn(parsedJson[1], 'author') || - !Object.hasOwn(parsedJson[1], 'permlink') - ) { - continue - } - const { account, author, permlink } = parsedJson[1] - let remove = false - if (Object.hasOwn(parsedJson[1], 'delete') && parsedJson[1].delete === 'delete') { - remove = true - } - if (validateAccountName(clearUsername(account))) { - continue - } - if (validateAccountName(clearUsername(author))) { - continue - } - if (postingAuths[0] !== clearUsername(account)) { - continue - } - if (typeof permlink !== 'string' || permlink.length > 256) { - continue - } - const accountId = await getUserId(account) - if (!accountId) { - continue - } - const postId = await getPostId(author, permlink) - if (!postId) { - continue - } - reblogsArray.push({ - account: accountId, - post: postId, - remove, - op_id: customJson.op_id - }) - } catch (e) { - continue - } - } - return reblogsArray -} - -const insertReblogs = async (reblogs) => { - const helperArray = [] - for (let i = 0; i < reblogs.length; i++) { - const { account, post, remove } = reblogs[i] - if (!remove) { - helperArray.push({ account, post }) - } else { - for (let k = 0; k < helperArray.length; k++) { - if (!helperArray[k]) { - continue - } - if (account === helperArray[k].account && post === helperArray[k].post) { - delete helperArray[k] - } - } - await pool.query('DELETE FROM hafsql.reblogs_table WHERE account=$1 AND post=$2;', [account, post]) - } - } - let queryString = '' - let first = true - for (let i = 0; i < helperArray.length; i++) { - const reblog = helperArray[i] - if (!reblog) { - continue - } - if (!first) { - queryString += ',' - } - queryString += `(${reblog.account}, ${reblog.post})` - if (first) { - first = false - } - } - if (queryString.length > 0) { - await pool.query(`INSERT INTO hafsql.reblogs_table (account, post) VALUES ${queryString} - ON CONFLICT ON CONSTRAINT hafsql_reblogs_table_un DO NOTHING;`) - } -} - -const getPostId = async (author, permlink) => { - const postString = author + ';' + permlink - if (useCache && Object.hasOwn(postCache, postString)) { - return postCache[postString] - } else { - const getId = await pool.query( - 'SELECT id FROM hafsql.comments_table WHERE author=$1 AND permlink=$2', - [author, permlink] - ) - if (getId.rowCount < 1) { - return null - } - const id = getId.rows[0].id - postCache[postString] = id - return id - } -} - -// Caching ids for duration of the sync -const getUserId = async (username) => { - if (useCache && Object.hasOwn(accountCache, username)) { - return accountCache[username] - } else { - const getId = await pool.query( - 'SELECT a.id FROM hive.accounts a WHERE a.name=$1', - [username] - ) - if (getId.rowCount < 1) { - return null - } - const id = getId.rows[0].id - accountCache[username] = id - return id - } -} - -const updateLastOpId = async (opId) => { - return pool.query( - 'UPDATE hafsql.sync_data SET last_op_id=$1 WHERE table_name=$2;', - [opId, 'reblogs'] - ) -} diff --git a/helpers/syncs/rewards.js b/helpers/syncs/rewards.js deleted file mode 100644 index 7128a6f322e7ee9d88c9db8ee83e010362135c3f..0000000000000000000000000000000000000000 --- a/helpers/syncs/rewards.js +++ /dev/null @@ -1,98 +0,0 @@ -import { pool } from '../database.js' - -let cache = [] - -export const syncRewards = async () => { - resetPaidPosts() - const intervalTime = 3000 - setInterval(() => { - fillRewards(1000) - }, intervalTime) -} - -const resetPaidPosts = () => { - const intervalTime = 10000 - setInterval(async () => { - const lastPaid = await pool.query( - 'SELECT author, permlink FROM hafsql.vo_comment_payout_update ORDER BY op_id DESC LIMIT 1' - ) - if (lastPaid.rows <= 0) { - return - } - const startComment = await pool.query( - 'SELECT id FROM hafsql.comments_table WHERE author=$1 AND permlink=$2', - [lastPaid.rows[0].author, lastPaid.rows[0].permlink] - ) - const cmId = startComment.rows[0].id - await pool.query('UPDATE hafsql.comments_table SET pending_payout_value=0 WHERE id<=$1 AND pending_payout_value>0', [cmId]) - // takes 50-80ms - }, intervalTime) -} - -export const fillRewards = async (limit = 20000) => { - let start = await pool.query( - 'SELECT last_op_id FROM hafsql.sync_data WHERE table_name=$1;', - ['rewards'] - ) - start = start.rows[0].last_op_id - const lastPaid = await pool.query( - 'SELECT author, permlink FROM hafsql.vo_comment_payout_update ORDER BY op_id DESC LIMIT 1' - ) - if (lastPaid.rows <= 0) { - return - } - const startComment = await pool.query( - 'SELECT op_id FROM hafsql.op_comment WHERE author=$1 AND permlink=$2 ORDER BY op_id ASC LIMIT 1', - [lastPaid.rows[0].author, lastPaid.rows[0].permlink] - ) - const cmOpId = startComment.rows[0].op_id - start = cmOpId > start ? cmOpId : start - let rewards = await getRewards(start, limit) - while (rewards.rowCount > 0) { - await insertRewards(rewards.rows) - start = rewards.rows[rewards.rowCount - 1].op_id - await updateLastOpId(start) - rewards = await getRewards(start, limit) - } -} - -const getRewards = async (start, limit = 10000) => { - return pool.query( - `SELECT op_id, author, permlink, pending_payout FROM hafsql.vo_effective_comment_vote - WHERE op_id>$1 ORDER BY op_id ASC LIMIT $2`, - [start, limit] - ) -} - -const insertRewards = async (rewards) => { - cache = [] - for (let i = 0; i < rewards.length; i++) { - const { author, permlink } = rewards[i] - const pendingPayout = rewards[i].pending_payout - let updated = false - for (let k = 0; k < cache.length; k++) { - if (cache[k].author === author && cache[k].permlink === permlink) { - cache[k].pendingPayout = pendingPayout - updated = true - break - } - } - if (updated) { - continue - } - cache.push({ author, permlink, pendingPayout }) - } - for (let k = 0; k < cache.length; k++) { - await pool.query( - 'UPDATE hafsql.comments_table SET pending_payout_value=$1 WHERE author=$2 AND permlink=$3', - [cache[k].pendingPayout, cache[k].author, cache[k].permlink] - ) - } -} - -const updateLastOpId = async (opId) => { - return pool.query( - 'UPDATE hafsql.sync_data SET last_op_id=$1 WHERE table_name=$2;', - [opId, 'rewards'] - ) -} diff --git a/helpers/validateUsername.js b/helpers/validateUsername.js deleted file mode 100644 index abb80230cec64919b359a8b92efd6c960432205a..0000000000000000000000000000000000000000 --- a/helpers/validateUsername.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Retrun null on valid username string - */ -export const validateAccountName = value => { - let i, label, len, suffix - suffix = 'Account name should ' - if (!value) { - return suffix + 'not be empty.' - } - const length = value.length - if (length < 3) { - return suffix + 'be longer.' - } - if (length > 16) { - return suffix + 'be shorter.' - } - if (/\./.test(value)) { - suffix = 'Each account segment should ' - } - const ref = value.split('.') - for (i = 0, len = ref.length; i < len; i++) { - label = ref[i] - if (!/^[a-z]/.test(label)) { - return suffix + 'start with a lowercase letter.' - } - if (!/^[a-z0-9-]*$/.test(label)) { - return suffix + 'have only lowercase letters, digits, or dashes.' - } - if (!/[a-z0-9]$/.test(label)) { - return suffix + 'end with a lowercase letter or digit.' - } - if (!(label.length >= 3)) { - return suffix + 'be longer' - } - } - return null -} - -export const clearUsername = (username) => { - return username.slice(0, 16) -} diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 8153bb287f10469bbdbf96e14863f7493e3e325c..0000000000000000000000000000000000000000 --- a/package-lock.json +++ /dev/null @@ -1,4604 +0,0 @@ -{ - "name": "hafsql", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "diff-match-patch": "1.0.5", - "dotenv": "^16.0.3", - "json-bigint": "1.0.0", - "pg": "^8.10.0" - }, - "devDependencies": { - "pm2": "^5.3.0", - "standard": "^17.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.5.2", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "8.40.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz", - "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@opencensus/core": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/@opencensus/core/-/core-0.0.9.tgz", - "integrity": "sha512-31Q4VWtbzXpVUd2m9JS6HEaPjlKvNMOiF7lWKNmXF84yUcgfAFL5re7/hjDmdyQbOp32oGc+RFV78jXIldVz6Q==", - "dev": true, - "dependencies": { - "continuation-local-storage": "^3.2.1", - "log-driver": "^1.2.7", - "semver": "^5.5.0", - "shimmer": "^1.2.0", - "uuid": "^3.2.1" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/@opencensus/core/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/@opencensus/propagation-b3": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@opencensus/propagation-b3/-/propagation-b3-0.0.8.tgz", - "integrity": "sha512-PffXX2AL8Sh0VHQ52jJC4u3T0H6wDK6N/4bg7xh4ngMYOIi13aR1kzVvX1sVDBgfGwDOkMbl4c54Xm3tlPx/+A==", - "dev": true, - "dependencies": { - "@opencensus/core": "^0.0.8", - "uuid": "^3.2.1" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/@opencensus/propagation-b3/node_modules/@opencensus/core": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@opencensus/core/-/core-0.0.8.tgz", - "integrity": "sha512-yUFT59SFhGMYQgX0PhoTR0LBff2BEhPrD9io1jWfF/VDbakRfs6Pq60rjv0Z7iaTav5gQlttJCX2+VPxFWCuoQ==", - "dev": true, - "dependencies": { - "continuation-local-storage": "^3.2.1", - "log-driver": "^1.2.7", - "semver": "^5.5.0", - "shimmer": "^1.2.0", - "uuid": "^3.2.1" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/@opencensus/propagation-b3/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/@pm2/agent": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@pm2/agent/-/agent-2.0.1.tgz", - "integrity": "sha512-QKHMm6yexcvdDfcNE7PL9D6uEjoQPGRi+8dh+rc4Hwtbpsbh5IAvZbz3BVGjcd4HaX6pt2xGpOohG7/Y2L4QLw==", - "dev": true, - "dependencies": { - "async": "~3.2.0", - "chalk": "~3.0.0", - "dayjs": "~1.8.24", - "debug": "~4.3.1", - "eventemitter2": "~5.0.1", - "fast-json-patch": "^3.0.0-1", - "fclone": "~1.0.11", - "nssocket": "0.6.0", - "pm2-axon": "~4.0.1", - "pm2-axon-rpc": "~0.7.0", - "proxy-agent": "~5.0.0", - "semver": "~7.2.0", - "ws": "~7.4.0" - } - }, - "node_modules/@pm2/agent/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@pm2/agent/node_modules/dayjs": { - "version": "1.8.36", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.36.tgz", - "integrity": "sha512-3VmRXEtw7RZKAf+4Tv1Ym9AGeo8r8+CjDi26x+7SYQil1UqtqdaokhzoEJohqlzt0m5kacJSDhJQkG/LWhpRBw==", - "dev": true - }, - "node_modules/@pm2/agent/node_modules/semver": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.2.3.tgz", - "integrity": "sha512-utbW9Z7ZxVvwiIWkdOMLOR9G/NFXh2aRucghkVrEMJWuC++r3lCkBC3LwqBinyHzGMAJxY5tn6VakZGHObq5ig==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@pm2/io": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@pm2/io/-/io-5.0.0.tgz", - "integrity": "sha512-3rToDVJaRoob5Lq8+7Q2TZFruoEkdORxwzFpZaqF4bmH6Bkd7kAbdPrI/z8X6k1Meq5rTtScM7MmDgppH6aLlw==", - "dev": true, - "dependencies": { - "@opencensus/core": "0.0.9", - "@opencensus/propagation-b3": "0.0.8", - "async": "~2.6.1", - "debug": "~4.3.1", - "eventemitter2": "^6.3.1", - "require-in-the-middle": "^5.0.0", - "semver": "6.3.0", - "shimmer": "^1.2.0", - "signal-exit": "^3.0.3", - "tslib": "1.9.3" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/@pm2/io/node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/@pm2/io/node_modules/eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", - "dev": true - }, - "node_modules/@pm2/js-api": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/@pm2/js-api/-/js-api-0.6.7.tgz", - "integrity": "sha512-jiJUhbdsK+5C4zhPZNnyA3wRI01dEc6a2GhcQ9qI38DyIk+S+C8iC3fGjcjUbt/viLYKPjlAaE+hcT2/JMQPXw==", - "dev": true, - "dependencies": { - "async": "^2.6.3", - "axios": "^0.21.0", - "debug": "~4.3.1", - "eventemitter2": "^6.3.1", - "ws": "^7.0.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/@pm2/js-api/node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/@pm2/js-api/node_modules/eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", - "dev": true - }, - "node_modules/@pm2/pm2-version-check": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@pm2/pm2-version-check/-/pm2-version-check-1.0.4.tgz", - "integrity": "sha512-SXsM27SGH3yTWKc2fKR4SYNxsmnvuBQ9dd6QHtEWmiZ/VqaOYPAIlS8+vMcn27YLtAEBGvNRSh3TPNvtjZgfqA==", - "dev": true, - "dependencies": { - "debug": "^4.3.1" - } - }, - "node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true - }, - "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/amp": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/amp/-/amp-0.3.1.tgz", - "integrity": "sha512-OwIuC4yZaRogHKiuU5WlMR5Xk/jAcpPtawWL05Gj8Lvm2F6mwoJt4O/bHI+DHwG79vWd+8OFYM4/BzYqyRd3qw==", - "dev": true - }, - "node_modules/amp-message": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/amp-message/-/amp-message-0.1.2.tgz", - "integrity": "sha512-JqutcFwoU1+jhv7ArgW38bqrE+LQdcRv4NxNw0mp0JHQyB6tXesWRjtYKlDgHRY2o3JE5UTaBGUK8kSWUdxWUg==", - "dev": true, - "dependencies": { - "amp": "0.3.1" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", - "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", - "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", - "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz", - "integrity": "sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.1.3" - } - }, - "node_modules/ast-types": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", - "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", - "dev": true, - "dependencies": { - "tslib": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/ast-types/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "dev": true - }, - "node_modules/async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "dev": true - }, - "node_modules/async-listener": { - "version": "0.6.10", - "resolved": "https://registry.npmjs.org/async-listener/-/async-listener-0.6.10.tgz", - "integrity": "sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw==", - "dev": true, - "dependencies": { - "semver": "^5.3.0", - "shimmer": "^1.1.0" - }, - "engines": { - "node": "<=0.11.8 || >0.11.10" - } - }, - "node_modules/async-listener/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", - "engines": { - "node": "*" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/blessed": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/blessed/-/blessed-0.1.81.tgz", - "integrity": "sha512-LoF5gae+hlmfORcG1M5+5XZi4LBmvlXTzwJWzUlPryN/SJdSflZvROM2TwkT0GMpq7oqT48NRd4GS7BiVBc5OQ==", - "dev": true, - "bin": { - "blessed": "bin/tput.js" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/bodec": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/bodec/-/bodec-0.1.0.tgz", - "integrity": "sha512-Ylo+MAo5BDUq1KA3f3R/MFhh+g8cnHmo8bz3YPGhI1znrMaf77ol1sfvYJzsw3nTE+Y2GryfDxBaR+AqpAkEHQ==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/buffer-writer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", - "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", - "dev": true, - "dependencies": { - "semver": "^7.0.0" - } - }, - "node_modules/builtins/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/charm": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/charm/-/charm-0.1.2.tgz", - "integrity": "sha512-syedaZ9cPe7r3hoQA9twWYKu5AIyCswN5+szkmPBe9ccdLrj4bYaCnLVPTLd2kgVRc7+zoX4tyPgRnFKCj5YjQ==", - "dev": true - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/cli-tableau": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cli-tableau/-/cli-tableau-2.0.1.tgz", - "integrity": "sha512-he+WTicka9cl0Fg/y+YyxcN6/bfQ/1O3QmgxRXDhABKqLzvoOSM4fMzp39uMyLBulAFuywD2N7UaoQE7WaADxQ==", - "dev": true, - "dependencies": { - "chalk": "3.0.0" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/cli-tableau/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/continuation-local-storage": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz", - "integrity": "sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA==", - "dev": true, - "dependencies": { - "async-listener": "^0.6.0", - "emitter-listener": "^1.1.1" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "node_modules/croner": { - "version": "4.1.97", - "resolved": "https://registry.npmjs.org/croner/-/croner-4.1.97.tgz", - "integrity": "sha512-/f6gpQuxDaqXu+1kwQYSckUglPaOrHdbIlBAu0YuW8/Cdb45XwXYNUBXg3r/9Mo6n540Kn/smKcZWko5x99KrQ==", - "dev": true - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/culvert": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/culvert/-/culvert-0.1.2.tgz", - "integrity": "sha512-yi1x3EAWKjQTreYWeSd98431AV+IEE0qoDyOoaHJ7KJ21gv6HtBXHVLX74opVSGqcR8/AbjJBHAHpcOy2bj5Gg==", - "dev": true - }, - "node_modules/data-uri-to-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz", - "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/dayjs": { - "version": "1.11.8", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.8.tgz", - "integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, - "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/degenerator": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-3.0.4.tgz", - "integrity": "sha512-Z66uPeBfHZAHVmue3HPfyKu2Q0rC2cRxbTOsvmU/po5fvvcx27W4mIu9n0PUlQih4oUYvcG1BsbtVv8x7KDOSw==", - "dev": true, - "dependencies": { - "ast-types": "^0.13.2", - "escodegen": "^1.8.1", - "esprima": "^4.0.0", - "vm2": "^3.9.17" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/diff-match-patch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", - "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==" - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/emitter-listener": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz", - "integrity": "sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ==", - "dev": true, - "dependencies": { - "shimmer": "^1.2.0" - } - }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-abstract": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", - "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.0", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", - "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", - "dev": true, - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/escodegen/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/eslint": { - "version": "8.40.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz", - "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.40.0", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-standard": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz", - "integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "peerDependencies": { - "eslint": "^8.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^15.0.0", - "eslint-plugin-promise": "^6.0.0" - } - }, - "node_modules/eslint-config-standard-jsx": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-11.0.0.tgz", - "integrity": "sha512-+1EV/R0JxEK1L0NGolAr8Iktm3Rgotx3BKwgaX+eAuSX8D952LULKtjgZD3F+e6SvibONnhLwoTi9DPxN5LvvQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "peerDependencies": { - "eslint": "^8.8.0", - "eslint-plugin-react": "^7.28.0" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", - "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", - "dev": true, - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.11.0", - "resolve": "^1.22.1" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-es": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", - "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", - "dev": true, - "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, - "node_modules/eslint-plugin-es/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", - "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-module-utils": "^2.7.4", - "has": "^1.0.3", - "is-core-module": "^2.11.0", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.values": "^1.1.6", - "resolve": "^1.22.1", - "semver": "^6.3.0", - "tsconfig-paths": "^3.14.1" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-n": { - "version": "15.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz", - "integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==", - "dev": true, - "dependencies": { - "builtins": "^5.0.1", - "eslint-plugin-es": "^4.1.0", - "eslint-utils": "^3.0.0", - "ignore": "^5.1.1", - "is-core-module": "^2.11.0", - "minimatch": "^3.1.2", - "resolve": "^1.22.1", - "semver": "^7.3.8" - }, - "engines": { - "node": ">=12.22.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-plugin-promise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", - "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.32.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz", - "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flatmap": "^1.3.1", - "array.prototype.tosorted": "^1.1.1", - "doctrine": "^2.1.0", - "estraverse": "^5.3.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.6", - "object.fromentries": "^2.0.6", - "object.hasown": "^1.1.2", - "object.values": "^1.1.6", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.4", - "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.8" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" - } - }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", - "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", - "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eventemitter2": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-5.0.1.tgz", - "integrity": "sha512-5EM1GHXycJBS6mauYAbVKT1cVs7POKWb2NXD4Vyt8dDqeZa7LaDK1/sjtL+Zb0lzTpSNil4596Dyu97hz37QLg==", - "dev": true - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-json-patch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", - "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==", - "dev": true - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fclone": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fclone/-/fclone-1.0.11.tgz", - "integrity": "sha512-GDqVQezKzRABdeqflsgMr7ktzgF9CyS+p2oe0jJqUY6izSSbhPIQJDpoU4PtGcD7VPM9xh/dVrTu6z1nwgmEGw==", - "dev": true - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/file-uri-to-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz", - "integrity": "sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha512-faFVML1aBx2UoDStmLwv2Wptt4vw5x03xxX172nhA5Y5HBshW5JweqQ2W4xL4dezQTG8inJsuYcpPHHU3X5OTQ==", - "dev": true, - "dependencies": { - "readable-stream": "1.1.x", - "xregexp": "2.0.0" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-uri": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-3.0.2.tgz", - "integrity": "sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg==", - "dev": true, - "dependencies": { - "@tootallnate/once": "1", - "data-uri-to-buffer": "3", - "debug": "4", - "file-uri-to-path": "2", - "fs-extra": "^8.1.0", - "ftp": "^0.3.10" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/git-node-fs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/git-node-fs/-/git-node-fs-1.0.0.tgz", - "integrity": "sha512-bLQypt14llVXBg0S0u8q8HmU7g9p3ysH+NvVlae5vILuUvs759665HvmR5+wb04KjHyjFcDRxdYb4kyNnluMUQ==", - "dev": true - }, - "node_modules/git-sha1": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/git-sha1/-/git-sha1-0.1.2.tgz", - "integrity": "sha512-2e/nZezdVlyCopOCYHeW0onkbZg7xP1Ad6pndPy1rCygeRykefUS6r7oA5cJRGEFvseiaz5a/qUHFVX1dd6Isg==", - "dev": true - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ip": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", - "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", - "dev": true - }, - "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/js-git": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/js-git/-/js-git-0.7.8.tgz", - "integrity": "sha512-+E5ZH/HeRnoc/LW0AmAyhU+mNcWBzAKE+30+IDMLSLbbK+Tdt02AdkOKq9u15rlJsDEGFqtgckc8ZM59LhhiUA==", - "dev": true, - "dependencies": { - "bodec": "^0.1.0", - "culvert": "^0.1.2", - "git-sha1": "^0.1.2", - "pako": "^0.2.5" - } - }, - "node_modules/js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "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", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true, - "optional": true - }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsx-ast-utils": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", - "integrity": "sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.5", - "object.assign": "^4.1.3" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/lazy": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/lazy/-/lazy-1.0.11.tgz", - "integrity": "sha512-Y+CjUfLmIpoUCCRl0ub4smrYtGGr5AOa2AKOaWelGHOGz33X/Y/KizefGqbkwfz44+cnq/+9habclf8vOmu2LA==", - "dev": true, - "engines": { - "node": ">=0.2.0" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/load-json-file/node_modules/type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", - "dev": true, - "engines": { - "node": ">=0.8.6" - } - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "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", - "integrity": "sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==", - "dev": true - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/needle": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz", - "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==", - "dev": true, - "dependencies": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - }, - "bin": { - "needle": "bin/needle" - }, - "engines": { - "node": ">= 4.4.x" - } - }, - "node_modules/needle/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/netmask": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", - "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nssocket": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/nssocket/-/nssocket-0.6.0.tgz", - "integrity": "sha512-a9GSOIql5IqgWJR3F/JXG4KpJTA3Z53Cj0MeMvGpglytB1nxE4PdFNC0jINe27CS7cGivoynwc054EzCcT3M3w==", - "dev": true, - "dependencies": { - "eventemitter2": "~0.4.14", - "lazy": "~1.0.11" - }, - "engines": { - "node": ">= 0.10.x" - } - }, - "node_modules/nssocket/node_modules/eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", - "dev": true - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", - "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", - "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.hasown": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz", - "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pac-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-5.0.0.tgz", - "integrity": "sha512-CcFG3ZtnxO8McDigozwE3AqAw15zDvGH+OjXO4kzf7IkEKkQ4gxQ+3sdF50WmhQ4P/bVusXcqNE2S3XrNURwzQ==", - "dev": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4", - "get-uri": "3", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "5", - "pac-resolver": "^5.0.0", - "raw-body": "^2.2.0", - "socks-proxy-agent": "5" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/pac-resolver": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-5.0.1.tgz", - "integrity": "sha512-cy7u00ko2KVgBAjuhevqpPeHIkCIqPe1v24cydhWjmeuzaBfmUWFCZJ1iAh5TuVzVZoUzXIW7K8sMYOZ84uZ9Q==", - "dev": true, - "dependencies": { - "degenerator": "^3.0.2", - "ip": "^1.1.5", - "netmask": "^2.0.2" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/packet-reader": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", - "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" - }, - "node_modules/pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", - "dev": true - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/pg": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.10.0.tgz", - "integrity": "sha512-ke7o7qSTMb47iwzOSaZMfeR7xToFdkE71ifIipOAAaLIM0DYzfOAXlgFFmYUIE2BcJtvnVlGCID84ZzCegE8CQ==", - "dependencies": { - "buffer-writer": "2.0.0", - "packet-reader": "1.0.0", - "pg-connection-string": "^2.5.0", - "pg-pool": "^3.6.0", - "pg-protocol": "^1.6.0", - "pg-types": "^2.1.0", - "pgpass": "1.x" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "pg-native": ">=3.0.1" - }, - "peerDependenciesMeta": { - "pg-native": { - "optional": true - } - } - }, - "node_modules/pg-connection-string": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", - "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==" - }, - "node_modules/pg-int8": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", - "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/pg-pool": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.0.tgz", - "integrity": "sha512-clFRf2ksqd+F497kWFyM21tMjeikn60oGDmqMT8UBrynEwVEX/5R5xd2sdvdo1cZCFlguORNpVuqxIj+aK4cfQ==", - "peerDependencies": { - "pg": ">=8.0" - } - }, - "node_modules/pg-protocol": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", - "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==" - }, - "node_modules/pg-types": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", - "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", - "dependencies": { - "pg-int8": "1.0.1", - "postgres-array": "~2.0.0", - "postgres-bytea": "~1.0.0", - "postgres-date": "~1.0.4", - "postgres-interval": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pgpass": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", - "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", - "dependencies": { - "split2": "^4.1.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pidusage": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/pidusage/-/pidusage-3.0.2.tgz", - "integrity": "sha512-g0VU+y08pKw5M8EZ2rIGiEBaB8wrQMjYGFfW2QVIfyT8V+fq8YFLkvlz4bz5ljvFDJYNFCWT3PWqcRr2FKO81w==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", - "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pm2": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/pm2/-/pm2-5.3.0.tgz", - "integrity": "sha512-xscmQiAAf6ArVmKhjKTeeN8+Td7ZKnuZFFPw1DGkdFPR/0Iyx+m+1+OpCdf9+HQopX3VPc9/wqPQHqVOfHum9w==", - "dev": true, - "dependencies": { - "@pm2/agent": "~2.0.0", - "@pm2/io": "~5.0.0", - "@pm2/js-api": "~0.6.7", - "@pm2/pm2-version-check": "latest", - "async": "~3.2.0", - "blessed": "0.1.81", - "chalk": "3.0.0", - "chokidar": "^3.5.3", - "cli-tableau": "^2.0.0", - "commander": "2.15.1", - "croner": "~4.1.92", - "dayjs": "~1.11.5", - "debug": "^4.3.1", - "enquirer": "2.3.6", - "eventemitter2": "5.0.1", - "fclone": "1.0.11", - "mkdirp": "1.0.4", - "needle": "2.4.0", - "pidusage": "~3.0", - "pm2-axon": "~4.0.1", - "pm2-axon-rpc": "~0.7.1", - "pm2-deploy": "~1.0.2", - "pm2-multimeter": "^0.1.2", - "promptly": "^2", - "semver": "^7.2", - "source-map-support": "0.5.21", - "sprintf-js": "1.1.2", - "vizion": "~2.2.1", - "yamljs": "0.3.0" - }, - "bin": { - "pm2": "bin/pm2", - "pm2-dev": "bin/pm2-dev", - "pm2-docker": "bin/pm2-docker", - "pm2-runtime": "bin/pm2-runtime" - }, - "engines": { - "node": ">=10.0.0" - }, - "optionalDependencies": { - "pm2-sysmonit": "^1.2.8" - } - }, - "node_modules/pm2-axon": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pm2-axon/-/pm2-axon-4.0.1.tgz", - "integrity": "sha512-kES/PeSLS8orT8dR5jMlNl+Yu4Ty3nbvZRmaAtROuVm9nYYGiaoXqqKQqQYzWQzMYWUKHMQTvBlirjE5GIIxqg==", - "dev": true, - "dependencies": { - "amp": "~0.3.1", - "amp-message": "~0.1.1", - "debug": "^4.3.1", - "escape-string-regexp": "^4.0.0" - }, - "engines": { - "node": ">=5" - } - }, - "node_modules/pm2-axon-rpc": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/pm2-axon-rpc/-/pm2-axon-rpc-0.7.1.tgz", - "integrity": "sha512-FbLvW60w+vEyvMjP/xom2UPhUN/2bVpdtLfKJeYM3gwzYhoTEEChCOICfFzxkxuoEleOlnpjie+n1nue91bDQw==", - "dev": true, - "dependencies": { - "debug": "^4.3.1" - }, - "engines": { - "node": ">=5" - } - }, - "node_modules/pm2-deploy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pm2-deploy/-/pm2-deploy-1.0.2.tgz", - "integrity": "sha512-YJx6RXKrVrWaphEYf++EdOOx9EH18vM8RSZN/P1Y+NokTKqYAca/ejXwVLyiEpNju4HPZEk3Y2uZouwMqUlcgg==", - "dev": true, - "dependencies": { - "run-series": "^1.1.8", - "tv4": "^1.3.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/pm2-multimeter": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/pm2-multimeter/-/pm2-multimeter-0.1.2.tgz", - "integrity": "sha512-S+wT6XfyKfd7SJIBqRgOctGxaBzUOmVQzTAS+cg04TsEUObJVreha7lvCfX8zzGVr871XwCSnHUU7DQQ5xEsfA==", - "dev": true, - "dependencies": { - "charm": "~0.1.1" - } - }, - "node_modules/pm2-sysmonit": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/pm2-sysmonit/-/pm2-sysmonit-1.2.8.tgz", - "integrity": "sha512-ACOhlONEXdCTVwKieBIQLSi2tQZ8eKinhcr9JpZSUAL8Qy0ajIgRtsLxG/lwPOW3JEKqPyw/UaHmTWhUzpP4kA==", - "dev": true, - "optional": true, - "dependencies": { - "async": "^3.2.0", - "debug": "^4.3.1", - "pidusage": "^2.0.21", - "systeminformation": "^5.7", - "tx2": "~1.0.4" - } - }, - "node_modules/pm2-sysmonit/node_modules/pidusage": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/pidusage/-/pidusage-2.0.21.tgz", - "integrity": "sha512-cv3xAQos+pugVX+BfXpHsbyz/dLzX+lr44zNMsYiGxUw+kV5sgQCIcLd1z+0vq+KyC7dJ+/ts2PsfgWfSC3WXA==", - "dev": true, - "optional": true, - "dependencies": { - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pm2/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pm2/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/postgres-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", - "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", - "engines": { - "node": ">=4" - } - }, - "node_modules/postgres-bytea": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", - "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postgres-date": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", - "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postgres-interval": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", - "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", - "dependencies": { - "xtend": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/promptly": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/promptly/-/promptly-2.2.0.tgz", - "integrity": "sha512-aC9j+BZsRSSzEsXBNBwDnAxujdx19HycZoKgRgzWnS8eOHg1asuf9heuLprfbe739zY3IdUQx+Egv6Jn135WHA==", - "dev": true, - "dependencies": { - "read": "^1.0.4" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-5.0.0.tgz", - "integrity": "sha512-gkH7BkvLVkSfX9Dk27W6TyNOWWZWRilRfk1XxGNWOYJ2TuedAv1yFpCaU9QSBmBe716XOTNpYNOzhysyw8xn7g==", - "dev": true, - "dependencies": { - "agent-base": "^6.0.0", - "debug": "4", - "http-proxy-agent": "^4.0.0", - "https-proxy-agent": "^5.0.0", - "lru-cache": "^5.1.1", - "pac-proxy-agent": "^5.0.0", - "proxy-from-env": "^1.0.0", - "socks-proxy-agent": "^5.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/proxy-agent/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/proxy-agent/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "node_modules/read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", - "dev": true, - "dependencies": { - "mute-stream": "~0.0.4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/require-in-the-middle": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-5.2.0.tgz", - "integrity": "sha512-efCx3b+0Z69/LGJmm9Yvi4cqEdxnoGnxYxGxBghkkTTFeXRtTCmmhO0AnAfHz59k957uTSuy8WaHqOs8wbYUWg==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "module-details-from-path": "^1.0.3", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/run-series": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/run-series/-/run-series-1.1.9.tgz", - "integrity": "sha512-Arc4hUN896vjkqCYrUXquBFtRZdv1PfLbTYP71efP6butxyQ0kWpiNJyAgsxscmQg1cqvHY32/UCBzXedTpU2g==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/shimmer": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", - "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==", - "dev": true - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "dev": true, - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "dev": true, - "dependencies": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz", - "integrity": "sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ==", - "dev": true, - "dependencies": { - "agent-base": "^6.0.2", - "debug": "4", - "socks": "^2.3.3" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/socks/node_modules/ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", - "dev": true - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - }, - "node_modules/standard": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/standard/-/standard-17.0.0.tgz", - "integrity": "sha512-GlCM9nzbLUkr+TYR5I2WQoIah4wHA2lMauqbyPLV/oI5gJxqhHzhjl9EG2N0lr/nRqI3KCbCvm/W3smxvLaChA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "eslint": "^8.13.0", - "eslint-config-standard": "17.0.0", - "eslint-config-standard-jsx": "^11.0.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-n": "^15.1.0", - "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-react": "^7.28.0", - "standard-engine": "^15.0.0" - }, - "bin": { - "standard": "bin/cmd.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/standard-engine": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-15.0.0.tgz", - "integrity": "sha512-4xwUhJNo1g/L2cleysUqUv7/btn7GEbYJvmgKrQ2vd/8pkTmN8cpqAZg+BT8Z1hNeEH787iWUdOpL8fmApLtxA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "get-stdin": "^8.0.0", - "minimist": "^1.2.6", - "pkg-conf": "^3.1.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "dev": true - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", - "integrity": "sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "regexp.prototype.flags": "^1.4.3", - "side-channel": "^1.0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/systeminformation": { - "version": "5.17.17", - "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.17.17.tgz", - "integrity": "sha512-iIuX4P7fHPmTgiwjQrWx1e3/HsUXrEwE71saGZ2vGUiIvIHU5hXiyZs4cBrOzA66UoefycBTxCpbNf0v7uHiEQ==", - "dev": true, - "optional": true, - "os": [ - "darwin", - "linux", - "win32", - "freebsd", - "openbsd", - "netbsd", - "sunos", - "android" - ], - "bin": { - "systeminformation": "lib/cli.js" - }, - "engines": { - "node": ">=8.0.0" - }, - "funding": { - "type": "Buy me a coffee", - "url": "https://www.buymeacoffee.com/systeminfo" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tsconfig-paths": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", - "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", - "dev": true, - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, - "node_modules/tv4": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz", - "integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/tx2": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tx2/-/tx2-1.0.5.tgz", - "integrity": "sha512-sJ24w0y03Md/bxzK4FU8J8JveYYUbSs2FViLJ2D/8bytSiyPRbuE3DyL/9UKYXTZlV3yXq0L8GLlhobTnekCVg==", - "dev": true, - "optional": true, - "dependencies": { - "json-stringify-safe": "^5.0.1" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/vizion": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/vizion/-/vizion-2.2.1.tgz", - "integrity": "sha512-sfAcO2yeSU0CSPFI/DmZp3FsFE9T+8913nv1xWBOyzODv13fwkn6Vl7HqxGpkr9F608M+8SuFId3s+BlZqfXww==", - "dev": true, - "dependencies": { - "async": "^2.6.3", - "git-node-fs": "^1.0.0", - "ini": "^1.3.5", - "js-git": "^0.7.8" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/vizion/node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/vm2": { - "version": "3.9.19", - "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.19.tgz", - "integrity": "sha512-J637XF0DHDMV57R6JyVsTak7nIL8gy5KH4r1HiwWLf/4GBbb5MKL5y7LpmF4A8E2nR6XmzpmMFQ7V7ppPTmUQg==", - "dev": true, - "dependencies": { - "acorn": "^8.7.0", - "acorn-walk": "^8.2.0" - }, - "bin": { - "vm2": "bin/vm2" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha512-xl/50/Cf32VsGq/1R8jJE5ajH1yMCQkpmoS10QbFZWl2Oor4H0Me64Pu2yxvsRWK3m6soJbmGfzSR7BYmDcWAA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yamljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", - "integrity": "sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "glob": "^7.0.5" - }, - "bin": { - "json2yaml": "bin/json2yaml", - "yaml2json": "bin/yaml2json" - } - }, - "node_modules/yamljs/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/yamljs/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 8290d39a81144d7b135da427e290b09bb91deca6..0000000000000000000000000000000000000000 --- a/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "module", - "scripts": { - "create-indexes": "node src/indexes.js", - "start": "pm2 start ecosystem.config.cjs", - "restart": "pm2 restart ecosystem.config.cjs", - "stop": "pm2 stop ecosystem.config.cjs", - "logs": "pm2 logs HafSQL-sync", - "list": "pm2 list" - }, - "dependencies": { - "diff-match-patch": "1.0.5", - "dotenv": "^16.0.3", - "json-bigint": "1.0.0", - "pg": "^8.10.0" - }, - "devDependencies": { - "pm2": "^5.3.0", - "standard": "^17.0.0" - } -} diff --git a/run.sh b/run.sh deleted file mode 100755 index 0baf9bac43cbafa89a040f92d133bb5e87b485ac..0000000000000000000000000000000000000000 --- a/run.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash - -#echo "Bash version ${BASH_VERSION}..." - -install_node() { - sudo apt -y update - sudo apt -y install curl - curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh - sudo bash nodesource_setup.sh - sudo apt install nodejs - echo "Node.js v18 installed." -} - -install() { - npm install -} - -start() { - npm run start -} - -stop() { - npm run stop -} - -restart() { - npm run restart -} - -logs() { - npm run logs -} - -help() { - echo "Usage: $0 COMMAND" - echo - echo "Commands: " - echo " install_node - install node.js v18" - echo " install - install dependencies" - echo " start - start hafsql" - echo " stop - stop hafsql" - echo " restart - restart hafsql" - echo " logs - display logs" - echo - exit -} - -case $1 in -install_node) - install_node - ;; -install) - install - ;; -start) - start - ;; -stop) - stop - ;; -restart) - restart - ;; -logs) - logs - ;; -*) - echo "Invalid cmd" - help - ;; -esac \ No newline at end of file diff --git a/src/dropIndexes.js b/src/dropIndexes.js deleted file mode 100644 index 8f26ec80581cac54adf142968bef690a48786901..0000000000000000000000000000000000000000 --- a/src/dropIndexes.js +++ /dev/null @@ -1,60 +0,0 @@ -import pg from 'pg' -import { config } from 'dotenv' -config() - -// Indexes need haf_admin access -const pool = new pg.Pool({ - application_name: 'HafSQL-indexes', - database: process.env.PGDATABASE || 'haf_block_log', - user: 'haf_admin', - host: process.env.PGHOST || '172.17.0.2', - port: process.env.PGPORT || 5432, - max: process.env.PGPOOLSIZE || 2, - min: 1 -}) - -const dropOperationIndexes = async () => { - await pool.query(`DROP INDEX IF EXISTS - hive.hive_operations_op_type_id_id_hafsql, - hive.hafsql_voter_idx, - hive.hafsql_author_idx, - hive.hafsql_author_permlink_idx, - hive.hafsql_parent_author_idx, - hive.hafsql_parent_author_parent_permlink_idx, - hive.hafsql_from_idx, - hive.hafsql_to_idx, - hive.hafsql_memo_idx, - hive.hafsql_account_idx, - hive.hafsql_owner_idx, - hive.hafsql_orderid_idx, - hive.hafsql_publisher_idx, - hive.hafsql_requestid_idx, - hive.hafsql_creator_idx, - hive.hafsql_new_account_name_idx, - hive.hafsql_witness_idx, - hive.hafsql_proxy_idx, - hive.hafsql_id_opid_idx, - hive.hafsql_from_account_idx, - hive.hafsql_to_account_idx, - hive.hafsql_account_to_recover_idx, - hive.hafsql_new_recovery_account_idx, - hive.hafsql_delegator_id_idx, - hive.hafsql_delegatee_idx, - hive.hafsql_curator_idx, - hive.hafsql_current_owner_idx, - hive.hafsql_current_orderid_idx, - hive.hafsql_open_owner_idx, - hive.hafsql_open_orderid_idx, - hive.hafsql_benefactor_idx, - hive.hafsql_producer_idx, - hive.hafsql_receiver_idx;`) -} - -const main = async () => { - console.log('Dropping indexes...') - await dropOperationIndexes() - console.log('Done.') - pool.end() -} - -main() diff --git a/src/indexes.js b/src/indexes.js deleted file mode 100644 index c3f19d67f0a46a54f758b47f974c953e56ed6167..0000000000000000000000000000000000000000 --- a/src/indexes.js +++ /dev/null @@ -1,281 +0,0 @@ -import pg from 'pg' -import { config } from 'dotenv' -config() - -// Indexes need haf_admin access -const pool = new pg.Pool({ - application_name: 'HafSQL-indexes', - database: process.env.PGDATABASE || 'haf_block_log', - user: 'haf_admin', - host: process.env.PGHOST || '172.17.0.2', - port: process.env.PGPORT || 5432, - max: process.env.PGPOOLSIZE || 2, - min: 1 -}) - -const CONCURRENTLY = process.env.CONCURRENTLY === 'false' ? '' : 'CONCURRENTLY' -const INDEXMAXTHREADS = process.env.INDEXMAXTHREADS || 4 -const SKIPINDEXES = process.env.SKIPOPERATIONINDEXES === true - -const OPs = 49 -const client = await pool.connect() -let i = 0 - -// Needed for sorting by ID asc or desc -const setupHafIndexes = async () => { - const pool = client - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hive_operations_op_type_id_id_hafsql ON hive.operations (op_type_id, id)` - ) - i++ -} - -export const setupOperationIndexes = async () => { - const pool = client - if (!SKIPINDEXES) { - // voter - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_voter_idx ON hive.operations ((body::jsonb->'value'->>'voter'), op_type_id, id DESC) - WHERE op_type_id IN (0, 45);` - ) - i++ - // author - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_author_idx ON hive.operations - ((body::jsonb->'value'->>'author'), op_type_id, id DESC) - WHERE op_type_id IN (0, 1, 17, 19, ${OPs + 2}, ${OPs + 4}, ${ - OPs + 23 - });` - ) - i++ - // parent_author - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_parent_author_idx ON hive.operations - ((body::jsonb->'value'->>'parent_author'), id DESC) WHERE op_type_id = 1;` - ) - i++ - // parent_author, parent_permlink - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_parent_author_parent_permlink_idx ON hive.operations - ((body::jsonb->'value'->>'parent_author'), (body::jsonb->'value'->>'parent_permlink'), id DESC) WHERE op_type_id = 1;` - ) - i++ - // from - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_from_idx ON hive.operations ((body::jsonb->'value'->>'from'), op_type_id, id DESC) - WHERE op_type_id IN (2, 3, 32, 33, 34, ${OPs + 10});` - ) - i++ - // to - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_to_idx ON hive.operations ((body::jsonb->'value'->>'to'), op_type_id, id DESC) - WHERE op_type_id IN (2, 3, 32, 33, ${OPs + 10});` - ) - i++ - // memo - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_memo_idx ON hive.operations ((body::jsonb->'value'->>'memo'), op_type_id, id DESC) - WHERE op_type_id IN (2, 32, 33, 49, ${OPs + 10}, ${OPs + 34}, ${ - OPs + 35 - });` - ) - i++ - // account - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_account_idx ON hive.operations ((body::jsonb->'value'->>'account'), op_type_id, id DESC) - WHERE op_type_id IN(4, 10, 12, 13, 39, 43, ${OPs + 13}, ${OPs + 27});` - ) - i++ - // owner - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_owner_idx ON hive.operations ((body::jsonb->'value'->>'owner'), op_type_id, id DESC) - WHERE op_type_id IN (5, 6, 8, 11, 21, 42, 48, ${OPs + 1}, ${OPs + 26}, ${ - OPs + 32 - }, ${OPs + 39});` - ) - i++ - // orderid - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_orderid_idx ON hive.operations ((body::jsonb->'value'->>'orderid'), op_type_id, id DESC) - WHERE op_type_id IN (5, 6, 21);` - ) - i++ - // publisher - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_publisher_idx ON hive.operations ((body::jsonb->'value'->>'publisher'), id DESC) - WHERE op_type_id = 7;` - ) - i++ - // requestid - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_requestid_idx ON hive.operations ((body::jsonb->'value'->>'requestid'), op_type_id, id DESC) - WHERE op_type_id IN (8, 48, ${OPs + 1}, ${OPs + 32}, ${OPs + 39});` - ) - i++ - // creator - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_creator_idx ON hive.operations ((body::jsonb->'value'->>'creator'), op_type_id, id DESC) - WHERE op_type_id IN(9, 22, 23, 41, ${OPs + 31});` - ) - i++ - // new_account_name - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_new_account_name_idx ON hive.operations ((body::jsonb->'value'->>'new_account_name'), op_type_id, id DESC) - WHERE op_type_id IN(9, 23, 41, ${OPs + 31});` - ) - i++ - // witness - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_witness_idx ON hive.operations ((body::jsonb->'value'->>'witness'), id DESC) - WHERE op_type_id = 12;` - ) - i++ - // proxy - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_proxy_idx ON hive.operations ((body::jsonb->'value'->>'proxy'), id DESC) - WHERE op_type_id = 13;` - ) - i++ - // from_account - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_from_account_idx ON hive.operations ((body::jsonb->'value'->>'from_account'), op_type_id, id DESC) - WHERE op_type_id IN (20, ${OPs + 7});` - ) - i++ - // to_account - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_to_account_idx ON hive.operations ((body::jsonb->'value'->>'to_account'), op_type_id, id DESC) - WHERE op_type_id IN (20, ${OPs + 7});` - ) - i++ - // account_to_recover - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_account_to_recover_idx ON hive.operations ((body::jsonb->'value'->>'account_to_recover'), id DESC) - WHERE op_type_id = 26;` - ) - i++ - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_new_recovery_account_idx ON hive.operations ((body::jsonb->'value'->>'new_recovery_account'), id DESC) - WHERE op_type_id = 26;` - ) - i++ - // delegator - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_delegator_id_idx ON hive.operations ((body::jsonb->'value'->>'delegator'), id DESC) - WHERE op_type_id = 40;` - ) - i++ - // delegatee - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_delegatee_idx ON hive.operations ((body::jsonb->'value'->>'delegatee'), id DESC) - WHERE op_type_id = 40;` - ) - i++ - } - - /** Can't skip */ - // author, permlink -* used in comments - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_author_permlink_idx ON hive.operations - ((body::jsonb->'value'->>'author'), (body::jsonb->'value'->>'permlink'), op_type_id, id DESC) - WHERE op_type_id IN (0, 1, 17, 19, ${OPs + 2}, ${OPs + 4}, ${OPs + 23});` - ) - i++ - // id -* used in follows, communities - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_id_opid_idx ON hive.operations ((body::jsonb->'value'->>'id'), op_type_id, id DESC) - WHERE op_type_id IN (15, 18);` - ) - i++ -} - -export const setupVirtualOperationIndexes = async () => { - const pool = client - if (!SKIPINDEXES) { - // curator - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_curator_idx ON hive.operations ((body::jsonb->'value'->>'curator'), id DESC) - WHERE op_type_id = ${OPs + 3};` - ) - i++ - // VOFillOrder 49 + 8 - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_current_owner_idx ON hive.operations ((body::jsonb->'value'->>'current_owner'), id DESC) - WHERE op_type_id = ${OPs + 8};` - ) - i++ - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_current_orderid_idx ON hive.operations ((body::jsonb->'value'->>'current_orderid'), id DESC) - WHERE op_type_id = ${OPs + 8};` - ) - i++ - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_open_owner_idx ON hive.operations ((body::jsonb->'value'->>'open_owner'), id DESC) - WHERE op_type_id = ${OPs + 8};` - ) - i++ - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_open_orderid_idx ON hive.operations ((body::jsonb->'value'->>'open_orderid'), id DESC) - WHERE op_type_id = ${OPs + 8};` - ) - i++ - // VOCommentBenefactorReward 49 + 14 - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_benefactor_idx ON hive.operations ((body::jsonb->'value'->>'benefactor'), id DESC) - WHERE op_type_id = ${OPs + 14};` - ) - i++ - // VOProducerReward 49 + 15 - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_producer_idx ON hive.operations ((body::jsonb->'value'->>'producer'), id DESC) - WHERE op_type_id = ${OPs + 15};` - ) - i++ - // VOProposalPay 49 + 17 - await pool.query( - `CREATE INDEX ${CONCURRENTLY} IF NOT EXISTS hafsql_receiver_idx ON hive.operations ((body::jsonb->'value'->>'receiver'), id DESC) - WHERE op_type_id = ${OPs + 17};` - ) - i++ - } -} - -const main = async () => { - const startTime = Date.now() / 1000 - console.log( - `Creating indexes ${CONCURRENTLY} if not exists. It will take a long time...` - ) - // client = await pool.connect() - await client.query( - `SET max_parallel_maintenance_workers = ${INDEXMAXTHREADS};` - ) - await client.query('CREATE EXTENSION IF NOT EXISTS btree_gin;') - await setupOperationIndexes() - await setupVirtualOperationIndexes() - await setupHafIndexes() - clearInterval(interval1) - const timeSpent = (Date.now() / 1000 - startTime) / 60 - console.log(`Indexes done. Total time spent = ${timeSpent} minutes`) - console.log('Draining the pool...') - client.release(true) - pool.end() -} - -const gracefulShutdown = async () => { - console.info('Shutting down... a moment please.') - await pool.end() - console.log('Postgresql pool drained.') - process.exit() -} -process.on('SIGTERM', () => gracefulShutdown()) -process.on('SIGINT', () => gracefulShutdown()) - -main() - -let i2 = 0 -const interval1 = setInterval(() => { - if (i !== i2) { - console.log('Index created... ' + i) - } - i2 = i -}, 10000) diff --git a/src/main.js b/src/main.js deleted file mode 100644 index ff5b586232f35d05d3ac8a8cf0619656b67d3104..0000000000000000000000000000000000000000 --- a/src/main.js +++ /dev/null @@ -1,114 +0,0 @@ -import { config } from 'dotenv' -import { - fillDelegations, - syncDelegations -} from '../helpers/syncs/delegations.js' -import { - fillRCDelegations, - syncRCDelegations -} from '../helpers/syncs/rcDelegations.js' -import { - fillProposalApprovals, - syncProposalApprovals -} from '../helpers/syncs/proposalApprovals.js' -import { fillFollows, syncFollows } from '../helpers/syncs/follows.js' -import { fillComments, syncComments } from '../helpers/syncs/comments.js' -import { fillRewards, syncRewards } from '../helpers/syncs/rewards.js' -import { fillReblogs, syncReblogs } from '../helpers/syncs/reblogs.js' -import { fillCommunities, syncCommunities } from '../helpers/syncs/communities.js' -import { setup } from './setup.js' -import { createLastIndexes } from '../helpers/setups/tables.js' -import { fillDeleteComments, syncDeleteComments } from '../helpers/syncs/deleteComments.js' -config() - -const main = async () => { - await setup() - const now = Date.now() - - await fillings() - - // Indexes - console.log('Creating related indexes...') - await createLastIndexes() - - const timeSpent = (Date.now() - now) / 1000 - console.log( - 'Sync done in ' + timeSpent / 60 + ' minutes. Live sync starting...' - ) - - startSyncing() - - console.log('Live sync ready and running.') -} - -const fillings = async () => { - if (process.env.DELEGATIONS !== false) { - console.log('Syncing delegations...') - await fillDelegations() - } - - if (process.env.RCDELEGATIONS !== false) { - console.log('Syncing RC delegations...') - await fillRCDelegations() - } - - if (process.env.PROPOSALS !== false) { - console.log('Syncing proposals...') - await fillProposalApprovals() - } - - if (process.env.FOLLOWS !== false) { - console.log('Syncing follows, mutes, blacklists, ...') - await fillFollows() - } - - if (process.env.COMMENTS !== false) { - console.log('Syncing comments...') - await fillComments() - - console.log('Syncing deleted comments...') - await fillDeleteComments() - - console.log('Syncing rewards...') - await fillRewards() - - console.log('Syncing reblogs...') - await fillReblogs() - } - - if (process.env.COMMUNITIES !== false) { - console.log('Syncing communities...') - await fillCommunities() - } -} - -const startSyncing = async () => { - if (process.env.DELEGATIONS !== false) { - syncDelegations() - } - - if (process.env.RCDELEGATIONS !== false) { - syncRCDelegations() - } - - if (process.env.PROPOSALS !== false) { - syncProposalApprovals() - } - - if (process.env.FOLLOWS !== false) { - syncFollows() - } - - if (process.env.COMMENTS !== false) { - syncComments() - syncDeleteComments() - syncRewards() - syncReblogs() - } - - if (process.env.COMMUNITIES !== false) { - syncCommunities() - } -} - -main() diff --git a/src/setup.js b/src/setup.js deleted file mode 100644 index 414fae0380dd174c6b555d084c7de765f4ba2667..0000000000000000000000000000000000000000 --- a/src/setup.js +++ /dev/null @@ -1,20 +0,0 @@ -import { removeOperationViews, setupOperationViews } from '../helpers/setups/operations.js' -import { removeVirtualOperationViews, setupVirtualOperationViews } from '../helpers/setups/virtualOperations.js' -import { setupFunctions } from '../helpers/setups/functions.js' -import { setupSchema } from '../helpers/setups/schema.js' -import { setupTables } from '../helpers/setups/tables.js' -import { removeExtraViews, setupExtraViews } from '../helpers/setups/extraViews.js' - -// Creating hafsql schema and all the views -export const setup = async () => { - console.log('Setting up Views...') - await setupSchema() - await setupFunctions() - await removeExtraViews() - await removeVirtualOperationViews() - await removeOperationViews() - await setupOperationViews() - await setupVirtualOperationViews() - await setupTables() - await setupExtraViews() -}