@twin.org/node-core 0.0.3-next.6 → 0.0.3-next.60
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 +3 -1
- package/dist/es/builders/engineEnvBuilder.js +538 -213
- package/dist/es/builders/engineEnvBuilder.js.map +1 -1
- package/dist/es/builders/engineServerEnvBuilder.js +86 -39
- package/dist/es/builders/engineServerEnvBuilder.js.map +1 -1
- package/dist/es/builders/extensionsBuilder.js +3 -3
- package/dist/es/builders/extensionsBuilder.js.map +1 -1
- package/dist/es/cli.js +254 -0
- package/dist/es/cli.js.map +1 -0
- package/dist/es/commands/bootstrapLegacy.js +311 -0
- package/dist/es/commands/bootstrapLegacy.js.map +1 -0
- package/dist/es/commands/help.js +86 -0
- package/dist/es/commands/help.js.map +1 -0
- package/dist/es/commands/identityCreate.js +377 -0
- package/dist/es/commands/identityCreate.js.map +1 -0
- package/dist/es/commands/identityImports.js +83 -0
- package/dist/es/commands/identityImports.js.map +1 -0
- package/dist/es/commands/identityVerifiableCredentialCreate.js +146 -0
- package/dist/es/commands/identityVerifiableCredentialCreate.js.map +1 -0
- package/dist/es/commands/identityVerificationMethodCreate.js +230 -0
- package/dist/es/commands/identityVerificationMethodCreate.js.map +1 -0
- package/dist/es/commands/identityVerificationMethodImport.js +127 -0
- package/dist/es/commands/identityVerificationMethodImport.js.map +1 -0
- package/dist/es/commands/nodeSetIdentity.js +69 -0
- package/dist/es/commands/nodeSetIdentity.js.map +1 -0
- package/dist/es/commands/removeTenantOrgAlias.js +83 -0
- package/dist/es/commands/removeTenantOrgAlias.js.map +1 -0
- package/dist/es/commands/setNodeOrgId.js +62 -0
- package/dist/es/commands/setNodeOrgId.js.map +1 -0
- package/dist/es/commands/setTenantOrgId.js +99 -0
- package/dist/es/commands/setTenantOrgId.js.map +1 -0
- package/dist/es/commands/tenantCreate.js +165 -0
- package/dist/es/commands/tenantCreate.js.map +1 -0
- package/dist/es/commands/tenantImport.js +108 -0
- package/dist/es/commands/tenantImport.js.map +1 -0
- package/dist/es/commands/tenantUpdate.js +108 -0
- package/dist/es/commands/tenantUpdate.js.map +1 -0
- package/dist/es/commands/userCreate.js +239 -0
- package/dist/es/commands/userCreate.js.map +1 -0
- package/dist/es/commands/userUpdate.js +154 -0
- package/dist/es/commands/userUpdate.js.map +1 -0
- package/dist/es/commands/vaultKeyCreate.js +191 -0
- package/dist/es/commands/vaultKeyCreate.js.map +1 -0
- package/dist/es/commands/vaultKeyImport.js +105 -0
- package/dist/es/commands/vaultKeyImport.js.map +1 -0
- package/dist/es/defaults.js +37 -2
- package/dist/es/defaults.js.map +1 -1
- package/dist/es/index.js +11 -4
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/ICliArgs.js +4 -0
- package/dist/es/models/ICliArgs.js.map +1 -0
- package/dist/es/models/ICliCommand.js +2 -0
- package/dist/es/models/ICliCommand.js.map +1 -0
- package/dist/es/models/ICliCommandDefinition.js +2 -0
- package/dist/es/models/ICliCommandDefinition.js.map +1 -0
- package/dist/es/models/ICliCommandDefinitionParam.js +2 -0
- package/dist/es/models/ICliCommandDefinitionParam.js.map +1 -0
- package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -1
- package/dist/es/models/IEngineServerEnvironmentVariables.js.map +1 -1
- package/dist/es/models/INodeEngineState.js.map +1 -1
- package/dist/es/models/INodeEnvironmentVariables.js.map +1 -1
- package/dist/es/models/INodeOptions.js.map +1 -1
- package/dist/es/models/cliCommandParamType.js +4 -0
- package/dist/es/models/cliCommandParamType.js.map +1 -0
- package/dist/es/models/nodeExtensionInitialiseEngineMethod.js +2 -0
- package/dist/es/models/nodeExtensionInitialiseEngineMethod.js.map +1 -0
- package/dist/es/models/nodeExtensionInitialiseEngineServerMethod.js +2 -0
- package/dist/es/models/nodeExtensionInitialiseEngineServerMethod.js.map +1 -0
- package/dist/es/models/nodeExtensionInitialiseMethod.js +2 -0
- package/dist/es/models/nodeExtensionInitialiseMethod.js.map +1 -0
- package/dist/es/models/nodeExtensionShutdownMethod.js +4 -0
- package/dist/es/models/nodeExtensionShutdownMethod.js.map +1 -0
- package/dist/es/node.js +87 -40
- package/dist/es/node.js.map +1 -1
- package/dist/es/start.js +189 -0
- package/dist/es/start.js.map +1 -0
- package/dist/es/utils.js +24 -27
- package/dist/es/utils.js.map +1 -1
- package/dist/types/builders/engineEnvBuilder.d.ts +60 -5
- package/dist/types/builders/engineServerEnvBuilder.d.ts +11 -2
- package/dist/types/builders/extensionsBuilder.d.ts +3 -3
- package/dist/types/cli.d.ts +56 -0
- package/dist/types/commands/bootstrapLegacy.d.ts +67 -0
- package/dist/types/commands/help.d.ts +24 -0
- package/dist/types/commands/identityCreate.d.ts +45 -0
- package/dist/types/commands/identityImports.d.ts +25 -0
- package/dist/types/commands/identityVerifiableCredentialCreate.d.ts +43 -0
- package/dist/types/commands/identityVerificationMethodCreate.d.ts +47 -0
- package/dist/types/commands/identityVerificationMethodImport.d.ts +32 -0
- package/dist/types/commands/nodeSetIdentity.d.ts +23 -0
- package/dist/types/commands/removeTenantOrgAlias.d.ts +24 -0
- package/dist/types/commands/setNodeOrgId.d.ts +24 -0
- package/dist/types/commands/setTenantOrgId.d.ts +38 -0
- package/dist/types/commands/tenantCreate.d.ts +41 -0
- package/dist/types/commands/tenantImport.d.ts +29 -0
- package/dist/types/commands/tenantUpdate.d.ts +29 -0
- package/dist/types/commands/userCreate.d.ts +51 -0
- package/dist/types/commands/userUpdate.d.ts +40 -0
- package/dist/types/commands/vaultKeyCreate.d.ts +43 -0
- package/dist/types/commands/vaultKeyImport.d.ts +29 -0
- package/dist/types/defaults.d.ts +30 -2
- package/dist/types/index.d.ts +11 -4
- package/dist/types/models/ICliArgs.d.ts +20 -0
- package/dist/types/models/ICliCommand.d.ts +17 -0
- package/dist/types/models/ICliCommandDefinition.d.ts +46 -0
- package/dist/types/models/ICliCommandDefinitionParam.d.ts +35 -0
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +168 -95
- package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +8 -0
- package/dist/types/models/INodeEngineState.d.ts +2 -9
- package/dist/types/models/INodeEnvironmentVariables.d.ts +0 -38
- package/dist/types/models/INodeOptions.d.ts +6 -2
- package/dist/types/models/cliCommandParamType.d.ts +4 -0
- package/dist/types/models/nodeExtensionInitialiseEngineMethod.d.ts +8 -0
- package/dist/types/models/nodeExtensionInitialiseEngineServerMethod.d.ts +9 -0
- package/dist/types/models/nodeExtensionInitialiseMethod.d.ts +9 -0
- package/dist/types/models/nodeExtensionShutdownMethod.d.ts +6 -0
- package/dist/types/node.d.ts +5 -4
- package/dist/types/{server.d.ts → start.d.ts} +4 -2
- package/dist/types/utils.d.ts +9 -10
- package/docs/changelog.md +675 -180
- package/docs/examples.md +99 -1
- package/docs/reference/functions/buildConfiguration.md +1 -1
- package/docs/reference/functions/buildEngineConfiguration.md +1 -7
- package/docs/reference/functions/buildEngineServerConfiguration.md +1 -1
- package/docs/reference/functions/constructCliCommand.md +27 -0
- package/docs/reference/functions/executeCommand.md +29 -0
- package/docs/reference/functions/extensionsInitialiseEngine.md +1 -1
- package/docs/reference/functions/extensionsInitialiseEngineServer.md +1 -1
- package/docs/reference/functions/getEnvDefaults.md +19 -0
- package/docs/reference/functions/getScriptDirectory.md +19 -0
- package/docs/reference/functions/initialiseLocales.md +2 -0
- package/docs/reference/functions/isAuthEntityStorageRequired.md +20 -0
- package/docs/reference/functions/isAutomationRequired.md +20 -0
- package/docs/reference/functions/isBackgroundTasksRequired.md +20 -0
- package/docs/reference/functions/isFederatedCatalogueRequired.md +20 -0
- package/docs/reference/functions/isImmutableProofRequired.md +20 -0
- package/docs/reference/functions/isRightsManagementRequired.md +23 -0
- package/docs/reference/functions/isTaskSchedulerRequired.md +20 -0
- package/docs/reference/functions/isTelemetryRequired.md +20 -0
- package/docs/reference/functions/isTrustRequired.md +20 -0
- package/docs/reference/functions/loadJsonFile.md +1 -1
- package/docs/reference/functions/loadTextFile.md +1 -1
- package/docs/reference/functions/parseCommandLineArgs.md +19 -0
- package/docs/reference/functions/processEnvOptions.md +27 -0
- package/docs/reference/functions/registerCommands.md +9 -0
- package/docs/reference/functions/resolvePackageEntryPoint.md +2 -2
- package/docs/reference/functions/run.md +8 -2
- package/docs/reference/functions/shutdownExtensions.md +1 -1
- package/docs/reference/functions/start.md +9 -3
- package/docs/reference/functions/substituteEnvOptions.md +25 -0
- package/docs/reference/index.md +24 -14
- package/docs/reference/interfaces/ICacheMetadata.md +3 -3
- package/docs/reference/interfaces/ICliArgs.md +35 -0
- package/docs/reference/interfaces/ICliCommand.md +23 -0
- package/docs/reference/interfaces/ICliCommandDefinition.md +101 -0
- package/docs/reference/interfaces/ICliCommandDefinitionParam.md +65 -0
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +488 -359
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +652 -431
- package/docs/reference/interfaces/IModuleProtocol.md +3 -3
- package/docs/reference/interfaces/INodeEngineState.md +6 -21
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +661 -516
- package/docs/reference/interfaces/INodeOptions.md +44 -36
- package/docs/reference/interfaces/IProtocolHandlerResult.md +2 -2
- package/docs/reference/type-aliases/CliCommandParamType.md +5 -0
- package/docs/reference/type-aliases/NodeExtensionInitialiseEngineMethod.md +3 -1
- package/docs/reference/type-aliases/NodeExtensionInitialiseEngineServerMethod.md +3 -1
- package/docs/reference/type-aliases/NodeExtensionInitialiseMethod.md +3 -1
- package/docs/reference/type-aliases/NodeExtensionShutdownMethod.md +3 -1
- package/docs/reference/variables/ATTESTATION_VERIFICATION_METHOD_ID.md +2 -0
- package/docs/reference/variables/AUTH_SIGNING_KEY_ID.md +2 -0
- package/docs/reference/variables/BLOB_STORAGE_ENCRYPTION_KEY_ID.md +2 -0
- package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_DID.md +2 -0
- package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_TENANT.md +2 -0
- package/docs/reference/variables/IMMUTABLE_PROOF_VERIFICATION_METHOD_ID.md +2 -0
- package/docs/reference/variables/ModuleProtocol.md +5 -5
- package/docs/reference/variables/TRUST_VERIFICATION_METHOD_ID.md +5 -0
- package/locales/en.json +674 -30
- package/package.json +10 -6
- package/dist/es/bootstrap.js +0 -366
- package/dist/es/bootstrap.js.map +0 -1
- package/dist/es/identity.js +0 -182
- package/dist/es/identity.js.map +0 -1
- package/dist/es/models/nodeExtensionMethods.js +0 -2
- package/dist/es/models/nodeExtensionMethods.js.map +0 -1
- package/dist/es/models/nodeFeatures.js +0 -21
- package/dist/es/models/nodeFeatures.js.map +0 -1
- package/dist/es/server.js +0 -81
- package/dist/es/server.js.map +0 -1
- package/dist/types/bootstrap.d.ts +0 -68
- package/dist/types/identity.d.ts +0 -14
- package/dist/types/models/nodeExtensionMethods.d.ts +0 -27
- package/dist/types/models/nodeFeatures.d.ts +0 -21
- package/docs/detailed-guide.md +0 -129
- package/docs/reference/functions/bootstrap.md +0 -29
- package/docs/reference/functions/bootstrapAuth.md +0 -35
- package/docs/reference/functions/bootstrapBlobEncryption.md +0 -35
- package/docs/reference/functions/bootstrapImmutableProofMethod.md +0 -35
- package/docs/reference/functions/bootstrapNodeAdminUser.md +0 -35
- package/docs/reference/functions/bootstrapNodeId.md +0 -35
- package/docs/reference/functions/bootstrapSynchronisedStorage.md +0 -35
- package/docs/reference/functions/bootstrapTenantId.md +0 -35
- package/docs/reference/functions/getFeatures.md +0 -19
- package/docs/reference/type-aliases/NodeFeatures.md +0 -5
- package/docs/reference/variables/NodeFeatures.md +0 -25
- package/docs/reference/variables/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md +0 -3
- package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +0 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
import type { ICliCommandDefinition } from "../models/ICliCommandDefinition.js";
|
|
3
|
+
import type { INodeEngineConfig } from "../models/INodeEngineConfig.js";
|
|
4
|
+
import type { INodeEngineState } from "../models/INodeEngineState.js";
|
|
5
|
+
import type { INodeEnvironmentVariables } from "../models/INodeEnvironmentVariables.js";
|
|
6
|
+
/**
|
|
7
|
+
* Get the command definition parameters.
|
|
8
|
+
* @param commandDefinitions The registered command definitions.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCommandDefinitionVaultKeyImport(commandDefinitions: {
|
|
11
|
+
[id: string]: ICliCommandDefinition;
|
|
12
|
+
}): void;
|
|
13
|
+
/**
|
|
14
|
+
* Command for importing a vault key.
|
|
15
|
+
* @param engineCore The engine core.
|
|
16
|
+
* @param envVars The environment variables for the node.
|
|
17
|
+
* @param params The parameters for the command.
|
|
18
|
+
* @param params.identity The DID to import the vault key for.
|
|
19
|
+
* @param params.keyId The ID of the key to import.
|
|
20
|
+
* @param params.keyType The type of key to import.
|
|
21
|
+
* @param params.privateKeyHex The private key in hexadecimal format.
|
|
22
|
+
* @returns A promise that resolves when the key has been imported into the vault.
|
|
23
|
+
*/
|
|
24
|
+
export declare function vaultKeyImport(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
|
|
25
|
+
identity?: string;
|
|
26
|
+
keyType?: string;
|
|
27
|
+
keyId?: string;
|
|
28
|
+
privateKeyHex?: string;
|
|
29
|
+
}): Promise<void>;
|
package/dist/types/defaults.d.ts
CHANGED
|
@@ -1,8 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default verification method fragment ID for attestation.
|
|
3
|
+
*/
|
|
1
4
|
export declare const ATTESTATION_VERIFICATION_METHOD_ID = "attestation-assertion";
|
|
5
|
+
/**
|
|
6
|
+
* Default verification method fragment ID for immutable proofs.
|
|
7
|
+
*/
|
|
2
8
|
export declare const IMMUTABLE_PROOF_VERIFICATION_METHOD_ID = "immutable-proof-assertion";
|
|
9
|
+
/**
|
|
10
|
+
* Default vault key ID for blob storage encryption.
|
|
11
|
+
*/
|
|
3
12
|
export declare const BLOB_STORAGE_ENCRYPTION_KEY_ID = "blob-encryption";
|
|
4
|
-
|
|
5
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Default verification method fragment ID for trust assertions.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TRUST_VERIFICATION_METHOD_ID = "trust-assertion";
|
|
17
|
+
/**
|
|
18
|
+
* Default vault key ID used for signing authentication tokens.
|
|
19
|
+
*/
|
|
6
20
|
export declare const AUTH_SIGNING_KEY_ID = "auth-signing";
|
|
21
|
+
/**
|
|
22
|
+
* Feature tag identifying the DID context ID handler.
|
|
23
|
+
*/
|
|
7
24
|
export declare const CONTEXT_ID_HANDLER_FEATURE_DID = "did";
|
|
25
|
+
/**
|
|
26
|
+
* Feature tag identifying the tenant context ID handler.
|
|
27
|
+
*/
|
|
8
28
|
export declare const CONTEXT_ID_HANDLER_FEATURE_TENANT = "tenant";
|
|
29
|
+
/**
|
|
30
|
+
* Get the default environment variables for the node.
|
|
31
|
+
* @param envPrefix The environment variable prefix.
|
|
32
|
+
* @returns The default environment variables.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getEnvDefaults(envPrefix: string): {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
export * from "./bootstrap.js";
|
|
2
1
|
export * from "./builders/engineEnvBuilder.js";
|
|
3
2
|
export * from "./builders/engineServerEnvBuilder.js";
|
|
4
3
|
export * from "./builders/extensionsBuilder.js";
|
|
4
|
+
export * from "./cli.js";
|
|
5
5
|
export * from "./defaults.js";
|
|
6
|
+
export * from "./models/cliCommandParamType.js";
|
|
6
7
|
export * from "./models/ICacheMetadata.js";
|
|
8
|
+
export * from "./models/ICliArgs.js";
|
|
9
|
+
export * from "./models/ICliCommand.js";
|
|
10
|
+
export * from "./models/ICliCommandDefinition.js";
|
|
11
|
+
export * from "./models/ICliCommandDefinitionParam.js";
|
|
7
12
|
export * from "./models/IEngineEnvironmentVariables.js";
|
|
8
13
|
export * from "./models/IEngineServerEnvironmentVariables.js";
|
|
9
14
|
export * from "./models/IModuleProtocol.js";
|
|
@@ -13,8 +18,10 @@ export * from "./models/INodeEnvironmentVariables.js";
|
|
|
13
18
|
export * from "./models/INodeOptions.js";
|
|
14
19
|
export * from "./models/IProtocolHandlerResult.js";
|
|
15
20
|
export * from "./models/moduleProtocol.js";
|
|
16
|
-
export * from "./models/
|
|
17
|
-
export * from "./models/
|
|
21
|
+
export * from "./models/nodeExtensionInitialiseEngineMethod.js";
|
|
22
|
+
export * from "./models/nodeExtensionInitialiseEngineServerMethod.js";
|
|
23
|
+
export * from "./models/nodeExtensionInitialiseMethod.js";
|
|
24
|
+
export * from "./models/nodeExtensionShutdownMethod.js";
|
|
18
25
|
export * from "./node.js";
|
|
19
|
-
export * from "./
|
|
26
|
+
export * from "./start.js";
|
|
20
27
|
export * from "./utils.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsed command line arguments passed to the CLI.
|
|
3
|
+
*/
|
|
4
|
+
export interface ICliArgs {
|
|
5
|
+
/**
|
|
6
|
+
* The path of the node executable.
|
|
7
|
+
*/
|
|
8
|
+
nodePath?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The path of the script to execute.
|
|
11
|
+
*/
|
|
12
|
+
scriptPath?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The command line options.
|
|
15
|
+
*/
|
|
16
|
+
options?: {
|
|
17
|
+
key: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CliCommandParamType } from "./cliCommandParamType.js";
|
|
2
|
+
import type { ICliCommandDefinition } from "./ICliCommandDefinition.js";
|
|
3
|
+
/**
|
|
4
|
+
* A resolved CLI command ready for execution, pairing a definition with its populated parameters.
|
|
5
|
+
*/
|
|
6
|
+
export interface ICliCommand {
|
|
7
|
+
/**
|
|
8
|
+
* The command to execute.
|
|
9
|
+
*/
|
|
10
|
+
definition: ICliCommandDefinition;
|
|
11
|
+
/**
|
|
12
|
+
* The params to execute the command with.
|
|
13
|
+
*/
|
|
14
|
+
params: {
|
|
15
|
+
[id: string]: CliCommandParamType;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
import type { CliCommandParamType } from "./cliCommandParamType.js";
|
|
3
|
+
import type { ICliCommandDefinitionParam } from "./ICliCommandDefinitionParam.js";
|
|
4
|
+
import type { INodeEnvironmentVariables } from "./INodeEnvironmentVariables.js";
|
|
5
|
+
/**
|
|
6
|
+
* Static definition of a CLI command including its name, parameters, and execution action.
|
|
7
|
+
*/
|
|
8
|
+
export interface ICliCommandDefinition {
|
|
9
|
+
/**
|
|
10
|
+
* The command name.
|
|
11
|
+
*/
|
|
12
|
+
command: string;
|
|
13
|
+
/**
|
|
14
|
+
* The command description.
|
|
15
|
+
*/
|
|
16
|
+
description: string;
|
|
17
|
+
/**
|
|
18
|
+
* An example invocation string shown in help output.
|
|
19
|
+
*/
|
|
20
|
+
example: string;
|
|
21
|
+
/**
|
|
22
|
+
* The params available for the command.
|
|
23
|
+
*/
|
|
24
|
+
params: ICliCommandDefinitionParam[];
|
|
25
|
+
/**
|
|
26
|
+
* The method to execute for the command.
|
|
27
|
+
*/
|
|
28
|
+
action: (engineCore: IEngineCore, envVars: INodeEnvironmentVariables, params: {
|
|
29
|
+
[id: string]: CliCommandParamType;
|
|
30
|
+
}) => Promise<unknown>;
|
|
31
|
+
/**
|
|
32
|
+
* Indicates whether the engine needs to be started before executing the command.
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
requiresEngineStarted?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Indicates whether the engine needs the node identity to be set if configured to use.
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
requiresNodeIdentity?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Indicates whether the engine needs the organization identity to be set.
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
requiresOrgIdentity?: boolean;
|
|
46
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CliCommandParamType } from "./cliCommandParamType.js";
|
|
2
|
+
/**
|
|
3
|
+
* Definition of a single parameter accepted by a CLI command.
|
|
4
|
+
*/
|
|
5
|
+
export interface ICliCommandDefinitionParam {
|
|
6
|
+
/**
|
|
7
|
+
* The param key.
|
|
8
|
+
*/
|
|
9
|
+
key: string;
|
|
10
|
+
/**
|
|
11
|
+
* The param type.
|
|
12
|
+
*/
|
|
13
|
+
type: "string" | "number" | "boolean";
|
|
14
|
+
/**
|
|
15
|
+
* Possible options for the param.
|
|
16
|
+
*/
|
|
17
|
+
options?: string[];
|
|
18
|
+
/**
|
|
19
|
+
* The extended type e.g. hex etc.
|
|
20
|
+
*/
|
|
21
|
+
extendedType?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the param is required.
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
required?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The default value of the param.
|
|
29
|
+
*/
|
|
30
|
+
defaultValue?: CliCommandParamType;
|
|
31
|
+
/**
|
|
32
|
+
* The param description.
|
|
33
|
+
*/
|
|
34
|
+
description: string;
|
|
35
|
+
}
|
|
@@ -6,6 +6,10 @@ export interface IEngineEnvironmentVariables {
|
|
|
6
6
|
* Start the engine in debug mode.
|
|
7
7
|
*/
|
|
8
8
|
debug?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Start the engine in silent mode.
|
|
11
|
+
*/
|
|
12
|
+
silent?: string;
|
|
9
13
|
/**
|
|
10
14
|
* The root directory for storing items like state file.
|
|
11
15
|
*/
|
|
@@ -18,14 +22,6 @@ export interface IEngineEnvironmentVariables {
|
|
|
18
22
|
* Is multi-tenant support enabled, defaults to false.
|
|
19
23
|
*/
|
|
20
24
|
tenantEnabled?: string;
|
|
21
|
-
/**
|
|
22
|
-
* A tenant id to use as a default for the node.
|
|
23
|
-
*/
|
|
24
|
-
tenantId?: string;
|
|
25
|
-
/**
|
|
26
|
-
* A tenant api key to use as a default for the node.
|
|
27
|
-
*/
|
|
28
|
-
tenantApiKey?: string;
|
|
29
25
|
/**
|
|
30
26
|
* The type of the entity storage to create, comma separate for more than one connector.
|
|
31
27
|
* values: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql
|
|
@@ -94,7 +90,7 @@ export interface IEngineEnvironmentVariables {
|
|
|
94
90
|
/**
|
|
95
91
|
* GCP Firestore endpoint.
|
|
96
92
|
*/
|
|
97
|
-
|
|
93
|
+
gcpFirestoreEndpoint?: string;
|
|
98
94
|
/**
|
|
99
95
|
* GCP Firestore project id.
|
|
100
96
|
*/
|
|
@@ -192,10 +188,6 @@ export interface IEngineEnvironmentVariables {
|
|
|
192
188
|
* The default blob storage connector to use, defaults to the first one in the list.
|
|
193
189
|
*/
|
|
194
190
|
blobStorageConnectorDefault?: string;
|
|
195
|
-
/**
|
|
196
|
-
* Blog storage connector which has public access.
|
|
197
|
-
*/
|
|
198
|
-
blobStorageConnectorPublic?: string;
|
|
199
191
|
/**
|
|
200
192
|
* Enable encryption for the blob storage.
|
|
201
193
|
*/
|
|
@@ -204,11 +196,6 @@ export interface IEngineEnvironmentVariables {
|
|
|
204
196
|
* The id of the encryption key for the blob storage.
|
|
205
197
|
*/
|
|
206
198
|
blobStorageEncryptionKeyId?: string;
|
|
207
|
-
/**
|
|
208
|
-
* A symmetric encryption key for the blob storage, should be ChaCha20Poly1305 in base64 format.
|
|
209
|
-
* If encryption is enabled but a key is not provided one will be generated.
|
|
210
|
-
*/
|
|
211
|
-
blobStorageSymmetricEncryptionKey?: string;
|
|
212
199
|
/**
|
|
213
200
|
* A prefix for all the blobs in blob-storage, can be empty.
|
|
214
201
|
*/
|
|
@@ -273,6 +260,10 @@ export interface IEngineEnvironmentVariables {
|
|
|
273
260
|
* The type of the default vault connector: entity-storage, hashicorp.
|
|
274
261
|
*/
|
|
275
262
|
vaultConnector?: string;
|
|
263
|
+
/**
|
|
264
|
+
* Prefix to prepend to entries in the vault.
|
|
265
|
+
*/
|
|
266
|
+
vaultPrefix?: string;
|
|
276
267
|
/**
|
|
277
268
|
* Hashicorp Vault token.
|
|
278
269
|
*/
|
|
@@ -285,6 +276,18 @@ export interface IEngineEnvironmentVariables {
|
|
|
285
276
|
* The type of logging task connector, can be a comma separated list: console, entity-storage.
|
|
286
277
|
*/
|
|
287
278
|
loggingConnector?: string;
|
|
279
|
+
/**
|
|
280
|
+
* The batch size for the logging task, set to 1 for no batching.
|
|
281
|
+
*/
|
|
282
|
+
loggingBatchSize?: string;
|
|
283
|
+
/**
|
|
284
|
+
* The batch flush interval in seconds for the logging task, how often to flush the logs when using batching, defaults to 5 seconds.
|
|
285
|
+
*/
|
|
286
|
+
loggingBatchFlushIntervalSeconds?: string;
|
|
287
|
+
/**
|
|
288
|
+
* A list of components to exclude from logging, can be a comma separated list of component Class names e.g. "ComponentA,ComponentB".
|
|
289
|
+
*/
|
|
290
|
+
loggingSilentComponents?: string;
|
|
288
291
|
/**
|
|
289
292
|
* The type of event bus connector: local.
|
|
290
293
|
*/
|
|
@@ -318,7 +321,7 @@ export interface IEngineEnvironmentVariables {
|
|
|
318
321
|
*/
|
|
319
322
|
awsSesEndpoint?: string;
|
|
320
323
|
/**
|
|
321
|
-
* The applications for the push notifications
|
|
324
|
+
* The applications for the push notifications reference a separate json with @json: prefix.
|
|
322
325
|
*/
|
|
323
326
|
awsMessagingPushNotificationApplications?: string;
|
|
324
327
|
/**
|
|
@@ -337,6 +340,34 @@ export interface IEngineEnvironmentVariables {
|
|
|
337
340
|
* The type of telemetry connector: entity-storage.
|
|
338
341
|
*/
|
|
339
342
|
telemetryConnector?: string;
|
|
343
|
+
/**
|
|
344
|
+
* The name of the Open Telemetry meter to use, only required if using open-telemetry as telemetry connector, defaults to twin-node.
|
|
345
|
+
*/
|
|
346
|
+
openTelemetryMeterName?: string;
|
|
347
|
+
/**
|
|
348
|
+
* The version of the Open Telemetry metrics specification to use, only required if using open-telemetry as telemetry connector, defaults to 1.0.0.
|
|
349
|
+
*/
|
|
350
|
+
openTelemetryMeterVersion?: string;
|
|
351
|
+
/**
|
|
352
|
+
* The type of Open Telemetry metric reader to use, only required if using open-telemetry as telemetry connector, values: prometheus.
|
|
353
|
+
*/
|
|
354
|
+
openTelemetryReader?: string;
|
|
355
|
+
/**
|
|
356
|
+
* The port to use for the Open Telemetry Prometheus metrics server, only required if using open-telemetry as telemetry connector and prometheus as reader, defaults to 9464.
|
|
357
|
+
*/
|
|
358
|
+
openTelemetryPrometheusPort?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Polling interval in seconds for the telemetry metrics collector. Defaults to 60.
|
|
361
|
+
*/
|
|
362
|
+
telemetryMetricsCollectorIntervalSeconds?: string;
|
|
363
|
+
/**
|
|
364
|
+
* The type of telemetry metrics producers, can be a comma separated list: system, process.
|
|
365
|
+
*/
|
|
366
|
+
telemetryMetricsProducers?: string;
|
|
367
|
+
/**
|
|
368
|
+
* Maximum number of values retained per telemetry metric (count-based history cap). Defaults to 1440.
|
|
369
|
+
*/
|
|
370
|
+
telemetryMetricsProducerMaxHistory?: string;
|
|
340
371
|
/**
|
|
341
372
|
* The type of faucet connector: entity-storage, iota.
|
|
342
373
|
*/
|
|
@@ -349,18 +380,26 @@ export interface IEngineEnvironmentVariables {
|
|
|
349
380
|
* The type of NFT connector: entity-storage, iota.
|
|
350
381
|
*/
|
|
351
382
|
nftConnector?: string;
|
|
383
|
+
/**
|
|
384
|
+
* The NFT deployed package id, for custom deployments.
|
|
385
|
+
*/
|
|
386
|
+
nftPackageId?: string;
|
|
387
|
+
/**
|
|
388
|
+
* The type of notarization connector: entity-storage, iota.
|
|
389
|
+
*/
|
|
390
|
+
notarizationConnector?: string;
|
|
352
391
|
/**
|
|
353
392
|
* The type of identity connector: entity-storage, iota.
|
|
354
393
|
*/
|
|
355
394
|
identityConnector?: string;
|
|
356
395
|
/**
|
|
357
|
-
* The
|
|
396
|
+
* The index of the wallet address to use, defaults to 0.
|
|
358
397
|
*/
|
|
359
|
-
|
|
398
|
+
identityWalletAddressIndex?: string;
|
|
360
399
|
/**
|
|
361
|
-
* The type of
|
|
400
|
+
* The type of identity resolver connector: entity-storage, iota.
|
|
362
401
|
*/
|
|
363
|
-
|
|
402
|
+
identityResolverConnector?: string;
|
|
364
403
|
/**
|
|
365
404
|
* IOTA Faucet Endpoint.
|
|
366
405
|
*/
|
|
@@ -389,6 +428,10 @@ export interface IEngineEnvironmentVariables {
|
|
|
389
428
|
* IOTA Gas Station Authentication Token.
|
|
390
429
|
*/
|
|
391
430
|
iotaGasStationAuthToken?: string;
|
|
431
|
+
/**
|
|
432
|
+
* The IOTA Identity deployed package id, for custom deployments.
|
|
433
|
+
*/
|
|
434
|
+
iotaIdentityPackageId?: string;
|
|
392
435
|
/**
|
|
393
436
|
* Universal Resolver Endpoint.
|
|
394
437
|
*/
|
|
@@ -421,6 +464,10 @@ export interface IEngineEnvironmentVariables {
|
|
|
421
464
|
* The type of the default data extractor, can be a comma separated list: json-path.
|
|
422
465
|
*/
|
|
423
466
|
dataExtractorConnectors?: string;
|
|
467
|
+
/**
|
|
468
|
+
* Enable the task scheduler regardless of which other components are active, defaults to false.
|
|
469
|
+
*/
|
|
470
|
+
taskSchedulerEnabled?: string;
|
|
424
471
|
/**
|
|
425
472
|
* Is the auditable item graph enabled, defaults to false.
|
|
426
473
|
*/
|
|
@@ -434,131 +481,157 @@ export interface IEngineEnvironmentVariables {
|
|
|
434
481
|
*/
|
|
435
482
|
documentManagementEnabled?: string;
|
|
436
483
|
/**
|
|
437
|
-
*
|
|
484
|
+
* Enable the federated catalogue, defaults to false, automatically enabled if remote endpoint, filters or dataspace is enabled.
|
|
438
485
|
*/
|
|
439
|
-
|
|
486
|
+
federatedCatalogueEnabled?: string;
|
|
440
487
|
/**
|
|
441
|
-
*
|
|
488
|
+
* Federated catalog filters, command separated list of filters to add.
|
|
442
489
|
*/
|
|
443
|
-
|
|
490
|
+
federatedCatalogueFilters?: string;
|
|
444
491
|
/**
|
|
445
|
-
*
|
|
446
|
-
* This only required if using a custom verifiable storage item, otherwise it will default to the network name.
|
|
492
|
+
* Federated catalog remote endpoint, if set will use a REST client instead of local service.
|
|
447
493
|
*/
|
|
448
|
-
|
|
494
|
+
federatedCatalogueRemoteEndpoint?: string;
|
|
449
495
|
/**
|
|
450
|
-
* The
|
|
451
|
-
* Only required for trusted nodes, as regular nodes will request from the trusted nodes.
|
|
452
|
-
* Defaults to synchronised-storage-blob-encryption
|
|
496
|
+
* The trust generators to add to the factory, comma separated list.
|
|
453
497
|
*/
|
|
454
|
-
|
|
498
|
+
trustGenerators?: string;
|
|
455
499
|
/**
|
|
456
|
-
* The
|
|
457
|
-
* Only required for trusted nodes, as regular nodes will not write encrypted data.
|
|
500
|
+
* The trust verifiers to add to the factory, comma separated list.
|
|
458
501
|
*/
|
|
459
|
-
|
|
502
|
+
trustVerifiers?: string;
|
|
460
503
|
/**
|
|
461
|
-
*
|
|
462
|
-
*
|
|
504
|
+
* The verification method to use for trust identities.
|
|
505
|
+
* Defaults to trust-assertion.
|
|
463
506
|
*/
|
|
464
|
-
|
|
507
|
+
trustVerificationMethodId?: string;
|
|
465
508
|
/**
|
|
466
|
-
*
|
|
467
|
-
*
|
|
509
|
+
* The trust time to live for generating JWTs.
|
|
510
|
+
* Defaults to undefined for never expiring.
|
|
468
511
|
*/
|
|
469
|
-
|
|
512
|
+
trustJwtTtlSeconds?: string;
|
|
470
513
|
/**
|
|
471
|
-
* The
|
|
472
|
-
* @default 1000
|
|
514
|
+
* The allow lists for the trust identity verifier, comma separated list of identities.
|
|
473
515
|
*/
|
|
474
|
-
|
|
516
|
+
trustIdentitiesAllow?: string;
|
|
475
517
|
/**
|
|
476
|
-
* The
|
|
477
|
-
* @default 5
|
|
518
|
+
* The deny lists for the trust identity verifier, comma separated list of identities.
|
|
478
519
|
*/
|
|
479
|
-
|
|
520
|
+
trustIdentitiesDeny?: string;
|
|
480
521
|
/**
|
|
481
|
-
*
|
|
522
|
+
* Path under which the rights management service is mounted (single source
|
|
523
|
+
* of truth). The same value drives:
|
|
524
|
+
* - the server route mount (via engine config)
|
|
525
|
+
* - the PNP service's callback URL builder (`buildCallbackUrl`)
|
|
526
|
+
* - the PNP rest-client's pathPrefix (consumer side)
|
|
527
|
+
* Defaults to `rights-management`. Set when deploying behind a reverse proxy
|
|
528
|
+
* with path rewriting, K8s ingress with path-based routing, or any custom
|
|
529
|
+
* mount point.
|
|
482
530
|
*/
|
|
483
|
-
|
|
531
|
+
rightsManagementCallbackPath?: string;
|
|
484
532
|
/**
|
|
485
|
-
*
|
|
533
|
+
* The rights management policy information sources to add to the factory.
|
|
486
534
|
*/
|
|
487
|
-
|
|
535
|
+
rightsManagementPolicyInformationSources?: string;
|
|
488
536
|
/**
|
|
489
|
-
*
|
|
537
|
+
* The rights management policy negotiators sources to add to the factory.
|
|
490
538
|
*/
|
|
491
|
-
|
|
539
|
+
rightsManagementPolicyNegotiators?: string;
|
|
492
540
|
/**
|
|
493
|
-
*
|
|
541
|
+
* The rights management policy requesters to add to the factory.
|
|
494
542
|
*/
|
|
495
|
-
|
|
543
|
+
rightsManagementPolicyRequesters?: string;
|
|
496
544
|
/**
|
|
497
|
-
* The rights management
|
|
498
|
-
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
545
|
+
* The rights management policy execution actions to add to the factory.
|
|
499
546
|
*/
|
|
500
|
-
|
|
547
|
+
rightsManagementPolicyExecutionActions?: string;
|
|
501
548
|
/**
|
|
502
|
-
* The rights management
|
|
503
|
-
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
549
|
+
* The rights management policy enforcement processors to add to the factory.
|
|
504
550
|
*/
|
|
505
|
-
|
|
551
|
+
rightsManagementPolicyEnforcementProcessors?: string;
|
|
506
552
|
/**
|
|
507
|
-
* The rights management
|
|
508
|
-
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
553
|
+
* The rights management policy arbiters to add to the factory.
|
|
509
554
|
*/
|
|
510
|
-
|
|
555
|
+
rightsManagementPolicyArbiters?: string;
|
|
511
556
|
/**
|
|
512
|
-
* The rights management
|
|
513
|
-
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
557
|
+
* The rights management policy obligation enforcers to add to the factory.
|
|
514
558
|
*/
|
|
515
|
-
|
|
559
|
+
rightsManagementPolicyObligationEnforcers?: string;
|
|
516
560
|
/**
|
|
517
|
-
*
|
|
518
|
-
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
561
|
+
* Is the dataspace enabled, defaults to false.
|
|
519
562
|
*/
|
|
520
|
-
|
|
563
|
+
dataspaceEnabled?: string;
|
|
521
564
|
/**
|
|
522
|
-
* The
|
|
523
|
-
*
|
|
565
|
+
* The length of time to retain the activity logs for in minutes, set to -1 to keep forever.
|
|
566
|
+
* @default 10
|
|
524
567
|
*/
|
|
525
|
-
|
|
568
|
+
dataspaceRetainActivityLogsFor?: string;
|
|
526
569
|
/**
|
|
527
|
-
* The
|
|
528
|
-
*
|
|
570
|
+
* The interval for cleaning up the activity logs.
|
|
571
|
+
* @default 60
|
|
529
572
|
*/
|
|
530
|
-
|
|
573
|
+
dataspaceActivityLogsCleanupInterval?: string;
|
|
531
574
|
/**
|
|
532
|
-
*
|
|
575
|
+
* The data plane path for PULL transfers (path only, not full URL).
|
|
576
|
+
* Will be combined with public origin.
|
|
577
|
+
* Required if PULL transfers should be supported.
|
|
578
|
+
* Example: "dataspace/entities"
|
|
533
579
|
*/
|
|
534
|
-
|
|
580
|
+
dataspaceDataPlanePath?: string;
|
|
535
581
|
/**
|
|
536
|
-
*
|
|
582
|
+
* Are the health components enabled, defaults to false.
|
|
537
583
|
*/
|
|
538
|
-
|
|
584
|
+
healthEnabled?: string;
|
|
539
585
|
/**
|
|
540
|
-
*
|
|
586
|
+
* The interval in seconds for performing health checks, defaults to 60.
|
|
541
587
|
*/
|
|
542
|
-
|
|
588
|
+
healthIntervalSeconds?: string;
|
|
543
589
|
/**
|
|
544
|
-
* The
|
|
545
|
-
*
|
|
590
|
+
* The interval in seconds for performing health checks at startup, defaults to 2.
|
|
591
|
+
* This allows components that take a long time to initialize to be healthy before the first health check is performed.
|
|
546
592
|
*/
|
|
547
|
-
|
|
593
|
+
healthStartupIntervalSeconds?: string;
|
|
548
594
|
/**
|
|
549
|
-
* The
|
|
550
|
-
*
|
|
595
|
+
* The type of the automation action to create, comma separate for more than one connector.
|
|
596
|
+
* values: fetch
|
|
597
|
+
*/
|
|
598
|
+
automationActionTypes?: string;
|
|
599
|
+
/**
|
|
600
|
+
* The default mutex timeout in milliseconds, used when no component-specific timeout is set, defaults to 5000.
|
|
601
|
+
*/
|
|
602
|
+
mutexTimeoutMsDefault?: string;
|
|
603
|
+
/**
|
|
604
|
+
* The mutex timeout in milliseconds for the auditable item graph component.
|
|
605
|
+
*/
|
|
606
|
+
auditableItemGraphMutexTimeoutMs?: string;
|
|
607
|
+
/**
|
|
608
|
+
* The mutex timeout in milliseconds for the auditable item stream component.
|
|
609
|
+
*/
|
|
610
|
+
auditableItemStreamMutexTimeoutMs?: string;
|
|
611
|
+
/**
|
|
612
|
+
* The mutex timeout in milliseconds for the federated catalogue component.
|
|
613
|
+
*/
|
|
614
|
+
federatedCatalogueMutexTimeoutMs?: string;
|
|
615
|
+
/**
|
|
616
|
+
* The mutex timeout in milliseconds for the document management component.
|
|
617
|
+
*/
|
|
618
|
+
documentManagementMutexTimeoutMs?: string;
|
|
619
|
+
/**
|
|
620
|
+
* The mutex timeout in milliseconds for the logging component.
|
|
621
|
+
*/
|
|
622
|
+
loggingMutexTimeoutMs?: string;
|
|
623
|
+
/**
|
|
624
|
+
* The mutex timeout in milliseconds for the memory entity storage connector.
|
|
551
625
|
*/
|
|
552
|
-
|
|
626
|
+
entityStorageMemoryMutexTimeoutMs?: string;
|
|
553
627
|
/**
|
|
554
|
-
*
|
|
628
|
+
* The mutex timeout in milliseconds for the file entity storage connector.
|
|
555
629
|
*/
|
|
556
|
-
|
|
630
|
+
entityStorageFileMutexTimeoutMs?: string;
|
|
557
631
|
/**
|
|
558
|
-
*
|
|
559
|
-
* Defaults to node-authentication-assertion.
|
|
632
|
+
* The mutex timeout in milliseconds for the rights management component.
|
|
560
633
|
*/
|
|
561
|
-
|
|
634
|
+
rightsManagementMutexTimeoutMs?: string;
|
|
562
635
|
/**
|
|
563
636
|
* A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.
|
|
564
637
|
*/
|
|
@@ -27,6 +27,10 @@ export interface IEngineServerEnvironmentVariables extends IEngineEnvironmentVar
|
|
|
27
27
|
* The CORS headers to expose.
|
|
28
28
|
*/
|
|
29
29
|
httpExposedHeaders?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The public origin URL for the API e.g. https://api.example.com:1234
|
|
32
|
+
*/
|
|
33
|
+
publicOrigin?: string;
|
|
30
34
|
/**
|
|
31
35
|
* The type of auth admin processor to use on the API: entity-storage.
|
|
32
36
|
*/
|
|
@@ -39,6 +43,10 @@ export interface IEngineServerEnvironmentVariables extends IEngineEnvironmentVar
|
|
|
39
43
|
* The id of the key in the vault to use for signing in auth operations.
|
|
40
44
|
*/
|
|
41
45
|
authSigningKeyId?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The HTTP header name used to pass the API key on requests, defaults to x-api-key.
|
|
48
|
+
*/
|
|
49
|
+
authApiKeyHeader?: string;
|
|
42
50
|
/**
|
|
43
51
|
* Additional MIME type processors to include, comma separated.
|
|
44
52
|
*/
|