@twin.org/engine-server 0.0.1-next.21 → 0.0.1-next.22

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.
@@ -250,6 +250,7 @@ class EngineServer {
250
250
  this.addRestRouteGenerator("identityProfileComponent", coreConfig.types.identityProfileComponent, "@twin.org/identity-service", "generateRestRoutesIdentityProfile");
251
251
  this.addRestRouteGenerator("nftComponent", coreConfig.types.nftComponent, "@twin.org/nft-service", "generateRestRoutesNft");
252
252
  this.addRestRouteGenerator("attestationComponent", coreConfig.types.attestationComponent, "@twin.org/attestation-service", "generateRestRoutesAttestation");
253
+ this.addRestRouteGenerator("immutableProofComponent", coreConfig.types.immutableProofComponent, "@twin.org/immutable-proof-service", "generateRestRoutesImmutableProof");
253
254
  this.addRestRouteGenerator("auditableItemGraphComponent", coreConfig.types.auditableItemGraphComponent, "@twin.org/auditable-item-graph-service", "generateRestRoutesAuditableItemGraph");
254
255
  this.addRestRouteGenerator("auditableItemStreamComponent", coreConfig.types.auditableItemStreamComponent, "@twin.org/auditable-item-stream-service", "generateRestRoutesAuditableItemStream");
255
256
  this.addRestRouteGenerator("entityStorageComponent", coreConfig.types.entityStorageComponent, "@twin.org/entity-storage-service", "generateRestRoutesEntityStorage");
@@ -387,34 +388,48 @@ function addRestPaths(coreEngineConfig, serverConfig) {
387
388
  if (core.Is.arrayValue(serverConfig.types.informationComponent)) {
388
389
  serverConfig.types.informationComponent[0].restPath = "";
389
390
  }
390
- if (core.Is.arrayValue(serverConfig.types.authenticationComponent)) {
391
+ if (core.Is.arrayValue(serverConfig.types.authenticationComponent) &&
392
+ !core.Is.stringValue(serverConfig.types.authenticationComponent[0])) {
391
393
  serverConfig.types.authenticationComponent[0].restPath = "authentication";
392
394
  }
393
- if (core.Is.arrayValue(coreEngineConfig.types.blobStorageComponent)) {
395
+ if (core.Is.arrayValue(coreEngineConfig.types.blobStorageComponent) &&
396
+ !core.Is.stringValue(coreEngineConfig.types.blobStorageComponent[0])) {
394
397
  coreEngineConfig.types.blobStorageComponent[0].restPath = "blob";
395
398
  }
396
- if (core.Is.arrayValue(coreEngineConfig.types.loggingComponent)) {
399
+ if (core.Is.arrayValue(coreEngineConfig.types.loggingComponent) &&
400
+ !core.Is.stringValue(coreEngineConfig.types.loggingComponent[0])) {
397
401
  coreEngineConfig.types.loggingComponent[0].restPath = "logging";
398
402
  }
399
- if (core.Is.arrayValue(coreEngineConfig.types.telemetryComponent)) {
403
+ if (core.Is.arrayValue(coreEngineConfig.types.telemetryComponent) &&
404
+ !core.Is.stringValue(coreEngineConfig.types.telemetryComponent[0])) {
400
405
  coreEngineConfig.types.telemetryComponent[0].restPath = "telemetry";
401
406
  }
402
- if (core.Is.arrayValue(coreEngineConfig.types.identityComponent)) {
407
+ if (core.Is.arrayValue(coreEngineConfig.types.identityComponent) &&
408
+ !core.Is.stringValue(coreEngineConfig.types.identityComponent[0])) {
403
409
  coreEngineConfig.types.identityComponent[0].restPath = "identity";
404
410
  }
405
- if (core.Is.arrayValue(coreEngineConfig.types.identityProfileComponent)) {
411
+ if (core.Is.arrayValue(coreEngineConfig.types.identityProfileComponent) &&
412
+ !core.Is.stringValue(coreEngineConfig.types.identityProfileComponent[0])) {
406
413
  coreEngineConfig.types.identityProfileComponent[0].restPath = "identity/profile";
407
414
  }
408
- if (core.Is.arrayValue(coreEngineConfig.types.nftComponent)) {
415
+ if (core.Is.arrayValue(coreEngineConfig.types.nftComponent) &&
416
+ !core.Is.stringValue(coreEngineConfig.types.nftComponent[0])) {
409
417
  coreEngineConfig.types.nftComponent[0].restPath = "nft";
410
418
  }
411
- if (core.Is.arrayValue(coreEngineConfig.types.attestationComponent)) {
419
+ if (core.Is.arrayValue(coreEngineConfig.types.immutableProofComponent) &&
420
+ !core.Is.stringValue(coreEngineConfig.types.immutableProofComponent[0])) {
421
+ coreEngineConfig.types.immutableProofComponent[0].restPath = "immutable-proof";
422
+ }
423
+ if (core.Is.arrayValue(coreEngineConfig.types.attestationComponent) &&
424
+ !core.Is.stringValue(coreEngineConfig.types.attestationComponent[0])) {
412
425
  coreEngineConfig.types.attestationComponent[0].restPath = "attestation";
413
426
  }
414
- if (core.Is.arrayValue(coreEngineConfig.types.auditableItemGraphComponent)) {
427
+ if (core.Is.arrayValue(coreEngineConfig.types.auditableItemGraphComponent) &&
428
+ !core.Is.stringValue(coreEngineConfig.types.auditableItemGraphComponent[0])) {
415
429
  coreEngineConfig.types.auditableItemGraphComponent[0].restPath = "aig";
416
430
  }
417
- if (core.Is.arrayValue(coreEngineConfig.types.auditableItemStreamComponent)) {
431
+ if (core.Is.arrayValue(coreEngineConfig.types.auditableItemStreamComponent) &&
432
+ !core.Is.stringValue(coreEngineConfig.types.auditableItemStreamComponent[0])) {
418
433
  coreEngineConfig.types.auditableItemStreamComponent[0].restPath = "ais";
419
434
  }
420
435
  }
@@ -248,6 +248,7 @@ class EngineServer {
248
248
  this.addRestRouteGenerator("identityProfileComponent", coreConfig.types.identityProfileComponent, "@twin.org/identity-service", "generateRestRoutesIdentityProfile");
249
249
  this.addRestRouteGenerator("nftComponent", coreConfig.types.nftComponent, "@twin.org/nft-service", "generateRestRoutesNft");
250
250
  this.addRestRouteGenerator("attestationComponent", coreConfig.types.attestationComponent, "@twin.org/attestation-service", "generateRestRoutesAttestation");
251
+ this.addRestRouteGenerator("immutableProofComponent", coreConfig.types.immutableProofComponent, "@twin.org/immutable-proof-service", "generateRestRoutesImmutableProof");
251
252
  this.addRestRouteGenerator("auditableItemGraphComponent", coreConfig.types.auditableItemGraphComponent, "@twin.org/auditable-item-graph-service", "generateRestRoutesAuditableItemGraph");
252
253
  this.addRestRouteGenerator("auditableItemStreamComponent", coreConfig.types.auditableItemStreamComponent, "@twin.org/auditable-item-stream-service", "generateRestRoutesAuditableItemStream");
253
254
  this.addRestRouteGenerator("entityStorageComponent", coreConfig.types.entityStorageComponent, "@twin.org/entity-storage-service", "generateRestRoutesEntityStorage");
@@ -385,34 +386,48 @@ function addRestPaths(coreEngineConfig, serverConfig) {
385
386
  if (Is.arrayValue(serverConfig.types.informationComponent)) {
386
387
  serverConfig.types.informationComponent[0].restPath = "";
387
388
  }
388
- if (Is.arrayValue(serverConfig.types.authenticationComponent)) {
389
+ if (Is.arrayValue(serverConfig.types.authenticationComponent) &&
390
+ !Is.stringValue(serverConfig.types.authenticationComponent[0])) {
389
391
  serverConfig.types.authenticationComponent[0].restPath = "authentication";
390
392
  }
391
- if (Is.arrayValue(coreEngineConfig.types.blobStorageComponent)) {
393
+ if (Is.arrayValue(coreEngineConfig.types.blobStorageComponent) &&
394
+ !Is.stringValue(coreEngineConfig.types.blobStorageComponent[0])) {
392
395
  coreEngineConfig.types.blobStorageComponent[0].restPath = "blob";
393
396
  }
394
- if (Is.arrayValue(coreEngineConfig.types.loggingComponent)) {
397
+ if (Is.arrayValue(coreEngineConfig.types.loggingComponent) &&
398
+ !Is.stringValue(coreEngineConfig.types.loggingComponent[0])) {
395
399
  coreEngineConfig.types.loggingComponent[0].restPath = "logging";
396
400
  }
397
- if (Is.arrayValue(coreEngineConfig.types.telemetryComponent)) {
401
+ if (Is.arrayValue(coreEngineConfig.types.telemetryComponent) &&
402
+ !Is.stringValue(coreEngineConfig.types.telemetryComponent[0])) {
398
403
  coreEngineConfig.types.telemetryComponent[0].restPath = "telemetry";
399
404
  }
400
- if (Is.arrayValue(coreEngineConfig.types.identityComponent)) {
405
+ if (Is.arrayValue(coreEngineConfig.types.identityComponent) &&
406
+ !Is.stringValue(coreEngineConfig.types.identityComponent[0])) {
401
407
  coreEngineConfig.types.identityComponent[0].restPath = "identity";
402
408
  }
403
- if (Is.arrayValue(coreEngineConfig.types.identityProfileComponent)) {
409
+ if (Is.arrayValue(coreEngineConfig.types.identityProfileComponent) &&
410
+ !Is.stringValue(coreEngineConfig.types.identityProfileComponent[0])) {
404
411
  coreEngineConfig.types.identityProfileComponent[0].restPath = "identity/profile";
405
412
  }
406
- if (Is.arrayValue(coreEngineConfig.types.nftComponent)) {
413
+ if (Is.arrayValue(coreEngineConfig.types.nftComponent) &&
414
+ !Is.stringValue(coreEngineConfig.types.nftComponent[0])) {
407
415
  coreEngineConfig.types.nftComponent[0].restPath = "nft";
408
416
  }
409
- if (Is.arrayValue(coreEngineConfig.types.attestationComponent)) {
417
+ if (Is.arrayValue(coreEngineConfig.types.immutableProofComponent) &&
418
+ !Is.stringValue(coreEngineConfig.types.immutableProofComponent[0])) {
419
+ coreEngineConfig.types.immutableProofComponent[0].restPath = "immutable-proof";
420
+ }
421
+ if (Is.arrayValue(coreEngineConfig.types.attestationComponent) &&
422
+ !Is.stringValue(coreEngineConfig.types.attestationComponent[0])) {
410
423
  coreEngineConfig.types.attestationComponent[0].restPath = "attestation";
411
424
  }
412
- if (Is.arrayValue(coreEngineConfig.types.auditableItemGraphComponent)) {
425
+ if (Is.arrayValue(coreEngineConfig.types.auditableItemGraphComponent) &&
426
+ !Is.stringValue(coreEngineConfig.types.auditableItemGraphComponent[0])) {
413
427
  coreEngineConfig.types.auditableItemGraphComponent[0].restPath = "aig";
414
428
  }
415
- if (Is.arrayValue(coreEngineConfig.types.auditableItemStreamComponent)) {
429
+ if (Is.arrayValue(coreEngineConfig.types.auditableItemStreamComponent) &&
430
+ !Is.stringValue(coreEngineConfig.types.auditableItemStreamComponent[0])) {
416
431
  coreEngineConfig.types.auditableItemStreamComponent[0].restPath = "ais";
417
432
  }
418
433
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/engine-server - Changelog
2
2
 
3
- ## v0.0.1-next.21
3
+ ## v0.0.1-next.22
4
4
 
5
5
  - Initial Release
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-server",
3
- "version": "0.0.1-next.21",
3
+ "version": "0.0.1-next.22",
4
4
  "description": "Engine implementation for a server.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,9 +17,9 @@
17
17
  "@twin.org/api-models": "next",
18
18
  "@twin.org/api-server-fastify": "next",
19
19
  "@twin.org/core": "next",
20
- "@twin.org/engine-core": "0.0.1-next.21",
21
- "@twin.org/engine-models": "0.0.1-next.21",
22
- "@twin.org/engine-server-types": "0.0.1-next.21",
20
+ "@twin.org/engine-core": "0.0.1-next.22",
21
+ "@twin.org/engine-models": "0.0.1-next.22",
22
+ "@twin.org/engine-server-types": "0.0.1-next.22",
23
23
  "@twin.org/modules": "next",
24
24
  "@twin.org/nameof": "next"
25
25
  },