harperdb 4.0.5 → 4.0.6
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 +1 -1
- package/launchServiceScripts/launchCustomFunctions.js +5 -5
- package/launchServiceScripts/launchHarperDB.js +1 -1
- package/launchServiceScripts/launchInstallNATSServer.js +1 -1
- package/launchServiceScripts/launchNatsIngestService.js +1 -1
- package/launchServiceScripts/launchNatsReplyService.js +1 -1
- package/launchServiceScripts/launchUpdateNodes4-0-0.js +1 -1
- package/package.json +2 -2
- package/server/jobs/jobProcess.js +1 -1
- package/utility/scripts/restartHdb.js +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";var S_=Object.defineProperty;var O=(E,T)=>S_(E,"name",{value:T,configurable:!0});var u=(E,T)=>()=>(T||E((T={exports:{}}).exports,T),T.exports);var w=u((KE,V)=>{"use strict";var{platform:vE}=require("os"),i_="nats-server.zip",g="nats-server",A_=process.platform==="win32"?`${g}.exe`:g,h="HDB",N_=/^[^\s.,*>]+$/,y="__request__",c_=O(E=>`${E}.${y}`,"REQUEST_SUBJECT"),a_={HUB_SERVER:"hub.json",LEAF_SERVER:"leaf.json"},I_={HUB:"hub.pid",LEAF:"leaf.pid"},l_={HUB:"-hub",LEAF:"-leaf",ADMIN:"-admin"},C_={stream_name:"__HARPERDB_WORK_QUEUE__",durable_name:"HDB_WORK_QUEUE",deliver_group:h,deliver_subject:"__HDB__.WORKQUEUE"},U_={stream_name:"__HARPERDB_SCHEMA_QUEUE__",durable_name:"HDB_SCHEMA_QUEUE",deliver_group:h,deliver_subject:"HDB.SCHEMAQUEUE"},u_={stream_name:"__HARPERDB_USER_QUEUE__",durable_name:"HDB_USER_QUEUE",deliver_group:h,deliver_subject:"HDB.USERQUEUE"},L_={SUCCESS:"success",ERROR:"error"},P_={OPEN:"open",CLOSED:"closed",NO_RESPONDERS:"NoResponders",TIMEOUT:"Timeout"},d_={TXN:"txn",MSGID:"msgid"};V.exports={NATS_SERVER_ZIP:i_,NATS_SERVER_NAME:g,NATS_BINARY_NAME:A_,PID_FILES:I_,NATS_CONFIG_FILES:a_,SERVER_SUFFIX:l_,WORK_QUEUE_CONSUMER_NAMES:C_,SCHEMA_QUEUE_CONSUMER_NAMES:U_,USER_QUEUE_CONSUMER_NAMES:u_,NATS_TERM_CONSTRAINTS_RX:N_,REQUEST_SUFFIX:y,UPDATE_REMOTE_RESPONSE_STATUSES:L_,CLUSTER_STATUS_STATUSES:P_,REQUEST_SUBJECT:c_,SUBJECT_PREFIXES:d_}});var e_=u((yE,__)=>{"use strict";var s=require("path"),p_=require("fs");function D_(){let E=__dirname;for(;!p_.existsSync(s.join(E,"package.json"));){let T=s.dirname(E);if(T===E)throw new Error("Could not find package root");E=T}return E}O(D_,"getHDBPackageRoot");var R=D_(),k="js",I=k,G_="harperdb-config.yaml",m_="defaultConfig.yaml",M_="hdb",Y=`hdbServer.${I}`,W=`customFunctionsServer.${I}`,j=`hdbIpcServer.${I}`,g_=`restartHdb.${I}`,B="HarperDB",P="Custom Functions",d="Clustering Hub",p="Clustering Leaf",F="Clustering Ingest Service",f="Clustering Reply Service",h_="foreground.pid",H={HDB:B,IPC:"IPC",CLUSTERING_HUB:d,CLUSTERING_LEAF:p,CLUSTERING_INGEST_SERVICE:F,CLUSTERING_REPLY_SERVICE:f,CUSTOM_FUNCTIONS:P,RESTART_HDB:"Restart HDB",INSTALL:"Install",RUN:"Run",STOP:"Stop",UPGRADE:"Upgrade",REGISTER:"Register",JOB:"Job",PM2_LOGROTATE:"pm2-logrotate",CLUSTERING_UPGRADE_4_0_0:"Upgrade-4-0-0"},H_={HDB:"hdb.log",IPC:"ipc.log",CLUSTERING_HUB:"clustering_hub.log",CLUSTERING_LEAF:"clustering_leaf.log",CLUSTERING_INGEST_SERVICE:"clustering_ingest_service.log",CLUSTERING_REPLY_SERVICE:"clustering_reply_service.log",CUSTOM_FUNCTIONS:"custom_functions.log",INSTALL:"install.log",CLI:"cli.log",PM2:"pm2.log",CLUSTERING_UPGRADE:"clustering_upgrade.log",JOBS:"jobs.log"},B_={NOTIFY:"notify",FATAL:"fatal",ERROR:"error",WARN:"warn",INFO:"info",DEBUG:"debug",TRACE:"trace"},F_={harperdb:B,ipc:"IPC","clustering hub":d,"clustering leaf":p,"clustering ingest service":F,"clustering reply service":f,"custom functions":P,custom_functions:P,"pm2-logrotate":H.PM2_LOGROTATE,logrotate:H.PM2_LOGROTATE,clustering:"clustering","clustering config":"clustering config"},f_={CLUSTERING_HUB_PROC_DESCRIPTOR:d,CLUSTERING_LEAF_PROC_DESCRIPTOR:p,CLUSTERING_INGEST_PROC_DESCRIPTOR:F,CLUSTERING_REPLY_SERVICE_DESCRIPTOR:f},L={HDB:s.join(R,"server/harperdb"),IPC:s.join(R,"server/ipc"),CUSTOM_FUNCTIONS:s.join(R,"server/customFunctions"),CLUSTERING_HUB:s.join(R,"server/nats"),CLUSTERING_LEAF:s.join(R,"server/nats")},b_={HDB:s.join(L.HDB,Y),IPC:s.join(L.IPC,j),CUSTOM_FUNCTIONS:s.join(L.CUSTOM_FUNCTIONS,W)},v_={HDB:s.join(R,"launchServiceScripts/launchHarperDB.js"),CUSTOM_FUNCTIONS:s.join(R,"launchServiceScripts/launchCustomFunctions.js"),NATS_INGEST_SERVICE:s.join(R,"launchServiceScripts/launchNatsIngestService.js"),NATS_REPLY_SERVICE:s.join(R,"launchServiceScripts/launchNatsReplyService.js"),NODES_UPGRADE_4_0_0:s.resolve(R,"launchServiceScripts/launchUpdateNodes4-0-0.js")},K_={SUPER_USER:"super_user",CLUSTER_USER:"cluster_user"},x="support@harperdb.io",y_="customer-success@harperdb.io",$=1,V_=4141,X="https://harperdbhelp.zendesk.com/hc/en-us/requests/new",w_="https://www.harperdb.io/product",k_=`For support, please submit a request at ${X} or contact ${x}`,J=`For license support, please contact ${y_}`,Y_="None of the specified records were found.",W_="hash attribute not found",j_=`Your current license only supports ${$} role. ${J}`,x_="Your current license only supports 3 connections to a node.",$_="127.0.0.1",X_=1,J_=/^\.$/,q_=/^\.\.$/,Q_="U+002E",z_=/\//g,Z_="U+002F",_e=/U\+002F/g,ee=/^U\+002E$/,Ee=/^U\+002EU\+002E$/,te="d",Te=999999,oe="*",re="--max-old-space-size=",se="system",ne="__hdb_hash",Oe=".harperdb",Re=".hdb",Se="keys",ie="hdb_boot_properties.file",Ae=".updateConfig.json",Ne="SIGTSTP",ce=24,ae=6e4,Ie=448,le="blob",Ce="trash",Ue="schema",ue="transactions",Le=".count",Pe="id",de="install_log.log",pe="run_log.log",De="PROCESS_NAME",Ge={SETTINGS_PATH_KEY:"settings_path"},q=require("lodash"),me={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",CLUSTERING_PORT:"CLUSTERING_PORT",HDB_ROOT:"HDB_ROOT",SERVER_PORT:"SERVER_PORT",NODE_NAME:"NODE_NAME",CLUSTERING:"CLUSTERING"},Me={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},ge={DATA_VERSION:"data_version",UPGRADE_VERSION:"upgrade_version"},he={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"},He={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"},n="hdb_internal:",Be={CREATE_SCHEMA:n+"create_schema",CREATE_TABLE:n+"create_table",CREATE_ATTRIBUTE:n+"create_attribute",ADD_USER:n+"add_user",ALTER_USER:n+"alter_user",DROP_USER:n+"drop_user",HDB_NODES:n+"hdb_nodes",HDB_USERS:n+"hdb_users",HDB_WORKERS:n+"hdb_workers",CATCHUP:n+"catchup",SCHEMA_CATCHUP:n+"schema_catchup",WORKER_ROOM:n+"cluster_workers"},Fe={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"},fe="060493.ks",be=".license",ve={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_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_TABLE:"create_table",CREATE_ATTRIBUTE:"create_attribute",DROP_SCHEMA:"drop_schema",DROP_TABLE:"drop_table",DESCRIBE_SCHEMA:"describe_schema",DESCRIBE_TABLE:"describe_table",DESCRIBE_ALL:"describe_all",DELETE:"delete",ADD_USER:"add_user",ALTER_USER:"alter_user",DROP_USER:"drop_user",LIST_USERS:"list_users",LIST_ROLES:"list_roles",ADD_ROLE:"add_role",ALTER_ROLE:"alter_role",DROP_ROLE:"drop_role",USER_INFO:"user_info",READ_LOG:"read_log",ADD_NODE:"add_node",UPDATE_NODE:"update_node",EXPORT_TO_S3:"export_to_s3",IMPORT_FROM_S3:"import_from_s3",DELETE_FILES_BEFORE:"delete_files_before",DELETE_RECORDS_BEFORE:"delete_records_before",EXPORT_LOCAL:"export_local",SEARCH_JOBS_BY_START_DATE:"search_jobs_by_start_date",GET_JOB:"get_job",DELETE_JOB:"delete_job",UPDATE_JOB:"update_job",GET_FINGERPRINT:"get_fingerprint",SET_LICENSE:"set_license",GET_REGISTRATION_INFO:"registration_info",CONFIGURE_CLUSTER:"configure_cluster",SET_CONFIGURATION:"set_configuration",CLUSTER_STATUS:"cluster_status",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",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",DROP_CUSTOM_FUNCTION:"drop_custom_function",ADD_CUSTOM_FUNCTION_PROJECT:"add_custom_function_project",DROP_CUSTOM_FUNCTION_PROJECT:"drop_custom_function_project",PACKAGE_CUSTOM_FUNCTION_PROJECT:"package_custom_function_project",DEPLOY_CUSTOM_FUNCTION_PROJECT:"deploy_custom_function_project",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"},Ke={CSV:".csv",JSON:".json"},ye={AWS_ACCESS_KEY:"aws_access_key_id",AWS_SECRET:"aws_secret_access_key",AWS_BUCKET:"bucket",AWS_FILE_KEY:"key"},Ve={SELECT:"select",INSERT:"insert",UPDATE:"update",DELETE:"delete"},i={};i[e.CREATE_SCHEMA]=e.CREATE_SCHEMA;i[e.CREATE_TABLE]=e.CREATE_TABLE;i[e.CREATE_ATTRIBUTE]=e.CREATE_ATTRIBUTE;i[e.INSERT]=e.INSERT;i[e.UPDATE]=e.UPDATE;i[e.UPSERT]=e.UPSERT;i[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;var we={RUN:"run",INSTALL:"install",REGISTER:"register",STOP:"stop",RESTART:"restart",VERSION:"version",UPGRADE:"upgrade"},ke={point:"point",lineString:"lineString",multiLineString:"multiLineString",multiPoint:"multiPoint",multiPolygon:"multiPolygon",polygon:"polygon"},Q={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",IPC_SERVER_PORT:"IPC_SERVER_PORT",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"},Ye=q.invert(Q),_={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_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",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",HTTP_THREADS:"http_threads",IPC_NETWORK_PORT:"ipc_network_port",LOCALSTUDIO_ENABLED:"localStudio_enabled",LOGGING_FILE:"logging_file",LOGGING_LEVEL:"logging_level",LOGGING_ROOT:"logging_root",LOGGING_ROTATION_COMPRESS:"logging_rotation_compress",LOGGING_ROTATION_DATEFORMAT:"logging_rotation_dateFormat",LOGGING_ROTATION_MAXSIZE:"logging_rotation_maxSize",LOGGING_ROTATION_RETAIN:"logging_rotation_retain",LOGGING_ROTATION_ROTATE:"logging_rotation_rotate",LOGGING_ROTATION_ROTATEINTERVAL:"logging_rotation_rotateInterval",LOGGING_ROTATION_ROTATEMODULE:"logging_rotation_rotateModule",LOGGING_ROTATION_TIMEZONE:"logging_rotation_timezone",LOGGING_ROTATION_WORKERINTERVAL:"logging_rotation_workerInterval",LOGGING_STDSTREAMS:"logging_stdStreams",LOGGING_AUDITLOG:"logging_auditLog",OPERATIONSAPI_AUTHENTICATION_OPERATIONTOKENTIMEOUT:"operationsApi_authentication_operationTokenTimeout",OPERATIONSAPI_AUTHENTICATION_REFRESHTOKENTIMEOUT:"operationsApi_authentication_refreshTokenTimeout",OPERATIONSAPI_FOREGROUND:"operationsApi_foreground",OPERATIONSAPI_TLS_CERTIFICATE:"operationsApi_tls_certificate",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_TLS_PRIVATEKEY:"operationsApi_tls_privateKey",OPERATIONSAPI_TLS_CERT_AUTH:"operationsApi_tls_certificateAuthority",OPERATIONSAPI_NETWORK_TIMEOUT:"operationsApi_network_timeout",OPERATIONSAPI_NODEENV:"operationsApi_nodeEnv",ROOTPATH:"rootPath",STORAGE_WRITEASYNC:"storage_writeAsync",STORAGE_OVERLAPPINGSYNC:"storage_overlappingSync"},We={hdb_root_key:_.ROOTPATH,hdb_root:_.ROOTPATH,server_port_key:_.OPERATIONSAPI_NETWORK_PORT,server_port:_.OPERATIONSAPI_NETWORK_PORT,cert_key:_.OPERATIONSAPI_TLS_CERTIFICATE,certificate:_.OPERATIONSAPI_TLS_CERTIFICATE,private_key_key:_.OPERATIONSAPI_TLS_PRIVATEKEY,private_key:_.OPERATIONSAPI_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,log_daily_rotate:_.LOGGING_ROTATION_ROTATE,log_rotate:_.LOGGING_ROTATION_ROTATE,log_rotate_max_size:_.LOGGING_ROTATION_MAXSIZE,log_rotate_retain:_.LOGGING_ROTATION_RETAIN,log_rotate_compress:_.LOGGING_ROTATION_COMPRESS,log_rotate_date_format:_.LOGGING_ROTATION_DATEFORMAT,log_rotate_rotate_module:_.LOGGING_ROTATION_ROTATEMODULE,log_rotate_worker_interval:_.LOGGING_ROTATION_WORKERINTERVAL,log_rotate_rotate_interval:_.LOGGING_ROTATION_ROTATEINTERVAL,log_rotate_timezone:_.LOGGING_ROTATION_TIMEZONE,props_env_key:_.OPERATIONSAPI_NODEENV,node_env:_.OPERATIONSAPI_NODEENV,clustering_node_name_key:_.CLUSTERING_NODENAME,node_name:_.CLUSTERING_NODENAME,clustering_enabled_key:_.CLUSTERING_ENABLED,clustering:_.CLUSTERING_ENABLED,max_http_threads:_.HTTP_THREADS,max_hdb_processes:_.HTTP_THREADS,server_timeout_key:_.OPERATIONSAPI_NETWORK_TIMEOUT,server_timeout_ms:_.OPERATIONSAPI_NETWORK_TIMEOUT,server_keep_alive_timeout_key:_.OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT,server_keep_alive_timeout:_.OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT,server_headers_timeout_key:_.OPERATIONSAPI_NETWORK_HEADERSTIMEOUT,server_headers_timeout:_.OPERATIONSAPI_NETWORK_HEADERSTIMEOUT,disable_transaction_log_key:_.LOGGING_AUDITLOG,disable_transaction_log:_.LOGGING_AUDITLOG,operation_token_timeout_key:_.OPERATIONSAPI_AUTHENTICATION_OPERATIONTOKENTIMEOUT,operation_token_timeout:_.OPERATIONSAPI_AUTHENTICATION_OPERATIONTOKENTIMEOUT,refresh_token_timeout_key:_.OPERATIONSAPI_AUTHENTICATION_REFRESHTOKENTIMEOUT,refresh_token_timeout:_.OPERATIONSAPI_AUTHENTICATION_REFRESHTOKENTIMEOUT,ipc_server_port:_.IPC_NETWORK_PORT,custom_functions_enabled_key:_.CUSTOMFUNCTIONS_ENABLED,custom_functions:_.CUSTOMFUNCTIONS_ENABLED,custom_functions_port_key:_.CUSTOMFUNCTIONS_NETWORK_PORT,custom_functions_port:_.CUSTOMFUNCTIONS_NETWORK_PORT,custom_functions_directory_key:_.CUSTOMFUNCTIONS_ROOT,custom_functions_directory:_.CUSTOMFUNCTIONS_ROOT,max_custom_function_processes:_.HTTP_THREADS,log_to_file:_.LOGGING_FILE,log_to_stdstreams:_.LOGGING_STDSTREAMS,run_in_foreground:_.OPERATIONSAPI_FOREGROUND,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_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,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_certificateauthority:_.CUSTOMFUNCTIONS_TLS_CERT_AUTH,customfunctions_network_timeout:_.CUSTOMFUNCTIONS_NETWORK_TIMEOUT,customfunctions_nodeenv:_.CUSTOMFUNCTIONS_NODEENV,http_threads:_.HTTP_THREADS,customfunctions_processes:_.HTTP_THREADS,customfunctions_root:_.CUSTOMFUNCTIONS_ROOT,ipc_network_port:_.IPC_NETWORK_PORT,localstudio_enabled:_.LOCALSTUDIO_ENABLED,logging_file:_.LOGGING_FILE,logging_level:_.LOGGING_LEVEL,logging_root:_.LOGGING_ROOT,logging_rotation_compress:_.LOGGING_ROTATION_COMPRESS,logging_rotation_dateformat:_.LOGGING_ROTATION_DATEFORMAT,logging_rotation_maxsize:_.LOGGING_ROTATION_MAXSIZE,logging_rotation_retain:_.LOGGING_ROTATION_RETAIN,logging_rotation_rotate:_.LOGGING_ROTATION_ROTATE,logging_rotation_rotateinterval:_.LOGGING_ROTATION_ROTATEINTERVAL,logging_rotation_rotatemodule:_.LOGGING_ROTATION_ROTATEMODULE,logging_rotation_timezone:_.LOGGING_ROTATION_TIMEZONE,logging_rotation_workerinterval:_.LOGGING_ROTATION_WORKERINTERVAL,logging_stdstreams:_.LOGGING_STDSTREAMS,logging_auditlog:_.LOGGING_AUDITLOG,operationsapi_authentication_operationtokentimeout:_.OPERATIONSAPI_AUTHENTICATION_OPERATIONTOKENTIMEOUT,operationsapi_authentication_refreshtokentimeout:_.OPERATIONSAPI_AUTHENTICATION_REFRESHTOKENTIMEOUT,operationsapi_foreground:_.OPERATIONSAPI_FOREGROUND,operationsapi_tls_certificate:_.OPERATIONSAPI_TLS_CERTIFICATE,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_tls_privatekey:_.OPERATIONSAPI_TLS_PRIVATEKEY,operationsapi_tls_certificateauthority:_.OPERATIONSAPI_TLS_CERT_AUTH,operationsapi_network_timeout:_.OPERATIONSAPI_NETWORK_TIMEOUT,operationsapi_nodeenv:_.OPERATIONSAPI_NODEENV,operationsapi_root:_.ROOTPATH,rootpath:_.ROOTPATH,storage_writeasync:_.STORAGE_WRITEASYNC,storage_overlappingsync:_.STORAGE_OVERLAPPINGSYNC},je={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"},xe={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"},$e={BIDIRECTIONAL:"BIDIRECTIONAL",OUTBOUND:"OUTBOUND",INBOUND:"INBOUND"},Xe={FILE_SYSTEM:"fs",LMDB:"lmdb"},Je={API_CALL_DEFAULT:1e4,VERSION_DEFAULT:"2.2.0"},qe={DEVELOPMENT:8192,DEFAULT:512},Qe={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"},ze={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"},Ze={ENOENT:"ENOENT",EACCES:"EACCES"},z={CREATED_TIME:"__createdtime__",UPDATED_TIME:"__updatedtime__"},_E="__clustering__",eE=Object.values(z),EE=15984864e5,Z={LESS:"<",LESS_OR_EQ:"<=",GREATER:">",GREATER_OR_EQ:">=",BETWEEN:"..."},tE=q.invert(Z),TE={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"},oE=111,rE=`\r
|
|
2
|
-
`,sE={READ:"read",INSERT:"insert",UPDATE:"update",DELETE:"delete"},nE=["*","%"],OE="unauthorized_access",RE="func_val",SE={HASH_VALUE:"hash_value",TIMESTAMP:"timestamp",USERNAME:"username"},iE={JWT_PRIVATE_KEY_NAME:".jwtPrivate.key",JWT_PUBLIC_KEY_NAME:".jwtPublic.key",JWT_PASSPHRASE_NAME:".jwtPass"},AE="hdb_ipc_server",NE="hdb_ipc_client_",cE={RESTART:"restart",CHILD_STARTED:"child_started",CHILD_STOPPED:"child_stopped",SCHEMA:"schema",USER:"user",CLUSTER_STATUS_RESPONSE:"cluster_status_response",CLUSTER_STATUS_REQUEST:"cluster_status_request"},aE={HDB_CORE:"hdb_core",CUSTOM_FUNCTIONS:"custom_functions"},IE={STOPPED:"stopped",ONLINE:"online"},lE="3.x.x";__.exports={LOCAL_HARPERDB_OPERATIONS:t,HDB_SUPPORT_ADDRESS:x,HDB_SUPPORT_URL:X,HDB_PRICING_URL:w_,SUPPORT_HELP_MSG:k_,LICENSE_HELP_MSG:J,HDB_PROC_NAME:Y,HDB_PROC_DESCRIPTOR:B,CLUSTERING_LEAF_PROC_DESCRIPTOR:p,CLUSTERING_HUB_PROC_DESCRIPTOR:d,SYSTEM_SCHEMA_NAME:se,HASH_FOLDER_NAME:ne,HDB_HOME_DIR_NAME:Oe,UPDATE_FILE_NAME:Ae,LICENSE_KEY_DIR_NAME:Se,BOOT_PROPS_FILE_NAME:ie,JOB_TYPE_ENUM:je,JOB_STATUS_ENUM:ve,SYSTEM_TABLE_NAMES:he,SYSTEM_TABLE_HASH_ATTRIBUTES:He,OPERATIONS_ENUM:e,VALID_S3_FILE_TYPES:Ke,S3_BUCKET_AUTH_KEYS:ye,VALID_SQL_OPS_ENUM:Ve,GEO_CONVERSION_ENUM:ke,HDB_SETTINGS_NAMES:Q,HDB_SETTINGS_NAMES_REVERSE_LOOKUP:Ye,SERVICE_ACTIONS_ENUM:we,CLUSTER_MESSAGE_TYPE_ENUM:xe,CLUSTER_CONNECTION_DIRECTION_ENUM:$e,CLUSTER_EVENTS_DEFS_ENUM:Qe,PERIOD_REGEX:J_,DOUBLE_PERIOD_REGEX:q_,UNICODE_PERIOD:Q_,FORWARD_SLASH_REGEX:z_,UNICODE_FORWARD_SLASH:Z_,ESCAPED_FORWARD_SLASH_REGEX:_e,ESCAPED_PERIOD_REGEX:ee,ESCAPED_DOUBLE_PERIOD_REGEX:Ee,REG_KEY_FILE_NAME:fe,RESTART_TIMEOUT_MS:ae,HDB_FILE_PERMISSIONS:Ie,SCHEMA_DIR_NAME:Ue,TRANSACTIONS_DIR_NAME:ue,LIMIT_COUNT_NAME:Le,ID_ATTRIBUTE_STRING:Pe,INSERT_MODULE_ENUM:Me,UPGRADE_JSON_FIELD_NAMES_ENUM:ge,RESTART_CODE:Ne,RESTART_CODE_NUM:ce,CLUSTER_OPERATIONS:i,SYSTEM_DEFAULT_ATTRIBUTE_NAMES:Fe,HDB_INTERNAL_SC_CHANNEL_PREFIX:n,INTERNAL_SC_CHANNELS:Be,CLUSTERING_MESSAGE_TYPES:TE,HDB_FILE_SUFFIX:Re,BLOB_FOLDER_NAME:le,HDB_TRASH_DIR:Ce,ORIGINATOR_SET_VALUE:oE,LICENSE_VALUES:Je,RAM_ALLOCATION_ENUM:qe,STORAGE_TYPES_ENUM:Xe,TIME_STAMP_NAMES_ENUM:z,TIME_STAMP_NAMES:eE,PERMS_UPDATE_RELEASE_TIMESTAMP:EE,SEARCH_NOT_FOUND_MESSAGE:Y_,SEARCH_ATTRIBUTE_NOT_FOUND:W_,LICENSE_ROLE_DENIED_RESPONSE:j_,LICENSE_MAX_CONNS_REACHED:x_,BASIC_LICENSE_MAX_NON_CU_ROLES:$,BASIC_LICENSE_CLUSTER_CONNECTION_LIMIT_WS_ERROR_CODE:V_,VALUE_SEARCH_COMPARATORS:Z,VALUE_SEARCH_COMPARATORS_REVERSE_LOOKUP:tE,LICENSE_FILE_NAME:be,WEBSOCKET_CLOSE_CODE_DESCRIPTION_LOOKUP:ze,NEW_LINE:rE,BASIC_LICENSE_MAX_CLUSTER_USER_ROLES:X_,MOMENT_DAYS_TAG:te,API_TURNOVER_SEC:Te,LOOPBACK:$_,CODE_EXTENSION:I,WILDCARD_SEARCH_VALUE:oe,NODE_ERROR_CODES:Ze,JAVASCRIPT_EXTENSION:k,PERMS_CRUD_ENUM:sE,UNAUTHORIZED_PERMISSION_NAME:OE,SEARCH_WILDCARDS:nE,FUNC_VAL:RE,READ_AUDIT_LOG_SEARCH_TYPES_ENUM:SE,JWT_ENUM:iE,CLUSTERING_FLAG:_E,RUN_LOG:pe,INSTALL_LOG:de,IPC_SERVER_MODULE:j,HDB_IPC_SERVER:AE,IPC_EVENT_TYPES:cE,HDB_IPC_CLIENT_PREFIX:NE,CUSTOM_FUNCTION_PROC_NAME:W,CUSTOM_FUNCTION_PROC_DESCRIPTOR:P,SERVICES:aE,MEM_SETTING_KEY:re,HDB_RESTART_SCRIPT:g_,PROCESS_DESCRIPTORS:H,SERVICE_SERVERS:b_,SERVICE_SERVERS_CWD:L,PROCESS_DESCRIPTORS_VALIDATE:F_,LAUNCH_SERVICE_SCRIPTS:v_,LOG_LEVELS:B_,PROCESS_NAME_ENV_PROP:De,PROCESS_LOG_NAMES:H_,PM2_PROCESS_STATUSES:IE,CONFIG_PARAM_MAP:We,CONFIG_PARAMS:_,HDB_CONFIG_FILE:G_,HDB_DEFAULT_CONFIG_FILE:m_,ROLE_TYPES_ENUM:K_,BOOT_PROP_PARAMS:Ge,INSTALL_PROMPTS:me,HDB_ROOT_DIR_NAME:M_,CLUSTERING_PROCESSES:f_,FOREGROUND_PID_FILE:h_,PACKAGE_ROOT:R,PRE_4_0_0_VERSION:lE}});var E_=u((VE,CE)=>{CE.exports={name:"harperdb",version:"4.0.5",description:"HarperDB is a distributed SQL & NoSQL data platform focused on speed, flexibility, and ease of use.",keywords:["database","sql","nosql","api","distributed","cloud","enterprise","Fastify","NATS"],main:"harperdb.js",bin:{harperdb:"./bin/harperdb.js"},engines:{node:">=14.0.0","preferred-node":"18.13.0","go-lang":"1.19.3","nats-server":"2.9.8"},homepage:"https://www.harperdb.io/",bugs:"support@harperdb.io",author:{name:"HarperDB",email:"support@harperdb.io"},license:"See License in ./license/Community+Edition+and+Evaluation+End+User+License+Agreement.pdf",scripts:{submodules:"git submodule update --init --recursive",build:"eslint -c ./.eslintbuild bin/ data_layer/ security/ server/ sqlTranslator/ upgrade/ utility/ validation/",pretty:"eslint --fix bin/ data_layer/ security/ server/ sqlTranslator/ upgrade/ utility/ validation/",test:"rimraf ./.nyc_output/* && node utility/devops/register.js --reset_license --storage_type=lmdb && npm run cover:upgrade && npm run cover:nats && npm run cover:cfserver && npm run cover:lmdbbridge && npm run cover:lmdbutility && npm run cover:hdbserver && npm run cover:main && nyc merge .nyc_output coverage.json && node ./utility/devops/register.js --reset_license --storage_type=lmdb","cover:main":"cd bin/ && nyc --no-clean --reporter=lcovonly ../node_modules/mocha/bin/_mocha '../unitTests/**/*.js' --config '../unitTests/.mocharc-main.json'","cover:lmdbbridge":"cd bin/ && nyc --no-clean --reporter=lcovonly --retries 3 ../node_modules/mocha/bin/_mocha '../unitTests/data_layer/harperBridge/lmdbBridge/**/*.js' --parallel --config '../unitTests/.mocharc.json'","cover:lmdbutility":"cd bin/ && nyc --no-clean --reporter=lcovonly --retries 3 ../node_modules/mocha/bin/_mocha '../unitTests/utility/lmdb/**/*.js' --parallel --config '../unitTests/.mocharc.json'","cover:hdbserver":"cd bin/ && nyc --no-clean --reporter=lcovonly ../node_modules/mocha/bin/_mocha '../unitTests/server/harperdb/hdbServer-test.js' --parallel --config '../unitTests/.mocharc.json'","cover:cfserver":"npm run submodules && cd bin/ && nyc --no-clean --reporter=lcovonly ../node_modules/mocha/bin/_mocha '../unitTests/server/customFunctions/customFunctionsServer-test.js' --config '../unitTests/.mocharc.json'","cover:nats":"cd bin/ && nyc --no-clean --reporter=lcovonly ../node_modules/mocha/bin/_mocha '../unitTests/server/nats/**/*.js' --config '../unitTests/.mocharc.json'","cover:upgrade":"cd bin/ && nyc --no-clean --reporter=lcovonly ../node_modules/mocha/bin/_mocha '../unitTests/upgrade/**/*.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/data_layer/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:{"@fastify/accepts-serializer":"5.1.0","@fastify/autoload":"5.4.0","@fastify/compress":"6.1.1","@fastify/cors":"8.1.0","@fastify/static":"6.5.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:"1.7.4",async:"3.2.3","aws-sdk":"2.1096.0",chalk:"4.1.2","cli-progress":"3.10.0",clone:"2.1.2",esbuild:"^0.14.49","fast-glob":"3.2.11",fastify:"4.8.1","fastify-plugin":"4.2.1","fill-range":"7.0.1","fs-extra":"10.0.1","human-readable-ids":"1.0.4",inquirer:"8.2.2","is-number":"7.0.0",joi:"17.6.0",json2csv:"5.0.7",jsonata:"1.8.6",jsonwebtoken:"8.5.1",lmdb:"2.7.6",lodash:"4.17.21",mathjs:"10.4.0",microtime:"3.1.1",minimist:"1.2.6",mkcert:"1.5.0",moment:"2.29.4",msgpackr:"1.8.2",nats:"2.9.2",needle:"3.1.0","node-ipc":"9.1.4","node-stream-zip":"1.15.0","normalize-path":"^3.0.0",ora:"5.4.1","ordered-binary":"1.3.0",papaparse:"5.3.2",passport:"0.6.0","passport-http":"0.3.0","passport-local":"1.0.0",pino:"8.3.1",pm2:"5.2.0",prompt:"1.2.2","properties-reader":"2.2.0","recursive-iterator":"3.3.0",semver:"7.3.5","stream-chain":"2.2.5","stream-json":"1.7.4",systeminformation:"5.12.4","tar-fs":"2.1.1","truncate-utf8-bytes":"1.0.2",ulidx:"0.3.0",uuid:"9.0.0","validate.js":"0.11.1",yaml:"1.10.2"},devDependencies:{axios:"0.27.2",chai:"4.3.4","chai-integer":"0.1.0",eslint:"8.22.0","eslint-config-prettier":"8.3.0","eslint-plugin-prettier":"3.4.1","eslint-plugin-radar":"0.2.1","hook-std":"2.0.0","intercept-stdout":"0.1.2",mocha:"8.3.2","mocha-teamcity-reporter":"3.0.0","mock-require":"3.0.3","mock-stdin":"1.0.0",newman:"5.2.3","newman-reporter-html":"1.0.5","newman-reporter-htmlextra":"1.21.0","newman-reporter-teamcity":"0.1.11","node-fetch":"2.6.7",nyc:"15.1.0",prettier:"2.3.2",rewire:"5.0.0",rimraf:"3.0.2",sinon:"10.0.0","sinon-chai":"3.7.0"},overrides:{"eslint-plugin-radar":{eslint:"8.22.0"},"newman-reporter-html":{newman:"5.2.3"}}}});var O_=u((wE,n_)=>{"use strict";var N=require("fs-extra"),A=require("path"),r=require("chalk"),UE=require("needle"),t_=require("node-stream-zip"),T_=require("semver"),c=w(),uE=require("util"),LE=require("child_process"),{platform:PE}=require("os"),dE=uE.promisify(LE.exec),{PACKAGE_ROOT:pE}=e_(),S=A.join(pE,"dependencies"),DE=A.join(S,c.NATS_SERVER_ZIP),o_=E_(),D=o_.engines["go-lang"],C=o_.engines[c.NATS_SERVER_NAME],GE=`${process.platform}-${process.arch}`,G=A.join(S,GE,`${c.NATS_BINARY_NAME}`),mE=`https://github.com/nats-io/nats-server/releases/download/v${C}/nats-server-v${C}-`,r_={"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"},ME=Object.keys(r_).map(E=>E.split("-"));async function l(E,T=void 0){let{stdout:o,stderr:a}=await dE(E,{cwd:T});if(a)throw new Error(a.replace(`
|
|
2
|
+
`,sE={READ:"read",INSERT:"insert",UPDATE:"update",DELETE:"delete"},nE=["*","%"],OE="unauthorized_access",RE="func_val",SE={HASH_VALUE:"hash_value",TIMESTAMP:"timestamp",USERNAME:"username"},iE={JWT_PRIVATE_KEY_NAME:".jwtPrivate.key",JWT_PUBLIC_KEY_NAME:".jwtPublic.key",JWT_PASSPHRASE_NAME:".jwtPass"},AE="hdb_ipc_server",NE="hdb_ipc_client_",cE={RESTART:"restart",CHILD_STARTED:"child_started",CHILD_STOPPED:"child_stopped",SCHEMA:"schema",USER:"user",CLUSTER_STATUS_RESPONSE:"cluster_status_response",CLUSTER_STATUS_REQUEST:"cluster_status_request"},aE={HDB_CORE:"hdb_core",CUSTOM_FUNCTIONS:"custom_functions"},IE={STOPPED:"stopped",ONLINE:"online"},lE="3.x.x";__.exports={LOCAL_HARPERDB_OPERATIONS:t,HDB_SUPPORT_ADDRESS:x,HDB_SUPPORT_URL:X,HDB_PRICING_URL:w_,SUPPORT_HELP_MSG:k_,LICENSE_HELP_MSG:J,HDB_PROC_NAME:Y,HDB_PROC_DESCRIPTOR:B,CLUSTERING_LEAF_PROC_DESCRIPTOR:p,CLUSTERING_HUB_PROC_DESCRIPTOR:d,SYSTEM_SCHEMA_NAME:se,HASH_FOLDER_NAME:ne,HDB_HOME_DIR_NAME:Oe,UPDATE_FILE_NAME:Ae,LICENSE_KEY_DIR_NAME:Se,BOOT_PROPS_FILE_NAME:ie,JOB_TYPE_ENUM:je,JOB_STATUS_ENUM:ve,SYSTEM_TABLE_NAMES:he,SYSTEM_TABLE_HASH_ATTRIBUTES:He,OPERATIONS_ENUM:e,VALID_S3_FILE_TYPES:Ke,S3_BUCKET_AUTH_KEYS:ye,VALID_SQL_OPS_ENUM:Ve,GEO_CONVERSION_ENUM:ke,HDB_SETTINGS_NAMES:Q,HDB_SETTINGS_NAMES_REVERSE_LOOKUP:Ye,SERVICE_ACTIONS_ENUM:we,CLUSTER_MESSAGE_TYPE_ENUM:xe,CLUSTER_CONNECTION_DIRECTION_ENUM:$e,CLUSTER_EVENTS_DEFS_ENUM:Qe,PERIOD_REGEX:J_,DOUBLE_PERIOD_REGEX:q_,UNICODE_PERIOD:Q_,FORWARD_SLASH_REGEX:z_,UNICODE_FORWARD_SLASH:Z_,ESCAPED_FORWARD_SLASH_REGEX:_e,ESCAPED_PERIOD_REGEX:ee,ESCAPED_DOUBLE_PERIOD_REGEX:Ee,REG_KEY_FILE_NAME:fe,RESTART_TIMEOUT_MS:ae,HDB_FILE_PERMISSIONS:Ie,SCHEMA_DIR_NAME:Ue,TRANSACTIONS_DIR_NAME:ue,LIMIT_COUNT_NAME:Le,ID_ATTRIBUTE_STRING:Pe,INSERT_MODULE_ENUM:Me,UPGRADE_JSON_FIELD_NAMES_ENUM:ge,RESTART_CODE:Ne,RESTART_CODE_NUM:ce,CLUSTER_OPERATIONS:i,SYSTEM_DEFAULT_ATTRIBUTE_NAMES:Fe,HDB_INTERNAL_SC_CHANNEL_PREFIX:n,INTERNAL_SC_CHANNELS:Be,CLUSTERING_MESSAGE_TYPES:TE,HDB_FILE_SUFFIX:Re,BLOB_FOLDER_NAME:le,HDB_TRASH_DIR:Ce,ORIGINATOR_SET_VALUE:oE,LICENSE_VALUES:Je,RAM_ALLOCATION_ENUM:qe,STORAGE_TYPES_ENUM:Xe,TIME_STAMP_NAMES_ENUM:z,TIME_STAMP_NAMES:eE,PERMS_UPDATE_RELEASE_TIMESTAMP:EE,SEARCH_NOT_FOUND_MESSAGE:Y_,SEARCH_ATTRIBUTE_NOT_FOUND:W_,LICENSE_ROLE_DENIED_RESPONSE:j_,LICENSE_MAX_CONNS_REACHED:x_,BASIC_LICENSE_MAX_NON_CU_ROLES:$,BASIC_LICENSE_CLUSTER_CONNECTION_LIMIT_WS_ERROR_CODE:V_,VALUE_SEARCH_COMPARATORS:Z,VALUE_SEARCH_COMPARATORS_REVERSE_LOOKUP:tE,LICENSE_FILE_NAME:be,WEBSOCKET_CLOSE_CODE_DESCRIPTION_LOOKUP:ze,NEW_LINE:rE,BASIC_LICENSE_MAX_CLUSTER_USER_ROLES:X_,MOMENT_DAYS_TAG:te,API_TURNOVER_SEC:Te,LOOPBACK:$_,CODE_EXTENSION:I,WILDCARD_SEARCH_VALUE:oe,NODE_ERROR_CODES:Ze,JAVASCRIPT_EXTENSION:k,PERMS_CRUD_ENUM:sE,UNAUTHORIZED_PERMISSION_NAME:OE,SEARCH_WILDCARDS:nE,FUNC_VAL:RE,READ_AUDIT_LOG_SEARCH_TYPES_ENUM:SE,JWT_ENUM:iE,CLUSTERING_FLAG:_E,RUN_LOG:pe,INSTALL_LOG:de,IPC_SERVER_MODULE:j,HDB_IPC_SERVER:AE,IPC_EVENT_TYPES:cE,HDB_IPC_CLIENT_PREFIX:NE,CUSTOM_FUNCTION_PROC_NAME:W,CUSTOM_FUNCTION_PROC_DESCRIPTOR:P,SERVICES:aE,MEM_SETTING_KEY:re,HDB_RESTART_SCRIPT:g_,PROCESS_DESCRIPTORS:H,SERVICE_SERVERS:b_,SERVICE_SERVERS_CWD:L,PROCESS_DESCRIPTORS_VALIDATE:F_,LAUNCH_SERVICE_SCRIPTS:v_,LOG_LEVELS:B_,PROCESS_NAME_ENV_PROP:De,PROCESS_LOG_NAMES:H_,PM2_PROCESS_STATUSES:IE,CONFIG_PARAM_MAP:We,CONFIG_PARAMS:_,HDB_CONFIG_FILE:G_,HDB_DEFAULT_CONFIG_FILE:m_,ROLE_TYPES_ENUM:K_,BOOT_PROP_PARAMS:Ge,INSTALL_PROMPTS:me,HDB_ROOT_DIR_NAME:M_,CLUSTERING_PROCESSES:f_,FOREGROUND_PID_FILE:h_,PACKAGE_ROOT:R,PRE_4_0_0_VERSION:lE}});var E_=u((VE,CE)=>{CE.exports={name:"harperdb",version:"4.0.6",description:"HarperDB is a distributed SQL & NoSQL data platform focused on speed, flexibility, and ease of use.",keywords:["database","sql","nosql","api","distributed","cloud","enterprise","Fastify","NATS"],main:"harperdb.js",bin:{harperdb:"./bin/harperdb.js"},engines:{node:">=14.0.0","preferred-node":"18.13.0","go-lang":"1.19.3","nats-server":"2.9.8"},homepage:"https://www.harperdb.io/",bugs:"support@harperdb.io",author:{name:"HarperDB",email:"support@harperdb.io"},license:"See License in ./license/Community+Edition+and+Evaluation+End+User+License+Agreement.pdf",scripts:{submodules:"git submodule update --init --recursive",build:"eslint -c ./.eslintbuild bin/ data_layer/ security/ server/ sqlTranslator/ upgrade/ utility/ validation/",pretty:"eslint --fix bin/ data_layer/ security/ server/ sqlTranslator/ upgrade/ utility/ validation/",test:"rimraf ./.nyc_output/* && node utility/devops/register.js --reset_license --storage_type=lmdb && npm run cover:upgrade && npm run cover:nats && npm run cover:cfserver && npm run cover:lmdbbridge && npm run cover:lmdbutility && npm run cover:hdbserver && npm run cover:main && nyc merge .nyc_output coverage.json && node ./utility/devops/register.js --reset_license --storage_type=lmdb","cover:main":"cd bin/ && nyc --no-clean --reporter=lcovonly ../node_modules/mocha/bin/_mocha '../unitTests/**/*.js' --config '../unitTests/.mocharc-main.json'","cover:lmdbbridge":"cd bin/ && nyc --no-clean --reporter=lcovonly --retries 3 ../node_modules/mocha/bin/_mocha '../unitTests/data_layer/harperBridge/lmdbBridge/**/*.js' --parallel --config '../unitTests/.mocharc.json'","cover:lmdbutility":"cd bin/ && nyc --no-clean --reporter=lcovonly --retries 3 ../node_modules/mocha/bin/_mocha '../unitTests/utility/lmdb/**/*.js' --parallel --config '../unitTests/.mocharc.json'","cover:hdbserver":"cd bin/ && nyc --no-clean --reporter=lcovonly ../node_modules/mocha/bin/_mocha '../unitTests/server/harperdb/hdbServer-test.js' --parallel --config '../unitTests/.mocharc.json'","cover:cfserver":"npm run submodules && cd bin/ && nyc --no-clean --reporter=lcovonly ../node_modules/mocha/bin/_mocha '../unitTests/server/customFunctions/customFunctionsServer-test.js' --config '../unitTests/.mocharc.json'","cover:nats":"cd bin/ && nyc --no-clean --reporter=lcovonly ../node_modules/mocha/bin/_mocha '../unitTests/server/nats/**/*.js' --config '../unitTests/.mocharc.json'","cover:upgrade":"cd bin/ && nyc --no-clean --reporter=lcovonly ../node_modules/mocha/bin/_mocha '../unitTests/upgrade/**/*.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/data_layer/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:{"@fastify/accepts-serializer":"5.1.0","@fastify/autoload":"5.4.0","@fastify/compress":"6.1.1","@fastify/cors":"8.1.0","@fastify/static":"6.5.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:"1.7.4",async:"3.2.3","aws-sdk":"2.1096.0",chalk:"4.1.2","cli-progress":"3.10.0",clone:"2.1.2",esbuild:"^0.14.49","fast-glob":"3.2.11",fastify:"4.8.1","fastify-plugin":"4.2.1","fill-range":"7.0.1","fs-extra":"10.0.1","human-readable-ids":"1.0.4",inquirer:"8.2.2","is-number":"7.0.0",joi:"17.6.0",json2csv:"5.0.7",jsonata:"1.8.6",jsonwebtoken:"8.5.1",lmdb:"2.7.6",lodash:"4.17.21",mathjs:"10.4.0",microtime:"3.1.1",minimist:"1.2.6",mkcert:"1.5.0",moment:"2.29.4",msgpackr:"1.8.5",nats:"2.9.2",needle:"3.1.0","node-ipc":"9.1.4","node-stream-zip":"1.15.0","normalize-path":"^3.0.0",ora:"5.4.1","ordered-binary":"1.3.0",papaparse:"5.3.2",passport:"0.6.0","passport-http":"0.3.0","passport-local":"1.0.0",pino:"8.3.1",pm2:"5.2.0",prompt:"1.2.2","properties-reader":"2.2.0","recursive-iterator":"3.3.0",semver:"7.3.5","stream-chain":"2.2.5","stream-json":"1.7.4",systeminformation:"5.12.4","tar-fs":"2.1.1","truncate-utf8-bytes":"1.0.2",ulidx:"0.3.0",uuid:"9.0.0","validate.js":"0.11.1",yaml:"1.10.2"},devDependencies:{axios:"0.27.2",chai:"4.3.4","chai-integer":"0.1.0",eslint:"8.22.0","eslint-config-prettier":"8.3.0","eslint-plugin-prettier":"3.4.1","eslint-plugin-radar":"0.2.1","hook-std":"2.0.0","intercept-stdout":"0.1.2",mocha:"8.3.2","mocha-teamcity-reporter":"3.0.0","mock-require":"3.0.3","mock-stdin":"1.0.0",newman:"5.2.3","newman-reporter-html":"1.0.5","newman-reporter-htmlextra":"1.21.0","newman-reporter-teamcity":"0.1.11","node-fetch":"2.6.7",nyc:"15.1.0",prettier:"2.3.2",rewire:"5.0.0",rimraf:"3.0.2",sinon:"10.0.0","sinon-chai":"3.7.0"},overrides:{"eslint-plugin-radar":{eslint:"8.22.0"},lmdb:{msgpackr:"1.8.5"},"newman-reporter-html":{newman:"5.2.3"}}}});var O_=u((wE,n_)=>{"use strict";var N=require("fs-extra"),A=require("path"),r=require("chalk"),UE=require("needle"),t_=require("node-stream-zip"),T_=require("semver"),c=w(),uE=require("util"),LE=require("child_process"),{platform:PE}=require("os"),dE=uE.promisify(LE.exec),{PACKAGE_ROOT:pE}=e_(),S=A.join(pE,"dependencies"),DE=A.join(S,c.NATS_SERVER_ZIP),o_=E_(),D=o_.engines["go-lang"],C=o_.engines[c.NATS_SERVER_NAME],GE=`${process.platform}-${process.arch}`,G=A.join(S,GE,`${c.NATS_BINARY_NAME}`),mE=`https://github.com/nats-io/nats-server/releases/download/v${C}/nats-server-v${C}-`,r_={"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"},ME=Object.keys(r_).map(E=>E.split("-"));async function l(E,T=void 0){let{stdout:o,stderr:a}=await dE(E,{cwd:T});if(a)throw new Error(a.replace(`
|
|
3
3
|
`,""));return o.replace(`
|
|
4
4
|
`,"")}O(l,"runCommand");async function gE(){try{await N.access(G)}catch{return!1}let E=await l(`${G} --version`,void 0),T=E.substring(E.lastIndexOf("v")+1,E.length);return T_.eq(T,C)}O(gE,"checkNATSServerInstalled");async function hE(){console.log(r.green(`Verifying go v${D} is on system.`));let E;try{E=(await l("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(!T_.gte(E,D))throw Error(`go version ${D} or higher must be installed.`);console.log(r.green(`go v${D} is on the system.`))}O(hE,"checkGoVersion");async function HE(){console.log(r.green("Extracting NATS Server source code."));let E=new t_.async({file:DE}),T=A.join(S,`${c.NATS_SERVER_NAME}-src`),o=await E.extract(null,S);return console.log(r.green(`Extracted ${o} entries.`)),await E.close(),T}O(HE,"extractNATSServer");async function BE(E){let T=A.join(E,c.NATS_BINARY_NAME),o=A.join(S,"pkg");await N.move(T,G,{overwrite:!0}),await N.remove(E),await N.remove(o)}O(BE,"cleanUp");async function s_(E,T){let o=E&&T?`${E}-${T}`:`${process.platform}-${process.arch}`,a=r_[o];if(a===void 0)throw Error(`unknown platform - architecture: ${o}`);let b=`${mE}${a}`,U=A.join(S,o,a);await N.ensureFile(U),console.log(r.green(`****Downloading install of NATS Server: ${b}****`)),await UE("get",b,{output:U,follow_max:5}),console.log(r.green("Successfully downloaded and saved nats-server zip.")),console.log(r.green("Extracting nats-server zip."));let m=new t_.async({file:U}),R_=await m.entries(),v=E==="win32"||process.platform==="win32"?`${c.NATS_SERVER_NAME}.exe`:c.NATS_SERVER_NAME,K=A.join(S,o,v);for(let M of Object.values(R_))!M.isDirectory&&M.name.endsWith(v)&&(await m.extract(M.name,K),console.log(r.green("Successfully extracted nats-server zip.")));await m.close(),await N.remove(U),await N.chmod(K,511)}O(s_,"downloadNATSServer");async function FE(){if(console.log(r.green("****Starting install of NATS Server.****")),await gE()){console.log(r.green(`****NATS Server v${C} installed.****`));return}try{await s_();let o=await l(`${G} --version`,void 0);console.log(r.green(`****Successfully extracted ${o}.****`));return}catch(o){console.error(r.red(`Error: ${o.message}. Failed to download NATS server. Building from source`))}try{await hE()}catch(o){console.error(r.red(o.message)),process.exit(1)}let T=await HE();console.log(r.green("Building NATS Server binary.")),PE()=="win32"?await l(`set GOPATH=${S}&& go build`,T):await l(`export GOPATH=${S} && go build`,T),console.log(r.green("Building NATS Server binary complete.")),await BE(T),console.log(r.green(`****NATS Server v${C} is installed.****`))}O(FE,"installer");n_.exports={installer:FE,downloadNATSServer:s_,ALL_SUPPORTED_PLATFORM_ARCHITECTURES:ME}});var kE=require("fs"),YE=require("path"),fE=O_();(async()=>{try{await fE.installer()}catch(E){console.error(E)}})();
|