@twin.org/standards-dublin-core 0.10.0 → 0.10.1-next.1
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/es/compiled/validators.js +73 -0
- package/dist/es/compiled/validators.js.map +1 -0
- package/dist/es/dataTypes/dublinCoreDataTypes.js +8 -2
- package/dist/es/dataTypes/dublinCoreDataTypes.js.map +1 -1
- package/dist/es/index.js +1 -0
- package/dist/es/index.js.map +1 -1
- package/dist/types/compiled/validators.d.ts +5 -0
- package/dist/types/index.d.ts +1 -0
- package/docs/changelog.md +32 -0
- package/docs/reference/index.md +1 -0
- package/docs/reference/variables/CompiledDublinCorePeriodOfTime.md +5 -0
- package/package.json +4 -4
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const MESSAGES = ["must be equal to constant", "must be string", "must be object"];
|
|
2
|
+
function createError(instancePath, schemaPath, keyword, params, message) {
|
|
3
|
+
return { instancePath, schemaPath, keyword, params, ["message"]: typeof message === "number" ? MESSAGES[message] : message };
|
|
4
|
+
}
|
|
5
|
+
function pushError(errors, error) {
|
|
6
|
+
if (errors === null) {
|
|
7
|
+
return [error];
|
|
8
|
+
}
|
|
9
|
+
errors.push(error);
|
|
10
|
+
return errors;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Compiled validator for the DublinCorePeriodOfTime schema.
|
|
14
|
+
*/
|
|
15
|
+
export const CompiledDublinCorePeriodOfTime = validate52;
|
|
16
|
+
function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
17
|
+
/*# sourceURL="https://schema.twindev.org/dublin-core/DublinCorePeriodOfTime" */ ;
|
|
18
|
+
let vErrors = null;
|
|
19
|
+
let errors = 0;
|
|
20
|
+
const evaluated0 = validate52.evaluated;
|
|
21
|
+
if (evaluated0.dynamicProps) {
|
|
22
|
+
evaluated0.props = undefined;
|
|
23
|
+
}
|
|
24
|
+
if (evaluated0.dynamicItems) {
|
|
25
|
+
evaluated0.items = undefined;
|
|
26
|
+
}
|
|
27
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
28
|
+
if (data["@type"] !== undefined) {
|
|
29
|
+
if ("PeriodOfTime" !== data["@type"]) {
|
|
30
|
+
const err0 = createError(instancePath + "/@type", "#/properties/%40type/const", "const", { allowedValue: "PeriodOfTime" }, 0);
|
|
31
|
+
vErrors = pushError(vErrors, err0);
|
|
32
|
+
errors++;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (data["dcat:startDate"] !== undefined) {
|
|
36
|
+
if (typeof data["dcat:startDate"] !== "string") {
|
|
37
|
+
const err1 = createError(instancePath + "/dcat:startDate", "#/properties/dcat%3AstartDate/type", "type", { type: "string" }, 1);
|
|
38
|
+
vErrors = pushError(vErrors, err1);
|
|
39
|
+
errors++;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (data["dcat:endDate"] !== undefined) {
|
|
43
|
+
if (typeof data["dcat:endDate"] !== "string") {
|
|
44
|
+
const err2 = createError(instancePath + "/dcat:endDate", "#/properties/dcat%3AendDate/type", "type", { type: "string" }, 1);
|
|
45
|
+
vErrors = pushError(vErrors, err2);
|
|
46
|
+
errors++;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (data["time:hasBeginning"] !== undefined) {
|
|
50
|
+
if (typeof data["time:hasBeginning"] !== "string") {
|
|
51
|
+
const err3 = createError(instancePath + "/time:hasBeginning", "#/properties/time%3AhasBeginning/type", "type", { type: "string" }, 1);
|
|
52
|
+
vErrors = pushError(vErrors, err3);
|
|
53
|
+
errors++;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (data["time:hasEnd"] !== undefined) {
|
|
57
|
+
if (typeof data["time:hasEnd"] !== "string") {
|
|
58
|
+
const err4 = createError(instancePath + "/time:hasEnd", "#/properties/time%3AhasEnd/type", "type", { type: "string" }, 1);
|
|
59
|
+
vErrors = pushError(vErrors, err4);
|
|
60
|
+
errors++;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
const err5 = createError(instancePath, "#/type", "type", { type: "object" }, 2);
|
|
66
|
+
vErrors = pushError(vErrors, err5);
|
|
67
|
+
errors++;
|
|
68
|
+
}
|
|
69
|
+
validate52.errors = vErrors;
|
|
70
|
+
return errors === 0;
|
|
71
|
+
}
|
|
72
|
+
validate52.evaluated = { "props": { "@type": true, "dcat:startDate": true, "dcat:endDate": true, "time:hasBeginning": true, "time:hasEnd": true }, "dynamicProps": false, "dynamicItems": false };
|
|
73
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/compiled/validators.ts"],"names":[],"mappings":"AAOA,MAAM,QAAQ,GAAG,CAAC,2BAA2B,EAAC,gBAAgB,EAAC,gBAAgB,CAAC,CAAC;AACjF,SAAS,WAAW,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO;IACvE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;AAC7H,CAAC;AACD,SAAS,SAAS,CAAC,MAAM,EAAE,KAAK;IAChC,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,OAAO,MAAM,CAAC;AACd,CAAC;AACD;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAuB,UAAU,CAAC;AAE7E,SAAS,UAAU,CAAC,IAAI,EAAE,EAAC,YAAY,GAAC,EAAE,EAAE,UAAU,EAAE,kBAAk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AAG,WAAW,CAAC,YAAY,EAAC,QAAQ,EAAC,MAAM,EAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,EAAC,CAAC,CAAC,CAAC;QAC1E,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACnC,MAAM,EAAE,CAAC;IACT,CAAC;IACD,UAAU,CAAC,MAAM,GAAG,OAAO,CAAC;IAC5B,OAAO,MAAM,KAAK,CAAC,CAAC;AACpB,CAAC;AACD,UAAU,CAAC,SAAS,GAAG,EAAC,OAAO,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAC,cAAc,EAAC,IAAI,EAAC,mBAAmB,EAAC,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,EAAC,cAAc,EAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAC,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n// This file is generated by ts-to-schema, do not edit it directly.\n// @ts-nocheck\n/* cspell:disable */\nimport type { ICompiledValidator } from \"@twin.org/data-core\";\n\nconst MESSAGES = [\"must be equal to constant\",\"must be string\",\"must be object\"];\nfunction createError(instancePath, schemaPath, keyword, params, message) {\nreturn { instancePath, schemaPath, keyword, params, [\"message\"]: typeof message === \"number\" ? MESSAGES[message] : message };\n}\nfunction pushError(errors, error) {\nif (errors === null) {\nreturn [error];\n}\nerrors.push(error);\nreturn errors;\n}\n/**\n * Compiled validator for the DublinCorePeriodOfTime schema.\n */\nexport const CompiledDublinCorePeriodOfTime: ICompiledValidator = validate52;\n\nfunction validate52(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){\n/*# sourceURL=\"https://schema.twindev.org/dublin-core/DublinCorePeriodOfTime\" */;\nlet vErrors = null;\nlet errors = 0;\nconst evaluated0 = validate52.evaluated;\nif(evaluated0.dynamicProps){\nevaluated0.props = undefined;\n}\nif(evaluated0.dynamicItems){\nevaluated0.items = undefined;\n}\nif(data && typeof data == \"object\" && !Array.isArray(data)){\nif(data[\"@type\"] !== undefined){\nif(\"PeriodOfTime\" !== data[\"@type\"]){\nconst err0 = createError(instancePath+\"/@type\",\"#/properties/%40type/const\",\"const\",{allowedValue: \"PeriodOfTime\"},0);\nvErrors = pushError(vErrors, err0);\nerrors++;\n}\n}\nif(data[\"dcat:startDate\"] !== undefined){\nif(typeof data[\"dcat:startDate\"] !== \"string\"){\nconst err1 = createError(instancePath+\"/dcat:startDate\",\"#/properties/dcat%3AstartDate/type\",\"type\",{type: \"string\"},1);\nvErrors = pushError(vErrors, err1);\nerrors++;\n}\n}\nif(data[\"dcat:endDate\"] !== undefined){\nif(typeof data[\"dcat:endDate\"] !== \"string\"){\nconst err2 = createError(instancePath+\"/dcat:endDate\",\"#/properties/dcat%3AendDate/type\",\"type\",{type: \"string\"},1);\nvErrors = pushError(vErrors, err2);\nerrors++;\n}\n}\nif(data[\"time:hasBeginning\"] !== undefined){\nif(typeof data[\"time:hasBeginning\"] !== \"string\"){\nconst err3 = createError(instancePath+\"/time:hasBeginning\",\"#/properties/time%3AhasBeginning/type\",\"type\",{type: \"string\"},1);\nvErrors = pushError(vErrors, err3);\nerrors++;\n}\n}\nif(data[\"time:hasEnd\"] !== undefined){\nif(typeof data[\"time:hasEnd\"] !== \"string\"){\nconst err4 = createError(instancePath+\"/time:hasEnd\",\"#/properties/time%3AhasEnd/type\",\"type\",{type: \"string\"},1);\nvErrors = pushError(vErrors, err4);\nerrors++;\n}\n}\n}\nelse {\nconst err5 = createError(instancePath,\"#/type\",\"type\",{type: \"object\"},2);\nvErrors = pushError(vErrors, err5);\nerrors++;\n}\nvalidate52.errors = vErrors;\nreturn errors === 0;\n}\nvalidate52.evaluated = {\"props\":{\"@type\":true,\"dcat:startDate\":true,\"dcat:endDate\":true,\"time:hasBeginning\":true,\"time:hasEnd\":true},\"dynamicProps\":false,\"dynamicItems\":false};\n\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
3
|
import { DataTypeHelper } from "@twin.org/data-core";
|
|
4
4
|
import { JsonLdProcessor } from "@twin.org/data-json-ld";
|
|
5
|
+
import * as CompiledValidators from "../compiled/validators.js";
|
|
5
6
|
import { DublinCoreClasses } from "../models/dublinCoreClasses.js";
|
|
6
7
|
import { DublinCoreContexts } from "../models/dublinCoreContexts.js";
|
|
7
8
|
import PeriodOfTimeSchema from "../schemas/DublinCorePeriodOfTime.json" with { type: "json" };
|
|
@@ -23,11 +24,16 @@ export class DublinCoreDataTypes {
|
|
|
23
24
|
const types = [
|
|
24
25
|
{
|
|
25
26
|
type: DublinCoreClasses.PeriodOfTime,
|
|
26
|
-
schema: PeriodOfTimeSchema
|
|
27
|
+
schema: PeriodOfTimeSchema,
|
|
28
|
+
compiledValidator: CompiledValidators.CompiledDublinCorePeriodOfTime
|
|
27
29
|
}
|
|
28
30
|
];
|
|
29
31
|
DataTypeHelper.registerTypes(DublinCoreContexts.NamespaceTerms, DublinCoreContexts.JsonLdContextTerms, types);
|
|
30
|
-
DataTypeHelper.registerTypes(DublinCoreContexts.JsonSchemaNamespace, DublinCoreContexts.JsonLdContextTerms, types.map(t => ({
|
|
32
|
+
DataTypeHelper.registerTypes(DublinCoreContexts.JsonSchemaNamespace, DublinCoreContexts.JsonLdContextTerms, types.map(t => ({
|
|
33
|
+
type: `DublinCore${t.type}`,
|
|
34
|
+
schema: t.schema,
|
|
35
|
+
compiledValidator: t.compiledValidator
|
|
36
|
+
})));
|
|
31
37
|
}
|
|
32
38
|
}
|
|
33
39
|
//# sourceMappingURL=dublinCoreDataTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dublinCoreDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/dublinCoreDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;A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,CAAC;QACF,eAAe,CAAC,WAAW,CAC1B,sCAAsC,EACtC,kBAAkB,CAAC,qBAAqB,CACxC,CAAC;IACH,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,iBAAiB,CAAC,YAAY;gBACpC,MAAM,EAAE,kBAAkB;gBAC1B,iBAAiB,EAAE,kBAAkB,CAAC,8BAA8B;aACpE;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,kBAAkB,CAAC,cAAc,EACjC,kBAAkB,CAAC,kBAAkB,EACrC,KAAK,CACL,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,kBAAkB,CAAC,mBAAmB,EACtC,kBAAkB,CAAC,kBAAkB,EACrC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACf,IAAI,EAAE,aAAa,CAAC,CAAC,IAAI,EAAE;YAC3B,MAAM,EAAE,CAAC,CAAC,MAAM;YAChB,iBAAiB,EAAE,CAAC,CAAC,iBAAiB;SACtC,CAAC,CAAC,CACH,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport * as CompiledValidators from \"../compiled/validators.js\";\nimport { DublinCoreClasses } from \"../models/dublinCoreClasses.js\";\nimport { DublinCoreContexts } from \"../models/dublinCoreContexts.js\";\nimport PeriodOfTimeSchema from \"../schemas/DublinCorePeriodOfTime.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for Dublin Core.\n */\nexport class DublinCoreDataTypes {\n\t/**\n\t * Register the JSON-LD Redirects.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(\n\t\t\t/https?:\\/\\/purl.org\\/dc\\/terms\\/?/,\n\t\t\tDublinCoreContexts.JsonLdContextTerms\n\t\t);\n\t\tJsonLdProcessor.addRedirect(\n\t\t\t/https?:\\/\\/purl.org\\/dc\\/dcmitype\\/?/,\n\t\t\tDublinCoreContexts.JsonLdContextDcmiType\n\t\t);\n\t}\n\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: DublinCoreClasses.PeriodOfTime,\n\t\t\t\tschema: PeriodOfTimeSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledDublinCorePeriodOfTime\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tDublinCoreContexts.NamespaceTerms,\n\t\t\tDublinCoreContexts.JsonLdContextTerms,\n\t\t\ttypes\n\t\t);\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tDublinCoreContexts.JsonSchemaNamespace,\n\t\t\tDublinCoreContexts.JsonLdContextTerms,\n\t\t\ttypes.map(t => ({\n\t\t\t\ttype: `DublinCore${t.type}`,\n\t\t\t\tschema: t.schema,\n\t\t\t\tcompiledValidator: t.compiledValidator\n\t\t\t}))\n\t\t);\n\t}\n}\n"]}
|
package/dist/es/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Copyright 2024 IOTA Stiftung.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./compiled/validators.js";
|
|
3
4
|
export * from "./models/dublinCoreContexts.js";
|
|
4
5
|
export * from "./models/dublinCorePropertyType.js";
|
|
5
6
|
export * from "./models/dublinCoreClasses.js";
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./models/dublinCoreContexts.js\";\nexport * from \"./models/dublinCorePropertyType.js\";\nexport * from \"./models/dublinCoreClasses.js\";\nexport * from \"./models/IDublinCorePeriodOfTime.js\";\nexport * from \"./dataTypes/dublinCoreDataTypes.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./compiled/validators.js\";\nexport * from \"./models/dublinCoreContexts.js\";\nexport * from \"./models/dublinCorePropertyType.js\";\nexport * from \"./models/dublinCoreClasses.js\";\nexport * from \"./models/IDublinCorePeriodOfTime.js\";\nexport * from \"./dataTypes/dublinCoreDataTypes.js\";\n"]}
|
package/dist/types/index.d.ts
CHANGED
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.1-next.1](https://github.com/iotaledger/twin-standards/compare/standards-dublin-core-v0.10.1-next.0...standards-dublin-core-v0.10.1-next.1) (2026-09-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add Collection and hasPart to Dublin Core ([#13](https://github.com/iotaledger/twin-standards/issues/13)) ([867ddbc](https://github.com/iotaledger/twin-standards/commit/867ddbcad0c4afec3c112b113eb97ab431cf84b1))
|
|
9
|
+
* add context id features ([#64](https://github.com/iotaledger/twin-standards/issues/64)) ([e68bb87](https://github.com/iotaledger/twin-standards/commit/e68bb87a215f3c3956cfd6400a5e1e2a16256085))
|
|
10
|
+
* add validate-locales ([838389c](https://github.com/iotaledger/twin-standards/commit/838389c1daf62ed42397d5758d267c3d1a37fa4d))
|
|
11
|
+
* add w3c dcat standards package ([#68](https://github.com/iotaledger/twin-standards/issues/68)) ([85746c6](https://github.com/iotaledger/twin-standards/commit/85746c673464498a52e9c30ce498fd88b81a7434))
|
|
12
|
+
* compiled schemas ([7d626dc](https://github.com/iotaledger/twin-standards/commit/7d626dc6dc30d7f7918f4aa6e90f06dafd8d9da4))
|
|
13
|
+
* dublin core refactor ([548db75](https://github.com/iotaledger/twin-standards/commit/548db75600d44a0ab8f7bff2f07261552dc2b0b1))
|
|
14
|
+
* eslint migration to flat config ([648c1a1](https://github.com/iotaledger/twin-standards/commit/648c1a1e69d99b6b0cf69358ec6bdeecdbe3a5ea))
|
|
15
|
+
* export unece schemas ([ef9af8d](https://github.com/iotaledger/twin-standards/commit/ef9af8db9931d1b7ca3a77c15b17bba6a3e7badc))
|
|
16
|
+
* improve type definitions ([#278](https://github.com/iotaledger/twin-standards/issues/278)) ([bf3f37e](https://github.com/iotaledger/twin-standards/commit/bf3f37e1c191770f2a88b65bec3d59506c93c263))
|
|
17
|
+
* improved namespaces and contexts ([#102](https://github.com/iotaledger/twin-standards/issues/102)) ([c74c370](https://github.com/iotaledger/twin-standards/commit/c74c370cd8145d6166ca4454353f3774c302ac3b))
|
|
18
|
+
* remove IJsonLdNodeObject base interfaces ([#172](https://github.com/iotaledger/twin-standards/issues/172)) ([8ff8d7a](https://github.com/iotaledger/twin-standards/commit/8ff8d7a2892d626879b76ba5da912469ff899954))
|
|
19
|
+
* typescript 6 update ([79bfb52](https://github.com/iotaledger/twin-standards/commit/79bfb52e3dcb24689cec7b201dde822bcee970c5))
|
|
20
|
+
* update dependencies ([e422ed3](https://github.com/iotaledger/twin-standards/commit/e422ed351fb09e2deea5ef741326c37b0802af3a))
|
|
21
|
+
* update framework core ([58c0c3d](https://github.com/iotaledger/twin-standards/commit/58c0c3dd6cea0e4c2393dc0e3e1eb33a6d06f617))
|
|
22
|
+
* update to latest JSON schema spec ([7a23930](https://github.com/iotaledger/twin-standards/commit/7a2393032d7f48bfb20d3a484f981fb6dd83a92c))
|
|
23
|
+
* update to new ts-ts-schema and generic constructs ([4dff991](https://github.com/iotaledger/twin-standards/commit/4dff991fb70de4320668641ed94abf8e9b06acad))
|
|
24
|
+
* update ts-to-schema generation ([ba4e76d](https://github.com/iotaledger/twin-standards/commit/ba4e76d677556a1817092f8079d4cce67dee94bc))
|
|
25
|
+
* update ts-to-schema generation ([0905daa](https://github.com/iotaledger/twin-standards/commit/0905daa4a344ed35fc37b7f12fcf9ce9d34e4bd6))
|
|
26
|
+
* update type names ([#89](https://github.com/iotaledger/twin-standards/issues/89)) ([6fdef47](https://github.com/iotaledger/twin-standards/commit/6fdef4792151f89d1a95a07da8309d05a7b6de3d))
|
|
27
|
+
* use shared store mechanism ([#11](https://github.com/iotaledger/twin-standards/issues/11)) ([96fa237](https://github.com/iotaledger/twin-standards/commit/96fa23735f69c1fc7e3d0019b527634fa0a042d9))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* updating the missing packages ([#114](https://github.com/iotaledger/twin-standards/issues/114)) ([90b03f8](https://github.com/iotaledger/twin-standards/commit/90b03f8bdcd81506284d74a445840386c2da2d35))
|
|
33
|
+
* when a prefix is declared in an [@context](https://github.com/context) it should be Namespace and not Context ([#119](https://github.com/iotaledger/twin-standards/issues/119)) ([110cc50](https://github.com/iotaledger/twin-standards/commit/110cc5039394c7fcfada0e3ca001013cb503f31a))
|
|
34
|
+
|
|
3
35
|
## [0.10.0](https://github.com/iotaledger/twin-standards/compare/standards-dublin-core-v0.10.0...standards-dublin-core-v0.10.0) (2026-09-16)
|
|
4
36
|
|
|
5
37
|
|
package/docs/reference/index.md
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
## Variables
|
|
18
18
|
|
|
19
|
+
- [CompiledDublinCorePeriodOfTime](variables/CompiledDublinCorePeriodOfTime.md)
|
|
19
20
|
- [DublinCoreClasses](variables/DublinCoreClasses.md)
|
|
20
21
|
- [DublinCoreContexts](variables/DublinCoreContexts.md)
|
|
21
22
|
- [DublinCorePropertyType](variables/DublinCorePropertyType.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/standards-dublin-core",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1-next.1",
|
|
4
4
|
"description": "Data models for Dublin Core metadata terms.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"node": ">=24.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/data-core": "
|
|
18
|
-
"@twin.org/data-json-ld": "
|
|
19
|
-
"@twin.org/web": "
|
|
17
|
+
"@twin.org/data-core": "next",
|
|
18
|
+
"@twin.org/data-json-ld": "next",
|
|
19
|
+
"@twin.org/web": "next"
|
|
20
20
|
},
|
|
21
21
|
"main": "./dist/es/index.js",
|
|
22
22
|
"types": "./dist/types/index.d.ts",
|