@prismicio/types-internal 0.1.1 → 0.2.0
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 +13 -13
- package/{dist → lib}/customtypes/CustomType.d.ts +699 -699
- package/{dist → lib}/customtypes/CustomType.js +28 -28
- package/{dist → lib}/customtypes/Format.d.ts +0 -0
- package/{dist → lib}/customtypes/Format.js +0 -0
- package/{dist → lib}/customtypes/Section.d.ts +1038 -1038
- package/{dist → lib}/customtypes/Section.js +2 -3
- package/lib/customtypes/index.d.ts +4 -0
- package/{dist → lib}/customtypes/index.js +4 -4
- package/{dist → lib}/customtypes/widgets/Group.d.ts +45 -45
- package/{dist → lib}/customtypes/widgets/Group.js +8 -8
- package/{dist → lib}/customtypes/widgets/UID.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/UID.js +7 -7
- package/{dist → lib}/customtypes/widgets/Widget.d.ts +1039 -1039
- package/{dist → lib}/customtypes/widgets/Widget.js +9 -12
- package/{dist → lib}/customtypes/widgets/WidgetTypes.d.ts +0 -0
- package/{dist → lib}/customtypes/widgets/WidgetTypes.js +0 -0
- package/lib/customtypes/widgets/index.d.ts +7 -0
- package/{dist → lib}/customtypes/widgets/index.js +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/BooleanField.d.ts +3 -3
- package/{dist → lib}/customtypes/widgets/nestable/BooleanField.js +6 -6
- package/{dist → lib}/customtypes/widgets/nestable/Color.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/Color.js +6 -6
- package/{dist → lib}/customtypes/widgets/nestable/Date.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/Date.js +7 -7
- package/{dist → lib}/customtypes/widgets/nestable/Embed.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/Embed.js +7 -7
- package/{dist → lib}/customtypes/widgets/nestable/GeoPoint.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/GeoPoint.js +6 -6
- package/lib/customtypes/widgets/nestable/Image.d.ts +23 -0
- package/{dist → lib}/customtypes/widgets/nestable/Image.js +10 -10
- package/{dist → lib}/customtypes/widgets/nestable/IntegrationField.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/IntegrationField.js +7 -7
- package/{dist → lib}/customtypes/widgets/nestable/Link.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/Link.js +18 -23
- package/{dist → lib}/customtypes/widgets/nestable/NestableWidget.d.ts +42 -42
- package/{dist → lib}/customtypes/widgets/nestable/NestableWidget.js +5 -5
- package/{dist → lib}/customtypes/widgets/nestable/Number.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/Number.js +8 -8
- package/{dist → lib}/customtypes/widgets/nestable/Range.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/Range.js +7 -7
- package/{dist → lib}/customtypes/widgets/nestable/RichText.d.ts +6 -6
- package/{dist → lib}/customtypes/widgets/nestable/RichText.js +42 -48
- package/lib/customtypes/widgets/nestable/Select.d.ts +15 -0
- package/{dist → lib}/customtypes/widgets/nestable/Select.js +7 -9
- package/{dist → lib}/customtypes/widgets/nestable/Separator.d.ts +3 -3
- package/{dist → lib}/customtypes/widgets/nestable/Separator.js +5 -5
- package/{dist → lib}/customtypes/widgets/nestable/Text.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/Text.js +7 -7
- package/{dist → lib}/customtypes/widgets/nestable/Timestamp.d.ts +4 -4
- package/{dist → lib}/customtypes/widgets/nestable/Timestamp.js +7 -7
- package/lib/customtypes/widgets/nestable/index.d.ts +15 -0
- package/{dist → lib}/customtypes/widgets/nestable/index.js +0 -0
- package/{dist → lib}/customtypes/widgets/shared/ImageConstraint.d.ts +3 -3
- package/{dist → lib}/customtypes/widgets/shared/ImageConstraint.js +16 -15
- package/lib/customtypes/widgets/shared/index.d.ts +1 -0
- package/{dist → lib}/customtypes/widgets/shared/index.js +0 -0
- package/{dist → lib}/customtypes/widgets/slices/CompositeSlice.d.ts +87 -87
- package/{dist → lib}/customtypes/widgets/slices/CompositeSlice.js +8 -8
- package/{dist → lib}/customtypes/widgets/slices/LegacySlice.d.ts +87 -87
- package/{dist → lib}/customtypes/widgets/slices/LegacySlice.js +3 -7
- package/{dist → lib}/customtypes/widgets/slices/SharedSlice.d.ts +84 -84
- package/{dist → lib}/customtypes/widgets/slices/SharedSlice.js +7 -7
- package/{dist → lib}/customtypes/widgets/slices/SharedSliceRef.d.ts +2 -2
- package/{dist → lib}/customtypes/widgets/slices/SharedSliceRef.js +1 -1
- package/{dist → lib}/customtypes/widgets/slices/Slice.d.ts +1 -1
- package/{dist → lib}/customtypes/widgets/slices/Slice.js +0 -0
- package/{dist → lib}/customtypes/widgets/slices/Slices.d.ts +1556 -1556
- package/{dist → lib}/customtypes/widgets/slices/Slices.js +31 -23
- package/{dist → lib}/customtypes/widgets/slices/SlicesTypes.d.ts +0 -0
- package/{dist → lib}/customtypes/widgets/slices/SlicesTypes.js +0 -0
- package/lib/customtypes/widgets/slices/index.d.ts +7 -0
- package/{dist → lib}/customtypes/widgets/slices/index.js +3 -3
- package/lib/documents/DocumentData.d.ts +8 -0
- package/lib/documents/DocumentData.js +46 -0
- package/lib/documents/index.d.ts +2 -0
- package/lib/documents/index.js +28 -0
- package/lib/documents/widgets/EmptyContent.d.ts +8 -0
- package/lib/documents/widgets/EmptyContent.js +9 -0
- package/lib/documents/widgets/GroupContent.d.ts +16 -0
- package/lib/documents/widgets/GroupContent.js +77 -0
- package/lib/documents/widgets/SimpleWidgetContent.d.ts +20 -0
- package/lib/documents/widgets/SimpleWidgetContent.js +96 -0
- package/lib/documents/widgets/StaticWidgetContent.d.ts +10 -0
- package/lib/documents/widgets/StaticWidgetContent.js +44 -0
- package/lib/documents/widgets/UIDContent.d.ts +7 -0
- package/lib/documents/widgets/UIDContent.js +28 -0
- package/lib/documents/widgets/Widget.d.ts +0 -0
- package/lib/documents/widgets/Widget.js +1 -0
- package/lib/documents/widgets/index.d.ts +35 -0
- package/lib/documents/widgets/index.js +60 -0
- package/lib/documents/widgets/nestable/BooleanContent.d.ts +8 -0
- package/lib/documents/widgets/nestable/BooleanContent.js +29 -0
- package/lib/documents/widgets/nestable/EmbedContent.d.ts +40 -0
- package/lib/documents/widgets/nestable/EmbedContent.js +54 -0
- package/lib/documents/widgets/nestable/FieldContent.d.ts +12 -0
- package/lib/documents/widgets/nestable/FieldContent.js +53 -0
- package/lib/documents/widgets/nestable/GeoPointContent.d.ts +17 -0
- package/lib/documents/widgets/nestable/GeoPointContent.js +31 -0
- package/lib/documents/widgets/nestable/ImageContent.d.ts +127 -0
- package/lib/documents/widgets/nestable/ImageContent.js +59 -0
- package/lib/documents/widgets/nestable/IntegrationFieldsContent.d.ts +8 -0
- package/lib/documents/widgets/nestable/IntegrationFieldsContent.js +34 -0
- package/lib/documents/widgets/nestable/Link/DocumentLink.d.ts +12 -0
- package/lib/documents/widgets/nestable/Link/DocumentLink.js +31 -0
- package/lib/documents/widgets/nestable/Link/ExternalLink.d.ts +24 -0
- package/lib/documents/widgets/nestable/Link/ExternalLink.js +42 -0
- package/lib/documents/widgets/nestable/Link/FileLink.d.ts +22 -0
- package/lib/documents/widgets/nestable/Link/FileLink.js +42 -0
- package/lib/documents/widgets/nestable/Link/ImageLink.d.ts +28 -0
- package/lib/documents/widgets/nestable/Link/ImageLink.js +44 -0
- package/lib/documents/widgets/nestable/Link/LinkContent.d.ts +36 -0
- package/lib/documents/widgets/nestable/Link/LinkContent.js +31 -0
- package/lib/documents/widgets/nestable/Link/index.d.ts +89 -0
- package/lib/documents/widgets/nestable/Link/index.js +53 -0
- package/lib/documents/widgets/nestable/SeparatorContent.d.ts +7 -0
- package/lib/documents/widgets/nestable/SeparatorContent.js +10 -0
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +274 -0
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +118 -0
- package/lib/documents/widgets/nestable/StructuredTextContent/index.d.ts +9 -0
- package/lib/documents/widgets/nestable/StructuredTextContent/index.js +32 -0
- package/lib/documents/widgets/nestable/index.d.ts +26 -0
- package/lib/documents/widgets/nestable/index.js +64 -0
- package/lib/documents/widgets/slices/CompositeSliceContent.d.ts +14 -0
- package/lib/documents/widgets/slices/CompositeSliceContent.js +68 -0
- package/lib/documents/widgets/slices/SharedSliceContent.d.ts +15 -0
- package/lib/documents/widgets/slices/SharedSliceContent.js +80 -0
- package/lib/documents/widgets/slices/SimpleSliceContent.d.ts +6 -0
- package/lib/documents/widgets/slices/SimpleSliceContent.js +8 -0
- package/lib/documents/widgets/slices/SliceWidgetContent.d.ts +8 -0
- package/lib/documents/widgets/slices/SliceWidgetContent.js +47 -0
- package/lib/documents/widgets/slices/SlicesContent.d.ts +17 -0
- package/lib/documents/widgets/slices/SlicesContent.js +69 -0
- package/lib/documents/widgets/slices/index.d.ts +5 -0
- package/lib/documents/widgets/slices/index.js +17 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +25 -0
- package/lib/validators/DateFromString.d.ts +3 -0
- package/lib/validators/DateFromString.js +28 -0
- package/lib/validators/DateFromStringOrNumber.d.ts +3 -0
- package/lib/validators/DateFromStringOrNumber.js +28 -0
- package/lib/validators/DateFromTsMs.d.ts +3 -0
- package/lib/validators/DateFromTsMs.js +28 -0
- package/lib/validators/IntFromNumber.d.ts +5 -0
- package/{dist → lib}/validators/IntFromNumber.js +4 -7
- package/lib/validators/IntFromPixels.d.ts +8 -0
- package/{dist → lib}/validators/IntFromPixels.js +5 -5
- package/lib/validators/NonEmptyString.d.ts +3 -0
- package/lib/validators/NonEmptyString.js +24 -0
- package/lib/validators/NonEmptyStringOrNull.d.ts +3 -0
- package/lib/validators/NonEmptyStringOrNull.js +17 -0
- package/lib/validators/NumberOrNull.d.ts +3 -0
- package/{dist/index.js → lib/validators/NumberOrNull.js} +3 -2
- package/lib/validators/StringFromBoolean.d.ts +5 -0
- package/{dist → lib}/validators/StringFromBoolean.js +5 -8
- package/lib/validators/StringFromNumber.d.ts +5 -0
- package/{dist → lib}/validators/StringFromNumber.js +5 -8
- package/lib/validators/StringOrNull.d.ts +3 -0
- package/{dist → lib}/validators/StringOrNull.js +2 -2
- package/lib/validators/function.d.ts +14 -0
- package/lib/validators/function.js +77 -0
- package/lib/validators/index.d.ts +12 -0
- package/lib/validators/index.js +48 -0
- package/package.json +30 -18
- package/src/customtypes/CustomType.ts +173 -116
- package/src/customtypes/Format.ts +3 -3
- package/src/customtypes/Section.ts +26 -13
- package/src/customtypes/index.ts +4 -4
- package/src/customtypes/widgets/Group.ts +21 -20
- package/src/customtypes/widgets/UID.ts +18 -17
- package/src/customtypes/widgets/Widget.ts +22 -23
- package/src/customtypes/widgets/WidgetTypes.ts +21 -21
- package/src/customtypes/widgets/index.ts +7 -7
- package/src/customtypes/widgets/nestable/BooleanField.ts +19 -19
- package/src/customtypes/widgets/nestable/Color.ts +17 -16
- package/src/customtypes/widgets/nestable/Date.ts +19 -18
- package/src/customtypes/widgets/nestable/Embed.ts +19 -18
- package/src/customtypes/widgets/nestable/GeoPoint.ts +17 -16
- package/src/customtypes/widgets/nestable/Image.ts +26 -26
- package/src/customtypes/widgets/nestable/IntegrationField.ts +18 -17
- package/src/customtypes/widgets/nestable/Link.ts +80 -68
- package/src/customtypes/widgets/nestable/NestableWidget.ts +32 -32
- package/src/customtypes/widgets/nestable/Number.ts +22 -21
- package/src/customtypes/widgets/nestable/Range.ts +22 -21
- package/src/customtypes/widgets/nestable/RichText.ts +164 -134
- package/src/customtypes/widgets/nestable/Select.ts +22 -21
- package/src/customtypes/widgets/nestable/Separator.ts +15 -14
- package/src/customtypes/widgets/nestable/Text.ts +18 -17
- package/src/customtypes/widgets/nestable/Timestamp.ts +19 -18
- package/src/customtypes/widgets/nestable/index.ts +15 -15
- package/src/customtypes/widgets/shared/ImageConstraint.ts +31 -29
- package/src/customtypes/widgets/shared/index.ts +1 -1
- package/src/customtypes/widgets/slices/CompositeSlice.ts +21 -21
- package/src/customtypes/widgets/slices/LegacySlice.ts +6 -10
- package/src/customtypes/widgets/slices/SharedSlice.ts +33 -31
- package/src/customtypes/widgets/slices/SharedSliceRef.ts +6 -6
- package/src/customtypes/widgets/slices/Slice.ts +4 -4
- package/src/customtypes/widgets/slices/Slices.ts +95 -73
- package/src/customtypes/widgets/slices/SlicesTypes.ts +3 -3
- package/src/customtypes/widgets/slices/index.ts +7 -7
- package/src/documents/DocumentData.ts +54 -0
- package/src/documents/index.ts +2 -0
- package/src/documents/widgets/EmptyContent.ts +8 -0
- package/src/documents/widgets/GroupContent.ts +91 -0
- package/src/documents/widgets/SimpleWidgetContent.ts +96 -0
- package/src/documents/widgets/StaticWidgetContent.ts +46 -0
- package/src/documents/widgets/UIDContent.ts +18 -0
- package/src/documents/widgets/index.ts +56 -0
- package/src/documents/widgets/nestable/BooleanContent.ts +21 -0
- package/src/documents/widgets/nestable/EmbedContent.ts +54 -0
- package/src/documents/widgets/nestable/FieldContent.ts +45 -0
- package/src/documents/widgets/nestable/GeoPointContent.ts +18 -0
- package/src/documents/widgets/nestable/ImageContent.ts +51 -0
- package/src/documents/widgets/nestable/IntegrationFieldsContent.ts +26 -0
- package/src/documents/widgets/nestable/Link/DocumentLink.ts +18 -0
- package/src/documents/widgets/nestable/Link/ExternalLink.ts +31 -0
- package/src/documents/widgets/nestable/Link/FileLink.ts +29 -0
- package/src/documents/widgets/nestable/Link/ImageLink.ts +31 -0
- package/src/documents/widgets/nestable/Link/LinkContent.ts +22 -0
- package/src/documents/widgets/nestable/Link/index.ts +33 -0
- package/src/documents/widgets/nestable/SeparatorContent.ts +8 -0
- package/src/documents/widgets/nestable/StructuredTextContent/Block.ts +122 -0
- package/src/documents/widgets/nestable/StructuredTextContent/index.ts +25 -0
- package/src/documents/widgets/nestable/index.ts +35 -0
- package/src/documents/widgets/slices/CompositeSliceContent.ts +77 -0
- package/src/documents/widgets/slices/SharedSliceContent.ts +94 -0
- package/src/documents/widgets/slices/SimpleSliceContent.ts +4 -0
- package/src/documents/widgets/slices/SliceWidgetContent.ts +51 -0
- package/src/documents/widgets/slices/SlicesContent.ts +91 -0
- package/src/documents/widgets/slices/index.ts +5 -0
- package/src/index.ts +3 -1
- package/src/validators/DateFromString.ts +17 -0
- package/src/validators/DateFromStringOrNumber.ts +17 -0
- package/src/validators/DateFromTsMs.ts +17 -0
- package/src/validators/IntFromNumber.ts +22 -24
- package/src/validators/IntFromPixels.ts +27 -26
- package/src/validators/NonEmptyString.ts +9 -0
- package/src/validators/NonEmptyStringOrNull.ts +22 -0
- package/src/validators/NumberOrNull.ts +5 -0
- package/src/validators/StringFromBoolean.ts +17 -19
- package/src/validators/StringFromNumber.ts +17 -19
- package/src/validators/StringOrNull.ts +4 -2
- package/src/validators/function.ts +71 -0
- package/src/validators/index.ts +12 -0
- package/dist/customtypes/index.d.ts +0 -4
- package/dist/customtypes/widgets/index.d.ts +0 -7
- package/dist/customtypes/widgets/nestable/Image.d.ts +0 -23
- package/dist/customtypes/widgets/nestable/Select.d.ts +0 -15
- package/dist/customtypes/widgets/nestable/index.d.ts +0 -15
- package/dist/customtypes/widgets/shared/index.d.ts +0 -1
- package/dist/customtypes/widgets/slices/index.d.ts +0 -7
- package/dist/index.d.ts +0 -1
- package/dist/index.js.map +0 -1
- package/dist/validators/IntFromNumber.d.ts +0 -7
- package/dist/validators/IntFromPixels.d.ts +0 -7
- package/dist/validators/StringFromBoolean.d.ts +0 -7
- package/dist/validators/StringFromNumber.d.ts +0 -7
- package/dist/validators/StringOrNull.d.ts +0 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
const Either_1 = require("fp-ts/Either");
|
|
23
|
+
const function_1 = require("fp-ts/function");
|
|
24
|
+
const t = __importStar(require("io-ts"));
|
|
25
|
+
exports.default = new t.Type("dateFromString", (u) => u instanceof Date, (u, c) => (0, function_1.pipe)(t.string.validate(u, c), (0, Either_1.chain)((s) => {
|
|
26
|
+
const d = new Date(s);
|
|
27
|
+
return isNaN(d.getTime()) ? t.failure(u, c) : t.success(d);
|
|
28
|
+
})), (date) => date.toISOString());
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
const Either_1 = require("fp-ts/Either");
|
|
23
|
+
const function_1 = require("fp-ts/function");
|
|
24
|
+
const t = __importStar(require("io-ts"));
|
|
25
|
+
exports.default = new t.Type("dateFromStringOrNumber", (u) => u instanceof Date, (u, c) => (0, function_1.pipe)(t.union([t.number, t.string]).validate(u, c), (0, Either_1.chain)((s) => {
|
|
26
|
+
const d = new Date(s);
|
|
27
|
+
return isNaN(d.getTime()) ? t.failure(u, c) : t.success(d);
|
|
28
|
+
})), (date) => date);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
const Either_1 = require("fp-ts/Either");
|
|
23
|
+
const function_1 = require("fp-ts/function");
|
|
24
|
+
const t = __importStar(require("io-ts"));
|
|
25
|
+
exports.default = new t.Type("dateFromTsMs", (u) => u instanceof Date, (u, c) => (0, function_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)((s) => {
|
|
26
|
+
const d = new Date(s);
|
|
27
|
+
return isNaN(d.getTime()) ? t.failure(u, c) : t.success(d);
|
|
28
|
+
})), (date) => date.getTime());
|
|
@@ -19,14 +19,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
|
|
22
|
+
const Either_1 = require("fp-ts/Either");
|
|
23
|
+
const function_1 = require("fp-ts/function");
|
|
23
24
|
const t = __importStar(require("io-ts"));
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A codec that succeeds if a number can be parsed to an integer
|
|
28
|
-
*/
|
|
29
|
-
exports.IntFromNumber = new t.Type('IntFromNumber', t.Int.is, (u, c) => (0, pipeable_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)(n => {
|
|
25
|
+
/** A codec that succeeds if a number can be parsed to an integer */
|
|
26
|
+
exports.default = new t.Type("IntFromNumber", t.Int.is, (u, c) => (0, function_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)((n) => {
|
|
30
27
|
if (t.Int.is(n))
|
|
31
28
|
return t.success(n);
|
|
32
29
|
else {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
export declare type IntFromPixelsC = t.Type<t.Int, string, unknown>;
|
|
3
|
+
declare const _default: t.Type<t.Int, string, unknown>;
|
|
4
|
+
/**
|
|
5
|
+
* A codec that succeeds if a string representing pixels (eg: "200px") can be
|
|
6
|
+
* parsed to an integer
|
|
7
|
+
*/
|
|
8
|
+
export default _default;
|
|
@@ -19,15 +19,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
|
|
22
|
+
const Either_1 = require("fp-ts/Either");
|
|
23
|
+
const function_1 = require("fp-ts/function");
|
|
23
24
|
const t = __importStar(require("io-ts"));
|
|
24
|
-
const pipeable_1 = require("fp-ts/lib/pipeable");
|
|
25
|
-
const Either_1 = require("fp-ts/lib/Either");
|
|
26
25
|
const PixelsRegex = /^([0-9]+)px$/;
|
|
27
26
|
/**
|
|
28
|
-
* A codec that succeeds if a string representing pixels (eg: "200px") can be
|
|
27
|
+
* A codec that succeeds if a string representing pixels (eg: "200px") can be
|
|
28
|
+
* parsed to an integer
|
|
29
29
|
*/
|
|
30
|
-
exports.
|
|
30
|
+
exports.default = new t.Type("IntFromPixels", t.Int.is, (u, c) => (0, function_1.pipe)(t.string.validate(u, c), (0, Either_1.chain)((strPixels) => {
|
|
31
31
|
try {
|
|
32
32
|
const matched = strPixels.match(PixelsRegex);
|
|
33
33
|
if (!matched)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
const t = __importStar(require("io-ts"));
|
|
23
|
+
const function_1 = require("./function");
|
|
24
|
+
exports.default = (0, function_1.refineType)(t.string, "nonEmptyString", (s) => s.trim().length > 0);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Either_1 = require("fp-ts/Either");
|
|
7
|
+
const function_1 = require("fp-ts/function");
|
|
8
|
+
const io_ts_1 = require("io-ts");
|
|
9
|
+
const StringOrNull_1 = __importDefault(require("./StringOrNull"));
|
|
10
|
+
exports.default = new io_ts_1.Type("nonEmptyStringOrNull", (u) => typeof u === "string" || u === null, (u, c) => (0, function_1.pipe)(StringOrNull_1.default.validate(u, c), (0, Either_1.chain)((s) => {
|
|
11
|
+
if (typeof s === "string" && s.length > 0) {
|
|
12
|
+
return (0, io_ts_1.success)(s);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return (0, io_ts_1.success)(null);
|
|
16
|
+
}
|
|
17
|
+
})), (s) => s);
|
|
@@ -19,5 +19,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const t = __importStar(require("io-ts"));
|
|
23
|
+
const function_1 = require("./function");
|
|
24
|
+
exports.default = (0, function_1.nullable)(t.number);
|
|
@@ -19,13 +19,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
|
|
22
|
+
const Either_1 = require("fp-ts/Either");
|
|
23
|
+
const function_1 = require("fp-ts/function");
|
|
23
24
|
const t = __importStar(require("io-ts"));
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A codec that validates a Boolean and convert it as a string
|
|
28
|
-
*/
|
|
29
|
-
exports.StringFromBoolean = new t.Type('StringFromInt', t.string.is, (u, c) => (0, pipeable_1.pipe)(t.boolean.validate(u, c), (0, Either_1.chain)(i => {
|
|
25
|
+
/** A codec that validates a Boolean and convert it as a string */
|
|
26
|
+
exports.default = new t.Type("StringFromInt", t.string.is, (u, c) => (0, function_1.pipe)(t.boolean.validate(u, c), (0, Either_1.chain)((i) => {
|
|
30
27
|
return t.success(i.toString());
|
|
31
|
-
})), i => i);
|
|
28
|
+
})), (i) => i);
|
|
@@ -19,13 +19,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
|
|
22
|
+
const Either_1 = require("fp-ts/Either");
|
|
23
|
+
const function_1 = require("fp-ts/function");
|
|
23
24
|
const t = __importStar(require("io-ts"));
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A codec that validates a number and convert it as a string
|
|
28
|
-
*/
|
|
29
|
-
exports.StringFromNumber = new t.Type('StringFromInt', t.string.is, (u, c) => (0, pipeable_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)(i => {
|
|
25
|
+
/** A codec that validates a number and convert it as a string */
|
|
26
|
+
exports.default = new t.Type("StringFromInt", t.string.is, (u, c) => (0, function_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)((i) => {
|
|
30
27
|
return t.success(i.toString());
|
|
31
|
-
})), i => i);
|
|
28
|
+
})), (i) => i);
|
|
@@ -19,6 +19,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.StringOrNull = void 0;
|
|
23
22
|
const t = __importStar(require("io-ts"));
|
|
24
|
-
|
|
23
|
+
const function_1 = require("./function");
|
|
24
|
+
exports.default = (0, function_1.nullable)(t.string);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
export declare function nullable<A, O>(c: t.Type<A, O>): t.UnionC<[t.Type<A, O, unknown>, t.NullC, t.UndefinedC]>;
|
|
3
|
+
export declare function refineType<A, O, I>(type: t.Type<A, O, I>, newName: string, pred: (a: A) => boolean): t.Type<A, O, I>;
|
|
4
|
+
export declare function filterDouble(value: string): number | null;
|
|
5
|
+
export declare function formatDateTime(date: Date): string;
|
|
6
|
+
export declare function formatDate(date: Date): string;
|
|
7
|
+
export declare function grouped<A>(array: A[], n: number): A[][];
|
|
8
|
+
export declare function objectToMap<T>(object: {
|
|
9
|
+
[key: string]: T;
|
|
10
|
+
}): Map<string, T>;
|
|
11
|
+
export declare function isEmpty(obj: object): boolean;
|
|
12
|
+
export declare function addType<A, O extends object, I, T extends string>(codec: t.Type<A, O, I>, t: T): t.Type<A, O & {
|
|
13
|
+
__TYPE__: T;
|
|
14
|
+
}, I>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.addType = exports.isEmpty = exports.objectToMap = exports.grouped = exports.formatDate = exports.formatDateTime = exports.filterDouble = exports.refineType = exports.nullable = void 0;
|
|
23
|
+
const fp_ts_1 = require("fp-ts");
|
|
24
|
+
const function_1 = require("fp-ts/function");
|
|
25
|
+
const t = __importStar(require("io-ts"));
|
|
26
|
+
const mapOutput_1 = require("io-ts-types/mapOutput");
|
|
27
|
+
function nullable(c) {
|
|
28
|
+
return t.union([c, t.null, t.undefined]);
|
|
29
|
+
}
|
|
30
|
+
exports.nullable = nullable;
|
|
31
|
+
function refineType(type, newName, pred) {
|
|
32
|
+
return new t.Type(newName, type.is, (u, c) => (0, function_1.pipe)(type.validate(u, c), fp_ts_1.either.chain((v) => (pred(v) ? t.success(v) : t.failure(u, c)))), type.encode);
|
|
33
|
+
}
|
|
34
|
+
exports.refineType = refineType;
|
|
35
|
+
function filterDouble(value) {
|
|
36
|
+
if (value === "") {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const result = Number(value);
|
|
40
|
+
return Number.isNaN(result) ? null : result;
|
|
41
|
+
}
|
|
42
|
+
exports.filterDouble = filterDouble;
|
|
43
|
+
function formatDateTime(date) {
|
|
44
|
+
return date.toISOString().replace(/\.\d{3}Z$/, "+0000");
|
|
45
|
+
}
|
|
46
|
+
exports.formatDateTime = formatDateTime;
|
|
47
|
+
function formatDate(date) {
|
|
48
|
+
return date.toISOString().replace(/T.*/, "");
|
|
49
|
+
}
|
|
50
|
+
exports.formatDate = formatDate;
|
|
51
|
+
function grouped(array, n) {
|
|
52
|
+
return array.reduce((acc, curr, idx) => {
|
|
53
|
+
if (idx % n === 0) {
|
|
54
|
+
acc.push([curr]);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
acc[Math.floor(idx / n)].push(curr);
|
|
58
|
+
}
|
|
59
|
+
return acc;
|
|
60
|
+
}, new Array());
|
|
61
|
+
}
|
|
62
|
+
exports.grouped = grouped;
|
|
63
|
+
function objectToMap(object) {
|
|
64
|
+
return new Map(Object.entries(object));
|
|
65
|
+
}
|
|
66
|
+
exports.objectToMap = objectToMap;
|
|
67
|
+
function isEmpty(obj) {
|
|
68
|
+
for (const x in obj) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
exports.isEmpty = isEmpty;
|
|
74
|
+
function addType(codec, t) {
|
|
75
|
+
return (0, mapOutput_1.mapOutput)(codec, (o) => ({ ...o, __TYPE__: t }));
|
|
76
|
+
}
|
|
77
|
+
exports.addType = addType;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as DateFromString } from "./DateFromString";
|
|
2
|
+
export { default as DateFromStringOrNumber } from "./DateFromStringOrNumber";
|
|
3
|
+
export { default as DateFromTsMs } from "./DateFromTsMs";
|
|
4
|
+
export * as Function from "./function";
|
|
5
|
+
export { default as IntFromNumber } from "./IntFromNumber";
|
|
6
|
+
export { default as IntFromPixels } from "./IntFromPixels";
|
|
7
|
+
export { default as NonEmptyString } from "./NonEmptyString";
|
|
8
|
+
export { default as NonEmptyStringOrNull } from "./NonEmptyStringOrNull";
|
|
9
|
+
export { default as NumberOrNull } from "./NumberOrNull";
|
|
10
|
+
export { default as StringFromBoolean } from "./StringFromBoolean";
|
|
11
|
+
export { default as StringFromNumber } from "./StringFromNumber";
|
|
12
|
+
export { default as StringOrNull } from "./StringOrNull";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.StringOrNull = exports.StringFromNumber = exports.StringFromBoolean = exports.NumberOrNull = exports.NonEmptyStringOrNull = exports.NonEmptyString = exports.IntFromPixels = exports.IntFromNumber = exports.Function = exports.DateFromTsMs = exports.DateFromStringOrNumber = exports.DateFromString = void 0;
|
|
26
|
+
var DateFromString_1 = require("./DateFromString");
|
|
27
|
+
Object.defineProperty(exports, "DateFromString", { enumerable: true, get: function () { return __importDefault(DateFromString_1).default; } });
|
|
28
|
+
var DateFromStringOrNumber_1 = require("./DateFromStringOrNumber");
|
|
29
|
+
Object.defineProperty(exports, "DateFromStringOrNumber", { enumerable: true, get: function () { return __importDefault(DateFromStringOrNumber_1).default; } });
|
|
30
|
+
var DateFromTsMs_1 = require("./DateFromTsMs");
|
|
31
|
+
Object.defineProperty(exports, "DateFromTsMs", { enumerable: true, get: function () { return __importDefault(DateFromTsMs_1).default; } });
|
|
32
|
+
exports.Function = __importStar(require("./function"));
|
|
33
|
+
var IntFromNumber_1 = require("./IntFromNumber");
|
|
34
|
+
Object.defineProperty(exports, "IntFromNumber", { enumerable: true, get: function () { return __importDefault(IntFromNumber_1).default; } });
|
|
35
|
+
var IntFromPixels_1 = require("./IntFromPixels");
|
|
36
|
+
Object.defineProperty(exports, "IntFromPixels", { enumerable: true, get: function () { return __importDefault(IntFromPixels_1).default; } });
|
|
37
|
+
var NonEmptyString_1 = require("./NonEmptyString");
|
|
38
|
+
Object.defineProperty(exports, "NonEmptyString", { enumerable: true, get: function () { return __importDefault(NonEmptyString_1).default; } });
|
|
39
|
+
var NonEmptyStringOrNull_1 = require("./NonEmptyStringOrNull");
|
|
40
|
+
Object.defineProperty(exports, "NonEmptyStringOrNull", { enumerable: true, get: function () { return __importDefault(NonEmptyStringOrNull_1).default; } });
|
|
41
|
+
var NumberOrNull_1 = require("./NumberOrNull");
|
|
42
|
+
Object.defineProperty(exports, "NumberOrNull", { enumerable: true, get: function () { return __importDefault(NumberOrNull_1).default; } });
|
|
43
|
+
var StringFromBoolean_1 = require("./StringFromBoolean");
|
|
44
|
+
Object.defineProperty(exports, "StringFromBoolean", { enumerable: true, get: function () { return __importDefault(StringFromBoolean_1).default; } });
|
|
45
|
+
var StringFromNumber_1 = require("./StringFromNumber");
|
|
46
|
+
Object.defineProperty(exports, "StringFromNumber", { enumerable: true, get: function () { return __importDefault(StringFromNumber_1).default; } });
|
|
47
|
+
var StringOrNull_1 = require("./StringOrNull");
|
|
48
|
+
Object.defineProperty(exports, "StringOrNull", { enumerable: true, get: function () { return __importDefault(StringOrNull_1).default; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismicio/types-internal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Prismic types for Custom Types and Prismic Data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "Prismic <contact@prismic.io> (https://prismic.io)",
|
|
15
|
-
"main": "
|
|
16
|
-
"types": "
|
|
15
|
+
"main": "lib/index.js",
|
|
16
|
+
"types": "lib/index.d.ts",
|
|
17
17
|
"files": [
|
|
18
|
-
"
|
|
18
|
+
"lib",
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
@@ -27,34 +27,46 @@
|
|
|
27
27
|
"release:dry": "standard-version --dry-run",
|
|
28
28
|
"release:alpha": "npm run test && standard-version --release-as major --prerelease alpha && git push --follow-tags && npm run build && npm publish --tag alpha",
|
|
29
29
|
"release:alpha:dry": "standard-version --release-as major --prerelease alpha --dry-run",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
30
|
+
"test": "jest --no-cache --silent=false --verbose=false",
|
|
31
|
+
"eslint": "eslint . --cache --cache-location .caches/eslint --cache-strategy content --ext js,ts,tsx --max-warnings 0",
|
|
32
|
+
"eslint-fix": "npm run eslint -- --fix",
|
|
33
|
+
"preflight": "npm run prettier && npm run build && npm run eslint",
|
|
34
|
+
"prettier": "prettier --check .",
|
|
35
|
+
"prettier-write": "prettier --write ."
|
|
34
36
|
},
|
|
35
37
|
"dependencies": {
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
38
|
+
"monocle-ts": "^2.3.11",
|
|
39
|
+
"newtype-ts": "^0.3.5",
|
|
40
|
+
"tslib": "^2.3.1"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
|
-
"@
|
|
43
|
+
"@relmify/jest-fp-ts": "^1.1.1",
|
|
44
|
+
"@types/jest": "^27.4.0",
|
|
42
45
|
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
|
43
46
|
"@typescript-eslint/parser": "^5.8.1",
|
|
44
47
|
"ava": "^3.15.0",
|
|
45
|
-
"eslint": "
|
|
46
|
-
"eslint-config-prettier": "
|
|
47
|
-
"eslint-plugin-
|
|
48
|
-
"eslint-plugin-
|
|
48
|
+
"eslint": "8.6.0",
|
|
49
|
+
"eslint-config-prettier": "8.3.0",
|
|
50
|
+
"eslint-plugin-only-warn": "1.0.3",
|
|
51
|
+
"eslint-plugin-simple-import-sort": "7.0.0",
|
|
52
|
+
"eslint-plugin-storybook": "0.5.5",
|
|
53
|
+
"fp-ts": "^2.11.8",
|
|
54
|
+
"io-ts": "^2.2.16",
|
|
55
|
+
"io-ts-types": "^0.5.16",
|
|
56
|
+
"jest": "^27.5.1",
|
|
49
57
|
"nyc": "^15.1.0",
|
|
50
58
|
"prettier": "^2.5.1",
|
|
51
59
|
"prettier-plugin-jsdoc": "^0.3.30",
|
|
52
|
-
"siroc": "^0.16.0",
|
|
53
|
-
"size-limit": "^7.0.5",
|
|
54
60
|
"standard-version": "^9.3.2",
|
|
55
61
|
"ts-eager": "^2.0.2",
|
|
62
|
+
"ts-jest": "^27.1.3",
|
|
56
63
|
"typescript": "^4.5.5"
|
|
57
64
|
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"fp-ts": "^2.11.8",
|
|
67
|
+
"io-ts": "^2.2.16",
|
|
68
|
+
"io-ts-types": "^0.5.16"
|
|
69
|
+
},
|
|
58
70
|
"engines": {
|
|
59
71
|
"node": ">=12.7.0"
|
|
60
72
|
},
|