@harperfast/harper 5.0.0-alpha.10 → 5.0.0-beta.3
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/bin/BinObjects.js +17 -0
- package/bin/cliOperations.js +157 -0
- package/bin/copyDb.ts +280 -0
- package/bin/harper.js +156 -0
- package/bin/install.js +15 -0
- package/bin/lite.js +5 -0
- package/bin/restart.js +201 -0
- package/bin/run.js +409 -0
- package/bin/status.js +65 -0
- package/bin/stop.js +22 -0
- package/bin/upgrade.js +134 -0
- package/components/Application.ts +646 -0
- package/components/ApplicationScope.ts +49 -0
- package/components/Component.ts +53 -0
- package/components/ComponentV1.ts +342 -0
- package/components/DEFAULT_CONFIG.ts +18 -0
- package/components/EntryHandler.ts +227 -0
- package/components/Logger.ts +14 -0
- package/components/OptionsWatcher.ts +354 -0
- package/components/PluginModule.ts +6 -0
- package/components/Scope.ts +329 -0
- package/components/componentLoader.ts +529 -0
- package/components/deriveCommonPatternBase.ts +31 -0
- package/components/deriveGlobOptions.ts +44 -0
- package/components/deriveURLPath.ts +57 -0
- package/components/operations.js +658 -0
- package/components/operationsValidation.js +246 -0
- package/components/packageComponent.ts +39 -0
- package/components/requestRestart.ts +26 -0
- package/components/resolveBaseURLPath.ts +38 -0
- package/components/status/ComponentStatus.ts +110 -0
- package/components/status/ComponentStatusRegistry.ts +251 -0
- package/components/status/api.ts +153 -0
- package/components/status/crossThread.ts +405 -0
- package/components/status/errors.ts +152 -0
- package/components/status/index.ts +44 -0
- package/components/status/internal.ts +65 -0
- package/components/status/registry.ts +12 -0
- package/components/status/types.ts +96 -0
- package/config/RootConfigWatcher.ts +59 -0
- package/config/configHelpers.ts +11 -0
- package/config/configUtils.js +967 -0
- package/config/harperConfigEnvVars.ts +641 -0
- package/dataLayer/CreateAttributeObject.js +25 -0
- package/dataLayer/CreateTableObject.js +11 -0
- package/dataLayer/DataLayerObjects.js +43 -0
- package/dataLayer/DeleteBeforeObject.js +22 -0
- package/dataLayer/DeleteObject.js +25 -0
- package/dataLayer/DropAttributeObject.js +11 -0
- package/dataLayer/GetBackupObject.js +22 -0
- package/dataLayer/InsertObject.js +24 -0
- package/dataLayer/ReadAuditLogObject.js +24 -0
- package/dataLayer/SQLSearch.js +1335 -0
- package/dataLayer/SearchByConditionsObject.js +61 -0
- package/dataLayer/SearchByHashObject.js +21 -0
- package/dataLayer/SearchObject.js +45 -0
- package/dataLayer/SqlSearchObject.js +14 -0
- package/dataLayer/UpdateObject.js +23 -0
- package/dataLayer/UpsertObject.js +23 -0
- package/dataLayer/bulkLoad.js +813 -0
- package/dataLayer/dataObjects/BulkLoadObjects.js +27 -0
- package/dataLayer/dataObjects/UpsertObject.js +23 -0
- package/dataLayer/delete.js +164 -0
- package/dataLayer/export.js +381 -0
- package/dataLayer/getBackup.js +40 -0
- package/dataLayer/harperBridge/BridgeMethods.js +81 -0
- package/dataLayer/harperBridge/ResourceBridge.ts +633 -0
- package/dataLayer/harperBridge/bridgeUtility/insertUpdateReturnObj.js +28 -0
- package/dataLayer/harperBridge/bridgeUtility/insertUpdateValidate.js +88 -0
- package/dataLayer/harperBridge/harperBridge.js +21 -0
- package/dataLayer/harperBridge/lmdbBridge/LMDBBridge.js +119 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.js +19 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateAttribute.js +112 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateRecords.js +67 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateSchema.js +31 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateTable.js +94 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteAuditLogsBefore.js +98 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteRecords.js +89 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropAttribute.js +109 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropSchema.js +107 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropTable.js +137 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbFlush.js +35 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetBackup.js +111 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByHash.js +28 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByValue.js +29 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbReadAuditLog.js +207 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByConditions.js +156 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByHash.js +21 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByValue.js +30 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbTransaction.js +19 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpdateRecords.js +64 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpsertRecords.js +70 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBCreateAttributeObject.js +22 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBDeleteTransactionObject.js +23 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBInsertTransactionObject.js +22 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBTransactionObject.js +23 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpdateTransactionObject.js +24 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpsertTransactionObject.js +24 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.js +25 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializeHashSearch.js +21 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializePaths.js +157 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCheckForNewAttributes.js +94 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCreateTransactionsAuditEnvironment.js +39 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.js +34 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbProcessRows.js +100 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbSearch.js +371 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbWriteTransaction.js +109 -0
- package/dataLayer/hdbInfoController.js +254 -0
- package/dataLayer/insert.js +266 -0
- package/dataLayer/readAuditLog.js +59 -0
- package/dataLayer/schema.js +366 -0
- package/dataLayer/schemaDescribe.js +289 -0
- package/dataLayer/search.js +60 -0
- package/dataLayer/transaction.js +17 -0
- package/dataLayer/update.js +124 -0
- package/dist/components/Logger.d.ts +12 -0
- package/dist/{resources/ResourceInterfaceV2.js → components/Logger.js} +1 -1
- package/dist/components/Logger.js.map +1 -0
- package/dist/components/Scope.d.ts +14 -4
- package/dist/components/Scope.js +18 -10
- package/dist/components/Scope.js.map +1 -1
- package/dist/components/componentLoader.js +17 -10
- package/dist/components/componentLoader.js.map +1 -1
- package/dist/components/operations.js +2 -2
- package/dist/components/operations.js.map +1 -1
- package/dist/config/configUtils.d.ts +1 -1
- package/dist/config/configUtils.js +1 -1
- package/dist/config/configUtils.js.map +1 -1
- package/dist/dataLayer/CreateTableObject.d.ts +2 -2
- package/dist/dataLayer/CreateTableObject.js +2 -2
- package/dist/dataLayer/CreateTableObject.js.map +1 -1
- package/dist/dataLayer/delete.d.ts +1 -1
- package/dist/dataLayer/schema.js +6 -5
- package/dist/dataLayer/schema.js.map +1 -1
- package/dist/dataLayer/schemaDescribe.js +1 -1
- package/dist/dataLayer/schemaDescribe.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/DatabaseTransaction.d.ts +1 -1
- package/dist/resources/IterableEventQueue.d.ts +1 -1
- package/dist/resources/LMDBTransaction.d.ts +5 -1
- package/dist/resources/Resource.d.ts +1 -1
- package/dist/resources/ResourceInterface.d.ts +1 -1
- package/dist/resources/RocksIndexStore.d.ts +3 -3
- package/dist/resources/RocksTransactionLogStore.d.ts +6 -3
- package/dist/resources/Table.d.ts +15 -6
- package/dist/resources/Table.js +12 -4
- package/dist/resources/Table.js.map +1 -1
- package/dist/resources/analytics/read.js +32 -22
- package/dist/resources/analytics/read.js.map +1 -1
- package/dist/resources/analytics/write.js +3 -6
- package/dist/resources/analytics/write.js.map +1 -1
- package/dist/resources/auditStore.d.ts +3 -3
- package/dist/resources/blob.d.ts +25 -2
- package/dist/resources/databases.d.ts +12 -2
- package/dist/resources/databases.js +22 -19
- package/dist/resources/databases.js.map +1 -1
- package/dist/resources/search.js +11 -5
- package/dist/resources/search.js.map +1 -1
- package/dist/resources/transaction.d.ts +2 -1
- package/dist/security/auth.js +1 -1
- package/dist/security/auth.js.map +1 -1
- package/dist/security/cryptoHash.d.ts +2 -2
- package/dist/security/jsLoader.js +265 -73
- package/dist/security/jsLoader.js.map +1 -1
- package/dist/security/keys.js +11 -12
- package/dist/security/keys.js.map +1 -1
- package/dist/security/user.js +3 -3
- package/dist/security/user.js.map +1 -1
- package/dist/server/REST.js +16 -2
- package/dist/server/REST.js.map +1 -1
- package/dist/server/Server.d.ts +2 -1
- package/dist/server/Server.js.map +1 -1
- package/dist/server/fastifyRoutes/plugins/hdbCore.d.ts +6 -1
- package/dist/server/fastifyRoutes.js +2 -0
- package/dist/server/fastifyRoutes.js.map +1 -1
- package/dist/server/http.js +12 -6
- package/dist/server/http.js.map +1 -1
- package/dist/server/jobs/JobObject.d.ts +3 -3
- package/dist/server/loadRootComponents.js +1 -0
- package/dist/server/loadRootComponents.js.map +1 -1
- package/dist/server/operationsServer.js +3 -1
- package/dist/server/operationsServer.js.map +1 -1
- package/dist/server/serverHelpers/JSONStream.d.ts +3 -3
- package/dist/server/serverHelpers/Request.d.ts +5 -5
- package/dist/server/serverHelpers/requestTimePlugin.d.ts +1 -1
- package/dist/server/threads/manageThreads.d.ts +2 -2
- package/dist/server/threads/manageThreads.js +52 -35
- package/dist/server/threads/manageThreads.js.map +1 -1
- package/dist/server/threads/socketRouter.d.ts +1 -1
- package/dist/sqlTranslator/deleteTranslator.d.ts +1 -1
- package/dist/utility/AWS/AWSConnector.d.ts +3 -2
- package/dist/utility/common_utils.d.ts +3 -3
- package/dist/utility/environment/systemInformation.d.ts +1 -0
- package/dist/utility/functions/date/dateFunctions.d.ts +11 -11
- package/dist/utility/globalSchema.d.ts +1 -1
- package/dist/utility/hdbTerms.d.ts +3 -0
- package/dist/utility/hdbTerms.js +3 -0
- package/dist/utility/hdbTerms.js.map +1 -1
- package/dist/utility/installation.d.ts +2 -4
- package/dist/utility/installation.js.map +1 -1
- package/dist/utility/lmdb/commonUtility.d.ts +2 -1
- package/dist/utility/lmdb/commonUtility.js +20 -13
- package/dist/utility/lmdb/commonUtility.js.map +1 -1
- package/dist/utility/lmdb/deleteUtility.d.ts +1 -0
- package/dist/utility/lmdb/environmentUtility.d.ts +1 -0
- package/dist/utility/lmdb/searchUtility.d.ts +2 -1
- package/dist/utility/lmdb/writeUtility.d.ts +1 -0
- package/dist/utility/logging/harper_logger.d.ts +6 -6
- package/dist/utility/processManagement/processManagement.d.ts +1 -1
- package/dist/utility/processManagement/servicesConfig.d.ts +12 -6
- package/dist/validation/common_validators.d.ts +4 -3
- package/dist/validation/configValidator.d.ts +3 -2
- package/index.d.ts +56 -0
- package/index.js +41 -0
- package/json/systemSchema.json +373 -0
- package/launchServiceScripts/launchHarperDB.js +3 -0
- package/launchServiceScripts/utility/checkNodeVersion.js +15 -0
- package/package.json +35 -16
- package/resources/DatabaseTransaction.ts +378 -0
- package/resources/ErrorResource.ts +57 -0
- package/resources/IterableEventQueue.ts +94 -0
- package/resources/LMDBTransaction.ts +349 -0
- package/resources/RecordEncoder.ts +702 -0
- package/resources/RequestTarget.ts +134 -0
- package/resources/Resource.ts +789 -0
- package/resources/ResourceInterface.ts +221 -0
- package/resources/Resources.ts +162 -0
- package/resources/RocksIndexStore.ts +70 -0
- package/resources/RocksTransactionLogStore.ts +352 -0
- package/resources/Table.ts +4531 -0
- package/resources/analytics/hostnames.ts +72 -0
- package/resources/analytics/metadata.ts +10 -0
- package/resources/analytics/read.ts +252 -0
- package/resources/analytics/write.ts +803 -0
- package/resources/auditStore.ts +556 -0
- package/resources/blob.ts +1268 -0
- package/resources/crdt.ts +125 -0
- package/resources/dataLoader.ts +527 -0
- package/resources/databases.ts +1290 -0
- package/resources/graphql.ts +221 -0
- package/resources/indexes/HierarchicalNavigableSmallWorld.ts +638 -0
- package/resources/indexes/customIndexes.ts +7 -0
- package/resources/indexes/vector.ts +38 -0
- package/resources/jsResource.ts +86 -0
- package/resources/loadEnv.ts +22 -0
- package/resources/login.ts +18 -0
- package/resources/openApi.ts +409 -0
- package/resources/registrationDeprecated.ts +8 -0
- package/resources/replayLogs.ts +136 -0
- package/resources/roles.ts +98 -0
- package/resources/search.ts +1301 -0
- package/resources/tracked.ts +584 -0
- package/resources/transaction.ts +89 -0
- package/resources/transactionBroadcast.ts +258 -0
- package/security/auth.ts +376 -0
- package/security/certificateVerification/certificateVerificationSource.ts +84 -0
- package/security/certificateVerification/configValidation.ts +107 -0
- package/security/certificateVerification/crlVerification.ts +623 -0
- package/security/certificateVerification/index.ts +121 -0
- package/security/certificateVerification/ocspVerification.ts +148 -0
- package/security/certificateVerification/pkijs-ed25519-patch.ts +188 -0
- package/security/certificateVerification/types.ts +128 -0
- package/security/certificateVerification/verificationConfig.ts +138 -0
- package/security/certificateVerification/verificationUtils.ts +447 -0
- package/security/cryptoHash.js +42 -0
- package/security/data_objects/PermissionAttributeResponseObject.js +15 -0
- package/security/data_objects/PermissionResponseObject.js +115 -0
- package/security/data_objects/PermissionTableResponseObject.js +20 -0
- package/security/fastifyAuth.js +169 -0
- package/security/impersonation.ts +160 -0
- package/security/jsLoader.ts +733 -0
- package/security/keys.js +948 -0
- package/security/permissionsTranslator.js +300 -0
- package/security/role.js +218 -0
- package/security/tokenAuthentication.ts +228 -0
- package/security/user.ts +449 -0
- package/server/DurableSubscriptionsSession.ts +503 -0
- package/server/REST.ts +407 -0
- package/server/Server.ts +89 -0
- package/server/fastifyRoutes/helpers/getCORSOptions.js +36 -0
- package/server/fastifyRoutes/helpers/getHeaderTimeoutConfig.js +15 -0
- package/server/fastifyRoutes/helpers/getServerOptions.js +33 -0
- package/server/fastifyRoutes/plugins/hdbCore.js +39 -0
- package/server/fastifyRoutes.ts +205 -0
- package/server/graphqlQuerying.ts +700 -0
- package/server/http.ts +640 -0
- package/server/itc/serverHandlers.js +161 -0
- package/server/itc/utility/ITCEventObject.js +10 -0
- package/server/jobs/JobObject.js +24 -0
- package/server/jobs/jobProcess.js +69 -0
- package/server/jobs/jobRunner.js +162 -0
- package/server/jobs/jobs.js +304 -0
- package/server/loadRootComponents.js +44 -0
- package/server/mqtt.ts +485 -0
- package/server/nodeName.ts +75 -0
- package/server/operationsServer.ts +313 -0
- package/server/serverHelpers/Headers.ts +108 -0
- package/server/serverHelpers/JSONStream.ts +269 -0
- package/server/serverHelpers/OperationFunctionObject.ts +13 -0
- package/server/serverHelpers/Request.ts +158 -0
- package/server/serverHelpers/contentTypes.ts +637 -0
- package/server/serverHelpers/requestTimePlugin.js +57 -0
- package/server/serverHelpers/serverHandlers.js +148 -0
- package/server/serverHelpers/serverUtilities.ts +473 -0
- package/server/serverRegistry.ts +8 -0
- package/server/static.ts +187 -0
- package/server/status/definitions.ts +37 -0
- package/server/status/index.ts +125 -0
- package/server/storageReclamation.ts +93 -0
- package/server/threads/itc.js +89 -0
- package/server/threads/manageThreads.js +596 -0
- package/server/threads/socketRouter.ts +360 -0
- package/server/threads/threadServer.js +279 -0
- package/server/throttle.ts +73 -0
- package/sqlTranslator/SelectValidator.js +330 -0
- package/sqlTranslator/alasqlFunctionImporter.js +62 -0
- package/sqlTranslator/deleteTranslator.js +67 -0
- package/sqlTranslator/index.js +242 -0
- package/sqlTranslator/sql_statement_bucket.js +472 -0
- package/static/defaultConfig.yaml +3 -0
- package/studio/web/HDBDogOnly.svg +78 -0
- package/studio/web/assets/PPRadioGrotesk-Bold-DDaUYG8E.woff +0 -0
- package/studio/web/assets/fa-brands-400-CEJbCg16.woff +0 -0
- package/studio/web/assets/fa-brands-400-CSYNqBb_.ttf +0 -0
- package/studio/web/assets/fa-brands-400-DnkPfk3o.eot +0 -0
- package/studio/web/assets/fa-brands-400-UxlILjvJ.woff2 +0 -0
- package/studio/web/assets/fa-brands-400-cH1MgKbP.svg +3717 -0
- package/studio/web/assets/fa-regular-400-BhTwtT8w.eot +0 -0
- package/studio/web/assets/fa-regular-400-D1vz6WBx.ttf +0 -0
- package/studio/web/assets/fa-regular-400-DFnMcJPd.woff +0 -0
- package/studio/web/assets/fa-regular-400-DGzu1beS.woff2 +0 -0
- package/studio/web/assets/fa-regular-400-gwj8Pxq-.svg +801 -0
- package/studio/web/assets/fa-solid-900-B4ZZ7kfP.svg +5034 -0
- package/studio/web/assets/fa-solid-900-B6Axprfb.eot +0 -0
- package/studio/web/assets/fa-solid-900-BUswJgRo.woff2 +0 -0
- package/studio/web/assets/fa-solid-900-DOXgCApm.woff +0 -0
- package/studio/web/assets/fa-solid-900-mxuxnBEa.ttf +0 -0
- package/studio/web/assets/index-C1G-Jo6n.js +37 -0
- package/studio/web/assets/index-C1G-Jo6n.js.map +1 -0
- package/studio/web/assets/index-D-CahN0-.js +2 -0
- package/studio/web/assets/index-D-CahN0-.js.map +1 -0
- package/studio/web/assets/index-DxlZI0PX.js +235 -0
- package/studio/web/assets/index-DxlZI0PX.js.map +1 -0
- package/studio/web/assets/index-Y2g_iFpU.css +1 -0
- package/studio/web/assets/index-jiPwkrsB.css +1 -0
- package/studio/web/assets/index.lazy-BUXDDqq9.js +266 -0
- package/studio/web/assets/index.lazy-BUXDDqq9.js.map +1 -0
- package/studio/web/assets/profiler-CU93QiSW.js +2 -0
- package/studio/web/assets/profiler-CU93QiSW.js.map +1 -0
- package/studio/web/assets/react-redux-B8k9Ep7e.js +6 -0
- package/studio/web/assets/react-redux-B8k9Ep7e.js.map +1 -0
- package/studio/web/assets/startRecording-DFeBXGk6.js +3 -0
- package/studio/web/assets/startRecording-DFeBXGk6.js.map +1 -0
- package/studio/web/fabric-signup-background.webp +0 -0
- package/studio/web/fabric-signup-text.png +0 -0
- package/studio/web/favicon_purple.png +0 -0
- package/studio/web/github-icon.svg +15 -0
- package/studio/web/harper-fabric_black.png +0 -0
- package/studio/web/harper-fabric_white.png +0 -0
- package/studio/web/harper-studio_white.png +0 -0
- package/studio/web/index.html +16 -0
- package/studio/web/running.css +148 -0
- package/studio/web/running.html +147 -0
- package/studio/web/running.js +111 -0
- package/upgrade/UpgradeObjects.js +13 -0
- package/upgrade/directives/directivesController.js +90 -0
- package/upgrade/directivesManager.js +139 -0
- package/upgrade/upgradePrompt.js +124 -0
- package/upgrade/upgradeUtilities.js +28 -0
- package/utility/AWS/AWSConnector.js +29 -0
- package/utility/OperationFunctionCaller.js +63 -0
- package/utility/assignCmdEnvVariables.js +62 -0
- package/utility/common_utils.js +867 -0
- package/utility/environment/environmentManager.js +208 -0
- package/utility/environment/systemInformation.js +355 -0
- package/utility/errors/commonErrors.js +267 -0
- package/utility/errors/hdbError.js +146 -0
- package/utility/functions/date/dateFunctions.js +65 -0
- package/utility/functions/geo.js +355 -0
- package/utility/functions/sql/alaSQLExtension.js +104 -0
- package/utility/globalSchema.js +35 -0
- package/utility/hdbTerms.ts +819 -0
- package/utility/install/checkJWTTokensExist.js +62 -0
- package/utility/install/harperdb.conf +15 -0
- package/utility/install/harperdb.service +14 -0
- package/utility/install/installer.js +635 -0
- package/utility/installation.ts +30 -0
- package/utility/lmdb/DBIDefinition.js +20 -0
- package/utility/lmdb/DeleteRecordsResponseObject.js +25 -0
- package/utility/lmdb/InsertRecordsResponseObject.js +22 -0
- package/utility/lmdb/OpenDBIObject.js +31 -0
- package/utility/lmdb/OpenEnvironmentObject.js +41 -0
- package/utility/lmdb/UpdateRecordsResponseObject.js +25 -0
- package/utility/lmdb/UpsertRecordsResponseObject.js +22 -0
- package/utility/lmdb/cleanLMDBMap.js +65 -0
- package/utility/lmdb/commonUtility.js +130 -0
- package/utility/lmdb/deleteUtility.js +128 -0
- package/utility/lmdb/environmentUtility.js +477 -0
- package/utility/lmdb/searchCursorFunctions.js +187 -0
- package/utility/lmdb/searchUtility.js +918 -0
- package/utility/lmdb/terms.js +57 -0
- package/utility/lmdb/writeUtility.js +407 -0
- package/utility/logging/harper_logger.js +876 -0
- package/utility/logging/logRotator.js +157 -0
- package/utility/logging/logger.ts +24 -0
- package/utility/logging/readLog.js +355 -0
- package/utility/logging/transactionLog.js +57 -0
- package/utility/mount_hdb.js +59 -0
- package/utility/npmUtilities.js +102 -0
- package/utility/operationPermissions.ts +112 -0
- package/utility/operation_authorization.js +836 -0
- package/utility/packageUtils.js +55 -0
- package/utility/password.ts +99 -0
- package/utility/processManagement/processManagement.js +187 -0
- package/utility/processManagement/servicesConfig.js +56 -0
- package/utility/scripts/restartHdb.js +24 -0
- package/utility/scripts/user_data.sh +13 -0
- package/utility/signalling.js +36 -0
- package/utility/terms/certificates.js +81 -0
- package/utility/when.ts +20 -0
- package/validation/bulkDeleteValidator.js +24 -0
- package/validation/check_permissions.js +19 -0
- package/validation/common_validators.js +95 -0
- package/validation/configValidator.js +331 -0
- package/validation/deleteValidator.js +15 -0
- package/validation/fileLoadValidator.js +153 -0
- package/validation/insertValidator.js +40 -0
- package/validation/installValidator.js +37 -0
- package/validation/readLogValidator.js +64 -0
- package/validation/role_validation.js +320 -0
- package/validation/schemaMetadataValidator.js +42 -0
- package/validation/searchValidator.js +166 -0
- package/validation/statusValidator.ts +66 -0
- package/validation/transactionLogValidator.js +33 -0
- package/validation/user_validation.js +55 -0
- package/validation/validationWrapper.js +105 -0
- package/dist/resources/ResourceInterfaceV2.d.ts +0 -21
- package/dist/resources/ResourceInterfaceV2.js.map +0 -1
- package/dist/resources/ResourceV2.d.ts +0 -30
- package/dist/resources/ResourceV2.js +0 -27
- package/dist/resources/ResourceV2.js.map +0 -1
- package/dist/resources/analytics/profile.d.ts +0 -2
- package/dist/resources/analytics/profile.js +0 -144
- package/dist/resources/analytics/profile.js.map +0 -1
|
@@ -0,0 +1,819 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module contains common variables/values that will be used across the project.
|
|
3
|
+
* Using these constant values helps with consistency across the project.
|
|
4
|
+
*
|
|
5
|
+
* All variables should use a JSDoc comment to explain what it is, and any objects should be marked as `as const` for better type checking.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** Old Harper Root Config File */
|
|
9
|
+
export const HDB_CONFIG_FILE = 'harperdb-config.yaml';
|
|
10
|
+
/** Harper Root Config File */
|
|
11
|
+
export const HARPER_CONFIG_FILE = 'harper-config.yaml';
|
|
12
|
+
/** Harper Default Config File */
|
|
13
|
+
export const HDB_DEFAULT_CONFIG_FILE = 'defaultConfig.yaml';
|
|
14
|
+
/** Harper Root Directory Name */
|
|
15
|
+
export const HDB_ROOT_DIR_NAME = 'harper';
|
|
16
|
+
/** Harper Component Config File */
|
|
17
|
+
export const HDB_COMPONENT_CONFIG_FILE = 'config.yaml';
|
|
18
|
+
|
|
19
|
+
/** Name of the Harper Process Script */
|
|
20
|
+
export const HDB_PROC_NAME = 'harper.js';
|
|
21
|
+
/** Name of the Harper Restart Script */
|
|
22
|
+
export const HDB_RESTART_SCRIPT = 'restartHdb.js';
|
|
23
|
+
|
|
24
|
+
/** Harper Process Descriptor */
|
|
25
|
+
const HDB_PROC_DESCRIPTOR = 'Harper';
|
|
26
|
+
/** Custom Function Process Descriptor */
|
|
27
|
+
const CUSTOM_FUNCTION_PROC_DESCRIPTOR = 'Custom Functions';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Process Descriptor Map
|
|
31
|
+
*
|
|
32
|
+
* Used throughout the project to map process descriptors to their respective process names.
|
|
33
|
+
*/
|
|
34
|
+
export const PROCESS_DESCRIPTORS = {
|
|
35
|
+
HDB: HDB_PROC_DESCRIPTOR,
|
|
36
|
+
CUSTOM_FUNCTIONS: CUSTOM_FUNCTION_PROC_DESCRIPTOR,
|
|
37
|
+
RESTART_HDB: 'Restart HDB',
|
|
38
|
+
INSTALL: 'Install',
|
|
39
|
+
RUN: 'Run',
|
|
40
|
+
STOP: 'Stop',
|
|
41
|
+
UPGRADE: 'Upgrade',
|
|
42
|
+
REGISTER: 'Register',
|
|
43
|
+
JOB: 'Job',
|
|
44
|
+
} as const;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Process Services Map
|
|
48
|
+
*
|
|
49
|
+
* These are the services that the Harper process provides.
|
|
50
|
+
* This object is used primarily in the restart workflow to determine which services to restart.
|
|
51
|
+
*/
|
|
52
|
+
export const HDB_PROCESS_SERVICES = {
|
|
53
|
+
'harperdb': HDB_PROC_DESCRIPTOR,
|
|
54
|
+
'custom functions': CUSTOM_FUNCTION_PROC_DESCRIPTOR,
|
|
55
|
+
'custom_functions': CUSTOM_FUNCTION_PROC_DESCRIPTOR,
|
|
56
|
+
'http_workers': 'http_workers',
|
|
57
|
+
'http': 'http',
|
|
58
|
+
} as const;
|
|
59
|
+
|
|
60
|
+
/** Harper Process Identifier File Name */
|
|
61
|
+
export const HDB_PID_FILE = 'hdb.pid';
|
|
62
|
+
/** Default database name */
|
|
63
|
+
export const DEFAULT_DATABASE_NAME = 'data';
|
|
64
|
+
|
|
65
|
+
/** Log File Names */
|
|
66
|
+
export const LOG_NAMES = {
|
|
67
|
+
HDB: 'hdb.log',
|
|
68
|
+
INSTALL: 'install.log',
|
|
69
|
+
} as const;
|
|
70
|
+
|
|
71
|
+
/** Log Levels */
|
|
72
|
+
export const LOG_LEVELS = {
|
|
73
|
+
NOTIFY: 'notify',
|
|
74
|
+
FATAL: 'fatal',
|
|
75
|
+
ERROR: 'error',
|
|
76
|
+
WARN: 'warn',
|
|
77
|
+
INFO: 'info',
|
|
78
|
+
DEBUG: 'debug',
|
|
79
|
+
TRACE: 'trace',
|
|
80
|
+
} as const;
|
|
81
|
+
|
|
82
|
+
/** Launch Service script paths */
|
|
83
|
+
export const LAUNCH_SERVICE_SCRIPTS = {
|
|
84
|
+
MAIN: 'dist/bin/harper.js',
|
|
85
|
+
} as const;
|
|
86
|
+
|
|
87
|
+
/** Specifies user role types */
|
|
88
|
+
export const ROLE_TYPES_ENUM = {
|
|
89
|
+
SUPER_USER: 'super_user',
|
|
90
|
+
} as const;
|
|
91
|
+
|
|
92
|
+
/** Email address for support requests */
|
|
93
|
+
export const HDB_SUPPORT_ADDRESS = 'support@harperdb.io';
|
|
94
|
+
|
|
95
|
+
/** Support Help Message */
|
|
96
|
+
export const SUPPORT_HELP_MSG = `For support, please submit a request at https://harperdbhelp.zendesk.com/hc/en-us/requests/new or contact ${HDB_SUPPORT_ADDRESS}`;
|
|
97
|
+
/** Message when records cannot be found for a DELETE operation */
|
|
98
|
+
export const SEARCH_NOT_FOUND_MESSAGE = 'None of the specified records were found.';
|
|
99
|
+
|
|
100
|
+
// TODO: The following unicode/regex terms seem pointless, and could be removed.
|
|
101
|
+
// Singular character codes and basic regex patterns should be included inline where they are used.
|
|
102
|
+
// These are not likely to ever change and don't need to be extrapolated into variables
|
|
103
|
+
|
|
104
|
+
/** Unicode for the `.` character */
|
|
105
|
+
export const UNICODE_PERIOD = 'U+002E';
|
|
106
|
+
/** Regex for matching the `/` character */
|
|
107
|
+
export const FORWARD_SLASH_REGEX = /\//g;
|
|
108
|
+
/** Unicode for the `/` character */
|
|
109
|
+
export const UNICODE_FORWARD_SLASH = 'U+002F';
|
|
110
|
+
/** Regex for matching an escaped `/` character */
|
|
111
|
+
export const ESCAPED_FORWARD_SLASH_REGEX = /U\+002F/g;
|
|
112
|
+
|
|
113
|
+
/** Name of the System schema */
|
|
114
|
+
export const SYSTEM_SCHEMA_NAME = 'system';
|
|
115
|
+
|
|
116
|
+
/** Harper Home directory */
|
|
117
|
+
export const HDB_HOME_DIR_NAME = '.harperdb';
|
|
118
|
+
|
|
119
|
+
/** License Key directory */
|
|
120
|
+
export const LICENSE_KEY_DIR_NAME = 'keys';
|
|
121
|
+
|
|
122
|
+
/** Harper Boot Properties file name */
|
|
123
|
+
export const BOOT_PROPS_FILE_NAME = 'hdb_boot_properties.file';
|
|
124
|
+
|
|
125
|
+
/** Restart timeout (milliseconds) */
|
|
126
|
+
export const RESTART_TIMEOUT_MS = 60000;
|
|
127
|
+
|
|
128
|
+
/** Harper File Permissions Mode */
|
|
129
|
+
export const HDB_FILE_PERMISSIONS = 0o700;
|
|
130
|
+
|
|
131
|
+
/** Database directory */
|
|
132
|
+
export const DATABASES_DIR_NAME = 'database';
|
|
133
|
+
/** Legacy Database directory */
|
|
134
|
+
export const LEGACY_DATABASES_DIR_NAME = 'schema';
|
|
135
|
+
/** Transaction directory */
|
|
136
|
+
export const TRANSACTIONS_DIR_NAME = 'transactions';
|
|
137
|
+
/** Backup directory */
|
|
138
|
+
export const BACKUP_DIR_NAME = 'backup';
|
|
139
|
+
|
|
140
|
+
/** Key for specifying process specific environment variables */
|
|
141
|
+
export const PROCESS_NAME_ENV_PROP = 'PROCESS_NAME';
|
|
142
|
+
|
|
143
|
+
/** Boot sequence property parameters */
|
|
144
|
+
export const BOOT_PROP_PARAMS = {
|
|
145
|
+
SETTINGS_PATH_KEY: 'settings_path',
|
|
146
|
+
} as const;
|
|
147
|
+
|
|
148
|
+
/** Installation prompt map */
|
|
149
|
+
export const INSTALL_PROMPTS = {
|
|
150
|
+
HDB_ADMIN_USERNAME: 'HDB_ADMIN_USERNAME',
|
|
151
|
+
HDB_ADMIN_PASSWORD: 'HDB_ADMIN_PASSWORD',
|
|
152
|
+
OPERATIONSAPI_ROOT: 'OPERATIONSAPI_ROOT',
|
|
153
|
+
ROOTPATH: 'ROOTPATH',
|
|
154
|
+
NODE_HOSTNAME: 'NODE_HOSTNAME',
|
|
155
|
+
REPLICATION_HOSTNAME: 'REPLICATION_HOSTNAME',
|
|
156
|
+
HDB_CONFIG: 'HDB_CONFIG',
|
|
157
|
+
DEFAULTS_MODE: 'DEFAULTS_MODE',
|
|
158
|
+
STORAGE_ENGINE: 'STORAGE_ENGINE',
|
|
159
|
+
} as const;
|
|
160
|
+
|
|
161
|
+
/** Insert operation max character size */
|
|
162
|
+
export const INSERT_MAX_CHARACTER_SIZE = 250;
|
|
163
|
+
|
|
164
|
+
/** Upgrade JSON field map */
|
|
165
|
+
export const UPGRADE_JSON_FIELD_NAMES_ENUM = {
|
|
166
|
+
DATA_VERSION: 'data_version',
|
|
167
|
+
UPGRADE_VERSION: 'upgrade_version',
|
|
168
|
+
} as const;
|
|
169
|
+
|
|
170
|
+
/** System table names */
|
|
171
|
+
export const SYSTEM_TABLE_NAMES = {
|
|
172
|
+
JOB_TABLE_NAME: 'hdb_job',
|
|
173
|
+
NODE_TABLE_NAME: 'hdb_nodes',
|
|
174
|
+
ATTRIBUTE_TABLE_NAME: 'hdb_attribute',
|
|
175
|
+
LICENSE_TABLE_NAME: 'hdb_license',
|
|
176
|
+
ROLE_TABLE_NAME: 'hdb_role',
|
|
177
|
+
SCHEMA_TABLE_NAME: 'hdb_schema',
|
|
178
|
+
TABLE_TABLE_NAME: 'hdb_table',
|
|
179
|
+
USER_TABLE_NAME: 'hdb_user',
|
|
180
|
+
INFO_TABLE_NAME: 'hdb_info',
|
|
181
|
+
} as const;
|
|
182
|
+
|
|
183
|
+
/** Hash attribute for the system info table */
|
|
184
|
+
export const INFO_TABLE_HASH_ATTRIBUTE = 'info_id';
|
|
185
|
+
|
|
186
|
+
/** System default attributes */
|
|
187
|
+
export const SYSTEM_DEFAULT_ATTRIBUTE_NAMES = {
|
|
188
|
+
ATTR_ATTRIBUTE_KEY: 'attribute',
|
|
189
|
+
ATTR_CREATEDDATE_KEY: 'createddate',
|
|
190
|
+
ATTR_HASH_ATTRIBUTE_KEY: 'hash_attribute',
|
|
191
|
+
ATTR_ID_KEY: 'id',
|
|
192
|
+
ATTR_NAME_KEY: 'name',
|
|
193
|
+
ATTR_PASSWORD_KEY: 'password',
|
|
194
|
+
ATTR_RESIDENCE_KEY: 'residence',
|
|
195
|
+
ATTR_ROLE_KEY: 'role',
|
|
196
|
+
ATTR_SCHEMA_KEY: 'schema',
|
|
197
|
+
ATTR_SCHEMA_TABLE_KEY: 'schema_table',
|
|
198
|
+
ATTR_TABLE_KEY: 'table',
|
|
199
|
+
ATTR_USERNAME_KEY: 'username',
|
|
200
|
+
} as const;
|
|
201
|
+
|
|
202
|
+
/** Describes the available statuses for jobs */
|
|
203
|
+
export const JOB_STATUS_ENUM = {
|
|
204
|
+
CREATED: 'CREATED',
|
|
205
|
+
IN_PROGRESS: 'IN_PROGRESS',
|
|
206
|
+
COMPLETE: 'COMPLETE',
|
|
207
|
+
ERROR: 'ERROR',
|
|
208
|
+
} as const;
|
|
209
|
+
|
|
210
|
+
/** Operations */
|
|
211
|
+
export const OPERATIONS_ENUM = {
|
|
212
|
+
INSERT: 'insert',
|
|
213
|
+
UPDATE: 'update',
|
|
214
|
+
UPSERT: 'upsert',
|
|
215
|
+
SEARCH_BY_CONDITIONS: 'search_by_conditions',
|
|
216
|
+
SEARCH_BY_HASH: 'search_by_hash',
|
|
217
|
+
SEARCH_BY_ID: 'search_by_id',
|
|
218
|
+
SEARCH_BY_VALUE: 'search_by_value',
|
|
219
|
+
SEARCH: 'search',
|
|
220
|
+
SQL: 'sql',
|
|
221
|
+
CSV_DATA_LOAD: 'csv_data_load',
|
|
222
|
+
CSV_FILE_LOAD: 'csv_file_load',
|
|
223
|
+
CSV_URL_LOAD: 'csv_url_load',
|
|
224
|
+
CREATE_SCHEMA: 'create_schema',
|
|
225
|
+
CREATE_DATABASE: 'create_database',
|
|
226
|
+
CREATE_TABLE: 'create_table',
|
|
227
|
+
CREATE_ATTRIBUTE: 'create_attribute',
|
|
228
|
+
DROP_SCHEMA: 'drop_schema',
|
|
229
|
+
DROP_DATABASE: 'drop_database',
|
|
230
|
+
DROP_TABLE: 'drop_table',
|
|
231
|
+
DESCRIBE_SCHEMA: 'describe_schema',
|
|
232
|
+
DESCRIBE_DATABASE: 'describe_database',
|
|
233
|
+
DESCRIBE_TABLE: 'describe_table',
|
|
234
|
+
DESCRIBE_ALL: 'describe_all',
|
|
235
|
+
DESCRIBE_METRIC: 'describe_metric',
|
|
236
|
+
DELETE: 'delete',
|
|
237
|
+
ADD_USER: 'add_user',
|
|
238
|
+
ALTER_USER: 'alter_user',
|
|
239
|
+
DROP_USER: 'drop_user',
|
|
240
|
+
LIST_USERS: 'list_users',
|
|
241
|
+
LIST_ROLES: 'list_roles',
|
|
242
|
+
ADD_ROLE: 'add_role',
|
|
243
|
+
ALTER_ROLE: 'alter_role',
|
|
244
|
+
DROP_ROLE: 'drop_role',
|
|
245
|
+
USER_INFO: 'user_info',
|
|
246
|
+
READ_LOG: 'read_log',
|
|
247
|
+
ADD_NODE: 'add_node',
|
|
248
|
+
UPDATE_NODE: 'update_node',
|
|
249
|
+
SET_NODE_REPLICATION: 'set_node_replication',
|
|
250
|
+
EXPORT_TO_S3: 'export_to_s3',
|
|
251
|
+
IMPORT_FROM_S3: 'import_from_s3',
|
|
252
|
+
DELETE_FILES_BEFORE: 'delete_files_before',
|
|
253
|
+
DELETE_RECORDS_BEFORE: 'delete_records_before',
|
|
254
|
+
EXPORT_LOCAL: 'export_local',
|
|
255
|
+
SEARCH_JOBS_BY_START_DATE: 'search_jobs_by_start_date',
|
|
256
|
+
GET_JOB: 'get_job',
|
|
257
|
+
DELETE_JOB: 'delete_job',
|
|
258
|
+
UPDATE_JOB: 'update_job',
|
|
259
|
+
REGISTRATION_INFO: 'registration_info',
|
|
260
|
+
SET_CONFIGURATION: 'set_configuration',
|
|
261
|
+
DROP_ATTRIBUTE: 'drop_attribute',
|
|
262
|
+
RESTART: 'restart',
|
|
263
|
+
RESTART_SERVICE: 'restart_service',
|
|
264
|
+
CATCHUP: 'catchup',
|
|
265
|
+
SYSTEM_INFORMATION: 'system_information',
|
|
266
|
+
DELETE_AUDIT_LOGS_BEFORE: 'delete_audit_logs_before',
|
|
267
|
+
READ_AUDIT_LOG: 'read_audit_log',
|
|
268
|
+
CREATE_AUTHENTICATION_TOKENS: 'create_authentication_tokens',
|
|
269
|
+
LOGIN: 'login',
|
|
270
|
+
LOGOUT: 'logout',
|
|
271
|
+
REFRESH_OPERATION_TOKEN: 'refresh_operation_token',
|
|
272
|
+
GET_CONFIGURATION: 'get_configuration',
|
|
273
|
+
CUSTOM_FUNCTIONS_STATUS: 'custom_functions_status',
|
|
274
|
+
GET_CUSTOM_FUNCTIONS: 'get_custom_functions',
|
|
275
|
+
GET_CUSTOM_FUNCTION: 'get_custom_function',
|
|
276
|
+
SET_CUSTOM_FUNCTION: 'set_custom_function',
|
|
277
|
+
GET_COMPONENTS: 'get_components',
|
|
278
|
+
GET_COMPONENT_FILE: 'get_component_file',
|
|
279
|
+
SET_COMPONENT_FILE: 'set_component_file',
|
|
280
|
+
DROP_COMPONENT: 'drop_component',
|
|
281
|
+
DROP_CUSTOM_FUNCTION: 'drop_custom_function',
|
|
282
|
+
ADD_CUSTOM_FUNCTION_PROJECT: 'add_custom_function_project',
|
|
283
|
+
ADD_COMPONENT: 'add_component',
|
|
284
|
+
DROP_CUSTOM_FUNCTION_PROJECT: 'drop_custom_function_project',
|
|
285
|
+
PACKAGE_CUSTOM_FUNCTION_PROJECT: 'package_custom_function_project',
|
|
286
|
+
DEPLOY_CUSTOM_FUNCTION_PROJECT: 'deploy_custom_function_project',
|
|
287
|
+
PACKAGE_COMPONENT: 'package_component',
|
|
288
|
+
DEPLOY_COMPONENT: 'deploy_component',
|
|
289
|
+
READ_TRANSACTION_LOG: 'read_transaction_log',
|
|
290
|
+
DELETE_TRANSACTION_LOGS_BEFORE: 'delete_transaction_logs_before',
|
|
291
|
+
INSTALL_NODE_MODULES: 'install_node_modules',
|
|
292
|
+
AUDIT_NODE_MODULES: 'audit_node_modules',
|
|
293
|
+
PURGE_STREAM: 'purge_stream',
|
|
294
|
+
GET_BACKUP: 'get_backup',
|
|
295
|
+
CLEANUP_ORPHAN_BLOBS: 'cleanup_orphan_blobs',
|
|
296
|
+
GET_ANALYTICS: 'get_analytics',
|
|
297
|
+
LIST_METRICS: 'list_metrics',
|
|
298
|
+
GET_STATUS: 'get_status',
|
|
299
|
+
SET_STATUS: 'set_status',
|
|
300
|
+
CLEAR_STATUS: 'clear_status',
|
|
301
|
+
} as const;
|
|
302
|
+
|
|
303
|
+
/** Defines valid file types that we are able to handle in 'import_from_s3' ops */
|
|
304
|
+
export const VALID_S3_FILE_TYPES = {
|
|
305
|
+
CSV: '.csv',
|
|
306
|
+
JSON: '.json',
|
|
307
|
+
} as const;
|
|
308
|
+
|
|
309
|
+
/** Defines the keys required in a request body for accessing a S3 bucket */
|
|
310
|
+
export const S3_BUCKET_AUTH_KEYS = {
|
|
311
|
+
AWS_ACCESS_KEY: 'aws_access_key_id',
|
|
312
|
+
AWS_SECRET: 'aws_secret_access_key',
|
|
313
|
+
AWS_BUCKET: 'bucket',
|
|
314
|
+
AWS_FILE_KEY: 'key',
|
|
315
|
+
REGION: 'region',
|
|
316
|
+
} as const;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Defines valid SQL operations to be used in the processAST method - this ensure we have appropriate unit test coverage
|
|
320
|
+
* for all SQL operations that are dynamically set after the chooseOperation method which behaves differently for the evaluateSQL operation.
|
|
321
|
+
*/
|
|
322
|
+
export const VALID_SQL_OPS_ENUM = {
|
|
323
|
+
SELECT: 'select',
|
|
324
|
+
INSERT: 'insert',
|
|
325
|
+
UPDATE: 'update',
|
|
326
|
+
DELETE: 'delete',
|
|
327
|
+
} as const;
|
|
328
|
+
|
|
329
|
+
/** Available service actions */
|
|
330
|
+
export const SERVICE_ACTIONS_ENUM = {
|
|
331
|
+
DEV: 'dev',
|
|
332
|
+
RUN: 'run',
|
|
333
|
+
START: 'start',
|
|
334
|
+
INSTALL: 'install',
|
|
335
|
+
STOP: 'stop',
|
|
336
|
+
RESTART: 'restart',
|
|
337
|
+
VERSION: 'version',
|
|
338
|
+
UPGRADE: 'upgrade',
|
|
339
|
+
HELP: 'help',
|
|
340
|
+
STATUS: 'status',
|
|
341
|
+
OPERATION: 'operation',
|
|
342
|
+
RENEWCERTS: 'renew-certs',
|
|
343
|
+
COPYDB: 'copy-db',
|
|
344
|
+
} as const;
|
|
345
|
+
|
|
346
|
+
/** describes the Geo Conversion types */
|
|
347
|
+
export const GEO_CONVERSION_ENUM = {
|
|
348
|
+
point: 'point',
|
|
349
|
+
lineString: 'lineString',
|
|
350
|
+
multiLineString: 'multiLineString',
|
|
351
|
+
multiPoint: 'multiPoint',
|
|
352
|
+
multiPolygon: 'multiPolygon',
|
|
353
|
+
polygon: 'polygon',
|
|
354
|
+
} as const;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* These values are relics of before the config was converted to yaml.
|
|
358
|
+
* The should no longer be used. Instead use CONFIG_PARAMS.
|
|
359
|
+
*/
|
|
360
|
+
export const HDB_SETTINGS_NAMES = {
|
|
361
|
+
HDB_ROOT_KEY: 'HDB_ROOT',
|
|
362
|
+
SERVER_PORT_KEY: 'SERVER_PORT',
|
|
363
|
+
CERT_KEY: 'CERTIFICATE',
|
|
364
|
+
PRIVATE_KEY_KEY: 'PRIVATE_KEY',
|
|
365
|
+
HTTP_SECURE_ENABLED_KEY: 'HTTPS_ON',
|
|
366
|
+
CORS_ENABLED_KEY: 'CORS_ON',
|
|
367
|
+
CORS_WHITELIST_KEY: 'CORS_WHITELIST',
|
|
368
|
+
LOG_LEVEL_KEY: 'LOG_LEVEL',
|
|
369
|
+
LOGGER_KEY: 'LOGGER',
|
|
370
|
+
LOG_PATH_KEY: 'LOG_PATH',
|
|
371
|
+
LOG_ROTATE: 'LOG_ROTATE',
|
|
372
|
+
LOG_ROTATE_MAX_SIZE: 'LOG_ROTATE_MAX_SIZE',
|
|
373
|
+
LOG_ROTATE_RETAIN: 'LOG_ROTATE_RETAIN',
|
|
374
|
+
LOG_ROTATE_COMPRESS: 'LOG_ROTATE_COMPRESS',
|
|
375
|
+
LOG_ROTATE_DATE_FORMAT: 'LOG_ROTATE_DATE_FORMAT',
|
|
376
|
+
LOG_ROTATE_ROTATE_MODULE: 'LOG_ROTATE_ROTATE_MODULE',
|
|
377
|
+
LOG_ROTATE_WORKER_INTERVAL: 'LOG_ROTATE_WORKER_INTERVAL',
|
|
378
|
+
LOG_ROTATE_ROTATE_INTERVAL: 'LOG_ROTATE_ROTATE_INTERVAL',
|
|
379
|
+
LOG_ROTATE_TIMEZONE: 'LOG_ROTATE_TIMEZONE',
|
|
380
|
+
LOG_DAILY_ROTATE_KEY: 'LOG_DAILY_ROTATE',
|
|
381
|
+
LOG_MAX_DAILY_FILES_KEY: 'LOG_MAX_DAILY_FILES',
|
|
382
|
+
PROPS_ENV_KEY: 'NODE_ENV',
|
|
383
|
+
SETTINGS_PATH_KEY: 'settings_path', // This value is used in the boot prop file not the settings file. It should stay lowercase.
|
|
384
|
+
ALLOW_SELF_SIGNED_SSL_CERTS: 'ALLOW_SELF_SIGNED_SSL_CERTS',
|
|
385
|
+
MAX_HDB_PROCESSES: 'MAX_HDB_PROCESSES',
|
|
386
|
+
INSTALL_USER: 'install_user', // This value is used in the boot prop file not the settings file. It should stay lowercase.
|
|
387
|
+
SERVER_TIMEOUT_KEY: 'SERVER_TIMEOUT_MS',
|
|
388
|
+
SERVER_KEEP_ALIVE_TIMEOUT_KEY: 'SERVER_KEEP_ALIVE_TIMEOUT',
|
|
389
|
+
SERVER_HEADERS_TIMEOUT_KEY: 'SERVER_HEADERS_TIMEOUT',
|
|
390
|
+
DISABLE_TRANSACTION_LOG_KEY: 'DISABLE_TRANSACTION_LOG',
|
|
391
|
+
OPERATION_TOKEN_TIMEOUT_KEY: 'OPERATION_TOKEN_TIMEOUT',
|
|
392
|
+
REFRESH_TOKEN_TIMEOUT_KEY: 'REFRESH_TOKEN_TIMEOUT',
|
|
393
|
+
CUSTOM_FUNCTIONS_ENABLED_KEY: 'CUSTOM_FUNCTIONS',
|
|
394
|
+
CUSTOM_FUNCTIONS_PORT_KEY: 'CUSTOM_FUNCTIONS_PORT',
|
|
395
|
+
CUSTOM_FUNCTIONS_DIRECTORY_KEY: 'CUSTOM_FUNCTIONS_DIRECTORY',
|
|
396
|
+
MAX_CUSTOM_FUNCTION_PROCESSES: 'MAX_CUSTOM_FUNCTION_PROCESSES',
|
|
397
|
+
LOG_TO_FILE: 'LOG_TO_FILE',
|
|
398
|
+
LOG_TO_STDSTREAMS: 'LOG_TO_STDSTREAMS',
|
|
399
|
+
RUN_IN_FOREGROUND: 'RUN_IN_FOREGROUND',
|
|
400
|
+
LOCAL_STUDIO_ON: 'LOCAL_STUDIO_ON',
|
|
401
|
+
STORAGE_WRITE_ASYNC: 'STORAGE_WRITE_ASYNC',
|
|
402
|
+
} as const;
|
|
403
|
+
|
|
404
|
+
/** Legacy configuration parameters */
|
|
405
|
+
export const LEGACY_CONFIG_PARAMS = {
|
|
406
|
+
CUSTOMFUNCTIONS_ENABLED: 'customFunctions_enabled',
|
|
407
|
+
CUSTOMFUNCTIONS_NETWORK_PORT: 'customFunctions_network_port',
|
|
408
|
+
CUSTOMFUNCTIONS_TLS_CERTIFICATE: 'customFunctions_tls_certificate',
|
|
409
|
+
CUSTOMFUNCTIONS_NETWORK_CORS: 'customFunctions_network_cors',
|
|
410
|
+
CUSTOMFUNCTIONS_NETWORK_CORSACCESSLIST: 'customFunctions_network_corsAccessList',
|
|
411
|
+
CUSTOMFUNCTIONS_NETWORK_HEADERSTIMEOUT: 'customFunctions_network_headersTimeout',
|
|
412
|
+
CUSTOMFUNCTIONS_NETWORK_HTTPS: 'customFunctions_network_https',
|
|
413
|
+
CUSTOMFUNCTIONS_NETWORK_KEEPALIVETIMEOUT: 'customFunctions_network_keepAliveTimeout',
|
|
414
|
+
CUSTOMFUNCTIONS_TLS_PRIVATEKEY: 'customFunctions_tls_privateKey',
|
|
415
|
+
CUSTOMFUNCTIONS_TLS_CERT_AUTH: 'customFunctions_tls_certificateAuthority',
|
|
416
|
+
CUSTOMFUNCTIONS_NETWORK_TIMEOUT: 'customFunctions_network_timeout',
|
|
417
|
+
CUSTOMFUNCTIONS_NODEENV: 'customFunctions_nodeEnv',
|
|
418
|
+
CUSTOMFUNCTIONS_ROOT: 'customFunctions_root',
|
|
419
|
+
} as const;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* All configuration parameters for Harper
|
|
423
|
+
*
|
|
424
|
+
* If a param is added to config it must also be added here.
|
|
425
|
+
*/
|
|
426
|
+
export const CONFIG_PARAMS = {
|
|
427
|
+
ANALYTICS_AGGREGATEPERIOD: 'analytics_aggregatePeriod',
|
|
428
|
+
ANALYTICS_REPLICATE: 'analytics_replicate',
|
|
429
|
+
AUTHENTICATION_AUTHORIZELOCAL: 'authentication_authorizeLocal',
|
|
430
|
+
AUTHENTICATION_CACHETTL: 'authentication_cacheTTL',
|
|
431
|
+
AUTHENTICATION_COOKIE_DOMAINS: 'authentication_cookie_domains',
|
|
432
|
+
AUTHENTICATION_COOKIE_EXPIRES: 'authentication_cookie_expires',
|
|
433
|
+
AUTHENTICATION_ENABLESESSIONS: 'authentication_enableSessions',
|
|
434
|
+
AUTHENTICATION_OPERATIONTOKENTIMEOUT: 'authentication_operationTokenTimeout',
|
|
435
|
+
AUTHENTICATION_REFRESHTOKENTIMEOUT: 'authentication_refreshTokenTimeout',
|
|
436
|
+
AUTHENTICATION_HASHFUNCTION: 'authentication_hashFunction',
|
|
437
|
+
CUSTOMFUNCTIONS_NETWORK_HTTPS: 'customFunctions_network_https',
|
|
438
|
+
APPLICATIONS_CONTAINMENT: 'applications_containment',
|
|
439
|
+
APPLICATIONS_LOCKDOWN: 'applications_lockdown',
|
|
440
|
+
APPLICATIONS_DEPENDENCYCONTAINMENT: 'applications_dependencyContainment',
|
|
441
|
+
APPLICATIONS_PACKAGEMANAGERPREFIX: 'applications_packageManagerPrefix',
|
|
442
|
+
APPLICATIONS_ALLOWEDBUILTINMODULES: 'applications_allowedBuiltInModules',
|
|
443
|
+
APPLICATIONS_ALLOWEDSPAWNCOMMANDS: 'applications_allowedSpawnCommands',
|
|
444
|
+
THREADS: 'threads',
|
|
445
|
+
THREADS_COUNT: 'threads_count',
|
|
446
|
+
THREADS_DEBUG: 'threads_debug',
|
|
447
|
+
THREADS_DEBUG_STARTINGPORT: 'threads_debug_startingPort',
|
|
448
|
+
THREADS_DEBUG_PORT: 'threads_debug_port',
|
|
449
|
+
THREADS_DEBUG_HOST: 'threads_debug_host',
|
|
450
|
+
THREADS_DEBUG_WAITFORDEBUGGER: 'threads_debug_waitForDebugger',
|
|
451
|
+
THREADS_MAXHEAPMEMORY: 'threads_maxHeapMemory',
|
|
452
|
+
THREADS_HEAPSNAPSHOTNEARLIMIT: 'threads_heapSnapshotNearLimit',
|
|
453
|
+
HTTP_SESSIONAFFINITY: 'http_sessionAffinity',
|
|
454
|
+
HTTP_COMPRESSIONTHRESHOLD: 'http_compressionThreshold',
|
|
455
|
+
HTTP_CORS: 'http_cors',
|
|
456
|
+
HTTP_CORSACCESSLIST: 'http_corsAccessList',
|
|
457
|
+
HTTP_CORSACCESSCONTROLALLOWHEADERS: 'http_corsAccessControlAllowHeaders',
|
|
458
|
+
HTTP_HEADERSTIMEOUT: 'http_headersTimeout',
|
|
459
|
+
HTTP_KEEPALIVETIMEOUT: 'http_keepAliveTimeout',
|
|
460
|
+
HTTP_MAXPARAMLENGTH: 'http_maxParamLength',
|
|
461
|
+
HTTP_TIMEOUT: 'http_timeout',
|
|
462
|
+
HTTP_PORT: 'http_port',
|
|
463
|
+
HTTP_SECUREPORT: 'http_securePort',
|
|
464
|
+
HTTP_MTLS: 'http_mtls',
|
|
465
|
+
HTTP_MTLS_REQUIRED: 'http_mtls_required',
|
|
466
|
+
HTTP_MTLS_USER: 'http_mtls_user',
|
|
467
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION: 'http_mtls_certificateVerification',
|
|
468
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_FAILUREMODE: 'http_mtls_certificateVerification_failureMode',
|
|
469
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_CRL: 'http_mtls_certificateVerification_crl',
|
|
470
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_CRL_TIMEOUT: 'http_mtls_certificateVerification_crl_timeout',
|
|
471
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_CRL_CACHETTL: 'http_mtls_certificateVerification_crl_cacheTtl',
|
|
472
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_CRL_FAILUREMODE: 'http_mtls_certificateVerification_crl_failureMode',
|
|
473
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_CRL_GRACEPERIOD: 'http_mtls_certificateVerification_crl_gracePeriod',
|
|
474
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_OCSP: 'http_mtls_certificateVerification_ocsp',
|
|
475
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_OCSP_TIMEOUT: 'http_mtls_certificateVerification_ocsp_timeout',
|
|
476
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_OCSP_CACHETTL: 'http_mtls_certificateVerification_ocsp_cacheTtl',
|
|
477
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_OCSP_ERRORCACHETTL: 'http_mtls_certificateVerification_ocsp_errorCacheTtl',
|
|
478
|
+
HTTP_MTLS_CERTIFICATEVERIFICATION_OCSP_FAILUREMODE: 'http_mtls_certificateVerification_ocsp_failureMode',
|
|
479
|
+
HTTP_MAXHEADERSIZE: 'http_maxHeaderSize',
|
|
480
|
+
HTTP_THREADRANGE: 'http_threadRange',
|
|
481
|
+
HTTP_REQUESTQUEUELIMIT: 'http_requestQueueLimit',
|
|
482
|
+
HTTP_MAXREQUESTBODYSIZE: 'http_maxRequestBodySize',
|
|
483
|
+
HTTP_HTTP2: 'http_http2',
|
|
484
|
+
LICENSE_MODE: 'license_mode',
|
|
485
|
+
LICENSE_REGION: 'license_region',
|
|
486
|
+
LOCALSTUDIO_ENABLED: 'localStudio_enabled',
|
|
487
|
+
LOGGING_COLORS: 'logging_colors',
|
|
488
|
+
LOGGING_CONSOLE: 'logging_console',
|
|
489
|
+
LOGGING_FILE: 'logging_file',
|
|
490
|
+
LOGGING_LEVEL: 'logging_level',
|
|
491
|
+
LOGGING_ROOT: 'logging_root',
|
|
492
|
+
LOGGING_EXTERNAL_LEVEL: 'logging_external_level',
|
|
493
|
+
LOGGING_EXTERNAL_TAG: 'logging_external_tag',
|
|
494
|
+
LOGGING_EXTERNAL_PATH: 'logging_external_path',
|
|
495
|
+
LOGGING_ROTATION_ENABLED: 'logging_rotation_enabled',
|
|
496
|
+
LOGGING_ROTATION_COMPRESS: 'logging_rotation_compress',
|
|
497
|
+
LOGGING_ROTATION_INTERVAL: 'logging_rotation_interval',
|
|
498
|
+
LOGGING_ROTATION_MAXSIZE: 'logging_rotation_maxSize',
|
|
499
|
+
LOGGING_ROTATION_PATH: 'logging_rotation_path',
|
|
500
|
+
LOGGING_ROTATION_RETENTION: 'logging_rotation_retention',
|
|
501
|
+
LOGGING_STDSTREAMS: 'logging_stdStreams',
|
|
502
|
+
LOGGING_AUDITLOG: 'logging_auditLog',
|
|
503
|
+
LOGGING_AUDITRETENTION: 'logging_auditRetention',
|
|
504
|
+
LOGGING_AUDITAUTHEVENTS_LOGFAILED: 'logging_auditAuthEvents_logFailed',
|
|
505
|
+
LOGGING_AUDITAUTHEVENTS_LOGSUCCESSFUL: 'logging_auditAuthEvents_logSuccessful',
|
|
506
|
+
OPERATIONSAPI_NETWORK_CORS: 'operationsApi_network_cors',
|
|
507
|
+
OPERATIONSAPI_NETWORK_CORSACCESSLIST: 'operationsApi_network_corsAccessList',
|
|
508
|
+
OPERATIONSAPI_NETWORK_HEADERSTIMEOUT: 'operationsApi_network_headersTimeout',
|
|
509
|
+
OPERATIONSAPI_NETWORK_HTTPS: 'operationsApi_network_https',
|
|
510
|
+
OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT: 'operationsApi_network_keepAliveTimeout',
|
|
511
|
+
OPERATIONSAPI_NETWORK_PORT: 'operationsApi_network_port',
|
|
512
|
+
OPERATIONSAPI_NETWORK_DOMAINSOCKET: 'operationsApi_network_domainSocket',
|
|
513
|
+
OPERATIONSAPI_NETWORK_SECUREPORT: 'operationsApi_network_securePort',
|
|
514
|
+
OPERATIONSAPI_NETWORK_HTTP2: 'operationsApi_network_http2',
|
|
515
|
+
OPERATIONSAPI_NETWORK_MAXREQUESTBODYSIZE: 'operationsApi_network_maxRequestBodySize',
|
|
516
|
+
OPERATIONSAPI_TLS: 'operationsApi_tls',
|
|
517
|
+
OPERATIONSAPI_TLS_CERTIFICATE: 'operationsApi_tls_certificate',
|
|
518
|
+
OPERATIONSAPI_TLS_PRIVATEKEY: 'operationsApi_tls_privateKey',
|
|
519
|
+
OPERATIONSAPI_TLS_CERTIFICATEAUTHORITY: 'operationsApi_tls_certificateAuthority',
|
|
520
|
+
OPERATIONSAPI_NETWORK_TIMEOUT: 'operationsApi_network_timeout',
|
|
521
|
+
OPERATIONSAPI_SYSINFO_NETWORK: 'operationsApi_sysInfo_network',
|
|
522
|
+
OPERATIONSAPI_SYSINFO_DISK: 'operationsApi_sysInfo_disk',
|
|
523
|
+
REPLICATION: 'replication',
|
|
524
|
+
REPLICATION_HOSTNAME: 'replication_hostname',
|
|
525
|
+
REPLICATION_URL: 'replication_url',
|
|
526
|
+
REPLICATION_PORT: 'replication_port',
|
|
527
|
+
REPLICATION_SECUREPORT: 'replication_securePort',
|
|
528
|
+
REPLICATION_ROUTES: 'replication_routes',
|
|
529
|
+
REPLICATION_DATABASES: 'replication_databases',
|
|
530
|
+
REPLICATION_ENABLEROOTCAS: 'replication_enableRootCAs',
|
|
531
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION: 'replication_mtls_certificateVerification',
|
|
532
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_FAILUREMODE: 'replication_mtls_certificateVerification_failureMode',
|
|
533
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_CRL: 'replication_mtls_certificateVerification_crl',
|
|
534
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_CRL_TIMEOUT: 'replication_mtls_certificateVerification_crl_timeout',
|
|
535
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_CRL_CACHETTL: 'replication_mtls_certificateVerification_crl_cacheTtl',
|
|
536
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_CRL_FAILUREMODE: 'replication_mtls_certificateVerification_crl_failureMode',
|
|
537
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_CRL_GRACEPERIOD: 'replication_mtls_certificateVerification_crl_gracePeriod',
|
|
538
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_OCSP: 'replication_mtls_certificateVerification_ocsp',
|
|
539
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_OCSP_TIMEOUT: 'replication_mtls_certificateVerification_ocsp_timeout',
|
|
540
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_OCSP_CACHETTL: 'replication_mtls_certificateVerification_ocsp_cacheTtl',
|
|
541
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_OCSP_ERRORCACHETTL:
|
|
542
|
+
'replication_mtls_certificateVerification_ocsp_errorCacheTtl',
|
|
543
|
+
REPLICATION_MTLS_CERTIFICATEVERIFICATION_OCSP_FAILUREMODE:
|
|
544
|
+
'replication_mtls_certificateVerification_ocsp_failureMode',
|
|
545
|
+
REPLICATION_SHARD: 'replication_shard',
|
|
546
|
+
REPLICATION_BLOBTIMEOUT: 'replication_blobTimeout',
|
|
547
|
+
REPLICATION_FAILOVER: 'replication_failover',
|
|
548
|
+
REPLICATION_BLOBCONCURRENCY: 'replication_blobConcurrency',
|
|
549
|
+
REPLICATION_MAXPAYLOAD: 'replication_maxPayload',
|
|
550
|
+
REPLICATION_RECORDCONCURRENCY: 'replication_recordConcurrency',
|
|
551
|
+
ROOTPATH: 'rootPath',
|
|
552
|
+
SERIALIZATION_BIGINT: 'serialization_bigInt',
|
|
553
|
+
STORAGE_WRITEASYNC: 'storage_writeAsync',
|
|
554
|
+
STORAGE_OVERLAPPINGSYNC: 'storage_overlappingSync',
|
|
555
|
+
STORAGE_CACHING: 'storage_caching',
|
|
556
|
+
STORAGE_COMPRESSION: 'storage_compression',
|
|
557
|
+
STORAGE_NOREADAHEAD: 'storage_noReadAhead',
|
|
558
|
+
STORAGE_PREFETCHWRITES: 'storage_prefetchWrites',
|
|
559
|
+
STORAGE_ENCRYPTION: 'storage_encryption',
|
|
560
|
+
STORAGE_MAXTRANSACTIONQUEUETIME: 'storage_maxTransactionQueueTime',
|
|
561
|
+
STORAGE_MAXTRANSACTIONOPENTIME: 'storage_maxTransactionOpenTime',
|
|
562
|
+
STORAGE_DEBUGLONGTRANSACTIONS: 'storage_debugLongTransactions',
|
|
563
|
+
STORAGE_PATH: 'storage_path',
|
|
564
|
+
STORAGE_BLOBPATHS: 'storage_blobPaths',
|
|
565
|
+
STORAGE_BLOBCLEANUPSPEED: 'storage_blobCleanupSpeed',
|
|
566
|
+
STORAGE_AUDIT_PATH: 'storage_audit_path',
|
|
567
|
+
STORAGE_MAXFREESPACETOLOAD: 'storage_maxFreeSpaceToLoad',
|
|
568
|
+
STORAGE_MAXFREESPACETORETAIN: 'storage_maxFreeSpaceToRetain',
|
|
569
|
+
STORAGE_PAGESIZE: 'storage_pageSize',
|
|
570
|
+
STORAGE_COMPRESSION_DICTIONARY: 'storage_compression_dictionary',
|
|
571
|
+
STORAGE_COMPRESSION_THRESHOLD: 'storage_compression_threshold',
|
|
572
|
+
STORAGE_COMPACTONSTART: 'storage_compactOnStart',
|
|
573
|
+
STORAGE_COMPACTONSTARTKEEPBACKUP: 'storage_compactOnStartKeepBackup',
|
|
574
|
+
STORAGE_RECLAMATION_THRESHOLD: 'storage_reclamation_threshold',
|
|
575
|
+
STORAGE_RECLAMATION_INTERVAL: 'storage_reclamation_interval',
|
|
576
|
+
STORAGE_RECLAMATION_EVICTIONFACTOR: 'storage_reclamation_evictionFactor',
|
|
577
|
+
STORAGE_ENGINE: 'storage_engine',
|
|
578
|
+
DATABASES: 'databases',
|
|
579
|
+
IGNORE_SCRIPTS: 'ignoreScripts',
|
|
580
|
+
MQTT_NETWORK_PORT: 'mqtt_network_port',
|
|
581
|
+
MQTT_WEBSOCKET: 'mqtt_webSocket',
|
|
582
|
+
MQTT_NETWORK_SECUREPORT: 'mqtt_network_securePort',
|
|
583
|
+
MQTT_NETWORK_MTLS: 'mqtt_network_mtls',
|
|
584
|
+
MQTT_NETWORK_MTLS_REQUIRED: 'mqtt_network_mtls_required',
|
|
585
|
+
MQTT_NETWORK_MTLS_CERTIFICATEAUTHORITY: 'mqtt_network_mtls_certificateAuthority',
|
|
586
|
+
MQTT_NETWORK_MTLS_USER: 'mqtt_network_mtls_user',
|
|
587
|
+
MQTT_REQUIREAUTHENTICATION: 'mqtt_requireAuthentication',
|
|
588
|
+
COMPONENTSROOT: 'componentsRoot',
|
|
589
|
+
TLS_CERTIFICATE: 'tls_certificate',
|
|
590
|
+
TLS_PRIVATEKEY: 'tls_privateKey',
|
|
591
|
+
TLS_CERTIFICATEAUTHORITY: 'tls_certificateAuthority',
|
|
592
|
+
TLS_CIPHERS: 'tls_ciphers',
|
|
593
|
+
TLS: 'tls',
|
|
594
|
+
CLONED: 'cloned',
|
|
595
|
+
NODE_HOSTNAME: 'node_hostname',
|
|
596
|
+
NODE_URL: 'node_url',
|
|
597
|
+
} as const;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* This constant maps user-provided configuration parameters (from CLI, environment variables, etc.) to the
|
|
601
|
+
* case-sensitive configuration parameters. New parameters added to the CONFIG_PARAMS constant above are
|
|
602
|
+
* dynamically included in this mapping via the subsequent for loop, eliminating the need for manual updates.
|
|
603
|
+
* Additionally, this constant serves to map old configuration parameters to their updated counterparts.
|
|
604
|
+
*/
|
|
605
|
+
export const CONFIG_PARAM_MAP = {
|
|
606
|
+
settings_path: BOOT_PROP_PARAMS.SETTINGS_PATH_KEY,
|
|
607
|
+
hdb_root_key: CONFIG_PARAMS.ROOTPATH,
|
|
608
|
+
hdb_root: CONFIG_PARAMS.ROOTPATH,
|
|
609
|
+
rootpath: CONFIG_PARAMS.ROOTPATH,
|
|
610
|
+
server_port_key: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_PORT,
|
|
611
|
+
server_port: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_PORT,
|
|
612
|
+
cert_key: CONFIG_PARAMS.TLS_CERTIFICATE,
|
|
613
|
+
certificate: CONFIG_PARAMS.TLS_CERTIFICATE,
|
|
614
|
+
private_key_key: CONFIG_PARAMS.TLS_PRIVATEKEY,
|
|
615
|
+
private_key: CONFIG_PARAMS.TLS_PRIVATEKEY,
|
|
616
|
+
http_secure_enabled_key: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_HTTPS,
|
|
617
|
+
https_on: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_HTTPS,
|
|
618
|
+
cors_enabled_key: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_CORS,
|
|
619
|
+
cors_on: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_CORS,
|
|
620
|
+
cors_whitelist_key: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_CORSACCESSLIST,
|
|
621
|
+
cors_whitelist: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_CORSACCESSLIST,
|
|
622
|
+
cors_accesslist_key: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_CORSACCESSLIST,
|
|
623
|
+
cors_accesslist: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_CORSACCESSLIST,
|
|
624
|
+
log_level_key: CONFIG_PARAMS.LOGGING_LEVEL,
|
|
625
|
+
log_level: CONFIG_PARAMS.LOGGING_LEVEL,
|
|
626
|
+
log_path_key: CONFIG_PARAMS.LOGGING_ROOT,
|
|
627
|
+
log_path: CONFIG_PARAMS.LOGGING_ROOT,
|
|
628
|
+
max_http_threads: CONFIG_PARAMS.THREADS_COUNT,
|
|
629
|
+
max_hdb_processes: CONFIG_PARAMS.THREADS_COUNT,
|
|
630
|
+
server_timeout_key: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_TIMEOUT,
|
|
631
|
+
server_timeout_ms: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_TIMEOUT,
|
|
632
|
+
server_keep_alive_timeout_key: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT,
|
|
633
|
+
server_keep_alive_timeout: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_KEEPALIVETIMEOUT,
|
|
634
|
+
server_headers_timeout_key: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_HEADERSTIMEOUT,
|
|
635
|
+
server_headers_timeout: CONFIG_PARAMS.OPERATIONSAPI_NETWORK_HEADERSTIMEOUT,
|
|
636
|
+
disable_transaction_log_key: CONFIG_PARAMS.LOGGING_AUDITLOG,
|
|
637
|
+
disable_transaction_log: CONFIG_PARAMS.LOGGING_AUDITLOG,
|
|
638
|
+
operation_token_timeout_key: CONFIG_PARAMS.AUTHENTICATION_OPERATIONTOKENTIMEOUT,
|
|
639
|
+
operation_token_timeout: CONFIG_PARAMS.AUTHENTICATION_OPERATIONTOKENTIMEOUT,
|
|
640
|
+
refresh_token_timeout_key: CONFIG_PARAMS.AUTHENTICATION_REFRESHTOKENTIMEOUT,
|
|
641
|
+
refresh_token_timeout: CONFIG_PARAMS.AUTHENTICATION_REFRESHTOKENTIMEOUT,
|
|
642
|
+
custom_functions_port_key: CONFIG_PARAMS.HTTP_PORT,
|
|
643
|
+
custom_functions_port: CONFIG_PARAMS.HTTP_PORT,
|
|
644
|
+
custom_functions_directory_key: CONFIG_PARAMS.COMPONENTSROOT,
|
|
645
|
+
custom_functions_directory: CONFIG_PARAMS.COMPONENTSROOT,
|
|
646
|
+
max_custom_function_processes: CONFIG_PARAMS.THREADS_COUNT,
|
|
647
|
+
logging_console: CONFIG_PARAMS.LOGGING_CONSOLE,
|
|
648
|
+
log_to_file: CONFIG_PARAMS.LOGGING_FILE,
|
|
649
|
+
log_to_stdstreams: CONFIG_PARAMS.LOGGING_STDSTREAMS,
|
|
650
|
+
local_studio_on: CONFIG_PARAMS.LOCALSTUDIO_ENABLED,
|
|
651
|
+
customfunctions_network_port: CONFIG_PARAMS.HTTP_PORT,
|
|
652
|
+
customfunctions_tls_certificate: CONFIG_PARAMS.TLS_CERTIFICATE,
|
|
653
|
+
customfunctions_network_cors: CONFIG_PARAMS.HTTP_CORS,
|
|
654
|
+
customfunctions_network_corsaccesslist: CONFIG_PARAMS.HTTP_CORSACCESSLIST,
|
|
655
|
+
customfunctions_network_headerstimeout: CONFIG_PARAMS.HTTP_HEADERSTIMEOUT,
|
|
656
|
+
customfunctions_network_https: CONFIG_PARAMS.CUSTOMFUNCTIONS_NETWORK_HTTPS,
|
|
657
|
+
customfunctions_network_keepalivetimeout: CONFIG_PARAMS.HTTP_KEEPALIVETIMEOUT,
|
|
658
|
+
customfunctions_tls_privatekey: CONFIG_PARAMS.TLS_PRIVATEKEY,
|
|
659
|
+
customfunctions_tls_certificateauthority: CONFIG_PARAMS.TLS_CERTIFICATEAUTHORITY,
|
|
660
|
+
customfunctions_network_timeout: CONFIG_PARAMS.HTTP_TIMEOUT,
|
|
661
|
+
customfunctions_tls: CONFIG_PARAMS.TLS,
|
|
662
|
+
http_threads: CONFIG_PARAMS.THREADS_COUNT,
|
|
663
|
+
threads: CONFIG_PARAMS.THREADS_COUNT,
|
|
664
|
+
threads_count: CONFIG_PARAMS.THREADS_COUNT,
|
|
665
|
+
customfunctions_processes: CONFIG_PARAMS.THREADS_COUNT,
|
|
666
|
+
customfunctions_root: CONFIG_PARAMS.COMPONENTSROOT,
|
|
667
|
+
operationsapi_root: CONFIG_PARAMS.ROOTPATH,
|
|
668
|
+
node_hostname: CONFIG_PARAMS.NODE_HOSTNAME,
|
|
669
|
+
node_url: CONFIG_PARAMS.NODE_URL,
|
|
670
|
+
}; // This object is dynamically populated below so don't mark as const until we can fix this up.
|
|
671
|
+
|
|
672
|
+
for (const key in CONFIG_PARAMS) {
|
|
673
|
+
const name = CONFIG_PARAMS[key];
|
|
674
|
+
CONFIG_PARAM_MAP[name.toLowerCase()] = name;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/** Database parameter config */
|
|
678
|
+
export const DATABASES_PARAM_CONFIG = {
|
|
679
|
+
TABLES: 'tables',
|
|
680
|
+
PATH: 'path',
|
|
681
|
+
AUDIT_PATH: 'auditPath',
|
|
682
|
+
} as const;
|
|
683
|
+
|
|
684
|
+
/** Describes all available job types */
|
|
685
|
+
export const JOB_TYPE_ENUM = {
|
|
686
|
+
csv_file_load: 'csv_file_load',
|
|
687
|
+
csv_data_load: OPERATIONS_ENUM.CSV_DATA_LOAD,
|
|
688
|
+
csv_url_load: OPERATIONS_ENUM.CSV_URL_LOAD,
|
|
689
|
+
delete_files_before: 'delete_files_before',
|
|
690
|
+
delete_records_before: 'delete_records_before',
|
|
691
|
+
delete_audit_logs_before: 'delete_audit_logs_before',
|
|
692
|
+
delete_transaction_logs_before: 'delete_transaction_logs_before',
|
|
693
|
+
empty_trash: 'empty_trash',
|
|
694
|
+
export_local: 'export_local',
|
|
695
|
+
export_to_s3: 'export_to_s3',
|
|
696
|
+
import_from_s3: 'import_from_s3',
|
|
697
|
+
restart_service: 'restart_service',
|
|
698
|
+
} as const;
|
|
699
|
+
|
|
700
|
+
/** Specifies values for licenses */
|
|
701
|
+
export const LICENSE_VALUES = {
|
|
702
|
+
VERSION_DEFAULT: '2.2.0',
|
|
703
|
+
} as const;
|
|
704
|
+
|
|
705
|
+
/** The maximum ram allocation in MB per HDB child process */
|
|
706
|
+
export const RAM_ALLOCATION_ENUM = {
|
|
707
|
+
DEVELOPMENT: 8192, //8GB
|
|
708
|
+
DEFAULT: 512, //.5GB
|
|
709
|
+
} as const;
|
|
710
|
+
|
|
711
|
+
/** Common Node.js Error Codes */
|
|
712
|
+
export const NODE_ERROR_CODES = {
|
|
713
|
+
ENOENT: 'ENOENT', // No such file or directory.
|
|
714
|
+
EACCES: 'EACCES', // Permission denied.
|
|
715
|
+
EEXIST: 'EEXIST', // File already exists.
|
|
716
|
+
ERR_INVALID_ARG_TYPE: 'ERR_INVALID_ARG_TYPE',
|
|
717
|
+
} as const;
|
|
718
|
+
|
|
719
|
+
// TODO: Wherever this is used, replace this with a private property
|
|
720
|
+
/** Symbol for metadata */
|
|
721
|
+
export const METADATA_PROPERTY = Symbol('metadata');
|
|
722
|
+
|
|
723
|
+
const CREATED_TIME = '__createdtime__';
|
|
724
|
+
const UPDATED_TIME = '__updatedtime__';
|
|
725
|
+
|
|
726
|
+
/** Timestamp keys */
|
|
727
|
+
export const TIME_STAMP_NAMES_ENUM = {
|
|
728
|
+
CREATED_TIME,
|
|
729
|
+
UPDATED_TIME,
|
|
730
|
+
} as const;
|
|
731
|
+
|
|
732
|
+
/** Timestamp values */
|
|
733
|
+
export const TIME_STAMP_NAMES = [CREATED_TIME, UPDATED_TIME] as const;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* This value is used to help evaluate whether or not a permissions translation error is related to old permissions values or if it could be another code-related bug/error.
|
|
737
|
+
*/
|
|
738
|
+
export const PERMS_UPDATE_RELEASE_TIMESTAMP = 1598486400000;
|
|
739
|
+
|
|
740
|
+
/** Search comparator value strings */
|
|
741
|
+
export const VALUE_SEARCH_COMPARATORS = {
|
|
742
|
+
LESS: '<',
|
|
743
|
+
LESS_OR_EQ: '<=',
|
|
744
|
+
GREATER: '>',
|
|
745
|
+
GREATER_OR_EQ: '>=',
|
|
746
|
+
BETWEEN: '...',
|
|
747
|
+
} as const;
|
|
748
|
+
|
|
749
|
+
/** Inverted form of VALUE_SEARCH_COMPARATORS */
|
|
750
|
+
export const VALUE_SEARCH_COMPARATORS_REVERSE_LOOKUP = {
|
|
751
|
+
'<': 'LESS',
|
|
752
|
+
'<=': 'LESS_OR_EQ',
|
|
753
|
+
'>': 'GREATER',
|
|
754
|
+
'>=': 'GREATER_OR_EQ',
|
|
755
|
+
'...': 'BETWEEN',
|
|
756
|
+
} as const;
|
|
757
|
+
|
|
758
|
+
/** Standard CRUD operation map */
|
|
759
|
+
export const PERMS_CRUD_ENUM = {
|
|
760
|
+
READ: 'read',
|
|
761
|
+
INSERT: 'insert',
|
|
762
|
+
UPDATE: 'update',
|
|
763
|
+
DELETE: 'delete',
|
|
764
|
+
} as const;
|
|
765
|
+
|
|
766
|
+
/** Search wildcards */
|
|
767
|
+
export const SEARCH_WILDCARDS = ['*', '%'] as const;
|
|
768
|
+
|
|
769
|
+
/** Function value used in data layer and SQL transactions */
|
|
770
|
+
export const FUNC_VAL = 'func_val';
|
|
771
|
+
|
|
772
|
+
/** Audit log search types for read operation */
|
|
773
|
+
export const READ_AUDIT_LOG_SEARCH_TYPES_ENUM = {
|
|
774
|
+
HASH_VALUE: 'hash_value',
|
|
775
|
+
TIMESTAMP: 'timestamp',
|
|
776
|
+
USERNAME: 'username',
|
|
777
|
+
} as const;
|
|
778
|
+
|
|
779
|
+
/** JWT key and pass file names */
|
|
780
|
+
export const JWT_ENUM = {
|
|
781
|
+
JWT_PRIVATE_KEY_NAME: '.jwtPrivate.key',
|
|
782
|
+
JWT_PUBLIC_KEY_NAME: '.jwtPublic.key',
|
|
783
|
+
JWT_PASSPHRASE_NAME: '.jwtPass',
|
|
784
|
+
} as const;
|
|
785
|
+
|
|
786
|
+
/** ITC Channel Event types */
|
|
787
|
+
export const ITC_EVENT_TYPES = {
|
|
788
|
+
SHUTDOWN: 'shutdown',
|
|
789
|
+
CHILD_STARTED: 'child_started',
|
|
790
|
+
CHILD_STOPPED: 'child_stopped',
|
|
791
|
+
SCHEMA: 'schema',
|
|
792
|
+
USER: 'user',
|
|
793
|
+
METRICS: 'metrics',
|
|
794
|
+
GET_METRICS: 'get_metrics',
|
|
795
|
+
RESTART: 'restart',
|
|
796
|
+
START_JOB: 'start_job',
|
|
797
|
+
COMPONENT_STATUS_REQUEST: 'component_status_request',
|
|
798
|
+
COMPONENT_STATUS_RESPONSE: 'component_status_response',
|
|
799
|
+
} as const;
|
|
800
|
+
|
|
801
|
+
/** Supported thread types */
|
|
802
|
+
export const THREAD_TYPES = {
|
|
803
|
+
HTTP: 'http',
|
|
804
|
+
} as const;
|
|
805
|
+
|
|
806
|
+
/** A version string for pre 4.0.0 comparison */
|
|
807
|
+
export const PRE_4_0_0_VERSION = '3.x.x';
|
|
808
|
+
|
|
809
|
+
/** Authentication audit statusses */
|
|
810
|
+
export const AUTH_AUDIT_STATUS = {
|
|
811
|
+
SUCCESS: 'success',
|
|
812
|
+
FAILURE: 'failure',
|
|
813
|
+
} as const;
|
|
814
|
+
|
|
815
|
+
/** Authentication audit types */
|
|
816
|
+
export const AUTH_AUDIT_TYPES = {
|
|
817
|
+
AUTHENTICATION: 'authentication',
|
|
818
|
+
AUTHORIZATION: 'authorization',
|
|
819
|
+
} as const;
|