@contractspec/lib.feature-flags 1.48.1 → 1.50.0
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/dist/contracts/src/capabilities/capabilities.d.ts +27 -4
- package/dist/contracts/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/contracts/src/data-views/index.d.ts +1 -0
- package/dist/contracts/src/data-views/spec.d.ts +1 -0
- package/dist/contracts/src/events.d.ts +18 -4
- package/dist/contracts/src/events.d.ts.map +1 -1
- package/dist/contracts/src/experiments/spec.d.ts +7 -4
- package/dist/contracts/src/experiments/spec.d.ts.map +1 -1
- package/dist/contracts/src/features/index.d.ts +1 -1
- package/dist/contracts/src/features/types.d.ts +21 -27
- package/dist/contracts/src/features/types.d.ts.map +1 -1
- package/dist/contracts/src/index.d.ts +4 -2
- package/dist/contracts/src/ownership.d.ts +111 -8
- package/dist/contracts/src/ownership.d.ts.map +1 -1
- package/dist/contracts/src/policy/spec.d.ts +6 -4
- package/dist/contracts/src/policy/spec.d.ts.map +1 -1
- package/dist/contracts/src/serialization/index.d.ts +1 -0
- package/dist/contracts/src/serialization/serializers.d.ts +7 -0
- package/dist/contracts/src/tests/spec.d.ts +6 -4
- package/dist/contracts/src/tests/spec.d.ts.map +1 -1
- package/dist/contracts/src/versioning/refs.d.ts +47 -0
- package/dist/contracts/src/versioning/refs.d.ts.map +1 -0
- package/dist/contracts/src/workflow/index.d.ts +1 -0
- package/dist/contracts/src/workflow/spec.d.ts +1 -0
- package/dist/schema/src/FieldType.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,28 +1,51 @@
|
|
|
1
1
|
import { OwnerShipMeta } from "../ownership.js";
|
|
2
|
+
import { VersionedSpecRef } from "../versioning/refs.js";
|
|
2
3
|
|
|
3
4
|
//#region ../contracts/src/capabilities/capabilities.d.ts
|
|
5
|
+
/** Classification of capability types. */
|
|
4
6
|
type CapabilityKind = 'api' | 'event' | 'data' | 'ui' | 'integration';
|
|
7
|
+
/** Surfaces where capabilities can be exposed or consumed. */
|
|
5
8
|
type CapabilitySurface = 'operation' | 'event' | 'workflow' | 'presentation' | 'resource';
|
|
9
|
+
/**
|
|
10
|
+
* Reference to a capability on a specific surface.
|
|
11
|
+
* Extends VersionedSpecRef with surface and description context.
|
|
12
|
+
*/
|
|
6
13
|
interface CapabilitySurfaceRef {
|
|
14
|
+
/** The surface type where this capability is exposed. */
|
|
7
15
|
surface: CapabilitySurface;
|
|
16
|
+
/** Unique key identifying the capability. */
|
|
8
17
|
key: string;
|
|
18
|
+
/** Semantic version of the capability. */
|
|
9
19
|
version: string;
|
|
20
|
+
/** Optional description of what this capability provides. */
|
|
10
21
|
description?: string;
|
|
11
22
|
}
|
|
23
|
+
/** Metadata for a capability spec, extending ownership with kind. */
|
|
12
24
|
interface CapabilityMeta extends OwnerShipMeta {
|
|
25
|
+
/** The kind/category of this capability. */
|
|
13
26
|
kind: CapabilityKind;
|
|
14
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Requirement for a capability dependency.
|
|
30
|
+
* Used to declare what capabilities a spec needs.
|
|
31
|
+
*/
|
|
15
32
|
interface CapabilityRequirement {
|
|
33
|
+
/** Unique key of the required capability. */
|
|
16
34
|
key: string;
|
|
35
|
+
/** Optional specific version required. */
|
|
17
36
|
version?: string;
|
|
37
|
+
/** Optional kind filter for the requirement. */
|
|
18
38
|
kind?: CapabilityKind;
|
|
39
|
+
/** If true, the requirement is optional and won't block if missing. */
|
|
19
40
|
optional?: boolean;
|
|
41
|
+
/** Human-readable reason why this capability is required. */
|
|
20
42
|
reason?: string;
|
|
21
43
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Reference to a capability spec.
|
|
46
|
+
* Uses key and version to identify a specific capability.
|
|
47
|
+
*/
|
|
48
|
+
type CapabilityRef = VersionedSpecRef;
|
|
26
49
|
interface CapabilitySpec {
|
|
27
50
|
meta: CapabilityMeta;
|
|
28
51
|
provides?: CapabilitySurfaceRef[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","names":[],"sources":["../../../../../contracts/src/capabilities/capabilities.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","names":[],"sources":["../../../../../contracts/src/capabilities/capabilities.ts"],"sourcesContent":[],"mappings":";;;;;KAKY,cAAA;AAAZ;AAGY,KAAA,iBAAA,GAAiB,WAAA,GAAA,OAAA,GAAA,UAAA,GAAA,cAAA,GAAA,UAAA;AAW7B;AAYA;AASA;AAiBA;AAEiB,UAxCA,oBAAA,CAwCc;EACvB;EACK,OAAA,EAxCF,iBAwCE;EACA;EAAqB,GAAA,EAAA,MAAA;;;;;;;UA/BjB,cAAA,SAAuB;;QAEhC;;;;;;UAOS,qBAAA;;;;;;SAMR;;;;;;;;;;KAWG,aAAA,GAAgB;UAEX,cAAA;QACT;aACK;aACA"}
|
|
@@ -5,17 +5,31 @@ import { OwnerShipMeta } from "./ownership.js";
|
|
|
5
5
|
import "./registry.js";
|
|
6
6
|
|
|
7
7
|
//#region ../contracts/src/events.d.ts
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Metadata for an event specification.
|
|
11
|
+
* Extends OwnerShipMeta with event-specific documentation.
|
|
12
|
+
*/
|
|
8
13
|
interface EventSpecMeta extends Omit<OwnerShipMeta, 'docId'> {
|
|
9
|
-
/**
|
|
14
|
+
/** Associated DocBlock identifiers for this event. */
|
|
10
15
|
docId?: DocId[];
|
|
11
16
|
}
|
|
12
17
|
/**
|
|
13
|
-
* Typed event specification.
|
|
14
|
-
*
|
|
18
|
+
* Typed event specification.
|
|
19
|
+
*
|
|
20
|
+
* Declare once, validate payloads at publish time, and guard emissions
|
|
21
|
+
* via the contracts runtime. Events are the backbone of event-driven
|
|
22
|
+
* architectures in ContractSpec.
|
|
23
|
+
*
|
|
24
|
+
* @typeParam T - The SchemaModel type defining the event payload structure
|
|
15
25
|
*/
|
|
16
26
|
interface EventSpec<T extends AnySchemaModel> {
|
|
27
|
+
/** Event metadata including key, version, and ownership. */
|
|
17
28
|
meta: EventSpecMeta;
|
|
18
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* JSON paths to PII fields that should be redacted in logs/exports.
|
|
31
|
+
* @example ['email', 'user.phone', 'billing.address']
|
|
32
|
+
*/
|
|
19
33
|
pii?: string[];
|
|
20
34
|
/** Event payload schema from @contractspec/lib.schema. */
|
|
21
35
|
payload: T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","names":[],"sources":["../../../../contracts/src/events.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.d.ts","names":[],"sources":["../../../../contracts/src/events.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;UAgDiB,aAAA,SAAsB,KAAK;;UAElC;;;;;;;;;;;UAYO,oBAAoB;;QAE7B;;;;;;;WAOG"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import "../ownership.js";
|
|
2
|
+
import { OptionalVersionedSpecRef } from "../versioning/refs.js";
|
|
2
3
|
import "../policy/spec.js";
|
|
3
4
|
import "../telemetry/spec.js";
|
|
4
5
|
import "../registry.js";
|
|
5
6
|
|
|
6
7
|
//#region ../contracts/src/experiments/spec.d.ts
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Reference to an experiment spec.
|
|
11
|
+
* Version is optional; when omitted, refers to the latest version.
|
|
12
|
+
*/
|
|
13
|
+
type ExperimentRef = OptionalVersionedSpecRef;
|
|
11
14
|
//#endregion
|
|
12
15
|
export { ExperimentRef };
|
|
13
16
|
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../contracts/src/experiments/spec.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../contracts/src/experiments/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAaA;;;;KAAY,aAAA,GAAgB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventRef, FeatureModuleMeta, FeatureModuleSpec, OpRef, PresentationRef } from "./types.js";
|
|
1
|
+
import { DataViewRef, EventRef, FeatureModuleMeta, FeatureModuleSpec, FormRef, OpRef, PresentationRef } from "./types.js";
|
|
2
2
|
import "./registry.js";
|
|
3
3
|
import "./install.js";
|
|
4
4
|
import "./validation.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PresentationTarget } from "../presentations/presentations.js";
|
|
2
2
|
import { OwnerShipMeta } from "../ownership.js";
|
|
3
|
+
import { VersionedSpecRef } from "../versioning/refs.js";
|
|
3
4
|
import { CapabilityRef, CapabilityRequirement } from "../capabilities/capabilities.js";
|
|
4
5
|
import "../capabilities/index.js";
|
|
5
6
|
import { ExperimentRef } from "../experiments/spec.js";
|
|
@@ -9,38 +10,31 @@ import "../operations/index.js";
|
|
|
9
10
|
//#region ../contracts/src/features/types.d.ts
|
|
10
11
|
/** Minimal metadata to identify and categorize a feature module. */
|
|
11
12
|
type FeatureModuleMeta = OwnerShipMeta;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/** Presentation version. */
|
|
28
|
-
version: string;
|
|
29
|
-
}
|
|
13
|
+
/**
|
|
14
|
+
* Reference to an operation spec.
|
|
15
|
+
* Uses key (OperationSpec.meta.key) and version (OperationSpec.meta.version).
|
|
16
|
+
*/
|
|
17
|
+
type OpRef = VersionedSpecRef;
|
|
18
|
+
/**
|
|
19
|
+
* Reference to an event spec.
|
|
20
|
+
* Uses key (EventSpec.meta.key) and version (EventSpec.meta.version).
|
|
21
|
+
*/
|
|
22
|
+
type EventRef = VersionedSpecRef;
|
|
23
|
+
/**
|
|
24
|
+
* Reference to a presentation spec.
|
|
25
|
+
* Uses key (PresentationSpec.meta.key) and version (PresentationSpec.meta.version).
|
|
26
|
+
*/
|
|
27
|
+
type PresentationRef = VersionedSpecRef;
|
|
30
28
|
/**
|
|
31
29
|
* Reference to a data view spec.
|
|
30
|
+
* Uses key (DataViewSpec.meta.key) and version (DataViewSpec.meta.version).
|
|
32
31
|
*/
|
|
33
|
-
|
|
34
|
-
key: string;
|
|
35
|
-
version: string;
|
|
36
|
-
}
|
|
32
|
+
type DataViewRef = VersionedSpecRef;
|
|
37
33
|
/**
|
|
38
34
|
* Reference to a form spec.
|
|
35
|
+
* Uses key (FormSpec.meta.key) and version (FormSpec.meta.version).
|
|
39
36
|
*/
|
|
40
|
-
|
|
41
|
-
key: string;
|
|
42
|
-
version: string;
|
|
43
|
-
}
|
|
37
|
+
type FormRef = VersionedSpecRef;
|
|
44
38
|
/** Group operations/events/presentations into an installable feature. */
|
|
45
39
|
interface FeatureModuleSpec {
|
|
46
40
|
meta: FeatureModuleMeta;
|
|
@@ -82,5 +76,5 @@ interface FeatureModuleSpec {
|
|
|
82
76
|
forms?: FormRef[];
|
|
83
77
|
}
|
|
84
78
|
//#endregion
|
|
85
|
-
export { EventRef, FeatureModuleMeta, FeatureModuleSpec, OpRef, PresentationRef };
|
|
79
|
+
export { DataViewRef, EventRef, FeatureModuleMeta, FeatureModuleSpec, FormRef, OpRef, PresentationRef };
|
|
86
80
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../../contracts/src/features/types.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../../contracts/src/features/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAQY,iBAAA,GAAoB;;;AAAhC;AAMA;AAMY,KANA,KAAA,GAAQ,gBAMG;AAMvB;AAMA;AAMA;AAGA;AACQ,KAtBI,QAAA,GAAW,gBAsBf;;;;;AAWO,KA3BH,eAAA,GAAkB,gBA2Bf;;;;;AAmBK,KAxCR,WAAA,GAAc,gBAwCN;;;;;KAlCR,OAAA,GAAU;;UAGL,iBAAA;QACT;;eAEO;;WAEJ;;kBAEO;;gBAEF;;;eAGD;eACA;;;;QAGY;UAAa;;;;;;;;;aAQ3B;;;;;;oBAOO;;cAGN;;UAGJ"}
|
|
@@ -4,6 +4,7 @@ import { DocId } from "./docs/registry.js";
|
|
|
4
4
|
import "./docs/index.js";
|
|
5
5
|
import { Owner, OwnerShipMeta, OwnersEnum, Stability, StabilityEnum, Tag, TagsEnum } from "./ownership.js";
|
|
6
6
|
import "./registry-utils.js";
|
|
7
|
+
import { OptionalVersionedSpecRef, VersionedSpecRef } from "./versioning/refs.js";
|
|
7
8
|
import { PolicyRef } from "./policy/spec.js";
|
|
8
9
|
import "./telemetry/index.js";
|
|
9
10
|
import { CapabilityKind, CapabilityMeta, CapabilityRef, CapabilityRequirement, CapabilitySpec, CapabilitySurface, CapabilitySurfaceRef } from "./capabilities/capabilities.js";
|
|
@@ -14,7 +15,7 @@ import { TestSpecRef } from "./tests/spec.js";
|
|
|
14
15
|
import { EmitDecl, EmitDeclInline, EmitDeclRef, ImplementationRef, ImplementationType, OpKind, OperationSpec, OperationSpecMeta, TelemetryTrigger } from "./operations/operation.js";
|
|
15
16
|
import "./install.js";
|
|
16
17
|
import "./operations/index.js";
|
|
17
|
-
import { EventRef, FeatureModuleMeta, FeatureModuleSpec, OpRef, PresentationRef } from "./features/types.js";
|
|
18
|
+
import { DataViewRef, EventRef, FeatureModuleMeta, FeatureModuleSpec, FormRef, OpRef, PresentationRef } from "./features/types.js";
|
|
18
19
|
import "./presentations/index.js";
|
|
19
20
|
import "./features/index.js";
|
|
20
21
|
import "./data-views/index.js";
|
|
@@ -48,4 +49,5 @@ import "./workflow/index.js";
|
|
|
48
49
|
import "./schema-to-markdown.js";
|
|
49
50
|
import "./llm/index.js";
|
|
50
51
|
import "./app-config/validation.js";
|
|
51
|
-
import "./examples/index.js";
|
|
52
|
+
import "./examples/index.js";
|
|
53
|
+
import "./serialization/index.js";
|
|
@@ -2,58 +2,161 @@ import { DocId } from "./docs/registry.js";
|
|
|
2
2
|
import "./docs/index.js";
|
|
3
3
|
|
|
4
4
|
//#region ../contracts/src/ownership.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Lifecycle stability stages for specs.
|
|
8
|
+
*
|
|
9
|
+
* Specs progress through these stages as they mature:
|
|
10
|
+
* - `idea`: Initial concept, not implemented
|
|
11
|
+
* - `in_creation`: Currently being built
|
|
12
|
+
* - `experimental`: Working but may change significantly
|
|
13
|
+
* - `beta`: Feature-complete, seeking feedback
|
|
14
|
+
* - `stable`: Production-ready, breaking changes require major version bump
|
|
15
|
+
* - `deprecated`: Scheduled for removal, use alternatives
|
|
16
|
+
*/
|
|
5
17
|
declare const StabilityEnum: {
|
|
18
|
+
/** Initial concept, not yet implemented. */
|
|
6
19
|
readonly Idea: "idea";
|
|
20
|
+
/** Currently being built, not ready for use. */
|
|
7
21
|
readonly InCreation: "in_creation";
|
|
22
|
+
/** Working but unstable, may change significantly. */
|
|
8
23
|
readonly Experimental: "experimental";
|
|
24
|
+
/** Feature-complete, seeking feedback before stabilization. */
|
|
9
25
|
readonly Beta: "beta";
|
|
26
|
+
/** Production-ready, follows semantic versioning. */
|
|
10
27
|
readonly Stable: "stable";
|
|
28
|
+
/** Scheduled for removal, use alternatives. */
|
|
11
29
|
readonly Deprecated: "deprecated";
|
|
12
30
|
};
|
|
31
|
+
/** Stability level for a spec's lifecycle stage. */
|
|
13
32
|
type Stability = (typeof StabilityEnum)[keyof typeof StabilityEnum];
|
|
33
|
+
/**
|
|
34
|
+
* Curated owner identifiers for business/product ownership.
|
|
35
|
+
*
|
|
36
|
+
* Used for CODEOWNERS, on-call routing, and approval workflows.
|
|
37
|
+
* Custom owner strings are also allowed for flexibility.
|
|
38
|
+
*/
|
|
14
39
|
declare const OwnersEnum: {
|
|
40
|
+
/** Core platform team. */
|
|
15
41
|
readonly PlatformCore: "platform.core";
|
|
42
|
+
/** Sigil/auth team. */
|
|
16
43
|
readonly PlatformSigil: "platform.sigil";
|
|
44
|
+
/** Marketplace team. */
|
|
17
45
|
readonly PlatformMarketplace: "platform.marketplace";
|
|
46
|
+
/** Messaging/notifications team. */
|
|
18
47
|
readonly PlatformMessaging: "platform.messaging";
|
|
48
|
+
/** Content/CMS team. */
|
|
19
49
|
readonly PlatformContent: "platform.content";
|
|
50
|
+
/** Feature flags team. */
|
|
20
51
|
readonly PlatformFeatureFlags: "platform.featureflags";
|
|
52
|
+
/** Finance/billing team. */
|
|
21
53
|
readonly PlatformFinance: "platform.finance";
|
|
22
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Owner identifier for a spec.
|
|
57
|
+
* Can be a predefined OwnersEnum value or any custom string.
|
|
58
|
+
*/
|
|
23
59
|
type Owner = (typeof OwnersEnum)[keyof typeof OwnersEnum] | (string & {});
|
|
60
|
+
/**
|
|
61
|
+
* Common tags for categorizing specs.
|
|
62
|
+
*
|
|
63
|
+
* Used for search, grouping, and documentation navigation.
|
|
64
|
+
* Custom tag strings are also allowed for flexibility.
|
|
65
|
+
*/
|
|
24
66
|
declare const TagsEnum: {
|
|
67
|
+
/** Spots/locations domain. */
|
|
25
68
|
readonly Spots: "spots";
|
|
69
|
+
/** Collectivity/community domain. */
|
|
26
70
|
readonly Collectivity: "collectivity";
|
|
71
|
+
/** Marketplace domain. */
|
|
27
72
|
readonly Marketplace: "marketplace";
|
|
73
|
+
/** Seller-related features. */
|
|
28
74
|
readonly Sellers: "sellers";
|
|
75
|
+
/** Authentication features. */
|
|
29
76
|
readonly Auth: "auth";
|
|
77
|
+
/** Login flows. */
|
|
30
78
|
readonly Login: "login";
|
|
79
|
+
/** Signup flows. */
|
|
31
80
|
readonly Signup: "signup";
|
|
81
|
+
/** Onboarding/guides. */
|
|
32
82
|
readonly Guide: "guide";
|
|
83
|
+
/** Documentation. */
|
|
33
84
|
readonly Docs: "docs";
|
|
85
|
+
/** Internationalization. */
|
|
34
86
|
readonly I18n: "i18n";
|
|
87
|
+
/** Incident management. */
|
|
35
88
|
readonly Incident: "incident";
|
|
89
|
+
/** Automation/workflows. */
|
|
36
90
|
readonly Automation: "automation";
|
|
91
|
+
/** Code hygiene/maintenance. */
|
|
37
92
|
readonly Hygiene: "hygiene";
|
|
38
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* Tag for categorizing a spec.
|
|
96
|
+
* Can be a predefined TagsEnum value or any custom string.
|
|
97
|
+
*/
|
|
39
98
|
type Tag = (typeof TagsEnum)[keyof typeof TagsEnum] | (string & {});
|
|
99
|
+
/**
|
|
100
|
+
* Common metadata interface for all ContractSpec specifications.
|
|
101
|
+
*
|
|
102
|
+
* Every spec type (operations, events, presentations, etc.) extends this
|
|
103
|
+
* interface to provide consistent ownership, versioning, and discoverability.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```typescript
|
|
107
|
+
* const meta: OwnerShipMeta = {
|
|
108
|
+
* key: 'auth.login',
|
|
109
|
+
* version: '1.0.0',
|
|
110
|
+
* description: 'Authenticates a user with email and password',
|
|
111
|
+
* stability: StabilityEnum.Stable,
|
|
112
|
+
* owners: [OwnersEnum.PlatformSigil],
|
|
113
|
+
* tags: [TagsEnum.Auth, TagsEnum.Login],
|
|
114
|
+
* };
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
40
117
|
interface OwnerShipMeta {
|
|
41
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* Semantic version string (e.g., "1.0.0").
|
|
120
|
+
* Bump for breaking changes according to semver rules.
|
|
121
|
+
*/
|
|
42
122
|
version: string;
|
|
43
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Fully-qualified spec key (e.g., "sigil.beginSignup", "user.created").
|
|
125
|
+
* Must be unique within the spec type.
|
|
126
|
+
*/
|
|
44
127
|
key: string;
|
|
45
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* Human-friendly title (e.g., "Begin Signup").
|
|
130
|
+
* Used in documentation and UI.
|
|
131
|
+
*/
|
|
46
132
|
title?: string;
|
|
47
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* Short human-friendly summary of what this spec does.
|
|
135
|
+
* Should be concise (1-2 sentences).
|
|
136
|
+
*/
|
|
48
137
|
description: string;
|
|
138
|
+
/**
|
|
139
|
+
* Business domain this spec belongs to (e.g., "auth", "marketplace").
|
|
140
|
+
* Used for grouping and discovery.
|
|
141
|
+
*/
|
|
49
142
|
domain?: string;
|
|
50
|
-
/**
|
|
143
|
+
/**
|
|
144
|
+
* Lifecycle stability marker.
|
|
145
|
+
* Indicates maturity level and change expectations.
|
|
146
|
+
*/
|
|
51
147
|
stability: Stability;
|
|
52
|
-
/**
|
|
148
|
+
/**
|
|
149
|
+
* Team/individual owners responsible for this spec.
|
|
150
|
+
* Used for CODEOWNERS, on-call routing, and approvals.
|
|
151
|
+
*/
|
|
53
152
|
owners: Owner[];
|
|
54
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* Tags for search, grouping, and documentation navigation.
|
|
155
|
+
*/
|
|
55
156
|
tags: Tag[];
|
|
56
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* Associated DocBlock identifiers for documentation linkage.
|
|
159
|
+
*/
|
|
57
160
|
docId?: DocId[];
|
|
58
161
|
}
|
|
59
162
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ownership.d.ts","names":[],"sources":["../../../../contracts/src/ownership.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ownership.d.ts","names":[],"sources":["../../../../contracts/src/ownership.ts"],"sourcesContent":[],"mappings":";;;;;AA6HA;AA2BA;;;;;;;;;;cA9Ha;;;;;;;;;;;;;;;KAgBD,SAAA,WAAoB,4BAA4B;;;;;;;cAY/C;;;;;;;;;;;;;;;;;;;;KAqBD,KAAA,WACA,yBAAyB;;;;;;;cAgBxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCD,GAAA,WAAc,uBAAuB;;;;;;;;;;;;;;;;;;;UA2BhC,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAmCJ;;;;;UAMH;;;;QAKF;;;;UAKE"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import "../ownership.js";
|
|
2
|
+
import { VersionedSpecRef } from "../versioning/refs.js";
|
|
2
3
|
|
|
3
4
|
//#region ../contracts/src/policy/spec.d.ts
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Reference to a policy spec.
|
|
8
|
+
* Uses key and version to identify a specific policy.
|
|
9
|
+
*/
|
|
10
|
+
type PolicyRef = VersionedSpecRef;
|
|
9
11
|
//#endregion
|
|
10
12
|
export { PolicyRef };
|
|
11
13
|
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../contracts/src/policy/spec.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../contracts/src/policy/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAyHY,SAAA,GAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./serializers.js";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import "../ownership.js";
|
|
2
|
+
import { OptionalVersionedSpecRef } from "../versioning/refs.js";
|
|
2
3
|
|
|
3
4
|
//#region ../contracts/src/tests/spec.d.ts
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Reference to a test spec.
|
|
8
|
+
* Version is optional; when omitted, refers to the latest version.
|
|
9
|
+
*/
|
|
10
|
+
type TestSpecRef = OptionalVersionedSpecRef;
|
|
9
11
|
//#endregion
|
|
10
12
|
export { TestSpecRef };
|
|
11
13
|
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../contracts/src/tests/spec.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../contracts/src/tests/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAwFY,WAAA,GAAc"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region ../contracts/src/versioning/refs.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Base reference types for ContractSpec versioning.
|
|
4
|
+
*
|
|
5
|
+
* Provides canonical reference types for linking between specs.
|
|
6
|
+
* Domain-specific refs (OpRef, EventRef, etc.) should alias these
|
|
7
|
+
* base types for consistency and maintainability.
|
|
8
|
+
*
|
|
9
|
+
* @module versioning/refs
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Base reference type for versioned specs.
|
|
13
|
+
* Used to reference any spec by its key and version.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const opRef: VersionedSpecRef = { key: 'auth.login', version: '1.0.0' };
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
interface VersionedSpecRef {
|
|
21
|
+
/** Unique key identifying the spec (e.g., "auth.login", "user.created"). */
|
|
22
|
+
key: string;
|
|
23
|
+
/** Semantic version of the spec (e.g., "1.0.0", "2.1.0"). */
|
|
24
|
+
version: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Base reference type for specs with optional version.
|
|
28
|
+
* When version is omitted, typically refers to the latest version.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* // Reference to latest version
|
|
33
|
+
* const latestRef: OptionalVersionedSpecRef = { key: 'auth.login' };
|
|
34
|
+
*
|
|
35
|
+
* // Reference to specific version
|
|
36
|
+
* const specificRef: OptionalVersionedSpecRef = { key: 'auth.login', version: '1.0.0' };
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
interface OptionalVersionedSpecRef {
|
|
40
|
+
/** Unique key identifying the spec. */
|
|
41
|
+
key: string;
|
|
42
|
+
/** Optional semantic version. When omitted, refers to the latest version. */
|
|
43
|
+
version?: string;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { OptionalVersionedSpecRef, VersionedSpecRef };
|
|
47
|
+
//# sourceMappingURL=refs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refs.d.ts","names":[],"sources":["../../../../../contracts/src/versioning/refs.ts"],"sourcesContent":[],"mappings":";;AAuBA;AAoBA;;;;;;;;;;;;;;;;UApBiB,gBAAA;;;;;;;;;;;;;;;;;;;UAoBA,wBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldType.d.ts","names":[],"sources":["../../../../schema/src/FieldType.ts"],"sourcesContent":[],"mappings":";;;;UAGiB,uCAEH,mBACJ,wBAAwB,WAAW;OACtC,CAAA,CAAE,QAAQ;EAJA,UAAA,EAAA,OAAe,GAAA,CAAA,GAAA,GAAA,OAAA,CAAA;;AAGE,KAMtB,YAAA,GAAe,SANO,CAAA,GAAA,EAAA,GAAA,CAAA;;;;;;AAMtB,cAOC,SAPW,
|
|
1
|
+
{"version":3,"file":"FieldType.d.ts","names":[],"sources":["../../../../schema/src/FieldType.ts"],"sourcesContent":[],"mappings":";;;;UAGiB,uCAEH,mBACJ,wBAAwB,WAAW;OACtC,CAAA,CAAE,QAAQ;EAJA,UAAA,EAAA,OAAe,GAAA,CAAA,GAAA,GAAA,OAAA,CAAA;;AAGE,KAMtB,YAAA,GAAe,SANO,CAAA,GAAA,EAAA,GAAA,CAAA;;;;;;AAMtB,cAOC,SAPW,CAAG,SAAA,EAAS,YAStB,SATsB,CAAA,SAU1B,iBAV0B,CAUR,SAVQ,EAUG,SAVH,CAAA,CAAA;EAOvB,QAAA,SAAS;EAER,iBAAA,aAAA;EACc,WAAA,CAAA,MAAA,EAIN,eAJM,CAIU,SAJV,EAIqB,SAJrB,CAAA;EAAW;EAID,MAAA,CAAA,CAAA,EAO1B,CAAA,CAAE,OAPwB,CAOhB,SAPgB,CAAA;EAAW;EAA3B,SAAA,CAAA,CAAA,EAYP,iBAZO,CAYW,SAZX,EAYsB,SAZtB,CAAA;EAOA;EAAR,OAAA,CAAA,CAAA,EAAA,OAAA;EAKmB,gBAAA,CAAA,CAAA,EAAA,OAAA,GAAA,CAAA,GAAA,GAAA,OAAA,CAAA;EAAW,aAAA,CAAA,CAAA,EAAA,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/lib.feature-flags",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.50.0",
|
|
4
4
|
"description": "Feature flags and experiments module for ContractSpec applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"lint:check": "eslint src"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@contractspec/lib.schema": "1.
|
|
28
|
-
"@contractspec/lib.contracts": "1.
|
|
27
|
+
"@contractspec/lib.schema": "1.50.0",
|
|
28
|
+
"@contractspec/lib.contracts": "1.50.0",
|
|
29
29
|
"zod": "^4.3.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@contractspec/tool.typescript": "1.
|
|
33
|
-
"@contractspec/tool.tsdown": "1.
|
|
32
|
+
"@contractspec/tool.typescript": "1.50.0",
|
|
33
|
+
"@contractspec/tool.tsdown": "1.50.0",
|
|
34
34
|
"typescript": "^5.9.3"
|
|
35
35
|
},
|
|
36
36
|
"exports": {
|