@nocobase/plugin-field-sequence 1.2.13-alpha → 1.3.0-alpha.20240710084543
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/package.json +2 -2
- package/dist/client/SequenceFieldProvider.d.ts +0 -10
- package/dist/client/index.d.ts +0 -13
- package/dist/client/index.js +0 -28
- package/dist/client/locale/index.d.ts +0 -11
- package/dist/client/sequence.d.ts +0 -267
- package/dist/externalVersion.js +0 -23
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -48
- package/dist/locale/en-US.json +0 -24
- package/dist/locale/es-ES.json +0 -24
- package/dist/locale/fr-FR.json +0 -24
- package/dist/locale/ko_KR.json +0 -24
- package/dist/locale/pt-BR.json +0 -24
- package/dist/locale/zh-CN.json +0 -28
- package/dist/node_modules/cron-parser/.eslintrc.json +0 -15
- package/dist/node_modules/cron-parser/.travis.yml +0 -7
- package/dist/node_modules/cron-parser/LICENSE +0 -21
- package/dist/node_modules/cron-parser/component.json +0 -11
- package/dist/node_modules/cron-parser/index.d.ts +0 -1
- package/dist/node_modules/cron-parser/lib/date.js +0 -252
- package/dist/node_modules/cron-parser/lib/expression.js +0 -983
- package/dist/node_modules/cron-parser/lib/field_compactor.js +0 -70
- package/dist/node_modules/cron-parser/lib/field_stringify.js +0 -38
- package/dist/node_modules/cron-parser/lib/parser.js +0 -1
- package/dist/node_modules/cron-parser/node_modules/luxon/build/amd/luxon.js +0 -8489
- package/dist/node_modules/cron-parser/node_modules/luxon/build/cjs-browser/luxon.js +0 -8487
- package/dist/node_modules/cron-parser/node_modules/luxon/build/global/luxon.js +0 -8490
- package/dist/node_modules/cron-parser/node_modules/luxon/build/global/luxon.min.js +0 -1
- package/dist/node_modules/cron-parser/node_modules/luxon/build/node/luxon.js +0 -7522
- package/dist/node_modules/cron-parser/node_modules/luxon/package.json +0 -96
- package/dist/node_modules/cron-parser/node_modules/luxon/src/datetime.js +0 -2169
- package/dist/node_modules/cron-parser/node_modules/luxon/src/duration.js +0 -880
- package/dist/node_modules/cron-parser/node_modules/luxon/src/errors.js +0 -61
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/conversions.js +0 -157
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/diff.js +0 -80
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/digits.js +0 -76
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/english.js +0 -233
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/formats.js +0 -191
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/formatter.js +0 -386
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/invalid.js +0 -14
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/locale.js +0 -482
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/regexParser.js +0 -335
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/tokenParser.js +0 -424
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/util.js +0 -292
- package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/zoneUtil.js +0 -36
- package/dist/node_modules/cron-parser/node_modules/luxon/src/info.js +0 -193
- package/dist/node_modules/cron-parser/node_modules/luxon/src/interval.js +0 -602
- package/dist/node_modules/cron-parser/node_modules/luxon/src/luxon.js +0 -26
- package/dist/node_modules/cron-parser/node_modules/luxon/src/luxonFilled.js +0 -13
- package/dist/node_modules/cron-parser/node_modules/luxon/src/settings.js +0 -137
- package/dist/node_modules/cron-parser/node_modules/luxon/src/zone.js +0 -88
- package/dist/node_modules/cron-parser/node_modules/luxon/src/zones/IANAZone.js +0 -191
- package/dist/node_modules/cron-parser/node_modules/luxon/src/zones/fixedOffsetZone.js +0 -94
- package/dist/node_modules/cron-parser/node_modules/luxon/src/zones/invalidZone.js +0 -53
- package/dist/node_modules/cron-parser/node_modules/luxon/src/zones/localZone.js +0 -63
- package/dist/node_modules/cron-parser/package.json +0 -1
- package/dist/node_modules/cron-parser/test/31_of_month.js +0 -17
- package/dist/node_modules/cron-parser/test/bug.js +0 -29
- package/dist/node_modules/cron-parser/test/crondate.js +0 -16
- package/dist/node_modules/cron-parser/test/crontab.example +0 -7
- package/dist/node_modules/cron-parser/test/empty_around_comma.js +0 -22
- package/dist/node_modules/cron-parser/test/expression.js +0 -1489
- package/dist/node_modules/cron-parser/test/field_compactor.js +0 -250
- package/dist/node_modules/cron-parser/test/field_stringify.js +0 -84
- package/dist/node_modules/cron-parser/test/fields.js +0 -32
- package/dist/node_modules/cron-parser/test/increment_on_first_iteration.js +0 -22
- package/dist/node_modules/cron-parser/test/index-ts3.test-d.ts +0 -133
- package/dist/node_modules/cron-parser/test/index.test-d.ts +0 -138
- package/dist/node_modules/cron-parser/test/leap_year.js +0 -17
- package/dist/node_modules/cron-parser/test/parser.js +0 -46
- package/dist/node_modules/cron-parser/test/parser_crondate_formats.js +0 -145
- package/dist/node_modules/cron-parser/test/parser_day_of_month.js +0 -169
- package/dist/node_modules/cron-parser/test/prev_date.js +0 -32
- package/dist/node_modules/cron-parser/test/stringify.js +0 -402
- package/dist/node_modules/cron-parser/test/timezone.js +0 -422
- package/dist/node_modules/cron-parser/types/common.d.ts +0 -131
- package/dist/node_modules/cron-parser/types/index.d.ts +0 -45
- package/dist/node_modules/cron-parser/types/ts3/index.d.ts +0 -28
- package/dist/server/Plugin.d.ts +0 -16
- package/dist/server/Plugin.js +0 -133
- package/dist/server/collections/sequences.d.ts +0 -10
- package/dist/server/collections/sequences.js +0 -99
- package/dist/server/fields/sequence-field.d.ts +0 -46
- package/dist/server/fields/sequence-field.js +0 -395
- package/dist/server/index.d.ts +0 -10
- package/dist/server/index.js +0 -48
- package/dist/server/migrations/20221207022250-sequence-field-key.d.ts +0 -14
- package/dist/server/migrations/20221207022250-sequence-field-key.js +0 -94
- package/dist/server/migrations/20240425225438-change-locale-module.d.ts +0 -14
- package/dist/server/migrations/20240425225438-change-locale-module.js +0 -51
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "cron-parser",
|
|
3
|
-
"repo": "harrisiirak/cron-parser",
|
|
4
|
-
"description": "Node.js library for parsing crontab instructions",
|
|
5
|
-
"version": "4.3.0",
|
|
6
|
-
"keywords": ["cron", "crontab", "parser"],
|
|
7
|
-
"dependencies": {},
|
|
8
|
-
"development": {},
|
|
9
|
-
"main": "lib/parser.js",
|
|
10
|
-
"scripts": ["lib/parser.js", "lib/expression.js", "lib/date.js", "lib/field_compactor.js", "lib/field_stringify.js"]
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './types'
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var luxon = require('luxon');
|
|
4
|
-
|
|
5
|
-
CronDate.prototype.addYear = function() {
|
|
6
|
-
this._date = this._date.plus({ years: 1 });
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
CronDate.prototype.addMonth = function() {
|
|
10
|
-
this._date = this._date.plus({ months: 1 }).startOf('month');
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
CronDate.prototype.addDay = function() {
|
|
14
|
-
this._date = this._date.plus({ days: 1 }).startOf('day');
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
CronDate.prototype.addHour = function() {
|
|
18
|
-
var prev = this._date;
|
|
19
|
-
this._date = this._date.plus({ hours: 1 }).startOf('hour');
|
|
20
|
-
if (this._date <= prev) {
|
|
21
|
-
this._date = this._date.plus({ hours: 1 });
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
CronDate.prototype.addMinute = function() {
|
|
26
|
-
var prev = this._date;
|
|
27
|
-
this._date = this._date.plus({ minutes: 1 }).startOf('minute');
|
|
28
|
-
if (this._date < prev) {
|
|
29
|
-
this._date = this._date.plus({ hours: 1 });
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
CronDate.prototype.addSecond = function() {
|
|
34
|
-
var prev = this._date;
|
|
35
|
-
this._date = this._date.plus({ seconds: 1 }).startOf('second');
|
|
36
|
-
if (this._date < prev) {
|
|
37
|
-
this._date = this._date.plus({ hours: 1 });
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
CronDate.prototype.subtractYear = function() {
|
|
42
|
-
this._date = this._date.minus({ years: 1 });
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
CronDate.prototype.subtractMonth = function() {
|
|
46
|
-
this._date = this._date
|
|
47
|
-
.minus({ months: 1 })
|
|
48
|
-
.endOf('month')
|
|
49
|
-
.startOf('second');
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
CronDate.prototype.subtractDay = function() {
|
|
53
|
-
this._date = this._date
|
|
54
|
-
.minus({ days: 1 })
|
|
55
|
-
.endOf('day')
|
|
56
|
-
.startOf('second');
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
CronDate.prototype.subtractHour = function() {
|
|
60
|
-
var prev = this._date;
|
|
61
|
-
this._date = this._date
|
|
62
|
-
.minus({ hours: 1 })
|
|
63
|
-
.endOf('hour')
|
|
64
|
-
.startOf('second');
|
|
65
|
-
if (this._date >= prev) {
|
|
66
|
-
this._date = this._date.minus({ hours: 1 });
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
CronDate.prototype.subtractMinute = function() {
|
|
71
|
-
var prev = this._date;
|
|
72
|
-
this._date = this._date.minus({ minutes: 1 })
|
|
73
|
-
.endOf('minute')
|
|
74
|
-
.startOf('second');
|
|
75
|
-
if (this._date > prev) {
|
|
76
|
-
this._date = this._date.minus({ hours: 1 });
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
CronDate.prototype.subtractSecond = function() {
|
|
81
|
-
var prev = this._date;
|
|
82
|
-
this._date = this._date
|
|
83
|
-
.minus({ seconds: 1 })
|
|
84
|
-
.startOf('second');
|
|
85
|
-
if (this._date > prev) {
|
|
86
|
-
this._date = this._date.minus({ hours: 1 });
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
CronDate.prototype.getDate = function() {
|
|
91
|
-
return this._date.day;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
CronDate.prototype.getFullYear = function() {
|
|
95
|
-
return this._date.year;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
CronDate.prototype.getDay = function() {
|
|
99
|
-
var weekday = this._date.weekday;
|
|
100
|
-
return weekday == 7 ? 0 : weekday;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
CronDate.prototype.getMonth = function() {
|
|
104
|
-
return this._date.month - 1;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
CronDate.prototype.getHours = function() {
|
|
108
|
-
return this._date.hour;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
CronDate.prototype.getMinutes = function() {
|
|
112
|
-
return this._date.minute;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
CronDate.prototype.getSeconds = function() {
|
|
116
|
-
return this._date.second;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
CronDate.prototype.getMilliseconds = function() {
|
|
120
|
-
return this._date.millisecond;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
CronDate.prototype.getTime = function() {
|
|
124
|
-
return this._date.valueOf();
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
CronDate.prototype.getUTCDate = function() {
|
|
128
|
-
return this._getUTC().day;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
CronDate.prototype.getUTCFullYear = function() {
|
|
132
|
-
return this._getUTC().year;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
CronDate.prototype.getUTCDay = function() {
|
|
136
|
-
var weekday = this._getUTC().weekday;
|
|
137
|
-
return weekday == 7 ? 0 : weekday;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
CronDate.prototype.getUTCMonth = function() {
|
|
141
|
-
return this._getUTC().month - 1;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
CronDate.prototype.getUTCHours = function() {
|
|
145
|
-
return this._getUTC().hour;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
CronDate.prototype.getUTCMinutes = function() {
|
|
149
|
-
return this._getUTC().minute;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
CronDate.prototype.getUTCSeconds = function() {
|
|
153
|
-
return this._getUTC().second;
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
CronDate.prototype.toISOString = function() {
|
|
157
|
-
return this._date.toUTC().toISO();
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
CronDate.prototype.toJSON = function() {
|
|
161
|
-
return this._date.toJSON();
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
CronDate.prototype.setDate = function(d) {
|
|
165
|
-
this._date = this._date.set({ day: d });
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
CronDate.prototype.setFullYear = function(y) {
|
|
169
|
-
this._date = this._date.set({ year: y });
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
CronDate.prototype.setDay = function(d) {
|
|
173
|
-
this._date = this._date.set({ weekday: d });
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
CronDate.prototype.setMonth = function(m) {
|
|
177
|
-
this._date = this._date.set({ month: m + 1 });
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
CronDate.prototype.setHours = function(h) {
|
|
181
|
-
this._date = this._date.set({ hour: h });
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
CronDate.prototype.setMinutes = function(m) {
|
|
185
|
-
this._date = this._date.set({ minute: m });
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
CronDate.prototype.setSeconds = function(s) {
|
|
189
|
-
this._date = this._date.set({ second: s });
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
CronDate.prototype.setMilliseconds = function(s) {
|
|
193
|
-
this._date = this._date.set({ millisecond: s });
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
CronDate.prototype._getUTC = function() {
|
|
197
|
-
return this._date.toUTC();
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
CronDate.prototype.toString = function() {
|
|
201
|
-
return this.toDate().toString();
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
CronDate.prototype.toDate = function() {
|
|
205
|
-
return this._date.toJSDate();
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
CronDate.prototype.isLastDayOfMonth = function() {
|
|
209
|
-
//next day
|
|
210
|
-
var newDate = this._date.plus({ days: 1 }).startOf('day');
|
|
211
|
-
return this._date.month !== newDate.month;
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Returns true when the current weekday is the last occurrence of this weekday
|
|
216
|
-
* for the present month.
|
|
217
|
-
*/
|
|
218
|
-
CronDate.prototype.isLastWeekdayOfMonth = function() {
|
|
219
|
-
// Check this by adding 7 days to the current date and seeing if it's
|
|
220
|
-
// a different month
|
|
221
|
-
var newDate = this._date.plus({ days: 7 }).startOf('day');
|
|
222
|
-
return this._date.month !== newDate.month;
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
function CronDate (timestamp, tz) {
|
|
226
|
-
var dateOpts = { zone: tz };
|
|
227
|
-
if (!timestamp) {
|
|
228
|
-
this._date = luxon.DateTime.local();
|
|
229
|
-
} else if (timestamp instanceof CronDate) {
|
|
230
|
-
this._date = timestamp._date;
|
|
231
|
-
} else if (timestamp instanceof Date) {
|
|
232
|
-
this._date = luxon.DateTime.fromJSDate(timestamp, dateOpts);
|
|
233
|
-
} else if (typeof timestamp === 'number') {
|
|
234
|
-
this._date = luxon.DateTime.fromMillis(timestamp, dateOpts);
|
|
235
|
-
} else if (typeof timestamp === 'string') {
|
|
236
|
-
this._date = luxon.DateTime.fromISO(timestamp, dateOpts);
|
|
237
|
-
this._date.isValid || (this._date = luxon.DateTime.fromRFC2822(timestamp, dateOpts));
|
|
238
|
-
this._date.isValid || (this._date = luxon.DateTime.fromSQL(timestamp, dateOpts));
|
|
239
|
-
// RFC2822-like format without the required timezone offset (used in tests)
|
|
240
|
-
this._date.isValid || (this._date = luxon.DateTime.fromFormat(timestamp, 'EEE, d MMM yyyy HH:mm:ss', dateOpts));
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
if (!this._date || !this._date.isValid) {
|
|
244
|
-
throw new Error('CronDate: unhandled timestamp: ' + JSON.stringify(timestamp));
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
if (tz && tz !== this._date.zoneName) {
|
|
248
|
-
this._date = this._date.setZone(tz);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
module.exports = CronDate;
|