@futdevpro/fsm-dynamo 1.20.6 → 1.20.8
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 +28 -28
- package/__documentations/2026-08-23-atomic-rollback-manifest-contract.md +53 -53
- package/__documentations/2026-08-23-forms-v2-color-picker-settings.md +23 -0
- package/build/_modules/ngx-models/_enums/field-type.enum.d.ts +1 -0
- package/build/_modules/ngx-models/_enums/field-type.enum.d.ts.map +1 -1
- package/build/_modules/ngx-models/_enums/field-type.enum.js +1 -0
- package/build/_modules/ngx-models/_enums/field-type.enum.js.map +1 -1
- package/build/_modules/ngx-models/_models/control-models/forms-new/color-picker-field-new-settings.control-model.d.ts +14 -0
- package/build/_modules/ngx-models/_models/control-models/forms-new/color-picker-field-new-settings.control-model.d.ts.map +1 -0
- package/build/_modules/ngx-models/_models/control-models/forms-new/color-picker-field-new-settings.control-model.js +38 -0
- package/build/_modules/ngx-models/_models/control-models/forms-new/color-picker-field-new-settings.control-model.js.map +1 -0
- package/build/_modules/ngx-models/_models/control-models/forms-new/field-new-types.d.ts +2 -1
- package/build/_modules/ngx-models/_models/control-models/forms-new/field-new-types.d.ts.map +1 -1
- package/build/_modules/ngx-models/_models/control-models/forms-new/index.d.ts +1 -0
- package/build/_modules/ngx-models/_models/control-models/forms-new/index.d.ts.map +1 -1
- package/build/_modules/ngx-models/_models/control-models/forms-new/index.js +1 -0
- package/build/_modules/ngx-models/_models/control-models/forms-new/index.js.map +1 -1
- package/package.json +1 -1
- package/src/_modules/deployment/_collections/atomic-rollback-manifest.util.spec.ts +221 -221
- package/src/_modules/deployment/_collections/atomic-rollback-manifest.util.ts +455 -455
- package/src/_modules/deployment/_models/atomic-rollback-manifest.interface.ts +59 -59
- package/src/_modules/deployment/index.ts +2 -2
- package/src/_modules/ngx-models/_enums/field-type.enum.ts +5 -4
- package/src/_modules/ngx-models/_models/control-models/forms-new/color-picker-field-new-settings.control-model.ts +44 -0
- package/src/_modules/ngx-models/_models/control-models/forms-new/field-new-types.ts +5 -3
- package/src/_modules/ngx-models/_models/control-models/forms-new/forms-new.spec.ts +36 -5
- package/src/_modules/ngx-models/_models/control-models/forms-new/index.ts +3 -2
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
/** Deployment environments accepted by the shared atomic rollback contract. */
|
|
2
|
-
export type DyFM_AtomicRollbackEnvironment_Type = 'test' | 'production';
|
|
3
|
-
|
|
4
|
-
/** Content-free authority reference supplied by the deployment control plane. */
|
|
5
|
-
export interface DyFM_AtomicRollbackAuthority_Interface {
|
|
6
|
-
principalId: string;
|
|
7
|
-
evidenceId: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** Exact version-controlled configuration and database compatibility target. */
|
|
11
|
-
export interface DyFM_AtomicRollbackConfiguration_Interface {
|
|
12
|
-
revision: string;
|
|
13
|
-
sha256: string;
|
|
14
|
-
compatibilityVersion: string;
|
|
15
|
-
policyChecksum: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/** One immutable image target and its mutable release promotion destination. */
|
|
19
|
-
export interface DyFM_AtomicRollbackImage_Interface {
|
|
20
|
-
service: string;
|
|
21
|
-
version: string;
|
|
22
|
-
immutableReference: string;
|
|
23
|
-
mutableReference: string;
|
|
24
|
-
digest: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** One bounded post-deployment probe tied to a service in the image set. */
|
|
28
|
-
export interface DyFM_AtomicRollbackPostCheck_Interface {
|
|
29
|
-
checkId: string;
|
|
30
|
-
service: string;
|
|
31
|
-
endpoint: string;
|
|
32
|
-
expectedProbeContract: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** Complete versioned target for an atomic multi-service rollout or rollback. */
|
|
36
|
-
export interface DyFM_AtomicRollbackManifest_Interface {
|
|
37
|
-
contractVersion: 'fdp-atomic-rollback-manifest/1';
|
|
38
|
-
operationId: string;
|
|
39
|
-
environment: DyFM_AtomicRollbackEnvironment_Type;
|
|
40
|
-
authority: DyFM_AtomicRollbackAuthority_Interface;
|
|
41
|
-
sourceRevision: string;
|
|
42
|
-
configuration: DyFM_AtomicRollbackConfiguration_Interface;
|
|
43
|
-
images: DyFM_AtomicRollbackImage_Interface[];
|
|
44
|
-
postChecks: DyFM_AtomicRollbackPostCheck_Interface[];
|
|
45
|
-
targetChecksum: string;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/** Bounded content-free validation evidence for an unknown manifest value. */
|
|
49
|
-
export interface DyFM_AtomicRollbackLocalValidation_Interface {
|
|
50
|
-
contractVersion: 'fdp-atomic-rollback-local-validation/1';
|
|
51
|
-
valid: boolean;
|
|
52
|
-
environment: DyFM_AtomicRollbackEnvironment_Type | 'invalid';
|
|
53
|
-
operationId: string | 'invalid';
|
|
54
|
-
targetChecksum: string | 'invalid';
|
|
55
|
-
serviceCount: number;
|
|
56
|
-
postCheckCount: number;
|
|
57
|
-
gapCodes: string[];
|
|
58
|
-
manifest?: DyFM_AtomicRollbackManifest_Interface;
|
|
59
|
-
}
|
|
1
|
+
/** Deployment environments accepted by the shared atomic rollback contract. */
|
|
2
|
+
export type DyFM_AtomicRollbackEnvironment_Type = 'test' | 'production';
|
|
3
|
+
|
|
4
|
+
/** Content-free authority reference supplied by the deployment control plane. */
|
|
5
|
+
export interface DyFM_AtomicRollbackAuthority_Interface {
|
|
6
|
+
principalId: string;
|
|
7
|
+
evidenceId: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Exact version-controlled configuration and database compatibility target. */
|
|
11
|
+
export interface DyFM_AtomicRollbackConfiguration_Interface {
|
|
12
|
+
revision: string;
|
|
13
|
+
sha256: string;
|
|
14
|
+
compatibilityVersion: string;
|
|
15
|
+
policyChecksum: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** One immutable image target and its mutable release promotion destination. */
|
|
19
|
+
export interface DyFM_AtomicRollbackImage_Interface {
|
|
20
|
+
service: string;
|
|
21
|
+
version: string;
|
|
22
|
+
immutableReference: string;
|
|
23
|
+
mutableReference: string;
|
|
24
|
+
digest: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** One bounded post-deployment probe tied to a service in the image set. */
|
|
28
|
+
export interface DyFM_AtomicRollbackPostCheck_Interface {
|
|
29
|
+
checkId: string;
|
|
30
|
+
service: string;
|
|
31
|
+
endpoint: string;
|
|
32
|
+
expectedProbeContract: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Complete versioned target for an atomic multi-service rollout or rollback. */
|
|
36
|
+
export interface DyFM_AtomicRollbackManifest_Interface {
|
|
37
|
+
contractVersion: 'fdp-atomic-rollback-manifest/1';
|
|
38
|
+
operationId: string;
|
|
39
|
+
environment: DyFM_AtomicRollbackEnvironment_Type;
|
|
40
|
+
authority: DyFM_AtomicRollbackAuthority_Interface;
|
|
41
|
+
sourceRevision: string;
|
|
42
|
+
configuration: DyFM_AtomicRollbackConfiguration_Interface;
|
|
43
|
+
images: DyFM_AtomicRollbackImage_Interface[];
|
|
44
|
+
postChecks: DyFM_AtomicRollbackPostCheck_Interface[];
|
|
45
|
+
targetChecksum: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Bounded content-free validation evidence for an unknown manifest value. */
|
|
49
|
+
export interface DyFM_AtomicRollbackLocalValidation_Interface {
|
|
50
|
+
contractVersion: 'fdp-atomic-rollback-local-validation/1';
|
|
51
|
+
valid: boolean;
|
|
52
|
+
environment: DyFM_AtomicRollbackEnvironment_Type | 'invalid';
|
|
53
|
+
operationId: string | 'invalid';
|
|
54
|
+
targetChecksum: string | 'invalid';
|
|
55
|
+
serviceCount: number;
|
|
56
|
+
postCheckCount: number;
|
|
57
|
+
gapCodes: string[];
|
|
58
|
+
manifest?: DyFM_AtomicRollbackManifest_Interface;
|
|
59
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './_collections/atomic-rollback-manifest.util';
|
|
2
|
-
export * from './_models/atomic-rollback-manifest.interface';
|
|
1
|
+
export * from './_collections/atomic-rollback-manifest.util';
|
|
2
|
+
export * from './_models/atomic-rollback-manifest.interface';
|
|
@@ -18,10 +18,11 @@ export enum DyFM_Field_Type {
|
|
|
18
18
|
sliderRange = 'sliderRange',
|
|
19
19
|
select = 'select',
|
|
20
20
|
multiselect = 'multiselect',
|
|
21
|
-
chipSelect = 'chipSelect', //
|
|
22
|
-
chipMultiselect = 'chipMultiselect', //
|
|
23
|
-
radioSelect = 'radioSelect', //
|
|
24
|
-
|
|
21
|
+
chipSelect = 'chipSelect', //
|
|
22
|
+
chipMultiselect = 'chipMultiselect', //
|
|
23
|
+
radioSelect = 'radioSelect', //
|
|
24
|
+
colorPicker = 'color-picker',
|
|
25
|
+
date = 'date',
|
|
25
26
|
dateRange = 'dateRange',
|
|
26
27
|
dateTime = 'dateTime',
|
|
27
28
|
dateTimeRange = 'dateTimeRange',
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DyFM_Field_Type } from '../../../_enums/field-type.enum';
|
|
2
|
+
import { DyFM_FieldNew_Validator_Type } from '../../../_enums/forms-new/field-new-validator-type.enum';
|
|
3
|
+
import {
|
|
4
|
+
DyFM_FieldNew_Settings,
|
|
5
|
+
DyFM_FieldNew_Validator_Descriptor
|
|
6
|
+
} from './field-new-settings.control-model';
|
|
7
|
+
|
|
8
|
+
const DYNAMO_COLOR_PICKER_HEX_PATTERN: string = '^#[0-9a-fA-F]{6}$';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Forms v2 color-picker settings.
|
|
12
|
+
*
|
|
13
|
+
* The string value uses the browser-native `#RRGGBB` color contract so the same
|
|
14
|
+
* serializable Settings object can be shared by frontend and backend consumers.
|
|
15
|
+
*/
|
|
16
|
+
export class DyFM_ColorPickerFieldNew_Settings extends DyFM_FieldNew_Settings<string> {
|
|
17
|
+
override readonly type: DyFM_Field_Type.colorPicker = DyFM_Field_Type.colorPicker;
|
|
18
|
+
|
|
19
|
+
/** Creates serializable color-picker settings while protecting the discriminator. */
|
|
20
|
+
constructor(set: Partial<DyFM_ColorPickerFieldNew_Settings>) {
|
|
21
|
+
super(set);
|
|
22
|
+
const rest: Partial<DyFM_ColorPickerFieldNew_Settings> = { ...set };
|
|
23
|
+
|
|
24
|
+
Reflect.deleteProperty(rest, 'type');
|
|
25
|
+
Object.assign(this, rest);
|
|
26
|
+
|
|
27
|
+
const validators: DyFM_FieldNew_Validator_Descriptor[] = this.validators ?? [];
|
|
28
|
+
const hasHexValidator: boolean = validators.some((validator: DyFM_FieldNew_Validator_Descriptor): boolean =>
|
|
29
|
+
validator.type === DyFM_FieldNew_Validator_Type.pattern
|
|
30
|
+
&& validator.value === DYNAMO_COLOR_PICKER_HEX_PATTERN,
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
if (!hasHexValidator) {
|
|
34
|
+
this.validators = [
|
|
35
|
+
...validators,
|
|
36
|
+
{
|
|
37
|
+
type: DyFM_FieldNew_Validator_Type.pattern,
|
|
38
|
+
value: DYNAMO_COLOR_PICKER_HEX_PATTERN,
|
|
39
|
+
message: 'Enter a color as #RRGGBB.',
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DyFM_CheckboxFieldNew_Settings } from './checkbox-field-new-settings.control-model';
|
|
1
|
+
import { DyFM_CheckboxFieldNew_Settings } from './checkbox-field-new-settings.control-model';
|
|
2
|
+
import { DyFM_ColorPickerFieldNew_Settings } from './color-picker-field-new-settings.control-model';
|
|
2
3
|
import { DyFM_DateFieldNew_Settings } from './date-field-new-settings.control-model';
|
|
3
4
|
import { DyFM_DateRangeFieldNew_Settings } from './date-range-field-new-settings.control-model';
|
|
4
5
|
import { DyFM_DateTimeFieldNew_Settings } from './datetime-field-new-settings.control-model';
|
|
@@ -32,8 +33,9 @@ export type DyFM_FieldNew_Settings_AnyType =
|
|
|
32
33
|
| DyFM_PasswordFieldNew_Settings
|
|
33
34
|
| DyFM_SliderFieldNew_Settings
|
|
34
35
|
| DyFM_SliderRangeFieldNew_Settings
|
|
35
|
-
| DyFM_CheckboxFieldNew_Settings
|
|
36
|
-
|
|
|
36
|
+
| DyFM_CheckboxFieldNew_Settings
|
|
37
|
+
| DyFM_ColorPickerFieldNew_Settings
|
|
38
|
+
| DyFM_SelectFieldNew_Settings<unknown>
|
|
37
39
|
| DyFM_MultiselectFieldNew_Settings<unknown>
|
|
38
40
|
| DyFM_RadioSelectFieldNew_Settings<unknown>
|
|
39
41
|
| DyFM_DateFieldNew_Settings
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { DyFM_Field_Type } from '../../../_enums/field-type.enum';
|
|
2
2
|
import { DyFM_FieldNew_Validator_Type } from '../../../_enums/forms-new/field-new-validator-type.enum';
|
|
3
3
|
import {
|
|
4
|
-
DyFM_CheckboxFieldNew_Settings,
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
DyFM_CheckboxFieldNew_Settings,
|
|
5
|
+
DyFM_ColorPickerFieldNew_Settings,
|
|
6
|
+
DyFM_DateFieldNew_Settings,
|
|
7
|
+
DyFM_FieldNew_Settings,
|
|
8
|
+
DyFM_FieldNew_Validator_Descriptor,
|
|
7
9
|
DyFM_FormNew_Settings,
|
|
8
10
|
DyFM_MultiselectFieldNew_Settings,
|
|
9
11
|
DyFM_NumberFieldNew_Settings,
|
|
@@ -75,7 +77,7 @@ describe('| Forms v2 — Wave-1A Settings layer', () => {
|
|
|
75
77
|
});
|
|
76
78
|
});
|
|
77
79
|
|
|
78
|
-
describe('| DyFM_CheckboxFieldNew_Settings', () => {
|
|
80
|
+
describe('| DyFM_CheckboxFieldNew_Settings', () => {
|
|
79
81
|
it('| default constructor + type is checkbox', () => {
|
|
80
82
|
const s = new DyFM_CheckboxFieldNew_Settings({ key: 'done' });
|
|
81
83
|
expect(s.type).toBe(DyFM_Field_Type.checkbox);
|
|
@@ -87,7 +89,36 @@ describe('| Forms v2 — Wave-1A Settings layer', () => {
|
|
|
87
89
|
expect(s.mode).toBe('toggle');
|
|
88
90
|
expect(s.labelPosition).toBe('before');
|
|
89
91
|
});
|
|
90
|
-
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
describe('| DyFM_ColorPickerFieldNew_Settings', () => {
|
|
95
|
+
it('| stores a serializable hex value and owns the color-picker discriminator', () => {
|
|
96
|
+
const settings: DyFM_ColorPickerFieldNew_Settings = new DyFM_ColorPickerFieldNew_Settings({
|
|
97
|
+
key: 'accentColor',
|
|
98
|
+
defaultValue: '#22d3ee',
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
expect(settings.type).toBe(DyFM_Field_Type.colorPicker);
|
|
102
|
+
expect(settings.defaultValue).toBe('#22d3ee');
|
|
103
|
+
expect(settings.validators).toContain(jasmine.objectContaining({
|
|
104
|
+
type: DyFM_FieldNew_Validator_Type.pattern,
|
|
105
|
+
value: '^#[0-9a-fA-F]{6}$',
|
|
106
|
+
message: 'Enter a color as #RRGGBB.',
|
|
107
|
+
}));
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('| preserves consumer validators while adding the strict hexadecimal contract once', () => {
|
|
111
|
+
const settings: DyFM_ColorPickerFieldNew_Settings = new DyFM_ColorPickerFieldNew_Settings({
|
|
112
|
+
key: 'accentColor',
|
|
113
|
+
validators: [{ type: DyFM_FieldNew_Validator_Type.required }],
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
expect(settings.validators?.map(
|
|
117
|
+
(validator: DyFM_FieldNew_Validator_Descriptor): DyFM_FieldNew_Validator_Type => validator.type,
|
|
118
|
+
))
|
|
119
|
+
.toEqual([DyFM_FieldNew_Validator_Type.required, DyFM_FieldNew_Validator_Type.pattern]);
|
|
120
|
+
});
|
|
121
|
+
});
|
|
91
122
|
|
|
92
123
|
describe('| DyFM_SelectFieldNew_Settings<T>', () => {
|
|
93
124
|
it('| stores options + type is select', () => {
|
|
@@ -8,8 +8,9 @@ export * from './number-field-new-settings.control-model';
|
|
|
8
8
|
export * from './password-field-new-settings.control-model';
|
|
9
9
|
export * from './slider-field-new-settings.control-model';
|
|
10
10
|
export * from './slider-range-field-new-settings.control-model';
|
|
11
|
-
export * from './checkbox-field-new-settings.control-model';
|
|
12
|
-
export * from './
|
|
11
|
+
export * from './checkbox-field-new-settings.control-model';
|
|
12
|
+
export * from './color-picker-field-new-settings.control-model';
|
|
13
|
+
export * from './select-field-new-settings.control-model';
|
|
13
14
|
export * from './multiselect-field-new-settings.control-model';
|
|
14
15
|
export * from './radio-select-field-new-settings.control-model';
|
|
15
16
|
export * from './date-field-new-settings.control-model';
|