@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1 lines • 1 kB
Source Map (JSON)
{"version":3,"file":"cache-signature.mjs","names":[],"sources":["../../../../../src/libs/collection/schema/runtime/cache-signature.ts"],"sourcesContent":["import { hasher } from \"node-object-hash\";\nimport type CollectionBuilder from \"../../../collection/builders/collection-builder/index.js\";\n\nconst hashInstance = hasher({ sort: true, coerce: true });\n\nconst createCollectionSnapshot = (collection: CollectionBuilder) => {\n\treturn {\n\t\tkey: collection.key,\n\t\tdata: collection.getData,\n\t\tfieldTree: collection.fieldTree,\n\t\tfixedBricks: collection.fixedBricks,\n\t\tbuilderBricks: collection.builderBricks,\n\t};\n};\n\nexport const getCollectionSignature = (collection: CollectionBuilder) => {\n\treturn hashInstance.hash(createCollectionSnapshot(collection));\n};\n"],"mappings":"0CAGA,MAAM,EAAe,EAAO,CAAE,KAAM,GAAM,OAAQ,EAAK,CAAC,EAElD,EAA4B,IAC1B,CACN,IAAK,EAAW,IAChB,KAAM,EAAW,QACjB,UAAW,EAAW,UACtB,YAAa,EAAW,YACxB,cAAe,EAAW,aAC3B,GAGY,EAA0B,GAC/B,EAAa,KAAK,EAAyB,CAAU,CAAC"}