Loading CHANGES.md +9 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,14 @@ To be released. - Implemented Object Integrity Proofs. [[FEP-8b32], [#54]] - Added `signObject()` function. - Added `SignObjectOptions` interface. - Added `createProof()` function. - Added `CreateProofOptions` interface. - Added `verifyObject()` function. - Added `VerifyObjectOptions` interface. - Added `verifyProof()` function. - Added `VerifyProofOptions` interface. - Added `fetchKey()` function. - Added `FetchKeyOptions` interface. Loading @@ -105,6 +113,7 @@ To be released. - Added more log messages using the [LogTape] library. Currently the below logger categories are used: - `["fedify", "sig", "proof"]` - `["fedify", "sig", "key"]` [#54]: https://github.com/dahlia/fedify/issues/54 Loading codegen/__snapshots__/class.test.ts.snap +319 −167 File changed.Preview size limit exceeded, changes collapsed. Show changes codegen/codec.ts +8 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ export async function* generateEncoder( yield ` array = []; for (const v of this.${await getFieldName(property.uri)}) { array.push( const element = ( `; if (!areAllScalarTypes(property.range, types)) { yield 'v instanceof URL ? { "@id": v.href } : '; Loading @@ -55,6 +55,13 @@ export async function* generateEncoder( } yield ` ); `; if (!property.functional && property.container === "graph") { yield `array.push({ "@graph": element });`; } else { yield `array.push(element);`; } yield `; } if (array.length > 0) values[${JSON.stringify(property.uri)}] = array; `; Loading codegen/schema.ts +5 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,11 @@ export type PropertySchema = * turned on). */ singularAccessor?: boolean; /** * The container type of the property values. It can be unspecified. */ container?: "graph"; } | PropertySchemaBase & PropertySchemaTyping & { /** Loading codegen/schema.yaml +6 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,11 @@ $defs: Whether to generate singular property accessors. Regardless of this flag, plural property accessors are generated (unless functional is turned on). type: boolean container: description: >- The container type of the property values. It can be unspecified. const: "graph" required: - pluralName - allOf: Loading Loading
CHANGES.md +9 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,14 @@ To be released. - Implemented Object Integrity Proofs. [[FEP-8b32], [#54]] - Added `signObject()` function. - Added `SignObjectOptions` interface. - Added `createProof()` function. - Added `CreateProofOptions` interface. - Added `verifyObject()` function. - Added `VerifyObjectOptions` interface. - Added `verifyProof()` function. - Added `VerifyProofOptions` interface. - Added `fetchKey()` function. - Added `FetchKeyOptions` interface. Loading @@ -105,6 +113,7 @@ To be released. - Added more log messages using the [LogTape] library. Currently the below logger categories are used: - `["fedify", "sig", "proof"]` - `["fedify", "sig", "key"]` [#54]: https://github.com/dahlia/fedify/issues/54 Loading
codegen/__snapshots__/class.test.ts.snap +319 −167 File changed.Preview size limit exceeded, changes collapsed. Show changes
codegen/codec.ts +8 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ export async function* generateEncoder( yield ` array = []; for (const v of this.${await getFieldName(property.uri)}) { array.push( const element = ( `; if (!areAllScalarTypes(property.range, types)) { yield 'v instanceof URL ? { "@id": v.href } : '; Loading @@ -55,6 +55,13 @@ export async function* generateEncoder( } yield ` ); `; if (!property.functional && property.container === "graph") { yield `array.push({ "@graph": element });`; } else { yield `array.push(element);`; } yield `; } if (array.length > 0) values[${JSON.stringify(property.uri)}] = array; `; Loading
codegen/schema.ts +5 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,11 @@ export type PropertySchema = * turned on). */ singularAccessor?: boolean; /** * The container type of the property values. It can be unspecified. */ container?: "graph"; } | PropertySchemaBase & PropertySchemaTyping & { /** Loading
codegen/schema.yaml +6 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,11 @@ $defs: Whether to generate singular property accessors. Regardless of this flag, plural property accessors are generated (unless functional is turned on). type: boolean container: description: >- The container type of the property values. It can be unspecified. const: "graph" required: - pluralName - allOf: Loading