@twin.org/node-core 0.0.1 → 0.0.2-next.1
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/cjs/index.cjs
CHANGED
|
@@ -10,9 +10,9 @@ var vaultModels = require('@twin.org/vault-models');
|
|
|
10
10
|
var walletModels = require('@twin.org/wallet-models');
|
|
11
11
|
var promises = require('node:fs/promises');
|
|
12
12
|
var path = require('node:path');
|
|
13
|
-
var dotenv = require('dotenv');
|
|
14
13
|
var engineServer = require('@twin.org/engine-server');
|
|
15
14
|
var engineServerTypes = require('@twin.org/engine-server-types');
|
|
15
|
+
var dotenv = require('dotenv');
|
|
16
16
|
var engine = require('@twin.org/engine');
|
|
17
17
|
var engineCore = require('@twin.org/engine-core');
|
|
18
18
|
var engineModels = require('@twin.org/engine-models');
|
|
@@ -1599,7 +1599,7 @@ async function run(nodeOptions) {
|
|
|
1599
1599
|
nodeOptions ??= {};
|
|
1600
1600
|
const serverInfo = {
|
|
1601
1601
|
name: nodeOptions?.serverName ?? "TWIN Node Server",
|
|
1602
|
-
version: nodeOptions?.serverVersion ?? "0.0.
|
|
1602
|
+
version: nodeOptions?.serverVersion ?? "0.0.2-next.1" // x-release-please-version
|
|
1603
1603
|
};
|
|
1604
1604
|
console.log(`\u001B[4m🌩️ ${serverInfo.name} v${serverInfo.version}\u001B[24m\n`);
|
|
1605
1605
|
if (!core.Is.stringValue(nodeOptions?.executionDirectory)) {
|
|
@@ -1719,6 +1719,7 @@ exports.bootstrapNodeIdentity = bootstrapNodeIdentity;
|
|
|
1719
1719
|
exports.bootstrapNodeUser = bootstrapNodeUser;
|
|
1720
1720
|
exports.buildConfiguration = buildConfiguration;
|
|
1721
1721
|
exports.buildEngineConfiguration = buildEngineConfiguration;
|
|
1722
|
+
exports.buildEngineServerConfiguration = buildEngineServerConfiguration;
|
|
1722
1723
|
exports.fileExists = fileExists;
|
|
1723
1724
|
exports.getExecutionDirectory = getExecutionDirectory;
|
|
1724
1725
|
exports.getFeatures = getFeatures;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -8,9 +8,9 @@ import { VaultConnectorFactory, VaultKeyType } from '@twin.org/vault-models';
|
|
|
8
8
|
import { WalletConnectorFactory } from '@twin.org/wallet-models';
|
|
9
9
|
import { readFile, stat } from 'node:fs/promises';
|
|
10
10
|
import path from 'node:path';
|
|
11
|
-
import * as dotenv from 'dotenv';
|
|
12
11
|
import { addDefaultRestPaths, addDefaultSocketPaths, EngineServer } from '@twin.org/engine-server';
|
|
13
12
|
import { InformationComponentType, RestRouteProcessorType, SocketRouteProcessorType, AuthenticationAdminComponentType, AuthenticationComponentType } from '@twin.org/engine-server-types';
|
|
13
|
+
import * as dotenv from 'dotenv';
|
|
14
14
|
import { Engine } from '@twin.org/engine';
|
|
15
15
|
import { FileStateStorage } from '@twin.org/engine-core';
|
|
16
16
|
import { EngineCoreFactory } from '@twin.org/engine-models';
|
|
@@ -1578,7 +1578,7 @@ async function run(nodeOptions) {
|
|
|
1578
1578
|
nodeOptions ??= {};
|
|
1579
1579
|
const serverInfo = {
|
|
1580
1580
|
name: nodeOptions?.serverName ?? "TWIN Node Server",
|
|
1581
|
-
version: nodeOptions?.serverVersion ?? "0.0.
|
|
1581
|
+
version: nodeOptions?.serverVersion ?? "0.0.2-next.1" // x-release-please-version
|
|
1582
1582
|
};
|
|
1583
1583
|
console.log(`\u001B[4m🌩️ ${serverInfo.name} v${serverInfo.version}\u001B[24m\n`);
|
|
1584
1584
|
if (!Is.stringValue(nodeOptions?.executionDirectory)) {
|
|
@@ -1688,4 +1688,4 @@ async function buildConfiguration(processEnv, options, serverInfo) {
|
|
|
1688
1688
|
return { engineServerConfig, nodeEnvVars: envVars };
|
|
1689
1689
|
}
|
|
1690
1690
|
|
|
1691
|
-
export { NodeFeatures, bootstrap, bootstrapAttestationMethod, bootstrapAuth, bootstrapBlobEncryption, bootstrapImmutableProofMethod, bootstrapNodeIdentity, bootstrapNodeUser, buildConfiguration, buildEngineConfiguration, fileExists, getExecutionDirectory, getFeatures, initialiseLocales, loadJsonFile, run, start };
|
|
1691
|
+
export { NodeFeatures, bootstrap, bootstrapAttestationMethod, bootstrapAuth, bootstrapBlobEncryption, bootstrapImmutableProofMethod, bootstrapNodeIdentity, bootstrapNodeUser, buildConfiguration, buildEngineConfiguration, buildEngineServerConfiguration, fileExists, getExecutionDirectory, getFeatures, initialiseLocales, loadJsonFile, run, start };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./bootstrap";
|
|
2
2
|
export * from "./builders/engineEnvBuilder";
|
|
3
|
+
export * from "./builders/engineServerEnvBuilder";
|
|
3
4
|
export * from "./models/IEngineEnvironmentVariables";
|
|
4
5
|
export * from "./models/IEngineServerEnvironmentVariables";
|
|
5
6
|
export * from "./models/INodeEnvironmentVariables";
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @twin.org/node-core - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.1](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.0...node-core-v0.0.2-next.1) (2025-07-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add auth admin component ([1661e57](https://github.com/twinfoundation/node/commit/1661e57a699d5cf9ebde333e3cbc3aaea89d7c9c))
|
|
9
|
+
* add extend engine and server methods ([ec09c7e](https://github.com/twinfoundation/node/commit/ec09c7eb882d9f5797f2fd372e96cad1a3716f59))
|
|
10
|
+
* add extend engine and server methods ([0136a6f](https://github.com/twinfoundation/node/commit/0136a6f3f4e1a82b1427ee9618b8a17c79bc7fda))
|
|
11
|
+
* add missing export ([e8eb621](https://github.com/twinfoundation/node/commit/e8eb6213937a202520b164a9970a891004122b61))
|
|
12
|
+
* additional run options ([c35e5bb](https://github.com/twinfoundation/node/commit/c35e5bbb8a80fe6a36628d41f64585b3723d9ad7))
|
|
13
|
+
* additional startup logging ([0740293](https://github.com/twinfoundation/node/commit/0740293b366032f2907046603abf587c9c324aff))
|
|
14
|
+
* improve default options and spec ([b538721](https://github.com/twinfoundation/node/commit/b538721902e7f65021d2715148ba59409ccce035))
|
|
15
|
+
* improve error reporting ([fcd39a1](https://github.com/twinfoundation/node/commit/fcd39a18da2a6ce33965a99ca5f2f36f4aba712f))
|
|
16
|
+
* initial commit ([522f1e5](https://github.com/twinfoundation/node/commit/522f1e515348f9b1dd1eeb3170b1249e2b0b5371))
|
|
17
|
+
* migrate env config from engine to node ([5da29b8](https://github.com/twinfoundation/node/commit/5da29b8d714495308320d237a68e84355bba2b47))
|
|
18
|
+
* node app use JavaScript ([14fe08c](https://github.com/twinfoundation/node/commit/14fe08cb760dd885a5dac9056a4d5dbc3d61df64))
|
|
19
|
+
* update dependencies ([9d25f16](https://github.com/twinfoundation/node/commit/9d25f16f1d554cd38f3bec28fdf7f8fff892ceaf))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* adding a condition to verify if the password exists when bootstrapping ([6030a42](https://github.com/twinfoundation/node/commit/6030a42bdaf581678d96932fd0b809396bf7b8b0))
|
|
25
|
+
* adding a condition to verify if the password exists when bootstrapping ([c66f396](https://github.com/twinfoundation/node/commit/c66f396717394161a7647d1f08b3d87729d96e96))
|
|
26
|
+
* broken docs ([61479fd](https://github.com/twinfoundation/node/commit/61479fd618f766d22c5aafec5277e1a89e22b453))
|
|
27
|
+
* pr comments [#1](https://github.com/twinfoundation/node/issues/1) ([66e795b](https://github.com/twinfoundation/node/commit/66e795b16c372ab131ec1de30085aee90e4dbbd0))
|
|
28
|
+
|
|
3
29
|
## 0.0.1 (2025-07-11)
|
|
4
30
|
|
|
5
31
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Function: buildEngineServerConfiguration()
|
|
2
|
+
|
|
3
|
+
> **buildEngineServerConfiguration**(`envVars`, `coreEngineConfig`, `serverInfo`, `openApiSpecPath?`): `IEngineServerConfig`
|
|
4
|
+
|
|
5
|
+
Handles the configuration of the server.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### envVars
|
|
10
|
+
|
|
11
|
+
[`IEngineServerEnvironmentVariables`](../interfaces/IEngineServerEnvironmentVariables.md)
|
|
12
|
+
|
|
13
|
+
The environment variables for the engine server.
|
|
14
|
+
|
|
15
|
+
### coreEngineConfig
|
|
16
|
+
|
|
17
|
+
`IEngineCoreConfig`
|
|
18
|
+
|
|
19
|
+
The core engine config.
|
|
20
|
+
|
|
21
|
+
### serverInfo
|
|
22
|
+
|
|
23
|
+
`IServerInfo`
|
|
24
|
+
|
|
25
|
+
The server information.
|
|
26
|
+
|
|
27
|
+
### openApiSpecPath?
|
|
28
|
+
|
|
29
|
+
`string`
|
|
30
|
+
|
|
31
|
+
The path to the open api spec.
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`IEngineServerConfig`
|
|
36
|
+
|
|
37
|
+
The the config for the core and the server.
|
package/docs/reference/index.md
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
- [bootstrapBlobEncryption](functions/bootstrapBlobEncryption.md)
|
|
26
26
|
- [bootstrapAuth](functions/bootstrapAuth.md)
|
|
27
27
|
- [buildEngineConfiguration](functions/buildEngineConfiguration.md)
|
|
28
|
+
- [buildEngineServerConfiguration](functions/buildEngineServerConfiguration.md)
|
|
28
29
|
- [run](functions/run.md)
|
|
29
30
|
- [buildConfiguration](functions/buildConfiguration.md)
|
|
30
31
|
- [start](functions/start.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/node-core",
|
|
3
|
-
"version": "0.0.1",
|
|
3
|
+
"version": "0.0.2-next.1",
|
|
4
4
|
"description": "TWIN Node Core for serving APIs using the specified configuration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/api-auth-entity-storage-service": "
|
|
18
|
-
"@twin.org/core": "
|
|
19
|
-
"@twin.org/crypto": "
|
|
20
|
-
"@twin.org/engine": "
|
|
21
|
-
"@twin.org/engine-core": "
|
|
22
|
-
"@twin.org/engine-models": "
|
|
23
|
-
"@twin.org/engine-server": "
|
|
24
|
-
"@twin.org/engine-server-types": "
|
|
25
|
-
"@twin.org/engine-types": "
|
|
26
|
-
"@twin.org/entity": "
|
|
27
|
-
"@twin.org/entity-storage-models": "
|
|
28
|
-
"@twin.org/identity-models": "
|
|
29
|
-
"@twin.org/vault-models": "
|
|
30
|
-
"@twin.org/wallet-models": "
|
|
17
|
+
"@twin.org/api-auth-entity-storage-service": "next",
|
|
18
|
+
"@twin.org/core": "next",
|
|
19
|
+
"@twin.org/crypto": "next",
|
|
20
|
+
"@twin.org/engine": "next",
|
|
21
|
+
"@twin.org/engine-core": "next",
|
|
22
|
+
"@twin.org/engine-models": "next",
|
|
23
|
+
"@twin.org/engine-server": "next",
|
|
24
|
+
"@twin.org/engine-server-types": "next",
|
|
25
|
+
"@twin.org/engine-types": "next",
|
|
26
|
+
"@twin.org/entity": "next",
|
|
27
|
+
"@twin.org/entity-storage-models": "next",
|
|
28
|
+
"@twin.org/identity-models": "next",
|
|
29
|
+
"@twin.org/vault-models": "next",
|
|
30
|
+
"@twin.org/wallet-models": "next",
|
|
31
31
|
"dotenv": "16.5.0",
|
|
32
32
|
"schema-dts": "1.1.5"
|
|
33
33
|
},
|