@contentauth/c2pa-types 0.4.2 → 0.4.3
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 +3 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,12 +7,14 @@ Exports TypeScript types autogenerated from [c2pa-rs](https://github.com/content
|
|
|
7
7
|
Ensure the repo-wide prerequisites ([Node.js](https://nodejs.org/) v22+, [NX](https://nx.dev/getting-started/intro), and [pnpm](https://pnpm.io/)) are installed. See the [top-level README](https://github.com/contentauth/c2pa-js#prerequisites) for details.
|
|
8
8
|
|
|
9
9
|
To build the types:
|
|
10
|
+
|
|
10
11
|
```sh
|
|
11
12
|
nx build c2pa-types
|
|
12
13
|
```
|
|
13
14
|
|
|
14
15
|
The types are built as follows:
|
|
16
|
+
|
|
15
17
|
1. Specific structs ([example](https://github.com/contentauth/c2pa-rs/blob/main/sdk/src/manifest.rs#L55)) from c2pa-rs are annotated with the `schemars::JsonSchema` attribute.
|
|
16
18
|
2. JSON schema files are generated by calling `schemars::schema_for` and saved to the `schemas/` directory
|
|
17
19
|
3. Schema files are read by `json-schema-to-typescript` and used to generate TypeScript types, saved to the `types/` directory
|
|
18
|
-
4. Types are "gathered" and exported from the `index.d.ts` file
|
|
20
|
+
4. Types are "gathered" and exported from the `index.d.ts` file
|
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import type { Reader } from './types/ManifestStore.js';
|
|
10
10
|
export interface ManifestStore extends Reader {
|
|
11
11
|
}
|
|
12
|
-
export type { Actor, AssertionMetadata, AssetType, ClaimGeneratorInfo, Coordinate, DataSource, DateT, Frame, HashedUri, Ingredient, IngredientDeltaValidationResult, Item, Manifest, ManifestAssertion, ManifestAssertionKind, Range, Reader, RegionOfInterest, ResourceRef, ReviewRating, Role, Shape, SignatureInfo, SigningAlg, StatusCodes, Text, TextSelector, TextSelectorRange, Time, UriOrResource, ValidationResults, ValidationState, ValidationStatus
|
|
13
|
-
export type { AssertionDefinition, ManifestDefinition
|
|
14
|
-
export type { Builder, BuilderIntent, DigitalSourceType
|
|
12
|
+
export type { Actor, AssertionMetadata, AssetType, ClaimGeneratorInfo, Coordinate, DataSource, DateT, Frame, HashedUri, Ingredient, IngredientDeltaValidationResult, Item, Manifest, ManifestAssertion, ManifestAssertionKind, Range, Reader, RegionOfInterest, ResourceRef, ReviewRating, Role, Shape, SignatureInfo, SigningAlg, StatusCodes, Text, TextSelector, TextSelectorRange, Time, UriOrResource, ValidationResults, ValidationState, ValidationStatus } from './types/ManifestStore.js';
|
|
13
|
+
export type { AssertionDefinition, ManifestDefinition } from './types/ManifestDefinition.js';
|
|
14
|
+
export type { Builder, BuilderIntent, DigitalSourceType } from './types/Builder.js';
|
|
15
15
|
export type { Action } from './types/Action.js';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAIvD,MAAM,WAAW,aAAc,SAAQ,MAAM;CAAG;AAEhD,YAAY,EACV,KAAK,EACL,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,KAAK,EACL,KAAK,EACL,SAAS,EACT,UAAU,EACV,+BAA+B,EAC/B,IAAI,EACJ,QAAQ,EACR,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,EACL,MAAM,EACN,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAIvD,MAAM,WAAW,aAAc,SAAQ,MAAM;CAAG;AAEhD,YAAY,EACV,KAAK,EACL,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,KAAK,EACL,KAAK,EACL,SAAS,EACT,UAAU,EACV,+BAA+B,EAC/B,IAAI,EACJ,QAAQ,EACR,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,EACL,MAAM,EACN,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AAEvC,YAAY,EACV,OAAO,EACP,aAAa,EACb,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC"}
|