@twin.org/node-core 0.0.1-next.10 → 0.0.1-next.11
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 +12 -2
- package/dist/esm/index.mjs +13 -3
- package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +4 -0
- package/docs/changelog.md +7 -0
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +8 -0
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +12 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1418,7 +1418,6 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
|
|
|
1418
1418
|
: undefined,
|
|
1419
1419
|
corsOrigins: core.Is.stringValue(envVars.corsOrigins) ? envVars.corsOrigins.split(",") : undefined
|
|
1420
1420
|
};
|
|
1421
|
-
const authProcessorType = envVars.authProcessorType;
|
|
1422
1421
|
const serverConfig = {
|
|
1423
1422
|
...coreEngineConfig,
|
|
1424
1423
|
web: webServerOptions,
|
|
@@ -1493,6 +1492,17 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
|
|
|
1493
1492
|
}
|
|
1494
1493
|
}
|
|
1495
1494
|
});
|
|
1495
|
+
const authAdminProcessorType = envVars.authAdminProcessorType;
|
|
1496
|
+
if (authAdminProcessorType === engineServerTypes.AuthenticationAdminComponentType.EntityStorage) {
|
|
1497
|
+
serverConfig.types.authenticationAdminComponent ??= [];
|
|
1498
|
+
serverConfig.types.authenticationAdminComponent.push({
|
|
1499
|
+
type: engineServerTypes.AuthenticationAdminComponentType.EntityStorage,
|
|
1500
|
+
options: {
|
|
1501
|
+
config: {}
|
|
1502
|
+
}
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
const authProcessorType = envVars.authProcessorType;
|
|
1496
1506
|
if (authProcessorType === engineServerTypes.AuthenticationComponentType.EntityStorage) {
|
|
1497
1507
|
serverConfig.types.authenticationComponent ??= [];
|
|
1498
1508
|
serverConfig.types.authenticationComponent.push({
|
|
@@ -1589,7 +1599,7 @@ async function run(nodeOptions) {
|
|
|
1589
1599
|
nodeOptions ??= {};
|
|
1590
1600
|
const serverInfo = {
|
|
1591
1601
|
name: nodeOptions?.serverName ?? "TWIN Node Server",
|
|
1592
|
-
version: nodeOptions?.serverVersion ?? "0.0.1-next.
|
|
1602
|
+
version: nodeOptions?.serverVersion ?? "0.0.1-next.11" // x-release-please-version
|
|
1593
1603
|
};
|
|
1594
1604
|
console.log(`\u001B[4m🌩️ ${serverInfo.name} v${serverInfo.version}\u001B[24m\n`);
|
|
1595
1605
|
if (!core.Is.stringValue(nodeOptions?.executionDirectory)) {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { readFile, stat } from 'node:fs/promises';
|
|
|
10
10
|
import path from 'node:path';
|
|
11
11
|
import * as dotenv from 'dotenv';
|
|
12
12
|
import { addDefaultRestPaths, addDefaultSocketPaths, EngineServer } from '@twin.org/engine-server';
|
|
13
|
-
import { InformationComponentType, RestRouteProcessorType, SocketRouteProcessorType, AuthenticationComponentType } from '@twin.org/engine-server-types';
|
|
13
|
+
import { InformationComponentType, RestRouteProcessorType, SocketRouteProcessorType, AuthenticationAdminComponentType, AuthenticationComponentType } from '@twin.org/engine-server-types';
|
|
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';
|
|
@@ -1397,7 +1397,6 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
|
|
|
1397
1397
|
: undefined,
|
|
1398
1398
|
corsOrigins: Is.stringValue(envVars.corsOrigins) ? envVars.corsOrigins.split(",") : undefined
|
|
1399
1399
|
};
|
|
1400
|
-
const authProcessorType = envVars.authProcessorType;
|
|
1401
1400
|
const serverConfig = {
|
|
1402
1401
|
...coreEngineConfig,
|
|
1403
1402
|
web: webServerOptions,
|
|
@@ -1472,6 +1471,17 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
|
|
|
1472
1471
|
}
|
|
1473
1472
|
}
|
|
1474
1473
|
});
|
|
1474
|
+
const authAdminProcessorType = envVars.authAdminProcessorType;
|
|
1475
|
+
if (authAdminProcessorType === AuthenticationAdminComponentType.EntityStorage) {
|
|
1476
|
+
serverConfig.types.authenticationAdminComponent ??= [];
|
|
1477
|
+
serverConfig.types.authenticationAdminComponent.push({
|
|
1478
|
+
type: AuthenticationAdminComponentType.EntityStorage,
|
|
1479
|
+
options: {
|
|
1480
|
+
config: {}
|
|
1481
|
+
}
|
|
1482
|
+
});
|
|
1483
|
+
}
|
|
1484
|
+
const authProcessorType = envVars.authProcessorType;
|
|
1475
1485
|
if (authProcessorType === AuthenticationComponentType.EntityStorage) {
|
|
1476
1486
|
serverConfig.types.authenticationComponent ??= [];
|
|
1477
1487
|
serverConfig.types.authenticationComponent.push({
|
|
@@ -1568,7 +1578,7 @@ async function run(nodeOptions) {
|
|
|
1568
1578
|
nodeOptions ??= {};
|
|
1569
1579
|
const serverInfo = {
|
|
1570
1580
|
name: nodeOptions?.serverName ?? "TWIN Node Server",
|
|
1571
|
-
version: nodeOptions?.serverVersion ?? "0.0.1-next.
|
|
1581
|
+
version: nodeOptions?.serverVersion ?? "0.0.1-next.11" // x-release-please-version
|
|
1572
1582
|
};
|
|
1573
1583
|
console.log(`\u001B[4m🌩️ ${serverInfo.name} v${serverInfo.version}\u001B[24m\n`);
|
|
1574
1584
|
if (!Is.stringValue(nodeOptions?.executionDirectory)) {
|
|
@@ -26,6 +26,10 @@ export interface IEngineServerEnvironmentVariables {
|
|
|
26
26
|
* The CORS headers to expose.
|
|
27
27
|
*/
|
|
28
28
|
httpExposedHeaders?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The type of auth admin processor to use on the API: entity-storage.
|
|
31
|
+
*/
|
|
32
|
+
authAdminProcessorType?: string;
|
|
29
33
|
/**
|
|
30
34
|
* The type of auth processor to use on the API: entity-storage.
|
|
31
35
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @twin.org/node-core - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.1-next.11](https://github.com/twinfoundation/node/compare/node-core-v0.0.1-next.10...node-core-v0.0.1-next.11) (2025-07-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add auth admin component ([1661e57](https://github.com/twinfoundation/node/commit/1661e57a699d5cf9ebde333e3cbc3aaea89d7c9c))
|
|
9
|
+
|
|
3
10
|
## [0.0.1-next.10](https://github.com/twinfoundation/node/compare/node-core-v0.0.1-next.9...node-core-v0.0.1-next.10) (2025-07-11)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -56,6 +56,14 @@ The CORS headers to expose.
|
|
|
56
56
|
|
|
57
57
|
***
|
|
58
58
|
|
|
59
|
+
### authAdminProcessorType?
|
|
60
|
+
|
|
61
|
+
> `optional` **authAdminProcessorType**: `string`
|
|
62
|
+
|
|
63
|
+
The type of auth admin processor to use on the API: entity-storage.
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
59
67
|
### authProcessorType?
|
|
60
68
|
|
|
61
69
|
> `optional` **authProcessorType**: `string`
|
|
@@ -1232,6 +1232,18 @@ The CORS headers to expose.
|
|
|
1232
1232
|
|
|
1233
1233
|
***
|
|
1234
1234
|
|
|
1235
|
+
### authAdminProcessorType?
|
|
1236
|
+
|
|
1237
|
+
> `optional` **authAdminProcessorType**: `string`
|
|
1238
|
+
|
|
1239
|
+
The type of auth admin processor to use on the API: entity-storage.
|
|
1240
|
+
|
|
1241
|
+
#### Inherited from
|
|
1242
|
+
|
|
1243
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`authAdminProcessorType`](IEngineServerEnvironmentVariables.md#authadminprocessortype)
|
|
1244
|
+
|
|
1245
|
+
***
|
|
1246
|
+
|
|
1235
1247
|
### authProcessorType?
|
|
1236
1248
|
|
|
1237
1249
|
> `optional` **authProcessorType**: `string`
|