@marinoscar/platform-contract 0.1.0-next.17 → 0.1.0-next.19
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/CHANGELOG.md +16 -0
- package/README.md +1 -0
- package/dist/cjs/android-app/constants.d.ts +1 -1
- package/dist/cjs/android-app/constants.js +1 -1
- package/dist/cjs/email/schemas.js +1 -1
- package/dist/cjs/email/schemas.js.map +1 -1
- package/dist/cjs/settings/index.d.ts +1 -1
- package/dist/cjs/settings/index.d.ts.map +1 -1
- package/dist/cjs/settings/index.js +6 -1
- package/dist/cjs/settings/index.js.map +1 -1
- package/dist/cjs/settings/schemas.d.ts +36 -0
- package/dist/cjs/settings/schemas.d.ts.map +1 -1
- package/dist/cjs/settings/schemas.js +62 -1
- package/dist/cjs/settings/schemas.js.map +1 -1
- package/dist/cjs/settings/types.d.ts +2 -0
- package/dist/cjs/settings/types.d.ts.map +1 -1
- package/dist/cjs/timezone/constants.d.ts +16 -0
- package/dist/cjs/timezone/constants.d.ts.map +1 -0
- package/dist/cjs/timezone/constants.js +19 -0
- package/dist/cjs/timezone/constants.js.map +1 -0
- package/dist/cjs/timezone/index.d.ts +15 -0
- package/dist/cjs/timezone/index.d.ts.map +1 -0
- package/dist/cjs/timezone/index.js +34 -0
- package/dist/cjs/timezone/index.js.map +1 -0
- package/dist/cjs/timezone/schemas.d.ts +111 -0
- package/dist/cjs/timezone/schemas.d.ts.map +1 -0
- package/dist/cjs/timezone/schemas.js +194 -0
- package/dist/cjs/timezone/schemas.js.map +1 -0
- package/dist/esm/android-app/constants.d.ts +1 -1
- package/dist/esm/android-app/constants.js +1 -1
- package/dist/esm/email/schemas.js +1 -1
- package/dist/esm/email/schemas.js.map +1 -1
- package/dist/esm/settings/index.d.ts +1 -1
- package/dist/esm/settings/index.d.ts.map +1 -1
- package/dist/esm/settings/index.js +1 -1
- package/dist/esm/settings/index.js.map +1 -1
- package/dist/esm/settings/schemas.d.ts +36 -0
- package/dist/esm/settings/schemas.d.ts.map +1 -1
- package/dist/esm/settings/schemas.js +59 -0
- package/dist/esm/settings/schemas.js.map +1 -1
- package/dist/esm/settings/types.d.ts +2 -0
- package/dist/esm/settings/types.d.ts.map +1 -1
- package/dist/esm/timezone/constants.d.ts +16 -0
- package/dist/esm/timezone/constants.d.ts.map +1 -0
- package/dist/esm/timezone/constants.js +16 -0
- package/dist/esm/timezone/constants.js.map +1 -0
- package/dist/esm/timezone/index.d.ts +15 -0
- package/dist/esm/timezone/index.d.ts.map +1 -0
- package/dist/esm/timezone/index.js +15 -0
- package/dist/esm/timezone/index.js.map +1 -0
- package/dist/esm/timezone/schemas.d.ts +111 -0
- package/dist/esm/timezone/schemas.d.ts.map +1 -0
- package/dist/esm/timezone/schemas.js +185 -0
- package/dist/esm/timezone/schemas.js.map +1 -0
- package/package.json +11 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A `YYYY-MM-DD` calendar day.
|
|
3
|
+
*
|
|
4
|
+
* @stability experimental
|
|
5
|
+
*/
|
|
6
|
+
export type DateKey = string;
|
|
7
|
+
/**
|
|
8
|
+
* Wall-clock fields of an instant in a zone.
|
|
9
|
+
*
|
|
10
|
+
* @stability experimental
|
|
11
|
+
*/
|
|
12
|
+
export interface ZonedParts {
|
|
13
|
+
/** The four-digit year. */
|
|
14
|
+
readonly year: number;
|
|
15
|
+
/** 1 to 12. */
|
|
16
|
+
readonly month: number;
|
|
17
|
+
/** Day of the month, 1 to 31. */
|
|
18
|
+
readonly day: number;
|
|
19
|
+
/** 0 to 23. */
|
|
20
|
+
readonly hour: number;
|
|
21
|
+
/** 0 to 59. */
|
|
22
|
+
readonly minute: number;
|
|
23
|
+
/** 0 to 59. */
|
|
24
|
+
readonly second: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The wall-clock fields of `instant` in `timeZone`.
|
|
28
|
+
*
|
|
29
|
+
* @param instant - the instant.
|
|
30
|
+
* @param timeZone - an IANA zone id.
|
|
31
|
+
* @returns year, month (1-12), day, hour, minute and second there.
|
|
32
|
+
*
|
|
33
|
+
* @stability experimental
|
|
34
|
+
*/
|
|
35
|
+
export declare function getZonedParts(instant: Date | number, timeZone: string): ZonedParts;
|
|
36
|
+
/**
|
|
37
|
+
* Minutes the zone is ahead of UTC at `instant` (positive east, so
|
|
38
|
+
* `America/Costa_Rica` is `-360`). DST-aware.
|
|
39
|
+
*
|
|
40
|
+
* @param instant - the instant.
|
|
41
|
+
* @param timeZone - an IANA zone id.
|
|
42
|
+
* @returns the offset in minutes.
|
|
43
|
+
*
|
|
44
|
+
* @stability experimental
|
|
45
|
+
*/
|
|
46
|
+
export declare function getTimeZoneOffsetMinutes(instant: Date | number, timeZone: string): number;
|
|
47
|
+
/**
|
|
48
|
+
* The calendar day (`YYYY-MM-DD`) `instant` falls on in `timeZone`.
|
|
49
|
+
*
|
|
50
|
+
* @param instant - the instant.
|
|
51
|
+
* @param timeZone - an IANA zone id.
|
|
52
|
+
* @returns the zone's calendar day.
|
|
53
|
+
*
|
|
54
|
+
* @stability experimental
|
|
55
|
+
*/
|
|
56
|
+
export declare function zonedDateKey(instant: Date | number, timeZone: string): DateKey;
|
|
57
|
+
/**
|
|
58
|
+
* Whether `value` is a well-formed `YYYY-MM-DD` that names a real day.
|
|
59
|
+
*
|
|
60
|
+
* @stability experimental
|
|
61
|
+
*/
|
|
62
|
+
export declare function isDateKey(value: unknown): value is DateKey;
|
|
63
|
+
/**
|
|
64
|
+
* `day` shifted by whole calendar days, with no time zone involved.
|
|
65
|
+
*
|
|
66
|
+
* @param day - a `YYYY-MM-DD` day.
|
|
67
|
+
* @param days - days to add (negative subtracts).
|
|
68
|
+
* @returns the shifted day.
|
|
69
|
+
*
|
|
70
|
+
* @stability experimental
|
|
71
|
+
*/
|
|
72
|
+
export declare function addDaysToDateKey(day: DateKey, days: number): DateKey;
|
|
73
|
+
/**
|
|
74
|
+
* The instant of local midnight at the start of `day` in `timeZone`. DST-safe:
|
|
75
|
+
* the day may be 23 or 25 hours long, and where midnight itself is skipped the
|
|
76
|
+
* day starts at the first instant after the gap.
|
|
77
|
+
*
|
|
78
|
+
* @param day - a `YYYY-MM-DD` day.
|
|
79
|
+
* @param timeZone - an IANA zone id.
|
|
80
|
+
* @returns the day's first instant.
|
|
81
|
+
*
|
|
82
|
+
* @stability experimental
|
|
83
|
+
*/
|
|
84
|
+
export declare function zonedDayStart(day: DateKey, timeZone: string): Date;
|
|
85
|
+
/**
|
|
86
|
+
* What {@link addCalendarInZone} adds: whole days or whole months.
|
|
87
|
+
*
|
|
88
|
+
* @stability experimental
|
|
89
|
+
*/
|
|
90
|
+
export type CalendarDuration = {
|
|
91
|
+
/** Calendar days to add (negative to subtract). */
|
|
92
|
+
readonly days: number;
|
|
93
|
+
} | {
|
|
94
|
+
/** Calendar months to add (negative to subtract); the day clamps to the month's last day. */
|
|
95
|
+
readonly months: number;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* `instant` plus calendar days or months, computed on the wall clock of
|
|
99
|
+
* `timeZone` so the time of day is kept across DST changes. A month step clamps
|
|
100
|
+
* to the end of a shorter month (Jan 31 plus one month is Feb 28, or 29 in a
|
|
101
|
+
* leap year).
|
|
102
|
+
*
|
|
103
|
+
* @param instant - the starting instant.
|
|
104
|
+
* @param duration - `{ days }` or `{ months }` (integers, negative allowed).
|
|
105
|
+
* @param timeZone - an IANA zone id.
|
|
106
|
+
* @returns the resulting instant.
|
|
107
|
+
*
|
|
108
|
+
* @stability experimental
|
|
109
|
+
*/
|
|
110
|
+
export declare function addCalendarInZone(instant: Date | number, duration: CalendarDuration, timeZone: string): Date;
|
|
111
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/timezone/schemas.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;A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;AAEN;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,IAAI,GAAG,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAkB5G"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
const MINUTE_MS = 60_000;
|
|
2
|
+
const DAY_MS = 86_400_000;
|
|
3
|
+
const DATE_KEY = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
4
|
+
const formatters = new Map();
|
|
5
|
+
function formatterFor(timeZone) {
|
|
6
|
+
let fmt = formatters.get(timeZone);
|
|
7
|
+
if (!fmt) {
|
|
8
|
+
fmt = new Intl.DateTimeFormat('en-US', {
|
|
9
|
+
timeZone,
|
|
10
|
+
hourCycle: 'h23',
|
|
11
|
+
year: 'numeric',
|
|
12
|
+
month: 'numeric',
|
|
13
|
+
day: 'numeric',
|
|
14
|
+
hour: 'numeric',
|
|
15
|
+
minute: 'numeric',
|
|
16
|
+
second: 'numeric',
|
|
17
|
+
});
|
|
18
|
+
formatters.set(timeZone, fmt);
|
|
19
|
+
}
|
|
20
|
+
return fmt;
|
|
21
|
+
}
|
|
22
|
+
function toMs(instant) {
|
|
23
|
+
return typeof instant === 'number' ? instant : instant.getTime();
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The wall-clock fields of `instant` in `timeZone`.
|
|
27
|
+
*
|
|
28
|
+
* @param instant - the instant.
|
|
29
|
+
* @param timeZone - an IANA zone id.
|
|
30
|
+
* @returns year, month (1-12), day, hour, minute and second there.
|
|
31
|
+
*
|
|
32
|
+
* @stability experimental
|
|
33
|
+
*/
|
|
34
|
+
export function getZonedParts(instant, timeZone) {
|
|
35
|
+
const out = {};
|
|
36
|
+
for (const part of formatterFor(timeZone).formatToParts(toMs(instant))) {
|
|
37
|
+
if (part.type !== 'literal')
|
|
38
|
+
out[part.type] = Number(part.value);
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
year: out.year,
|
|
42
|
+
month: out.month,
|
|
43
|
+
day: out.day,
|
|
44
|
+
hour: out.hour % 24,
|
|
45
|
+
minute: out.minute,
|
|
46
|
+
second: out.second,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Minutes the zone is ahead of UTC at `instant` (positive east, so
|
|
51
|
+
* `America/Costa_Rica` is `-360`). DST-aware.
|
|
52
|
+
*
|
|
53
|
+
* @param instant - the instant.
|
|
54
|
+
* @param timeZone - an IANA zone id.
|
|
55
|
+
* @returns the offset in minutes.
|
|
56
|
+
*
|
|
57
|
+
* @stability experimental
|
|
58
|
+
*/
|
|
59
|
+
export function getTimeZoneOffsetMinutes(instant, timeZone) {
|
|
60
|
+
const ms = toMs(instant);
|
|
61
|
+
const p = getZonedParts(ms, timeZone);
|
|
62
|
+
const asUtc = Date.UTC(p.year, p.month - 1, p.day, p.hour, p.minute, p.second);
|
|
63
|
+
// Drop the sub-second part so it does not skew the minute count.
|
|
64
|
+
const wholeSecond = Math.floor(ms / 1000) * 1000;
|
|
65
|
+
return Math.round((asUtc - wholeSecond) / MINUTE_MS);
|
|
66
|
+
}
|
|
67
|
+
function pad(n, width = 2) {
|
|
68
|
+
return String(n).padStart(width, '0');
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The calendar day (`YYYY-MM-DD`) `instant` falls on in `timeZone`.
|
|
72
|
+
*
|
|
73
|
+
* @param instant - the instant.
|
|
74
|
+
* @param timeZone - an IANA zone id.
|
|
75
|
+
* @returns the zone's calendar day.
|
|
76
|
+
*
|
|
77
|
+
* @stability experimental
|
|
78
|
+
*/
|
|
79
|
+
export function zonedDateKey(instant, timeZone) {
|
|
80
|
+
const p = getZonedParts(instant, timeZone);
|
|
81
|
+
return `${pad(p.year, 4)}-${pad(p.month)}-${pad(p.day)}`;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Whether `value` is a well-formed `YYYY-MM-DD` that names a real day.
|
|
85
|
+
*
|
|
86
|
+
* @stability experimental
|
|
87
|
+
*/
|
|
88
|
+
export function isDateKey(value) {
|
|
89
|
+
if (typeof value !== 'string')
|
|
90
|
+
return false;
|
|
91
|
+
const m = DATE_KEY.exec(value);
|
|
92
|
+
if (!m)
|
|
93
|
+
return false;
|
|
94
|
+
const [y, mo, d] = [Number(m[1]), Number(m[2]), Number(m[3])];
|
|
95
|
+
const probe = new Date(Date.UTC(y, mo - 1, d));
|
|
96
|
+
return probe.getUTCFullYear() === y && probe.getUTCMonth() === mo - 1 && probe.getUTCDate() === d;
|
|
97
|
+
}
|
|
98
|
+
function parseKey(day) {
|
|
99
|
+
if (!isDateKey(day))
|
|
100
|
+
throw new RangeError(`Not a YYYY-MM-DD day: ${day}`);
|
|
101
|
+
const m = DATE_KEY.exec(day);
|
|
102
|
+
return { y: Number(m[1]), m: Number(m[2]), d: Number(m[3]) };
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* `day` shifted by whole calendar days, with no time zone involved.
|
|
106
|
+
*
|
|
107
|
+
* @param day - a `YYYY-MM-DD` day.
|
|
108
|
+
* @param days - days to add (negative subtracts).
|
|
109
|
+
* @returns the shifted day.
|
|
110
|
+
*
|
|
111
|
+
* @stability experimental
|
|
112
|
+
*/
|
|
113
|
+
export function addDaysToDateKey(day, days) {
|
|
114
|
+
const { y, m, d } = parseKey(day);
|
|
115
|
+
const shifted = new Date(Date.UTC(y, m - 1, d + days));
|
|
116
|
+
return `${pad(shifted.getUTCFullYear(), 4)}-${pad(shifted.getUTCMonth() + 1)}-${pad(shifted.getUTCDate())}`;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The instant at which the wall clock in `timeZone` reads the given fields.
|
|
120
|
+
* A repeated local time (clocks going back) resolves to the earlier instant; a
|
|
121
|
+
* skipped one (clocks going forward) resolves to the first instant after the gap.
|
|
122
|
+
*/
|
|
123
|
+
function zonedWallToInstant(fields, timeZone) {
|
|
124
|
+
const localMs = Date.UTC(fields.year, fields.month - 1, fields.day, fields.hour, fields.minute, fields.second, fields.ms);
|
|
125
|
+
const offsets = new Set([
|
|
126
|
+
getTimeZoneOffsetMinutes(localMs - DAY_MS, timeZone),
|
|
127
|
+
getTimeZoneOffsetMinutes(localMs + DAY_MS, timeZone),
|
|
128
|
+
]);
|
|
129
|
+
const candidates = [...offsets].map((o) => localMs - o * MINUTE_MS);
|
|
130
|
+
const valid = candidates.filter((c) => localMs - getTimeZoneOffsetMinutes(c, timeZone) * MINUTE_MS === c);
|
|
131
|
+
if (valid.length > 0)
|
|
132
|
+
return new Date(Math.min(...valid));
|
|
133
|
+
// Inside a gap: the wall time never happened. Use the pre-transition offset,
|
|
134
|
+
// which lands on the first instant after the gap.
|
|
135
|
+
return new Date(Math.max(...candidates));
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The instant of local midnight at the start of `day` in `timeZone`. DST-safe:
|
|
139
|
+
* the day may be 23 or 25 hours long, and where midnight itself is skipped the
|
|
140
|
+
* day starts at the first instant after the gap.
|
|
141
|
+
*
|
|
142
|
+
* @param day - a `YYYY-MM-DD` day.
|
|
143
|
+
* @param timeZone - an IANA zone id.
|
|
144
|
+
* @returns the day's first instant.
|
|
145
|
+
*
|
|
146
|
+
* @stability experimental
|
|
147
|
+
*/
|
|
148
|
+
export function zonedDayStart(day, timeZone) {
|
|
149
|
+
const { y, m, d } = parseKey(day);
|
|
150
|
+
return zonedWallToInstant({ year: y, month: m, day: d, hour: 0, minute: 0, second: 0, ms: 0 }, timeZone);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* `instant` plus calendar days or months, computed on the wall clock of
|
|
154
|
+
* `timeZone` so the time of day is kept across DST changes. A month step clamps
|
|
155
|
+
* to the end of a shorter month (Jan 31 plus one month is Feb 28, or 29 in a
|
|
156
|
+
* leap year).
|
|
157
|
+
*
|
|
158
|
+
* @param instant - the starting instant.
|
|
159
|
+
* @param duration - `{ days }` or `{ months }` (integers, negative allowed).
|
|
160
|
+
* @param timeZone - an IANA zone id.
|
|
161
|
+
* @returns the resulting instant.
|
|
162
|
+
*
|
|
163
|
+
* @stability experimental
|
|
164
|
+
*/
|
|
165
|
+
export function addCalendarInZone(instant, duration, timeZone) {
|
|
166
|
+
const ms = toMs(instant);
|
|
167
|
+
const p = getZonedParts(ms, timeZone);
|
|
168
|
+
const subMs = ((ms % 1000) + 1000) % 1000;
|
|
169
|
+
let { year, month, day } = p;
|
|
170
|
+
if ('days' in duration) {
|
|
171
|
+
const shifted = new Date(Date.UTC(year, month - 1, day + duration.days));
|
|
172
|
+
year = shifted.getUTCFullYear();
|
|
173
|
+
month = shifted.getUTCMonth() + 1;
|
|
174
|
+
day = shifted.getUTCDate();
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
const total = year * 12 + (month - 1) + duration.months;
|
|
178
|
+
year = Math.floor(total / 12);
|
|
179
|
+
month = (total % 12 + 12) % 12 + 1;
|
|
180
|
+
const lastDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
181
|
+
day = Math.min(day, lastDay);
|
|
182
|
+
}
|
|
183
|
+
return zonedWallToInstant({ year, month, day, hour: p.hour, minute: p.minute, second: p.second, ms: subMs }, timeZone);
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/timezone/schemas.ts"],"names":[],"mappings":"AA4BA,MAAM,SAAS,GAAG,MAAM,CAAC;AACzB,MAAM,MAAM,GAAG,UAAU,CAAC;AAC1B,MAAM,QAAQ,GAAG,2BAA2B,CAAC;AAE7C,MAAM,UAAU,GAAG,IAAI,GAAG,EAA+B,CAAC;AAE1D,SAAS,YAAY,CAAC,QAAgB;IACpC,IAAI,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,GAAG,GAAG,IAAI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QACxD,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;QAC9B,KAAK,GAAG,CAAC,KAAK,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QAChE,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,kBAAkB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAC;AACzH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marinoscar/platform-contract",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.19",
|
|
4
4
|
"description": "Zod DTOs and types shared by the platform API and web packages. Dual CommonJS + ESM.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -200,6 +200,16 @@
|
|
|
200
200
|
"default": "./dist/cjs/user-data/index.js"
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
|
+
"./timezone": {
|
|
204
|
+
"import": {
|
|
205
|
+
"types": "./dist/esm/timezone/index.d.ts",
|
|
206
|
+
"default": "./dist/esm/timezone/index.js"
|
|
207
|
+
},
|
|
208
|
+
"require": {
|
|
209
|
+
"types": "./dist/cjs/timezone/index.d.ts",
|
|
210
|
+
"default": "./dist/cjs/timezone/index.js"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
203
213
|
"./package.json": "./package.json"
|
|
204
214
|
},
|
|
205
215
|
"files": [
|