@getcommunity/gc-validators 0.0.271-alpha.29 → 0.0.271-alpha.30
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/{document-B4XXhINT.d.mts → document-B2aoqff0.d.mts} +3 -3
- package/dist/{document-CbRiGZIl.d.mts → document-BMjLKznC.d.cts} +1 -1
- package/dist/{document-CHBScA2R.d.cts → document-BQvjNL90.d.cts} +3 -3
- package/dist/{document-CtZJmuhD.mjs → document-BtDFNH80.mjs} +19 -19
- package/dist/{document-Dk5LcN6P.d.cts → document-DHzS3xq4.d.cts} +1 -1
- package/dist/{document-BtdeKgES.d.cts → document-DMXDGfAf.d.mts} +1 -1
- package/dist/{document-DAnLwUum.d.mts → document-S3LRQmhC.d.mts} +1 -1
- package/dist/entities/blog-post/document.d.cts +1 -1
- package/dist/entities/blog-post/document.d.mts +1 -1
- package/dist/entities/blog-post/fields.cjs +1 -1
- package/dist/entities/blog-post/fields.d.cts +1 -1
- package/dist/entities/blog-post/fields.d.mts +1 -1
- package/dist/entities/blog-post/fields.mjs +1 -1
- package/dist/entities/blog-post/query.d.cts +2 -2
- package/dist/entities/blog-post/query.d.mts +2 -2
- package/dist/entities/category/document.d.cts +1 -1
- package/dist/entities/category/document.d.mts +1 -1
- package/dist/entities/category/fields.d.cts +1 -1
- package/dist/entities/category/fields.d.mts +1 -1
- package/dist/entities/category/query.d.cts +1 -1
- package/dist/entities/category/query.d.mts +1 -1
- package/dist/entities/client/document.cjs +1 -1
- package/dist/entities/client/document.d.cts +1 -1
- package/dist/entities/client/document.d.mts +1 -1
- package/dist/entities/client/document.mjs +1 -1
- package/dist/entities/client/fields.d.cts +1 -1
- package/dist/entities/client/fields.d.mts +1 -1
- package/dist/entities/client/query.d.cts +1 -1
- package/dist/entities/client/query.d.mts +1 -1
- package/dist/entities/client-content-pillar/document.cjs +1 -1
- package/dist/entities/client-content-pillar/document.d.cts +1 -1
- package/dist/entities/client-content-pillar/document.d.mts +1 -1
- package/dist/entities/client-content-pillar/document.mjs +1 -1
- package/dist/entities/client-media-platform/document.cjs +1 -1
- package/dist/entities/client-media-platform/document.d.cts +1 -1
- package/dist/entities/client-media-platform/document.d.mts +1 -1
- package/dist/entities/client-media-platform/document.mjs +1 -1
- package/dist/entities/client-project/document.cjs +1 -1
- package/dist/entities/client-project/document.d.cts +1 -1
- package/dist/entities/client-project/document.d.mts +1 -1
- package/dist/entities/client-project/document.mjs +1 -1
- package/dist/entities/client-project/fields.d.cts +1 -1
- package/dist/entities/client-project/fields.d.mts +1 -1
- package/dist/entities/client-project/query.d.cts +1 -1
- package/dist/entities/client-project/query.d.mts +1 -1
- package/dist/entities/client-report/document.cjs +1 -1
- package/dist/entities/client-report/document.d.cts +1 -1
- package/dist/entities/client-report/document.d.mts +1 -1
- package/dist/entities/client-report/document.mjs +1 -1
- package/dist/entities/client-report/fields.d.cts +1 -1
- package/dist/entities/client-report/fields.d.mts +1 -1
- package/dist/entities/client-report/query.d.cts +1 -1
- package/dist/entities/client-report/query.d.mts +1 -1
- package/dist/entities/client-styleguide/document.cjs +1 -1
- package/dist/entities/client-styleguide/document.d.cts +1 -1
- package/dist/entities/client-styleguide/document.d.mts +1 -1
- package/dist/entities/client-styleguide/document.mjs +1 -1
- package/dist/entities/client-styleguide/fields.d.cts +1 -1
- package/dist/entities/client-styleguide/fields.d.mts +1 -1
- package/dist/entities/client-styleguide/query.d.cts +1 -1
- package/dist/entities/client-styleguide/query.d.mts +1 -1
- package/dist/entities/client-user/document.cjs +1 -1
- package/dist/entities/client-user/document.d.cts +1 -1
- package/dist/entities/client-user/document.d.mts +1 -1
- package/dist/entities/client-user/document.mjs +1 -1
- package/dist/entities/comment/document.d.cts +1 -1
- package/dist/entities/comment/document.d.mts +1 -1
- package/dist/entities/comment/fields.d.cts +1 -1
- package/dist/entities/comment/fields.d.mts +1 -1
- package/dist/entities/comment/query.d.cts +2 -2
- package/dist/entities/comment/query.d.mts +2 -2
- package/dist/entities/content-pillar/document.cjs +1 -1
- package/dist/entities/content-pillar/document.d.cts +1 -1
- package/dist/entities/content-pillar/document.d.mts +1 -1
- package/dist/entities/content-pillar/document.mjs +1 -1
- package/dist/entities/content-pillar/fields.d.cts +1 -1
- package/dist/entities/content-pillar/fields.d.mts +1 -1
- package/dist/entities/content-pillar/query.d.cts +1 -1
- package/dist/entities/content-pillar/query.d.mts +1 -1
- package/dist/entities/formatter/constants.cjs +29 -0
- package/dist/entities/formatter/constants.d.cts +9 -2
- package/dist/entities/formatter/constants.d.mts +9 -2
- package/dist/entities/formatter/constants.mjs +24 -1
- package/dist/entities/formatter/fields.cjs +173 -0
- package/dist/entities/formatter/fields.d.cts +77 -0
- package/dist/entities/formatter/fields.d.mts +77 -0
- package/dist/entities/formatter/fields.mjs +159 -0
- package/dist/entities/gcflytour/document.cjs +1 -1
- package/dist/entities/gcflytour/document.d.cts +1 -1
- package/dist/entities/gcflytour/document.d.mts +1 -1
- package/dist/entities/gcflytour/document.mjs +1 -1
- package/dist/entities/gcflytour/fields.d.cts +1 -1
- package/dist/entities/gcflytour/fields.d.mts +1 -1
- package/dist/entities/gcflytour/query.d.cts +1 -1
- package/dist/entities/gcflytour/query.d.mts +1 -1
- package/dist/entities/gcflytour-snap/document.cjs +1 -1
- package/dist/entities/gcflytour-snap/document.d.cts +1 -1
- package/dist/entities/gcflytour-snap/document.d.mts +1 -1
- package/dist/entities/gcflytour-snap/document.mjs +1 -1
- package/dist/entities/gcflytour-snap/fields.d.cts +1 -1
- package/dist/entities/gcflytour-snap/fields.d.mts +1 -1
- package/dist/entities/gcflytour-snap/query.d.cts +1 -1
- package/dist/entities/gcflytour-snap/query.d.mts +1 -1
- package/dist/entities/media-content-type/document.cjs +1 -1
- package/dist/entities/media-content-type/document.d.cts +1 -1
- package/dist/entities/media-content-type/document.d.mts +1 -1
- package/dist/entities/media-content-type/document.mjs +1 -1
- package/dist/entities/media-content-type/fields.d.cts +1 -1
- package/dist/entities/media-content-type/fields.d.mts +1 -1
- package/dist/entities/media-content-type/query.d.cts +1 -1
- package/dist/entities/media-content-type/query.d.mts +1 -1
- package/dist/entities/media-creative-format/document.cjs +1 -1
- package/dist/entities/media-creative-format/document.d.cts +1 -1
- package/dist/entities/media-creative-format/document.d.mts +1 -1
- package/dist/entities/media-creative-format/document.mjs +1 -1
- package/dist/entities/media-creative-format/fields.d.cts +1 -1
- package/dist/entities/media-creative-format/fields.d.mts +1 -1
- package/dist/entities/media-creative-format/query.d.cts +1 -1
- package/dist/entities/media-creative-format/query.d.mts +1 -1
- package/dist/entities/media-medium/document.cjs +1 -1
- package/dist/entities/media-medium/document.d.cts +1 -1
- package/dist/entities/media-medium/document.d.mts +1 -1
- package/dist/entities/media-medium/document.mjs +1 -1
- package/dist/entities/media-medium/fields.d.cts +1 -1
- package/dist/entities/media-medium/fields.d.mts +1 -1
- package/dist/entities/media-medium/query.d.cts +1 -1
- package/dist/entities/media-medium/query.d.mts +1 -1
- package/dist/entities/media-platform/document.cjs +1 -1
- package/dist/entities/media-platform/document.d.cts +1 -1
- package/dist/entities/media-platform/document.d.mts +1 -1
- package/dist/entities/media-platform/document.mjs +1 -1
- package/dist/entities/media-platform/fields.d.cts +1 -1
- package/dist/entities/media-platform/fields.d.mts +1 -1
- package/dist/entities/media-platform/query.d.cts +1 -1
- package/dist/entities/media-platform/query.d.mts +1 -1
- package/dist/entities/monday-workspace/document.cjs +1 -1
- package/dist/entities/monday-workspace/document.d.cts +1 -1
- package/dist/entities/monday-workspace/document.d.mts +1 -1
- package/dist/entities/monday-workspace/document.mjs +1 -1
- package/dist/entities/monday-workspace/fields.d.cts +1 -1
- package/dist/entities/monday-workspace/fields.d.mts +1 -1
- package/dist/entities/monday-workspace/query.d.cts +1 -1
- package/dist/entities/monday-workspace/query.d.mts +1 -1
- package/dist/entities/product-highlight/document.cjs +1 -1
- package/dist/entities/product-highlight/document.d.cts +1 -1
- package/dist/entities/product-highlight/document.d.mts +1 -1
- package/dist/entities/product-highlight/document.mjs +1 -1
- package/dist/entities/tag/fields.d.cts +1 -1
- package/dist/entities/tag/fields.d.mts +1 -1
- package/dist/entities/tag/query.d.cts +1 -1
- package/dist/entities/tag/query.d.mts +1 -1
- package/dist/entities/team-member/document.d.cts +1 -1
- package/dist/entities/team-member/document.d.mts +1 -1
- package/dist/entities/trend/document.d.cts +1 -1
- package/dist/entities/trend/document.d.mts +1 -1
- package/dist/entities/up-permission/document.cjs +1 -1
- package/dist/entities/up-permission/document.d.cts +1 -1
- package/dist/entities/up-permission/document.d.mts +1 -1
- package/dist/entities/up-permission/document.mjs +1 -1
- package/dist/entities/up-role/document.cjs +1 -1
- package/dist/entities/up-role/document.d.cts +1 -1
- package/dist/entities/up-role/document.d.mts +1 -1
- package/dist/entities/up-role/document.mjs +1 -1
- package/dist/entities/up-user/document.cjs +1 -1
- package/dist/entities/up-user/document.d.cts +1 -1
- package/dist/entities/up-user/document.d.mts +1 -1
- package/dist/entities/up-user/document.mjs +1 -1
- package/dist/entities/user-account/document.cjs +1 -1
- package/dist/entities/user-account/document.d.cts +1 -1
- package/dist/entities/user-account/document.d.mts +1 -1
- package/dist/entities/user-account/document.mjs +1 -1
- package/dist/entities/utm-tracking-link/document.cjs +1 -1
- package/dist/entities/utm-tracking-link/document.d.cts +1 -1
- package/dist/entities/utm-tracking-link/document.d.mts +1 -1
- package/dist/entities/utm-tracking-link/document.mjs +1 -1
- package/dist/{fields-CTfsBi5c.d.cts → fields-C3SbpCep.d.cts} +1 -1
- package/dist/{fields-C_h0liCI.d.mts → fields-D1hJdDMr.d.mts} +1 -1
- package/dist/{fields-Bsv50wnV.d.mts → fields-DM4JoXae.d.mts} +1 -1
- package/dist/{fields-Dze87buK.d.cts → fields-fMxhNs0s.d.cts} +1 -1
- package/dist/{fields-CYFbYk8t.d.cts → fields-nDu54b5F.d.cts} +1 -1
- package/dist/{fields-BNPZU6Gp.d.mts → fields-pg0wUFO1.d.mts} +1 -1
- package/dist/permissions/index.d.cts +1 -1
- package/dist/permissions/index.d.mts +1 -1
- package/dist/utilities/index.d.cts +1 -1
- package/dist/utilities/index.d.mts +1 -1
- package/package.json +1 -1
- package/dist/{document-B-vL7OEu.cjs → document-CNVZUrK7.cjs} +18 -18
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as ClientUserDocument, s as ClientUserDocumentStatus } from "../../document-BtDFNH80.mjs";
|
|
2
2
|
export { ClientUserDocument, ClientUserDocumentStatus };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as CommentThread, n as CommentDocument, r as CommentReportDocument, t as CommentAuthor } from "../../document-
|
|
1
|
+
import { i as CommentThread, n as CommentDocument, r as CommentReportDocument, t as CommentAuthor } from "../../document-BMjLKznC.cjs";
|
|
2
2
|
export { CommentAuthor, CommentDocument, CommentReportDocument, CommentThread };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as CommentThread, n as CommentDocument, r as CommentReportDocument, t as CommentAuthor } from "../../document-
|
|
1
|
+
import { i as CommentThread, n as CommentDocument, r as CommentReportDocument, t as CommentAuthor } from "../../document-DMXDGfAf.mjs";
|
|
2
2
|
export { CommentAuthor, CommentDocument, CommentReportDocument, CommentThread };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as QuerySortStrapiComments, r as ReportCommentReason, t as CommentApprovalStatus } from "../../fields-
|
|
1
|
+
import { n as QuerySortStrapiComments, r as ReportCommentReason, t as CommentApprovalStatus } from "../../fields-C3SbpCep.cjs";
|
|
2
2
|
export { CommentApprovalStatus, QuerySortStrapiComments, ReportCommentReason };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as QuerySortStrapiComments, r as ReportCommentReason, t as CommentApprovalStatus } from "../../fields-
|
|
1
|
+
import { n as QuerySortStrapiComments, r as ReportCommentReason, t as CommentApprovalStatus } from "../../fields-pg0wUFO1.mjs";
|
|
2
2
|
export { CommentApprovalStatus, QuerySortStrapiComments, ReportCommentReason };
|
|
@@ -28,7 +28,7 @@ declare const QueryFilterStrapiComments: v.ObjectSchema<{
|
|
|
28
28
|
type QueryFilterStrapiComments = v.InferOutput<typeof QueryFilterStrapiComments>;
|
|
29
29
|
declare const QueryStrapiCommentsInHeirarchy: v.ObjectSchema<{
|
|
30
30
|
readonly relation: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, number, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
31
|
-
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "createdAt" | "updatedAt" | "content" | "
|
|
31
|
+
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "createdAt" | "updatedAt" | "content" | "blocked" | "blockedThread" | "approvalStatus">>, undefined>;
|
|
32
32
|
readonly filters: v.OptionalSchema<v.ObjectSchema<{
|
|
33
33
|
readonly approvalStatus: v.OptionalSchema<v.ObjectSchema<{
|
|
34
34
|
readonly eq: v.PicklistSchema<("PENDING" | "APPROVED" | "REJECTED")[], undefined>;
|
|
@@ -84,7 +84,7 @@ declare const QueryStrapiCommentsFlat: v.ObjectSchema<{
|
|
|
84
84
|
readonly page: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
85
85
|
readonly pageSize: v.OptionalSchema<v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>, undefined>;
|
|
86
86
|
}, undefined>, undefined>;
|
|
87
|
-
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "createdAt" | "updatedAt" | "content" | "
|
|
87
|
+
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "createdAt" | "updatedAt" | "content" | "blocked" | "blockedThread" | "approvalStatus">>, undefined>;
|
|
88
88
|
}, undefined>;
|
|
89
89
|
type QueryStrapiCommentsFlat = v.InferOutput<typeof QueryStrapiCommentsFlat>;
|
|
90
90
|
//#endregion
|
|
@@ -28,7 +28,7 @@ declare const QueryFilterStrapiComments: v.ObjectSchema<{
|
|
|
28
28
|
type QueryFilterStrapiComments = v.InferOutput<typeof QueryFilterStrapiComments>;
|
|
29
29
|
declare const QueryStrapiCommentsInHeirarchy: v.ObjectSchema<{
|
|
30
30
|
readonly relation: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, number, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
31
|
-
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "createdAt" | "updatedAt" | "content" | "
|
|
31
|
+
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "createdAt" | "updatedAt" | "content" | "blocked" | "blockedThread" | "approvalStatus">>, undefined>;
|
|
32
32
|
readonly filters: v.OptionalSchema<v.ObjectSchema<{
|
|
33
33
|
readonly approvalStatus: v.OptionalSchema<v.ObjectSchema<{
|
|
34
34
|
readonly eq: v.PicklistSchema<("PENDING" | "APPROVED" | "REJECTED")[], undefined>;
|
|
@@ -84,7 +84,7 @@ declare const QueryStrapiCommentsFlat: v.ObjectSchema<{
|
|
|
84
84
|
readonly page: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
|
|
85
85
|
readonly pageSize: v.OptionalSchema<v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>, undefined>;
|
|
86
86
|
}, undefined>, undefined>;
|
|
87
|
-
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "createdAt" | "updatedAt" | "content" | "
|
|
87
|
+
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "createdAt" | "updatedAt" | "content" | "blocked" | "blockedThread" | "approvalStatus">>, undefined>;
|
|
88
88
|
}, undefined>;
|
|
89
89
|
type QueryStrapiCommentsFlat = v.InferOutput<typeof QueryStrapiCommentsFlat>;
|
|
90
90
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_document = require("../../document-
|
|
2
|
+
const require_document = require("../../document-CNVZUrK7.cjs");
|
|
3
3
|
exports.ContentPillarDocument = require_document.ContentPillarDocument;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as ContentPillarDocument } from "../../document-
|
|
1
|
+
import { d as ContentPillarDocument } from "../../document-BQvjNL90.cjs";
|
|
2
2
|
export { ContentPillarDocument };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as ContentPillarDocument } from "../../document-
|
|
1
|
+
import { d as ContentPillarDocument } from "../../document-B2aoqff0.mjs";
|
|
2
2
|
export { ContentPillarDocument };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as ContentPillarDocument } from "../../document-BtDFNH80.mjs";
|
|
2
2
|
export { ContentPillarDocument };
|
|
@@ -2,7 +2,7 @@ import { r as QuerySortOutput } from "../../sort-D9B3xl2d.cjs";
|
|
|
2
2
|
import * as v from "valibot";
|
|
3
3
|
|
|
4
4
|
//#region src/entities/content-pillar/fields.d.ts
|
|
5
|
-
declare const QuerySortContentPillars: v.GenericSchema<QuerySortOutput<"id" | "
|
|
5
|
+
declare const QuerySortContentPillars: v.GenericSchema<QuerySortOutput<"id" | "title" | "slug" | "createdAt" | "updatedAt">>;
|
|
6
6
|
type QuerySortContentPillars = v.InferOutput<typeof QuerySortContentPillars>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { QuerySortContentPillars };
|
|
@@ -2,7 +2,7 @@ import { r as QuerySortOutput } from "../../sort-CGhEoZGd.mjs";
|
|
|
2
2
|
import * as v from "valibot";
|
|
3
3
|
|
|
4
4
|
//#region src/entities/content-pillar/fields.d.ts
|
|
5
|
-
declare const QuerySortContentPillars: v.GenericSchema<QuerySortOutput<"id" | "
|
|
5
|
+
declare const QuerySortContentPillars: v.GenericSchema<QuerySortOutput<"id" | "title" | "slug" | "createdAt" | "updatedAt">>;
|
|
6
6
|
type QuerySortContentPillars = v.InferOutput<typeof QuerySortContentPillars>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { QuerySortContentPillars };
|
|
@@ -8,7 +8,7 @@ declare const QueryStrapiSearchContentPillars: v.ObjectSchema<{
|
|
|
8
8
|
readonly title: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
9
9
|
readonly slug: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
10
10
|
readonly clients: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
11
|
-
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "
|
|
11
|
+
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "title" | "slug" | "createdAt" | "updatedAt">>, undefined>;
|
|
12
12
|
}, undefined>;
|
|
13
13
|
type QueryStrapiSearchContentPillars = v.InferOutput<typeof QueryStrapiSearchContentPillars>;
|
|
14
14
|
//#endregion
|
|
@@ -8,7 +8,7 @@ declare const QueryStrapiSearchContentPillars: v.ObjectSchema<{
|
|
|
8
8
|
readonly title: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
9
9
|
readonly slug: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
10
10
|
readonly clients: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
11
|
-
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "
|
|
11
|
+
readonly sort: v.OptionalSchema<v.GenericSchema<QuerySortOutput<"id" | "title" | "slug" | "createdAt" | "updatedAt">>, undefined>;
|
|
12
12
|
}, undefined>;
|
|
13
13
|
type QueryStrapiSearchContentPillars = v.InferOutput<typeof QueryStrapiSearchContentPillars>;
|
|
14
14
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/entities/formatter/constants.ts
|
|
3
|
+
const FORMATTER_INLINE_FIRST_PRINT_WIDTH = 80;
|
|
3
4
|
const FORMATTER_TEXT_MAX_LENGTH = 5e4;
|
|
4
5
|
const FORMATTER_MODE_OPTIONS = [
|
|
5
6
|
{
|
|
@@ -44,9 +45,37 @@ const INDENT_LEVEL_OPTIONS = [
|
|
|
44
45
|
}
|
|
45
46
|
];
|
|
46
47
|
const INDENT_LEVEL_VALUES = INDENT_LEVEL_OPTIONS.map((option) => option.value);
|
|
48
|
+
const HTML_MIME_TYPES = ["text/html", "application/xhtml+xml"];
|
|
49
|
+
const XML_MIME_TYPES = [
|
|
50
|
+
"text/xml",
|
|
51
|
+
"application/xml",
|
|
52
|
+
"application/rss+xml",
|
|
53
|
+
"application/atom+xml"
|
|
54
|
+
];
|
|
55
|
+
const JSON_MIME_TYPES = [
|
|
56
|
+
"text/json",
|
|
57
|
+
"application/json",
|
|
58
|
+
"application/ld+json",
|
|
59
|
+
"application/json5",
|
|
60
|
+
"application/x-ndjson",
|
|
61
|
+
"application/jsonlines"
|
|
62
|
+
];
|
|
63
|
+
const TXT_MIME_TYPES = ["text/plain", "application/octet-stream"];
|
|
64
|
+
const ALLOWED_MIME_TYPES = [
|
|
65
|
+
...HTML_MIME_TYPES,
|
|
66
|
+
...XML_MIME_TYPES,
|
|
67
|
+
...JSON_MIME_TYPES,
|
|
68
|
+
...TXT_MIME_TYPES
|
|
69
|
+
];
|
|
47
70
|
//#endregion
|
|
71
|
+
exports.ALLOWED_MIME_TYPES = ALLOWED_MIME_TYPES;
|
|
72
|
+
exports.FORMATTER_INLINE_FIRST_PRINT_WIDTH = FORMATTER_INLINE_FIRST_PRINT_WIDTH;
|
|
48
73
|
exports.FORMATTER_MODE_OPTIONS = FORMATTER_MODE_OPTIONS;
|
|
49
74
|
exports.FORMATTER_MODE_VALUES = FORMATTER_MODE_VALUES;
|
|
50
75
|
exports.FORMATTER_TEXT_MAX_LENGTH = FORMATTER_TEXT_MAX_LENGTH;
|
|
76
|
+
exports.HTML_MIME_TYPES = HTML_MIME_TYPES;
|
|
51
77
|
exports.INDENT_LEVEL_OPTIONS = INDENT_LEVEL_OPTIONS;
|
|
52
78
|
exports.INDENT_LEVEL_VALUES = INDENT_LEVEL_VALUES;
|
|
79
|
+
exports.JSON_MIME_TYPES = JSON_MIME_TYPES;
|
|
80
|
+
exports.TXT_MIME_TYPES = TXT_MIME_TYPES;
|
|
81
|
+
exports.XML_MIME_TYPES = XML_MIME_TYPES;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region src/entities/formatter/constants.d.ts
|
|
2
|
+
declare const FORMATTER_INLINE_FIRST_PRINT_WIDTH: 80;
|
|
2
3
|
declare const FORMATTER_TEXT_MAX_LENGTH: 50000;
|
|
3
4
|
declare const FORMATTER_MODE_OPTIONS: readonly [{
|
|
4
5
|
readonly label: "HTML Formatter";
|
|
@@ -10,7 +11,7 @@ declare const FORMATTER_MODE_OPTIONS: readonly [{
|
|
|
10
11
|
readonly label: "JSON Formatter";
|
|
11
12
|
readonly value: "json";
|
|
12
13
|
}];
|
|
13
|
-
declare const FORMATTER_MODE_VALUES: ("html" | "
|
|
14
|
+
declare const FORMATTER_MODE_VALUES: ("html" | "json" | "xml")[];
|
|
14
15
|
declare const INDENT_LEVEL_OPTIONS: readonly [{
|
|
15
16
|
readonly label: "2 Spaces Indent";
|
|
16
17
|
readonly value: "TWO_SPACES";
|
|
@@ -33,5 +34,11 @@ declare const INDENT_LEVEL_OPTIONS: readonly [{
|
|
|
33
34
|
readonly description: "removes all unnecessary whitespace, including newlines and tabs";
|
|
34
35
|
}];
|
|
35
36
|
declare const INDENT_LEVEL_VALUES: ("TWO_SPACES" | "THREE_SPACES" | "FOUR_SPACES" | "TAB" | "COMPACT")[];
|
|
37
|
+
type MimeType = `${string}/${string}`;
|
|
38
|
+
declare const HTML_MIME_TYPES: ["text/html", "application/xhtml+xml"];
|
|
39
|
+
declare const XML_MIME_TYPES: ["text/xml", "application/xml", "application/rss+xml", "application/atom+xml"];
|
|
40
|
+
declare const JSON_MIME_TYPES: ["text/json", "application/json", "application/ld+json", "application/json5", "application/x-ndjson", "application/jsonlines"];
|
|
41
|
+
declare const TXT_MIME_TYPES: ["text/plain", "application/octet-stream"];
|
|
42
|
+
declare const ALLOWED_MIME_TYPES: ["text/html", "application/xhtml+xml", "text/xml", "application/xml", "application/rss+xml", "application/atom+xml", "text/json", "application/json", "application/ld+json", "application/json5", "application/x-ndjson", "application/jsonlines", "text/plain", "application/octet-stream"];
|
|
36
43
|
//#endregion
|
|
37
|
-
export { FORMATTER_MODE_OPTIONS, FORMATTER_MODE_VALUES, FORMATTER_TEXT_MAX_LENGTH, INDENT_LEVEL_OPTIONS, INDENT_LEVEL_VALUES };
|
|
44
|
+
export { ALLOWED_MIME_TYPES, FORMATTER_INLINE_FIRST_PRINT_WIDTH, FORMATTER_MODE_OPTIONS, FORMATTER_MODE_VALUES, FORMATTER_TEXT_MAX_LENGTH, HTML_MIME_TYPES, INDENT_LEVEL_OPTIONS, INDENT_LEVEL_VALUES, JSON_MIME_TYPES, MimeType, TXT_MIME_TYPES, XML_MIME_TYPES };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region src/entities/formatter/constants.d.ts
|
|
2
|
+
declare const FORMATTER_INLINE_FIRST_PRINT_WIDTH: 80;
|
|
2
3
|
declare const FORMATTER_TEXT_MAX_LENGTH: 50000;
|
|
3
4
|
declare const FORMATTER_MODE_OPTIONS: readonly [{
|
|
4
5
|
readonly label: "HTML Formatter";
|
|
@@ -10,7 +11,7 @@ declare const FORMATTER_MODE_OPTIONS: readonly [{
|
|
|
10
11
|
readonly label: "JSON Formatter";
|
|
11
12
|
readonly value: "json";
|
|
12
13
|
}];
|
|
13
|
-
declare const FORMATTER_MODE_VALUES: ("html" | "
|
|
14
|
+
declare const FORMATTER_MODE_VALUES: ("html" | "json" | "xml")[];
|
|
14
15
|
declare const INDENT_LEVEL_OPTIONS: readonly [{
|
|
15
16
|
readonly label: "2 Spaces Indent";
|
|
16
17
|
readonly value: "TWO_SPACES";
|
|
@@ -33,5 +34,11 @@ declare const INDENT_LEVEL_OPTIONS: readonly [{
|
|
|
33
34
|
readonly description: "removes all unnecessary whitespace, including newlines and tabs";
|
|
34
35
|
}];
|
|
35
36
|
declare const INDENT_LEVEL_VALUES: ("TWO_SPACES" | "THREE_SPACES" | "FOUR_SPACES" | "TAB" | "COMPACT")[];
|
|
37
|
+
type MimeType = `${string}/${string}`;
|
|
38
|
+
declare const HTML_MIME_TYPES: ["text/html", "application/xhtml+xml"];
|
|
39
|
+
declare const XML_MIME_TYPES: ["text/xml", "application/xml", "application/rss+xml", "application/atom+xml"];
|
|
40
|
+
declare const JSON_MIME_TYPES: ["text/json", "application/json", "application/ld+json", "application/json5", "application/x-ndjson", "application/jsonlines"];
|
|
41
|
+
declare const TXT_MIME_TYPES: ["text/plain", "application/octet-stream"];
|
|
42
|
+
declare const ALLOWED_MIME_TYPES: ["text/html", "application/xhtml+xml", "text/xml", "application/xml", "application/rss+xml", "application/atom+xml", "text/json", "application/json", "application/ld+json", "application/json5", "application/x-ndjson", "application/jsonlines", "text/plain", "application/octet-stream"];
|
|
36
43
|
//#endregion
|
|
37
|
-
export { FORMATTER_MODE_OPTIONS, FORMATTER_MODE_VALUES, FORMATTER_TEXT_MAX_LENGTH, INDENT_LEVEL_OPTIONS, INDENT_LEVEL_VALUES };
|
|
44
|
+
export { ALLOWED_MIME_TYPES, FORMATTER_INLINE_FIRST_PRINT_WIDTH, FORMATTER_MODE_OPTIONS, FORMATTER_MODE_VALUES, FORMATTER_TEXT_MAX_LENGTH, HTML_MIME_TYPES, INDENT_LEVEL_OPTIONS, INDENT_LEVEL_VALUES, JSON_MIME_TYPES, MimeType, TXT_MIME_TYPES, XML_MIME_TYPES };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region src/entities/formatter/constants.ts
|
|
2
|
+
const FORMATTER_INLINE_FIRST_PRINT_WIDTH = 80;
|
|
2
3
|
const FORMATTER_TEXT_MAX_LENGTH = 5e4;
|
|
3
4
|
const FORMATTER_MODE_OPTIONS = [
|
|
4
5
|
{
|
|
@@ -43,5 +44,27 @@ const INDENT_LEVEL_OPTIONS = [
|
|
|
43
44
|
}
|
|
44
45
|
];
|
|
45
46
|
const INDENT_LEVEL_VALUES = INDENT_LEVEL_OPTIONS.map((option) => option.value);
|
|
47
|
+
const HTML_MIME_TYPES = ["text/html", "application/xhtml+xml"];
|
|
48
|
+
const XML_MIME_TYPES = [
|
|
49
|
+
"text/xml",
|
|
50
|
+
"application/xml",
|
|
51
|
+
"application/rss+xml",
|
|
52
|
+
"application/atom+xml"
|
|
53
|
+
];
|
|
54
|
+
const JSON_MIME_TYPES = [
|
|
55
|
+
"text/json",
|
|
56
|
+
"application/json",
|
|
57
|
+
"application/ld+json",
|
|
58
|
+
"application/json5",
|
|
59
|
+
"application/x-ndjson",
|
|
60
|
+
"application/jsonlines"
|
|
61
|
+
];
|
|
62
|
+
const TXT_MIME_TYPES = ["text/plain", "application/octet-stream"];
|
|
63
|
+
const ALLOWED_MIME_TYPES = [
|
|
64
|
+
...HTML_MIME_TYPES,
|
|
65
|
+
...XML_MIME_TYPES,
|
|
66
|
+
...JSON_MIME_TYPES,
|
|
67
|
+
...TXT_MIME_TYPES
|
|
68
|
+
];
|
|
46
69
|
//#endregion
|
|
47
|
-
export { FORMATTER_MODE_OPTIONS, FORMATTER_MODE_VALUES, FORMATTER_TEXT_MAX_LENGTH, INDENT_LEVEL_OPTIONS, INDENT_LEVEL_VALUES };
|
|
70
|
+
export { ALLOWED_MIME_TYPES, FORMATTER_INLINE_FIRST_PRINT_WIDTH, FORMATTER_MODE_OPTIONS, FORMATTER_MODE_VALUES, FORMATTER_TEXT_MAX_LENGTH, HTML_MIME_TYPES, INDENT_LEVEL_OPTIONS, INDENT_LEVEL_VALUES, JSON_MIME_TYPES, TXT_MIME_TYPES, XML_MIME_TYPES };
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_chunk = require("../../chunk-CKQMccvm.cjs");
|
|
3
|
+
const require_entities_formatter_constants = require("./constants.cjs");
|
|
4
|
+
let valibot = require("valibot");
|
|
5
|
+
valibot = require_chunk.__toESM(valibot, 1);
|
|
6
|
+
//#region src/entities/formatter/fields.ts
|
|
7
|
+
const EndOfLineSchema = valibot.picklist([
|
|
8
|
+
"lf",
|
|
9
|
+
"crlf",
|
|
10
|
+
"cr",
|
|
11
|
+
"auto"
|
|
12
|
+
]);
|
|
13
|
+
const ProseWrapSchema = valibot.picklist([
|
|
14
|
+
"always",
|
|
15
|
+
"never",
|
|
16
|
+
"preserve"
|
|
17
|
+
]);
|
|
18
|
+
const HtmlWhitespaceSensitivitySchema = valibot.picklist([
|
|
19
|
+
"css",
|
|
20
|
+
"strict",
|
|
21
|
+
"ignore"
|
|
22
|
+
]);
|
|
23
|
+
const XmlWhitespaceSensitivitySchema = valibot.picklist([
|
|
24
|
+
"strict",
|
|
25
|
+
"preserve",
|
|
26
|
+
"ignore"
|
|
27
|
+
]);
|
|
28
|
+
const XmlQuoteAttributesSchema = valibot.picklist([
|
|
29
|
+
"preserve",
|
|
30
|
+
"single",
|
|
31
|
+
"double"
|
|
32
|
+
]);
|
|
33
|
+
const EmbeddedLanguageFormattingSchema = valibot.picklist(["off", "auto"]);
|
|
34
|
+
const JsonParserSchema = valibot.picklist([
|
|
35
|
+
"json",
|
|
36
|
+
"jsonc",
|
|
37
|
+
"json5",
|
|
38
|
+
"json-stringify"
|
|
39
|
+
]);
|
|
40
|
+
const SharedConfigSchema = valibot.object({
|
|
41
|
+
printWidth: valibot.number(),
|
|
42
|
+
tabWidth: valibot.number(),
|
|
43
|
+
useTabs: valibot.boolean(),
|
|
44
|
+
endOfLine: EndOfLineSchema
|
|
45
|
+
});
|
|
46
|
+
const HtmlConfigSchema = valibot.object({
|
|
47
|
+
...SharedConfigSchema.entries,
|
|
48
|
+
parser: valibot.literal("html"),
|
|
49
|
+
bracketSameLine: valibot.boolean(),
|
|
50
|
+
singleAttributePerLine: valibot.boolean(),
|
|
51
|
+
htmlWhitespaceSensitivity: HtmlWhitespaceSensitivitySchema,
|
|
52
|
+
proseWrap: ProseWrapSchema,
|
|
53
|
+
embeddedLanguageFormatting: EmbeddedLanguageFormattingSchema
|
|
54
|
+
});
|
|
55
|
+
const XmlConfigSchema = valibot.object({
|
|
56
|
+
...SharedConfigSchema.entries,
|
|
57
|
+
bracketSameLine: valibot.boolean(),
|
|
58
|
+
singleAttributePerLine: valibot.boolean(),
|
|
59
|
+
xmlWhitespaceSensitivity: XmlWhitespaceSensitivitySchema,
|
|
60
|
+
xmlQuoteAttributes: XmlQuoteAttributesSchema,
|
|
61
|
+
xmlSelfClosingSpace: valibot.boolean(),
|
|
62
|
+
xmlSortAttributesByKey: valibot.boolean()
|
|
63
|
+
});
|
|
64
|
+
const JsonConfigSchema = valibot.object({
|
|
65
|
+
...SharedConfigSchema.entries,
|
|
66
|
+
parser: JsonParserSchema
|
|
67
|
+
});
|
|
68
|
+
const HtmlOverridesSchema = valibot.partial(HtmlConfigSchema);
|
|
69
|
+
const XmlOverridesSchema = valibot.partial(XmlConfigSchema);
|
|
70
|
+
const JsonOverridesSchema = valibot.partial(JsonConfigSchema);
|
|
71
|
+
const sharedDefaults = {
|
|
72
|
+
printWidth: 80,
|
|
73
|
+
tabWidth: 2,
|
|
74
|
+
useTabs: false,
|
|
75
|
+
endOfLine: "lf"
|
|
76
|
+
};
|
|
77
|
+
const htmlDefaults = {
|
|
78
|
+
...sharedDefaults,
|
|
79
|
+
parser: "html",
|
|
80
|
+
bracketSameLine: false,
|
|
81
|
+
singleAttributePerLine: false,
|
|
82
|
+
htmlWhitespaceSensitivity: "css",
|
|
83
|
+
proseWrap: "preserve",
|
|
84
|
+
embeddedLanguageFormatting: "auto"
|
|
85
|
+
};
|
|
86
|
+
const xmlDefaults = {
|
|
87
|
+
...sharedDefaults,
|
|
88
|
+
bracketSameLine: false,
|
|
89
|
+
singleAttributePerLine: false,
|
|
90
|
+
xmlWhitespaceSensitivity: "strict",
|
|
91
|
+
xmlQuoteAttributes: "double",
|
|
92
|
+
xmlSelfClosingSpace: true,
|
|
93
|
+
xmlSortAttributesByKey: true
|
|
94
|
+
};
|
|
95
|
+
const jsonDefaultsByParser = {
|
|
96
|
+
json: {
|
|
97
|
+
...sharedDefaults,
|
|
98
|
+
parser: "json"
|
|
99
|
+
},
|
|
100
|
+
jsonc: {
|
|
101
|
+
...sharedDefaults,
|
|
102
|
+
parser: "jsonc"
|
|
103
|
+
},
|
|
104
|
+
json5: {
|
|
105
|
+
...sharedDefaults,
|
|
106
|
+
parser: "json5"
|
|
107
|
+
},
|
|
108
|
+
"json-stringify": {
|
|
109
|
+
...sharedDefaults,
|
|
110
|
+
parser: "json-stringify"
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
function buildPrettierConfigHTML(overrides) {
|
|
114
|
+
const safeOverrides = valibot.parse(HtmlOverridesSchema, overrides);
|
|
115
|
+
return valibot.parse(HtmlConfigSchema, {
|
|
116
|
+
...htmlDefaults,
|
|
117
|
+
...safeOverrides,
|
|
118
|
+
parser: "html"
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function buildPrettierConfigXML(overrides) {
|
|
122
|
+
const safeOverrides = valibot.parse(XmlOverridesSchema, overrides);
|
|
123
|
+
return valibot.parse(XmlConfigSchema, {
|
|
124
|
+
...xmlDefaults,
|
|
125
|
+
...safeOverrides
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function buildPrettierConfigJSON(fileType, overrides) {
|
|
129
|
+
const safeOverrides = valibot.parse(JsonOverridesSchema, overrides);
|
|
130
|
+
return valibot.parse(JsonConfigSchema, {
|
|
131
|
+
...jsonDefaultsByParser[fileType],
|
|
132
|
+
...safeOverrides,
|
|
133
|
+
parser: fileType
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
const SFormatterMode = valibot.picklist(require_entities_formatter_constants.FORMATTER_MODE_VALUES);
|
|
137
|
+
const SIndentLevel = valibot.optional(valibot.picklist(require_entities_formatter_constants.INDENT_LEVEL_VALUES), "TWO_SPACES");
|
|
138
|
+
const SContentText = valibot.optional(valibot.pipe(valibot.string(), valibot.trim(), valibot.maxLength(require_entities_formatter_constants.FORMATTER_TEXT_MAX_LENGTH, `Text cannot exceed ${require_entities_formatter_constants.FORMATTER_TEXT_MAX_LENGTH.toLocaleString()} characters. Please upload a file instead if your content exceeds this limit.`)));
|
|
139
|
+
const SContentFile = valibot.optional(valibot.pipe(valibot.file("Please upload a file."), valibot.maxSize(2 * 1024 * 1024, "File must be smaller than 2 MB."), valibot.mimeType(require_entities_formatter_constants.ALLOWED_MIME_TYPES, "Please upload a valid file: text, HTML, XML, or JSON.")));
|
|
140
|
+
const SFormatterForm = valibot.pipe(valibot.object({
|
|
141
|
+
formatter_mode: SFormatterMode,
|
|
142
|
+
chars_per_line: valibot.optional(valibot.number()),
|
|
143
|
+
indent_level: SIndentLevel,
|
|
144
|
+
text_content: SContentText,
|
|
145
|
+
files: SContentFile
|
|
146
|
+
}), valibot.check((input) => !!(input.text_content || input.files), "You must provide text content or a text file."));
|
|
147
|
+
const SFormatterRequest = valibot.pipe(valibot.object({
|
|
148
|
+
formatter_mode: SFormatterMode,
|
|
149
|
+
chars_per_line: valibot.optional(valibot.number()),
|
|
150
|
+
indent_level: SIndentLevel,
|
|
151
|
+
content: valibot.string(),
|
|
152
|
+
content_type: valibot.picklist(["text", "file"], "Please select a content type."),
|
|
153
|
+
prettier_parser: valibot.picklist([
|
|
154
|
+
"html",
|
|
155
|
+
"xml",
|
|
156
|
+
"json",
|
|
157
|
+
"jsonc",
|
|
158
|
+
"json5"
|
|
159
|
+
], "Please select a prettier parser.")
|
|
160
|
+
}));
|
|
161
|
+
//#endregion
|
|
162
|
+
exports.HtmlConfigSchema = HtmlConfigSchema;
|
|
163
|
+
exports.JsonConfigSchema = JsonConfigSchema;
|
|
164
|
+
exports.SContentFile = SContentFile;
|
|
165
|
+
exports.SContentText = SContentText;
|
|
166
|
+
exports.SFormatterForm = SFormatterForm;
|
|
167
|
+
exports.SFormatterMode = SFormatterMode;
|
|
168
|
+
exports.SFormatterRequest = SFormatterRequest;
|
|
169
|
+
exports.SIndentLevel = SIndentLevel;
|
|
170
|
+
exports.XmlConfigSchema = XmlConfigSchema;
|
|
171
|
+
exports.buildPrettierConfigHTML = buildPrettierConfigHTML;
|
|
172
|
+
exports.buildPrettierConfigJSON = buildPrettierConfigJSON;
|
|
173
|
+
exports.buildPrettierConfigXML = buildPrettierConfigXML;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { FORMATTER_MODE_VALUES, INDENT_LEVEL_VALUES } from "./constants.cjs";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
|
|
4
|
+
//#region src/entities/formatter/fields.d.ts
|
|
5
|
+
type FileType = "html" | "xml" | "json" | "jsonc" | "json5";
|
|
6
|
+
declare const HtmlConfigSchema: v.ObjectSchema<{
|
|
7
|
+
readonly parser: v.LiteralSchema<"html", undefined>;
|
|
8
|
+
readonly bracketSameLine: v.BooleanSchema<undefined>;
|
|
9
|
+
readonly singleAttributePerLine: v.BooleanSchema<undefined>;
|
|
10
|
+
readonly htmlWhitespaceSensitivity: v.PicklistSchema<["css", "strict", "ignore"], undefined>;
|
|
11
|
+
readonly proseWrap: v.PicklistSchema<["always", "never", "preserve"], undefined>;
|
|
12
|
+
readonly embeddedLanguageFormatting: v.PicklistSchema<["off", "auto"], undefined>;
|
|
13
|
+
readonly printWidth: v.NumberSchema<undefined>;
|
|
14
|
+
readonly tabWidth: v.NumberSchema<undefined>;
|
|
15
|
+
readonly useTabs: v.BooleanSchema<undefined>;
|
|
16
|
+
readonly endOfLine: v.PicklistSchema<["lf", "crlf", "cr", "auto"], undefined>;
|
|
17
|
+
}, undefined>;
|
|
18
|
+
type HtmlConfig = v.InferOutput<typeof HtmlConfigSchema>;
|
|
19
|
+
declare const XmlConfigSchema: v.ObjectSchema<{
|
|
20
|
+
readonly bracketSameLine: v.BooleanSchema<undefined>;
|
|
21
|
+
readonly singleAttributePerLine: v.BooleanSchema<undefined>;
|
|
22
|
+
readonly xmlWhitespaceSensitivity: v.PicklistSchema<["strict", "preserve", "ignore"], undefined>;
|
|
23
|
+
readonly xmlQuoteAttributes: v.PicklistSchema<["preserve", "single", "double"], undefined>;
|
|
24
|
+
readonly xmlSelfClosingSpace: v.BooleanSchema<undefined>;
|
|
25
|
+
readonly xmlSortAttributesByKey: v.BooleanSchema<undefined>;
|
|
26
|
+
readonly printWidth: v.NumberSchema<undefined>;
|
|
27
|
+
readonly tabWidth: v.NumberSchema<undefined>;
|
|
28
|
+
readonly useTabs: v.BooleanSchema<undefined>;
|
|
29
|
+
readonly endOfLine: v.PicklistSchema<["lf", "crlf", "cr", "auto"], undefined>;
|
|
30
|
+
}, undefined>;
|
|
31
|
+
type XmlConfig = v.InferOutput<typeof XmlConfigSchema>;
|
|
32
|
+
declare const JsonConfigSchema: v.ObjectSchema<{
|
|
33
|
+
readonly parser: v.PicklistSchema<["json", "jsonc", "json5", "json-stringify"], undefined>;
|
|
34
|
+
readonly printWidth: v.NumberSchema<undefined>;
|
|
35
|
+
readonly tabWidth: v.NumberSchema<undefined>;
|
|
36
|
+
readonly useTabs: v.BooleanSchema<undefined>;
|
|
37
|
+
readonly endOfLine: v.PicklistSchema<["lf", "crlf", "cr", "auto"], undefined>;
|
|
38
|
+
}, undefined>;
|
|
39
|
+
type JsonConfig = v.InferOutput<typeof JsonConfigSchema>;
|
|
40
|
+
declare function buildPrettierConfigHTML(overrides?: Partial<HtmlConfig>): HtmlConfig;
|
|
41
|
+
declare function buildPrettierConfigXML(overrides?: Partial<XmlConfig>): XmlConfig;
|
|
42
|
+
declare function buildPrettierConfigJSON(fileType: "json" | "jsonc" | "json5" | "json-stringify", overrides?: Partial<JsonConfig>): JsonConfig;
|
|
43
|
+
type FormatterMode = (typeof FORMATTER_MODE_VALUES)[number];
|
|
44
|
+
declare const SFormatterMode: v.PicklistSchema<("html" | "json" | "xml")[], undefined>;
|
|
45
|
+
type SFormatterMode = v.InferOutput<typeof SFormatterMode>;
|
|
46
|
+
type IndentLevel = (typeof INDENT_LEVEL_VALUES)[number];
|
|
47
|
+
declare const SIndentLevel: v.OptionalSchema<v.PicklistSchema<("TWO_SPACES" | "THREE_SPACES" | "FOUR_SPACES" | "TAB" | "COMPACT")[], undefined>, "TWO_SPACES">;
|
|
48
|
+
type SIndentLevel = v.InferOutput<typeof SIndentLevel>;
|
|
49
|
+
declare const SContentText: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 50000, `Text cannot exceed ${string} characters. Please upload a file instead if your content exceeds this limit.`>]>, undefined>;
|
|
50
|
+
type SContentText = v.InferOutput<typeof SContentText>;
|
|
51
|
+
declare const SContentFile: v.OptionalSchema<v.SchemaWithPipe<readonly [v.FileSchema<"Please upload a file.">, v.MaxSizeAction<any, number, "File must be smaller than 2 MB.">, v.MimeTypeAction<any, ["text/html", "application/xhtml+xml", "text/xml", "application/xml", "application/rss+xml", "application/atom+xml", "text/json", "application/json", "application/ld+json", "application/json5", "application/x-ndjson", "application/jsonlines", "text/plain", "application/octet-stream"], "Please upload a valid file: text, HTML, XML, or JSON.">]>, undefined>;
|
|
52
|
+
type SContentFile = v.InferOutput<typeof SContentFile>;
|
|
53
|
+
declare const SFormatterForm: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
54
|
+
readonly formatter_mode: v.PicklistSchema<("html" | "json" | "xml")[], undefined>;
|
|
55
|
+
readonly chars_per_line: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
56
|
+
readonly indent_level: v.OptionalSchema<v.PicklistSchema<("TWO_SPACES" | "THREE_SPACES" | "FOUR_SPACES" | "TAB" | "COMPACT")[], undefined>, "TWO_SPACES">;
|
|
57
|
+
readonly text_content: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 50000, `Text cannot exceed ${string} characters. Please upload a file instead if your content exceeds this limit.`>]>, undefined>;
|
|
58
|
+
readonly files: v.OptionalSchema<v.SchemaWithPipe<readonly [v.FileSchema<"Please upload a file.">, v.MaxSizeAction<any, number, "File must be smaller than 2 MB.">, v.MimeTypeAction<any, ["text/html", "application/xhtml+xml", "text/xml", "application/xml", "application/rss+xml", "application/atom+xml", "text/json", "application/json", "application/ld+json", "application/json5", "application/x-ndjson", "application/jsonlines", "text/plain", "application/octet-stream"], "Please upload a valid file: text, HTML, XML, or JSON.">]>, undefined>;
|
|
59
|
+
}, undefined>, v.CheckAction<{
|
|
60
|
+
formatter_mode: "html" | "json" | "xml";
|
|
61
|
+
chars_per_line?: number | undefined;
|
|
62
|
+
indent_level: "TWO_SPACES" | "THREE_SPACES" | "FOUR_SPACES" | "TAB" | "COMPACT";
|
|
63
|
+
text_content?: string | undefined;
|
|
64
|
+
files?: any;
|
|
65
|
+
}, "You must provide text content or a text file.">]>;
|
|
66
|
+
type SFormatterForm = v.InferOutput<typeof SFormatterForm>;
|
|
67
|
+
declare const SFormatterRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
68
|
+
readonly formatter_mode: v.PicklistSchema<("html" | "json" | "xml")[], undefined>;
|
|
69
|
+
readonly chars_per_line: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
70
|
+
readonly indent_level: v.OptionalSchema<v.PicklistSchema<("TWO_SPACES" | "THREE_SPACES" | "FOUR_SPACES" | "TAB" | "COMPACT")[], undefined>, "TWO_SPACES">;
|
|
71
|
+
readonly content: v.StringSchema<undefined>;
|
|
72
|
+
readonly content_type: v.PicklistSchema<["text", "file"], "Please select a content type.">;
|
|
73
|
+
readonly prettier_parser: v.PicklistSchema<["html", "xml", "json", "jsonc", "json5"], "Please select a prettier parser.">;
|
|
74
|
+
}, undefined>]>;
|
|
75
|
+
type SFormatterRequest = v.InferOutput<typeof SFormatterRequest>;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { FileType, FormatterMode, HtmlConfig, HtmlConfigSchema, IndentLevel, JsonConfig, JsonConfigSchema, SContentFile, SContentText, SFormatterForm, SFormatterMode, SFormatterRequest, SIndentLevel, XmlConfig, XmlConfigSchema, buildPrettierConfigHTML, buildPrettierConfigJSON, buildPrettierConfigXML };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { FORMATTER_MODE_VALUES, INDENT_LEVEL_VALUES } from "./constants.mjs";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
|
|
4
|
+
//#region src/entities/formatter/fields.d.ts
|
|
5
|
+
type FileType = "html" | "xml" | "json" | "jsonc" | "json5";
|
|
6
|
+
declare const HtmlConfigSchema: v.ObjectSchema<{
|
|
7
|
+
readonly parser: v.LiteralSchema<"html", undefined>;
|
|
8
|
+
readonly bracketSameLine: v.BooleanSchema<undefined>;
|
|
9
|
+
readonly singleAttributePerLine: v.BooleanSchema<undefined>;
|
|
10
|
+
readonly htmlWhitespaceSensitivity: v.PicklistSchema<["css", "strict", "ignore"], undefined>;
|
|
11
|
+
readonly proseWrap: v.PicklistSchema<["always", "never", "preserve"], undefined>;
|
|
12
|
+
readonly embeddedLanguageFormatting: v.PicklistSchema<["off", "auto"], undefined>;
|
|
13
|
+
readonly printWidth: v.NumberSchema<undefined>;
|
|
14
|
+
readonly tabWidth: v.NumberSchema<undefined>;
|
|
15
|
+
readonly useTabs: v.BooleanSchema<undefined>;
|
|
16
|
+
readonly endOfLine: v.PicklistSchema<["lf", "crlf", "cr", "auto"], undefined>;
|
|
17
|
+
}, undefined>;
|
|
18
|
+
type HtmlConfig = v.InferOutput<typeof HtmlConfigSchema>;
|
|
19
|
+
declare const XmlConfigSchema: v.ObjectSchema<{
|
|
20
|
+
readonly bracketSameLine: v.BooleanSchema<undefined>;
|
|
21
|
+
readonly singleAttributePerLine: v.BooleanSchema<undefined>;
|
|
22
|
+
readonly xmlWhitespaceSensitivity: v.PicklistSchema<["strict", "preserve", "ignore"], undefined>;
|
|
23
|
+
readonly xmlQuoteAttributes: v.PicklistSchema<["preserve", "single", "double"], undefined>;
|
|
24
|
+
readonly xmlSelfClosingSpace: v.BooleanSchema<undefined>;
|
|
25
|
+
readonly xmlSortAttributesByKey: v.BooleanSchema<undefined>;
|
|
26
|
+
readonly printWidth: v.NumberSchema<undefined>;
|
|
27
|
+
readonly tabWidth: v.NumberSchema<undefined>;
|
|
28
|
+
readonly useTabs: v.BooleanSchema<undefined>;
|
|
29
|
+
readonly endOfLine: v.PicklistSchema<["lf", "crlf", "cr", "auto"], undefined>;
|
|
30
|
+
}, undefined>;
|
|
31
|
+
type XmlConfig = v.InferOutput<typeof XmlConfigSchema>;
|
|
32
|
+
declare const JsonConfigSchema: v.ObjectSchema<{
|
|
33
|
+
readonly parser: v.PicklistSchema<["json", "jsonc", "json5", "json-stringify"], undefined>;
|
|
34
|
+
readonly printWidth: v.NumberSchema<undefined>;
|
|
35
|
+
readonly tabWidth: v.NumberSchema<undefined>;
|
|
36
|
+
readonly useTabs: v.BooleanSchema<undefined>;
|
|
37
|
+
readonly endOfLine: v.PicklistSchema<["lf", "crlf", "cr", "auto"], undefined>;
|
|
38
|
+
}, undefined>;
|
|
39
|
+
type JsonConfig = v.InferOutput<typeof JsonConfigSchema>;
|
|
40
|
+
declare function buildPrettierConfigHTML(overrides?: Partial<HtmlConfig>): HtmlConfig;
|
|
41
|
+
declare function buildPrettierConfigXML(overrides?: Partial<XmlConfig>): XmlConfig;
|
|
42
|
+
declare function buildPrettierConfigJSON(fileType: "json" | "jsonc" | "json5" | "json-stringify", overrides?: Partial<JsonConfig>): JsonConfig;
|
|
43
|
+
type FormatterMode = (typeof FORMATTER_MODE_VALUES)[number];
|
|
44
|
+
declare const SFormatterMode: v.PicklistSchema<("html" | "json" | "xml")[], undefined>;
|
|
45
|
+
type SFormatterMode = v.InferOutput<typeof SFormatterMode>;
|
|
46
|
+
type IndentLevel = (typeof INDENT_LEVEL_VALUES)[number];
|
|
47
|
+
declare const SIndentLevel: v.OptionalSchema<v.PicklistSchema<("TWO_SPACES" | "THREE_SPACES" | "FOUR_SPACES" | "TAB" | "COMPACT")[], undefined>, "TWO_SPACES">;
|
|
48
|
+
type SIndentLevel = v.InferOutput<typeof SIndentLevel>;
|
|
49
|
+
declare const SContentText: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 50000, `Text cannot exceed ${string} characters. Please upload a file instead if your content exceeds this limit.`>]>, undefined>;
|
|
50
|
+
type SContentText = v.InferOutput<typeof SContentText>;
|
|
51
|
+
declare const SContentFile: v.OptionalSchema<v.SchemaWithPipe<readonly [v.FileSchema<"Please upload a file.">, v.MaxSizeAction<any, number, "File must be smaller than 2 MB.">, v.MimeTypeAction<any, ["text/html", "application/xhtml+xml", "text/xml", "application/xml", "application/rss+xml", "application/atom+xml", "text/json", "application/json", "application/ld+json", "application/json5", "application/x-ndjson", "application/jsonlines", "text/plain", "application/octet-stream"], "Please upload a valid file: text, HTML, XML, or JSON.">]>, undefined>;
|
|
52
|
+
type SContentFile = v.InferOutput<typeof SContentFile>;
|
|
53
|
+
declare const SFormatterForm: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
54
|
+
readonly formatter_mode: v.PicklistSchema<("html" | "json" | "xml")[], undefined>;
|
|
55
|
+
readonly chars_per_line: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
56
|
+
readonly indent_level: v.OptionalSchema<v.PicklistSchema<("TWO_SPACES" | "THREE_SPACES" | "FOUR_SPACES" | "TAB" | "COMPACT")[], undefined>, "TWO_SPACES">;
|
|
57
|
+
readonly text_content: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 50000, `Text cannot exceed ${string} characters. Please upload a file instead if your content exceeds this limit.`>]>, undefined>;
|
|
58
|
+
readonly files: v.OptionalSchema<v.SchemaWithPipe<readonly [v.FileSchema<"Please upload a file.">, v.MaxSizeAction<any, number, "File must be smaller than 2 MB.">, v.MimeTypeAction<any, ["text/html", "application/xhtml+xml", "text/xml", "application/xml", "application/rss+xml", "application/atom+xml", "text/json", "application/json", "application/ld+json", "application/json5", "application/x-ndjson", "application/jsonlines", "text/plain", "application/octet-stream"], "Please upload a valid file: text, HTML, XML, or JSON.">]>, undefined>;
|
|
59
|
+
}, undefined>, v.CheckAction<{
|
|
60
|
+
formatter_mode: "html" | "json" | "xml";
|
|
61
|
+
chars_per_line?: number | undefined;
|
|
62
|
+
indent_level: "TWO_SPACES" | "THREE_SPACES" | "FOUR_SPACES" | "TAB" | "COMPACT";
|
|
63
|
+
text_content?: string | undefined;
|
|
64
|
+
files?: any;
|
|
65
|
+
}, "You must provide text content or a text file.">]>;
|
|
66
|
+
type SFormatterForm = v.InferOutput<typeof SFormatterForm>;
|
|
67
|
+
declare const SFormatterRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
68
|
+
readonly formatter_mode: v.PicklistSchema<("html" | "json" | "xml")[], undefined>;
|
|
69
|
+
readonly chars_per_line: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
70
|
+
readonly indent_level: v.OptionalSchema<v.PicklistSchema<("TWO_SPACES" | "THREE_SPACES" | "FOUR_SPACES" | "TAB" | "COMPACT")[], undefined>, "TWO_SPACES">;
|
|
71
|
+
readonly content: v.StringSchema<undefined>;
|
|
72
|
+
readonly content_type: v.PicklistSchema<["text", "file"], "Please select a content type.">;
|
|
73
|
+
readonly prettier_parser: v.PicklistSchema<["html", "xml", "json", "jsonc", "json5"], "Please select a prettier parser.">;
|
|
74
|
+
}, undefined>]>;
|
|
75
|
+
type SFormatterRequest = v.InferOutput<typeof SFormatterRequest>;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { FileType, FormatterMode, HtmlConfig, HtmlConfigSchema, IndentLevel, JsonConfig, JsonConfigSchema, SContentFile, SContentText, SFormatterForm, SFormatterMode, SFormatterRequest, SIndentLevel, XmlConfig, XmlConfigSchema, buildPrettierConfigHTML, buildPrettierConfigJSON, buildPrettierConfigXML };
|