cronli5 0.2.1 → 0.3.4
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 +109 -0
- package/README.md +4 -4
- package/cronli5.min.js +2 -2
- package/dist/cronli5.cjs +471 -383
- package/dist/cronli5.js +471 -383
- package/dist/lang/de.cjs +286 -215
- package/dist/lang/de.js +286 -215
- package/dist/lang/en.cjs +413 -327
- package/dist/lang/en.js +413 -327
- package/dist/lang/es.cjs +303 -265
- package/dist/lang/es.js +303 -265
- package/dist/lang/fi.cjs +311 -266
- package/dist/lang/fi.js +311 -266
- package/dist/lang/zh.cjs +320 -240
- package/dist/lang/zh.js +320 -240
- package/package.json +6 -6
- package/src/core/analyze.ts +12 -12
- package/src/core/cadence.ts +164 -0
- package/src/core/index.ts +3 -1
- package/src/core/normalize.ts +3 -3
- package/src/core/parse.ts +1 -1
- package/src/core/{ir.ts → schedule.ts} +17 -18
- package/src/core/specs.ts +1 -1
- package/src/core/util.ts +3 -165
- package/src/core/validate.ts +1 -1
- package/src/core/weekday.ts +54 -0
- package/src/cronli5.ts +5 -5
- package/src/lang/de/index.ts +329 -219
- package/src/lang/en/dialects.ts +1 -1
- package/src/lang/en/index.ts +521 -372
- package/src/lang/es/index.ts +338 -286
- package/src/lang/es/notes.md +1 -1
- package/src/lang/fi/dialects.ts +1 -1
- package/src/lang/fi/index.ts +365 -299
- package/src/lang/fi/notes.md +23 -8
- package/src/lang/fi/status.json +1 -1
- package/src/lang/zh/index.ts +386 -245
- package/src/types.ts +6 -6
- package/types/core/analyze.d.ts +3 -3
- package/types/core/cadence.d.ts +33 -0
- package/types/core/index.d.ts +3 -1
- package/types/core/normalize.d.ts +1 -1
- package/types/core/parse.d.ts +1 -1
- package/types/core/{ir.d.ts → schedule.d.ts} +11 -16
- package/types/core/specs.d.ts +1 -1
- package/types/core/util.d.ts +1 -30
- package/types/core/weekday.d.ts +10 -0
- package/types/lang/de/index.d.ts +1 -1
- package/types/lang/en/dialects.d.ts +1 -1
- package/types/lang/en/index.d.ts +1 -1
- package/types/lang/es/index.d.ts +1 -1
- package/types/lang/fi/dialects.d.ts +1 -1
- package/types/lang/fi/index.d.ts +1 -1
- package/types/lang/zh/index.d.ts +1 -1
- package/types/types.d.ts +5 -5
package/src/cronli5.ts
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
// patterns always parse seconds first and year last)
|
|
29
29
|
|
|
30
30
|
import {analyze, prepare} from './core/index.js';
|
|
31
|
-
import type {NormalizedOptions} from './core/
|
|
31
|
+
import type {NormalizedOptions} from './core/schedule.js';
|
|
32
32
|
import type {CronPattern, Cronli5Language, Cronli5Options}
|
|
33
33
|
from './types.js';
|
|
34
34
|
import en from './lang/en/index.js';
|
|
@@ -79,13 +79,13 @@ function interpretCronPattern(
|
|
|
79
79
|
return lang.reboot;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
// Analyze into the neutral
|
|
82
|
+
// Analyze into the neutral facts + the core's suggested plan, then let the
|
|
83
83
|
// language optionally override the plan before rendering. A language
|
|
84
84
|
// without a `plan` hook renders the core's suggestion unchanged.
|
|
85
|
-
const
|
|
86
|
-
const plan = lang.plan ? lang.plan(
|
|
85
|
+
const schedule = analyze(prepare(cronPattern, opts));
|
|
86
|
+
const plan = lang.plan ? lang.plan(schedule, schedule.plan) : schedule.plan;
|
|
87
87
|
|
|
88
|
-
return lang.describe({...
|
|
88
|
+
return lang.describe({...schedule, plan}, opts);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
export default cronli5;
|