@twin.org/standards-ld-contexts 0.0.3-next.6 → 0.0.3-next.61
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/README.md +2 -2
- package/dist/es/ldContexts/dataspace-protocol-2024.json +57 -0
- package/dist/es/ldContexts/gs1-epcis.json +593 -0
- package/dist/es/ldContexts/gs1-vocab.json +59070 -0
- package/dist/es/ldContexts/odrl-dataspace-protocol.json +96 -0
- package/dist/es/ldContexts/schema.org.json +139 -1
- package/dist/es/ldContexts/w3c-data-integrity-v2.json +81 -0
- package/dist/es/ldContexts/w3c-odrl.json +1 -1
- package/dist/es/ldContexts/w3c-vc-data-model-v1.json +231 -0
- package/dist/es/ldContexts/w3id-cid-v1.json +113 -0
- package/dist/es/ldContexts/w3id-did-v1.json +57 -0
- package/dist/es/ldContexts/w3id-ed25519-v1.json +93 -0
- package/dist/es/ldContexts/w3id-multikey-v1.json +35 -0
- package/dist/es/ldContexts.js +66 -27
- package/dist/es/ldContexts.js.map +1 -1
- package/docs/changelog.md +486 -77
- package/docs/examples.md +19 -1
- package/package.json +4 -4
- /package/dist/es/ldContexts/{dataspace-protocol.json → dataspace-protocol-2025.json} +0 -0
- /package/dist/es/ldContexts/{un-cefact-vocab.json → un-cefact-d23b.json} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ldContexts.js","sourceRoot":"","sources":["../../src/ldContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"ldContexts.js","sourceRoot":"","sources":["../../src/ldContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,gBAAgB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AM,CAAC,KAAK,UAAU,yBAAyB,CAAC,GAAW;IAC1D,IAAI,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,YAAY,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,MAAM,eAAe,CAAC,gBAAgB,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { GeneralError, Is } from \"@twin.org/core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport dataspaceProtocol2024 from \"./ldContexts/dataspace-protocol-2024.json\" with { type: \"json\" };\nimport dataspaceProtocol2025 from \"./ldContexts/dataspace-protocol-2025.json\" with { type: \"json\" };\nimport dcmitype from \"./ldContexts/dublin-core-dcmitype.json\" with { type: \"json\" };\nimport dcTerms from \"./ldContexts/dublin-core-terms.json\" with { type: \"json\" };\nimport foaf from \"./ldContexts/foaf.json\" with { type: \"json\" };\nimport gaiaX2411 from \"./ldContexts/gaia-x-v24.11.json\" with { type: \"json\" };\nimport gs1epcis from \"./ldContexts/gs1-epcis.json\" with { type: \"json\" };\nimport gs1vocab from \"./ldContexts/gs1-vocab.json\" with { type: \"json\" };\nimport odrlDataspaceProtocol from \"./ldContexts/odrl-dataspace-protocol.json\" with { type: \"json\" };\nimport schemaOrg from \"./ldContexts/schema.org.json\" with { type: \"json\" };\nimport unCefactD23B from \"./ldContexts/un-cefact-d23b.json\" with { type: \"json\" };\nimport w3cActivityStreams from \"./ldContexts/w3c-activity-streams.json\" with { type: \"json\" };\nimport w3cDataIntegrityV2 from \"./ldContexts/w3c-data-integrity-v2.json\" with { type: \"json\" };\nimport w3cDcat from \"./ldContexts/w3c-dcat.json\" with { type: \"json\" };\nimport w3cOdrl from \"./ldContexts/w3c-odrl.json\" with { type: \"json\" };\nimport w3cRdf from \"./ldContexts/w3c-rdf.json\" with { type: \"json\" };\nimport w3cVcV1 from \"./ldContexts/w3c-vc-data-model-v1.json\" with { type: \"json\" };\nimport w3cVcV2 from \"./ldContexts/w3c-vc-data-model-v2.json\" with { type: \"json\" };\nimport w3idCidV1 from \"./ldContexts/w3id-cid-v1.json\" with { type: \"json\" };\nimport w3idDidV1 from \"./ldContexts/w3id-did-v1.json\" with { type: \"json\" };\nimport w3idEd25519V1 from \"./ldContexts/w3id-ed25519-v1.json\" with { type: \"json\" };\nimport w3idJwsV1 from \"./ldContexts/w3id-jws-2020-v1.json\" with { type: \"json\" };\nimport w3idMultiKeyV1 from \"./ldContexts/w3id-multikey-v1.json\" with { type: \"json\" };\n\n/**\n * Map of all the ld contexts by their URL.\n */\nexport const LD_CONTEXTS: { [id: string]: unknown } = {\n\t// Data Space Protocol\n\t\"https://w3id.org/dspace/2024/1/\": dataspaceProtocol2024,\n\t\"https://w3id.org/dspace/2024/1/context.json\": dataspaceProtocol2024,\n\t\"https://w3id.org/dspace/2024/1/context.jsonld\": dataspaceProtocol2024,\n\t\"https://w3id.org/dspace/2025/1/\": dataspaceProtocol2025,\n\t\"https://w3id.org/dspace/2025/1/context.json\": dataspaceProtocol2025,\n\t\"https://w3id.org/dspace/2025/1/context.jsonld\": dataspaceProtocol2025,\n\t\"https://schema.twindev.org/dataspace-protocol/\": dataspaceProtocol2025,\n\t\"https://w3id.org/dspace/2025/1/odrl-profile.jsonld\": odrlDataspaceProtocol,\n\n\t// DCSA does not have JSON-LD context definitions\n\n\t// Dublin Core\n\t\"http://purl.org/dc/terms/\": dcTerms,\n\t\"http://purl.org/dc/dcmitype/\": dcmitype,\n\t\"https://schema.twindev.org/dublin-core/terms.jsonld\": dcTerms,\n\t\"https://schema.twindev.org/dublin-core/dcmitype.jsonld\": dcmitype,\n\n\t// Foaf\n\t\"https://schema.twindev.org/foaf/\": foaf,\n\t\"https://schema.twindev.org/foaf/types.jsonld\": foaf,\n\t\"http://xmlns.com/foaf/0.1/\": foaf,\n\n\t// Gaia-X\n\t\"https://w3id.org/gaia-x/2411\": gaiaX2411,\n\t\"https://w3id.org/gaia-x/2411#\": gaiaX2411,\n\t\"https://schema.twindev.org/gaia-x-loire/\": gaiaX2411,\n\t\"https://schema.twindev.org/gaia-x-loire/types.jsonld\": gaiaX2411,\n\n\t// GS1 EPCIS\n\t\"https://ref.gs1.org/epcis/\": gs1epcis,\n\t\"https://ref.gs1.org/epcis\": gs1epcis,\n\t\"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld\": gs1epcis,\n\n\t// GS1 Vocab\n\t\"https://gs1.org/voc/\": gs1vocab,\n\t\"https://ref.gs1.org/voc/data/gs1Voc.jsonld\": gs1vocab,\n\n\t// schema.org\n\t\"https://schema.org\": schemaOrg,\n\t\"http://schema.org\": schemaOrg,\n\t\"https://schema.org/\": schemaOrg,\n\t\"http://schema.org/\": schemaOrg,\n\t\"https://schema.org/docs/jsonldcontext.jsonld\": schemaOrg,\n\n\t// UN/CEFACT\n\t\"https://vocabulary.uncefact.org\": unCefactD23B,\n\t\"https://vocabulary.uncefact.org/\": unCefactD23B,\n\t\"https://vocabulary.uncefact.org/unece-context.jsonld\": unCefactD23B,\n\t\"https://vocabulary.uncefact.org/unece-context-D23B.jsonld\": unCefactD23B,\n\n\t// W3C Activity Streams\n\t\"https://www.w3.org/ns/activitystreams#\": w3cActivityStreams,\n\t\"https://www.w3.org/ns/activitystreams\": w3cActivityStreams,\n\t\"https://www.w3.org/ns/activitystreams.jsonld\": w3cActivityStreams,\n\n\t// W3C DCAT\n\t\"http://www.w3.org/ns/dcat#\": w3cDcat,\n\t\"https://www.w3.org/ns/dcat.jsonld\": w3cDcat,\n\t\"http://www.w3.org/ns/dcat.jsonld\": w3cDcat,\n\n\t// W3C DID\n\t\"https://www.w3.org/ns/did/v1\": w3idDidV1,\n\t\"https://www.w3.org/2018/credentials/v1\": w3cVcV1,\n\t\"https://www.w3.org/ns/credentials/v2\": w3cVcV2,\n\t\"https://w3id.org/security/suites/jws-2020/v1\": w3idJwsV1,\n\t\"https://w3id.org/security/suites/ed25519-2020/v1\": w3idEd25519V1,\n\t\"https://w3id.org/security/data-integrity/v2\": w3cDataIntegrityV2,\n\t\"https://www.w3.org/ns/cid/v1\": w3idCidV1,\n\t\"https://w3id.org/security/multikey/v1\": w3idMultiKeyV1,\n\n\t// W3C ODRL\n\t\"http://www.w3.org/ns/odrl/2/\": w3cOdrl,\n\t\"http://www.w3.org/ns/odrl.jsonld\": w3cOdrl,\n\n\t// W3C RDF\n\t\"https://schema.twindev.org/w3c-rdf/\": w3cRdf,\n\t\"https://schema.twindev.org/w3c-rdf/types.jsonld\": w3cRdf,\n\t\"http://www.w3.org/2000/01/rdf-schema#\": w3cRdf\n};\n\n/**\n * Add all the contexts to the document cache.\n */\nexport async function addAllContextsToDocumentCache(): Promise<void> {\n\tfor (const url in LD_CONTEXTS) {\n\t\tawait JsonLdProcessor.documentCacheAdd(url, LD_CONTEXTS[url]);\n\t}\n}\n\n/**\n * Add a context to the document cache.\n * @param url The URL of the context to add to the cache.\n */\nexport async function addContextToDocumentCache(url: string): Promise<void> {\n\tif (Is.empty(LD_CONTEXTS[url])) {\n\t\tthrow new GeneralError(\"ldContext\", \"missing\", { url });\n\t}\n\tawait JsonLdProcessor.documentCacheAdd(url, LD_CONTEXTS[url]);\n}\n"]}
|