@praxisui/cron-builder 8.0.0-beta.11 → 8.0.0-beta.12
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 +5 -0
- package/fesm2022/praxisui-cron-builder.mjs +60 -20
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -149,6 +149,11 @@ Expression, frequency, timezone and preset operations may patch canonical
|
|
|
149
149
|
`cron.validate` and `cron.preview.generate` are read-only operations: invalid
|
|
150
150
|
schedules return structured `diagnostics` and do not mutate the current schedule.
|
|
151
151
|
|
|
152
|
+
Each operation declares `target.resolver`, `preconditions`, `validators`,
|
|
153
|
+
`affectedPaths`, `effects` and typed `submissionImpact`. Expression, frequency,
|
|
154
|
+
timezone and preset changes affect the submitted schedule value; validation and
|
|
155
|
+
preview generation are diagnostics-only operations with no submission mutation.
|
|
156
|
+
|
|
152
157
|
## Build Notes
|
|
153
158
|
|
|
154
159
|
The builder resolves validation, humanized descriptions and occurrence preview inside the library runtime.
|
|
@@ -1336,8 +1336,6 @@ const CRON_BUILDER_AI_CAPABILITIES = {
|
|
|
1336
1336
|
],
|
|
1337
1337
|
};
|
|
1338
1338
|
|
|
1339
|
-
const cronDialectEnum = ['unix', 'quartz', 'aws-eventbridge', 'kubernetes', 'github-actions', 'gcp-scheduler'];
|
|
1340
|
-
const scheduleKindEnum = ['once', 'interval', 'daily', 'weekly', 'monthly', 'customCron'];
|
|
1341
1339
|
const PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST = {
|
|
1342
1340
|
schemaVersion: '1.0.0',
|
|
1343
1341
|
componentId: 'pdx-cron-builder',
|
|
@@ -1369,14 +1367,35 @@ const PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST = {
|
|
|
1369
1367
|
required: ['cron'],
|
|
1370
1368
|
properties: {
|
|
1371
1369
|
cron: { type: 'string' },
|
|
1372
|
-
dialect: { enum:
|
|
1370
|
+
dialect: { enum: ['unix', 'quartz', 'aws-eventbridge', 'kubernetes', 'github-actions', 'gcp-scheduler'] },
|
|
1373
1371
|
seconds: { type: 'boolean' },
|
|
1374
1372
|
},
|
|
1375
1373
|
},
|
|
1376
|
-
effects: [{
|
|
1374
|
+
effects: [{
|
|
1375
|
+
kind: 'compile-domain-patch',
|
|
1376
|
+
handler: 'cron-expression-set',
|
|
1377
|
+
handlerContract: {
|
|
1378
|
+
reads: ['schedule.expression', 'schedule.timezone', 'metadata.timezone', 'value'],
|
|
1379
|
+
writes: ['schedule.kind', 'schedule.expression', 'value', 'diagnostics'],
|
|
1380
|
+
identityKeys: ['schedule.expression.cron', 'schedule.expression.dialect'],
|
|
1381
|
+
inputSchema: {
|
|
1382
|
+
type: 'object',
|
|
1383
|
+
required: ['cron'],
|
|
1384
|
+
properties: {
|
|
1385
|
+
cron: { type: 'string' },
|
|
1386
|
+
dialect: { enum: ['unix', 'quartz', 'aws-eventbridge', 'kubernetes', 'github-actions', 'gcp-scheduler'] },
|
|
1387
|
+
seconds: { type: 'boolean' },
|
|
1388
|
+
},
|
|
1389
|
+
},
|
|
1390
|
+
failureModes: ['invalid-expression', 'invalid-dialect', 'seconds-field-mismatch'],
|
|
1391
|
+
description: 'Validates and normalizes an explicit CRON expression before writing schedule.expression and the compatibility value.',
|
|
1392
|
+
},
|
|
1393
|
+
}],
|
|
1394
|
+
destructive: false,
|
|
1395
|
+
requiresConfirmation: false,
|
|
1377
1396
|
validators: ['cron-expression-valid', 'cron-dialect-compatible', 'editor-runtime-round-trip'],
|
|
1378
|
-
affectedPaths: ['schedule.kind', 'schedule.expression.cron', 'schedule.expression.dialect', 'schedule.expression.seconds', 'value'],
|
|
1379
|
-
submissionImpact:
|
|
1397
|
+
affectedPaths: ['schedule.kind', 'schedule.expression', 'schedule.expression.cron', 'schedule.expression.dialect', 'schedule.expression.seconds', 'value', 'diagnostics'],
|
|
1398
|
+
submissionImpact: 'affects-submission',
|
|
1380
1399
|
preconditions: ['config-initialized'],
|
|
1381
1400
|
},
|
|
1382
1401
|
{
|
|
@@ -1389,9 +1408,9 @@ const PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST = {
|
|
|
1389
1408
|
type: 'object',
|
|
1390
1409
|
required: ['kind', 'recurrence'],
|
|
1391
1410
|
properties: {
|
|
1392
|
-
kind: { enum:
|
|
1411
|
+
kind: { enum: ['once', 'interval', 'daily', 'weekly', 'monthly', 'customCron'] },
|
|
1393
1412
|
recurrence: { type: 'object' },
|
|
1394
|
-
dialect: { enum:
|
|
1413
|
+
dialect: { enum: ['unix', 'quartz', 'aws-eventbridge', 'kubernetes', 'github-actions', 'gcp-scheduler'] },
|
|
1395
1414
|
},
|
|
1396
1415
|
},
|
|
1397
1416
|
effects: [{
|
|
@@ -1405,18 +1424,20 @@ const PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST = {
|
|
|
1405
1424
|
type: 'object',
|
|
1406
1425
|
required: ['kind', 'recurrence'],
|
|
1407
1426
|
properties: {
|
|
1408
|
-
kind: { enum:
|
|
1427
|
+
kind: { enum: ['once', 'interval', 'daily', 'weekly', 'monthly', 'customCron'] },
|
|
1409
1428
|
recurrence: { type: 'object' },
|
|
1410
|
-
dialect: { enum:
|
|
1429
|
+
dialect: { enum: ['unix', 'quartz', 'aws-eventbridge', 'kubernetes', 'github-actions', 'gcp-scheduler'] },
|
|
1411
1430
|
},
|
|
1412
1431
|
},
|
|
1413
1432
|
failureModes: ['unsupported-kind', 'non-portable-frequency', 'invalid-recurrence', 'cron-compile-failed'],
|
|
1414
1433
|
description: 'Compiles structured recurrence intent through compileScheduleExpression and updates the canonical schedule expression only when diagnostics have no errors.',
|
|
1415
1434
|
},
|
|
1416
1435
|
}],
|
|
1436
|
+
destructive: false,
|
|
1437
|
+
requiresConfirmation: false,
|
|
1417
1438
|
validators: ['frequency-maps-to-canonical-expression', 'cron-expression-valid', 'diagnostics-before-patch'],
|
|
1418
1439
|
affectedPaths: ['schedule.kind', 'schedule.recurrence', 'schedule.expression', 'value'],
|
|
1419
|
-
submissionImpact:
|
|
1440
|
+
submissionImpact: 'affects-submission',
|
|
1420
1441
|
preconditions: ['config-initialized'],
|
|
1421
1442
|
},
|
|
1422
1443
|
{
|
|
@@ -1426,16 +1447,29 @@ const PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST = {
|
|
|
1426
1447
|
targetKind: 'timezone',
|
|
1427
1448
|
target: { kind: 'timezone', resolver: 'schedule-timezone', ambiguityPolicy: 'fail', required: false },
|
|
1428
1449
|
inputSchema: { type: 'object', required: ['timezone'], properties: { timezone: { type: 'string' } } },
|
|
1429
|
-
effects: [{
|
|
1450
|
+
effects: [{
|
|
1451
|
+
kind: 'compile-domain-patch',
|
|
1452
|
+
handler: 'cron-timezone-set',
|
|
1453
|
+
handlerContract: {
|
|
1454
|
+
reads: ['value', 'schedule', 'metadata.timezone', 'metadata.previewOccurrences', 'metadata.previewFrom', 'metadata.locale'],
|
|
1455
|
+
writes: ['schedule.timezone', 'metadata.timezone', 'preview', 'diagnostics'],
|
|
1456
|
+
identityKeys: ['schedule.expression.cron', 'schedule.timezone'],
|
|
1457
|
+
inputSchema: { type: 'object', required: ['timezone'], properties: { timezone: { type: 'string' } } },
|
|
1458
|
+
failureModes: ['invalid-timezone', 'invalid-expression', 'preview-generation-failed'],
|
|
1459
|
+
description: 'Sets the IANA timezone used by schedule and metadata, then regenerates preview/diagnostics from the same expression.',
|
|
1460
|
+
},
|
|
1461
|
+
}],
|
|
1462
|
+
destructive: false,
|
|
1463
|
+
requiresConfirmation: false,
|
|
1430
1464
|
validators: ['timezone-valid', 'preview-matches-expression', 'editor-runtime-round-trip'],
|
|
1431
|
-
affectedPaths: ['schedule.timezone', 'metadata.timezone', 'preview'],
|
|
1432
|
-
submissionImpact:
|
|
1465
|
+
affectedPaths: ['schedule.timezone', 'metadata.timezone', 'preview', 'diagnostics'],
|
|
1466
|
+
submissionImpact: 'affects-submission',
|
|
1433
1467
|
preconditions: ['config-initialized'],
|
|
1434
1468
|
},
|
|
1435
1469
|
{
|
|
1436
1470
|
operationId: 'cron.preset.apply',
|
|
1437
1471
|
title: 'Apply CRON preset',
|
|
1438
|
-
scope: '
|
|
1472
|
+
scope: 'meta',
|
|
1439
1473
|
targetKind: 'preset',
|
|
1440
1474
|
target: { kind: 'preset', resolver: 'cron-preset-by-label-or-expression', ambiguityPolicy: 'fail', required: true },
|
|
1441
1475
|
inputSchema: {
|
|
@@ -1465,9 +1499,11 @@ const PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST = {
|
|
|
1465
1499
|
description: 'Resolves a preset by label or cron, validates it through normalizeScheduleValue/createSchedulePreview, then applies the canonical expression.',
|
|
1466
1500
|
},
|
|
1467
1501
|
}],
|
|
1502
|
+
destructive: false,
|
|
1503
|
+
requiresConfirmation: false,
|
|
1468
1504
|
validators: ['preset-exists', 'preset-maps-to-canonical-expression', 'cron-expression-valid'],
|
|
1469
1505
|
affectedPaths: ['schedule.kind', 'schedule.expression', 'schedule.timezone', 'value'],
|
|
1470
|
-
submissionImpact:
|
|
1506
|
+
submissionImpact: 'affects-submission',
|
|
1471
1507
|
preconditions: ['config-initialized', 'target-preset-exists'],
|
|
1472
1508
|
},
|
|
1473
1509
|
{
|
|
@@ -1482,7 +1518,7 @@ const PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST = {
|
|
|
1482
1518
|
cron: { type: 'string' },
|
|
1483
1519
|
schedule: { type: 'object' },
|
|
1484
1520
|
timezone: { type: 'string' },
|
|
1485
|
-
dialect: { enum:
|
|
1521
|
+
dialect: { enum: ['unix', 'quartz', 'aws-eventbridge', 'kubernetes', 'github-actions', 'gcp-scheduler'] },
|
|
1486
1522
|
},
|
|
1487
1523
|
},
|
|
1488
1524
|
effects: [{
|
|
@@ -1498,16 +1534,18 @@ const PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST = {
|
|
|
1498
1534
|
cron: { type: 'string' },
|
|
1499
1535
|
schedule: { type: 'object' },
|
|
1500
1536
|
timezone: { type: 'string' },
|
|
1501
|
-
dialect: { enum:
|
|
1537
|
+
dialect: { enum: ['unix', 'quartz', 'aws-eventbridge', 'kubernetes', 'github-actions', 'gcp-scheduler'] },
|
|
1502
1538
|
},
|
|
1503
1539
|
},
|
|
1504
1540
|
failureModes: ['invalid-expression', 'invalid-timezone', 'invalid-recurrence'],
|
|
1505
1541
|
description: 'Runs normalizeScheduleValue and validateScheduleAuthoringConfig and returns diagnostics without mutating schedule/value paths.',
|
|
1506
1542
|
},
|
|
1507
1543
|
}],
|
|
1544
|
+
destructive: false,
|
|
1545
|
+
requiresConfirmation: false,
|
|
1508
1546
|
validators: ['invalid-schedules-return-diagnostics', 'cron-expression-valid', 'timezone-valid'],
|
|
1509
1547
|
affectedPaths: ['diagnostics'],
|
|
1510
|
-
submissionImpact:
|
|
1548
|
+
submissionImpact: 'none',
|
|
1511
1549
|
preconditions: ['config-initialized'],
|
|
1512
1550
|
},
|
|
1513
1551
|
{
|
|
@@ -1545,9 +1583,11 @@ const PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST = {
|
|
|
1545
1583
|
description: 'Runs createSchedulePreview and returns read-only preview occurrences plus diagnostics; it does not patch the schedule when validation fails.',
|
|
1546
1584
|
},
|
|
1547
1585
|
}],
|
|
1586
|
+
destructive: false,
|
|
1587
|
+
requiresConfirmation: false,
|
|
1548
1588
|
validators: ['preview-matches-expression', 'timezone-valid', 'invalid-schedules-return-diagnostics'],
|
|
1549
1589
|
affectedPaths: ['preview', 'diagnostics'],
|
|
1550
|
-
submissionImpact:
|
|
1590
|
+
submissionImpact: 'none',
|
|
1551
1591
|
preconditions: ['config-initialized'],
|
|
1552
1592
|
},
|
|
1553
1593
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/cron-builder",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.12",
|
|
4
4
|
"description": "Cron expression builder utilities and components for Praxis UI.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.1.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@angular/forms": "^20.1.0",
|
|
9
9
|
"@angular/cdk": "^20.1.0",
|
|
10
10
|
"@angular/material": "^20.1.0",
|
|
11
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
11
|
+
"@praxisui/core": "^8.0.0-beta.12"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"tslib": "^2.3.0",
|