harperdb 4.3.44 → 4.3.46
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 +30 -32
- package/bin/lite.js +16 -18
- package/launchServiceScripts/launchInstallNATSServer.js +1 -1
- package/launchServiceScripts/launchNatsIngestService.js +16 -18
- package/launchServiceScripts/launchNatsReplyService.js +16 -18
- package/launchServiceScripts/launchUpdateNodes4-0-0.js +16 -18
- package/npm-shrinkwrap.json +53 -39
- package/package.json +2 -2
- package/server/jobs/jobProcess.js +16 -18
- package/server/threads/threadServer.js +16 -18
- package/studio/build-local/asset-manifest.json +2 -2
- package/studio/build-local/index.html +1 -1
- package/studio/build-local/static/js/{main.9fcea5ee.js → main.7c8002c5.js} +2 -2
- package/utility/scripts/restartHdb.js +16 -18
- /package/studio/build-local/static/js/{main.9fcea5ee.js.LICENSE.txt → main.7c8002c5.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 p=(t,E)=>()=>(E||t((E={exports:{}}).exports,E),E.exports);var x=p((rE,j)=>{"use strict";var{platform:oE}=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"),d_={NATS_MSG_ID:"Nats-Msg-Id",ORIGIN:"origin",TRANSACTED_NODES:"transacted_nodes"},p_={HUB_SERVER:"hub.json",LEAF_SERVER:"leaf.json"},P_={HUB:"hub.pid",LEAF:"leaf.pid"},m_={HUB:"-hub",LEAF:"-leaf",ADMIN:"-admin"},D_={SUCCESS:"success",ERROR:"error"},g_={OPEN:"open",CLOSED:"closed",NO_RESPONDERS:"NoResponders",TIMEOUT:"Timeout"},G_={TXN:"txn",MSGID:"msgid"},U={ERR:"error",WRN:"warn",INF:"info",DBG:"debug",TRC:"trace"},M_={[U.ERR]:1,[U.WRN]:2,[U.INF]:3,[U.DBG]:4,[U.TRC]:5},h_={debug:"-D",trace:"-DVV"};j.exports={NATS_SERVER_ZIP:u_,NATS_SERVER_NAME:y,NATS_BINARY_NAME:C_,PID_FILES:P_,NATS_CONFIG_FILES:p_,SERVER_SUFFIX:m_,NATS_TERM_CONSTRAINTS_RX:L_,REQUEST_SUFFIX:W,UPDATE_REMOTE_RESPONSE_STATUSES:D_,CLUSTER_STATUS_STATUSES:g_,REQUEST_SUBJECT:U_,SUBJECT_PREFIXES:G_,MSG_HEADERS:d_,LOG_LEVELS:U,LOG_LEVEL_FLAGS:h_,LOG_LEVEL_HIERARCHY:M_}});var $=p((RE,X)=>{var H_=require("fast-glob"),{statSync:v,existsSync:K,readFileSync:f_,writeFileSync:b_}=require("fs"),{spawnSync:B_,spawn:F_,execFileSync:SE}=require("child_process"),{isMainThread:y_}=require("worker_threads"),{join:I,relative:q}=require("path"),{PACKAGE_ROOT:a}=V(),{tmpdir:v_,platform:K_}=require("os");require("source-map-support").install();var w_=["resources","server","dataLayer","components"],P="ts-build",w,V_=__filename.endsWith("tsBuild.js");if(V_){if(y_){let T;try{v(I(a,P)),T=!0}catch{}if(T)for(let o of H_.sync(w_.map(n=>n+"/**/*.ts"),{cwd:a})){let n=0,r=0;try{n=v(I(a,o)).mtimeMs-5e3,r=v(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");K_()==="win32"&&(o+=".cmd");let n=B_(o,{cwd:a});if(n.stdout?.length&&console.log(n.stdout.toString()),n.stderr?.length&&console.log(n.stderr.toString()),T){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 c=F_(o,["--watch"],{cwd:a,detached:!0,stdio:"ignore"});b_(r,c.pid.toString()),c.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=q(a,o[0]),A;r.startsWith(P)?A=I(a,q(P,r)):A=I(a,P,r);let c=I(A,T),d=c+".js";if(K(d))return d;if(c.includes(".")&&K(c))return c}return E(T,o,n)}}});var V=p((AE,S_)=>{"use strict";var O=require("path"),k_=require("fs"),{relative:iE,join:OE}=O,{existsSync:Y_}=k_;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",M=Q,j_="harperdb-config.yaml",x_="defaultConfig.yaml",q_="hdb",J=`harperdb.${M}`,z=`customFunctionsServer.${M}`,X_=`restartHdb.${M}`,Y="HarperDB",G="Custom Functions",h="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:h,CLUSTERING_LEAF:H,CLUSTERING_INGEST_SERVICE:$_,CLUSTERING_REPLY_SERVICE:Q_,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"},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":h,"clustering leaf":H,"custom functions":G,custom_functions:G,clustering:"clustering","clustering config":"clustering config",clustering_config:"clustering_config",http_workers:"http_workers"},Te={CLUSTERING_HUB_PROC_DESCRIPTOR:h,CLUSTERING_LEAF_PROC_DESCRIPTOR:H},k={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(k.HDB,J),CUSTOM_FUNCTIONS:O.join(k.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",ae=`Your current license only supports ${__} role. ${t_}`,ce="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",de=/U\+002F/g,pe=/^U\+002E$/,Pe=/^U\+002EU\+002E$/,me="d",De=999999,ge="*",Ge="--max-old-space-size=",Me="system",he="__hdb_hash",He=".harperdb",fe=".hdb",be="keys",Be="hdb_boot_properties.file",Fe=".updateConfig.json",ye="SIGTSTP",ve=24,Ke=6e4,we=448,Ve="blob",ke="trash",Ye="database",We="schema",je="transactions",xe=".count",qe="id",Xe="PROCESS_NAME",E_={SETTINGS_PATH_KEY:"settings_path"},T_=require("lodash"),$e={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"},Qe={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},Je={DATA_VERSION:"data_version",UPGRADE_VERSION:"upgrade_version"},ze={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:",_t={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"},et={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"},tt="060493.ks",Et=".license",Tt={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"},ot={AWS_ACCESS_KEY:"aws_access_key_id",AWS_SECRET:"aws_secret_access_key",AWS_BUCKET:"bucket",AWS_FILE_KEY:"key",REGION:"region"},rt={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 nt={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"},St={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"},Rt=T_.invert(s_),it={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",THREADS_HEAPSNAPSHOTNEARLIMIT:"threads_heapSnapshotNearLimit",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_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",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",STORAGE_SKIPCOMPACTTABLES:"storage_skipCompactTables",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,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,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,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 Ot={TABLES:"tables",PATH:"path",AUDIT_PATH:"auditPath"},At={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"},Nt={VERSION_DEFAULT:"2.2.0"},It={DEVELOPMENT:8192,DEFAULT:512},lt={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"},ut={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"},Ct={ENOENT:"ENOENT",EACCES:"EACCES",EEXIST:"EEXIST",ERR_INVALID_ARG_TYPE:"ERR_INVALID_ARG_TYPE"},r_={CREATED_TIME:"__createdtime__",UPDATED_TIME:"__updatedtime__"},Lt=Symbol("metadata"),Ut="__clustering__",dt=Object.values(r_),pt=15984864e5,n_={LESS:"<",LESS_OR_EQ:"<=",GREATER:">",GREATER_OR_EQ:">=",BETWEEN:"..."},Pt=T_.invert(n_),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"},Dt=111,gt=`\r
|
|
2
|
-
`,Gt={READ:"read",INSERT:"insert",UPDATE:"update",DELETE:"delete"},Mt=["*","%"],ht="unauthorized_access",Ht="func_val",ft={HASH_VALUE:"hash_value",TIMESTAMP:"timestamp",USERNAME:"username"},bt={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"},yt={HTTP:"http"},vt={STOPPED:"stopped",ONLINE:"online"},Kt="3.x.x",wt={SUCCESS:"success",FAILURE:"failure"},Vt={AUTHENTICATION:"authentication",AUTHORIZATION:"authorization"};S_.exports={LOCAL_HARPERDB_OPERATIONS:s,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:h,SYSTEM_SCHEMA_NAME:Me,HASH_FOLDER_NAME:he,HDB_HOME_DIR_NAME:He,UPDATE_FILE_NAME:Fe,LICENSE_KEY_DIR_NAME:be,BOOT_PROPS_FILE_NAME:Be,JOB_TYPE_ENUM:At,JOB_STATUS_ENUM:Tt,SYSTEM_TABLE_NAMES:ze,SYSTEM_TABLE_HASH_ATTRIBUTES:Ze,OPERATIONS_ENUM:e,VALID_S3_FILE_TYPES:st,S3_BUCKET_AUTH_KEYS:ot,VALID_SQL_OPS_ENUM:rt,GEO_CONVERSION_ENUM:St,HDB_SETTINGS_NAMES:s_,HDB_SETTINGS_NAMES_REVERSE_LOOKUP:Rt,SERVICE_ACTIONS_ENUM:nt,CLUSTER_MESSAGE_TYPE_ENUM:at,CLUSTER_CONNECTION_DIRECTION_ENUM:ct,CLUSTER_EVENTS_DEFS_ENUM:lt,PERIOD_REGEX:le,DOUBLE_PERIOD_REGEX:ue,UNICODE_PERIOD:Ce,FORWARD_SLASH_REGEX:Le,UNICODE_FORWARD_SLASH:Ue,ESCAPED_FORWARD_SLASH_REGEX:de,ESCAPED_PERIOD_REGEX:pe,ESCAPED_DOUBLE_PERIOD_REGEX:Pe,REG_KEY_FILE_NAME:tt,RESTART_TIMEOUT_MS:Ke,HDB_FILE_PERMISSIONS:we,DATABASES_DIR_NAME:Ye,LEGACY_DATABASES_DIR_NAME:We,TRANSACTIONS_DIR_NAME:je,LIMIT_COUNT_NAME:xe,ID_ATTRIBUTE_STRING:qe,INSERT_MODULE_ENUM:Qe,UPGRADE_JSON_FIELD_NAMES_ENUM:Je,RESTART_CODE:ye,RESTART_CODE_NUM:ve,CLUSTER_OPERATIONS:m,SYSTEM_DEFAULT_ATTRIBUTE_NAMES:et,HDB_INTERNAL_SC_CHANNEL_PREFIX:R,INTERNAL_SC_CHANNELS:_t,CLUSTERING_MESSAGE_TYPES:mt,HDB_FILE_SUFFIX:fe,BLOB_FOLDER_NAME:Ve,HDB_TRASH_DIR:ke,ORIGINATOR_SET_VALUE:Dt,LICENSE_VALUES:Nt,RAM_ALLOCATION_ENUM:It,TIME_STAMP_NAMES_ENUM:r_,TIME_STAMP_NAMES:dt,PERMS_UPDATE_RELEASE_TIMESTAMP:pt,SEARCH_NOT_FOUND_MESSAGE:Oe,SEARCH_ATTRIBUTE_NOT_FOUND:Ae,LICENSE_ROLE_DENIED_RESPONSE:ae,LICENSE_MAX_CONNS_REACHED:ce,BASIC_LICENSE_MAX_NON_CU_ROLES:__,BASIC_LICENSE_CLUSTER_CONNECTION_LIMIT_WS_ERROR_CODE:Se,VALUE_SEARCH_COMPARATORS:n_,VALUE_SEARCH_COMPARATORS_REVERSE_LOOKUP:Pt,LICENSE_FILE_NAME:Et,WEBSOCKET_CLOSE_CODE_DESCRIPTION_LOOKUP:ut,NEW_LINE:gt,BASIC_LICENSE_MAX_CLUSTER_USER_ROLES:Ie,MOMENT_DAYS_TAG:me,API_TURNOVER_SEC:De,LOOPBACK:Ne,CODE_EXTENSION:M,WILDCARD_SEARCH_VALUE:ge,NODE_ERROR_CODES:Ct,JAVASCRIPT_EXTENSION:Q,PERMS_CRUD_ENUM:Gt,UNAUTHORIZED_PERMISSION_NAME:ht,SEARCH_WILDCARDS:Mt,FUNC_VAL:Ht,READ_AUDIT_LOG_SEARCH_TYPES_ENUM:ft,JWT_ENUM:bt,CLUSTERING_FLAG:Ut,ITC_EVENT_TYPES:Bt,CUSTOM_FUNCTION_PROC_NAME:z,CUSTOM_FUNCTION_PROC_DESCRIPTOR:G,SERVICES:Ft,THREAD_TYPES:yt,MEM_SETTING_KEY:Ge,HDB_RESTART_SCRIPT:X_,PROCESS_DESCRIPTORS:_e,SERVICE_SERVERS:se,SERVICE_SERVERS_CWD:k,PROCESS_DESCRIPTORS_VALIDATE:Ee,LAUNCH_SERVICE_SCRIPTS:oe,LOG_LEVELS:te,PROCESS_NAME_ENV_PROP:Xe,LOG_NAMES:ee,PM2_PROCESS_STATUSES:vt,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:$e,HDB_ROOT_DIR_NAME:q_,CLUSTERING_PROCESSES:Te,FOREGROUND_PID_FILE:J_,PACKAGE_ROOT:l,PRE_4_0_0_VERSION:Kt,DATABASES_PARAM_CONFIG:Ot,METADATA_PROPERTY:Lt,AUTH_AUDIT_STATUS:wt,AUTH_AUDIT_TYPES:Vt,HDB_PID_FILE:z_,DEFAULT_DATABASE_NAME:Z_,LEGACY_CONFIG_PARAMS:it};$()});var R_=p((cE,kt)=>{kt.exports={name:"harperdb",version:"4.3.44",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",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/client-s3":"3.635.0","@aws-sdk/lib-storage":"3.635.0","@endo/static-module-record":"^1.0.4","@fastify/autoload":"5.7.1","@fastify/compress":"~6.5.0","@fastify/cors":"~8.5.0","@fastify/static":"~6.12.0","@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.8",chalk:"4.1.2","cli-progress":"3.12.0",clone:"2.1.2","fast-glob":"3.3.2",fastify:"~4.26.2","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.12.2","json-bigint-fixes":"1.1.0",json2csv:"5.0.7",jsonata:"1.8.7",jsonwebtoken:"9.0.2",lmdb:"3.2.6",lodash:"4.17.21",mathjs:"11.12.0",minimist:"1.2.8",mkcert:"1.5.1",moment:"2.30.1","mqtt-packet":"~8.2.1",msgpackr:"1.11.2",nats:"2.19.0",needle:"3.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:"^0.18.0","serve-static":"1.15.0",ses:"1.1.0","stream-chain":"2.2.5","stream-json":"1.8.0",systeminformation:"5.22.9","tar-fs":"2.1.1",ulidx:"0.5.0",uuid:"9.0.1","validate.js":"0.13.1",ws:"8.17.1",yaml:"2.4.1"},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.8",chai:"4.4.1","chai-integer":"0.1.0",esbuild:"^0.20.2",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.3.0","mocha-teamcity-reporter":"3.0.0","mock-require":"3.0.3","mock-stdin":"1.0.0",mqtt:"~4.3.8",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.4.2","why-is-node-still-running":"^1.0.0"},overrides:{"eslint-plugin-radar":{eslint:"8.22.0"},alasql:{xlsx:"0.18.5"}},optionalDependencies:{bufferutil:"^4.0.7","utf-8-validate":"^5.0.10"}}});var I_=p((NE,N_)=>{"use strict";var C=require("fs-extra"),u=require("path"),S=require("chalk"),Yt=require("needle"),i_=require("node-stream-zip"),O_=require("semver"),L=x(),Wt=require("util"),jt=require("child_process"),{platform:xt}=require("os"),qt=Wt.promisify(jt.exec),{PACKAGE_ROOT:Xt}=V(),N=u.join(Xt,"dependencies"),$t=u.join(N,L.NATS_SERVER_ZIP),A_=R_(),f=A_.engines["go-lang"],g=A_.engines[L.NATS_SERVER_NAME],Qt=`${process.platform}-${process.arch}`,b=u.join(N,Qt,`${L.NATS_BINARY_NAME}`),Jt=`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"},zt=Object.keys(a_).map(t=>t.split("-"));async function D(t,E=void 0){let{stdout:T,stderr:o}=await qt(t,{cwd:E});if(o)throw new Error(o.replace(`
|
|
2
|
+
`,Gt={READ:"read",INSERT:"insert",UPDATE:"update",DELETE:"delete"},Mt=["*","%"],ht="unauthorized_access",Ht="func_val",ft={HASH_VALUE:"hash_value",TIMESTAMP:"timestamp",USERNAME:"username"},bt={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"},yt={HTTP:"http"},vt={STOPPED:"stopped",ONLINE:"online"},Kt="3.x.x",wt={SUCCESS:"success",FAILURE:"failure"},Vt={AUTHENTICATION:"authentication",AUTHORIZATION:"authorization"};S_.exports={LOCAL_HARPERDB_OPERATIONS:s,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:h,SYSTEM_SCHEMA_NAME:Me,HASH_FOLDER_NAME:he,HDB_HOME_DIR_NAME:He,UPDATE_FILE_NAME:Fe,LICENSE_KEY_DIR_NAME:be,BOOT_PROPS_FILE_NAME:Be,JOB_TYPE_ENUM:At,JOB_STATUS_ENUM:Tt,SYSTEM_TABLE_NAMES:ze,SYSTEM_TABLE_HASH_ATTRIBUTES:Ze,OPERATIONS_ENUM:e,VALID_S3_FILE_TYPES:st,S3_BUCKET_AUTH_KEYS:ot,VALID_SQL_OPS_ENUM:rt,GEO_CONVERSION_ENUM:St,HDB_SETTINGS_NAMES:s_,HDB_SETTINGS_NAMES_REVERSE_LOOKUP:Rt,SERVICE_ACTIONS_ENUM:nt,CLUSTER_MESSAGE_TYPE_ENUM:at,CLUSTER_CONNECTION_DIRECTION_ENUM:ct,CLUSTER_EVENTS_DEFS_ENUM:lt,PERIOD_REGEX:le,DOUBLE_PERIOD_REGEX:ue,UNICODE_PERIOD:Ce,FORWARD_SLASH_REGEX:Le,UNICODE_FORWARD_SLASH:Ue,ESCAPED_FORWARD_SLASH_REGEX:de,ESCAPED_PERIOD_REGEX:pe,ESCAPED_DOUBLE_PERIOD_REGEX:Pe,REG_KEY_FILE_NAME:tt,RESTART_TIMEOUT_MS:Ke,HDB_FILE_PERMISSIONS:we,DATABASES_DIR_NAME:Ye,LEGACY_DATABASES_DIR_NAME:We,TRANSACTIONS_DIR_NAME:je,LIMIT_COUNT_NAME:xe,ID_ATTRIBUTE_STRING:qe,INSERT_MODULE_ENUM:Qe,UPGRADE_JSON_FIELD_NAMES_ENUM:Je,RESTART_CODE:ye,RESTART_CODE_NUM:ve,CLUSTER_OPERATIONS:m,SYSTEM_DEFAULT_ATTRIBUTE_NAMES:et,HDB_INTERNAL_SC_CHANNEL_PREFIX:R,INTERNAL_SC_CHANNELS:_t,CLUSTERING_MESSAGE_TYPES:mt,HDB_FILE_SUFFIX:fe,BLOB_FOLDER_NAME:Ve,HDB_TRASH_DIR:ke,ORIGINATOR_SET_VALUE:Dt,LICENSE_VALUES:Nt,RAM_ALLOCATION_ENUM:It,TIME_STAMP_NAMES_ENUM:r_,TIME_STAMP_NAMES:dt,PERMS_UPDATE_RELEASE_TIMESTAMP:pt,SEARCH_NOT_FOUND_MESSAGE:Oe,SEARCH_ATTRIBUTE_NOT_FOUND:Ae,LICENSE_ROLE_DENIED_RESPONSE:ae,LICENSE_MAX_CONNS_REACHED:ce,BASIC_LICENSE_MAX_NON_CU_ROLES:__,BASIC_LICENSE_CLUSTER_CONNECTION_LIMIT_WS_ERROR_CODE:Se,VALUE_SEARCH_COMPARATORS:n_,VALUE_SEARCH_COMPARATORS_REVERSE_LOOKUP:Pt,LICENSE_FILE_NAME:Et,WEBSOCKET_CLOSE_CODE_DESCRIPTION_LOOKUP:ut,NEW_LINE:gt,BASIC_LICENSE_MAX_CLUSTER_USER_ROLES:Ie,MOMENT_DAYS_TAG:me,API_TURNOVER_SEC:De,LOOPBACK:Ne,CODE_EXTENSION:M,WILDCARD_SEARCH_VALUE:ge,NODE_ERROR_CODES:Ct,JAVASCRIPT_EXTENSION:Q,PERMS_CRUD_ENUM:Gt,UNAUTHORIZED_PERMISSION_NAME:ht,SEARCH_WILDCARDS:Mt,FUNC_VAL:Ht,READ_AUDIT_LOG_SEARCH_TYPES_ENUM:ft,JWT_ENUM:bt,CLUSTERING_FLAG:Ut,ITC_EVENT_TYPES:Bt,CUSTOM_FUNCTION_PROC_NAME:z,CUSTOM_FUNCTION_PROC_DESCRIPTOR:G,SERVICES:Ft,THREAD_TYPES:yt,MEM_SETTING_KEY:Ge,HDB_RESTART_SCRIPT:X_,PROCESS_DESCRIPTORS:_e,SERVICE_SERVERS:se,SERVICE_SERVERS_CWD:k,PROCESS_DESCRIPTORS_VALIDATE:Ee,LAUNCH_SERVICE_SCRIPTS:oe,LOG_LEVELS:te,PROCESS_NAME_ENV_PROP:Xe,LOG_NAMES:ee,PM2_PROCESS_STATUSES:vt,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:$e,HDB_ROOT_DIR_NAME:q_,CLUSTERING_PROCESSES:Te,FOREGROUND_PID_FILE:J_,PACKAGE_ROOT:l,PRE_4_0_0_VERSION:Kt,DATABASES_PARAM_CONFIG:Ot,METADATA_PROPERTY:Lt,AUTH_AUDIT_STATUS:wt,AUTH_AUDIT_TYPES:Vt,HDB_PID_FILE:z_,DEFAULT_DATABASE_NAME:Z_,LEGACY_CONFIG_PARAMS:it};$()});var R_=p((cE,kt)=>{kt.exports={name:"harperdb",version:"4.3.46",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",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/client-s3":"3.635.0","@aws-sdk/lib-storage":"3.635.0","@endo/static-module-record":"^1.0.4","@fastify/autoload":"5.7.1","@fastify/compress":"~6.5.0","@fastify/cors":"~8.5.0","@fastify/static":"~6.12.0","@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.8",chalk:"4.1.2","cli-progress":"3.12.0",clone:"2.1.2","fast-glob":"3.3.2",fastify:"~4.26.2","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.12.2","json-bigint-fixes":"1.1.0",json2csv:"5.0.7",jsonata:"1.8.7",jsonwebtoken:"9.0.2",lmdb:"3.4.1",lodash:"4.17.21",mathjs:"11.12.0",minimist:"1.2.8",mkcert:"1.5.1",moment:"2.30.1","mqtt-packet":"~8.2.1",msgpackr:"1.11.2",nats:"2.19.0",needle:"3.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:"^0.18.0","serve-static":"1.15.0",ses:"1.1.0","stream-chain":"2.2.5","stream-json":"1.8.0",systeminformation:"5.22.9","tar-fs":"2.1.1",ulidx:"0.5.0",uuid:"9.0.1","validate.js":"0.13.1",ws:"8.17.1",yaml:"2.4.1"},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.8",chai:"4.4.1","chai-integer":"0.1.0",esbuild:"^0.20.2",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.3.0","mocha-teamcity-reporter":"3.0.0","mock-require":"3.0.3","mock-stdin":"1.0.0",mqtt:"~4.3.8",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.4.2","why-is-node-still-running":"^1.0.0"},overrides:{"eslint-plugin-radar":{eslint:"8.22.0"},alasql:{xlsx:"0.18.5"}},optionalDependencies:{bufferutil:"^4.0.7","utf-8-validate":"^5.0.10"}}});var I_=p((NE,N_)=>{"use strict";var C=require("fs-extra"),u=require("path"),S=require("chalk"),Yt=require("needle"),i_=require("node-stream-zip"),O_=require("semver"),L=x(),Wt=require("util"),jt=require("child_process"),{platform:xt}=require("os"),qt=Wt.promisify(jt.exec),{PACKAGE_ROOT:Xt}=V(),N=u.join(Xt,"dependencies"),$t=u.join(N,L.NATS_SERVER_ZIP),A_=R_(),f=A_.engines["go-lang"],g=A_.engines[L.NATS_SERVER_NAME],Qt=`${process.platform}-${process.arch}`,b=u.join(N,Qt,`${L.NATS_BINARY_NAME}`),Jt=`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"},zt=Object.keys(a_).map(t=>t.split("-"));async function D(t,E=void 0){let{stdout:T,stderr:o}=await qt(t,{cwd:E});if(o)throw new Error(o.replace(`
|
|
3
3
|
`,""));return T.replace(`
|
|
4
4
|
`,"")}i(D,"runCommand");async function Zt(){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 O_.eq(E,g)}i(Zt,"checkNATSServerInstalled");async function _E(){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(!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(_E,"checkGoVersion");async function eE(){console.log(S.green("Extracting NATS Server source code."));let t=new i_.async({file:$t}),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(eE,"extractNATSServer");async function tE(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(tE,"cleanUp");async function c_(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=`${Jt}${o}`,r=u.join(N,T,o);await C.ensureFile(r),console.log(S.green(`****Downloading install of NATS Server: ${n}****`)),await Yt("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}),c=await A.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(c))!F.isDirectory&&F.name.endsWith(d)&&(await A.extract(F.name,B),console.log(S.green(`Successfully extracted nats-server zip to ${B}.`)));await A.close(),await C.remove(r),await C.chmod(B,511)}i(c_,"downloadNATSServer");async function EE(){if(console.log(S.green("****Starting install of NATS Server.****")),await Zt()){console.log(S.green(`****NATS Server v${g} installed.****`));return}try{await c_();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 _E()}catch(T){console.error(S.red(T.message)),process.exit(1)}let E=await eE();console.log(S.green("Building NATS Server binary.")),xt()=="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 tE(E),console.log(S.green(`****NATS Server v${g} is installed.****`))}i(EE,"installer");N_.exports={installer:EE,downloadNATSServer:c_,ALL_SUPPORTED_PLATFORM_ARCHITECTURES:zt}});var lE=require("fs"),uE=require("path"),TE=I_();(async()=>{try{await TE.installer()}catch(t){console.error(t)}})();
|