harperdb 4.4.13 → 4.4.14
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 +77 -77
- package/bin/lite.js +75 -75
- package/launchServiceScripts/launchInstallNATSServer.js +1 -1
- package/launchServiceScripts/launchNatsIngestService.js +75 -75
- package/launchServiceScripts/launchNatsReplyService.js +75 -75
- package/launchServiceScripts/launchUpdateNodes4-0-0.js +75 -75
- package/npm-shrinkwrap.json +44 -42
- package/package.json +1 -1
- package/server/jobs/jobProcess.js +75 -75
- package/server/threads/threadServer.js +75 -75
- package/studio/build-local/asset-manifest.json +2 -2
- package/studio/build-local/index.html +1 -1
- package/studio/build-local/static/js/{main.9dd5190e.js → main.29a1f1ec.js} +2 -2
- package/utility/scripts/restartHdb.js +75 -75
- /package/studio/build-local/static/js/{main.9dd5190e.js.LICENSE.txt → main.29a1f1ec.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";var l_=Object.defineProperty;var i=(t,E)=>l_(t,"name",{value:E,configurable:!0});var d=(t,E)=>()=>(E||t((E={exports:{}}).exports,E),E.exports);var x=d((oE,j)=>{"use strict";var{platform:sE}=require("os"),u_="nats-server.zip",y="nats-server",C_=process.platform==="win32"?`${y}.exe`:y,L_=/^[^\s.,*>]+$/,W="__request__",U_=i(t=>`${t}.${W}`,"REQUEST_SUBJECT"),p_={NATS_MSG_ID:"Nats-Msg-Id",ORIGIN:"origin",TRANSACTED_NODES:"transacted_nodes"},d_={HUB_SERVER:"hub.json",LEAF_SERVER:"leaf.json"},P_={HUB:"hub.pid",LEAF:"leaf.pid"},D_={HUB:"-hub",LEAF:"-leaf",ADMIN:"-admin"},m_={SUCCESS:"success",ERROR:"error"},g_={OPEN:"open",CLOSED:"closed",NO_RESPONDERS:"NoResponders",TIMEOUT:"Timeout"},h_={TXN:"txn",MSGID:"msgid"},U={ERR:"error",WRN:"warn",INF:"info",DBG:"debug",TRC:"trace"},G_={[U.ERR]:1,[U.WRN]:2,[U.INF]:3,[U.DBG]:4,[U.TRC]:5},M_={debug:"-D",trace:"-DVV"};j.exports={NATS_SERVER_ZIP:u_,NATS_SERVER_NAME:y,NATS_BINARY_NAME:C_,PID_FILES:P_,NATS_CONFIG_FILES:d_,SERVER_SUFFIX:D_,NATS_TERM_CONSTRAINTS_RX:L_,REQUEST_SUFFIX:W,UPDATE_REMOTE_RESPONSE_STATUSES:m_,CLUSTER_STATUS_STATUSES:g_,REQUEST_SUBJECT:U_,SUBJECT_PREFIXES:h_,MSG_HEADERS:p_,LOG_LEVELS:U,LOG_LEVEL_FLAGS:M_,LOG_LEVEL_HIERARCHY:G_}});var $=d((SE,X)=>{var H_=require("fast-glob"),{statSync:v,existsSync:K,readFileSync:f_,writeFileSync:b_}=require("fs"),{spawnSync:F_,spawn:B_,execFileSync:nE}=require("child_process"),{isMainThread:y_}=require("worker_threads"),{join:I,relative:q}=require("path"),{PACKAGE_ROOT:c}=w(),{tmpdir:v_,platform:K_}=require("os");require("source-map-support").install();var k_=["resources","server","dataLayer","components"],P="ts-build",k,w_=__filename.endsWith("tsBuild.js");if(w_){if(y_){let s;try{v(I(c,P)),s=!0}catch{}if(s)for(let o of H_.sync(k_.map(n=>n+"/**/*.ts"),{cwd:c})){let n=0,r=0;try{n=v(I(c,o)).mtimeMs-5e3,r=v(I(c,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."),k=!0;break}}else console.log("TypeScript modules are not compiled, compiling now"),k=!0;if(k){let o=I(c,"node_modules/.bin/tsc");K_()==="win32"&&(o+=".cmd");let n=F_(o,{cwd:c});if(n.stdout?.length&&console.log(n.stdout.toString()),n.stderr?.length&&console.log(n.stderr.toString()),s){let r=I(v_(),"harperdb-tsc.pid"),A;if(K(r))try{process.kill(+f_(r,{encoding:"utf8"}),0),A=!0}catch{}if(!A){console.log("starting tsc background process");let a=B_(o,["--watch"],{cwd:c,detached:!0,stdio:"ignore"});b_(r,a.pid.toString()),a.unref()}}}}let t=X.constructor,E=t._findPath;t._findPath=function(s,o,n){if(s.startsWith(".")&&!n&&o.length===1&&o[0].startsWith(c)&&!o[0].includes("node_modules")){let r=q(c,o[0]),A;r.startsWith(P)?A=I(c,q(P,r)):A=I(c,P,r);let a=I(A,s),p=a+".js";if(K(p))return p;if(a.includes(".")&&K(a))return a}return E(s,o,n)}}});var w=d((OE,S_)=>{"use strict";var O=require("path"),V_=require("fs"),{relative:RE,join:iE}=O,{existsSync:Y_}=V_;function W_(){let t=__dirname;for(;!Y_(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(W_,"getHDBPackageRoot");var l=W_(),Q="js",G=Q,j_="harperdb-config.yaml",x_="defaultConfig.yaml",q_="hdb",J=`harperdb.${G}`,z=`customFunctionsServer.${G}`,X_=`restartHdb.${G}`,Y="HarperDB",h="Custom Functions",M="Clustering Hub",H="Clustering Leaf",$_="Clustering Ingest Service",Q_="Clustering Reply Service",J_="foreground.pid",z_="hdb.pid",Z_="data",_e={HDB:Y,CLUSTERING_HUB:M,CLUSTERING_LEAF:H,CLUSTERING_INGEST_SERVICE:$_,CLUSTERING_REPLY_SERVICE:Q_,CUSTOM_FUNCTIONS:h,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"},ee={HDB:"hdb.log",INSTALL:"install.log",CLUSTERING_HUB:"clustering_hub.log",CLUSTERING_LEAF:"clustering_leaf.log"},te={NOTIFY:"notify",FATAL:"fatal",ERROR:"error",WARN:"warn",INFO:"info",DEBUG:"debug",TRACE:"trace"},Ee={harperdb:Y,"clustering hub":M,"clustering leaf":H,"custom functions":h,custom_functions:h,clustering:"clustering","clustering config":"clustering config",clustering_config:"clustering_config",http_workers:"http_workers",http:"http"},Te={CLUSTERING_HUB_PROC_DESCRIPTOR:M,CLUSTERING_LEAF_PROC_DESCRIPTOR:H},V={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(V.HDB,J),CUSTOM_FUNCTIONS:O.join(V.CUSTOM_FUNCTIONS,z)},oe={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")},re={SUPER_USER:"super_user",CLUSTER_USER:"cluster_user"},Z="support@harperdb.io",ne="customer-success@harperdb.io",__=1,Se=4141,e_="https://harperdbhelp.zendesk.com/hc/en-us/requests/new",Re="https://www.harperdb.io/product",ie=`For support, please submit a request at ${e_} or contact ${Z}`,t_=`For license support, please contact ${ne}`,Oe="None of the specified records were found.",Ae="hash attribute not found",ce=`Your current license only supports ${__} role. ${t_}`,ae="Your current license only supports 3 connections to a node.",Ne="127.0.0.1",Ie=1,le=/^\.$/,ue=/^\.\.$/,Ce="U+002E",Le=/\//g,Ue="U+002F",pe=/U\+002F/g,de=/^U\+002E$/,Pe=/^U\+002EU\+002E$/,De="d",me=999999,ge="*",he="--max-old-space-size=",Ge="system",Me="__hdb_hash",He=".harperdb",fe=".hdb",be="keys",Fe="hdb_boot_properties.file",Be=".updateConfig.json",ye="SIGTSTP",ve=24,Ke=6e4,ke=448,we="blob",Ve="database",Ye="schema",We="transactions",je=".count",xe="id",qe="PROCESS_NAME",E_={SETTINGS_PATH_KEY:"settings_path"},T_=require("lodash"),Xe={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",CLUSTERING_NODENAME:"CLUSTERING_NODENAME",CLUSTERING_ENABLED:"CLUSTERING_ENABLED",HDB_CONFIG:"HDB_CONFIG",DEFAULTS_MODE:"DEFAULTS_MODE",REPLICATION_HOSTNAME:"REPLICATION_HOSTNAME",CLUSTERING_PORT:"CLUSTERING_PORT",HDB_ROOT:"HDB_ROOT",SERVER_PORT:"SERVER_PORT",NODE_NAME:"NODE_NAME",CLUSTERING:"CLUSTERING"},$e={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},Qe={DATA_VERSION:"data_version",UPGRADE_VERSION:"upgrade_version"},Je={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"},ze={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:",Ze={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"},_t={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"},et="060493.ks",tt=".license",Et={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",SIGN_CERTIFICATE:"sign_certificate",CREATE_CSR:"create_csr",LIST_CERTIFICATES:"list_certificates",ADD_CERTIFICATES:"add_certificate",REMOVE_CERTIFICATE:"remove_certificate",ADD_NODE_BACK:"add_node_back",REMOVE_NODE_BACK:"remove_node_back",ADD_SSH_KEY:"add_ssh_key",UPDATE_SSH_KEY:"update_ssh_key",DELETE_SSH_KEY:"delete_ssh_key",LIST_SSH_KEYS:"list_ssh_keys",SET_SSH_KNOWN_HOSTS:"set_ssh_known_hosts",GET_SSH_KNOWN_HOSTS:"get_ssh_known_hosts",GET_KEY:"get_key"},Tt={CSV:".csv",JSON:".json"},st={AWS_ACCESS_KEY:"aws_access_key_id",AWS_SECRET:"aws_secret_access_key",AWS_BUCKET:"bucket",AWS_FILE_KEY:"key",REGION:"region"},ot={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 T=Object.create(null);T[e.DESCRIBE_ALL]=e.DESCRIBE_ALL;T[e.DESCRIBE_TABLE]=e.DESCRIBE_TABLE;T[e.DESCRIBE_SCHEMA]=e.DESCRIBE_SCHEMA;T[e.READ_LOG]=e.READ_LOG;T[e.ADD_NODE]=e.ADD_NODE;T[e.LIST_USERS]=e.LIST_USERS;T[e.LIST_ROLES]=e.LIST_ROLES;T[e.USER_INFO]=e.USER_INFO;T[e.SQL]=e.SQL;T[e.GET_JOB]=e.GET_JOB;T[e.SEARCH_JOBS_BY_START_DATE]=e.SEARCH_JOBS_BY_START_DATE;T[e.DELETE_FILES_BEFORE]=e.DELETE_FILES_BEFORE;T[e.EXPORT_LOCAL]=e.EXPORT_LOCAL;T[e.EXPORT_TO_S3]=e.EXPORT_TO_S3;T[e.CLUSTER_STATUS]=e.CLUSTER_STATUS;T[e.REMOVE_NODE]=e.REMOVE_NODE;T[e.RESTART]=e.RESTART;T[e.CUSTOM_FUNCTIONS_STATUS]=e.CUSTOM_FUNCTIONS_STATUS;T[e.GET_CUSTOM_FUNCTIONS]=e.GET_CUSTOM_FUNCTIONS;T[e.GET_CUSTOM_FUNCTION]=e.GET_CUSTOM_FUNCTION;T[e.SET_CUSTOM_FUNCTION]=e.SET_CUSTOM_FUNCTION;T[e.DROP_CUSTOM_FUNCTION]=e.DROP_CUSTOM_FUNCTION;T[e.ADD_CUSTOM_FUNCTION_PROJECT]=e.ADD_CUSTOM_FUNCTION_PROJECT;T[e.DROP_CUSTOM_FUNCTION_PROJECT]=e.DROP_CUSTOM_FUNCTION_PROJECT;T[e.PACKAGE_CUSTOM_FUNCTION_PROJECT]=e.PACKAGE_CUSTOM_FUNCTION_PROJECT;T[e.DEPLOY_CUSTOM_FUNCTION_PROJECT]=e.DEPLOY_CUSTOM_FUNCTION_PROJECT;T[e.ADD_SSH_KEY]=e.ADD_SSH_KEY;T[e.UPDATE_SSH_KEY]=e.UPDATE_SSH_KEY;T[e.DELETE_SSH_KEY]=e.DELETE_SSH_KEY;var rt={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",COPYDB:"copy-db"},nt={point:"point",lineString:"lineString",multiLineString:"multiLineString",multiPoint:"multiPoint",multiPolygon:"multiPolygon",polygon:"polygon"},s_={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"},St=T_.invert(s_),Rt={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_MAXCONSUMEMSGS:"clustering_leafServer_streams_maxConsumeMsgs",CLUSTERING_LEAFSERVER_STREAMS_MAXINGESTTHREADS:"clustering_leafServer_streams_maxIngestThreads",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",THREADS_COUNT:"threads_count",THREADS_DEBUG:"threads_debug",THREADS_DEBUG_STARTINGPORT:"threads_debug_startingPort",THREADS_DEBUG_PORT:"threads_debug_port",THREADS_DEBUG_HOST:"threads_debug_host",THREADS_DEBUG_WAITFORDEBUGGER:"threads_debug_waitForDebugger",THREADS_MAXHEAPMEMORY:"threads_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_MAXPARAMLENGTH:"http_maxParamLength",HTTP_TIMEOUT:"http_timeout",HTTP_PORT:"http_port",HTTP_SECUREPORT:"http_securePort",HTTP_MTLS:"http_mtls",HTTP_MTLS_REQUIRED:"http_mtls_required",HTTP_MTLS_USER:"http_mtls_user",HTTP_MAXHEADERSIZE:"http_maxHeaderSize",HTTP_THREADRANGE:"http_threadRange",LOCALSTUDIO_ENABLED:"localStudio_enabled",LOGGING_CONSOLE:"logging_console",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:"operationsApi_tls",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_SYSINFO_NETWORK:"operationsApi_sysInfo_network",OPERATIONSAPI_SYSINFO_DISK:"operationsApi_sysInfo_disk",REPLICATION:"replication",REPLICATION_HOSTNAME:"replication_hostname",REPLICATION_URL:"replication_url",REPLICATION_PORT:"replication_port",REPLICATION_SECUREPORT:"replication_securePort",REPLICATION_ROUTES:"replication_routes",REPLICATION_DATABASES:"replication_databases",REPLICATION_ENABLEROOTCAS:"replication_enableRootCAs",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_MAXTRANSACTIONQUEUETIME:"storage_maxTransactionQueueTime",STORAGE_PATH:"storage_path",STORAGE_AUDIT_PATH:"storage_audit_path",STORAGE_MAXFREESPACETOLOAD:"storage_maxFreeSpaceToLoad",STORAGE_MAXFREESPACETORETAIN:"storage_maxFreeSpaceToRetain",STORAGE_PAGESIZE:"storage_pageSize",STORAGE_COMPRESSION_DICTIONARY:"storage_compression_dictionary",STORAGE_COMPRESSION_THRESHOLD:"storage_compression_threshold",STORAGE_COMPACTONSTART:"storage_compactOnStart",STORAGE_COMPACTONSTARTKEEPBACKUP:"storage_compactOnStartKeepBackup",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_REQUIRED:"mqtt_network_mtls_required",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",TLS:"tls",CLONED:"cloned"},o_={settings_path:E_.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_COUNT,max_hdb_processes:_.THREADS_COUNT,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_COUNT,logging_console:_.LOGGING_CONSOLE,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_maxconsumemsgs:_.CLUSTERING_LEAFSERVER_STREAMS_MAXCONSUMEMSGS,clustering_leafserver_streams_maxingestthreads:_.CLUSTERING_LEAFSERVER_STREAMS_MAXINGESTTHREADS,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,customfunctions_tls:_.TLS,http_threads:_.THREADS_COUNT,threads:_.THREADS_COUNT,threads_count:_.THREADS_COUNT,threads_debug:_.THREADS_DEBUG,threads_debug_startingport:_.THREADS_DEBUG_STARTINGPORT,threads_debug_port:_.THREADS_DEBUG_PORT,threads_debug_host:_.THREADS_DEBUG_HOST,threads_debug_waitfordebugger:_.THREADS_DEBUG_WAITFORDEBUGGER,threads_maxheapmemory:_.THREADS_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_maxparamlength:_.HTTP_MAXPARAMLENGTH,http_timeout:_.HTTP_TIMEOUT,http_port:_.HTTP_PORT,http_secureport:_.HTTP_SECUREPORT,http_mtls:_.HTTP_MTLS,http_mtls_user:_.HTTP_MTLS_USER,http_mtls_required:_.HTTP_MTLS_REQUIRED,http_maxheadersize:_.HTTP_MAXHEADERSIZE,http_threadrange:_.HTTP_THREADRANGE,customfunctions_processes:_.THREADS_COUNT,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:_.OPERATIONSAPI_TLS,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,operationsapi_sysinfo_network:_.OPERATIONSAPI_SYSINFO_NETWORK,operationsapi_sysinfo_disk:_.OPERATIONSAPI_SYSINFO_DISK,databases:_.DATABASES,storage_path:_.STORAGE_PATH,storage_maxtransactionqueuetime:_.STORAGE_MAXTRANSACTIONQUEUETIME,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_network_mtls_required:_.MQTT_NETWORK_MTLS_REQUIRED,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,replication:_.REPLICATION,replication_port:_.REPLICATION_PORT,replication_secureport:_.REPLICATION_SECUREPORT,replication_hostname:_.REPLICATION_HOSTNAME,replication_url:_.REPLICATION_URL,replication_routes:_.REPLICATION_ROUTES,tls:_.TLS,tls_certificate:_.TLS_CERTIFICATE,tls_privatekey:_.TLS_PRIVATEKEY,tls_certificateauthority:_.TLS_CERTIFICATEAUTHORITY,tls_ciphers:_.TLS_CIPHERS};for(let t in _){let E=_[t];o_[E.toLowerCase()]=E}var it={TABLES:"tables",PATH:"path",AUDIT_PATH:"auditPath"},Ot={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",restart_service:"restart_service"},At={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"},ct={BIDIRECTIONAL:"BIDIRECTIONAL",OUTBOUND:"OUTBOUND",INBOUND:"INBOUND"},at={VERSION_DEFAULT:"2.2.0"},Nt={DEVELOPMENT:8192,DEFAULT:512},It={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"},lt={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"},ut={ENOENT:"ENOENT",EACCES:"EACCES",EEXIST:"EEXIST",ERR_INVALID_ARG_TYPE:"ERR_INVALID_ARG_TYPE"},r_={CREATED_TIME:"__createdtime__",UPDATED_TIME:"__updatedtime__"},Ct=Symbol("metadata"),Lt="__clustering__",Ut=Object.values(r_),pt=15984864e5,n_={LESS:"<",LESS_OR_EQ:"<=",GREATER:">",GREATER_OR_EQ:">=",BETWEEN:"..."},dt=T_.invert(n_),Pt={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"},Dt=111,mt=`\r
|
|
2
|
-
`,gt={READ:"read",INSERT:"insert",UPDATE:"update",DELETE:"delete"},ht=["*","%"],Gt="unauthorized_access",Mt="func_val",Ht={HASH_VALUE:"hash_value",TIMESTAMP:"timestamp",USERNAME:"username"},ft={JWT_PRIVATE_KEY_NAME:".jwtPrivate.key",JWT_PUBLIC_KEY_NAME:".jwtPublic.key",JWT_PASSPHRASE_NAME:".jwtPass"},bt={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",START_JOB:"start_job",NATS_CONSUMER_UPDATE:"nats_consumer_update"},Ft={HDB_CORE:"hdb_core",CUSTOM_FUNCTIONS:"custom_functions"},Bt={HTTP:"http"},yt={STOPPED:"stopped",ONLINE:"online"},vt="3.x.x",Kt={SUCCESS:"success",FAILURE:"failure"},kt={AUTHENTICATION:"authentication",AUTHORIZATION:"authorization"};S_.exports={LOCAL_HARPERDB_OPERATIONS:T,HDB_SUPPORT_ADDRESS:Z,HDB_SUPPORT_URL:e_,HDB_PRICING_URL:Re,SUPPORT_HELP_MSG:ie,LICENSE_HELP_MSG:t_,HDB_PROC_NAME:J,HDB_PROC_DESCRIPTOR:Y,CLUSTERING_LEAF_PROC_DESCRIPTOR:H,CLUSTERING_HUB_PROC_DESCRIPTOR:M,SYSTEM_SCHEMA_NAME:Ge,HASH_FOLDER_NAME:Me,HDB_HOME_DIR_NAME:He,UPDATE_FILE_NAME:Be,LICENSE_KEY_DIR_NAME:be,BOOT_PROPS_FILE_NAME:Fe,JOB_TYPE_ENUM:Ot,JOB_STATUS_ENUM:Et,SYSTEM_TABLE_NAMES:Je,SYSTEM_TABLE_HASH_ATTRIBUTES:ze,OPERATIONS_ENUM:e,VALID_S3_FILE_TYPES:Tt,S3_BUCKET_AUTH_KEYS:st,VALID_SQL_OPS_ENUM:ot,GEO_CONVERSION_ENUM:nt,HDB_SETTINGS_NAMES:s_,HDB_SETTINGS_NAMES_REVERSE_LOOKUP:St,SERVICE_ACTIONS_ENUM:rt,CLUSTER_MESSAGE_TYPE_ENUM:At,CLUSTER_CONNECTION_DIRECTION_ENUM:ct,CLUSTER_EVENTS_DEFS_ENUM:It,PERIOD_REGEX:le,DOUBLE_PERIOD_REGEX:ue,UNICODE_PERIOD:Ce,FORWARD_SLASH_REGEX:Le,UNICODE_FORWARD_SLASH:Ue,ESCAPED_FORWARD_SLASH_REGEX:pe,ESCAPED_PERIOD_REGEX:de,ESCAPED_DOUBLE_PERIOD_REGEX:Pe,REG_KEY_FILE_NAME:et,RESTART_TIMEOUT_MS:Ke,HDB_FILE_PERMISSIONS:ke,DATABASES_DIR_NAME:Ve,LEGACY_DATABASES_DIR_NAME:Ye,TRANSACTIONS_DIR_NAME:We,LIMIT_COUNT_NAME:je,ID_ATTRIBUTE_STRING:xe,INSERT_MODULE_ENUM:$e,UPGRADE_JSON_FIELD_NAMES_ENUM:Qe,RESTART_CODE:ye,RESTART_CODE_NUM:ve,CLUSTER_OPERATIONS:D,SYSTEM_DEFAULT_ATTRIBUTE_NAMES:_t,HDB_INTERNAL_SC_CHANNEL_PREFIX:R,INTERNAL_SC_CHANNELS:Ze,CLUSTERING_MESSAGE_TYPES:Pt,HDB_FILE_SUFFIX:fe,BLOB_FOLDER_NAME:we,ORIGINATOR_SET_VALUE:Dt,LICENSE_VALUES:at,RAM_ALLOCATION_ENUM:Nt,TIME_STAMP_NAMES_ENUM:r_,TIME_STAMP_NAMES:Ut,PERMS_UPDATE_RELEASE_TIMESTAMP:pt,SEARCH_NOT_FOUND_MESSAGE:Oe,SEARCH_ATTRIBUTE_NOT_FOUND:Ae,LICENSE_ROLE_DENIED_RESPONSE:ce,LICENSE_MAX_CONNS_REACHED:ae,BASIC_LICENSE_MAX_NON_CU_ROLES:__,BASIC_LICENSE_CLUSTER_CONNECTION_LIMIT_WS_ERROR_CODE:Se,VALUE_SEARCH_COMPARATORS:n_,VALUE_SEARCH_COMPARATORS_REVERSE_LOOKUP:dt,LICENSE_FILE_NAME:tt,WEBSOCKET_CLOSE_CODE_DESCRIPTION_LOOKUP:lt,NEW_LINE:mt,BASIC_LICENSE_MAX_CLUSTER_USER_ROLES:Ie,MOMENT_DAYS_TAG:De,API_TURNOVER_SEC:me,LOOPBACK:Ne,CODE_EXTENSION:G,WILDCARD_SEARCH_VALUE:ge,NODE_ERROR_CODES:ut,JAVASCRIPT_EXTENSION:Q,PERMS_CRUD_ENUM:gt,UNAUTHORIZED_PERMISSION_NAME:Gt,SEARCH_WILDCARDS:ht,FUNC_VAL:Mt,READ_AUDIT_LOG_SEARCH_TYPES_ENUM:Ht,JWT_ENUM:ft,CLUSTERING_FLAG:Lt,ITC_EVENT_TYPES:bt,CUSTOM_FUNCTION_PROC_NAME:z,CUSTOM_FUNCTION_PROC_DESCRIPTOR:h,SERVICES:Ft,THREAD_TYPES:Bt,MEM_SETTING_KEY:he,HDB_RESTART_SCRIPT:X_,PROCESS_DESCRIPTORS:_e,SERVICE_SERVERS:se,SERVICE_SERVERS_CWD:V,PROCESS_DESCRIPTORS_VALIDATE:Ee,LAUNCH_SERVICE_SCRIPTS:oe,LOG_LEVELS:te,PROCESS_NAME_ENV_PROP:qe,LOG_NAMES:ee,PM2_PROCESS_STATUSES:yt,CONFIG_PARAM_MAP:o_,CONFIG_PARAMS:_,HDB_CONFIG_FILE:j_,HDB_DEFAULT_CONFIG_FILE:x_,ROLE_TYPES_ENUM:re,BOOT_PROP_PARAMS:E_,INSTALL_PROMPTS:Xe,HDB_ROOT_DIR_NAME:q_,CLUSTERING_PROCESSES:Te,FOREGROUND_PID_FILE:J_,PACKAGE_ROOT:l,PRE_4_0_0_VERSION:vt,DATABASES_PARAM_CONFIG:it,METADATA_PROPERTY:Ct,AUTH_AUDIT_STATUS:Kt,AUTH_AUDIT_TYPES:kt,HDB_PID_FILE:z_,DEFAULT_DATABASE_NAME:Z_,LEGACY_CONFIG_PARAMS:Rt};$()});var R_=d((cE,wt)=>{wt.exports={name:"harperdb",version:"4.4.13",description:"HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.",keywords:["database","nosql","api","distributed","broker","mqtt","real-time","enterprise","Fastify","NATS","HarperDB","Harper","clustering","replication","REST","WebSockets","decentralized","server-sent events","document store"],main:"harperdb.js",bin:{harperdb:"./bin/harperdb.js"},engines:{"minimum-node":"16.0.0","go-lang":"1.21.7","nats-server":"2.10.11"},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","cover:test":"pm2 kill && rimraf ./.nyc_output/* && node utility/devops/register.js --reset_license && nyc --no-clean --reporter=lcovonly npm run test:replication && 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 --no-clean --reporter=lcovonly npm run test:security && 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:replication && 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 && npm run test:security && 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","test:security":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/security/**/*.js' --config '../unitTests/.mocharc.json'","test:replication":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/server/replication/**/*.js' --config '../unitTests/.mocharc.json'","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",format:"prettier .","format:fix":"npm run format -- --write",lint:"eslint .","lint:fix":"npm run lint -- --fix"},dependencies:{"@aws-sdk/client-s3":"3.717.0","@aws-sdk/lib-storage":"3.717.0","@endo/static-module-record":"^1.0.4","@fastify/autoload":"5.10.0","@fastify/compress":"~6.5.0","@fastify/cors":"~9.0.1","@fastify/static":"~7.0.4","@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.6.0",chalk:"4.1.2","cli-progress":"3.12.0",clone:"2.1.2","fast-glob":"3.3.2",fastify:"~4.29.0","fastify-plugin":"~4.5.1","fs-extra":"11.2.0",graphql:"^16.10.0","gunzip-maybe":"1.4.2","human-readable-ids":"1.0.4",inquirer:"8.2.6","is-number":"7.0.0",joi:"17.12.2","json-bigint-fixes":"1.1.0",json2csv:"5.0.7",jsonata:"1.8.7",jsonwebtoken:"9.0.2",lmdb:"3.2.1",lodash:"4.17.21",mathjs:"11.12.0",minimist:"1.2.8",moment:"2.30.1","mqtt-packet":"~9.0.0",msgpackr:"1.11.2",nats:"2.19.0",needle:"3.3.1","node-forge":"^1.3.1","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.3",papaparse:"5.4.1",passport:"0.6.0","passport-http":"0.3.0","passport-local":"1.0.0",pino:"8.16.0",pm2:"5.4.1",prompt:"1.3.0","properties-reader":"2.3.0","recursive-iterator":"3.3.0",semver:"7.5.4",send:"^1.1.0","serve-static":"2.1.0",ses:"1.1.0","stream-chain":"2.2.5","stream-json":"1.8.0",systeminformation:"5.24.5","tar-fs":"3.0.6",ulidx:"0.5.0",uuid:"10.0.0","validate.js":"0.13.1",ws:"8.18.0",yaml:"2.7.0"},devDependencies:{"@tsconfig/node16":"^1.0.3","@types/node":"20.14.8","@typescript-eslint/eslint-plugin":"^7.18.0","@typescript-eslint/parser":"^7.18.0",axios:"1.7.5",chai:"4.4.1","chai-integer":"0.1.0",esbuild:"^0.24.2",eslint:"^9.17.0","eslint-config-prettier":"^9.1.0","eslint-plugin-sonarjs":"^3.0.1",eventsource:"^2.0.2","graphql-http":"^1.22.3","hook-std":"3.0.0","intercept-stdout":"0.1.2",mkcert:"1.5.1",mocha:"^11.0.1","mocha-teamcity-reporter":"^4.2.0","mock-require":"3.0.3","mock-stdin":"1.0.0",mqtt:"~4.3.8",newman:"6.1.3","node-fetch":"2.6.7",nyc:"15.1.0",prettier:"3.3.3",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.7.2",undici:"^6.19.8","why-is-node-still-running":"^1.0.0"},overrides:{alasql:{xlsx:"0.18.5"}},optionalDependencies:{bufferutil:"^4.0.7","segfault-handler":"^1.3.0","utf-8-validate":"^5.0.10"}}});var I_=d((aE,N_)=>{"use strict";var C=require("fs-extra"),u=require("path"),S=require("chalk"),Vt=require("needle"),i_=require("node-stream-zip"),O_=require("semver"),L=x(),Yt=require("util"),Wt=require("child_process"),{platform:jt}=require("os"),xt=Yt.promisify(Wt.exec),{PACKAGE_ROOT:qt}=w(),N=u.join(qt,"dependencies"),Xt=u.join(N,L.NATS_SERVER_ZIP),A_=R_(),f=A_.engines["go-lang"],g=A_.engines[L.NATS_SERVER_NAME],$t=`${process.platform}-${process.arch}`,b=u.join(N,$t,`${L.NATS_BINARY_NAME}`),Qt=`https://github.com/nats-io/nats-server/releases/download/v${g}/nats-server-v${g}-`,c_={"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"},Jt=Object.keys(c_).map(t=>t.split("-"));async function m(t,E=void 0){let{stdout:s,stderr:o}=await xt(t,{cwd:E});if(o)throw new Error(o.replace(`
|
|
2
|
+
`,gt={READ:"read",INSERT:"insert",UPDATE:"update",DELETE:"delete"},ht=["*","%"],Gt="unauthorized_access",Mt="func_val",Ht={HASH_VALUE:"hash_value",TIMESTAMP:"timestamp",USERNAME:"username"},ft={JWT_PRIVATE_KEY_NAME:".jwtPrivate.key",JWT_PUBLIC_KEY_NAME:".jwtPublic.key",JWT_PASSPHRASE_NAME:".jwtPass"},bt={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",START_JOB:"start_job",NATS_CONSUMER_UPDATE:"nats_consumer_update"},Ft={HDB_CORE:"hdb_core",CUSTOM_FUNCTIONS:"custom_functions"},Bt={HTTP:"http"},yt={STOPPED:"stopped",ONLINE:"online"},vt="3.x.x",Kt={SUCCESS:"success",FAILURE:"failure"},kt={AUTHENTICATION:"authentication",AUTHORIZATION:"authorization"};S_.exports={LOCAL_HARPERDB_OPERATIONS:T,HDB_SUPPORT_ADDRESS:Z,HDB_SUPPORT_URL:e_,HDB_PRICING_URL:Re,SUPPORT_HELP_MSG:ie,LICENSE_HELP_MSG:t_,HDB_PROC_NAME:J,HDB_PROC_DESCRIPTOR:Y,CLUSTERING_LEAF_PROC_DESCRIPTOR:H,CLUSTERING_HUB_PROC_DESCRIPTOR:M,SYSTEM_SCHEMA_NAME:Ge,HASH_FOLDER_NAME:Me,HDB_HOME_DIR_NAME:He,UPDATE_FILE_NAME:Be,LICENSE_KEY_DIR_NAME:be,BOOT_PROPS_FILE_NAME:Fe,JOB_TYPE_ENUM:Ot,JOB_STATUS_ENUM:Et,SYSTEM_TABLE_NAMES:Je,SYSTEM_TABLE_HASH_ATTRIBUTES:ze,OPERATIONS_ENUM:e,VALID_S3_FILE_TYPES:Tt,S3_BUCKET_AUTH_KEYS:st,VALID_SQL_OPS_ENUM:ot,GEO_CONVERSION_ENUM:nt,HDB_SETTINGS_NAMES:s_,HDB_SETTINGS_NAMES_REVERSE_LOOKUP:St,SERVICE_ACTIONS_ENUM:rt,CLUSTER_MESSAGE_TYPE_ENUM:At,CLUSTER_CONNECTION_DIRECTION_ENUM:ct,CLUSTER_EVENTS_DEFS_ENUM:It,PERIOD_REGEX:le,DOUBLE_PERIOD_REGEX:ue,UNICODE_PERIOD:Ce,FORWARD_SLASH_REGEX:Le,UNICODE_FORWARD_SLASH:Ue,ESCAPED_FORWARD_SLASH_REGEX:pe,ESCAPED_PERIOD_REGEX:de,ESCAPED_DOUBLE_PERIOD_REGEX:Pe,REG_KEY_FILE_NAME:et,RESTART_TIMEOUT_MS:Ke,HDB_FILE_PERMISSIONS:ke,DATABASES_DIR_NAME:Ve,LEGACY_DATABASES_DIR_NAME:Ye,TRANSACTIONS_DIR_NAME:We,LIMIT_COUNT_NAME:je,ID_ATTRIBUTE_STRING:xe,INSERT_MODULE_ENUM:$e,UPGRADE_JSON_FIELD_NAMES_ENUM:Qe,RESTART_CODE:ye,RESTART_CODE_NUM:ve,CLUSTER_OPERATIONS:D,SYSTEM_DEFAULT_ATTRIBUTE_NAMES:_t,HDB_INTERNAL_SC_CHANNEL_PREFIX:R,INTERNAL_SC_CHANNELS:Ze,CLUSTERING_MESSAGE_TYPES:Pt,HDB_FILE_SUFFIX:fe,BLOB_FOLDER_NAME:we,ORIGINATOR_SET_VALUE:Dt,LICENSE_VALUES:at,RAM_ALLOCATION_ENUM:Nt,TIME_STAMP_NAMES_ENUM:r_,TIME_STAMP_NAMES:Ut,PERMS_UPDATE_RELEASE_TIMESTAMP:pt,SEARCH_NOT_FOUND_MESSAGE:Oe,SEARCH_ATTRIBUTE_NOT_FOUND:Ae,LICENSE_ROLE_DENIED_RESPONSE:ce,LICENSE_MAX_CONNS_REACHED:ae,BASIC_LICENSE_MAX_NON_CU_ROLES:__,BASIC_LICENSE_CLUSTER_CONNECTION_LIMIT_WS_ERROR_CODE:Se,VALUE_SEARCH_COMPARATORS:n_,VALUE_SEARCH_COMPARATORS_REVERSE_LOOKUP:dt,LICENSE_FILE_NAME:tt,WEBSOCKET_CLOSE_CODE_DESCRIPTION_LOOKUP:lt,NEW_LINE:mt,BASIC_LICENSE_MAX_CLUSTER_USER_ROLES:Ie,MOMENT_DAYS_TAG:De,API_TURNOVER_SEC:me,LOOPBACK:Ne,CODE_EXTENSION:G,WILDCARD_SEARCH_VALUE:ge,NODE_ERROR_CODES:ut,JAVASCRIPT_EXTENSION:Q,PERMS_CRUD_ENUM:gt,UNAUTHORIZED_PERMISSION_NAME:Gt,SEARCH_WILDCARDS:ht,FUNC_VAL:Mt,READ_AUDIT_LOG_SEARCH_TYPES_ENUM:Ht,JWT_ENUM:ft,CLUSTERING_FLAG:Lt,ITC_EVENT_TYPES:bt,CUSTOM_FUNCTION_PROC_NAME:z,CUSTOM_FUNCTION_PROC_DESCRIPTOR:h,SERVICES:Ft,THREAD_TYPES:Bt,MEM_SETTING_KEY:he,HDB_RESTART_SCRIPT:X_,PROCESS_DESCRIPTORS:_e,SERVICE_SERVERS:se,SERVICE_SERVERS_CWD:V,PROCESS_DESCRIPTORS_VALIDATE:Ee,LAUNCH_SERVICE_SCRIPTS:oe,LOG_LEVELS:te,PROCESS_NAME_ENV_PROP:qe,LOG_NAMES:ee,PM2_PROCESS_STATUSES:yt,CONFIG_PARAM_MAP:o_,CONFIG_PARAMS:_,HDB_CONFIG_FILE:j_,HDB_DEFAULT_CONFIG_FILE:x_,ROLE_TYPES_ENUM:re,BOOT_PROP_PARAMS:E_,INSTALL_PROMPTS:Xe,HDB_ROOT_DIR_NAME:q_,CLUSTERING_PROCESSES:Te,FOREGROUND_PID_FILE:J_,PACKAGE_ROOT:l,PRE_4_0_0_VERSION:vt,DATABASES_PARAM_CONFIG:it,METADATA_PROPERTY:Ct,AUTH_AUDIT_STATUS:Kt,AUTH_AUDIT_TYPES:kt,HDB_PID_FILE:z_,DEFAULT_DATABASE_NAME:Z_,LEGACY_CONFIG_PARAMS:Rt};$()});var R_=d((cE,wt)=>{wt.exports={name:"harperdb",version:"4.4.14",description:"HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.",keywords:["database","nosql","api","distributed","broker","mqtt","real-time","enterprise","Fastify","NATS","HarperDB","Harper","clustering","replication","REST","WebSockets","decentralized","server-sent events","document store"],main:"harperdb.js",bin:{harperdb:"./bin/harperdb.js"},engines:{"minimum-node":"16.0.0","go-lang":"1.21.7","nats-server":"2.10.11"},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","cover:test":"pm2 kill && rimraf ./.nyc_output/* && node utility/devops/register.js --reset_license && nyc --no-clean --reporter=lcovonly npm run test:replication && 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 --no-clean --reporter=lcovonly npm run test:security && 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:replication && 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 && npm run test:security && 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","test:security":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/security/**/*.js' --config '../unitTests/.mocharc.json'","test:replication":"cd bin/ && ../node_modules/mocha/bin/_mocha '../unitTests/server/replication/**/*.js' --config '../unitTests/.mocharc.json'","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",format:"prettier .","format:fix":"npm run format -- --write",lint:"eslint .","lint:fix":"npm run lint -- --fix"},dependencies:{"@aws-sdk/client-s3":"3.717.0","@aws-sdk/lib-storage":"3.717.0","@endo/static-module-record":"^1.0.4","@fastify/autoload":"5.10.0","@fastify/compress":"~6.5.0","@fastify/cors":"~9.0.1","@fastify/static":"~7.0.4","@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.6.0",chalk:"4.1.2","cli-progress":"3.12.0",clone:"2.1.2","fast-glob":"3.3.2",fastify:"~4.29.0","fastify-plugin":"~4.5.1","fs-extra":"11.2.0",graphql:"^16.10.0","gunzip-maybe":"1.4.2","human-readable-ids":"1.0.4",inquirer:"8.2.6","is-number":"7.0.0",joi:"17.12.2","json-bigint-fixes":"1.1.0",json2csv:"5.0.7",jsonata:"1.8.7",jsonwebtoken:"9.0.2",lmdb:"3.2.1",lodash:"4.17.21",mathjs:"11.12.0",minimist:"1.2.8",moment:"2.30.1","mqtt-packet":"~9.0.0",msgpackr:"1.11.2",nats:"2.19.0",needle:"3.3.1","node-forge":"^1.3.1","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.3",papaparse:"5.4.1",passport:"0.6.0","passport-http":"0.3.0","passport-local":"1.0.0",pino:"8.16.0",pm2:"5.4.1",prompt:"1.3.0","properties-reader":"2.3.0","recursive-iterator":"3.3.0",semver:"7.5.4",send:"^1.1.0","serve-static":"2.1.0",ses:"1.1.0","stream-chain":"2.2.5","stream-json":"1.8.0",systeminformation:"5.24.5","tar-fs":"3.0.6",ulidx:"0.5.0",uuid:"10.0.0","validate.js":"0.13.1",ws:"8.18.0",yaml:"2.7.0"},devDependencies:{"@tsconfig/node16":"^1.0.3","@types/node":"20.14.8","@typescript-eslint/eslint-plugin":"^7.18.0","@typescript-eslint/parser":"^7.18.0",axios:"1.7.5",chai:"4.4.1","chai-integer":"0.1.0",esbuild:"^0.24.2",eslint:"^9.17.0","eslint-config-prettier":"^9.1.0","eslint-plugin-sonarjs":"^3.0.1",eventsource:"^2.0.2","graphql-http":"^1.22.3","hook-std":"3.0.0","intercept-stdout":"0.1.2",mkcert:"1.5.1",mocha:"^11.0.1","mocha-teamcity-reporter":"^4.2.0","mock-require":"3.0.3","mock-stdin":"1.0.0",mqtt:"~4.3.8",newman:"6.1.3","node-fetch":"2.6.7",nyc:"15.1.0",prettier:"3.3.3",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.7.2",undici:"^6.19.8","why-is-node-still-running":"^1.0.0"},overrides:{alasql:{xlsx:"0.18.5"}},optionalDependencies:{bufferutil:"^4.0.7","segfault-handler":"^1.3.0","utf-8-validate":"^5.0.10"}}});var I_=d((aE,N_)=>{"use strict";var C=require("fs-extra"),u=require("path"),S=require("chalk"),Vt=require("needle"),i_=require("node-stream-zip"),O_=require("semver"),L=x(),Yt=require("util"),Wt=require("child_process"),{platform:jt}=require("os"),xt=Yt.promisify(Wt.exec),{PACKAGE_ROOT:qt}=w(),N=u.join(qt,"dependencies"),Xt=u.join(N,L.NATS_SERVER_ZIP),A_=R_(),f=A_.engines["go-lang"],g=A_.engines[L.NATS_SERVER_NAME],$t=`${process.platform}-${process.arch}`,b=u.join(N,$t,`${L.NATS_BINARY_NAME}`),Qt=`https://github.com/nats-io/nats-server/releases/download/v${g}/nats-server-v${g}-`,c_={"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"},Jt=Object.keys(c_).map(t=>t.split("-"));async function m(t,E=void 0){let{stdout:s,stderr:o}=await xt(t,{cwd:E});if(o)throw new Error(o.replace(`
|
|
3
3
|
`,""));return s.replace(`
|
|
4
4
|
`,"")}i(m,"runCommand");async function zt(){try{await C.access(b)}catch{return!1}let t=await m(`${b} --version`,void 0),E=t.substring(t.lastIndexOf("v")+1,t.length);return O_.eq(E,g)}i(zt,"checkNATSServerInstalled");async function Zt(){console.log(S.green(`Verifying go v${f} is on system.`));let t;try{t=(await m("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(!O_.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(Zt,"checkGoVersion");async function _E(){console.log(S.green("Extracting NATS Server source code."));let t=new i_.async({file:Xt}),E=u.join(N,`${L.NATS_SERVER_NAME}-src`),s=await t.extract(null,N);return console.log(S.green(`Extracted ${s} entries.`)),await t.close(),E}i(_E,"extractNATSServer");async function eE(t){let E=u.join(t,L.NATS_BINARY_NAME),s=u.join(N,"pkg");await C.move(E,b,{overwrite:!0}),await C.remove(t),await C.remove(s)}i(eE,"cleanUp");async function a_(t,E){let s=t&&E?`${t}-${E}`:`${process.platform}-${process.arch}`,o=c_[s];if(o===void 0)throw Error(`unknown platform - architecture: ${s}`);let n=`${Qt}${o}`,r=u.join(N,s,o);await C.ensureFile(r),console.log(S.green(`****Downloading install of NATS Server: ${n}****`)),await Vt("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 A=new i_.async({file:r}),a=await A.entries(),p=t==="win32"||process.platform==="win32"?`${L.NATS_SERVER_NAME}.exe`:L.NATS_SERVER_NAME,F=u.join(N,s,p);for(let B of Object.values(a))!B.isDirectory&&B.name.endsWith(p)&&(await A.extract(B.name,F),console.log(S.green(`Successfully extracted nats-server zip to ${F}.`)));await A.close(),await C.remove(r),await C.chmod(F,511)}i(a_,"downloadNATSServer");async function tE(){if(console.log(S.green("****Starting install of NATS Server.****")),await zt()){console.log(S.green(`****NATS Server v${g} installed.****`));return}try{await a_();try{let s=await m(`${b} --version`,void 0);console.log(S.green(`****Successfully extracted ${s}.****`))}catch(s){if(s.toString().includes("file busy"))console.warn("Error checking NATS versions",s);else throw s}return}catch(s){console.error(S.red(`Error: ${s.message}. Failed to download NATS server. Building from source`))}try{await Zt()}catch(s){console.error(S.red(s.message)),process.exit(1)}let E=await _E();console.log(S.green("Building NATS Server binary.")),jt()=="win32"?await m(`set GOPATH=${N}&& go build`,E):await m(`export GOPATH=${N} && go build`,E),console.log(S.green("Building NATS Server binary complete.")),await eE(E),console.log(S.green(`****NATS Server v${g} is installed.****`))}i(tE,"installer");N_.exports={installer:tE,downloadNATSServer:a_,ALL_SUPPORTED_PLATFORM_ARCHITECTURES:Jt}});var IE=require("fs"),lE=require("path"),EE=I_();(async()=>{try{await EE.installer()}catch(t){console.error(t)}})();
|