harperdb 4.2.8 → 4.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/harperdb.js +57 -63
- package/bin/lite.js +18 -26
- package/config/yaml/defaultConfig.yaml +2 -0
- package/launchServiceScripts/launchInstallNATSServer.js +3 -3
- package/launchServiceScripts/launchNatsIngestService.js +18 -21
- package/launchServiceScripts/launchNatsReplyService.js +18 -21
- package/launchServiceScripts/launchUpdateNodes4-0-0.js +18 -21
- package/npm-shrinkwrap.json +844 -1216
- package/package.json +19 -17
- package/resources/DatabaseTransaction.d.ts +3 -1
- package/resources/RecordEncoder.d.ts +1 -0
- package/resources/Resource.d.ts +6 -17
- package/resources/Table.d.ts +50 -36
- package/resources/auditStore.d.ts +2 -2
- package/resources/crdt.d.ts +19 -0
- package/resources/databases.d.ts +32 -36
- package/resources/search.d.ts +6 -21
- package/resources/tracked.d.ts +7 -1
- package/resources/transactionBroadcast.d.ts +1 -1
- package/server/Server.d.ts +1 -1
- package/server/jobs/jobProcess.js +18 -21
- package/server/threads/threadServer.js +18 -26
- package/studio/build-local/asset-manifest.json +53 -0
- package/studio/build-local/fontawesome/fa-brands-400.eot +0 -0
- package/studio/build-local/fontawesome/fa-brands-400.svg +3717 -0
- package/studio/build-local/fontawesome/fa-brands-400.ttf +0 -0
- package/studio/build-local/fontawesome/fa-brands-400.woff +0 -0
- package/studio/build-local/fontawesome/fa-brands-400.woff2 +0 -0
- package/studio/build-local/fontawesome/fa-regular-400.eot +0 -0
- package/studio/build-local/fontawesome/fa-regular-400.svg +801 -0
- package/studio/build-local/fontawesome/fa-regular-400.ttf +0 -0
- package/studio/build-local/fontawesome/fa-regular-400.woff +0 -0
- package/studio/build-local/fontawesome/fa-regular-400.woff2 +0 -0
- package/studio/build-local/fontawesome/fa-solid-900.eot +0 -0
- package/studio/build-local/fontawesome/fa-solid-900.svg +5034 -0
- package/studio/build-local/fontawesome/fa-solid-900.ttf +0 -0
- package/studio/build-local/fontawesome/fa-solid-900.woff +0 -0
- package/studio/build-local/fontawesome/fa-solid-900.woff2 +0 -0
- package/studio/build-local/fontawesome/fontawesome.css +5 -0
- package/studio/build-local/fontawesome/fontawesome.js +5 -0
- package/studio/build-local/images/favicon_akamai.png +0 -0
- package/studio/build-local/images/favicon_dark.png +0 -0
- package/studio/build-local/images/favicon_light.png +0 -0
- package/studio/build-local/images/favicon_lumen.png +0 -0
- package/studio/build-local/images/favicon_purple.png +0 -0
- package/studio/build-local/images/favicon_verizon.png +0 -0
- package/studio/build-local/images/logo_circle.png +0 -0
- package/studio/build-local/images/logo_manifest.png +0 -0
- package/studio/build-local/index.html +1 -0
- package/studio/build-local/js/kissmetrics.js +24 -0
- package/studio/build-local/js/linkedin.js +33 -0
- package/studio/build-local/manifest.json +20 -0
- package/studio/build-local/robots.txt +3 -0
- package/studio/{running.html → build-local/running.html} +2 -2
- package/studio/build-local/static/css/main.038ec116.css +13 -0
- package/studio/build-local/static/js/110.ca4244a6.chunk.js +2 -0
- package/studio/build-local/static/js/110.ca4244a6.chunk.js.LICENSE.txt +1 -0
- package/studio/build-local/static/js/228.302d7db9.chunk.js +1 -0
- package/studio/build-local/static/js/287.21477cf9.chunk.js +1 -0
- package/studio/build-local/static/js/409.17daa4fe.chunk.js +2 -0
- package/studio/build-local/static/js/409.17daa4fe.chunk.js.LICENSE.txt +8 -0
- package/studio/build-local/static/js/424.7d57284b.chunk.js +1 -0
- package/studio/build-local/static/js/446.5237e847.chunk.js +2 -0
- package/studio/build-local/static/js/446.5237e847.chunk.js.LICENSE.txt +13 -0
- package/studio/build-local/static/js/662.02ce7b65.chunk.js +1 -0
- package/studio/build-local/static/js/718.74e9355d.chunk.js +1 -0
- package/studio/build-local/static/js/723.36068040.chunk.js +2 -0
- package/studio/build-local/static/js/723.36068040.chunk.js.LICENSE.txt +5 -0
- package/studio/build-local/static/js/731.8a941eb3.chunk.js +1 -0
- package/studio/build-local/static/js/807.3473ab0a.chunk.js +2 -0
- package/studio/build-local/static/js/807.3473ab0a.chunk.js.LICENSE.txt +5 -0
- package/studio/build-local/static/js/926.88d6f9ce.chunk.js +1 -0
- package/studio/build-local/static/js/browse-csvupload.5e77eb8a.chunk.js +1 -0
- package/studio/build-local/static/js/browse-datatable.cd71d518.chunk.js +1 -0
- package/studio/build-local/static/js/browse-entitymanager.09237801.chunk.js +1 -0
- package/studio/build-local/static/js/browse-jsonviewer.fcccabdc.chunk.js +1 -0
- package/studio/build-local/static/js/custom-functions.98af4a5e.chunk.js +1 -0
- package/studio/build-local/static/js/instance-charts.f1a1969d.chunk.js +1 -0
- package/studio/build-local/static/js/instance-cluster.0dc3ac1b.chunk.js +1 -0
- package/studio/build-local/static/js/instance-config.19223fab.chunk.js +1 -0
- package/studio/build-local/static/js/instance-query.ed7e59f5.chunk.js +1 -0
- package/studio/build-local/static/js/instance-roles.9c3f140d.chunk.js +1 -0
- package/studio/build-local/static/js/instance-status.1687cd77.chunk.js +1 -0
- package/studio/build-local/static/js/instance-users-datatable.ced7813f.chunk.js +1 -0
- package/studio/build-local/static/js/instance-users-edit.436e0908.chunk.js +1 -0
- package/studio/build-local/static/js/instance-users.12c0c117.chunk.js +1 -0
- package/studio/build-local/static/js/instance.b8863754.chunk.js +1 -0
- package/studio/build-local/static/js/instances.5bd051eb.chunk.js +1 -0
- package/studio/build-local/static/js/main.824bbe07.js +2 -0
- package/studio/{hdb.js.LICENSE.txt → build-local/static/js/main.824bbe07.js.LICENSE.txt} +41 -35
- package/studio/build-local/static/js/offline-app.b3ad12ac.chunk.js +1 -0
- package/studio/build-local/static/js/online-app.2ac03c15.chunk.js +1 -0
- package/studio/build-local/static/js/organization-billing.a8014c6f.chunk.js +1 -0
- package/studio/build-local/static/js/organization-users.523136d9.chunk.js +1 -0
- package/studio/build-local/static/js/organization.0abc89ca.chunk.js +1 -0
- package/studio/build-local/static/js/organizations.e536b86f.chunk.js +1 -0
- package/studio/build-local/static/js/profile.92f9be59.chunk.js +1 -0
- package/studio/build-local/static/js/resetPassword.8fdfba77.chunk.js +1 -0
- package/studio/build-local/static/js/roles-jsonviewer.5fe72bc9.chunk.js +1 -0
- package/studio/build-local/static/js/signIn.97bded2f.chunk.js +1 -0
- package/studio/build-local/static/js/signUp.482f9fe4.chunk.js +1 -0
- package/studio/build-local/static/js/structure-reloader.9322abd3.chunk.js +1 -0
- package/studio/build-local/static/js/topnav.5e7913a5.chunk.js +1 -0
- package/studio/build-local/static/js/updatePassword.e23019c7.chunk.js +1 -0
- package/utility/scripts/restartHdb.js +18 -21
- package/dependencies/nats-server.zip +0 -0
- package/studio/fonts/FontAwesome.otf +0 -0
- package/studio/fonts/fontawesome-webfont.eot +0 -0
- package/studio/fonts/fontawesome-webfont.svg +0 -2671
- package/studio/fonts/fontawesome-webfont.ttf +0 -0
- package/studio/fonts/fontawesome-webfont.woff +0 -0
- package/studio/fonts/fontawesome-webfont.woff2 +0 -0
- package/studio/hdb.css +0 -4
- package/studio/hdb.js +0 -2
- package/studio/images/logo.png +0 -0
- package/studio/index.html +0 -1
- package/studio/processCSV.worker.js +0 -1
|
@@ -73,6 +73,7 @@ mqtt:
|
|
|
73
73
|
network:
|
|
74
74
|
port: 1883
|
|
75
75
|
securePort: 8883
|
|
76
|
+
mtls: false
|
|
76
77
|
webSocket: true
|
|
77
78
|
requireAuthentication: true
|
|
78
79
|
operationsApi:
|
|
@@ -80,6 +81,7 @@ operationsApi:
|
|
|
80
81
|
cors: true
|
|
81
82
|
corsAccessList:
|
|
82
83
|
- "*"
|
|
84
|
+
domainSocket: hdb/operations-server
|
|
83
85
|
port: 9925
|
|
84
86
|
securePort: null
|
|
85
87
|
rootPath: null
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var u_=Object.defineProperty;var i=(t,E)=>u_(t,"name",{value:E,configurable:!0});var p=(t,E)=>()=>(E||t((E={exports:{}}).exports,E),E.exports);var q=p((iE,x)=>{"use strict";var{platform:RE}=require("os"),C_="nats-server.zip",v="nats-server",L_=process.platform==="win32"?`${v}.exe`:v,y="HDB",U_=/^[^\s.,*>]+$/,j="__request__",d_=i(t=>`${t}.${j}`,"REQUEST_SUBJECT"),p_={NATS_MSG_ID:"Nats-Msg-Id",ORIGIN:"origin",TRANSACTED_NODES:"transacted_nodes"},P_={HUB_SERVER:"hub.json",LEAF_SERVER:"leaf.json"},D_={HUB:"hub.pid",LEAF:"leaf.pid"},m_={HUB:"-hub",LEAF:"-leaf",ADMIN:"-admin"},g_={stream_name:"__HARPERDB_WORK_QUEUE__",durable_name:"HDB_WORK_QUEUE",deliver_group:y,deliver_subject:"__HDB__.WORKQUEUE"},G_={stream_name:"__HARPERDB_SCHEMA_QUEUE__",durable_name:"HDB_SCHEMA_QUEUE",deliver_group:y,deliver_subject:"HDB.SCHEMAQUEUE"},M_={stream_name:"__HARPERDB_USER_QUEUE__",durable_name:"HDB_USER_QUEUE",deliver_group:y,deliver_subject:"HDB.USERQUEUE"},h_={SUCCESS:"success",ERROR:"error"},H_={OPEN:"open",CLOSED:"closed",NO_RESPONDERS:"NoResponders",TIMEOUT:"Timeout"},f_={TXN:"txn",MSGID:"msgid"},U={ERR:"error",WRN:"warn",INF:"info",DBG:"debug",TRC:"trace"},B_={[U.ERR]:1,[U.WRN]:2,[U.INF]:3,[U.DBG]:4,[U.TRC]:5},b_={debug:"-D",trace:"-DVV"};x.exports={NATS_SERVER_ZIP:C_,NATS_SERVER_NAME:v,NATS_BINARY_NAME:L_,PID_FILES:D_,NATS_CONFIG_FILES:P_,SERVER_SUFFIX:m_,WORK_QUEUE_CONSUMER_NAMES:g_,SCHEMA_QUEUE_CONSUMER_NAMES:G_,USER_QUEUE_CONSUMER_NAMES:M_,NATS_TERM_CONSTRAINTS_RX:U_,REQUEST_SUFFIX:j,UPDATE_REMOTE_RESPONSE_STATUSES:h_,CLUSTER_STATUS_STATUSES:H_,REQUEST_SUBJECT:d_,SUBJECT_PREFIXES:f_,MSG_HEADERS:p_,LOG_LEVELS:U,LOG_LEVEL_FLAGS:b_,LOG_LEVEL_HIERARCHY:B_}});var Q=p((AE,X)=>{var F_=require("fast-glob"),{statSync:K,existsSync:V,readFileSync:v_,writeFileSync:y_}=require("fs"),{spawnSync:K_,spawn:V_,execFileSync:cE}=require("child_process"),{isMainThread:w_}=require("worker_threads"),{join:I,relative:$}=require("path"),{PACKAGE_ROOT:A}=k(),{tmpdir:k_,platform:Y_}=require("os");require("source-map-support").install();var W_=["resources","server","dataLayer","components"],P="ts-build",w,j_=__filename.endsWith("tsBuild.js");if(j_){if(w_){let T;try{K(I(A,P)),T=!0}catch{}if(T)for(let o of F_.sync(W_.map(n=>n+"/**/*.ts"),{cwd:A})){let n=0,r=0;try{n=K(I(A,o)).mtimeMs-5e3,r=K(I(A,P,o.replace(/.ts$/,".js"))).mtimeMs}catch{}if(n>r){console.warn(`TypeScript ${o} is not compiled`+(r?` (TS source file was modified at ${new Date(n)} and compiled file at ${new Date(r)})`:"")+", consider enabling auto-compilation of TypeScript in your IDE), compiling now."),w=!0;break}}else console.log("TypeScript modules are not compiled, compiling now"),w=!0;if(w){let o=I(A,"node_modules/.bin/tsc");Y_()==="win32"&&(o+=".cmd");let n=K_(o,{cwd:A});if(n.stdout.length&&console.log(n.stdout.toString()),n.stderr.length&&console.log(n.stderr.toString()),T){let r=I(k_(),"harperdb-tsc.pid"),c;if(V(r))try{process.kill(+v_(r,{encoding:"utf8"}),0),c=!0}catch{}if(!c){console.log("starting tsc background process");let a=V_(o,["--watch"],{cwd:A,detached:!0,stdio:"ignore"});y_(r,a.pid.toString()),a.unref()}}}}let t=X.constructor,E=t._findPath;t._findPath=function(T,o,n){if(T.startsWith(".")&&!n&&o.length===1&&o[0].startsWith(A)&&!o[0].includes("node_modules")){let r=$(A,o[0]),c;r.startsWith(P)?c=I(A,$(P,r)):c=I(A,P,r);let a=I(c,T),d=a+".js";if(V(d))return d;if(a.includes(".")&&V(a))return a}return E(T,o,n)}}});var k=p((IE,R_)=>{"use strict";var O=require("path"),x_=require("fs"),{relative:aE,join:NE}=O,{existsSync:q_}=x_;function $_(){let t=__dirname;for(;!q_(O.join(t,"package.json"));){let E=O.dirname(t);if(E===t)throw new Error("Could not find package root");t=E}return t}i($_,"getHDBPackageRoot");var l=$_(),J="js",M=J,X_="harperdb-config.yaml",Q_="defaultConfig.yaml",J_="hdb",z=`harperdb.${M}`,Z=`customFunctionsServer.${M}`,z_=`restartHdb.${M}`,W="HarperDB",G="Custom Functions",h="Clustering Hub",H="Clustering Leaf",Z_="Clustering Ingest Service",_e="Clustering Reply Service",ee="foreground.pid",te="hdb.pid",Ee="data",Te={HDB:W,CLUSTERING_HUB:h,CLUSTERING_LEAF:H,CLUSTERING_INGEST_SERVICE:Z_,CLUSTERING_REPLY_SERVICE:_e,CUSTOM_FUNCTIONS:G,RESTART_HDB:"Restart HDB",INSTALL:"Install",RUN:"Run",STOP:"Stop",UPGRADE:"Upgrade",REGISTER:"Register",JOB:"Job",CLUSTERING_UPGRADE_4_0_0:"Upgrade-4-0-0"},se={HDB:"hdb.log",INSTALL:"install.log",CLUSTERING_HUB:"clustering_hub.log",CLUSTERING_LEAF:"clustering_leaf.log"},oe={NOTIFY:"notify",FATAL:"fatal",ERROR:"error",WARN:"warn",INFO:"info",DEBUG:"debug",TRACE:"trace"},re={harperdb:W,"clustering hub":h,"clustering leaf":H,"custom functions":G,custom_functions:G,clustering:"clustering","clustering config":"clustering config",clustering_config:"clustering_config",http_workers:"http_workers"},ne={CLUSTERING_HUB_PROC_DESCRIPTOR:h,CLUSTERING_LEAF_PROC_DESCRIPTOR:H},Y={HDB:O.join(l,"server/harperdb"),CUSTOM_FUNCTIONS:O.join(l,"server/customFunctions"),CLUSTERING_HUB:O.join(l,"server/nats"),CLUSTERING_LEAF:O.join(l,"server/nats")},Se={HDB:O.join(Y.HDB,z),CUSTOM_FUNCTIONS:O.join(Y.CUSTOM_FUNCTIONS,Z)},Re={MAIN:"bin/harperdb.js",NATS_INGEST_SERVICE:O.join(l,"launchServiceScripts/launchNatsIngestService.js"),NATS_REPLY_SERVICE:O.join(l,"launchServiceScripts/launchNatsReplyService.js"),NODES_UPGRADE_4_0_0:O.join(l,"launchServiceScripts/launchUpdateNodes4-0-0.js")},ie={SUPER_USER:"super_user",CLUSTER_USER:"cluster_user"},__="support@harperdb.io",Oe="customer-success@harperdb.io",e_=1,ce=4141,t_="https://harperdbhelp.zendesk.com/hc/en-us/requests/new",Ae="https://www.harperdb.io/product",ae=`For support, please submit a request at ${t_} or contact ${__}`,E_=`For license support, please contact ${Oe}`,Ne="None of the specified records were found.",Ie="hash attribute not found",le=`Your current license only supports ${e_} role. ${E_}`,ue="Your current license only supports 3 connections to a node.",Ce="127.0.0.1",Le=1,Ue=/^\.$/,de=/^\.\.$/,pe="U+002E",Pe=/\//g,De="U+002F",me=/U\+002F/g,ge=/^U\+002E$/,Ge=/^U\+002EU\+002E$/,Me="d",he=999999,He="*",fe="--max-old-space-size=",Be="system",be="__hdb_hash",Fe=".harperdb",ve=".hdb",ye="keys",Ke="hdb_boot_properties.file",Ve=".updateConfig.json",we="SIGTSTP",ke=24,Ye=6e4,We=448,je="blob",xe="trash",qe="database",$e="schema",Xe="transactions",Qe=".count",Je="id",ze="PROCESS_NAME",T_={SETTINGS_PATH_KEY:"settings_path"},s_=require("lodash"),Ze={TC_AGREEMENT:"TC_AGREEMENT",CLUSTERING_USER:"CLUSTERING_USER",CLUSTERING_PASSWORD:"CLUSTERING_PASSWORD",HDB_ADMIN_USERNAME:"HDB_ADMIN_USERNAME",HDB_ADMIN_PASSWORD:"HDB_ADMIN_PASSWORD",OPERATIONSAPI_ROOT:"OPERATIONSAPI_ROOT",ROOTPATH:"ROOTPATH",OPERATIONSAPI_NETWORK_PORT:"OPERATIONSAPI_NETWORK_PORT",CLUSTERING_NODENAME:"CLUSTERING_NODENAME",CLUSTERING_ENABLED:"CLUSTERING_ENABLED",HDB_CONFIG:"HDB_CONFIG",CLUSTERING_PORT:"CLUSTERING_PORT",HDB_ROOT:"HDB_ROOT",SERVER_PORT:"SERVER_PORT",NODE_NAME:"NODE_NAME",CLUSTERING:"CLUSTERING"},_t={HDB_PATH_KEY:"HDB_INTERNAL_PATH",HDB_AUTH_HEADER:"hdb_auth_header",HDB_USER_DATA_KEY:"hdb_user",CHUNK_SIZE:1e3,MAX_CHARACTER_SIZE:250},et={DATA_VERSION:"data_version",UPGRADE_VERSION:"upgrade_version"},tt={JOB_TABLE_NAME:"hdb_job",NODE_TABLE_NAME:"hdb_nodes",ATTRIBUTE_TABLE_NAME:"hdb_attribute",LICENSE_TABLE_NAME:"hdb_license",ROLE_TABLE_NAME:"hdb_role",SCHEMA_TABLE_NAME:"hdb_schema",TABLE_TABLE_NAME:"hdb_table",USER_TABLE_NAME:"hdb_user",INFO_TABLE_NAME:"hdb_info"},Et={JOB_TABLE_HASH_ATTRIBUTE:"id",NODE_TABLE_HASH_ATTRIBUTE:"name",ATTRIBUTE_TABLE_HASH_ATTRIBUTE:"id",LICENSE_TABLE_HASH_ATTRIBUTE:"license_key",ROLE_TABLE_HASH_ATTRIBUTE:"id",SCHEMA_TABLE_HASH_ATTRIBUTE:"name",TABLE_TABLE_HASH_ATTRIBUTE:"id",USER_TABLE_HASH_ATTRIBUTE:"username",INFO_TABLE_ATTRIBUTE:"info_id"},R="hdb_internal:",Tt={CREATE_SCHEMA:R+"create_schema",CREATE_TABLE:R+"create_table",CREATE_ATTRIBUTE:R+"create_attribute",ADD_USER:R+"add_user",ALTER_USER:R+"alter_user",DROP_USER:R+"drop_user",HDB_NODES:R+"hdb_nodes",HDB_USERS:R+"hdb_users",HDB_WORKERS:R+"hdb_workers",CATCHUP:R+"catchup",SCHEMA_CATCHUP:R+"schema_catchup",WORKER_ROOM:R+"cluster_workers"},st={ATTR_ATTRIBUTE_KEY:"attribute",ATTR_CREATEDDATE_KEY:"createddate",ATTR_HASH_ATTRIBUTE_KEY:"hash_attribute",ATTR_ID_KEY:"id",ATTR_NAME_KEY:"name",ATTR_PASSWORD_KEY:"password",ATTR_RESIDENCE_KEY:"residence",ATTR_ROLE_KEY:"role",ATTR_SCHEMA_KEY:"schema",ATTR_SCHEMA_TABLE_KEY:"schema_table",ATTR_TABLE_KEY:"table",ATTR_USERNAME_KEY:"username"},ot="060493.ks",rt=".license",nt={CREATED:"CREATED",IN_PROGRESS:"IN_PROGRESS",COMPLETE:"COMPLETE",ERROR:"ERROR"},e={INSERT:"insert",UPDATE:"update",UPSERT:"upsert",SEARCH_BY_CONDITIONS:"search_by_conditions",SEARCH_BY_HASH:"search_by_hash",SEARCH_BY_ID:"search_by_id",SEARCH_BY_VALUE:"search_by_value",SEARCH:"search",SQL:"sql",CSV_DATA_LOAD:"csv_data_load",CSV_FILE_LOAD:"csv_file_load",CSV_URL_LOAD:"csv_url_load",CREATE_SCHEMA:"create_schema",CREATE_DATABASE:"create_database",CREATE_TABLE:"create_table",CREATE_ATTRIBUTE:"create_attribute",DROP_SCHEMA:"drop_schema",DROP_DATABASE:"drop_database",DROP_TABLE:"drop_table",DESCRIBE_SCHEMA:"describe_schema",DESCRIBE_DATABASE:"describe_database",DESCRIBE_TABLE:"describe_table",DESCRIBE_ALL:"describe_all",DELETE:"delete",ADD_USER:"add_user",ALTER_USER:"alter_user",DROP_USER:"drop_user",LIST_USERS:"list_users",LIST_ROLES:"list_roles",ADD_ROLE:"add_role",ALTER_ROLE:"alter_role",DROP_ROLE:"drop_role",USER_INFO:"user_info",READ_LOG:"read_log",ADD_NODE:"add_node",UPDATE_NODE:"update_node",EXPORT_TO_S3:"export_to_s3",IMPORT_FROM_S3:"import_from_s3",DELETE_FILES_BEFORE:"delete_files_before",DELETE_RECORDS_BEFORE:"delete_records_before",EXPORT_LOCAL:"export_local",SEARCH_JOBS_BY_START_DATE:"search_jobs_by_start_date",GET_JOB:"get_job",DELETE_JOB:"delete_job",UPDATE_JOB:"update_job",GET_FINGERPRINT:"get_fingerprint",SET_LICENSE:"set_license",GET_REGISTRATION_INFO:"registration_info",CONFIGURE_CLUSTER:"configure_cluster",SET_CONFIGURATION:"set_configuration",CLUSTER_STATUS:"cluster_status",CLUSTER_NETWORK:"cluster_network",DROP_ATTRIBUTE:"drop_attribute",REMOVE_NODE:"remove_node",RESTART:"restart",RESTART_SERVICE:"restart_service",CATCHUP:"catchup",SYSTEM_INFORMATION:"system_information",DELETE_AUDIT_LOGS_BEFORE:"delete_audit_logs_before",READ_AUDIT_LOG:"read_audit_log",CREATE_AUTHENTICATION_TOKENS:"create_authentication_tokens",LOGIN:"login",LOGOUT:"logout",REFRESH_OPERATION_TOKEN:"refresh_operation_token",GET_CONFIGURATION:"get_configuration",CUSTOM_FUNCTIONS_STATUS:"custom_functions_status",GET_CUSTOM_FUNCTIONS:"get_custom_functions",GET_CUSTOM_FUNCTION:"get_custom_function",SET_CUSTOM_FUNCTION:"set_custom_function",GET_COMPONENTS:"get_components",GET_COMPONENT_FILE:"get_component_file",SET_COMPONENT_FILE:"set_component_file",DROP_COMPONENT:"drop_component",DROP_CUSTOM_FUNCTION:"drop_custom_function",ADD_CUSTOM_FUNCTION_PROJECT:"add_custom_function_project",ADD_COMPONENT:"add_component",DROP_CUSTOM_FUNCTION_PROJECT:"drop_custom_function_project",PACKAGE_CUSTOM_FUNCTION_PROJECT:"package_custom_function_project",DEPLOY_CUSTOM_FUNCTION_PROJECT:"deploy_custom_function_project",PACKAGE_COMPONENT:"package_component",DEPLOY_COMPONENT:"deploy_component",CLUSTER_SET_ROUTES:"cluster_set_routes",CLUSTER_DELETE_ROUTES:"cluster_delete_routes",CLUSTER_GET_ROUTES:"cluster_get_routes",READ_TRANSACTION_LOG:"read_transaction_log",DELETE_TRANSACTION_LOGS_BEFORE:"delete_transaction_logs_before",INSTALL_NODE_MODULES:"install_node_modules",AUDIT_NODE_MODULES:"audit_node_modules",PURGE_STREAM:"purge_stream",GET_BACKUP:"get_backup"},St={CSV:".csv",JSON:".json"},Rt={AWS_ACCESS_KEY:"aws_access_key_id",AWS_SECRET:"aws_secret_access_key",AWS_BUCKET:"bucket",AWS_FILE_KEY:"key",REGION:"region"},it={SELECT:"select",INSERT:"insert",UPDATE:"update",DELETE:"delete"},D={};D[e.INSERT]=e.INSERT;D[e.UPDATE]=e.UPDATE;D[e.UPSERT]=e.UPSERT;D[e.DELETE]=e.DELETE;var s=Object.create(null);s[e.DESCRIBE_ALL]=e.DESCRIBE_ALL;s[e.DESCRIBE_TABLE]=e.DESCRIBE_TABLE;s[e.DESCRIBE_SCHEMA]=e.DESCRIBE_SCHEMA;s[e.READ_LOG]=e.READ_LOG;s[e.ADD_NODE]=e.ADD_NODE;s[e.LIST_USERS]=e.LIST_USERS;s[e.LIST_ROLES]=e.LIST_ROLES;s[e.USER_INFO]=e.USER_INFO;s[e.SQL]=e.SQL;s[e.GET_JOB]=e.GET_JOB;s[e.SEARCH_JOBS_BY_START_DATE]=e.SEARCH_JOBS_BY_START_DATE;s[e.DELETE_FILES_BEFORE]=e.DELETE_FILES_BEFORE;s[e.EXPORT_LOCAL]=e.EXPORT_LOCAL;s[e.EXPORT_TO_S3]=e.EXPORT_TO_S3;s[e.CLUSTER_STATUS]=e.CLUSTER_STATUS;s[e.REMOVE_NODE]=e.REMOVE_NODE;s[e.RESTART]=e.RESTART;s[e.CUSTOM_FUNCTIONS_STATUS]=e.CUSTOM_FUNCTIONS_STATUS;s[e.GET_CUSTOM_FUNCTIONS]=e.GET_CUSTOM_FUNCTIONS;s[e.GET_CUSTOM_FUNCTION]=e.GET_CUSTOM_FUNCTION;s[e.SET_CUSTOM_FUNCTION]=e.SET_CUSTOM_FUNCTION;s[e.DROP_CUSTOM_FUNCTION]=e.DROP_CUSTOM_FUNCTION;s[e.ADD_CUSTOM_FUNCTION_PROJECT]=e.ADD_CUSTOM_FUNCTION_PROJECT;s[e.DROP_CUSTOM_FUNCTION_PROJECT]=e.DROP_CUSTOM_FUNCTION_PROJECT;s[e.PACKAGE_CUSTOM_FUNCTION_PROJECT]=e.PACKAGE_CUSTOM_FUNCTION_PROJECT;s[e.DEPLOY_CUSTOM_FUNCTION_PROJECT]=e.DEPLOY_CUSTOM_FUNCTION_PROJECT;var Ot={DEV:"dev",RUN:"run",START:"start",INSTALL:"install",REGISTER:"register",STOP:"stop",RESTART:"restart",VERSION:"version",UPGRADE:"upgrade",HELP:"help",STATUS:"status"},ct={point:"point",lineString:"lineString",multiLineString:"multiLineString",multiPoint:"multiPoint",multiPolygon:"multiPolygon",polygon:"polygon"},o_={HDB_ROOT_KEY:"HDB_ROOT",SERVER_PORT_KEY:"SERVER_PORT",CERT_KEY:"CERTIFICATE",PRIVATE_KEY_KEY:"PRIVATE_KEY",HTTP_SECURE_ENABLED_KEY:"HTTPS_ON",CORS_ENABLED_KEY:"CORS_ON",CORS_WHITELIST_KEY:"CORS_WHITELIST",LOG_LEVEL_KEY:"LOG_LEVEL",LOGGER_KEY:"LOGGER",LOG_PATH_KEY:"LOG_PATH",LOG_ROTATE:"LOG_ROTATE",LOG_ROTATE_MAX_SIZE:"LOG_ROTATE_MAX_SIZE",LOG_ROTATE_RETAIN:"LOG_ROTATE_RETAIN",LOG_ROTATE_COMPRESS:"LOG_ROTATE_COMPRESS",LOG_ROTATE_DATE_FORMAT:"LOG_ROTATE_DATE_FORMAT",LOG_ROTATE_ROTATE_MODULE:"LOG_ROTATE_ROTATE_MODULE",LOG_ROTATE_WORKER_INTERVAL:"LOG_ROTATE_WORKER_INTERVAL",LOG_ROTATE_ROTATE_INTERVAL:"LOG_ROTATE_ROTATE_INTERVAL",LOG_ROTATE_TIMEZONE:"LOG_ROTATE_TIMEZONE",LOG_DAILY_ROTATE_KEY:"LOG_DAILY_ROTATE",LOG_MAX_DAILY_FILES_KEY:"LOG_MAX_DAILY_FILES",PROPS_ENV_KEY:"NODE_ENV",SETTINGS_PATH_KEY:"settings_path",CLUSTERING_PORT_KEY:"CLUSTERING_PORT",CLUSTERING_NODE_NAME_KEY:"NODE_NAME",CLUSTERING_ENABLED_KEY:"CLUSTERING",ALLOW_SELF_SIGNED_SSL_CERTS:"ALLOW_SELF_SIGNED_SSL_CERTS",MAX_HDB_PROCESSES:"MAX_HDB_PROCESSES",INSTALL_USER:"install_user",CLUSTERING_USER_KEY:"CLUSTERING_USER",MAX_CLUSTERING_PROCESSES:"MAX_CLUSTERING_PROCESSES",SERVER_TIMEOUT_KEY:"SERVER_TIMEOUT_MS",SERVER_KEEP_ALIVE_TIMEOUT_KEY:"SERVER_KEEP_ALIVE_TIMEOUT",SERVER_HEADERS_TIMEOUT_KEY:"SERVER_HEADERS_TIMEOUT",DISABLE_TRANSACTION_LOG_KEY:"DISABLE_TRANSACTION_LOG",OPERATION_TOKEN_TIMEOUT_KEY:"OPERATION_TOKEN_TIMEOUT",REFRESH_TOKEN_TIMEOUT_KEY:"REFRESH_TOKEN_TIMEOUT",CUSTOM_FUNCTIONS_ENABLED_KEY:"CUSTOM_FUNCTIONS",CUSTOM_FUNCTIONS_PORT_KEY:"CUSTOM_FUNCTIONS_PORT",CUSTOM_FUNCTIONS_DIRECTORY_KEY:"CUSTOM_FUNCTIONS_DIRECTORY",MAX_CUSTOM_FUNCTION_PROCESSES:"MAX_CUSTOM_FUNCTION_PROCESSES",LOG_TO_FILE:"LOG_TO_FILE",LOG_TO_STDSTREAMS:"LOG_TO_STDSTREAMS",RUN_IN_FOREGROUND:"RUN_IN_FOREGROUND",LOCAL_STUDIO_ON:"LOCAL_STUDIO_ON",STORAGE_WRITE_ASYNC:"STORAGE_WRITE_ASYNC"},At=s_.invert(o_),at={CUSTOMFUNCTIONS_ENABLED:"customFunctions_enabled",CUSTOMFUNCTIONS_NETWORK_PORT:"customFunctions_network_port",CUSTOMFUNCTIONS_TLS_CERTIFICATE:"customFunctions_tls_certificate",CUSTOMFUNCTIONS_NETWORK_CORS:"customFunctions_network_cors",CUSTOMFUNCTIONS_NETWORK_CORSACCESSLIST:"customFunctions_network_corsAccessList",CUSTOMFUNCTIONS_NETWORK_HEADERSTIMEOUT:"customFunctions_network_headersTimeout",CUSTOMFUNCTIONS_NETWORK_HTTPS:"customFunctions_network_https",CUSTOMFUNCTIONS_NETWORK_KEEPALIVETIMEOUT:"customFunctions_network_keepAliveTimeout",CUSTOMFUNCTIONS_TLS_PRIVATEKEY:"customFunctions_tls_privateKey",CUSTOMFUNCTIONS_TLS_CERT_AUTH:"customFunctions_tls_certificateAuthority",CUSTOMFUNCTIONS_NETWORK_TIMEOUT:"customFunctions_network_timeout",CUSTOMFUNCTIONS_NODEENV:"customFunctions_nodeEnv",CUSTOMFUNCTIONS_ROOT:"customFunctions_root"},_={ANALYTICS_AGGREGATEPERIOD:"analytics_aggregatePeriod",AUTHENTICATION_AUTHORIZELOCAL:"authentication_authorizeLocal",AUTHENTICATION_CACHETTL:"authentication_cacheTTL",AUTHENTICATION_ENABLESESSIONS:"authentication_enableSessions",AUTHENTICATION_OPERATIONTOKENTIMEOUT:"authentication_operationTokenTimeout",AUTHENTICATION_REFRESHTOKENTIMEOUT:"authentication_refreshTokenTimeout",CLUSTERING_USER:"clustering_user",CLUSTERING_ENABLED:"clustering_enabled",CLUSTERING_HUBSERVER_CLUSTER_NAME:"clustering_hubServer_cluster_name",CLUSTERING_HUBSERVER_CLUSTER_NETWORK_PORT:"clustering_hubServer_cluster_network_port",CLUSTERING_HUBSERVER_CLUSTER_NETWORK_ROUTES:"clustering_hubServer_cluster_network_routes",CLUSTERING_HUBSERVER_LEAFNODES_NETWORK_PORT:"clustering_hubServer_leafNodes_network_port",CLUSTERING_HUBSERVER_NETWORK_PORT:"clustering_hubServer_network_port",CLUSTERING_LEAFSERVER_NETWORK_PORT:"clustering_leafServer_network_port",CLUSTERING_LEAFSERVER_NETWORK_ROUTES:"clustering_leafServer_network_routes",CLUSTERING_LEAFSERVER_STREAMS_MAXAGE:"clustering_leafServer_streams_maxAge",CLUSTERING_LEAFSERVER_STREAMS_MAXBYTES:"clustering_leafServer_streams_maxBytes",CLUSTERING_LEAFSERVER_STREAMS_MAXMSGS:"clustering_leafServer_streams_maxMsgs",CLUSTERING_LEAFSERVER_STREAMS_PATH:"clustering_leafServer_streams_path",CLUSTERING_NODENAME:"clustering_nodeName",CLUSTERING_TLS_CERTIFICATE:"clustering_tls_certificate",CLUSTERING_TLS_PRIVATEKEY:"clustering_tls_privateKey",CLUSTERING_TLS_CERT_AUTH:"clustering_tls_certificateAuthority",CLUSTERING_TLS_INSECURE:"clustering_tls_insecure",CLUSTERING_TLS_VERIFY:"clustering_tls_verify",CLUSTERING_LOGLEVEL:"clustering_logLevel",CLUSTERING_REPUBLISHMESSAGES:"clustering_republishMessages",CLUSTERING_DATABASELEVEL:"clustering_databaseLevel",CUSTOMFUNCTIONS_NETWORK_HTTPS:"customFunctions_network_https",THREADS:"threads",HTTP_SESSIONAFFINITY:"http_sessionAffinity",HTTP_COMPRESSIONTHRESHOLD:"http_compressionThreshold",HTTP_CORS:"http_cors",HTTP_CORSACCESSLIST:"http_corsAccessList",HTTP_HEADERSTIMEOUT:"http_headersTimeout",HTTP_KEEPALIVETIMEOUT:"http_keepAliveTimeout",HTTP_TIMEOUT:"http_timeout",HTTP_PORT:"http_port",HTTP_SECUREPORT:"http_securePort",LOCALSTUDIO_ENABLED:"localStudio_enabled",LOGGING_FILE:"logging_file",LOGGING_LEVEL:"logging_level",LOGGING_ROOT:"logging_root",LOGGING_ROTATION_ENABLED:"logging_rotation_enabled",LOGGING_ROTATION_COMPRESS:"logging_rotation_compress",LOGGING_ROTATION_INTERVAL:"logging_rotation_interval",LOGGING_ROTATION_MAXSIZE:"logging_rotation_maxSize",LOGGING_ROTATION_PATH:"logging_rotation_path",LOGGING_STDSTREAMS:"logging_stdStreams",LOGGING_AUDITLOG:"logging_auditLog",LOGGING_AUDITRETENTION:"logging_auditRetention",LOGGING_AUDITAUTHEVENTS_LOGFAILED:"logging_auditAuthEvents_logFailed",LOGGING_AUDITAUTHEVENTS_LOGSUCCESSFUL:"logging_auditAuthEvents_logSuccessful",OPERATIONSAPI_NETWORK_CORS:"operationsApi_network_cors",OPERATIONSAPI_NETWORK_CORSACCESSLIST:"operationsApi_network_corsAccessList",OPERATIONSAPI_NETWORK_HEADERSTIMEOUT:"operationsApi_network_headersTimeout",OPERATIONSAPI_NETWORK_HTTPS:"operationsApi_network_https",OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT:"operationsApi_network_keepAliveTimeout",OPERATIONSAPI_NETWORK_PORT:"operationsApi_network_port",OPERATIONSAPI_NETWORK_SECUREPORT:"operationsApi_network_securePort",OPERATIONSAPI_TLS_CERTIFICATE:"operationsApi_tls_certificate",OPERATIONSAPI_TLS_PRIVATEKEY:"operationsApi_tls_privateKey",OPERATIONSAPI_TLS_CERTIFICATEAUTHORITY:"operationsApi_tls_certificateAuthority",OPERATIONSAPI_NETWORK_TIMEOUT:"operationsApi_network_timeout",ROOTPATH:"rootPath",STORAGE_WRITEASYNC:"storage_writeAsync",STORAGE_OVERLAPPINGSYNC:"storage_overlappingSync",STORAGE_CACHING:"storage_caching",STORAGE_COMPRESSION:"storage_compression",STORAGE_NOREADAHEAD:"storage_noReadAhead",STORAGE_PREFETCHWRITES:"storage_prefetchWrites",STORAGE_ENCRYPTION:"storage_encryption",STORAGE_PATH:"storage_path",STORAGE_AUDIT_PATH:"storage_audit_path",DATABASES:"databases",IGNORE_SCRIPTS:"ignoreScripts",MQTT_NETWORK_PORT:"mqtt_network_port",MQTT_WEBSOCKET:"mqtt_webSocket",MQTT_NETWORK_SECUREPORT:"mqtt_network_securePort",MQTT_REQUIREAUTHENTICATION:"mqtt_requireAuthentication",COMPONENTSROOT:"componentsRoot",TLS_CERTIFICATE:"tls_certificate",TLS_PRIVATEKEY:"tls_privateKey",TLS_CERTIFICATEAUTHORITY:"tls_certificateAuthority"},r_={settings_path:T_.SETTINGS_PATH_KEY,hdb_root_key:_.ROOTPATH,hdb_root:_.ROOTPATH,rootpath:_.ROOTPATH,server_port_key:_.OPERATIONSAPI_NETWORK_PORT,server_port:_.OPERATIONSAPI_NETWORK_PORT,cert_key:_.TLS_CERTIFICATE,certificate:_.TLS_CERTIFICATE,private_key_key:_.TLS_PRIVATEKEY,private_key:_.TLS_PRIVATEKEY,http_secure_enabled_key:_.OPERATIONSAPI_NETWORK_HTTPS,https_on:_.OPERATIONSAPI_NETWORK_HTTPS,cors_enabled_key:_.OPERATIONSAPI_NETWORK_CORS,cors_on:_.OPERATIONSAPI_NETWORK_CORS,cors_whitelist_key:_.OPERATIONSAPI_NETWORK_CORSACCESSLIST,cors_whitelist:_.OPERATIONSAPI_NETWORK_CORSACCESSLIST,cors_accesslist_key:_.OPERATIONSAPI_NETWORK_CORSACCESSLIST,cors_accesslist:_.OPERATIONSAPI_NETWORK_CORSACCESSLIST,log_level_key:_.LOGGING_LEVEL,log_level:_.LOGGING_LEVEL,log_path_key:_.LOGGING_ROOT,log_path:_.LOGGING_ROOT,clustering_node_name_key:_.CLUSTERING_NODENAME,node_name:_.CLUSTERING_NODENAME,clustering_enabled_key:_.CLUSTERING_ENABLED,clustering:_.CLUSTERING_ENABLED,max_http_threads:_.THREADS,max_hdb_processes:_.THREADS,server_timeout_key:_.OPERATIONSAPI_NETWORK_TIMEOUT,server_timeout_ms:_.OPERATIONSAPI_NETWORK_TIMEOUT,server_keep_alive_timeout_key:_.OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT,server_keep_alive_timeout:_.OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT,server_headers_timeout_key:_.OPERATIONSAPI_NETWORK_HEADERSTIMEOUT,server_headers_timeout:_.OPERATIONSAPI_NETWORK_HEADERSTIMEOUT,disable_transaction_log_key:_.LOGGING_AUDITLOG,disable_transaction_log:_.LOGGING_AUDITLOG,operation_token_timeout_key:_.AUTHENTICATION_OPERATIONTOKENTIMEOUT,operation_token_timeout:_.AUTHENTICATION_OPERATIONTOKENTIMEOUT,refresh_token_timeout_key:_.AUTHENTICATION_REFRESHTOKENTIMEOUT,refresh_token_timeout:_.AUTHENTICATION_REFRESHTOKENTIMEOUT,custom_functions_port_key:_.HTTP_PORT,custom_functions_port:_.HTTP_PORT,custom_functions_directory_key:_.COMPONENTSROOT,custom_functions_directory:_.COMPONENTSROOT,max_custom_function_processes:_.THREADS,log_to_file:_.LOGGING_FILE,log_to_stdstreams:_.LOGGING_STDSTREAMS,local_studio_on:_.LOCALSTUDIO_ENABLED,clustering_port:_.CLUSTERING_HUBSERVER_CLUSTER_NETWORK_PORT,clustering_user:_.CLUSTERING_USER,clustering_enabled:_.CLUSTERING_ENABLED,clustering_hubserver_cluster_name:_.CLUSTERING_HUBSERVER_CLUSTER_NAME,clustering_hubserver_cluster_network_port:_.CLUSTERING_HUBSERVER_CLUSTER_NETWORK_PORT,clustering_hubserver_cluster_network_routes:_.CLUSTERING_HUBSERVER_CLUSTER_NETWORK_ROUTES,clustering_hubserver_leafnodes_network_port:_.CLUSTERING_HUBSERVER_LEAFNODES_NETWORK_PORT,clustering_hubserver_network_port:_.CLUSTERING_HUBSERVER_NETWORK_PORT,clustering_leafserver_network_port:_.CLUSTERING_LEAFSERVER_NETWORK_PORT,clustering_leafserver_network_routes:_.CLUSTERING_LEAFSERVER_NETWORK_ROUTES,clustering_leafserver_streams_maxage:_.CLUSTERING_LEAFSERVER_STREAMS_MAXAGE,clustering_leafserver_streams_maxbytes:_.CLUSTERING_LEAFSERVER_STREAMS_MAXBYTES,clustering_leafserver_streams_maxmsgs:_.CLUSTERING_LEAFSERVER_STREAMS_MAXMSGS,clustering_leafserver_streams_path:_.CLUSTERING_LEAFSERVER_STREAMS_PATH,clustering_nodename:_.CLUSTERING_NODENAME,clustering_tls_certificate:_.CLUSTERING_TLS_CERTIFICATE,clustering_tls_privatekey:_.CLUSTERING_TLS_PRIVATEKEY,clustering_tls_certificateauthority:_.CLUSTERING_TLS_CERT_AUTH,clustering_tls_insecure:_.CLUSTERING_TLS_INSECURE,clustering_tls_verify:_.CLUSTERING_TLS_VERIFY,clustering_loglevel:_.CLUSTERING_LOGLEVEL,clustering_republishmessages:_.CLUSTERING_REPUBLISHMESSAGES,clustering_databaselevel:_.CLUSTERING_DATABASELEVEL,customfunctions_network_port:_.HTTP_PORT,customfunctions_tls_certificate:_.TLS_CERTIFICATE,customfunctions_network_cors:_.HTTP_CORS,customfunctions_network_corsaccesslist:_.HTTP_CORSACCESSLIST,customfunctions_network_headerstimeout:_.HTTP_HEADERSTIMEOUT,customfunctions_network_https:_.CUSTOMFUNCTIONS_NETWORK_HTTPS,customfunctions_network_keepalivetimeout:_.HTTP_KEEPALIVETIMEOUT,customfunctions_tls_privatekey:_.TLS_PRIVATEKEY,customfunctions_tls_certificateauthority:_.TLS_CERTIFICATEAUTHORITY,customfunctions_network_timeout:_.HTTP_TIMEOUT,http_threads:_.THREADS,threads:_.THREADS,http_session_affinity:_.HTTP_SESSIONAFFINITY,http_compressionthreshold:_.HTTP_COMPRESSIONTHRESHOLD,http_cors:_.HTTP_CORS,http_corsaccesslist:_.HTTP_CORSACCESSLIST,http_headerstimeout:_.HTTP_HEADERSTIMEOUT,http_keepalivetimeout:_.HTTP_KEEPALIVETIMEOUT,http_timeout:_.HTTP_TIMEOUT,http_port:_.HTTP_PORT,http_secureport:_.HTTP_SECUREPORT,customfunctions_processes:_.THREADS,customfunctions_root:_.COMPONENTSROOT,localstudio_enabled:_.LOCALSTUDIO_ENABLED,logging_file:_.LOGGING_FILE,logging_level:_.LOGGING_LEVEL,logging_root:_.LOGGING_ROOT,logging_rotation_enabled:_.LOGGING_ROTATION_ENABLED,logging_rotation_compress:_.LOGGING_ROTATION_COMPRESS,logging_rotation_interval:_.LOGGING_ROTATION_INTERVAL,logging_rotation_maxsize:_.LOGGING_ROTATION_MAXSIZE,logging_rotation_path:_.LOGGING_ROTATION_PATH,logging_stdstreams:_.LOGGING_STDSTREAMS,logging_auditlog:_.LOGGING_AUDITLOG,logging_auditretention:_.LOGGING_AUDITRETENTION,logging_auditauthevents_logfailed:_.LOGGING_AUDITAUTHEVENTS_LOGFAILED,logging_auditauthevents_logsuccessful:_.LOGGING_AUDITAUTHEVENTS_LOGSUCCESSFUL,operationsapi_authentication_operationtokentimeout:_.AUTHENTICATION_OPERATIONTOKENTIMEOUT,operationsapi_authentication_refreshtokentimeout:_.AUTHENTICATION_REFRESHTOKENTIMEOUT,operationsapi_network_cors:_.OPERATIONSAPI_NETWORK_CORS,operationsapi_network_corsaccesslist:_.OPERATIONSAPI_NETWORK_CORSACCESSLIST,operationsapi_network_headerstimeout:_.OPERATIONSAPI_NETWORK_HEADERSTIMEOUT,operationsapi_network_https:_.OPERATIONSAPI_NETWORK_HTTPS,operationsapi_network_keepalivetimeout:_.OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT,operationsapi_network_port:_.OPERATIONSAPI_NETWORK_PORT,operationsapi_network_secureport:_.OPERATIONSAPI_NETWORK_SECUREPORT,operationsapi_tls_certificate:_.OPERATIONSAPI_TLS_CERTIFICATE,operationsapi_tls_privatekey:_.OPERATIONSAPI_TLS_PRIVATEKEY,operationsapi_tls_certificateauthority:_.OPERATIONSAPI_TLS_CERTIFICATEAUTHORITY,operationsapi_network_timeout:_.OPERATIONSAPI_NETWORK_TIMEOUT,operationsapi_root:_.ROOTPATH,databases:_.DATABASES,storage_path:_.STORAGE_PATH,ignorescripts:_.IGNORE_SCRIPTS,mqtt_network_port:_.MQTT_NETWORK_PORT,mqtt_websocket:_.MQTT_WEBSOCKET,mqtt_network_secureport:_.MQTT_NETWORK_SECUREPORT,mqtt_requireauthentication:_.MQTT_REQUIREAUTHENTICATION,analytics_aggregatePeriod:_.ANALYTICS_AGGREGATEPERIOD,authentication_authorizelocal:_.AUTHENTICATION_AUTHORIZELOCAL,authentication_cachettl:_.AUTHENTICATION_CACHETTL,authentication_enablesessions:_.AUTHENTICATION_ENABLESESSIONS,authentication_operationtokentimeout:_.AUTHENTICATION_OPERATIONTOKENTIMEOUT,authentication_refreshtokentimeout:_.AUTHENTICATION_REFRESHTOKENTIMEOUT,componentsroot:_.COMPONENTSROOT,tls_certificate:_.TLS_CERTIFICATE,tls_privatekey:_.TLS_PRIVATEKEY,tls_certificateauthority:_.TLS_CERTIFICATEAUTHORITY};for(let t in _){let E=_[t];r_[E.toLowerCase()]=E}var Nt={TABLES:"tables",PATH:"path",AUDIT_PATH:"auditPath"},It={csv_file_load:"csv_file_load",csv_data_load:e.CSV_DATA_LOAD,csv_url_load:e.CSV_URL_LOAD,delete_files_before:"delete_files_before",delete_records_before:"delete_records_before",delete_audit_logs_before:"delete_audit_logs_before",delete_transaction_logs_before:"delete_transaction_logs_before",empty_trash:"empty_trash",export_local:"export_local",export_to_s3:"export_to_s3",import_from_s3:"import_from_s3"},lt={CLUSTERING_PAYLOAD:"clustering_payload",DELEGATE_THREAD_RESPONSE:"delegate_thread_response",CLUSTERING:"clustering",SCHEMA:"schema",CLUSTER_STATUS:"cluster_status",JOB:"job",CHILD_STARTED:"child_started",CHILD_STOPPED:"child_stopped",USER:"user",RESTART:"restart"},ut={BIDIRECTIONAL:"BIDIRECTIONAL",OUTBOUND:"OUTBOUND",INBOUND:"INBOUND"},Ct={VERSION_DEFAULT:"2.2.0"},Lt={DEVELOPMENT:8192,DEFAULT:512},Ut={IDENTIFY:"identify",AUTHENTICATE:"authenticate",AUTHENTICATE_OK:"authenticated",AUTHENTICATE_FAIL:"authenticate_fail",CONNECTION:"connection",CONNECT:"connect",CATCHUP_REQUEST:"catchup_request",CATCHUP_RESPONSE:"catchup",CONFIRM_MSG:"confirm_msg",ERROR:"error",DISCONNECT:"disconnect",SCHEMA_UPDATE_REQ:"schema_update_request",SCHEMA_UPDATE_RES:"schema_update_response",RECONNECT_ATTEMPT:"reconnect_attempt",CONNECT_ERROR:"connect_error",MESSAGE:"msg",VERSION_MISMATCH:"version_mismatch",DIRECTION_CHANGE:"direction_change"},dt={1e3:"SUCCESSFUL_SHUTDOWN",1001:"CLOSE_GOING_AWAY",1002:"CLOSE_PROTOCOL_ERROR",1003:"CLOSE_UNSUPPORTED",1005:"CLOSE_NO_STATUS",1006:"CLOSE_ABNORMAL",1007:"UNSUPPORTED_PAYLOAD",1008:"POLICY_VIOLATION",1009:"CLOSE_TOO_LARGE",1010:"MANDATORY_EXTENSION",1011:"SERVER_ERROR",1012:"SERVICE_RESTART",1013:"SERVER_BUSY",1014:"BAD_GATEWAY",1015:"HANDSHAKE_FAIL",4141:"LICENSE_LIMIT_REACHED"},pt={ENOENT:"ENOENT",EACCES:"EACCES",EEXIST:"EEXIST"},n_={CREATED_TIME:"__createdtime__",UPDATED_TIME:"__updatedtime__"},Pt=Symbol("metadata"),Dt="__clustering__",mt=Object.values(n_),gt=15984864e5,S_={LESS:"<",LESS_OR_EQ:"<=",GREATER:">",GREATER_OR_EQ:">=",BETWEEN:"..."},Gt=s_.invert(S_),Mt={GET_CLUSTER_STATUS:"GET_CLUSTER_STATUS",CLUSTER_STATUS_RESPONSE:"CLUSTER_STATUS_RESPONSE",ERROR_RESPONSE:"ERROR",ADD_USER:"ADD_USER",ALTER_USER:"ALTER_USER",DROP_USER:"DROP_USER",HDB_OPERATION:"HDB_OPERATION",ADD_NODE:"ADD_NODE",UPDATE_NODE:"UPDATE_NODE",REMOVE_NODE:"REMOVE_NODE",HDB_USERS_MSG:"HDB_USERS_MSG",HDB_WORKERS:"HDB_WORKERS",HDB_TRANSACTION:"HDB_TRANSACTION"},ht=111,Ht=`\r
|
|
2
|
-
`,ft={READ:"read",INSERT:"insert",UPDATE:"update",DELETE:"delete"},Bt=["*","%"],bt="unauthorized_access",Ft="func_val",vt={HASH_VALUE:"hash_value",TIMESTAMP:"timestamp",USERNAME:"username"},yt={JWT_PRIVATE_KEY_NAME:".jwtPrivate.key",JWT_PUBLIC_KEY_NAME:".jwtPublic.key",JWT_PASSPHRASE_NAME:".jwtPass"},Kt={SHUTDOWN:"shutdown",CHILD_STARTED:"child_started",CHILD_STOPPED:"child_stopped",SCHEMA:"schema",USER:"user",CLUSTER_STATUS_RESPONSE:"cluster_status_response",CLUSTER_STATUS_REQUEST:"cluster_status_request",METRICS:"metrics",GET_METRICS:"get_metrics",RESTART:"restart"},Vt={HDB_CORE:"hdb_core",CUSTOM_FUNCTIONS:"custom_functions"},wt={HTTP:"http"},kt={STOPPED:"stopped",ONLINE:"online"},Yt="3.x.x",Wt={SUCCESS:"success",FAILURE:"failure"},jt={AUTHENTICATION:"authentication",AUTHORIZATION:"authorization"};R_.exports={LOCAL_HARPERDB_OPERATIONS:s,HDB_SUPPORT_ADDRESS:__,HDB_SUPPORT_URL:t_,HDB_PRICING_URL:Ae,SUPPORT_HELP_MSG:ae,LICENSE_HELP_MSG:E_,HDB_PROC_NAME:z,HDB_PROC_DESCRIPTOR:W,CLUSTERING_LEAF_PROC_DESCRIPTOR:H,CLUSTERING_HUB_PROC_DESCRIPTOR:h,SYSTEM_SCHEMA_NAME:Be,HASH_FOLDER_NAME:be,HDB_HOME_DIR_NAME:Fe,UPDATE_FILE_NAME:Ve,LICENSE_KEY_DIR_NAME:ye,BOOT_PROPS_FILE_NAME:Ke,JOB_TYPE_ENUM:It,JOB_STATUS_ENUM:nt,SYSTEM_TABLE_NAMES:tt,SYSTEM_TABLE_HASH_ATTRIBUTES:Et,OPERATIONS_ENUM:e,VALID_S3_FILE_TYPES:St,S3_BUCKET_AUTH_KEYS:Rt,VALID_SQL_OPS_ENUM:it,GEO_CONVERSION_ENUM:ct,HDB_SETTINGS_NAMES:o_,HDB_SETTINGS_NAMES_REVERSE_LOOKUP:At,SERVICE_ACTIONS_ENUM:Ot,CLUSTER_MESSAGE_TYPE_ENUM:lt,CLUSTER_CONNECTION_DIRECTION_ENUM:ut,CLUSTER_EVENTS_DEFS_ENUM:Ut,PERIOD_REGEX:Ue,DOUBLE_PERIOD_REGEX:de,UNICODE_PERIOD:pe,FORWARD_SLASH_REGEX:Pe,UNICODE_FORWARD_SLASH:De,ESCAPED_FORWARD_SLASH_REGEX:me,ESCAPED_PERIOD_REGEX:ge,ESCAPED_DOUBLE_PERIOD_REGEX:Ge,REG_KEY_FILE_NAME:ot,RESTART_TIMEOUT_MS:Ye,HDB_FILE_PERMISSIONS:We,DATABASES_DIR_NAME:qe,LEGACY_DATABASES_DIR_NAME:$e,TRANSACTIONS_DIR_NAME:Xe,LIMIT_COUNT_NAME:Qe,ID_ATTRIBUTE_STRING:Je,INSERT_MODULE_ENUM:_t,UPGRADE_JSON_FIELD_NAMES_ENUM:et,RESTART_CODE:we,RESTART_CODE_NUM:ke,CLUSTER_OPERATIONS:D,SYSTEM_DEFAULT_ATTRIBUTE_NAMES:st,HDB_INTERNAL_SC_CHANNEL_PREFIX:R,INTERNAL_SC_CHANNELS:Tt,CLUSTERING_MESSAGE_TYPES:Mt,HDB_FILE_SUFFIX:ve,BLOB_FOLDER_NAME:je,HDB_TRASH_DIR:xe,ORIGINATOR_SET_VALUE:ht,LICENSE_VALUES:Ct,RAM_ALLOCATION_ENUM:Lt,TIME_STAMP_NAMES_ENUM:n_,TIME_STAMP_NAMES:mt,PERMS_UPDATE_RELEASE_TIMESTAMP:gt,SEARCH_NOT_FOUND_MESSAGE:Ne,SEARCH_ATTRIBUTE_NOT_FOUND:Ie,LICENSE_ROLE_DENIED_RESPONSE:le,LICENSE_MAX_CONNS_REACHED:ue,BASIC_LICENSE_MAX_NON_CU_ROLES:e_,BASIC_LICENSE_CLUSTER_CONNECTION_LIMIT_WS_ERROR_CODE:ce,VALUE_SEARCH_COMPARATORS:S_,VALUE_SEARCH_COMPARATORS_REVERSE_LOOKUP:Gt,LICENSE_FILE_NAME:rt,WEBSOCKET_CLOSE_CODE_DESCRIPTION_LOOKUP:dt,NEW_LINE:Ht,BASIC_LICENSE_MAX_CLUSTER_USER_ROLES:Le,MOMENT_DAYS_TAG:Me,API_TURNOVER_SEC:he,LOOPBACK:Ce,CODE_EXTENSION:M,WILDCARD_SEARCH_VALUE:He,NODE_ERROR_CODES:pt,JAVASCRIPT_EXTENSION:J,PERMS_CRUD_ENUM:ft,UNAUTHORIZED_PERMISSION_NAME:bt,SEARCH_WILDCARDS:Bt,FUNC_VAL:Ft,READ_AUDIT_LOG_SEARCH_TYPES_ENUM:vt,JWT_ENUM:yt,CLUSTERING_FLAG:Dt,ITC_EVENT_TYPES:Kt,CUSTOM_FUNCTION_PROC_NAME:Z,CUSTOM_FUNCTION_PROC_DESCRIPTOR:G,SERVICES:Vt,THREAD_TYPES:wt,MEM_SETTING_KEY:fe,HDB_RESTART_SCRIPT:z_,PROCESS_DESCRIPTORS:Te,SERVICE_SERVERS:Se,SERVICE_SERVERS_CWD:Y,PROCESS_DESCRIPTORS_VALIDATE:re,LAUNCH_SERVICE_SCRIPTS:Re,LOG_LEVELS:oe,PROCESS_NAME_ENV_PROP:ze,LOG_NAMES:se,PM2_PROCESS_STATUSES:kt,CONFIG_PARAM_MAP:r_,CONFIG_PARAMS:_,HDB_CONFIG_FILE:X_,HDB_DEFAULT_CONFIG_FILE:Q_,ROLE_TYPES_ENUM:ie,BOOT_PROP_PARAMS:T_,INSTALL_PROMPTS:Ze,HDB_ROOT_DIR_NAME:J_,CLUSTERING_PROCESSES:ne,FOREGROUND_PID_FILE:ee,PACKAGE_ROOT:l,PRE_4_0_0_VERSION:Yt,DATABASES_PARAM_CONFIG:Nt,METADATA_PROPERTY:Pt,AUTH_AUDIT_STATUS:Wt,AUTH_AUDIT_TYPES:jt,HDB_PID_FILE:te,DEFAULT_DATABASE_NAME:Ee,LEGACY_CONFIG_PARAMS:at};Q()});var i_=p((uE,xt)=>{xt.exports={name:"harperdb",version:"4.2.8",description:"HarperDB is a distributed SQL & NoSQL data platform focused on speed, flexibility, and ease of use.",keywords:["database","sql","nosql","api","distributed","cloud","enterprise","Fastify","NATS"],main:"harperdb.js",bin:{harperdb:"./bin/harperdb.js"},engines:{"minimum-node":"16.0.0","go-lang":"1.21.1","nats-server":"2.10.1"},exports:{".":"./index.js"},homepage:"https://www.harperdb.io/",bugs:"support@harperdb.io",author:{name:"HarperDB",email:"support@harperdb.io"},license:"SEE LICENSE IN LICENSE",scripts:{submodules:"git submodule update --init --recursive",build:"eslint -c ./.eslintbuild bin/ dataLayer/ security/ server/ sqlTranslator/ upgrade/ utility/ validation/",pretty:"eslint --fix bin/ dataLayer/ security/ server/ sqlTranslator/ upgrade/ utility/ validation/","cover:test":"pm2 kill && rimraf ./.nyc_output/* && node utility/devops/register.js --reset_license && nyc --no-clean --reporter=lcovonly npm run test:apitests && nyc --no-clean --reporter=lcovonly npm run test:logging && nyc --no-clean --reporter=lcovonly npm run test:upgrade && nyc --no-clean --reporter=lcovonly npm run test:nats && nyc --no-clean --reporter=lcovonly npm run test:cfserver && nyc --no-clean --reporter=lcovonly npm run test:hdbserver && nyc --no-clean --reporter=lcovonly npm run test:main && nyc merge .nyc_output coverage.json && node ./utility/devops/register.js --reset_license",test:"pm2 kill && rimraf ./.nyc_output/* && node utility/devops/register.js --reset_license && npm run test:apitests && npm run test:logging && npm run test:upgrade && npm run test:nats && npm run test:cfserver && npm run test:hdbserver && npm run test:main && nyc merge .nyc_output coverage.json && node ./utility/devops/register.js --reset_license","test:main":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/**/*.js' --config '../unitTests/.mocharc-main.json'","test:lmdbbridge":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/dataLayer/harperBridge/lmdbBridge/**/*.js' --config '../unitTests/.mocharc.json'","test:lmdbutility":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/utility/lmdb/**/*.js' --config '../unitTests/.mocharc.json'","test:hdbserver":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/server/harperdb/hdbServer-test.js' --config '../unitTests/.mocharc.json'","test:cfserver":"npm run submodules && cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/server/fastifyRoutes/customFunctionsServer-test.js' --config '../unitTests/.mocharc.json'","test:nats":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/server/nats/**/*.js' --config '../unitTests/.mocharc.json'","test:upgrade":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/upgrade/**/*.js' --config '../unitTests/.mocharc.json'","test:apitests":"pm2 kill && cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/apiTests/**/*-test.mjs' --config '../unitTests/.mocharc.json'","test:logging":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/utility/logging/*.js' --config '../unitTests/.mocharc.json'","test:ci":" cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/**/*.js' --retries 3 --config '../unitTests/.mocharc-main.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/dataLayer/harperBridge/lmdbBridge/**/*.js' --parallel --retries 3 --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/utility/lmdb/**/*.js' --parallel --retries 3 --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/server/harperdb/hdbServer-test.js' --parallel --retries 3 --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/server/customFunctions/customFunctionsServer-test.js' --parallel --retries 3 --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/upgrade/**/*.js' --parallel --retries 3 --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/server/nats/**/*.js' --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter","hdb-check":"./utility/devops/hdb-check.sh","download-prebuilds":"node ./utility/devops/build/download-prebuilds.js",prebuild:"date",postinstall:"node ./launchServiceScripts/launchInstallNATSServer.js",build_nats_dependency:"node ./utility/devops/nats/builder.js",coverage:"nyc --reporter=lcov npm test"},dependencies:{"@aws-sdk/abort-controller":"3.374.0","@aws-sdk/client-s3":"3.441.0","@aws-sdk/lib-storage":"3.441.0","@endo/static-module-record":"^0.8.1","@fastify/autoload":"5.7.1","@fastify/compress":"~6.4.0","@fastify/cors":"~8.4.1","@fastify/static":"~6.11.2","@turf/area":"6.5.0","@turf/boolean-contains":"6.5.0","@turf/boolean-disjoint":"6.5.0","@turf/boolean-equal":"6.5.0","@turf/circle":"6.5.0","@turf/difference":"6.5.0","@turf/distance":"6.5.0","@turf/helpers":"6.5.0","@turf/length":"6.5.0",alasql:"1.7.4","cbor-x":"1.5.4",chalk:"4.1.2","cli-progress":"3.12.0",clone:"2.1.2","fast-glob":"3.3.1",fastify:"~4.24.3","fastify-plugin":"~4.5.1","fs-extra":"11.1.1",graphql:"^16.8.1","human-readable-ids":"1.0.4",inquirer:"8.2.6","is-number":"7.0.0",joi:"17.11.0",json2csv:"5.0.7",jsonata:"1.8.6",jsonwebtoken:"9.0.2",lmdb:"2.9.1",lodash:"4.17.21",mathjs:"11.11.2",minimist:"1.2.8",mkcert:"1.5.1",moment:"2.29.4","mqtt-packet":"~8.2.1",msgpackr:"1.9.9",nats:"2.17.0",needle:"3.2.0","node-stream-zip":"1.15.0","node-unix-socket":"^0.2.5","normalize-path":"^3.0.0",ora:"5.4.1","ordered-binary":"1.4.1",papaparse:"5.4.1",passport:"0.6.0","passport-http":"0.3.0","passport-local":"1.0.0",pino:"8.15.6",pm2:"5.3.0",prompt:"1.3.0","properties-reader":"2.3.0","recursive-iterator":"3.3.0",semver:"7.5.4",send:"^0.18.0",ses:"^0.18.1","stream-chain":"2.2.5","stream-json":"1.8.0",systeminformation:"5.21.10","tar-fs":"2.1.1",ulidx:"0.5.0",uuid:"9.0.1","validate.js":"0.13.1",ws:"^8.14.2",yaml:"2.3.4"},devDependencies:{"@tsconfig/node16":"^1.0.3","@types/node":"latest","@typescript-eslint/eslint-plugin":"^5.55.0","@typescript-eslint/parser":"^5.55.0",axios:"0.27.2",chai:"4.3.7","chai-integer":"0.1.0",esbuild:"^0.19.1",eslint:"8.22.0","eslint-config-prettier":"8.3.0","eslint-plugin-prettier":"3.4.1","eslint-plugin-radar":"0.2.1",eventsource:"^2.0.2","hook-std":"3.0.0","intercept-stdout":"0.1.2",mocha:"^10.2.0","mocha-teamcity-reporter":"3.0.0","mock-require":"3.0.3","mock-stdin":"1.0.0",mqtt:"~4.3.7",newman:"5.3.2","newman-reporter-html":"1.0.5","newman-reporter-htmlextra":"^1.22.11","newman-reporter-teamcity":"^0.1.12","node-fetch":"2.6.7",nyc:"15.1.0",prettier:"2.8.4",rewire:"5.0.0",rimraf:"3.0.2",sinon:"10.0.0","sinon-chai":"3.7.0","source-map-support":"^0.5.21",typescript:"^5.2.2","why-is-node-still-running":"^1.0.0"},overrides:{"eslint-plugin-radar":{eslint:"8.22.0"},"newman-reporter-html":{newman:"5.3.2"},alasql:{xlsx:"0.18.5"}},optionalDependencies:{bufferutil:"^4.0.7","utf-8-validate":"^5.0.10"}}});var l_=p((CE,I_)=>{"use strict";var C=require("fs-extra"),u=require("path"),S=require("chalk"),qt=require("needle"),O_=require("node-stream-zip"),c_=require("semver"),L=q(),$t=require("util"),Xt=require("child_process"),{platform:Qt}=require("os"),Jt=$t.promisify(Xt.exec),{PACKAGE_ROOT:zt}=k(),N=u.join(zt,"dependencies"),Zt=u.join(N,L.NATS_SERVER_ZIP),A_=i_(),f=A_.engines["go-lang"],g=A_.engines[L.NATS_SERVER_NAME],_E=`${process.platform}-${process.arch}`,B=u.join(N,_E,`${L.NATS_BINARY_NAME}`),eE=`https://github.com/nats-io/nats-server/releases/download/v${g}/nats-server-v${g}-`,a_={"linux-x64":"linux-amd64.zip","linux-arm64":"linux-arm64.zip","darwin-x64":"darwin-amd64.zip","darwin-arm64":"darwin-arm64.zip","win32-x64":"windows-amd64.zip"},tE=Object.keys(a_).map(t=>t.split("-"));async function m(t,E=void 0){let{stdout:T,stderr:o}=await Jt(t,{cwd:E});if(o)throw new Error(o.replace(`
|
|
1
|
+
"use strict";var u_=Object.defineProperty;var i=(t,E)=>u_(t,"name",{value:E,configurable:!0});var p=(t,E)=>()=>(E||t((E={exports:{}}).exports,E),E.exports);var q=p((iE,x)=>{"use strict";var{platform:RE}=require("os"),C_="nats-server.zip",y="nats-server",L_=process.platform==="win32"?`${y}.exe`:y,v="HDB",U_=/^[^\s.,*>]+$/,j="__request__",d_=i(t=>`${t}.${j}`,"REQUEST_SUBJECT"),p_={NATS_MSG_ID:"Nats-Msg-Id",ORIGIN:"origin",TRANSACTED_NODES:"transacted_nodes"},P_={HUB_SERVER:"hub.json",LEAF_SERVER:"leaf.json"},m_={HUB:"hub.pid",LEAF:"leaf.pid"},D_={HUB:"-hub",LEAF:"-leaf",ADMIN:"-admin"},g_={stream_name:"__HARPERDB_WORK_QUEUE__",durable_name:"HDB_WORK_QUEUE",deliver_group:v,deliver_subject:"__HDB__.WORKQUEUE"},M_={stream_name:"__HARPERDB_SCHEMA_QUEUE__",durable_name:"HDB_SCHEMA_QUEUE",deliver_group:v,deliver_subject:"HDB.SCHEMAQUEUE"},G_={stream_name:"__HARPERDB_USER_QUEUE__",durable_name:"HDB_USER_QUEUE",deliver_group:v,deliver_subject:"HDB.USERQUEUE"},h_={SUCCESS:"success",ERROR:"error"},H_={OPEN:"open",CLOSED:"closed",NO_RESPONDERS:"NoResponders",TIMEOUT:"Timeout"},f_={TXN:"txn",MSGID:"msgid"},U={ERR:"error",WRN:"warn",INF:"info",DBG:"debug",TRC:"trace"},b_={[U.ERR]:1,[U.WRN]:2,[U.INF]:3,[U.DBG]:4,[U.TRC]:5},B_={debug:"-D",trace:"-DVV"};x.exports={NATS_SERVER_ZIP:C_,NATS_SERVER_NAME:y,NATS_BINARY_NAME:L_,PID_FILES:m_,NATS_CONFIG_FILES:P_,SERVER_SUFFIX:D_,WORK_QUEUE_CONSUMER_NAMES:g_,SCHEMA_QUEUE_CONSUMER_NAMES:M_,USER_QUEUE_CONSUMER_NAMES:G_,NATS_TERM_CONSTRAINTS_RX:U_,REQUEST_SUFFIX:j,UPDATE_REMOTE_RESPONSE_STATUSES:h_,CLUSTER_STATUS_STATUSES:H_,REQUEST_SUBJECT:d_,SUBJECT_PREFIXES:f_,MSG_HEADERS:p_,LOG_LEVELS:U,LOG_LEVEL_FLAGS:B_,LOG_LEVEL_HIERARCHY:b_}});var Q=p((AE,$)=>{var F_=require("fast-glob"),{statSync:K,existsSync:w,readFileSync:y_,writeFileSync:v_}=require("fs"),{spawnSync:K_,spawn:w_,execFileSync:cE}=require("child_process"),{isMainThread:V_}=require("worker_threads"),{join:I,relative:X}=require("path"),{PACKAGE_ROOT:A}=k(),{tmpdir:k_,platform:Y_}=require("os");require("source-map-support").install();var W_=["resources","server","dataLayer","components"],P="ts-build",V,j_=__filename.endsWith("tsBuild.js");if(j_){if(V_){let T;try{K(I(A,P)),T=!0}catch{}if(T)for(let o of F_.sync(W_.map(n=>n+"/**/*.ts"),{cwd:A})){let n=0,r=0;try{n=K(I(A,o)).mtimeMs-5e3,r=K(I(A,P,o.replace(/.ts$/,".js"))).mtimeMs}catch{}if(n>r){console.warn(`TypeScript ${o} is not compiled`+(r?` (TS source file was modified at ${new Date(n)} and compiled file at ${new Date(r)})`:"")+", consider enabling auto-compilation of TypeScript in your IDE), compiling now."),V=!0;break}}else console.log("TypeScript modules are not compiled, compiling now"),V=!0;if(V){let o=I(A,"node_modules/.bin/tsc");Y_()==="win32"&&(o+=".cmd");let n=K_(o,{cwd:A});if(n.stdout.length&&console.log(n.stdout.toString()),n.stderr.length&&console.log(n.stderr.toString()),T){let r=I(k_(),"harperdb-tsc.pid"),c;if(w(r))try{process.kill(+y_(r,{encoding:"utf8"}),0),c=!0}catch{}if(!c){console.log("starting tsc background process");let a=w_(o,["--watch"],{cwd:A,detached:!0,stdio:"ignore"});v_(r,a.pid.toString()),a.unref()}}}}let t=$.constructor,E=t._findPath;t._findPath=function(T,o,n){if(T.startsWith(".")&&!n&&o.length===1&&o[0].startsWith(A)&&!o[0].includes("node_modules")){let r=X(A,o[0]),c;r.startsWith(P)?c=I(A,X(P,r)):c=I(A,P,r);let a=I(c,T),d=a+".js";if(w(d))return d;if(a.includes(".")&&w(a))return a}return E(T,o,n)}}});var k=p((IE,R_)=>{"use strict";var O=require("path"),x_=require("fs"),{relative:aE,join:NE}=O,{existsSync:q_}=x_;function X_(){let t=__dirname;for(;!q_(O.join(t,"package.json"));){let E=O.dirname(t);if(E===t)throw new Error("Could not find package root");t=E}return t}i(X_,"getHDBPackageRoot");var l=X_(),J="js",G=J,$_="harperdb-config.yaml",Q_="defaultConfig.yaml",J_="hdb",z=`harperdb.${G}`,Z=`customFunctionsServer.${G}`,z_=`restartHdb.${G}`,W="HarperDB",M="Custom Functions",h="Clustering Hub",H="Clustering Leaf",Z_="Clustering Ingest Service",_e="Clustering Reply Service",ee="foreground.pid",te="hdb.pid",Ee="data",Te={HDB:W,CLUSTERING_HUB:h,CLUSTERING_LEAF:H,CLUSTERING_INGEST_SERVICE:Z_,CLUSTERING_REPLY_SERVICE:_e,CUSTOM_FUNCTIONS:M,RESTART_HDB:"Restart HDB",INSTALL:"Install",RUN:"Run",STOP:"Stop",UPGRADE:"Upgrade",REGISTER:"Register",JOB:"Job",CLUSTERING_UPGRADE_4_0_0:"Upgrade-4-0-0"},se={HDB:"hdb.log",INSTALL:"install.log",CLUSTERING_HUB:"clustering_hub.log",CLUSTERING_LEAF:"clustering_leaf.log"},oe={NOTIFY:"notify",FATAL:"fatal",ERROR:"error",WARN:"warn",INFO:"info",DEBUG:"debug",TRACE:"trace"},re={harperdb:W,"clustering hub":h,"clustering leaf":H,"custom functions":M,custom_functions:M,clustering:"clustering","clustering config":"clustering config",clustering_config:"clustering_config",http_workers:"http_workers"},ne={CLUSTERING_HUB_PROC_DESCRIPTOR:h,CLUSTERING_LEAF_PROC_DESCRIPTOR:H},Y={HDB:O.join(l,"server/harperdb"),CUSTOM_FUNCTIONS:O.join(l,"server/customFunctions"),CLUSTERING_HUB:O.join(l,"server/nats"),CLUSTERING_LEAF:O.join(l,"server/nats")},Se={HDB:O.join(Y.HDB,z),CUSTOM_FUNCTIONS:O.join(Y.CUSTOM_FUNCTIONS,Z)},Re={MAIN:"bin/harperdb.js",NATS_INGEST_SERVICE:O.join(l,"launchServiceScripts/launchNatsIngestService.js"),NATS_REPLY_SERVICE:O.join(l,"launchServiceScripts/launchNatsReplyService.js"),NODES_UPGRADE_4_0_0:O.join(l,"launchServiceScripts/launchUpdateNodes4-0-0.js")},ie={SUPER_USER:"super_user",CLUSTER_USER:"cluster_user"},__="support@harperdb.io",Oe="customer-success@harperdb.io",e_=1,ce=4141,t_="https://harperdbhelp.zendesk.com/hc/en-us/requests/new",Ae="https://www.harperdb.io/product",ae=`For support, please submit a request at ${t_} or contact ${__}`,E_=`For license support, please contact ${Oe}`,Ne="None of the specified records were found.",Ie="hash attribute not found",le=`Your current license only supports ${e_} role. ${E_}`,ue="Your current license only supports 3 connections to a node.",Ce="127.0.0.1",Le=1,Ue=/^\.$/,de=/^\.\.$/,pe="U+002E",Pe=/\//g,me="U+002F",De=/U\+002F/g,ge=/^U\+002E$/,Me=/^U\+002EU\+002E$/,Ge="d",he=999999,He="*",fe="--max-old-space-size=",be="system",Be="__hdb_hash",Fe=".harperdb",ye=".hdb",ve="keys",Ke="hdb_boot_properties.file",we=".updateConfig.json",Ve="SIGTSTP",ke=24,Ye=6e4,We=448,je="blob",xe="trash",qe="database",Xe="schema",$e="transactions",Qe=".count",Je="id",ze="PROCESS_NAME",T_={SETTINGS_PATH_KEY:"settings_path"},s_=require("lodash"),Ze={TC_AGREEMENT:"TC_AGREEMENT",CLUSTERING_USER:"CLUSTERING_USER",CLUSTERING_PASSWORD:"CLUSTERING_PASSWORD",HDB_ADMIN_USERNAME:"HDB_ADMIN_USERNAME",HDB_ADMIN_PASSWORD:"HDB_ADMIN_PASSWORD",OPERATIONSAPI_ROOT:"OPERATIONSAPI_ROOT",ROOTPATH:"ROOTPATH",OPERATIONSAPI_NETWORK_PORT:"OPERATIONSAPI_NETWORK_PORT",CLUSTERING_NODENAME:"CLUSTERING_NODENAME",CLUSTERING_ENABLED:"CLUSTERING_ENABLED",HDB_CONFIG:"HDB_CONFIG",OPERATIONSAPI_NETWORK_SECUREPORT:"OPERATIONSAPI_NETWORK_SECUREPORT",CLUSTERING_PORT:"CLUSTERING_PORT",HDB_ROOT:"HDB_ROOT",SERVER_PORT:"SERVER_PORT",NODE_NAME:"NODE_NAME",CLUSTERING:"CLUSTERING"},_t={HDB_PATH_KEY:"HDB_INTERNAL_PATH",HDB_AUTH_HEADER:"hdb_auth_header",HDB_USER_DATA_KEY:"hdb_user",CHUNK_SIZE:1e3,MAX_CHARACTER_SIZE:250},et={DATA_VERSION:"data_version",UPGRADE_VERSION:"upgrade_version"},tt={JOB_TABLE_NAME:"hdb_job",NODE_TABLE_NAME:"hdb_nodes",ATTRIBUTE_TABLE_NAME:"hdb_attribute",LICENSE_TABLE_NAME:"hdb_license",ROLE_TABLE_NAME:"hdb_role",SCHEMA_TABLE_NAME:"hdb_schema",TABLE_TABLE_NAME:"hdb_table",USER_TABLE_NAME:"hdb_user",INFO_TABLE_NAME:"hdb_info"},Et={JOB_TABLE_HASH_ATTRIBUTE:"id",NODE_TABLE_HASH_ATTRIBUTE:"name",ATTRIBUTE_TABLE_HASH_ATTRIBUTE:"id",LICENSE_TABLE_HASH_ATTRIBUTE:"license_key",ROLE_TABLE_HASH_ATTRIBUTE:"id",SCHEMA_TABLE_HASH_ATTRIBUTE:"name",TABLE_TABLE_HASH_ATTRIBUTE:"id",USER_TABLE_HASH_ATTRIBUTE:"username",INFO_TABLE_ATTRIBUTE:"info_id"},R="hdb_internal:",Tt={CREATE_SCHEMA:R+"create_schema",CREATE_TABLE:R+"create_table",CREATE_ATTRIBUTE:R+"create_attribute",ADD_USER:R+"add_user",ALTER_USER:R+"alter_user",DROP_USER:R+"drop_user",HDB_NODES:R+"hdb_nodes",HDB_USERS:R+"hdb_users",HDB_WORKERS:R+"hdb_workers",CATCHUP:R+"catchup",SCHEMA_CATCHUP:R+"schema_catchup",WORKER_ROOM:R+"cluster_workers"},st={ATTR_ATTRIBUTE_KEY:"attribute",ATTR_CREATEDDATE_KEY:"createddate",ATTR_HASH_ATTRIBUTE_KEY:"hash_attribute",ATTR_ID_KEY:"id",ATTR_NAME_KEY:"name",ATTR_PASSWORD_KEY:"password",ATTR_RESIDENCE_KEY:"residence",ATTR_ROLE_KEY:"role",ATTR_SCHEMA_KEY:"schema",ATTR_SCHEMA_TABLE_KEY:"schema_table",ATTR_TABLE_KEY:"table",ATTR_USERNAME_KEY:"username"},ot="060493.ks",rt=".license",nt={CREATED:"CREATED",IN_PROGRESS:"IN_PROGRESS",COMPLETE:"COMPLETE",ERROR:"ERROR"},e={INSERT:"insert",UPDATE:"update",UPSERT:"upsert",SEARCH_BY_CONDITIONS:"search_by_conditions",SEARCH_BY_HASH:"search_by_hash",SEARCH_BY_ID:"search_by_id",SEARCH_BY_VALUE:"search_by_value",SEARCH:"search",SQL:"sql",CSV_DATA_LOAD:"csv_data_load",CSV_FILE_LOAD:"csv_file_load",CSV_URL_LOAD:"csv_url_load",CREATE_SCHEMA:"create_schema",CREATE_DATABASE:"create_database",CREATE_TABLE:"create_table",CREATE_ATTRIBUTE:"create_attribute",DROP_SCHEMA:"drop_schema",DROP_DATABASE:"drop_database",DROP_TABLE:"drop_table",DESCRIBE_SCHEMA:"describe_schema",DESCRIBE_DATABASE:"describe_database",DESCRIBE_TABLE:"describe_table",DESCRIBE_ALL:"describe_all",DELETE:"delete",ADD_USER:"add_user",ALTER_USER:"alter_user",DROP_USER:"drop_user",LIST_USERS:"list_users",LIST_ROLES:"list_roles",ADD_ROLE:"add_role",ALTER_ROLE:"alter_role",DROP_ROLE:"drop_role",USER_INFO:"user_info",READ_LOG:"read_log",ADD_NODE:"add_node",UPDATE_NODE:"update_node",SET_NODE_REPLICATION:"set_node_replication",EXPORT_TO_S3:"export_to_s3",IMPORT_FROM_S3:"import_from_s3",DELETE_FILES_BEFORE:"delete_files_before",DELETE_RECORDS_BEFORE:"delete_records_before",EXPORT_LOCAL:"export_local",SEARCH_JOBS_BY_START_DATE:"search_jobs_by_start_date",GET_JOB:"get_job",DELETE_JOB:"delete_job",UPDATE_JOB:"update_job",GET_FINGERPRINT:"get_fingerprint",SET_LICENSE:"set_license",GET_REGISTRATION_INFO:"registration_info",CONFIGURE_CLUSTER:"configure_cluster",SET_CONFIGURATION:"set_configuration",CLUSTER_STATUS:"cluster_status",CLUSTER_NETWORK:"cluster_network",DROP_ATTRIBUTE:"drop_attribute",REMOVE_NODE:"remove_node",RESTART:"restart",RESTART_SERVICE:"restart_service",CATCHUP:"catchup",SYSTEM_INFORMATION:"system_information",DELETE_AUDIT_LOGS_BEFORE:"delete_audit_logs_before",READ_AUDIT_LOG:"read_audit_log",CREATE_AUTHENTICATION_TOKENS:"create_authentication_tokens",LOGIN:"login",LOGOUT:"logout",REFRESH_OPERATION_TOKEN:"refresh_operation_token",GET_CONFIGURATION:"get_configuration",CUSTOM_FUNCTIONS_STATUS:"custom_functions_status",GET_CUSTOM_FUNCTIONS:"get_custom_functions",GET_CUSTOM_FUNCTION:"get_custom_function",SET_CUSTOM_FUNCTION:"set_custom_function",GET_COMPONENTS:"get_components",GET_COMPONENT_FILE:"get_component_file",SET_COMPONENT_FILE:"set_component_file",DROP_COMPONENT:"drop_component",DROP_CUSTOM_FUNCTION:"drop_custom_function",ADD_CUSTOM_FUNCTION_PROJECT:"add_custom_function_project",ADD_COMPONENT:"add_component",DROP_CUSTOM_FUNCTION_PROJECT:"drop_custom_function_project",PACKAGE_CUSTOM_FUNCTION_PROJECT:"package_custom_function_project",DEPLOY_CUSTOM_FUNCTION_PROJECT:"deploy_custom_function_project",PACKAGE_COMPONENT:"package_component",DEPLOY_COMPONENT:"deploy_component",CLUSTER_SET_ROUTES:"cluster_set_routes",CLUSTER_DELETE_ROUTES:"cluster_delete_routes",CLUSTER_GET_ROUTES:"cluster_get_routes",READ_TRANSACTION_LOG:"read_transaction_log",DELETE_TRANSACTION_LOGS_BEFORE:"delete_transaction_logs_before",INSTALL_NODE_MODULES:"install_node_modules",AUDIT_NODE_MODULES:"audit_node_modules",PURGE_STREAM:"purge_stream",GET_BACKUP:"get_backup"},St={CSV:".csv",JSON:".json"},Rt={AWS_ACCESS_KEY:"aws_access_key_id",AWS_SECRET:"aws_secret_access_key",AWS_BUCKET:"bucket",AWS_FILE_KEY:"key",REGION:"region"},it={SELECT:"select",INSERT:"insert",UPDATE:"update",DELETE:"delete"},m={};m[e.INSERT]=e.INSERT;m[e.UPDATE]=e.UPDATE;m[e.UPSERT]=e.UPSERT;m[e.DELETE]=e.DELETE;var s=Object.create(null);s[e.DESCRIBE_ALL]=e.DESCRIBE_ALL;s[e.DESCRIBE_TABLE]=e.DESCRIBE_TABLE;s[e.DESCRIBE_SCHEMA]=e.DESCRIBE_SCHEMA;s[e.READ_LOG]=e.READ_LOG;s[e.ADD_NODE]=e.ADD_NODE;s[e.LIST_USERS]=e.LIST_USERS;s[e.LIST_ROLES]=e.LIST_ROLES;s[e.USER_INFO]=e.USER_INFO;s[e.SQL]=e.SQL;s[e.GET_JOB]=e.GET_JOB;s[e.SEARCH_JOBS_BY_START_DATE]=e.SEARCH_JOBS_BY_START_DATE;s[e.DELETE_FILES_BEFORE]=e.DELETE_FILES_BEFORE;s[e.EXPORT_LOCAL]=e.EXPORT_LOCAL;s[e.EXPORT_TO_S3]=e.EXPORT_TO_S3;s[e.CLUSTER_STATUS]=e.CLUSTER_STATUS;s[e.REMOVE_NODE]=e.REMOVE_NODE;s[e.RESTART]=e.RESTART;s[e.CUSTOM_FUNCTIONS_STATUS]=e.CUSTOM_FUNCTIONS_STATUS;s[e.GET_CUSTOM_FUNCTIONS]=e.GET_CUSTOM_FUNCTIONS;s[e.GET_CUSTOM_FUNCTION]=e.GET_CUSTOM_FUNCTION;s[e.SET_CUSTOM_FUNCTION]=e.SET_CUSTOM_FUNCTION;s[e.DROP_CUSTOM_FUNCTION]=e.DROP_CUSTOM_FUNCTION;s[e.ADD_CUSTOM_FUNCTION_PROJECT]=e.ADD_CUSTOM_FUNCTION_PROJECT;s[e.DROP_CUSTOM_FUNCTION_PROJECT]=e.DROP_CUSTOM_FUNCTION_PROJECT;s[e.PACKAGE_CUSTOM_FUNCTION_PROJECT]=e.PACKAGE_CUSTOM_FUNCTION_PROJECT;s[e.DEPLOY_CUSTOM_FUNCTION_PROJECT]=e.DEPLOY_CUSTOM_FUNCTION_PROJECT;var Ot={DEV:"dev",RUN:"run",START:"start",INSTALL:"install",REGISTER:"register",STOP:"stop",RESTART:"restart",VERSION:"version",UPGRADE:"upgrade",HELP:"help",STATUS:"status",OPERATION:"operation",RENEWCERTS:"renew-certs"},ct={point:"point",lineString:"lineString",multiLineString:"multiLineString",multiPoint:"multiPoint",multiPolygon:"multiPolygon",polygon:"polygon"},o_={HDB_ROOT_KEY:"HDB_ROOT",SERVER_PORT_KEY:"SERVER_PORT",CERT_KEY:"CERTIFICATE",PRIVATE_KEY_KEY:"PRIVATE_KEY",HTTP_SECURE_ENABLED_KEY:"HTTPS_ON",CORS_ENABLED_KEY:"CORS_ON",CORS_WHITELIST_KEY:"CORS_WHITELIST",LOG_LEVEL_KEY:"LOG_LEVEL",LOGGER_KEY:"LOGGER",LOG_PATH_KEY:"LOG_PATH",LOG_ROTATE:"LOG_ROTATE",LOG_ROTATE_MAX_SIZE:"LOG_ROTATE_MAX_SIZE",LOG_ROTATE_RETAIN:"LOG_ROTATE_RETAIN",LOG_ROTATE_COMPRESS:"LOG_ROTATE_COMPRESS",LOG_ROTATE_DATE_FORMAT:"LOG_ROTATE_DATE_FORMAT",LOG_ROTATE_ROTATE_MODULE:"LOG_ROTATE_ROTATE_MODULE",LOG_ROTATE_WORKER_INTERVAL:"LOG_ROTATE_WORKER_INTERVAL",LOG_ROTATE_ROTATE_INTERVAL:"LOG_ROTATE_ROTATE_INTERVAL",LOG_ROTATE_TIMEZONE:"LOG_ROTATE_TIMEZONE",LOG_DAILY_ROTATE_KEY:"LOG_DAILY_ROTATE",LOG_MAX_DAILY_FILES_KEY:"LOG_MAX_DAILY_FILES",PROPS_ENV_KEY:"NODE_ENV",SETTINGS_PATH_KEY:"settings_path",CLUSTERING_PORT_KEY:"CLUSTERING_PORT",CLUSTERING_NODE_NAME_KEY:"NODE_NAME",CLUSTERING_ENABLED_KEY:"CLUSTERING",ALLOW_SELF_SIGNED_SSL_CERTS:"ALLOW_SELF_SIGNED_SSL_CERTS",MAX_HDB_PROCESSES:"MAX_HDB_PROCESSES",INSTALL_USER:"install_user",CLUSTERING_USER_KEY:"CLUSTERING_USER",MAX_CLUSTERING_PROCESSES:"MAX_CLUSTERING_PROCESSES",SERVER_TIMEOUT_KEY:"SERVER_TIMEOUT_MS",SERVER_KEEP_ALIVE_TIMEOUT_KEY:"SERVER_KEEP_ALIVE_TIMEOUT",SERVER_HEADERS_TIMEOUT_KEY:"SERVER_HEADERS_TIMEOUT",DISABLE_TRANSACTION_LOG_KEY:"DISABLE_TRANSACTION_LOG",OPERATION_TOKEN_TIMEOUT_KEY:"OPERATION_TOKEN_TIMEOUT",REFRESH_TOKEN_TIMEOUT_KEY:"REFRESH_TOKEN_TIMEOUT",CUSTOM_FUNCTIONS_ENABLED_KEY:"CUSTOM_FUNCTIONS",CUSTOM_FUNCTIONS_PORT_KEY:"CUSTOM_FUNCTIONS_PORT",CUSTOM_FUNCTIONS_DIRECTORY_KEY:"CUSTOM_FUNCTIONS_DIRECTORY",MAX_CUSTOM_FUNCTION_PROCESSES:"MAX_CUSTOM_FUNCTION_PROCESSES",LOG_TO_FILE:"LOG_TO_FILE",LOG_TO_STDSTREAMS:"LOG_TO_STDSTREAMS",RUN_IN_FOREGROUND:"RUN_IN_FOREGROUND",LOCAL_STUDIO_ON:"LOCAL_STUDIO_ON",STORAGE_WRITE_ASYNC:"STORAGE_WRITE_ASYNC"},At=s_.invert(o_),at={CUSTOMFUNCTIONS_ENABLED:"customFunctions_enabled",CUSTOMFUNCTIONS_NETWORK_PORT:"customFunctions_network_port",CUSTOMFUNCTIONS_TLS_CERTIFICATE:"customFunctions_tls_certificate",CUSTOMFUNCTIONS_NETWORK_CORS:"customFunctions_network_cors",CUSTOMFUNCTIONS_NETWORK_CORSACCESSLIST:"customFunctions_network_corsAccessList",CUSTOMFUNCTIONS_NETWORK_HEADERSTIMEOUT:"customFunctions_network_headersTimeout",CUSTOMFUNCTIONS_NETWORK_HTTPS:"customFunctions_network_https",CUSTOMFUNCTIONS_NETWORK_KEEPALIVETIMEOUT:"customFunctions_network_keepAliveTimeout",CUSTOMFUNCTIONS_TLS_PRIVATEKEY:"customFunctions_tls_privateKey",CUSTOMFUNCTIONS_TLS_CERT_AUTH:"customFunctions_tls_certificateAuthority",CUSTOMFUNCTIONS_NETWORK_TIMEOUT:"customFunctions_network_timeout",CUSTOMFUNCTIONS_NODEENV:"customFunctions_nodeEnv",CUSTOMFUNCTIONS_ROOT:"customFunctions_root"},_={ANALYTICS_AGGREGATEPERIOD:"analytics_aggregatePeriod",AUTHENTICATION_AUTHORIZELOCAL:"authentication_authorizeLocal",AUTHENTICATION_CACHETTL:"authentication_cacheTTL",AUTHENTICATION_ENABLESESSIONS:"authentication_enableSessions",AUTHENTICATION_OPERATIONTOKENTIMEOUT:"authentication_operationTokenTimeout",AUTHENTICATION_REFRESHTOKENTIMEOUT:"authentication_refreshTokenTimeout",CLUSTERING_USER:"clustering_user",CLUSTERING_ENABLED:"clustering_enabled",CLUSTERING_HUBSERVER_CLUSTER_NAME:"clustering_hubServer_cluster_name",CLUSTERING_HUBSERVER_CLUSTER_NETWORK_PORT:"clustering_hubServer_cluster_network_port",CLUSTERING_HUBSERVER_CLUSTER_NETWORK_ROUTES:"clustering_hubServer_cluster_network_routes",CLUSTERING_HUBSERVER_LEAFNODES_NETWORK_PORT:"clustering_hubServer_leafNodes_network_port",CLUSTERING_HUBSERVER_NETWORK_PORT:"clustering_hubServer_network_port",CLUSTERING_LEAFSERVER_NETWORK_PORT:"clustering_leafServer_network_port",CLUSTERING_LEAFSERVER_NETWORK_ROUTES:"clustering_leafServer_network_routes",CLUSTERING_LEAFSERVER_STREAMS_MAXAGE:"clustering_leafServer_streams_maxAge",CLUSTERING_LEAFSERVER_STREAMS_MAXBYTES:"clustering_leafServer_streams_maxBytes",CLUSTERING_LEAFSERVER_STREAMS_MAXMSGS:"clustering_leafServer_streams_maxMsgs",CLUSTERING_LEAFSERVER_STREAMS_PATH:"clustering_leafServer_streams_path",CLUSTERING_NODENAME:"clustering_nodeName",CLUSTERING_TLS_CERTIFICATE:"clustering_tls_certificate",CLUSTERING_TLS_PRIVATEKEY:"clustering_tls_privateKey",CLUSTERING_TLS_CERT_AUTH:"clustering_tls_certificateAuthority",CLUSTERING_TLS_INSECURE:"clustering_tls_insecure",CLUSTERING_TLS_VERIFY:"clustering_tls_verify",CLUSTERING_LOGLEVEL:"clustering_logLevel",CLUSTERING_REPUBLISHMESSAGES:"clustering_republishMessages",CLUSTERING_DATABASELEVEL:"clustering_databaseLevel",CUSTOMFUNCTIONS_NETWORK_HTTPS:"customFunctions_network_https",THREADS:"threads",MAXHEAPMEMORY:"maxHeapMemory",HTTP_SESSIONAFFINITY:"http_sessionAffinity",HTTP_COMPRESSIONTHRESHOLD:"http_compressionThreshold",HTTP_CORS:"http_cors",HTTP_CORSACCESSLIST:"http_corsAccessList",HTTP_HEADERSTIMEOUT:"http_headersTimeout",HTTP_KEEPALIVETIMEOUT:"http_keepAliveTimeout",HTTP_TIMEOUT:"http_timeout",HTTP_PORT:"http_port",HTTP_SECUREPORT:"http_securePort",LOCALSTUDIO_ENABLED:"localStudio_enabled",LOGGING_FILE:"logging_file",LOGGING_LEVEL:"logging_level",LOGGING_ROOT:"logging_root",LOGGING_ROTATION_ENABLED:"logging_rotation_enabled",LOGGING_ROTATION_COMPRESS:"logging_rotation_compress",LOGGING_ROTATION_INTERVAL:"logging_rotation_interval",LOGGING_ROTATION_MAXSIZE:"logging_rotation_maxSize",LOGGING_ROTATION_PATH:"logging_rotation_path",LOGGING_STDSTREAMS:"logging_stdStreams",LOGGING_AUDITLOG:"logging_auditLog",LOGGING_AUDITRETENTION:"logging_auditRetention",LOGGING_AUDITAUTHEVENTS_LOGFAILED:"logging_auditAuthEvents_logFailed",LOGGING_AUDITAUTHEVENTS_LOGSUCCESSFUL:"logging_auditAuthEvents_logSuccessful",OPERATIONSAPI_NETWORK_CORS:"operationsApi_network_cors",OPERATIONSAPI_NETWORK_CORSACCESSLIST:"operationsApi_network_corsAccessList",OPERATIONSAPI_NETWORK_HEADERSTIMEOUT:"operationsApi_network_headersTimeout",OPERATIONSAPI_NETWORK_HTTPS:"operationsApi_network_https",OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT:"operationsApi_network_keepAliveTimeout",OPERATIONSAPI_NETWORK_PORT:"operationsApi_network_port",OPERATIONSAPI_NETWORK_DOMAINSOCKET:"operationsApi_network_domainSocket",OPERATIONSAPI_NETWORK_SECUREPORT:"operationsApi_network_securePort",OPERATIONSAPI_TLS_CERTIFICATE:"operationsApi_tls_certificate",OPERATIONSAPI_TLS_PRIVATEKEY:"operationsApi_tls_privateKey",OPERATIONSAPI_TLS_CERTIFICATEAUTHORITY:"operationsApi_tls_certificateAuthority",OPERATIONSAPI_NETWORK_TIMEOUT:"operationsApi_network_timeout",ROOTPATH:"rootPath",SERIALIZATION_BIGINT:"serialization_bigInt",STORAGE_WRITEASYNC:"storage_writeAsync",STORAGE_OVERLAPPINGSYNC:"storage_overlappingSync",STORAGE_CACHING:"storage_caching",STORAGE_COMPRESSION:"storage_compression",STORAGE_NOREADAHEAD:"storage_noReadAhead",STORAGE_PREFETCHWRITES:"storage_prefetchWrites",STORAGE_ENCRYPTION:"storage_encryption",STORAGE_PATH:"storage_path",STORAGE_AUDIT_PATH:"storage_audit_path",DATABASES:"databases",IGNORE_SCRIPTS:"ignoreScripts",MQTT_NETWORK_PORT:"mqtt_network_port",MQTT_WEBSOCKET:"mqtt_webSocket",MQTT_NETWORK_SECUREPORT:"mqtt_network_securePort",MQTT_NETWORK_MTLS:"mqtt_network_mtls",MQTT_NETWORK_MTLS_CERTIFICATEAUTHORITY:"mqtt_network_mtls_certificateAuthority",MQTT_NETWORK_MTLS_USER:"mqtt_network_mtls_user",MQTT_REQUIREAUTHENTICATION:"mqtt_requireAuthentication",COMPONENTSROOT:"componentsRoot",TLS_CERTIFICATE:"tls_certificate",TLS_PRIVATEKEY:"tls_privateKey",TLS_CERTIFICATEAUTHORITY:"tls_certificateAuthority",TLS_CIPHERS:"tls_ciphers"},r_={settings_path:T_.SETTINGS_PATH_KEY,hdb_root_key:_.ROOTPATH,hdb_root:_.ROOTPATH,rootpath:_.ROOTPATH,server_port_key:_.OPERATIONSAPI_NETWORK_PORT,server_port:_.OPERATIONSAPI_NETWORK_PORT,cert_key:_.TLS_CERTIFICATE,certificate:_.TLS_CERTIFICATE,private_key_key:_.TLS_PRIVATEKEY,private_key:_.TLS_PRIVATEKEY,http_secure_enabled_key:_.OPERATIONSAPI_NETWORK_HTTPS,https_on:_.OPERATIONSAPI_NETWORK_HTTPS,cors_enabled_key:_.OPERATIONSAPI_NETWORK_CORS,cors_on:_.OPERATIONSAPI_NETWORK_CORS,cors_whitelist_key:_.OPERATIONSAPI_NETWORK_CORSACCESSLIST,cors_whitelist:_.OPERATIONSAPI_NETWORK_CORSACCESSLIST,cors_accesslist_key:_.OPERATIONSAPI_NETWORK_CORSACCESSLIST,cors_accesslist:_.OPERATIONSAPI_NETWORK_CORSACCESSLIST,log_level_key:_.LOGGING_LEVEL,log_level:_.LOGGING_LEVEL,log_path_key:_.LOGGING_ROOT,log_path:_.LOGGING_ROOT,clustering_node_name_key:_.CLUSTERING_NODENAME,node_name:_.CLUSTERING_NODENAME,clustering_enabled_key:_.CLUSTERING_ENABLED,clustering:_.CLUSTERING_ENABLED,max_http_threads:_.THREADS,max_hdb_processes:_.THREADS,server_timeout_key:_.OPERATIONSAPI_NETWORK_TIMEOUT,server_timeout_ms:_.OPERATIONSAPI_NETWORK_TIMEOUT,server_keep_alive_timeout_key:_.OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT,server_keep_alive_timeout:_.OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT,server_headers_timeout_key:_.OPERATIONSAPI_NETWORK_HEADERSTIMEOUT,server_headers_timeout:_.OPERATIONSAPI_NETWORK_HEADERSTIMEOUT,disable_transaction_log_key:_.LOGGING_AUDITLOG,disable_transaction_log:_.LOGGING_AUDITLOG,operation_token_timeout_key:_.AUTHENTICATION_OPERATIONTOKENTIMEOUT,operation_token_timeout:_.AUTHENTICATION_OPERATIONTOKENTIMEOUT,refresh_token_timeout_key:_.AUTHENTICATION_REFRESHTOKENTIMEOUT,refresh_token_timeout:_.AUTHENTICATION_REFRESHTOKENTIMEOUT,custom_functions_port_key:_.HTTP_PORT,custom_functions_port:_.HTTP_PORT,custom_functions_directory_key:_.COMPONENTSROOT,custom_functions_directory:_.COMPONENTSROOT,max_custom_function_processes:_.THREADS,log_to_file:_.LOGGING_FILE,log_to_stdstreams:_.LOGGING_STDSTREAMS,local_studio_on:_.LOCALSTUDIO_ENABLED,clustering_port:_.CLUSTERING_HUBSERVER_CLUSTER_NETWORK_PORT,clustering_user:_.CLUSTERING_USER,clustering_enabled:_.CLUSTERING_ENABLED,clustering_hubserver_cluster_name:_.CLUSTERING_HUBSERVER_CLUSTER_NAME,clustering_hubserver_cluster_network_port:_.CLUSTERING_HUBSERVER_CLUSTER_NETWORK_PORT,clustering_hubserver_cluster_network_routes:_.CLUSTERING_HUBSERVER_CLUSTER_NETWORK_ROUTES,clustering_hubserver_leafnodes_network_port:_.CLUSTERING_HUBSERVER_LEAFNODES_NETWORK_PORT,clustering_hubserver_network_port:_.CLUSTERING_HUBSERVER_NETWORK_PORT,clustering_leafserver_network_port:_.CLUSTERING_LEAFSERVER_NETWORK_PORT,clustering_leafserver_network_routes:_.CLUSTERING_LEAFSERVER_NETWORK_ROUTES,clustering_leafserver_streams_maxage:_.CLUSTERING_LEAFSERVER_STREAMS_MAXAGE,clustering_leafserver_streams_maxbytes:_.CLUSTERING_LEAFSERVER_STREAMS_MAXBYTES,clustering_leafserver_streams_maxmsgs:_.CLUSTERING_LEAFSERVER_STREAMS_MAXMSGS,clustering_leafserver_streams_path:_.CLUSTERING_LEAFSERVER_STREAMS_PATH,clustering_nodename:_.CLUSTERING_NODENAME,clustering_tls_certificate:_.CLUSTERING_TLS_CERTIFICATE,clustering_tls_privatekey:_.CLUSTERING_TLS_PRIVATEKEY,clustering_tls_certificateauthority:_.CLUSTERING_TLS_CERT_AUTH,clustering_tls_insecure:_.CLUSTERING_TLS_INSECURE,clustering_tls_verify:_.CLUSTERING_TLS_VERIFY,clustering_loglevel:_.CLUSTERING_LOGLEVEL,clustering_republishmessages:_.CLUSTERING_REPUBLISHMESSAGES,clustering_databaselevel:_.CLUSTERING_DATABASELEVEL,customfunctions_network_port:_.HTTP_PORT,customfunctions_tls_certificate:_.TLS_CERTIFICATE,customfunctions_network_cors:_.HTTP_CORS,customfunctions_network_corsaccesslist:_.HTTP_CORSACCESSLIST,customfunctions_network_headerstimeout:_.HTTP_HEADERSTIMEOUT,customfunctions_network_https:_.CUSTOMFUNCTIONS_NETWORK_HTTPS,customfunctions_network_keepalivetimeout:_.HTTP_KEEPALIVETIMEOUT,customfunctions_tls_privatekey:_.TLS_PRIVATEKEY,customfunctions_tls_certificateauthority:_.TLS_CERTIFICATEAUTHORITY,customfunctions_network_timeout:_.HTTP_TIMEOUT,http_threads:_.THREADS,threads:_.THREADS,maxheapmemory:_.MAXHEAPMEMORY,http_session_affinity:_.HTTP_SESSIONAFFINITY,http_compressionthreshold:_.HTTP_COMPRESSIONTHRESHOLD,http_cors:_.HTTP_CORS,http_corsaccesslist:_.HTTP_CORSACCESSLIST,http_headerstimeout:_.HTTP_HEADERSTIMEOUT,http_keepalivetimeout:_.HTTP_KEEPALIVETIMEOUT,http_timeout:_.HTTP_TIMEOUT,http_port:_.HTTP_PORT,http_secureport:_.HTTP_SECUREPORT,customfunctions_processes:_.THREADS,customfunctions_root:_.COMPONENTSROOT,localstudio_enabled:_.LOCALSTUDIO_ENABLED,logging_file:_.LOGGING_FILE,logging_level:_.LOGGING_LEVEL,logging_root:_.LOGGING_ROOT,logging_rotation_enabled:_.LOGGING_ROTATION_ENABLED,logging_rotation_compress:_.LOGGING_ROTATION_COMPRESS,logging_rotation_interval:_.LOGGING_ROTATION_INTERVAL,logging_rotation_maxsize:_.LOGGING_ROTATION_MAXSIZE,logging_rotation_path:_.LOGGING_ROTATION_PATH,logging_stdstreams:_.LOGGING_STDSTREAMS,logging_auditlog:_.LOGGING_AUDITLOG,logging_auditretention:_.LOGGING_AUDITRETENTION,logging_auditauthevents_logfailed:_.LOGGING_AUDITAUTHEVENTS_LOGFAILED,logging_auditauthevents_logsuccessful:_.LOGGING_AUDITAUTHEVENTS_LOGSUCCESSFUL,operationsapi_authentication_operationtokentimeout:_.AUTHENTICATION_OPERATIONTOKENTIMEOUT,operationsapi_authentication_refreshtokentimeout:_.AUTHENTICATION_REFRESHTOKENTIMEOUT,operationsapi_network_cors:_.OPERATIONSAPI_NETWORK_CORS,operationsapi_network_corsaccesslist:_.OPERATIONSAPI_NETWORK_CORSACCESSLIST,operationsapi_network_headerstimeout:_.OPERATIONSAPI_NETWORK_HEADERSTIMEOUT,operationsapi_network_https:_.OPERATIONSAPI_NETWORK_HTTPS,operationsapi_network_keepalivetimeout:_.OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT,operationsapi_network_port:_.OPERATIONSAPI_NETWORK_PORT,operationsapi_network_domainsocket:_.OPERATIONSAPI_NETWORK_DOMAINSOCKET,operationsapi_network_secureport:_.OPERATIONSAPI_NETWORK_SECUREPORT,operationsapi_tls_certificate:_.OPERATIONSAPI_TLS_CERTIFICATE,operationsapi_tls_privatekey:_.OPERATIONSAPI_TLS_PRIVATEKEY,operationsapi_tls_certificateauthority:_.OPERATIONSAPI_TLS_CERTIFICATEAUTHORITY,operationsapi_network_timeout:_.OPERATIONSAPI_NETWORK_TIMEOUT,operationsapi_root:_.ROOTPATH,databases:_.DATABASES,storage_path:_.STORAGE_PATH,ignorescripts:_.IGNORE_SCRIPTS,mqtt_network_port:_.MQTT_NETWORK_PORT,mqtt_websocket:_.MQTT_WEBSOCKET,mqtt_network_secureport:_.MQTT_NETWORK_SECUREPORT,mqtt_network_mtls:_.MQTT_NETWORK_MTLS,mqtt_network_mtls_certificateAuthority:_.MQTT_NETWORK_MTLS_CERTIFICATEAUTHORITY,mqtt_network_mtls_user:_.MQTT_NETWORK_MTLS_USER,mqtt_requireauthentication:_.MQTT_REQUIREAUTHENTICATION,analytics_aggregatePeriod:_.ANALYTICS_AGGREGATEPERIOD,authentication_authorizelocal:_.AUTHENTICATION_AUTHORIZELOCAL,authentication_cachettl:_.AUTHENTICATION_CACHETTL,authentication_enablesessions:_.AUTHENTICATION_ENABLESESSIONS,authentication_operationtokentimeout:_.AUTHENTICATION_OPERATIONTOKENTIMEOUT,authentication_refreshtokentimeout:_.AUTHENTICATION_REFRESHTOKENTIMEOUT,componentsroot:_.COMPONENTSROOT,tls_certificate:_.TLS_CERTIFICATE,tls_privatekey:_.TLS_PRIVATEKEY,tls_certificateauthority:_.TLS_CERTIFICATEAUTHORITY,tls_ciphers:_.TLS_CIPHERS};for(let t in _){let E=_[t];r_[E.toLowerCase()]=E}var Nt={TABLES:"tables",PATH:"path",AUDIT_PATH:"auditPath"},It={csv_file_load:"csv_file_load",csv_data_load:e.CSV_DATA_LOAD,csv_url_load:e.CSV_URL_LOAD,delete_files_before:"delete_files_before",delete_records_before:"delete_records_before",delete_audit_logs_before:"delete_audit_logs_before",delete_transaction_logs_before:"delete_transaction_logs_before",empty_trash:"empty_trash",export_local:"export_local",export_to_s3:"export_to_s3",import_from_s3:"import_from_s3"},lt={CLUSTERING_PAYLOAD:"clustering_payload",DELEGATE_THREAD_RESPONSE:"delegate_thread_response",CLUSTERING:"clustering",SCHEMA:"schema",CLUSTER_STATUS:"cluster_status",JOB:"job",CHILD_STARTED:"child_started",CHILD_STOPPED:"child_stopped",USER:"user",RESTART:"restart"},ut={BIDIRECTIONAL:"BIDIRECTIONAL",OUTBOUND:"OUTBOUND",INBOUND:"INBOUND"},Ct={VERSION_DEFAULT:"2.2.0"},Lt={DEVELOPMENT:8192,DEFAULT:512},Ut={IDENTIFY:"identify",AUTHENTICATE:"authenticate",AUTHENTICATE_OK:"authenticated",AUTHENTICATE_FAIL:"authenticate_fail",CONNECTION:"connection",CONNECT:"connect",CATCHUP_REQUEST:"catchup_request",CATCHUP_RESPONSE:"catchup",CONFIRM_MSG:"confirm_msg",ERROR:"error",DISCONNECT:"disconnect",SCHEMA_UPDATE_REQ:"schema_update_request",SCHEMA_UPDATE_RES:"schema_update_response",RECONNECT_ATTEMPT:"reconnect_attempt",CONNECT_ERROR:"connect_error",MESSAGE:"msg",VERSION_MISMATCH:"version_mismatch",DIRECTION_CHANGE:"direction_change"},dt={1e3:"SUCCESSFUL_SHUTDOWN",1001:"CLOSE_GOING_AWAY",1002:"CLOSE_PROTOCOL_ERROR",1003:"CLOSE_UNSUPPORTED",1005:"CLOSE_NO_STATUS",1006:"CLOSE_ABNORMAL",1007:"UNSUPPORTED_PAYLOAD",1008:"POLICY_VIOLATION",1009:"CLOSE_TOO_LARGE",1010:"MANDATORY_EXTENSION",1011:"SERVER_ERROR",1012:"SERVICE_RESTART",1013:"SERVER_BUSY",1014:"BAD_GATEWAY",1015:"HANDSHAKE_FAIL",4141:"LICENSE_LIMIT_REACHED"},pt={ENOENT:"ENOENT",EACCES:"EACCES",EEXIST:"EEXIST"},n_={CREATED_TIME:"__createdtime__",UPDATED_TIME:"__updatedtime__"},Pt=Symbol("metadata"),mt="__clustering__",Dt=Object.values(n_),gt=15984864e5,S_={LESS:"<",LESS_OR_EQ:"<=",GREATER:">",GREATER_OR_EQ:">=",BETWEEN:"..."},Mt=s_.invert(S_),Gt={GET_CLUSTER_STATUS:"GET_CLUSTER_STATUS",CLUSTER_STATUS_RESPONSE:"CLUSTER_STATUS_RESPONSE",ERROR_RESPONSE:"ERROR",ADD_USER:"ADD_USER",ALTER_USER:"ALTER_USER",DROP_USER:"DROP_USER",HDB_OPERATION:"HDB_OPERATION",ADD_NODE:"ADD_NODE",UPDATE_NODE:"UPDATE_NODE",REMOVE_NODE:"REMOVE_NODE",HDB_USERS_MSG:"HDB_USERS_MSG",HDB_WORKERS:"HDB_WORKERS",HDB_TRANSACTION:"HDB_TRANSACTION"},ht=111,Ht=`\r
|
|
2
|
+
`,ft={READ:"read",INSERT:"insert",UPDATE:"update",DELETE:"delete"},bt=["*","%"],Bt="unauthorized_access",Ft="func_val",yt={HASH_VALUE:"hash_value",TIMESTAMP:"timestamp",USERNAME:"username"},vt={JWT_PRIVATE_KEY_NAME:".jwtPrivate.key",JWT_PUBLIC_KEY_NAME:".jwtPublic.key",JWT_PASSPHRASE_NAME:".jwtPass"},Kt={SHUTDOWN:"shutdown",CHILD_STARTED:"child_started",CHILD_STOPPED:"child_stopped",SCHEMA:"schema",USER:"user",CLUSTER_STATUS_RESPONSE:"cluster_status_response",CLUSTER_STATUS_REQUEST:"cluster_status_request",METRICS:"metrics",GET_METRICS:"get_metrics",RESTART:"restart"},wt={HDB_CORE:"hdb_core",CUSTOM_FUNCTIONS:"custom_functions"},Vt={HTTP:"http"},kt={STOPPED:"stopped",ONLINE:"online"},Yt="3.x.x",Wt={SUCCESS:"success",FAILURE:"failure"},jt={AUTHENTICATION:"authentication",AUTHORIZATION:"authorization"};R_.exports={LOCAL_HARPERDB_OPERATIONS:s,HDB_SUPPORT_ADDRESS:__,HDB_SUPPORT_URL:t_,HDB_PRICING_URL:Ae,SUPPORT_HELP_MSG:ae,LICENSE_HELP_MSG:E_,HDB_PROC_NAME:z,HDB_PROC_DESCRIPTOR:W,CLUSTERING_LEAF_PROC_DESCRIPTOR:H,CLUSTERING_HUB_PROC_DESCRIPTOR:h,SYSTEM_SCHEMA_NAME:be,HASH_FOLDER_NAME:Be,HDB_HOME_DIR_NAME:Fe,UPDATE_FILE_NAME:we,LICENSE_KEY_DIR_NAME:ve,BOOT_PROPS_FILE_NAME:Ke,JOB_TYPE_ENUM:It,JOB_STATUS_ENUM:nt,SYSTEM_TABLE_NAMES:tt,SYSTEM_TABLE_HASH_ATTRIBUTES:Et,OPERATIONS_ENUM:e,VALID_S3_FILE_TYPES:St,S3_BUCKET_AUTH_KEYS:Rt,VALID_SQL_OPS_ENUM:it,GEO_CONVERSION_ENUM:ct,HDB_SETTINGS_NAMES:o_,HDB_SETTINGS_NAMES_REVERSE_LOOKUP:At,SERVICE_ACTIONS_ENUM:Ot,CLUSTER_MESSAGE_TYPE_ENUM:lt,CLUSTER_CONNECTION_DIRECTION_ENUM:ut,CLUSTER_EVENTS_DEFS_ENUM:Ut,PERIOD_REGEX:Ue,DOUBLE_PERIOD_REGEX:de,UNICODE_PERIOD:pe,FORWARD_SLASH_REGEX:Pe,UNICODE_FORWARD_SLASH:me,ESCAPED_FORWARD_SLASH_REGEX:De,ESCAPED_PERIOD_REGEX:ge,ESCAPED_DOUBLE_PERIOD_REGEX:Me,REG_KEY_FILE_NAME:ot,RESTART_TIMEOUT_MS:Ye,HDB_FILE_PERMISSIONS:We,DATABASES_DIR_NAME:qe,LEGACY_DATABASES_DIR_NAME:Xe,TRANSACTIONS_DIR_NAME:$e,LIMIT_COUNT_NAME:Qe,ID_ATTRIBUTE_STRING:Je,INSERT_MODULE_ENUM:_t,UPGRADE_JSON_FIELD_NAMES_ENUM:et,RESTART_CODE:Ve,RESTART_CODE_NUM:ke,CLUSTER_OPERATIONS:m,SYSTEM_DEFAULT_ATTRIBUTE_NAMES:st,HDB_INTERNAL_SC_CHANNEL_PREFIX:R,INTERNAL_SC_CHANNELS:Tt,CLUSTERING_MESSAGE_TYPES:Gt,HDB_FILE_SUFFIX:ye,BLOB_FOLDER_NAME:je,HDB_TRASH_DIR:xe,ORIGINATOR_SET_VALUE:ht,LICENSE_VALUES:Ct,RAM_ALLOCATION_ENUM:Lt,TIME_STAMP_NAMES_ENUM:n_,TIME_STAMP_NAMES:Dt,PERMS_UPDATE_RELEASE_TIMESTAMP:gt,SEARCH_NOT_FOUND_MESSAGE:Ne,SEARCH_ATTRIBUTE_NOT_FOUND:Ie,LICENSE_ROLE_DENIED_RESPONSE:le,LICENSE_MAX_CONNS_REACHED:ue,BASIC_LICENSE_MAX_NON_CU_ROLES:e_,BASIC_LICENSE_CLUSTER_CONNECTION_LIMIT_WS_ERROR_CODE:ce,VALUE_SEARCH_COMPARATORS:S_,VALUE_SEARCH_COMPARATORS_REVERSE_LOOKUP:Mt,LICENSE_FILE_NAME:rt,WEBSOCKET_CLOSE_CODE_DESCRIPTION_LOOKUP:dt,NEW_LINE:Ht,BASIC_LICENSE_MAX_CLUSTER_USER_ROLES:Le,MOMENT_DAYS_TAG:Ge,API_TURNOVER_SEC:he,LOOPBACK:Ce,CODE_EXTENSION:G,WILDCARD_SEARCH_VALUE:He,NODE_ERROR_CODES:pt,JAVASCRIPT_EXTENSION:J,PERMS_CRUD_ENUM:ft,UNAUTHORIZED_PERMISSION_NAME:Bt,SEARCH_WILDCARDS:bt,FUNC_VAL:Ft,READ_AUDIT_LOG_SEARCH_TYPES_ENUM:yt,JWT_ENUM:vt,CLUSTERING_FLAG:mt,ITC_EVENT_TYPES:Kt,CUSTOM_FUNCTION_PROC_NAME:Z,CUSTOM_FUNCTION_PROC_DESCRIPTOR:M,SERVICES:wt,THREAD_TYPES:Vt,MEM_SETTING_KEY:fe,HDB_RESTART_SCRIPT:z_,PROCESS_DESCRIPTORS:Te,SERVICE_SERVERS:Se,SERVICE_SERVERS_CWD:Y,PROCESS_DESCRIPTORS_VALIDATE:re,LAUNCH_SERVICE_SCRIPTS:Re,LOG_LEVELS:oe,PROCESS_NAME_ENV_PROP:ze,LOG_NAMES:se,PM2_PROCESS_STATUSES:kt,CONFIG_PARAM_MAP:r_,CONFIG_PARAMS:_,HDB_CONFIG_FILE:$_,HDB_DEFAULT_CONFIG_FILE:Q_,ROLE_TYPES_ENUM:ie,BOOT_PROP_PARAMS:T_,INSTALL_PROMPTS:Ze,HDB_ROOT_DIR_NAME:J_,CLUSTERING_PROCESSES:ne,FOREGROUND_PID_FILE:ee,PACKAGE_ROOT:l,PRE_4_0_0_VERSION:Yt,DATABASES_PARAM_CONFIG:Nt,METADATA_PROPERTY:Pt,AUTH_AUDIT_STATUS:Wt,AUTH_AUDIT_TYPES:jt,HDB_PID_FILE:te,DEFAULT_DATABASE_NAME:Ee,LEGACY_CONFIG_PARAMS:at};Q()});var i_=p((uE,xt)=>{xt.exports={name:"harperdb",version:"4.3.0-alpha.2",description:"HarperDB is a distributed SQL & NoSQL data platform focused on speed, flexibility, and ease of use.",keywords:["database","sql","nosql","api","distributed","cloud","enterprise","Fastify","NATS"],main:"harperdb.js",bin:{harperdb:"./bin/harperdb.js"},engines:{"minimum-node":"16.0.0","go-lang":"1.21.1","nats-server":"2.10.1"},exports:{".":"./index.js"},homepage:"https://www.harperdb.io/",bugs:"support@harperdb.io",author:{name:"HarperDB",email:"support@harperdb.io"},license:"SEE LICENSE IN LICENSE",scripts:{submodules:"git submodule update --init --recursive",build:"eslint -c ./.eslintbuild bin/ dataLayer/ security/ server/ sqlTranslator/ upgrade/ utility/ validation/",pretty:"eslint --fix bin/ dataLayer/ security/ server/ sqlTranslator/ upgrade/ utility/ validation/","cover:test":"pm2 kill && rimraf ./.nyc_output/* && node utility/devops/register.js --reset_license && nyc --no-clean --reporter=lcovonly npm run test:apitests && nyc --no-clean --reporter=lcovonly npm run test:resources && nyc --no-clean --reporter=lcovonly npm run test:logging && nyc --no-clean --reporter=lcovonly npm run test:upgrade && nyc --no-clean --reporter=lcovonly npm run test:nats && nyc --no-clean --reporter=lcovonly npm run test:cfserver && nyc --no-clean --reporter=lcovonly npm run test:hdbserver && nyc --no-clean --reporter=lcovonly npm run test:bin && nyc --no-clean --reporter=lcovonly npm run test:main && nyc merge .nyc_output coverage.json && node ./utility/devops/register.js --reset_license",test:"pm2 kill && rimraf ./.nyc_output/* && node utility/devops/register.js --reset_license && npm run test:apitests && npm run test:resources && npm run test:logging && npm run test:upgrade && npm run test:nats && npm run test:cfserver && npm run test:hdbserver && npm run test:bin && npm run test:main && nyc merge .nyc_output coverage.json && node ./utility/devops/register.js --reset_license","test:resources":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/resources/**/*.js' --config '../unitTests/.mocharc.json'","test:bin":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/bin/**/*.js' --config '../unitTests/.mocharc.json'","test:main":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/**/*.js' --config '../unitTests/.mocharc-main.json'","test:lmdbbridge":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/dataLayer/harperBridge/lmdbBridge/**/*.js' --config '../unitTests/.mocharc.json'","test:lmdbutility":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/utility/lmdb/**/*.js' --config '../unitTests/.mocharc.json'","test:hdbserver":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/server/harperdb/hdbServer-test.js' --config '../unitTests/.mocharc.json'","test:cfserver":"npm run submodules && cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/server/fastifyRoutes/customFunctionsServer-test.js' --config '../unitTests/.mocharc.json'","test:nats":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/server/nats/**/*.js' --config '../unitTests/.mocharc.json'","test:upgrade":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/upgrade/**/*.js' --config '../unitTests/.mocharc.json'","test:apitests":"pm2 kill && cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/apiTests/**/*-test.mjs' --config '../unitTests/.mocharc.json'","test:logging":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/utility/logging/*.js' --config '../unitTests/.mocharc.json'","test:ci":" cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/**/*.js' --retries 3 --config '../unitTests/.mocharc-main.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/dataLayer/harperBridge/lmdbBridge/**/*.js' --parallel --retries 3 --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/utility/lmdb/**/*.js' --parallel --retries 3 --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/server/harperdb/hdbServer-test.js' --parallel --retries 3 --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/server/customFunctions/customFunctionsServer-test.js' --parallel --retries 3 --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/upgrade/**/*.js' --parallel --retries 3 --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter && ../node_modules/mocha/bin/_mocha '../unitTests/server/nats/**/*.js' --config '../unitTests/.mocharc.json' --reporter mocha-teamcity-reporter","hdb-check":"./utility/devops/hdb-check.sh","download-prebuilds":"node ./utility/devops/build/download-prebuilds.js",prebuild:"date",postinstall:"node ./launchServiceScripts/launchInstallNATSServer.js",build_nats_dependency:"node ./utility/devops/nats/builder.js",coverage:"nyc --reporter=lcov npm test"},dependencies:{"@aws-sdk/abort-controller":"3.374.0","@aws-sdk/client-s3":"3.477.0","@aws-sdk/lib-storage":"3.477.0","@endo/static-module-record":"^1.0.0","@fastify/autoload":"5.7.1","@fastify/compress":"~6.5.0","@fastify/cors":"~8.5.0","@fastify/static":"~6.11.2","@turf/area":"6.5.0","@turf/boolean-contains":"6.5.0","@turf/boolean-disjoint":"6.5.0","@turf/boolean-equal":"6.5.0","@turf/circle":"6.5.0","@turf/difference":"6.5.0","@turf/distance":"6.5.0","@turf/helpers":"6.5.0","@turf/length":"6.5.0",alasql:"4.1.10","cbor-x":"1.5.4",chalk:"4.1.2","cli-progress":"3.12.0",clone:"2.1.2","fast-glob":"3.3.1",fastify:"~4.25.1","fastify-plugin":"~4.5.1","fs-extra":"11.2.0",graphql:"^16.8.1","human-readable-ids":"1.0.4",inquirer:"8.2.6","is-number":"7.0.0",joi:"17.11.0","json-bigint-fixes":"1.1.0",json2csv:"5.0.7",jsonata:"1.8.6",jsonwebtoken:"9.0.2",lmdb:"2.9.3-beta.2",lodash:"4.17.21",mathjs:"11.11.2",minimist:"1.2.8",mkcert:"1.5.1",moment:"2.29.4","mqtt-packet":"~8.2.1",msgpackr:"1.10.1",nats:"2.17.0",needle:"3.2.0","node-stream-zip":"1.15.0","node-unix-socket":"0.2.5","normalize-path":"^3.0.0",ora:"5.4.1","ordered-binary":"1.5.1",papaparse:"5.4.1",passport:"0.6.0","passport-http":"0.3.0","passport-local":"1.0.0",pino:"8.16.0",pm2:"5.3.0",prompt:"1.3.0","properties-reader":"2.3.0","recursive-iterator":"3.3.0",semver:"7.5.4",send:"^0.18.0","serve-static":"1.15.0",ses:"1.0.0","stream-chain":"2.2.5","stream-json":"1.8.0",systeminformation:"5.21.20","tar-fs":"2.1.1",ulidx:"0.5.0",uuid:"9.0.1","validate.js":"0.13.1",ws:"8.15.1",yaml:"2.3.4"},devDependencies:{"@tsconfig/node16":"^1.0.3","@types/node":"latest","@typescript-eslint/eslint-plugin":"^5.55.0","@typescript-eslint/parser":"^5.55.0",axios:"1.6.2",chai:"4.3.7","chai-integer":"0.1.0",esbuild:"^0.19.1",eslint:"8.22.0","eslint-config-prettier":"8.3.0","eslint-plugin-prettier":"3.4.1","eslint-plugin-radar":"0.2.1",eventsource:"^2.0.2","hook-std":"3.0.0","intercept-stdout":"0.1.2",mocha:"^10.2.0","mocha-teamcity-reporter":"3.0.0","mock-require":"3.0.3","mock-stdin":"1.0.0",mqtt:"~4.3.7",newman:"5.3.2","newman-reporter-html":"1.0.5","newman-reporter-htmlextra":"^1.22.11","newman-reporter-teamcity":"^0.1.12","node-fetch":"2.6.7",nyc:"15.1.0",prettier:"2.8.4",rewire:"5.0.0",rimraf:"3.0.2",sinon:"10.0.0","sinon-chai":"3.7.0","source-map-support":"^0.5.21",typescript:"^5.3.3","why-is-node-still-running":"^1.0.0"},overrides:{"eslint-plugin-radar":{eslint:"8.22.0"},"newman-reporter-html":{newman:"5.3.2"},alasql:{xlsx:"0.18.5"}},optionalDependencies:{bufferutil:"^4.0.7","utf-8-validate":"^5.0.10"}}});var l_=p((CE,I_)=>{"use strict";var C=require("fs-extra"),u=require("path"),S=require("chalk"),qt=require("needle"),O_=require("node-stream-zip"),c_=require("semver"),L=q(),Xt=require("util"),$t=require("child_process"),{platform:Qt}=require("os"),Jt=Xt.promisify($t.exec),{PACKAGE_ROOT:zt}=k(),N=u.join(zt,"dependencies"),Zt=u.join(N,L.NATS_SERVER_ZIP),A_=i_(),f=A_.engines["go-lang"],g=A_.engines[L.NATS_SERVER_NAME],_E=`${process.platform}-${process.arch}`,b=u.join(N,_E,`${L.NATS_BINARY_NAME}`),eE=`https://github.com/nats-io/nats-server/releases/download/v${g}/nats-server-v${g}-`,a_={"linux-x64":"linux-amd64.zip","linux-arm64":"linux-arm64.zip","darwin-x64":"darwin-amd64.zip","darwin-arm64":"darwin-arm64.zip","win32-x64":"windows-amd64.zip"},tE=Object.keys(a_).map(t=>t.split("-"));async function D(t,E=void 0){let{stdout:T,stderr:o}=await Jt(t,{cwd:E});if(o)throw new Error(o.replace(`
|
|
3
3
|
`,""));return T.replace(`
|
|
4
|
-
`,"")}i(
|
|
4
|
+
`,"")}i(D,"runCommand");async function EE(){try{await C.access(b)}catch{return!1}let t=await D(`${b} --version`,void 0),E=t.substring(t.lastIndexOf("v")+1,t.length);return c_.eq(E,g)}i(EE,"checkNATSServerInstalled");async function TE(){console.log(S.green(`Verifying go v${f} is on system.`));let t;try{t=(await D("go version",void 0)).match(/[\d.]+/)[0]}catch{throw Error("go does not appear to be installed or is not in the PATH, cannot install clustering dependencies.")}if(!c_.gte(t,f))throw Error(`go version ${f} or higher must be installed.`);console.log(S.green(`go v${f} is on the system.`))}i(TE,"checkGoVersion");async function sE(){console.log(S.green("Extracting NATS Server source code."));let t=new O_.async({file:Zt}),E=u.join(N,`${L.NATS_SERVER_NAME}-src`),T=await t.extract(null,N);return console.log(S.green(`Extracted ${T} entries.`)),await t.close(),E}i(sE,"extractNATSServer");async function oE(t){let E=u.join(t,L.NATS_BINARY_NAME),T=u.join(N,"pkg");await C.move(E,b,{overwrite:!0}),await C.remove(t),await C.remove(T)}i(oE,"cleanUp");async function N_(t,E){let T=t&&E?`${t}-${E}`:`${process.platform}-${process.arch}`,o=a_[T];if(o===void 0)throw Error(`unknown platform - architecture: ${T}`);let n=`${eE}${o}`,r=u.join(N,T,o);await C.ensureFile(r),console.log(S.green(`****Downloading install of NATS Server: ${n}****`)),await qt("get",n,{output:r,follow_max:5}),console.log(S.green("Successfully downloaded and saved nats-server zip.")),console.log(S.green("Extracting nats-server zip."));let c=new O_.async({file:r}),a=await c.entries(),d=t==="win32"||process.platform==="win32"?`${L.NATS_SERVER_NAME}.exe`:L.NATS_SERVER_NAME,B=u.join(N,T,d);for(let F of Object.values(a))!F.isDirectory&&F.name.endsWith(d)&&(await c.extract(F.name,B),console.log(S.green(`Successfully extracted nats-server zip to ${B}.`)));await c.close(),await C.remove(r),await C.chmod(B,511)}i(N_,"downloadNATSServer");async function rE(){if(console.log(S.green("****Starting install of NATS Server.****")),await EE()){console.log(S.green(`****NATS Server v${g} installed.****`));return}try{await N_();try{let T=await D(`${b} --version`,void 0);console.log(S.green(`****Successfully extracted ${T}.****`))}catch(T){if(T.toString().includes("file busy"))console.warn("Error checking NATS versions",T);else throw T}return}catch(T){console.error(S.red(`Error: ${T.message}. Failed to download NATS server. Building from source`))}try{await TE()}catch(T){console.error(S.red(T.message)),process.exit(1)}let E=await sE();console.log(S.green("Building NATS Server binary.")),Qt()=="win32"?await D(`set GOPATH=${N}&& go build`,E):await D(`export GOPATH=${N} && go build`,E),console.log(S.green("Building NATS Server binary complete.")),await oE(E),console.log(S.green(`****NATS Server v${g} is installed.****`))}i(rE,"installer");I_.exports={installer:rE,downloadNATSServer:N_,ALL_SUPPORTED_PLATFORM_ARCHITECTURES:tE}});var UE=require("fs"),dE=require("path"),nE=l_();(async()=>{try{await nE.installer()}catch(t){console.error(t)}})();
|