@twin.org/node-core 0.0.2-next.5 → 0.0.2-next.7
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 +63 -8
- package/dist/esm/index.mjs +64 -10
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +9 -0
- package/dist/types/utils.d.ts +6 -0
- package/docs/changelog.md +17 -0
- package/docs/reference/functions/loadTextFile.md +19 -0
- package/docs/reference/index.md +1 -0
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +17 -0
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +25 -0
- package/package.json +2 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -96,13 +96,21 @@ async function fileExists(filename) {
|
|
|
96
96
|
return false;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Load the text file.
|
|
101
|
+
* @param filename The filename of the text file to load.
|
|
102
|
+
* @returns The contents of the text file if it could not be loaded.
|
|
103
|
+
*/
|
|
104
|
+
async function loadTextFile(filename) {
|
|
105
|
+
return promises.readFile(filename, "utf8");
|
|
106
|
+
}
|
|
99
107
|
/**
|
|
100
108
|
* Load the JSON file.
|
|
101
109
|
* @param filename The filename of the JSON file to load.
|
|
102
110
|
* @returns The contents of the JSON file or null if it could not be loaded.
|
|
103
111
|
*/
|
|
104
112
|
async function loadJsonFile(filename) {
|
|
105
|
-
const content = await
|
|
113
|
+
const content = await loadTextFile(filename);
|
|
106
114
|
return JSON.parse(content);
|
|
107
115
|
}
|
|
108
116
|
/**
|
|
@@ -591,6 +599,7 @@ function buildEngineConfiguration(envVars) {
|
|
|
591
599
|
configureTaskScheduler(coreConfig, envVars);
|
|
592
600
|
configureSynchronisedStorage(coreConfig, envVars);
|
|
593
601
|
configureFederatedCatalogue(coreConfig, envVars);
|
|
602
|
+
configureDataSpaceConnector(coreConfig, envVars);
|
|
594
603
|
return coreConfig;
|
|
595
604
|
}
|
|
596
605
|
/**
|
|
@@ -1354,6 +1363,26 @@ function configureRightsManagement(coreConfig, envVars) {
|
|
|
1354
1363
|
coreConfig.types.rightsManagementPapComponent.push({
|
|
1355
1364
|
type: engineTypes.RightsManagementPapComponentType.Service
|
|
1356
1365
|
});
|
|
1366
|
+
coreConfig.types.rightsManagementPmpComponent ??= [];
|
|
1367
|
+
coreConfig.types.rightsManagementPmpComponent.push({
|
|
1368
|
+
type: engineTypes.RightsManagementPmpComponentType.Service
|
|
1369
|
+
});
|
|
1370
|
+
coreConfig.types.rightsManagementPipComponent ??= [];
|
|
1371
|
+
coreConfig.types.rightsManagementPipComponent.push({
|
|
1372
|
+
type: engineTypes.RightsManagementPipComponentType.Service
|
|
1373
|
+
});
|
|
1374
|
+
coreConfig.types.rightsManagementPxpComponent ??= [];
|
|
1375
|
+
coreConfig.types.rightsManagementPxpComponent.push({
|
|
1376
|
+
type: engineTypes.RightsManagementPxpComponentType.Service
|
|
1377
|
+
});
|
|
1378
|
+
coreConfig.types.rightsManagementPdpComponent ??= [];
|
|
1379
|
+
coreConfig.types.rightsManagementPdpComponent.push({
|
|
1380
|
+
type: engineTypes.RightsManagementPdpComponentType.Service
|
|
1381
|
+
});
|
|
1382
|
+
coreConfig.types.rightsManagementPepComponent ??= [];
|
|
1383
|
+
coreConfig.types.rightsManagementPepComponent.push({
|
|
1384
|
+
type: engineTypes.RightsManagementPepComponentType.Service
|
|
1385
|
+
});
|
|
1357
1386
|
coreConfig.types.rightsManagementComponent ??= [];
|
|
1358
1387
|
coreConfig.types.rightsManagementComponent.push({
|
|
1359
1388
|
type: engineTypes.RightsManagementComponentType.Service
|
|
@@ -1422,8 +1451,7 @@ function configureSynchronisedStorage(coreConfig, envVars) {
|
|
|
1422
1451
|
* @param envVars The environment variables.
|
|
1423
1452
|
*/
|
|
1424
1453
|
function configureFederatedCatalogue(coreConfig, envVars) {
|
|
1425
|
-
if (core.
|
|
1426
|
-
(core.Coerce.boolean(envVars.federatedCatalogueEnabled) ?? false)) {
|
|
1454
|
+
if (core.Coerce.boolean(envVars.federatedCatalogueEnabled) ?? false) {
|
|
1427
1455
|
coreConfig.types.federatedCatalogueComponent ??= [];
|
|
1428
1456
|
coreConfig.types.federatedCatalogueComponent.push({
|
|
1429
1457
|
type: engineTypes.FederatedCatalogueComponentType.Service,
|
|
@@ -1436,6 +1464,26 @@ function configureFederatedCatalogue(coreConfig, envVars) {
|
|
|
1436
1464
|
});
|
|
1437
1465
|
}
|
|
1438
1466
|
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Configures the data space connector.
|
|
1469
|
+
* @param coreConfig The core config.
|
|
1470
|
+
* @param envVars The environment variables.
|
|
1471
|
+
*/
|
|
1472
|
+
function configureDataSpaceConnector(coreConfig, envVars) {
|
|
1473
|
+
if (core.Coerce.boolean(envVars.dataSpaceConnectorEnabled) ?? false) {
|
|
1474
|
+
coreConfig.types.dataSpaceConnectorComponent ??= [];
|
|
1475
|
+
coreConfig.types.dataSpaceConnectorComponent.push({
|
|
1476
|
+
type: engineTypes.DataSpaceConnectorComponentType.Service,
|
|
1477
|
+
options: {
|
|
1478
|
+
config: {
|
|
1479
|
+
dataSpaceConnectorAppDescriptors: core.Is.arrayValue(envVars.dataSpaceConnectorApps)
|
|
1480
|
+
? envVars.dataSpaceConnectorApps
|
|
1481
|
+
: undefined
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1439
1487
|
/**
|
|
1440
1488
|
* Configures the DLT.
|
|
1441
1489
|
* @param coreConfig The core config.
|
|
@@ -1679,7 +1727,7 @@ async function run(nodeOptions) {
|
|
|
1679
1727
|
nodeOptions ??= {};
|
|
1680
1728
|
const serverInfo = {
|
|
1681
1729
|
name: nodeOptions?.serverName ?? "TWIN Node Server",
|
|
1682
|
-
version: nodeOptions?.serverVersion ?? "0.0.2-next.
|
|
1730
|
+
version: nodeOptions?.serverVersion ?? "0.0.2-next.7" // x-release-please-version
|
|
1683
1731
|
};
|
|
1684
1732
|
console.log(`\u001B[4m🌩️ ${serverInfo.name} v${serverInfo.version}\u001B[24m\n`);
|
|
1685
1733
|
if (!core.Is.stringValue(nodeOptions?.executionDirectory)) {
|
|
@@ -1761,12 +1809,18 @@ async function buildConfiguration(processEnv, options, serverInfo) {
|
|
|
1761
1809
|
// Expand any environment variables that use the @file: syntax
|
|
1762
1810
|
const keys = Object.keys(envVars);
|
|
1763
1811
|
for (const key of keys) {
|
|
1764
|
-
if (core.Is.stringValue(envVars[key]) &&
|
|
1812
|
+
if (core.Is.stringValue(envVars[key]) &&
|
|
1813
|
+
(envVars[key].startsWith("@text:") || envVars[key].startsWith("@json:"))) {
|
|
1765
1814
|
const filePath = envVars[key].slice(6).trim();
|
|
1766
1815
|
const embeddedFile = path.resolve(path.join(options.executionDirectory ?? "", filePath));
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1816
|
+
if (envVars[key].startsWith("@text:")) {
|
|
1817
|
+
console.info(`Expanding Environment Variable: ${key} from text file: ${embeddedFile}`);
|
|
1818
|
+
envVars[key] = await loadTextFile(embeddedFile);
|
|
1819
|
+
}
|
|
1820
|
+
else if (envVars[key].startsWith("@json:")) {
|
|
1821
|
+
console.info(`Expanding Environment Variable: ${key} from JSON file: ${embeddedFile}`);
|
|
1822
|
+
envVars[key] = await loadJsonFile(embeddedFile);
|
|
1823
|
+
}
|
|
1770
1824
|
}
|
|
1771
1825
|
}
|
|
1772
1826
|
// Extend the environment variables with any additional custom configuration.
|
|
@@ -1814,5 +1868,6 @@ exports.getExecutionDirectory = getExecutionDirectory;
|
|
|
1814
1868
|
exports.getFeatures = getFeatures;
|
|
1815
1869
|
exports.initialiseLocales = initialiseLocales;
|
|
1816
1870
|
exports.loadJsonFile = loadJsonFile;
|
|
1871
|
+
exports.loadTextFile = loadTextFile;
|
|
1817
1872
|
exports.run = run;
|
|
1818
1873
|
exports.start = start;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { PasswordHelper } from '@twin.org/api-auth-entity-storage-service';
|
|
|
2
2
|
import { I18n, Is, Converter, RandomHelper, StringHelper, Coerce, Urn, GeneralError, ErrorHelper, EnvHelper } from '@twin.org/core';
|
|
3
3
|
import { PasswordGenerator, Bip39 } from '@twin.org/crypto';
|
|
4
4
|
import { AuthenticationComponentType, InformationComponentType, RestRouteProcessorType, SocketRouteProcessorType, AuthenticationAdminComponentType } from '@twin.org/engine-server-types';
|
|
5
|
-
import { WalletConnectorType, IdentityConnectorType, EntityStorageConnectorType, BlobStorageConnectorType, BlobStorageComponentType, VaultConnectorType, DltConfigType, LoggingConnectorType, LoggingComponentType, BackgroundTaskConnectorType, EventBusConnectorType, EventBusComponentType, TelemetryConnectorType, TelemetryComponentType, MessagingEmailConnectorType, MessagingSmsConnectorType, MessagingPushNotificationConnectorType, MessagingComponentType, FaucetConnectorType, NftConnectorType, NftComponentType, VerifiableStorageConnectorType, VerifiableStorageComponentType, ImmutableProofComponentType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, IdentityComponentType, IdentityResolverConnectorType, IdentityResolverComponentType, IdentityProfileConnectorType, IdentityProfileComponentType, AttestationConnectorType, AttestationComponentType, DataConverterConnectorType, DataExtractorConnectorType, DataProcessingComponentType, DocumentManagementComponentType, RightsManagementPapComponentType, RightsManagementComponentType, TaskSchedulerComponentType, SynchronisedStorageComponentType, FederatedCatalogueComponentType } from '@twin.org/engine-types';
|
|
5
|
+
import { WalletConnectorType, IdentityConnectorType, EntityStorageConnectorType, BlobStorageConnectorType, BlobStorageComponentType, VaultConnectorType, DltConfigType, LoggingConnectorType, LoggingComponentType, BackgroundTaskConnectorType, EventBusConnectorType, EventBusComponentType, TelemetryConnectorType, TelemetryComponentType, MessagingEmailConnectorType, MessagingSmsConnectorType, MessagingPushNotificationConnectorType, MessagingComponentType, FaucetConnectorType, NftConnectorType, NftComponentType, VerifiableStorageConnectorType, VerifiableStorageComponentType, ImmutableProofComponentType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, IdentityComponentType, IdentityResolverConnectorType, IdentityResolverComponentType, IdentityProfileConnectorType, IdentityProfileComponentType, AttestationConnectorType, AttestationComponentType, DataConverterConnectorType, DataExtractorConnectorType, DataProcessingComponentType, DocumentManagementComponentType, RightsManagementPapComponentType, RightsManagementPmpComponentType, RightsManagementPipComponentType, RightsManagementPxpComponentType, RightsManagementPdpComponentType, RightsManagementPepComponentType, RightsManagementComponentType, TaskSchedulerComponentType, SynchronisedStorageComponentType, FederatedCatalogueComponentType, DataSpaceConnectorComponentType } from '@twin.org/engine-types';
|
|
6
6
|
import { EntityStorageConnectorFactory } from '@twin.org/entity-storage-models';
|
|
7
7
|
import { IdentityProfileConnectorFactory, IdentityConnectorFactory, IdentityResolverConnectorFactory, DocumentHelper } from '@twin.org/identity-models';
|
|
8
8
|
import { VaultConnectorFactory, VaultKeyType } from '@twin.org/vault-models';
|
|
@@ -75,13 +75,21 @@ async function fileExists(filename) {
|
|
|
75
75
|
return false;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Load the text file.
|
|
80
|
+
* @param filename The filename of the text file to load.
|
|
81
|
+
* @returns The contents of the text file if it could not be loaded.
|
|
82
|
+
*/
|
|
83
|
+
async function loadTextFile(filename) {
|
|
84
|
+
return readFile(filename, "utf8");
|
|
85
|
+
}
|
|
78
86
|
/**
|
|
79
87
|
* Load the JSON file.
|
|
80
88
|
* @param filename The filename of the JSON file to load.
|
|
81
89
|
* @returns The contents of the JSON file or null if it could not be loaded.
|
|
82
90
|
*/
|
|
83
91
|
async function loadJsonFile(filename) {
|
|
84
|
-
const content = await
|
|
92
|
+
const content = await loadTextFile(filename);
|
|
85
93
|
return JSON.parse(content);
|
|
86
94
|
}
|
|
87
95
|
/**
|
|
@@ -570,6 +578,7 @@ function buildEngineConfiguration(envVars) {
|
|
|
570
578
|
configureTaskScheduler(coreConfig, envVars);
|
|
571
579
|
configureSynchronisedStorage(coreConfig, envVars);
|
|
572
580
|
configureFederatedCatalogue(coreConfig, envVars);
|
|
581
|
+
configureDataSpaceConnector(coreConfig, envVars);
|
|
573
582
|
return coreConfig;
|
|
574
583
|
}
|
|
575
584
|
/**
|
|
@@ -1333,6 +1342,26 @@ function configureRightsManagement(coreConfig, envVars) {
|
|
|
1333
1342
|
coreConfig.types.rightsManagementPapComponent.push({
|
|
1334
1343
|
type: RightsManagementPapComponentType.Service
|
|
1335
1344
|
});
|
|
1345
|
+
coreConfig.types.rightsManagementPmpComponent ??= [];
|
|
1346
|
+
coreConfig.types.rightsManagementPmpComponent.push({
|
|
1347
|
+
type: RightsManagementPmpComponentType.Service
|
|
1348
|
+
});
|
|
1349
|
+
coreConfig.types.rightsManagementPipComponent ??= [];
|
|
1350
|
+
coreConfig.types.rightsManagementPipComponent.push({
|
|
1351
|
+
type: RightsManagementPipComponentType.Service
|
|
1352
|
+
});
|
|
1353
|
+
coreConfig.types.rightsManagementPxpComponent ??= [];
|
|
1354
|
+
coreConfig.types.rightsManagementPxpComponent.push({
|
|
1355
|
+
type: RightsManagementPxpComponentType.Service
|
|
1356
|
+
});
|
|
1357
|
+
coreConfig.types.rightsManagementPdpComponent ??= [];
|
|
1358
|
+
coreConfig.types.rightsManagementPdpComponent.push({
|
|
1359
|
+
type: RightsManagementPdpComponentType.Service
|
|
1360
|
+
});
|
|
1361
|
+
coreConfig.types.rightsManagementPepComponent ??= [];
|
|
1362
|
+
coreConfig.types.rightsManagementPepComponent.push({
|
|
1363
|
+
type: RightsManagementPepComponentType.Service
|
|
1364
|
+
});
|
|
1336
1365
|
coreConfig.types.rightsManagementComponent ??= [];
|
|
1337
1366
|
coreConfig.types.rightsManagementComponent.push({
|
|
1338
1367
|
type: RightsManagementComponentType.Service
|
|
@@ -1401,8 +1430,7 @@ function configureSynchronisedStorage(coreConfig, envVars) {
|
|
|
1401
1430
|
* @param envVars The environment variables.
|
|
1402
1431
|
*/
|
|
1403
1432
|
function configureFederatedCatalogue(coreConfig, envVars) {
|
|
1404
|
-
if (
|
|
1405
|
-
(Coerce.boolean(envVars.federatedCatalogueEnabled) ?? false)) {
|
|
1433
|
+
if (Coerce.boolean(envVars.federatedCatalogueEnabled) ?? false) {
|
|
1406
1434
|
coreConfig.types.federatedCatalogueComponent ??= [];
|
|
1407
1435
|
coreConfig.types.federatedCatalogueComponent.push({
|
|
1408
1436
|
type: FederatedCatalogueComponentType.Service,
|
|
@@ -1415,6 +1443,26 @@ function configureFederatedCatalogue(coreConfig, envVars) {
|
|
|
1415
1443
|
});
|
|
1416
1444
|
}
|
|
1417
1445
|
}
|
|
1446
|
+
/**
|
|
1447
|
+
* Configures the data space connector.
|
|
1448
|
+
* @param coreConfig The core config.
|
|
1449
|
+
* @param envVars The environment variables.
|
|
1450
|
+
*/
|
|
1451
|
+
function configureDataSpaceConnector(coreConfig, envVars) {
|
|
1452
|
+
if (Coerce.boolean(envVars.dataSpaceConnectorEnabled) ?? false) {
|
|
1453
|
+
coreConfig.types.dataSpaceConnectorComponent ??= [];
|
|
1454
|
+
coreConfig.types.dataSpaceConnectorComponent.push({
|
|
1455
|
+
type: DataSpaceConnectorComponentType.Service,
|
|
1456
|
+
options: {
|
|
1457
|
+
config: {
|
|
1458
|
+
dataSpaceConnectorAppDescriptors: Is.arrayValue(envVars.dataSpaceConnectorApps)
|
|
1459
|
+
? envVars.dataSpaceConnectorApps
|
|
1460
|
+
: undefined
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1418
1466
|
/**
|
|
1419
1467
|
* Configures the DLT.
|
|
1420
1468
|
* @param coreConfig The core config.
|
|
@@ -1658,7 +1706,7 @@ async function run(nodeOptions) {
|
|
|
1658
1706
|
nodeOptions ??= {};
|
|
1659
1707
|
const serverInfo = {
|
|
1660
1708
|
name: nodeOptions?.serverName ?? "TWIN Node Server",
|
|
1661
|
-
version: nodeOptions?.serverVersion ?? "0.0.2-next.
|
|
1709
|
+
version: nodeOptions?.serverVersion ?? "0.0.2-next.7" // x-release-please-version
|
|
1662
1710
|
};
|
|
1663
1711
|
console.log(`\u001B[4m🌩️ ${serverInfo.name} v${serverInfo.version}\u001B[24m\n`);
|
|
1664
1712
|
if (!Is.stringValue(nodeOptions?.executionDirectory)) {
|
|
@@ -1740,12 +1788,18 @@ async function buildConfiguration(processEnv, options, serverInfo) {
|
|
|
1740
1788
|
// Expand any environment variables that use the @file: syntax
|
|
1741
1789
|
const keys = Object.keys(envVars);
|
|
1742
1790
|
for (const key of keys) {
|
|
1743
|
-
if (Is.stringValue(envVars[key]) &&
|
|
1791
|
+
if (Is.stringValue(envVars[key]) &&
|
|
1792
|
+
(envVars[key].startsWith("@text:") || envVars[key].startsWith("@json:"))) {
|
|
1744
1793
|
const filePath = envVars[key].slice(6).trim();
|
|
1745
1794
|
const embeddedFile = path.resolve(path.join(options.executionDirectory ?? "", filePath));
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1795
|
+
if (envVars[key].startsWith("@text:")) {
|
|
1796
|
+
console.info(`Expanding Environment Variable: ${key} from text file: ${embeddedFile}`);
|
|
1797
|
+
envVars[key] = await loadTextFile(embeddedFile);
|
|
1798
|
+
}
|
|
1799
|
+
else if (envVars[key].startsWith("@json:")) {
|
|
1800
|
+
console.info(`Expanding Environment Variable: ${key} from JSON file: ${embeddedFile}`);
|
|
1801
|
+
envVars[key] = await loadJsonFile(embeddedFile);
|
|
1802
|
+
}
|
|
1749
1803
|
}
|
|
1750
1804
|
}
|
|
1751
1805
|
// Extend the environment variables with any additional custom configuration.
|
|
@@ -1777,4 +1831,4 @@ async function buildConfiguration(processEnv, options, serverInfo) {
|
|
|
1777
1831
|
return { engineServerConfig, nodeEnvVars: envVars };
|
|
1778
1832
|
}
|
|
1779
1833
|
|
|
1780
|
-
export { NodeFeatures, bootstrap, bootstrapAuth, bootstrapBlobEncryption, bootstrapImmutableProofMethod, bootstrapNodeIdentity, bootstrapNodeUser, bootstrapSynchronisedStorage, buildConfiguration, buildEngineConfiguration, buildEngineServerConfiguration, fileExists, getExecutionDirectory, getFeatures, initialiseLocales, loadJsonFile, run, start };
|
|
1834
|
+
export { NodeFeatures, bootstrap, bootstrapAuth, bootstrapBlobEncryption, bootstrapImmutableProofMethod, bootstrapNodeIdentity, bootstrapNodeUser, bootstrapSynchronisedStorage, buildConfiguration, buildEngineConfiguration, buildEngineServerConfiguration, fileExists, getExecutionDirectory, getFeatures, initialiseLocales, loadJsonFile, loadTextFile, run, start };
|
|
@@ -446,4 +446,13 @@ export interface IEngineEnvironmentVariables {
|
|
|
446
446
|
* Is the task scheduler enabled, defaults to false.
|
|
447
447
|
*/
|
|
448
448
|
taskSchedulerEnabled?: string;
|
|
449
|
+
/**
|
|
450
|
+
* Is the data space connector enabled, defaults to false.
|
|
451
|
+
*/
|
|
452
|
+
dataSpaceConnectorEnabled?: string;
|
|
453
|
+
/**
|
|
454
|
+
* The application configuration for the data space connector.
|
|
455
|
+
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
456
|
+
*/
|
|
457
|
+
dataSpaceConnectorApps?: string;
|
|
449
458
|
}
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ export declare function getExecutionDirectory(): string;
|
|
|
16
16
|
* @returns True if the file exists.
|
|
17
17
|
*/
|
|
18
18
|
export declare function fileExists(filename: string): Promise<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Load the text file.
|
|
21
|
+
* @param filename The filename of the text file to load.
|
|
22
|
+
* @returns The contents of the text file if it could not be loaded.
|
|
23
|
+
*/
|
|
24
|
+
export declare function loadTextFile(filename: string): Promise<string>;
|
|
19
25
|
/**
|
|
20
26
|
* Load the JSON file.
|
|
21
27
|
* @param filename The filename of the JSON file to load.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @twin.org/node-core - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.7](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.6...node-core-v0.0.2-next.7) (2025-08-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add data space connector ([5a57087](https://github.com/twinfoundation/node/commit/5a57087d938265d3a4a812ff7c83d130ea4e103c))
|
|
9
|
+
* add data space connector ([f7a3644](https://github.com/twinfoundation/node/commit/f7a364477ec664e333e5ad018795acec6ee61edc))
|
|
10
|
+
* add data space connector ([157e8b0](https://github.com/twinfoundation/node/commit/157e8b0a76e3a8a63c1991924f7f963eb83e27ae))
|
|
11
|
+
|
|
12
|
+
## [0.0.2-next.6](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.5...node-core-v0.0.2-next.6) (2025-08-22)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add rights management ([78fba62](https://github.com/twinfoundation/node/commit/78fba62f82afdbe615d55dd90eca8ee70ea62fc0))
|
|
18
|
+
* remove unused properties ([d8344b5](https://github.com/twinfoundation/node/commit/d8344b5aee5dc1c8104d75fad5093097f6530168))
|
|
19
|
+
|
|
3
20
|
## [0.0.2-next.5](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.4...node-core-v0.0.2-next.5) (2025-08-21)
|
|
4
21
|
|
|
5
22
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Function: loadTextFile()
|
|
2
|
+
|
|
3
|
+
> **loadTextFile**(`filename`): `Promise`\<`string`\>
|
|
4
|
+
|
|
5
|
+
Load the text file.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### filename
|
|
10
|
+
|
|
11
|
+
`string`
|
|
12
|
+
|
|
13
|
+
The filename of the text file to load.
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
`Promise`\<`string`\>
|
|
18
|
+
|
|
19
|
+
The contents of the text file if it could not be loaded.
|
package/docs/reference/index.md
CHANGED
|
@@ -32,5 +32,6 @@
|
|
|
32
32
|
- [initialiseLocales](functions/initialiseLocales.md)
|
|
33
33
|
- [getExecutionDirectory](functions/getExecutionDirectory.md)
|
|
34
34
|
- [fileExists](functions/fileExists.md)
|
|
35
|
+
- [loadTextFile](functions/loadTextFile.md)
|
|
35
36
|
- [loadJsonFile](functions/loadJsonFile.md)
|
|
36
37
|
- [getFeatures](functions/getFeatures.md)
|
|
@@ -901,3 +901,20 @@ Is the rights management enabled, defaults to false.
|
|
|
901
901
|
> `optional` **taskSchedulerEnabled**: `string`
|
|
902
902
|
|
|
903
903
|
Is the task scheduler enabled, defaults to false.
|
|
904
|
+
|
|
905
|
+
***
|
|
906
|
+
|
|
907
|
+
### dataSpaceConnectorEnabled?
|
|
908
|
+
|
|
909
|
+
> `optional` **dataSpaceConnectorEnabled**: `string`
|
|
910
|
+
|
|
911
|
+
Is the data space connector enabled, defaults to false.
|
|
912
|
+
|
|
913
|
+
***
|
|
914
|
+
|
|
915
|
+
### dataSpaceConnectorApps?
|
|
916
|
+
|
|
917
|
+
> `optional` **dataSpaceConnectorApps**: `string`
|
|
918
|
+
|
|
919
|
+
The application configuration for the data space connector.
|
|
920
|
+
Use the @json: prefix to specify the path to the JSON configuration file.
|
|
@@ -1336,6 +1336,31 @@ Is the task scheduler enabled, defaults to false.
|
|
|
1336
1336
|
|
|
1337
1337
|
***
|
|
1338
1338
|
|
|
1339
|
+
### dataSpaceConnectorEnabled?
|
|
1340
|
+
|
|
1341
|
+
> `optional` **dataSpaceConnectorEnabled**: `string`
|
|
1342
|
+
|
|
1343
|
+
Is the data space connector enabled, defaults to false.
|
|
1344
|
+
|
|
1345
|
+
#### Inherited from
|
|
1346
|
+
|
|
1347
|
+
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`dataSpaceConnectorEnabled`](IEngineEnvironmentVariables.md#dataspaceconnectorenabled)
|
|
1348
|
+
|
|
1349
|
+
***
|
|
1350
|
+
|
|
1351
|
+
### dataSpaceConnectorApps?
|
|
1352
|
+
|
|
1353
|
+
> `optional` **dataSpaceConnectorApps**: `string`
|
|
1354
|
+
|
|
1355
|
+
The application configuration for the data space connector.
|
|
1356
|
+
Use the @json: prefix to specify the path to the JSON configuration file.
|
|
1357
|
+
|
|
1358
|
+
#### Inherited from
|
|
1359
|
+
|
|
1360
|
+
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`dataSpaceConnectorApps`](IEngineEnvironmentVariables.md#dataspaceconnectorapps)
|
|
1361
|
+
|
|
1362
|
+
***
|
|
1363
|
+
|
|
1339
1364
|
### port?
|
|
1340
1365
|
|
|
1341
1366
|
> `optional` **port**: `string`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/node-core",
|
|
3
|
-
"version": "0.0.2-next.
|
|
3
|
+
"version": "0.0.2-next.7",
|
|
4
4
|
"description": "TWIN Node Core for serving APIs using the specified configuration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@twin.org/api-auth-entity-storage-service": "next",
|
|
18
18
|
"@twin.org/core": "next",
|
|
19
19
|
"@twin.org/crypto": "next",
|
|
20
|
+
"@twin.org/data-space-connector-models": "next",
|
|
20
21
|
"@twin.org/engine": "next",
|
|
21
22
|
"@twin.org/engine-core": "next",
|
|
22
23
|
"@twin.org/engine-models": "next",
|