@twin.org/node-core 0.0.3-next.1 → 0.0.3-next.10
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/dist/es/builders/engineEnvBuilder.js +155 -74
- package/dist/es/builders/engineEnvBuilder.js.map +1 -1
- package/dist/es/builders/engineServerEnvBuilder.js +24 -15
- package/dist/es/builders/engineServerEnvBuilder.js.map +1 -1
- package/dist/es/builders/extensionsBuilder.js +26 -17
- package/dist/es/builders/extensionsBuilder.js.map +1 -1
- package/dist/es/cli.js +255 -0
- package/dist/es/cli.js.map +1 -0
- package/dist/es/commands/bootstrapLegacy.js +175 -0
- package/dist/es/commands/bootstrapLegacy.js.map +1 -0
- package/dist/es/commands/help.js +85 -0
- package/dist/es/commands/help.js.map +1 -0
- package/dist/es/commands/identityCreate.js +310 -0
- package/dist/es/commands/identityCreate.js.map +1 -0
- package/dist/es/commands/identityImports.js +76 -0
- package/dist/es/commands/identityImports.js.map +1 -0
- package/dist/es/commands/identityVerifiableCredentialCreate.js +140 -0
- package/dist/es/commands/identityVerifiableCredentialCreate.js.map +1 -0
- package/dist/es/commands/identityVerificationMethodCreate.js +208 -0
- package/dist/es/commands/identityVerificationMethodCreate.js.map +1 -0
- package/dist/es/commands/identityVerificationMethodImport.js +120 -0
- package/dist/es/commands/identityVerificationMethodImport.js.map +1 -0
- package/dist/es/commands/nodeSetIdentity.js +51 -0
- package/dist/es/commands/nodeSetIdentity.js.map +1 -0
- package/dist/es/commands/nodeSetTenant.js +49 -0
- package/dist/es/commands/nodeSetTenant.js.map +1 -0
- package/dist/es/commands/tenantCreate.js +120 -0
- package/dist/es/commands/tenantCreate.js.map +1 -0
- package/dist/es/commands/tenantImport.js +78 -0
- package/dist/es/commands/tenantImport.js.map +1 -0
- package/dist/es/commands/userCreate.js +197 -0
- package/dist/es/commands/userCreate.js.map +1 -0
- package/dist/es/commands/vaultKeyCreate.js +185 -0
- package/dist/es/commands/vaultKeyCreate.js.map +1 -0
- package/dist/es/commands/vaultKeyImport.js +98 -0
- package/dist/es/commands/vaultKeyImport.js.map +1 -0
- package/dist/es/defaults.js +20 -1
- package/dist/es/defaults.js.map +1 -1
- package/dist/es/index.js +7 -3
- 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/INodeEngineState.js.map +1 -1
- package/dist/es/models/INodeEnvironmentVariables.js.map +1 -1
- package/dist/es/models/cliCommandParamType.js +4 -0
- package/dist/es/models/cliCommandParamType.js.map +1 -0
- package/dist/es/node.js +55 -35
- package/dist/es/node.js.map +1 -1
- package/dist/es/start.js +128 -0
- package/dist/es/start.js.map +1 -0
- package/dist/es/utils.js +1 -22
- package/dist/es/utils.js.map +1 -1
- package/dist/types/builders/engineEnvBuilder.d.ts +4 -1
- package/dist/types/builders/engineServerEnvBuilder.d.ts +5 -2
- package/dist/types/cli.d.ts +66 -0
- package/dist/types/commands/bootstrapLegacy.d.ts +66 -0
- package/dist/types/commands/help.d.ts +23 -0
- package/dist/types/commands/identityCreate.d.ts +39 -0
- package/dist/types/commands/identityImports.d.ts +24 -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 +31 -0
- package/dist/types/commands/nodeSetIdentity.d.ts +22 -0
- package/dist/types/commands/nodeSetTenant.d.ts +22 -0
- package/dist/types/commands/tenantCreate.d.ts +35 -0
- package/dist/types/commands/tenantImport.d.ts +24 -0
- package/dist/types/commands/userCreate.d.ts +46 -0
- package/dist/types/commands/vaultKeyCreate.d.ts +43 -0
- package/dist/types/commands/vaultKeyImport.d.ts +28 -0
- package/dist/types/defaults.d.ts +11 -1
- package/dist/types/index.d.ts +7 -3
- 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 +51 -42
- package/dist/types/models/INodeEngineState.d.ts +0 -8
- package/dist/types/models/INodeEnvironmentVariables.d.ts +0 -38
- package/dist/types/models/cliCommandParamType.d.ts +4 -0
- package/dist/types/node.d.ts +6 -2
- package/dist/types/{server.d.ts → start.d.ts} +7 -2
- package/dist/types/utils.d.ts +0 -8
- package/docs/changelog.md +63 -0
- package/docs/reference/functions/buildConfiguration.md +2 -2
- package/docs/reference/functions/buildEngineConfiguration.md +1 -1
- package/docs/reference/functions/buildEngineServerConfiguration.md +3 -3
- package/docs/reference/functions/constructCliCommand.md +27 -0
- package/docs/reference/functions/executeCommand.md +29 -0
- package/docs/reference/functions/getEnvDefaults.md +19 -0
- package/docs/reference/functions/initCli.md +27 -0
- 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/run.md +7 -1
- package/docs/reference/functions/start.md +10 -4
- package/docs/reference/functions/substituteEnvOptions.md +25 -0
- package/docs/reference/index.md +15 -12
- 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 +90 -65
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +129 -88
- package/docs/reference/interfaces/INodeEngineState.md +0 -16
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +129 -172
- package/docs/reference/type-aliases/CliCommandParamType.md +5 -0
- package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_DID.md +3 -0
- package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_TENANT.md +3 -0
- package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +1 -1
- package/locales/en.json +463 -30
- package/package.json +3 -1
- package/dist/es/bootstrap.js +0 -374
- package/dist/es/bootstrap.js.map +0 -1
- package/dist/es/identity.js +0 -169
- package/dist/es/identity.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 -74
- package/dist/es/server.js.map +0 -1
- package/dist/types/bootstrap.d.ts +0 -76
- package/dist/types/identity.d.ts +0 -14
- package/dist/types/models/nodeFeatures.d.ts +0 -21
- 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/bootstrapContextIdHandlers.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
|
@@ -5,11 +5,14 @@ import type { IEngineServerEnvironmentVariables } from "../models/IEngineServerE
|
|
|
5
5
|
/**
|
|
6
6
|
* Handles the configuration of the server.
|
|
7
7
|
* @param envVars The environment variables for the engine server.
|
|
8
|
-
* @param
|
|
8
|
+
* @param availableContextIdKeys The context ID keys.
|
|
9
9
|
* @param coreEngineConfig The core engine config.
|
|
10
10
|
* @param serverInfo The server information.
|
|
11
11
|
* @param openApiSpecPath The path to the open api spec.
|
|
12
12
|
* @param favIconPath The path to the favicon.
|
|
13
13
|
* @returns The config for the core and the server.
|
|
14
14
|
*/
|
|
15
|
-
export declare function buildEngineServerConfiguration(envVars: IEngineServerEnvironmentVariables,
|
|
15
|
+
export declare function buildEngineServerConfiguration(envVars: IEngineServerEnvironmentVariables, availableContextIdKeys: {
|
|
16
|
+
key: string;
|
|
17
|
+
requiredHandlerFeatures: string[];
|
|
18
|
+
}[], coreEngineConfig: IEngineCoreConfig, serverInfo: IServerInfo, openApiSpecPath?: string, favIconPath?: string): Promise<IEngineServerConfig>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
import type { ICliArgs } from "./models/ICliArgs.js";
|
|
3
|
+
import type { ICliCommand } from "./models/ICliCommand.js";
|
|
4
|
+
import type { INodeEnvironmentVariables } from "./models/INodeEnvironmentVariables.js";
|
|
5
|
+
/**
|
|
6
|
+
* Initialise the CLI.
|
|
7
|
+
* @param processEnv The environment variables from the process.
|
|
8
|
+
* @param args The command line arguments.
|
|
9
|
+
* @returns The constructed CLI command if there is one.
|
|
10
|
+
* @throws GeneralError if the command is missing or invalid.
|
|
11
|
+
*/
|
|
12
|
+
export declare function initCli(processEnv: {
|
|
13
|
+
[id: string]: string;
|
|
14
|
+
}, args?: string[]): ICliCommand | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Parse command line arguments.
|
|
17
|
+
* @param args The command line arguments.
|
|
18
|
+
* @returns The parsed command line arguments.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseCommandLineArgs(args?: string[]): ICliArgs;
|
|
21
|
+
/**
|
|
22
|
+
* Construct the CLI command from the parsed arguments.
|
|
23
|
+
* @param processEnv The environment variables from the process.
|
|
24
|
+
* @param cliArgs The parsed CLI arguments.
|
|
25
|
+
* @returns The constructed CLI command.
|
|
26
|
+
* @throws GeneralError if the command is missing.
|
|
27
|
+
*/
|
|
28
|
+
export declare function constructCliCommand(processEnv: {
|
|
29
|
+
[id: string]: string;
|
|
30
|
+
}, cliArgs: ICliArgs): ICliCommand | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Execute the CLI command.
|
|
33
|
+
* @param engineCore The engine core.
|
|
34
|
+
* @param envVars The environment variables for the node.
|
|
35
|
+
* @param cliCommand The CLI command to execute.
|
|
36
|
+
*/
|
|
37
|
+
export declare function executeCommand(engineCore: IEngineCore, envVars: INodeEnvironmentVariables, cliCommand: ICliCommand): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Load the env files and process the options.
|
|
40
|
+
* @param processEnv The environment variables from the process.
|
|
41
|
+
* @param options The options.
|
|
42
|
+
* @returns The processed parameters.
|
|
43
|
+
* @throws GeneralError if an env file has errors.
|
|
44
|
+
*/
|
|
45
|
+
export declare function processEnvOptions(processEnv: {
|
|
46
|
+
[id: string]: string;
|
|
47
|
+
}, options: {
|
|
48
|
+
key: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}[]): void;
|
|
51
|
+
/**
|
|
52
|
+
* Process options and replace any env variables with their values.
|
|
53
|
+
* @param processEnv The environment variables from the process.
|
|
54
|
+
* @param options The options.
|
|
55
|
+
* @throws GeneralError if an env variable is missing.
|
|
56
|
+
*/
|
|
57
|
+
export declare function substituteEnvOptions(processEnv: {
|
|
58
|
+
[id: string]: string;
|
|
59
|
+
}, options: {
|
|
60
|
+
key: string;
|
|
61
|
+
value: string;
|
|
62
|
+
}[]): void;
|
|
63
|
+
/**
|
|
64
|
+
* Register available CLI commands.
|
|
65
|
+
*/
|
|
66
|
+
export declare function registerCommands(): void;
|
|
@@ -0,0 +1,66 @@
|
|
|
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 getCommandDefinitionBootstrapLegacy(commandDefinitions: {
|
|
11
|
+
[id: string]: ICliCommandDefinition;
|
|
12
|
+
}): void;
|
|
13
|
+
/**
|
|
14
|
+
* Command for legacy bootstrap.
|
|
15
|
+
* @param engineCore The engine core.
|
|
16
|
+
* @param envVars The environment variables for the node.
|
|
17
|
+
* @param params The parameters for the command.
|
|
18
|
+
*/
|
|
19
|
+
export declare function bootstrapLegacy(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables & {
|
|
20
|
+
/**
|
|
21
|
+
* The features that are enabled on the node.
|
|
22
|
+
* @default []
|
|
23
|
+
*/
|
|
24
|
+
features?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The identity of the node which, if empty and node-identity feature is enabled it will be generated.
|
|
27
|
+
*/
|
|
28
|
+
nodeIdentity?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The mnemonic for the identity, if empty and node-identity feature is enabled it will be randomly generated.
|
|
31
|
+
*/
|
|
32
|
+
nodeMnemonic?: string;
|
|
33
|
+
/**
|
|
34
|
+
* A tenant id to use as a default for the node.
|
|
35
|
+
*/
|
|
36
|
+
tenantId?: string;
|
|
37
|
+
/**
|
|
38
|
+
* A tenant api key to use as a default for the node.
|
|
39
|
+
*/
|
|
40
|
+
tenantApiKey?: string;
|
|
41
|
+
/**
|
|
42
|
+
* If the node-admin-user feature is enabled, this will be the organization of the user, if one is not provided it will be generated
|
|
43
|
+
*/
|
|
44
|
+
organizationIdentity?: string;
|
|
45
|
+
/**
|
|
46
|
+
* The mnemonic for the organization, if empty and node-admin-user feature is enabled it will be randomly generated.
|
|
47
|
+
*/
|
|
48
|
+
organizationMnemonic?: string;
|
|
49
|
+
/**
|
|
50
|
+
* If the node-admin-user feature is enabled, this will be the identity of the user, if one is not provided it will be generated
|
|
51
|
+
*/
|
|
52
|
+
adminUserIdentity?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The mnemonic for the admin user, if empty and node-admin-user feature is enabled it will be randomly generated.
|
|
55
|
+
*/
|
|
56
|
+
adminUserMnemonic?: string;
|
|
57
|
+
/**
|
|
58
|
+
* If the node-admin-user feature is enabled, this will be the name of the user.
|
|
59
|
+
* @default admin@node
|
|
60
|
+
*/
|
|
61
|
+
adminUserName?: string;
|
|
62
|
+
/**
|
|
63
|
+
* If the node-admin-user feature is enabled, this will be the password of the user, if empty it will be randomly generated.
|
|
64
|
+
*/
|
|
65
|
+
adminUserPassword?: string;
|
|
66
|
+
}, params: {}): Promise<void>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
import type { ICliCommandDefinition } from "../models/ICliCommandDefinition.js";
|
|
3
|
+
import type { INodeEnvironmentVariables } from "../models/INodeEnvironmentVariables.js";
|
|
4
|
+
/**
|
|
5
|
+
* Get the command definition parameters.
|
|
6
|
+
* @param commandDefinitions The registered command definitions.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCommandDefinitionHelp(commandDefinitions: {
|
|
9
|
+
[id: string]: ICliCommandDefinition;
|
|
10
|
+
}): void;
|
|
11
|
+
/**
|
|
12
|
+
* Command for displaying help information.
|
|
13
|
+
* @param engineCore The engine core.
|
|
14
|
+
* @param envVars The environment variables for the node.
|
|
15
|
+
* @param params The command parameters.
|
|
16
|
+
* @param params.command The command to display help for.
|
|
17
|
+
* @param commandDefinitions The registered command definitions.
|
|
18
|
+
*/
|
|
19
|
+
export declare function help(engineCore: IEngineCore, envVars: INodeEnvironmentVariables, params: {
|
|
20
|
+
command?: string;
|
|
21
|
+
}, commandDefinitions: {
|
|
22
|
+
[id: string]: ICliCommandDefinition;
|
|
23
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 getCommandDefinitionIdentityCreate(commandDefinitions: {
|
|
11
|
+
[id: string]: ICliCommandDefinition;
|
|
12
|
+
}): void;
|
|
13
|
+
/**
|
|
14
|
+
* Command for creating an identity.
|
|
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.mnemonic The mnemonic to use for the identity.
|
|
19
|
+
* @param params.identity The DID of the identity to create.
|
|
20
|
+
* @param params.controller The controller DID for the identity.
|
|
21
|
+
* @param params.fundWallet Whether to fund the wallet associated with the identity from a faucet.
|
|
22
|
+
* @param params.outputJson The output .json file to store the command output.
|
|
23
|
+
* @param params.outputEnv The output .env file to store the command output.
|
|
24
|
+
* @param params.outputEnvPrefix The prefix to use for variables in the output .env file.
|
|
25
|
+
* @returns The identity details.
|
|
26
|
+
*/
|
|
27
|
+
export declare function identityCreate(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
|
|
28
|
+
mnemonic?: string;
|
|
29
|
+
identity?: string;
|
|
30
|
+
controller?: string;
|
|
31
|
+
fundWallet?: boolean;
|
|
32
|
+
outputJson?: string;
|
|
33
|
+
outputEnv?: string;
|
|
34
|
+
outputEnvPrefix?: string;
|
|
35
|
+
}): Promise<{
|
|
36
|
+
mnemonic: string;
|
|
37
|
+
did: string;
|
|
38
|
+
walletAddress?: string;
|
|
39
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 getCommandDefinitionIdentityImport(commandDefinitions: {
|
|
11
|
+
[id: string]: ICliCommandDefinition;
|
|
12
|
+
}): void;
|
|
13
|
+
/**
|
|
14
|
+
* Command for importing an identity.
|
|
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 of the identity to import.
|
|
19
|
+
* @param params.mnemonic The mnemonic to use for the identity.
|
|
20
|
+
*/
|
|
21
|
+
export declare function identityImport(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
|
|
22
|
+
identity?: string;
|
|
23
|
+
mnemonic?: string;
|
|
24
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
import type { IDidVerifiableCredential } from "@twin.org/standards-w3c-did";
|
|
3
|
+
import type { ICliCommandDefinition } from "../models/ICliCommandDefinition.js";
|
|
4
|
+
import type { INodeEngineConfig } from "../models/INodeEngineConfig.js";
|
|
5
|
+
import type { INodeEngineState } from "../models/INodeEngineState.js";
|
|
6
|
+
import type { INodeEnvironmentVariables } from "../models/INodeEnvironmentVariables.js";
|
|
7
|
+
/**
|
|
8
|
+
* Get the command definition parameters.
|
|
9
|
+
* @param commandDefinitions The registered command definitions.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getCommandDefinitionIdentityVerifiableCredentialCreate(commandDefinitions: {
|
|
12
|
+
[id: string]: ICliCommandDefinition;
|
|
13
|
+
}): void;
|
|
14
|
+
/**
|
|
15
|
+
* Command for creating an identity verifiable credential.
|
|
16
|
+
* @param engineCore The engine core.
|
|
17
|
+
* @param envVars The environment variables for the node.
|
|
18
|
+
* @param params The parameters for the command.
|
|
19
|
+
* @param params.verificationMethodId The ID of the verification method to create the credential with.
|
|
20
|
+
* @param params.identity The DID of the identity to create the credential for.
|
|
21
|
+
* @param params.controller The controller DID for the identity.
|
|
22
|
+
* @param params.subjectJson The subject JSON file for the verifiable credential.
|
|
23
|
+
* @param params.credentialId The ID of the verifiable credential.
|
|
24
|
+
* @param params.expirationDate The expiration date of the verifiable credential.
|
|
25
|
+
* @param params.outputJson The output .json file to store the command output.
|
|
26
|
+
* @param params.outputEnv The output .env file to store the command output.
|
|
27
|
+
* @param params.outputEnvPrefix The prefix to use for variables in the output .env file.
|
|
28
|
+
* @returns The created verifiable credential and JWT.
|
|
29
|
+
*/
|
|
30
|
+
export declare function identityVerifiableCredentialCreate(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
|
|
31
|
+
verificationMethodId?: string;
|
|
32
|
+
identity?: string;
|
|
33
|
+
controller?: string;
|
|
34
|
+
subjectJson?: string;
|
|
35
|
+
credentialId?: string;
|
|
36
|
+
expirationDate?: string;
|
|
37
|
+
outputJson?: string;
|
|
38
|
+
outputEnv?: string;
|
|
39
|
+
outputEnvPrefix?: string;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
verifiableCredential: IDidVerifiableCredential;
|
|
42
|
+
jwt: string;
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
import { DidVerificationMethodType } from "@twin.org/standards-w3c-did";
|
|
3
|
+
import { type IJwk } from "@twin.org/web";
|
|
4
|
+
import type { ICliCommandDefinition } from "../models/ICliCommandDefinition.js";
|
|
5
|
+
import type { INodeEngineConfig } from "../models/INodeEngineConfig.js";
|
|
6
|
+
import type { INodeEngineState } from "../models/INodeEngineState.js";
|
|
7
|
+
import type { INodeEnvironmentVariables } from "../models/INodeEnvironmentVariables.js";
|
|
8
|
+
/**
|
|
9
|
+
* Get the command definition parameters.
|
|
10
|
+
* @param commandDefinitions The registered command definitions.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getCommandDefinitionIdentityVerificationMethodCreate(commandDefinitions: {
|
|
13
|
+
[id: string]: ICliCommandDefinition;
|
|
14
|
+
}): void;
|
|
15
|
+
/**
|
|
16
|
+
* Command for creating an identity verification method.
|
|
17
|
+
* @param engineCore The engine core.
|
|
18
|
+
* @param envVars The environment variables for the node.
|
|
19
|
+
* @param params The parameters for the command.
|
|
20
|
+
* @param params.identity The DID of the identity to create.
|
|
21
|
+
* @param params.verificationMethodType The type of verification method to create.
|
|
22
|
+
* @param params.verificationMethodId The ID of the verification method to create.
|
|
23
|
+
* @param params.controller The controller DID for the identity.
|
|
24
|
+
* @param params.overwriteMode The mode to use when a verification method with the same ID already exists.
|
|
25
|
+
* @param params.outputJson The output .json file to store the command output.
|
|
26
|
+
* @param params.outputEnv The output .env file to store the command output.
|
|
27
|
+
* @param params.outputEnvPrefix The prefix to use for variables in the output .env file.
|
|
28
|
+
* @returns The created verification method details or undefined if skipped.
|
|
29
|
+
*/
|
|
30
|
+
export declare function identityVerificationMethodCreate(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
|
|
31
|
+
identity?: string;
|
|
32
|
+
verificationMethodType?: DidVerificationMethodType;
|
|
33
|
+
verificationMethodId?: string;
|
|
34
|
+
controller?: string;
|
|
35
|
+
overwriteMode?: "skip" | "overwrite" | "error";
|
|
36
|
+
outputJson?: string;
|
|
37
|
+
outputEnv?: string;
|
|
38
|
+
outputEnvPrefix?: string;
|
|
39
|
+
}): Promise<{
|
|
40
|
+
verificationMethodId: string;
|
|
41
|
+
verificationMethodType: string;
|
|
42
|
+
privateKeyJwk: IJwk;
|
|
43
|
+
privateKeyHex: string;
|
|
44
|
+
publicKeyHex: string;
|
|
45
|
+
privateKeyBase64: string;
|
|
46
|
+
publicKeyBase64: string;
|
|
47
|
+
} | undefined>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
import { DidVerificationMethodType } from "@twin.org/standards-w3c-did";
|
|
3
|
+
import type { ICliCommandDefinition } from "../models/ICliCommandDefinition.js";
|
|
4
|
+
import type { INodeEngineConfig } from "../models/INodeEngineConfig.js";
|
|
5
|
+
import type { INodeEngineState } from "../models/INodeEngineState.js";
|
|
6
|
+
import type { INodeEnvironmentVariables } from "../models/INodeEnvironmentVariables.js";
|
|
7
|
+
/**
|
|
8
|
+
* Get the command definition parameters.
|
|
9
|
+
* @param commandDefinitions The registered command definitions.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getCommandDefinitionIdentityVerificationMethodImport(commandDefinitions: {
|
|
12
|
+
[id: string]: ICliCommandDefinition;
|
|
13
|
+
}): void;
|
|
14
|
+
/**
|
|
15
|
+
* Command for creating an identity verification method.
|
|
16
|
+
* @param engineCore The engine core.
|
|
17
|
+
* @param envVars The environment variables for the node.
|
|
18
|
+
* @param params The parameters for the command.
|
|
19
|
+
* @param params.identity The DID of the identity to create.
|
|
20
|
+
* @param params.verificationMethodType The type of verification method to create.
|
|
21
|
+
* @param params.verificationMethodId The ID of the verification method to create.
|
|
22
|
+
* @param params.controller The controller DID for the identity.
|
|
23
|
+
* @param params.privateKeyHex The private key in hex format.
|
|
24
|
+
*/
|
|
25
|
+
export declare function identityVerificationMethodImport(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
|
|
26
|
+
identity?: string;
|
|
27
|
+
verificationMethodType?: DidVerificationMethodType;
|
|
28
|
+
verificationMethodId?: string;
|
|
29
|
+
controller?: string;
|
|
30
|
+
privateKeyHex?: string;
|
|
31
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 getCommandDefinitionNodeSetIdentity(commandDefinitions: {
|
|
11
|
+
[id: string]: ICliCommandDefinition;
|
|
12
|
+
}): void;
|
|
13
|
+
/**
|
|
14
|
+
* Command for setting a node identity.
|
|
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 set for the node.
|
|
19
|
+
*/
|
|
20
|
+
export declare function nodeSetIdentity(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
|
|
21
|
+
identity?: string;
|
|
22
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 getCommandDefinitionNodeSetTenant(commandDefinitions: {
|
|
11
|
+
[id: string]: ICliCommandDefinition;
|
|
12
|
+
}): void;
|
|
13
|
+
/**
|
|
14
|
+
* Command for setting a node tenant.
|
|
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.tenantId The tenant id to set for the node.
|
|
19
|
+
*/
|
|
20
|
+
export declare function nodeSetTenant(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
|
|
21
|
+
tenantId?: string;
|
|
22
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
import type { ICliCommandDefinition } from "../models/ICliCommandDefinition.js";
|
|
3
|
+
import type { INodeEnvironmentVariables } from "../models/INodeEnvironmentVariables.js";
|
|
4
|
+
/**
|
|
5
|
+
* Get the command definition parameters.
|
|
6
|
+
* @param commandDefinitions The registered command definitions.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCommandDefinitionTenantCreate(commandDefinitions: {
|
|
9
|
+
[id: string]: ICliCommandDefinition;
|
|
10
|
+
}): void;
|
|
11
|
+
/**
|
|
12
|
+
* Command for creating a tenant.
|
|
13
|
+
* @param engineCore The engine core.
|
|
14
|
+
* @param envVars The environment variables for the node.
|
|
15
|
+
* @param params The parameters for the command.
|
|
16
|
+
* @param params.apiKey The api key to add.
|
|
17
|
+
* @param params.tenantId The tenant ID to add the api key to.
|
|
18
|
+
* @param params.label The label for the api key.
|
|
19
|
+
* @param params.outputJson The output .json file to store the command output.
|
|
20
|
+
* @param params.outputEnv The output .env file to store the command output.
|
|
21
|
+
* @param params.outputEnvPrefix The prefix to use for variables in the output .env file.
|
|
22
|
+
* @returns The created tenant details.
|
|
23
|
+
*/
|
|
24
|
+
export declare function tenantCreate(engineCore: IEngineCore, envVars: INodeEnvironmentVariables, params: {
|
|
25
|
+
apiKey?: string;
|
|
26
|
+
tenantId?: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
outputJson?: string;
|
|
29
|
+
outputEnv?: string;
|
|
30
|
+
outputEnvPrefix?: string;
|
|
31
|
+
}): Promise<{
|
|
32
|
+
apiKey: string;
|
|
33
|
+
tenantId: string;
|
|
34
|
+
label: string;
|
|
35
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
import type { ICliCommandDefinition } from "../models/ICliCommandDefinition.js";
|
|
3
|
+
import type { INodeEnvironmentVariables } from "../models/INodeEnvironmentVariables.js";
|
|
4
|
+
/**
|
|
5
|
+
* Get the command definition parameters.
|
|
6
|
+
* @param commandDefinitions The registered command definitions.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCommandDefinitionTenantImport(commandDefinitions: {
|
|
9
|
+
[id: string]: ICliCommandDefinition;
|
|
10
|
+
}): void;
|
|
11
|
+
/**
|
|
12
|
+
* Command for importing a tenant.
|
|
13
|
+
* @param engineCore The engine core.
|
|
14
|
+
* @param envVars The environment variables for the node.
|
|
15
|
+
* @param params The parameters for the command.
|
|
16
|
+
* @param params.apiKey The api key to import.
|
|
17
|
+
* @param params.tenantId The tenant ID to import the api key to.
|
|
18
|
+
* @param params.label The label for the api key.
|
|
19
|
+
*/
|
|
20
|
+
export declare function tenantImport(engineCore: IEngineCore, envVars: INodeEnvironmentVariables, params: {
|
|
21
|
+
apiKey?: string;
|
|
22
|
+
tenantId?: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { IEngineCore } from "@twin.org/engine-models";
|
|
2
|
+
import type { ICliCommandDefinition } from "../models/ICliCommandDefinition.js";
|
|
3
|
+
import type { INodeEnvironmentVariables } from "../models/INodeEnvironmentVariables.js";
|
|
4
|
+
/**
|
|
5
|
+
* Get the command definition parameters.
|
|
6
|
+
* @param commandDefinitions The registered command definitions.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCommandDefinitionUserCreate(commandDefinitions: {
|
|
9
|
+
[id: string]: ICliCommandDefinition;
|
|
10
|
+
}): void;
|
|
11
|
+
/**
|
|
12
|
+
* Command for creating a user.
|
|
13
|
+
* @param engineCore The engine core.
|
|
14
|
+
* @param envVars The environment variables for the node.
|
|
15
|
+
* @param params The parameters for the command.
|
|
16
|
+
* @param params.userIdentity The DID for the user.
|
|
17
|
+
* @param params.organizationIdentity The organization DID for the user.
|
|
18
|
+
* @param params.email The email for the user.
|
|
19
|
+
* @param params.password The password for the user.
|
|
20
|
+
* @param params.givenName The given name for the user.
|
|
21
|
+
* @param params.familyName The family name for the user.
|
|
22
|
+
* @param params.overwriteMode The mode to use when a user with the same identity already exists.
|
|
23
|
+
* @param params.outputJson The output .json file to store the command output.
|
|
24
|
+
* @param params.outputEnv The output .env file to store the command output.
|
|
25
|
+
* @param params.outputEnvPrefix The prefix to use for variables in the output .env file.
|
|
26
|
+
* @returns The created user details or undefined if skipped.
|
|
27
|
+
*/
|
|
28
|
+
export declare function userCreate(engineCore: IEngineCore, envVars: INodeEnvironmentVariables, params: {
|
|
29
|
+
userIdentity?: string;
|
|
30
|
+
organizationIdentity?: string;
|
|
31
|
+
email?: string;
|
|
32
|
+
password?: string;
|
|
33
|
+
givenName?: string;
|
|
34
|
+
familyName?: string;
|
|
35
|
+
overwriteMode?: "skip" | "overwrite" | "error";
|
|
36
|
+
outputJson?: string;
|
|
37
|
+
outputEnv?: string;
|
|
38
|
+
outputEnvPrefix?: string;
|
|
39
|
+
}): Promise<{
|
|
40
|
+
did: string;
|
|
41
|
+
organizationDid: string;
|
|
42
|
+
email: string;
|
|
43
|
+
password: string;
|
|
44
|
+
givenName: string;
|
|
45
|
+
familyName: string;
|
|
46
|
+
} | undefined>;
|
|
@@ -0,0 +1,43 @@
|
|
|
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 getCommandDefinitionVaultKeyCreate(commandDefinitions: {
|
|
11
|
+
[id: string]: ICliCommandDefinition;
|
|
12
|
+
}): void;
|
|
13
|
+
/**
|
|
14
|
+
* Command for creating 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 create the vault key for.
|
|
19
|
+
* @param params.keyId The ID of the key to create.
|
|
20
|
+
* @param params.keyType The type of key to create.
|
|
21
|
+
* @param params.overwriteMode The mode to use when a user with the same identity already exists.
|
|
22
|
+
* @param params.outputJson The output .json file to store the command output.
|
|
23
|
+
* @param params.outputEnv The output .env file to store the command output.
|
|
24
|
+
* @param params.outputEnvPrefix The prefix to use for variables in the output .env file.
|
|
25
|
+
* @returns The created vault key details or undefined if skipped.
|
|
26
|
+
*/
|
|
27
|
+
export declare function vaultKeyCreate(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
|
|
28
|
+
identity?: string;
|
|
29
|
+
keyType?: string;
|
|
30
|
+
keyId?: string;
|
|
31
|
+
overwriteMode?: "skip" | "overwrite" | "error";
|
|
32
|
+
outputJson?: string;
|
|
33
|
+
outputEnv?: string;
|
|
34
|
+
outputEnvPrefix?: string;
|
|
35
|
+
}): Promise<{
|
|
36
|
+
identity: string;
|
|
37
|
+
keyId: string;
|
|
38
|
+
keyType?: string;
|
|
39
|
+
privateKeyBase64?: string;
|
|
40
|
+
publicKeyBase64?: string;
|
|
41
|
+
privateKeyHex?: string;
|
|
42
|
+
publicKeyHex?: string;
|
|
43
|
+
} | undefined>;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 create the vault key for.
|
|
19
|
+
* @param params.keyId The ID of the key to create.
|
|
20
|
+
* @param params.keyType The type of key to create.
|
|
21
|
+
* @param params.privateKeyHex The private key in hexadecimal format.
|
|
22
|
+
*/
|
|
23
|
+
export declare function vaultKeyImport(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
|
|
24
|
+
identity?: string;
|
|
25
|
+
keyType?: string;
|
|
26
|
+
keyId?: string;
|
|
27
|
+
privateKeyHex?: string;
|
|
28
|
+
}): Promise<void>;
|
package/dist/types/defaults.d.ts
CHANGED
|
@@ -2,5 +2,15 @@ export declare const ATTESTATION_VERIFICATION_METHOD_ID = "attestation-assertion
|
|
|
2
2
|
export declare const IMMUTABLE_PROOF_VERIFICATION_METHOD_ID = "immutable-proof-assertion";
|
|
3
3
|
export declare const BLOB_STORAGE_ENCRYPTION_KEY_ID = "blob-encryption";
|
|
4
4
|
export declare const SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID = "synchronised-storage-blob-encryption";
|
|
5
|
-
export declare const VC_AUTHENTICATION_VERIFICATION_METHOD_ID = "
|
|
5
|
+
export declare const VC_AUTHENTICATION_VERIFICATION_METHOD_ID = "vc-authentication-assertion";
|
|
6
6
|
export declare const AUTH_SIGNING_KEY_ID = "auth-signing";
|
|
7
|
+
export declare const CONTEXT_ID_HANDLER_FEATURE_DID = "did";
|
|
8
|
+
export declare const CONTEXT_ID_HANDLER_FEATURE_TENANT = "tenant";
|
|
9
|
+
/**
|
|
10
|
+
* Get the default environment variables for the node.
|
|
11
|
+
* @param envPrefix The environment variable prefix.
|
|
12
|
+
* @returns The default environment variables.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getEnvDefaults(envPrefix: string): {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
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";
|
|
@@ -14,7 +19,6 @@ export * from "./models/INodeOptions.js";
|
|
|
14
19
|
export * from "./models/IProtocolHandlerResult.js";
|
|
15
20
|
export * from "./models/moduleProtocol.js";
|
|
16
21
|
export * from "./models/nodeExtensionMethods.js";
|
|
17
|
-
export * from "./models/nodeFeatures.js";
|
|
18
22
|
export * from "./node.js";
|
|
19
|
-
export * from "./
|
|
23
|
+
export * from "./start.js";
|
|
20
24
|
export * from "./utils.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command to execute in 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
|
+
}
|