@prismicio/migrate 0.0.2-pr.3.de727c7 → 0.0.2-pr.5.6f5d758

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.
@@ -1,5 +1,4 @@
1
1
  //#region src/errors/PrismicRichTextError.d.ts
2
- declare class PrismicRichTextError extends Error {}
2
+ export declare class PrismicRichTextError extends Error {}
3
3
  //#endregion
4
- export { PrismicRichTextError };
5
4
  //# sourceMappingURL=PrismicRichTextError.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichTextError.d.cts","names":[],"sources":["../../src/errors/PrismicRichTextError.ts"],"mappings":";cAAa,6BAA6B"}
1
+ {"version":3,"file":"PrismicRichTextError.d.cts","names":[],"sources":["../../src/errors/PrismicRichTextError.ts"],"mappings":";qBAAa,6BAA6B"}
@@ -1,5 +1,4 @@
1
1
  //#region src/errors/PrismicRichTextError.d.ts
2
- declare class PrismicRichTextError extends Error {}
2
+ export declare class PrismicRichTextError extends Error {}
3
3
  //#endregion
4
- export { PrismicRichTextError };
5
4
  //# sourceMappingURL=PrismicRichTextError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichTextError.d.ts","names":[],"sources":["../../src/errors/PrismicRichTextError.ts"],"mappings":";cAAa,6BAA6B"}
1
+ {"version":3,"file":"PrismicRichTextError.d.ts","names":[],"sources":["../../src/errors/PrismicRichTextError.ts"],"mappings":";qBAAa,6BAA6B"}
@@ -1,6 +1,5 @@
1
1
  import { PrismicRichTextError } from "./PrismicRichTextError.cjs";
2
2
  //#region src/errors/PrismicRichTextSerializerError.d.ts
3
- declare class PrismicRichTextSerializerError extends PrismicRichTextError {}
3
+ export declare class PrismicRichTextSerializerError extends PrismicRichTextError {}
4
4
  //#endregion
5
- export { PrismicRichTextSerializerError };
6
5
  //# sourceMappingURL=PrismicRichTextSerializerError.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichTextSerializerError.d.cts","names":[],"sources":["../../src/errors/PrismicRichTextSerializerError.ts"],"mappings":";;cAEa,uCAAuC"}
1
+ {"version":3,"file":"PrismicRichTextSerializerError.d.cts","names":[],"sources":["../../src/errors/PrismicRichTextSerializerError.ts"],"mappings":";;qBAEa,uCAAuC"}
@@ -1,6 +1,5 @@
1
1
  import { PrismicRichTextError } from "./PrismicRichTextError.js";
2
2
  //#region src/errors/PrismicRichTextSerializerError.d.ts
3
- declare class PrismicRichTextSerializerError extends PrismicRichTextError {}
3
+ export declare class PrismicRichTextSerializerError extends PrismicRichTextError {}
4
4
  //#endregion
5
- export { PrismicRichTextSerializerError };
6
5
  //# sourceMappingURL=PrismicRichTextSerializerError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichTextSerializerError.d.ts","names":[],"sources":["../../src/errors/PrismicRichTextSerializerError.ts"],"mappings":";;cAEa,uCAAuC"}
1
+ {"version":3,"file":"PrismicRichTextSerializerError.d.ts","names":[],"sources":["../../src/errors/PrismicRichTextSerializerError.ts"],"mappings":";;qBAEa,uCAAuC"}
@@ -4,7 +4,7 @@ import { RTInlineNode, RTNode, RichTextField, RichTextNodeTypes } from "@prismic
4
4
  import { Element } from "hast";
5
5
  //#region src/htmlAsRichText.d.ts
6
6
  /** Configuration that determines the output of {@link htmlAsRichText}. */
7
- type HTMLAsRichTextConfig = RehypeRichTextConfig;
7
+ export type HTMLAsRichTextConfig = RehypeRichTextConfig;
8
8
  /** The return type of {@link htmlAsRichText}. */
9
9
  type HTMLAsRichTextReturnType = {
10
10
  result: RichTextField;
@@ -17,7 +17,6 @@ type HTMLAsRichTextReturnType = {
17
17
  * @param config - Configuration that determines the output the function.
18
18
  * @returns `html` as rich text.
19
19
  */
20
- declare const htmlAsRichText: (html: string, config?: HTMLAsRichTextConfig) => HTMLAsRichTextReturnType;
20
+ export declare const htmlAsRichText: (html: string, config?: HTMLAsRichTextConfig) => HTMLAsRichTextReturnType;
21
21
  //#endregion
22
- export { HTMLAsRichTextConfig, htmlAsRichText };
23
22
  //# sourceMappingURL=htmlAsRichText.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"htmlAsRichText.d.cts","names":[],"sources":["../src/htmlAsRichText.ts"],"mappings":";;;;;;KAgEY,uBAAuB;;KAG9B;EACJ,QAAQ;EACR;;;;;;;;;cAUY,iBAAc,cACd,SACH,yBACP"}
1
+ {"version":3,"file":"htmlAsRichText.d.cts","names":[],"sources":["../src/htmlAsRichText.ts"],"mappings":";;;;;;YAgEY,uBAAuB;;KAG9B;EACJ,QAAQ;EACR;;;;;;;;;qBAUY,iBAAc,cACd,SACH,yBACP"}
@@ -4,7 +4,7 @@ import { RTInlineNode, RTNode, RichTextField, RichTextNodeTypes } from "@prismic
4
4
  import { Element } from "hast";
5
5
  //#region src/htmlAsRichText.d.ts
6
6
  /** Configuration that determines the output of {@link htmlAsRichText}. */
7
- type HTMLAsRichTextConfig = RehypeRichTextConfig;
7
+ export type HTMLAsRichTextConfig = RehypeRichTextConfig;
8
8
  /** The return type of {@link htmlAsRichText}. */
9
9
  type HTMLAsRichTextReturnType = {
10
10
  result: RichTextField;
@@ -17,7 +17,6 @@ type HTMLAsRichTextReturnType = {
17
17
  * @param config - Configuration that determines the output the function.
18
18
  * @returns `html` as rich text.
19
19
  */
20
- declare const htmlAsRichText: (html: string, config?: HTMLAsRichTextConfig) => HTMLAsRichTextReturnType;
20
+ export declare const htmlAsRichText: (html: string, config?: HTMLAsRichTextConfig) => HTMLAsRichTextReturnType;
21
21
  //#endregion
22
- export { HTMLAsRichTextConfig, htmlAsRichText };
23
22
  //# sourceMappingURL=htmlAsRichText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"htmlAsRichText.d.ts","names":[],"sources":["../src/htmlAsRichText.ts"],"mappings":";;;;;;KAgEY,uBAAuB;;KAG9B;EACJ,QAAQ;EACR;;;;;;;;;cAUY,iBAAc,cACd,SACH,yBACP"}
1
+ {"version":3,"file":"htmlAsRichText.d.ts","names":[],"sources":["../src/htmlAsRichText.ts"],"mappings":";;;;;;YAgEY,uBAAuB;;KAG9B;EACJ,QAAQ;EACR;;;;;;;;;qBAUY,iBAAc,cACd,SACH,yBACP"}
@@ -9,7 +9,6 @@ import { InjectMigrationSpecificTypes, RTInlineNode, RTNode, RichTextField } fro
9
9
  */
10
10
  type DistributedOmit<ObjectType, KeyType extends keyof ObjectType> = ObjectType extends unknown ? Omit<ObjectType, KeyType> : never;
11
11
  /** An inline node without its `start` and `end` properties. */
12
- type RTPartialInlineNode = DistributedOmit<RTInlineNode, "start" | "end">;
12
+ export type RTPartialInlineNode = DistributedOmit<RTInlineNode, "start" | "end">;
13
13
  //#endregion
14
- export { RTPartialInlineNode };
15
14
  //# sourceMappingURL=RichTextFieldBuilder.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextFieldBuilder.d.cts","names":[],"sources":["../../src/lib/RichTextFieldBuilder.ts"],"mappings":";;;;;;;;;KAkBK,gBAAgB,YAAY,sBAAsB,cAAc,6BAClE,KAAK,YAAY;;KAIR,sBAAsB,gBAAgB"}
1
+ {"version":3,"file":"RichTextFieldBuilder.d.cts","names":[],"sources":["../../src/lib/RichTextFieldBuilder.ts"],"mappings":";;;;;;;;;KAkBK,gBAAgB,YAAY,sBAAsB,cAAc,6BAClE,KAAK,YAAY;;YAIR,sBAAsB,gBAAgB"}
@@ -9,7 +9,6 @@ import { InjectMigrationSpecificTypes, RTInlineNode, RTNode, RichTextField } fro
9
9
  */
10
10
  type DistributedOmit<ObjectType, KeyType extends keyof ObjectType> = ObjectType extends unknown ? Omit<ObjectType, KeyType> : never;
11
11
  /** An inline node without its `start` and `end` properties. */
12
- type RTPartialInlineNode = DistributedOmit<RTInlineNode, "start" | "end">;
12
+ export type RTPartialInlineNode = DistributedOmit<RTInlineNode, "start" | "end">;
13
13
  //#endregion
14
- export { RTPartialInlineNode };
15
14
  //# sourceMappingURL=RichTextFieldBuilder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextFieldBuilder.d.ts","names":[],"sources":["../../src/lib/RichTextFieldBuilder.ts"],"mappings":";;;;;;;;;KAkBK,gBAAgB,YAAY,sBAAsB,cAAc,6BAClE,KAAK,YAAY;;KAIR,sBAAsB,gBAAgB"}
1
+ {"version":3,"file":"RichTextFieldBuilder.d.ts","names":[],"sources":["../../src/lib/RichTextFieldBuilder.ts"],"mappings":";;;;;;;;;KAkBK,gBAAgB,YAAY,sBAAsB,cAAc,6BAClE,KAAK,YAAY;;YAIR,sBAAsB,gBAAgB"}
@@ -4,7 +4,7 @@ import { Element } from "hast";
4
4
  import "vfile";
5
5
  //#region src/lib/hastToRichText.d.ts
6
6
  /** Configuration that determines the output of `toRichText`. */
7
- type HASTToRichTextConfig = {
7
+ export type HASTToRichTextConfig = {
8
8
  /**
9
9
  * An optional HTML to rich text serializer. Will be merged with the default HTML to rich text
10
10
  * serializer.
@@ -18,5 +18,4 @@ type HASTToRichTextConfig = {
18
18
  direction?: "ltr" | "rtl";
19
19
  };
20
20
  //#endregion
21
- export { HASTToRichTextConfig };
22
21
  //# sourceMappingURL=hastToRichText.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hastToRichText.d.cts","names":[],"sources":["../../src/lib/hastToRichText.ts"],"mappings":";;;;;;KAwDY;;;;;EAKX,aAAa;;;;;;EAOb"}
1
+ {"version":3,"file":"hastToRichText.d.cts","names":[],"sources":["../../src/lib/hastToRichText.ts"],"mappings":";;;;;;YAwDY;;;;;EAKX,aAAa;;;;;;EAOb"}
@@ -4,7 +4,7 @@ import { Element } from "hast";
4
4
  import "vfile";
5
5
  //#region src/lib/hastToRichText.d.ts
6
6
  /** Configuration that determines the output of `toRichText`. */
7
- type HASTToRichTextConfig = {
7
+ export type HASTToRichTextConfig = {
8
8
  /**
9
9
  * An optional HTML to rich text serializer. Will be merged with the default HTML to rich text
10
10
  * serializer.
@@ -18,5 +18,4 @@ type HASTToRichTextConfig = {
18
18
  direction?: "ltr" | "rtl";
19
19
  };
20
20
  //#endregion
21
- export { HASTToRichTextConfig };
22
21
  //# sourceMappingURL=hastToRichText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hastToRichText.d.ts","names":[],"sources":["../../src/lib/hastToRichText.ts"],"mappings":";;;;;;KAwDY;;;;;EAKX,aAAa;;;;;;EAOb"}
1
+ {"version":3,"file":"hastToRichText.d.ts","names":[],"sources":["../../src/lib/hastToRichText.ts"],"mappings":";;;;;;YAwDY;;;;;EAKX,aAAa;;;;;;EAOb"}
@@ -4,7 +4,7 @@ import "hast";
4
4
  import "unified";
5
5
  //#region src/lib/rehypeRichText.d.ts
6
6
  /** Configuration options for {@link rehypeRichText}. */
7
- type RehypeRichTextConfig = {
7
+ export type RehypeRichTextConfig = {
8
8
  /**
9
9
  * A CSS selector that targets the section of the document to convert to rich text.
10
10
  *
@@ -55,5 +55,4 @@ declare module "hast" {
55
55
  }
56
56
  }
57
57
  //#endregion
58
- export { RehypeRichTextConfig };
59
58
  //# sourceMappingURL=rehypeRichText.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rehypeRichText.d.cts","names":[],"sources":["../../src/lib/rehypeRichText.ts"],"mappings":";;;;;;KAcY;;;;;;;;;EASX;;;;;;;;;EAUA;;;;;;;;;EAUA;;;;;;;EAQA,QAAQ;IACL;;YAwGO;IACT,eAAe;;;;YAMN;;;;;IAKT"}
1
+ {"version":3,"file":"rehypeRichText.d.cts","names":[],"sources":["../../src/lib/rehypeRichText.ts"],"mappings":";;;;;;YAcY;;;;;;;;;EASX;;;;;;;;;EAUA;;;;;;;;;EAUA;;;;;;;EAQA,QAAQ;IACL;;YAwGO;IACT,eAAe;;;;YAMN;;;;;IAKT"}
@@ -4,7 +4,7 @@ import { CustomTypeModelRichTextField, RichTextField } from "@prismicio/client";
4
4
  import "hast";
5
5
  //#region src/lib/rehypeRichText.d.ts
6
6
  /** Configuration options for {@link rehypeRichText}. */
7
- type RehypeRichTextConfig = {
7
+ export type RehypeRichTextConfig = {
8
8
  /**
9
9
  * A CSS selector that targets the section of the document to convert to rich text.
10
10
  *
@@ -55,5 +55,4 @@ declare module "hast" {
55
55
  }
56
56
  }
57
57
  //#endregion
58
- export { RehypeRichTextConfig };
59
58
  //# sourceMappingURL=rehypeRichText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rehypeRichText.d.ts","names":[],"sources":["../../src/lib/rehypeRichText.ts"],"mappings":";;;;;;KAcY;;;;;;;;;EASX;;;;;;;;;EAUA;;;;;;;;;EAUA;;;;;;;EAQA,QAAQ;IACL;;YAwGO;IACT,eAAe;;;;YAMN;;;;;IAKT"}
1
+ {"version":3,"file":"rehypeRichText.d.ts","names":[],"sources":["../../src/lib/rehypeRichText.ts"],"mappings":";;;;;;YAcY;;;;;;;;;EASX;;;;;;;;;EAUA;;;;;;;;;EAUA;;;;;;;EAQA,QAAQ;IACL;;YAwGO;IACT,eAAe;;;;YAMN;;;;;IAKT"}
package/dist/types.d.cts CHANGED
@@ -12,7 +12,7 @@ import { Element } from "hast";
12
12
  * The `span` rich text node type is not available as it is not relevant in the context of going
13
13
  * from HTML to Prismic rich text.
14
14
  */
15
- type RichTextHTMLMapSerializerShorthand = Exclude<RichTextNodeTypes, "label" | "span"> | {
15
+ export type RichTextHTMLMapSerializerShorthand = Exclude<RichTextNodeTypes, "label" | "span"> | {
16
16
  label: string;
17
17
  };
18
18
  /** The payload provided to a {@link RichTextHTMLMapSerializerFunction}. */
@@ -33,7 +33,7 @@ type RichTextHTMLMapSerializerFunctionPayload = {
33
33
  * Serializing to a rich text node directly is not recommended and is only available as an escape
34
34
  * hatch. Prefer returning a {@link RichTextHTMLMapSerializerShorthand} instead.
35
35
  */
36
- type RichTextHTMLMapSerializerFunction = (payload: RichTextHTMLMapSerializerFunctionPayload) => RichTextHTMLMapSerializerShorthand | InjectMigrationSpecificTypes<RTNode | RTInlineNode | RTPartialInlineNode> | undefined;
36
+ export type RichTextHTMLMapSerializerFunction = (payload: RichTextHTMLMapSerializerFunctionPayload) => RichTextHTMLMapSerializerShorthand | InjectMigrationSpecificTypes<RTNode | RTInlineNode | RTPartialInlineNode> | undefined;
37
37
  /**
38
38
  * Serializes a hast {@link Element} node matching the given HTML tag name or CSS selector to a
39
39
  * Prismic rich text node.
@@ -42,7 +42,6 @@ type RichTextHTMLMapSerializerFunction = (payload: RichTextHTMLMapSerializerFunc
42
42
  * This serializer is used to serialize HTML to Prismic rich text. When serializing Prismic rich
43
43
  * text to HTML with {@link asHTML}, use the {@link HTMLRichTextMapSerializer} type instead.
44
44
  */
45
- type RichTextHTMLMapSerializer = Record<string, RichTextHTMLMapSerializerShorthand | RichTextHTMLMapSerializerFunction>;
45
+ export type RichTextHTMLMapSerializer = Record<string, RichTextHTMLMapSerializerShorthand | RichTextHTMLMapSerializerFunction>;
46
46
  //#endregion
47
- export { RichTextHTMLMapSerializer, RichTextHTMLMapSerializerFunction, RichTextHTMLMapSerializerShorthand };
48
47
  //# sourceMappingURL=types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;;;;;;;;;KAoBY,qCACT,QAAQ;EACN;;;KAGA;;EAEJ,MAAM;;EAGN;;IAEC;;;;;;;;;;;KAYU,qCACX,SAAS,6CAEP,qCACA,6BAA6B,SAAS,eAAe;;;;;;;;;KAW5C,4BAA4B,eAEvC,qCAAqC"}
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;;;;;;;;;YAoBY,qCACT,QAAQ;EACN;;;KAGA;;EAEJ,MAAM;;EAGN;;IAEC;;;;;;;;;;;YAYU,qCACX,SAAS,6CAEP,qCACA,6BAA6B,SAAS,eAAe;;;;;;;;;YAW5C,4BAA4B,eAEvC,qCAAqC"}
package/dist/types.d.ts CHANGED
@@ -12,7 +12,7 @@ import { Element } from "hast";
12
12
  * The `span` rich text node type is not available as it is not relevant in the context of going
13
13
  * from HTML to Prismic rich text.
14
14
  */
15
- type RichTextHTMLMapSerializerShorthand = Exclude<RichTextNodeTypes, "label" | "span"> | {
15
+ export type RichTextHTMLMapSerializerShorthand = Exclude<RichTextNodeTypes, "label" | "span"> | {
16
16
  label: string;
17
17
  };
18
18
  /** The payload provided to a {@link RichTextHTMLMapSerializerFunction}. */
@@ -33,7 +33,7 @@ type RichTextHTMLMapSerializerFunctionPayload = {
33
33
  * Serializing to a rich text node directly is not recommended and is only available as an escape
34
34
  * hatch. Prefer returning a {@link RichTextHTMLMapSerializerShorthand} instead.
35
35
  */
36
- type RichTextHTMLMapSerializerFunction = (payload: RichTextHTMLMapSerializerFunctionPayload) => RichTextHTMLMapSerializerShorthand | InjectMigrationSpecificTypes<RTNode | RTInlineNode | RTPartialInlineNode> | undefined;
36
+ export type RichTextHTMLMapSerializerFunction = (payload: RichTextHTMLMapSerializerFunctionPayload) => RichTextHTMLMapSerializerShorthand | InjectMigrationSpecificTypes<RTNode | RTInlineNode | RTPartialInlineNode> | undefined;
37
37
  /**
38
38
  * Serializes a hast {@link Element} node matching the given HTML tag name or CSS selector to a
39
39
  * Prismic rich text node.
@@ -42,7 +42,6 @@ type RichTextHTMLMapSerializerFunction = (payload: RichTextHTMLMapSerializerFunc
42
42
  * This serializer is used to serialize HTML to Prismic rich text. When serializing Prismic rich
43
43
  * text to HTML with {@link asHTML}, use the {@link HTMLRichTextMapSerializer} type instead.
44
44
  */
45
- type RichTextHTMLMapSerializer = Record<string, RichTextHTMLMapSerializerShorthand | RichTextHTMLMapSerializerFunction>;
45
+ export type RichTextHTMLMapSerializer = Record<string, RichTextHTMLMapSerializerShorthand | RichTextHTMLMapSerializerFunction>;
46
46
  //#endregion
47
- export { RichTextHTMLMapSerializer, RichTextHTMLMapSerializerFunction, RichTextHTMLMapSerializerShorthand };
48
47
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;;;;;;;;;KAoBY,qCACT,QAAQ;EACN;;;KAGA;;EAEJ,MAAM;;EAGN;;IAEC;;;;;;;;;;;KAYU,qCACX,SAAS,6CAEP,qCACA,6BAA6B,SAAS,eAAe;;;;;;;;;KAW5C,4BAA4B,eAEvC,qCAAqC"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;;;;;;;;;YAoBY,qCACT,QAAQ;EACN;;;KAGA;;EAEJ,MAAM;;EAGN;;IAEC;;;;;;;;;;;YAYU,qCACX,SAAS,6CAEP,qCACA,6BAA6B,SAAS,eAAe;;;;;;;;;YAW5C,4BAA4B,eAEvC,qCAAqC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/migrate",
3
- "version": "0.0.2-pr.3.de727c7",
3
+ "version": "0.0.2-pr.5.6f5d758",
4
4
  "description": "Set of helpers to migrate your data to Prismic",
5
5
  "keywords": [
6
6
  "prismic",
@@ -54,19 +54,19 @@
54
54
  "vfile": "^6.0.3"
55
55
  },
56
56
  "devDependencies": {
57
- "@prismicio/client": "^7.21.8",
58
- "@types/node": "^26.1.2",
59
- "@vitest/coverage-v8": "^4.1.10",
60
- "oxfmt": "^0.62.0",
61
- "oxlint": "^1.77.0",
62
- "tsdown": "^0.22.14",
57
+ "@prismicio/client": "^7.22.3",
58
+ "@types/node": "^26.6.5",
59
+ "@vitest/coverage-v8": "^5.0.3",
60
+ "oxfmt": "^0.72.0",
61
+ "oxlint": "^1.87.0",
62
+ "tsdown": "^0.23.0",
63
63
  "typescript": "^7.0.2",
64
- "vitest": "^4.1.10"
64
+ "vitest": "^5.0.3"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@prismicio/client": "^7.21.8"
68
68
  },
69
69
  "engines": {
70
- "node": ">=20"
70
+ "node": ">=22"
71
71
  }
72
72
  }