Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 2.14 KB

FROM_VC_SERVICE_TO_HERE.md

File metadata and controls

44 lines (27 loc) · 2.14 KB

From vc-service to here

Find here an overview of the steps taken to integrate the core code of vc-service in this project.

Project configuration

We install what we need to make a library with included CLI, written in Typescript, tested with vitest.

File tsconfig.json copied from vc-service/tsconfig.json, and applied following modifications:

  • enabled "declaration": true,
  • enabled "declarationMap": true,
  • enabled "sourceMap": true,

In package.json, latest versions of packages are used, except for:

  • "typescript": "5.4.3": set to fixed version, because latest gives issues in vc-service code: src/implementations/solid/controller/index.ts:261:28 - error TS2322: Type 'Buffer<ArrayBufferLike>' is not assignable to type 'BlobPart'..

Sources copied from vc-service

Sources copied from vc-service/src are here in directory structure `src/implementations/solid.

Not copied:

  • vc-service/src/index.ts: that one implemented a web service.

Modifications to the copied sources:

  • Changed console. to // LOG console. to disable console output from deep in the implementation. Advice: to enable this console output temporarily, replace // LOG console. with / LOG */ console. and do the inverse replacement when done.
  • controller/index.ts: function preloadDocumentLoaderContexts() was removed. Actions are now in src/api-spec.ts: SolidApi.getPreloadedJdl().
  • vcCore.ts: jdl is longer constructed here but in src/api-spec.ts, where it is also preloaded.

New sources

Tests

File test/library.test.ts is a Vitest test for all implementations as Typescript libraries. File test/bundle.test.js is a Vitest test for all implementations as Javascript browser bundles.