@flagshark/core 1.5.0 → 2.1.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/README.md +8 -6
- package/dist/config/schema.d.ts +112 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +64 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/detection/detectors/typescript.d.ts.map +1 -1
- package/dist/detection/detectors/typescript.js +41 -0
- package/dist/detection/detectors/typescript.js.map +1 -1
- package/dist/detection/feature-flag.d.ts +28 -0
- package/dist/detection/feature-flag.d.ts.map +1 -1
- package/dist/detection/helpers.d.ts +16 -0
- package/dist/detection/helpers.d.ts.map +1 -1
- package/dist/detection/helpers.js +117 -6
- package/dist/detection/helpers.js.map +1 -1
- package/dist/detection/import-graph.d.ts +234 -0
- package/dist/detection/import-graph.d.ts.map +1 -0
- package/dist/detection/import-graph.js +641 -0
- package/dist/detection/import-graph.js.map +1 -0
- package/dist/detection/interface.d.ts +57 -0
- package/dist/detection/interface.d.ts.map +1 -1
- package/dist/detection/interface.js.map +1 -1
- package/dist/detection/polyglot-analyzer.d.ts +8 -0
- package/dist/detection/polyglot-analyzer.d.ts.map +1 -1
- package/dist/detection/polyglot-analyzer.js +2 -0
- package/dist/detection/polyglot-analyzer.js.map +1 -1
- package/dist/detection/tree-sitter/engine.d.ts.map +1 -1
- package/dist/detection/tree-sitter/engine.js +62 -15
- package/dist/detection/tree-sitter/engine.js.map +1 -1
- package/dist/detection/tree-sitter/parser-cache.d.ts +20 -0
- package/dist/detection/tree-sitter/parser-cache.d.ts.map +1 -1
- package/dist/detection/tree-sitter/parser-cache.js +32 -1
- package/dist/detection/tree-sitter/parser-cache.js.map +1 -1
- package/dist/output/json.d.ts.map +1 -1
- package/dist/output/json.js +28 -0
- package/dist/output/json.js.map +1 -1
- package/dist/output/markdown.d.ts.map +1 -1
- package/dist/output/markdown.js +47 -1
- package/dist/output/markdown.js.map +1 -1
- package/dist/output/text.d.ts.map +1 -1
- package/dist/output/text.js +85 -0
- package/dist/output/text.js.map +1 -1
- package/dist/providers/cross-reference.d.ts +24 -2
- package/dist/providers/cross-reference.d.ts.map +1 -1
- package/dist/providers/cross-reference.js +74 -7
- package/dist/providers/cross-reference.js.map +1 -1
- package/dist/providers/interface.d.ts +89 -2
- package/dist/providers/interface.d.ts.map +1 -1
- package/dist/providers/launchdarkly/client.d.ts +12 -0
- package/dist/providers/launchdarkly/client.d.ts.map +1 -1
- package/dist/providers/launchdarkly/client.js +163 -23
- package/dist/providers/launchdarkly/client.js.map +1 -1
- package/dist/providers/launchdarkly/types.d.ts +286 -0
- package/dist/providers/launchdarkly/types.d.ts.map +1 -1
- package/dist/providers/launchdarkly/types.js +56 -0
- package/dist/providers/launchdarkly/types.js.map +1 -1
- package/dist/providers/orchestrate.d.ts +34 -2
- package/dist/providers/orchestrate.d.ts.map +1 -1
- package/dist/providers/orchestrate.js +59 -7
- package/dist/providers/orchestrate.js.map +1 -1
- package/dist/scan-repo.d.ts +30 -2
- package/dist/scan-repo.d.ts.map +1 -1
- package/dist/scan-repo.js +290 -4
- package/dist/scan-repo.js.map +1 -1
- package/dist/staleness.d.ts +33 -3
- package/dist/staleness.d.ts.map +1 -1
- package/dist/staleness.js +60 -13
- package/dist/staleness.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,44 +1,184 @@
|
|
|
1
|
-
import { FlagsResponseSchema } from './types.js';
|
|
1
|
+
import { FlagsResponseSchema, FlagStatusesResponseSchema, MembersResponseSchema, } from './types.js';
|
|
2
2
|
import { LdApiError } from './errors.js';
|
|
3
3
|
const DEFAULT_API_BASE = 'https://app.launchdarkly.com';
|
|
4
4
|
const LD_API_VERSION = '20240415';
|
|
5
|
+
/**
|
|
6
|
+
* Fetches every flag in `config.project` (active + archived), then enriches
|
|
7
|
+
* the result with platform-side signals from two auxiliary LD endpoints:
|
|
8
|
+
*
|
|
9
|
+
* /api/v2/flag-statuses/{project}/{env} → status + lastRequested
|
|
10
|
+
* /api/v2/members?limit=500 → maintainer name resolution
|
|
11
|
+
*
|
|
12
|
+
* Both auxiliary calls are best-effort: if they fail (e.g. token lacks
|
|
13
|
+
* permission, network blip), we log via thrown LdApiError only for the
|
|
14
|
+
* primary /flags request. Aux failures are swallowed so the core
|
|
15
|
+
* cross-reference path still functions with partial data.
|
|
16
|
+
*/
|
|
5
17
|
export async function fetchAllFlags(config, opts = {}) {
|
|
6
18
|
const fetchFn = opts.fetch ?? globalThis.fetch;
|
|
7
19
|
const apiBase = opts.apiBase ?? DEFAULT_API_BASE;
|
|
8
20
|
const out = [];
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
// LD's list endpoint EXCLUDES archived flags by default; passing
|
|
22
|
+
// `archived=true` flips it to return ONLY archived flags. There is no
|
|
23
|
+
// "both" mode in the v2 API. So we make two pagination passes — one
|
|
24
|
+
// for active, one for archived — and union the results. Without this,
|
|
25
|
+
// any flag archived in LD silently surfaces as `missing-in-platform`
|
|
26
|
+
// (the exact opposite of `archived-in-platform`), defeating the
|
|
27
|
+
// archived-flag signal entirely.
|
|
28
|
+
const headers = { Authorization: config.token, 'LD-API-Version': LD_API_VERSION };
|
|
29
|
+
const maintainerIds = new Set();
|
|
30
|
+
for (const archivedOnly of [false, true]) {
|
|
31
|
+
let path = buildFirstPath(config.project, config.environment, archivedOnly);
|
|
32
|
+
while (path) {
|
|
33
|
+
const res = await fetchFn(new URL(path, apiBase), { headers, signal: opts.signal });
|
|
34
|
+
if (!res.ok) {
|
|
35
|
+
throw new LdApiError(`LaunchDarkly API ${res.status} ${res.statusText}`, res.status);
|
|
36
|
+
}
|
|
37
|
+
const json = await res.json();
|
|
38
|
+
const parsed = FlagsResponseSchema.parse(json);
|
|
39
|
+
for (const item of parsed.items) {
|
|
40
|
+
const envData = item.environments?.[config.environment];
|
|
41
|
+
if (item.maintainerId)
|
|
42
|
+
maintainerIds.add(item.maintainerId);
|
|
43
|
+
out.push({
|
|
44
|
+
key: item.key,
|
|
45
|
+
archived: item.archived,
|
|
46
|
+
lastModified: envData?.lastModified != null ? new Date(envData.lastModified) : null,
|
|
47
|
+
// LD's `temporary` is true when the user wants the flag removed
|
|
48
|
+
// eventually, false when it's permanent. We invert so downstream
|
|
49
|
+
// logic doesn't have to re-reason the polarity every time.
|
|
50
|
+
permanent: !item.temporary,
|
|
51
|
+
createdAt: item.creationDate != null ? new Date(item.creationDate) : null,
|
|
52
|
+
tags: item.tags,
|
|
53
|
+
// Resolved below from the /members lookup; left as the opaque id
|
|
54
|
+
// for now so the producer/consumer split stays clean.
|
|
55
|
+
maintainer: item.maintainerId,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
path = parsed._links?.next?.href;
|
|
20
59
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
60
|
+
}
|
|
61
|
+
// Aux 1: resolve maintainer IDs → "First Last <email>" display strings.
|
|
62
|
+
// Single batch request, best-effort. If the token lacks /members read
|
|
63
|
+
// permission (Reader role doesn't include it on some LD orgs), we
|
|
64
|
+
// leave the opaque ID in place rather than fail the whole scan.
|
|
65
|
+
if (maintainerIds.size > 0) {
|
|
66
|
+
const members = await fetchMembersMap(apiBase, headers, fetchFn, opts.signal);
|
|
67
|
+
if (members) {
|
|
68
|
+
for (const flag of out) {
|
|
69
|
+
if (flag.maintainer && members.has(flag.maintainer)) {
|
|
70
|
+
flag.maintainer = members.get(flag.maintainer);
|
|
71
|
+
}
|
|
72
|
+
else if (flag.maintainer) {
|
|
73
|
+
// Couldn't resolve — drop the opaque ID rather than display it.
|
|
74
|
+
flag.maintainer = undefined;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// Members lookup failed entirely — strip the opaque IDs so they
|
|
80
|
+
// don't leak into output as garbled-looking strings.
|
|
81
|
+
for (const flag of out) {
|
|
82
|
+
if (flag.maintainer)
|
|
83
|
+
flag.maintainer = undefined;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// Aux 2: fetch the per-environment flag-status verdict (LD's own
|
|
88
|
+
// staleness: 'new' / 'active' / 'inactive' / 'launched'). Cross-reference
|
|
89
|
+
// turns these into platform-inactive / platform-launched signals.
|
|
90
|
+
const statuses = await fetchFlagStatuses(config.project, config.environment, apiBase, headers, fetchFn, opts.signal);
|
|
91
|
+
if (statuses) {
|
|
92
|
+
for (const flag of out) {
|
|
93
|
+
const s = statuses.get(flag.key);
|
|
94
|
+
if (s) {
|
|
95
|
+
flag.status = s.name;
|
|
96
|
+
flag.lastRequested = s.lastRequested;
|
|
97
|
+
}
|
|
30
98
|
}
|
|
31
|
-
path = parsed._links?.next?.href;
|
|
32
99
|
}
|
|
33
100
|
return out;
|
|
34
101
|
}
|
|
35
|
-
function buildFirstPath(project, environment) {
|
|
102
|
+
function buildFirstPath(project, environment, archived = false) {
|
|
36
103
|
const params = new URLSearchParams({
|
|
37
104
|
env: environment,
|
|
38
105
|
limit: '100',
|
|
39
106
|
offset: '0',
|
|
40
107
|
summary: '1',
|
|
41
108
|
});
|
|
109
|
+
if (archived)
|
|
110
|
+
params.set('archived', 'true');
|
|
42
111
|
return `/api/v2/flags/${encodeURIComponent(project)}?${params.toString()}`;
|
|
43
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Best-effort fetch of every LD member, returning a map from member ID
|
|
115
|
+
* to "First Last <email>" display string. Returns null when the API
|
|
116
|
+
* rejects the request (typically: token lacks /members read scope).
|
|
117
|
+
* Caller handles null by leaving maintainer fields unresolved.
|
|
118
|
+
*/
|
|
119
|
+
async function fetchMembersMap(apiBase, headers, fetchFn, signal) {
|
|
120
|
+
try {
|
|
121
|
+
const url = new URL('/api/v2/members?limit=500', apiBase);
|
|
122
|
+
const res = await fetchFn(url, { headers, signal });
|
|
123
|
+
if (!res.ok)
|
|
124
|
+
return null;
|
|
125
|
+
const parsed = MembersResponseSchema.parse(await res.json());
|
|
126
|
+
const map = new Map();
|
|
127
|
+
for (const m of parsed.items) {
|
|
128
|
+
const name = [m.firstName, m.lastName].filter((s) => s).join(' ').trim();
|
|
129
|
+
const display = name ? `${name} <${m.email}>` : m.email;
|
|
130
|
+
map.set(m._id, display);
|
|
131
|
+
}
|
|
132
|
+
return map;
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
/* v8 ignore start — defensive catch for malformed JSON / schema
|
|
136
|
+
drift; not exercised by current fixtures. */
|
|
137
|
+
return null;
|
|
138
|
+
/* v8 ignore stop */
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Best-effort fetch of LD's per-environment flag-status verdicts for
|
|
143
|
+
* every flag in the project. Returns a Map keyed by flag key whose
|
|
144
|
+
* values include LD's own staleness verdict (`name`) and the
|
|
145
|
+
* lastRequested timestamp. Returns null when the API rejects the
|
|
146
|
+
* request — cross-reference falls back to its non-status code paths.
|
|
147
|
+
*
|
|
148
|
+
* The parent-link parsing extracts the flag key from
|
|
149
|
+
* `/api/v2/flags/{project}/{flagKey}` — LD doesn't return the key
|
|
150
|
+
* inline on each status item.
|
|
151
|
+
*/
|
|
152
|
+
async function fetchFlagStatuses(project, environment, apiBase, headers, fetchFn, signal) {
|
|
153
|
+
try {
|
|
154
|
+
const url = new URL(`/api/v2/flag-statuses/${encodeURIComponent(project)}/${encodeURIComponent(environment)}`, apiBase);
|
|
155
|
+
const res = await fetchFn(url, { headers, signal });
|
|
156
|
+
if (!res.ok)
|
|
157
|
+
return null;
|
|
158
|
+
const parsed = FlagStatusesResponseSchema.parse(await res.json());
|
|
159
|
+
const out = new Map();
|
|
160
|
+
for (const item of parsed.items) {
|
|
161
|
+
/* v8 ignore start — defensive guards against LD responses without
|
|
162
|
+
a parent link or with malformed hrefs; production LD always
|
|
163
|
+
sends a well-formed href on this endpoint, but we'd rather
|
|
164
|
+
skip a single item than fail the whole batch on contract drift. */
|
|
165
|
+
const href = item._links?.parent?.href ?? '';
|
|
166
|
+
const key = href.includes('/') ? href.slice(href.lastIndexOf('/') + 1) : '';
|
|
167
|
+
if (!key)
|
|
168
|
+
continue;
|
|
169
|
+
/* v8 ignore stop */
|
|
170
|
+
out.set(key, {
|
|
171
|
+
name: item.name,
|
|
172
|
+
lastRequested: item.lastRequested ? new Date(item.lastRequested) : null,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return out;
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
/* v8 ignore start — defensive catch for malformed JSON / schema
|
|
179
|
+
drift; not exercised by current fixtures. */
|
|
180
|
+
return null;
|
|
181
|
+
/* v8 ignore stop */
|
|
182
|
+
}
|
|
183
|
+
}
|
|
44
184
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/providers/launchdarkly/client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/providers/launchdarkly/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGxC,MAAM,gBAAgB,GAAG,8BAA8B,CAAA;AACvD,MAAM,cAAc,GAAG,UAAU,CAAA;AAcjC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAA2B,EAC3B,OAA6B,EAAE;IAE/B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,CAAA;IAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI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lagsResponseSchema: z.ZodObject<{
|
|
|
3
3
|
items: z.ZodArray<z.ZodObject<{
|
|
4
4
|
key: z.ZodString;
|
|
5
5
|
archived: z.ZodBoolean;
|
|
6
|
+
temporary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
9
|
+
maintainerId: z.ZodOptional<z.ZodString>;
|
|
6
10
|
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
7
11
|
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
8
12
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -13,6 +17,10 @@ export declare const FlagsResponseSchema: z.ZodObject<{
|
|
|
13
17
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
14
18
|
key: z.ZodString;
|
|
15
19
|
archived: z.ZodBoolean;
|
|
20
|
+
temporary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
21
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
23
|
+
maintainerId: z.ZodOptional<z.ZodString>;
|
|
16
24
|
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
17
25
|
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
18
26
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -23,6 +31,10 @@ export declare const FlagsResponseSchema: z.ZodObject<{
|
|
|
23
31
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
24
32
|
key: z.ZodString;
|
|
25
33
|
archived: z.ZodBoolean;
|
|
34
|
+
temporary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
35
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
37
|
+
maintainerId: z.ZodOptional<z.ZodString>;
|
|
26
38
|
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
27
39
|
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
28
40
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -53,6 +65,10 @@ export declare const FlagsResponseSchema: z.ZodObject<{
|
|
|
53
65
|
items: z.ZodArray<z.ZodObject<{
|
|
54
66
|
key: z.ZodString;
|
|
55
67
|
archived: z.ZodBoolean;
|
|
68
|
+
temporary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
69
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
71
|
+
maintainerId: z.ZodOptional<z.ZodString>;
|
|
56
72
|
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
57
73
|
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
58
74
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -63,6 +79,10 @@ export declare const FlagsResponseSchema: z.ZodObject<{
|
|
|
63
79
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
64
80
|
key: z.ZodString;
|
|
65
81
|
archived: z.ZodBoolean;
|
|
82
|
+
temporary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
83
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
85
|
+
maintainerId: z.ZodOptional<z.ZodString>;
|
|
66
86
|
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
67
87
|
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
68
88
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -73,6 +93,10 @@ export declare const FlagsResponseSchema: z.ZodObject<{
|
|
|
73
93
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
74
94
|
key: z.ZodString;
|
|
75
95
|
archived: z.ZodBoolean;
|
|
96
|
+
temporary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
97
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
99
|
+
maintainerId: z.ZodOptional<z.ZodString>;
|
|
76
100
|
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
77
101
|
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
78
102
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -103,6 +127,10 @@ export declare const FlagsResponseSchema: z.ZodObject<{
|
|
|
103
127
|
items: z.ZodArray<z.ZodObject<{
|
|
104
128
|
key: z.ZodString;
|
|
105
129
|
archived: z.ZodBoolean;
|
|
130
|
+
temporary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
131
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
133
|
+
maintainerId: z.ZodOptional<z.ZodString>;
|
|
106
134
|
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
107
135
|
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
108
136
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -113,6 +141,10 @@ export declare const FlagsResponseSchema: z.ZodObject<{
|
|
|
113
141
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
114
142
|
key: z.ZodString;
|
|
115
143
|
archived: z.ZodBoolean;
|
|
144
|
+
temporary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
145
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
147
|
+
maintainerId: z.ZodOptional<z.ZodString>;
|
|
116
148
|
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
117
149
|
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
118
150
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -123,6 +155,10 @@ export declare const FlagsResponseSchema: z.ZodObject<{
|
|
|
123
155
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
124
156
|
key: z.ZodString;
|
|
125
157
|
archived: z.ZodBoolean;
|
|
158
|
+
temporary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
159
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
161
|
+
maintainerId: z.ZodOptional<z.ZodString>;
|
|
126
162
|
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
127
163
|
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
128
164
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -151,4 +187,254 @@ export declare const FlagsResponseSchema: z.ZodObject<{
|
|
|
151
187
|
}>>;
|
|
152
188
|
}, z.ZodTypeAny, "passthrough">>;
|
|
153
189
|
export type FlagsResponse = z.infer<typeof FlagsResponseSchema>;
|
|
190
|
+
export declare const FlagStatusesResponseSchema: z.ZodObject<{
|
|
191
|
+
items: z.ZodArray<z.ZodObject<{
|
|
192
|
+
name: z.ZodEnum<["new", "active", "inactive", "launched"]>;
|
|
193
|
+
lastRequested: z.ZodNullable<z.ZodString>;
|
|
194
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
195
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
196
|
+
href: z.ZodString;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
href: string;
|
|
199
|
+
}, {
|
|
200
|
+
href: string;
|
|
201
|
+
}>>;
|
|
202
|
+
}, "strip", z.ZodTypeAny, {
|
|
203
|
+
parent?: {
|
|
204
|
+
href: string;
|
|
205
|
+
} | undefined;
|
|
206
|
+
}, {
|
|
207
|
+
parent?: {
|
|
208
|
+
href: string;
|
|
209
|
+
} | undefined;
|
|
210
|
+
}>>;
|
|
211
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
212
|
+
name: z.ZodEnum<["new", "active", "inactive", "launched"]>;
|
|
213
|
+
lastRequested: z.ZodNullable<z.ZodString>;
|
|
214
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
215
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
216
|
+
href: z.ZodString;
|
|
217
|
+
}, "strip", z.ZodTypeAny, {
|
|
218
|
+
href: string;
|
|
219
|
+
}, {
|
|
220
|
+
href: string;
|
|
221
|
+
}>>;
|
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
parent?: {
|
|
224
|
+
href: string;
|
|
225
|
+
} | undefined;
|
|
226
|
+
}, {
|
|
227
|
+
parent?: {
|
|
228
|
+
href: string;
|
|
229
|
+
} | undefined;
|
|
230
|
+
}>>;
|
|
231
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
232
|
+
name: z.ZodEnum<["new", "active", "inactive", "launched"]>;
|
|
233
|
+
lastRequested: z.ZodNullable<z.ZodString>;
|
|
234
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
235
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
236
|
+
href: z.ZodString;
|
|
237
|
+
}, "strip", z.ZodTypeAny, {
|
|
238
|
+
href: string;
|
|
239
|
+
}, {
|
|
240
|
+
href: string;
|
|
241
|
+
}>>;
|
|
242
|
+
}, "strip", z.ZodTypeAny, {
|
|
243
|
+
parent?: {
|
|
244
|
+
href: string;
|
|
245
|
+
} | undefined;
|
|
246
|
+
}, {
|
|
247
|
+
parent?: {
|
|
248
|
+
href: string;
|
|
249
|
+
} | undefined;
|
|
250
|
+
}>>;
|
|
251
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
252
|
+
_links: z.ZodOptional<z.ZodUnknown>;
|
|
253
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
254
|
+
items: z.ZodArray<z.ZodObject<{
|
|
255
|
+
name: z.ZodEnum<["new", "active", "inactive", "launched"]>;
|
|
256
|
+
lastRequested: z.ZodNullable<z.ZodString>;
|
|
257
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
258
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
259
|
+
href: z.ZodString;
|
|
260
|
+
}, "strip", z.ZodTypeAny, {
|
|
261
|
+
href: string;
|
|
262
|
+
}, {
|
|
263
|
+
href: string;
|
|
264
|
+
}>>;
|
|
265
|
+
}, "strip", z.ZodTypeAny, {
|
|
266
|
+
parent?: {
|
|
267
|
+
href: string;
|
|
268
|
+
} | undefined;
|
|
269
|
+
}, {
|
|
270
|
+
parent?: {
|
|
271
|
+
href: string;
|
|
272
|
+
} | undefined;
|
|
273
|
+
}>>;
|
|
274
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
275
|
+
name: z.ZodEnum<["new", "active", "inactive", "launched"]>;
|
|
276
|
+
lastRequested: z.ZodNullable<z.ZodString>;
|
|
277
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
278
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
279
|
+
href: z.ZodString;
|
|
280
|
+
}, "strip", z.ZodTypeAny, {
|
|
281
|
+
href: string;
|
|
282
|
+
}, {
|
|
283
|
+
href: string;
|
|
284
|
+
}>>;
|
|
285
|
+
}, "strip", z.ZodTypeAny, {
|
|
286
|
+
parent?: {
|
|
287
|
+
href: string;
|
|
288
|
+
} | undefined;
|
|
289
|
+
}, {
|
|
290
|
+
parent?: {
|
|
291
|
+
href: string;
|
|
292
|
+
} | undefined;
|
|
293
|
+
}>>;
|
|
294
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
295
|
+
name: z.ZodEnum<["new", "active", "inactive", "launched"]>;
|
|
296
|
+
lastRequested: z.ZodNullable<z.ZodString>;
|
|
297
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
298
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
299
|
+
href: z.ZodString;
|
|
300
|
+
}, "strip", z.ZodTypeAny, {
|
|
301
|
+
href: string;
|
|
302
|
+
}, {
|
|
303
|
+
href: string;
|
|
304
|
+
}>>;
|
|
305
|
+
}, "strip", z.ZodTypeAny, {
|
|
306
|
+
parent?: {
|
|
307
|
+
href: string;
|
|
308
|
+
} | undefined;
|
|
309
|
+
}, {
|
|
310
|
+
parent?: {
|
|
311
|
+
href: string;
|
|
312
|
+
} | undefined;
|
|
313
|
+
}>>;
|
|
314
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
315
|
+
_links: z.ZodOptional<z.ZodUnknown>;
|
|
316
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
317
|
+
items: z.ZodArray<z.ZodObject<{
|
|
318
|
+
name: z.ZodEnum<["new", "active", "inactive", "launched"]>;
|
|
319
|
+
lastRequested: z.ZodNullable<z.ZodString>;
|
|
320
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
321
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
322
|
+
href: z.ZodString;
|
|
323
|
+
}, "strip", z.ZodTypeAny, {
|
|
324
|
+
href: string;
|
|
325
|
+
}, {
|
|
326
|
+
href: string;
|
|
327
|
+
}>>;
|
|
328
|
+
}, "strip", z.ZodTypeAny, {
|
|
329
|
+
parent?: {
|
|
330
|
+
href: string;
|
|
331
|
+
} | undefined;
|
|
332
|
+
}, {
|
|
333
|
+
parent?: {
|
|
334
|
+
href: string;
|
|
335
|
+
} | undefined;
|
|
336
|
+
}>>;
|
|
337
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
338
|
+
name: z.ZodEnum<["new", "active", "inactive", "launched"]>;
|
|
339
|
+
lastRequested: z.ZodNullable<z.ZodString>;
|
|
340
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
341
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
342
|
+
href: z.ZodString;
|
|
343
|
+
}, "strip", z.ZodTypeAny, {
|
|
344
|
+
href: string;
|
|
345
|
+
}, {
|
|
346
|
+
href: string;
|
|
347
|
+
}>>;
|
|
348
|
+
}, "strip", z.ZodTypeAny, {
|
|
349
|
+
parent?: {
|
|
350
|
+
href: string;
|
|
351
|
+
} | undefined;
|
|
352
|
+
}, {
|
|
353
|
+
parent?: {
|
|
354
|
+
href: string;
|
|
355
|
+
} | undefined;
|
|
356
|
+
}>>;
|
|
357
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
358
|
+
name: z.ZodEnum<["new", "active", "inactive", "launched"]>;
|
|
359
|
+
lastRequested: z.ZodNullable<z.ZodString>;
|
|
360
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
361
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
362
|
+
href: z.ZodString;
|
|
363
|
+
}, "strip", z.ZodTypeAny, {
|
|
364
|
+
href: string;
|
|
365
|
+
}, {
|
|
366
|
+
href: string;
|
|
367
|
+
}>>;
|
|
368
|
+
}, "strip", z.ZodTypeAny, {
|
|
369
|
+
parent?: {
|
|
370
|
+
href: string;
|
|
371
|
+
} | undefined;
|
|
372
|
+
}, {
|
|
373
|
+
parent?: {
|
|
374
|
+
href: string;
|
|
375
|
+
} | undefined;
|
|
376
|
+
}>>;
|
|
377
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
378
|
+
_links: z.ZodOptional<z.ZodUnknown>;
|
|
379
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
380
|
+
export type FlagStatusesResponse = z.infer<typeof FlagStatusesResponseSchema>;
|
|
381
|
+
export declare const MembersResponseSchema: z.ZodObject<{
|
|
382
|
+
items: z.ZodArray<z.ZodObject<{
|
|
383
|
+
_id: z.ZodString;
|
|
384
|
+
email: z.ZodString;
|
|
385
|
+
firstName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
386
|
+
lastName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
387
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
388
|
+
_id: z.ZodString;
|
|
389
|
+
email: z.ZodString;
|
|
390
|
+
firstName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
391
|
+
lastName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
392
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
393
|
+
_id: z.ZodString;
|
|
394
|
+
email: z.ZodString;
|
|
395
|
+
firstName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
396
|
+
lastName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
397
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
398
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
399
|
+
_links: z.ZodOptional<z.ZodUnknown>;
|
|
400
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
401
|
+
items: z.ZodArray<z.ZodObject<{
|
|
402
|
+
_id: z.ZodString;
|
|
403
|
+
email: z.ZodString;
|
|
404
|
+
firstName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
405
|
+
lastName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
406
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
407
|
+
_id: z.ZodString;
|
|
408
|
+
email: z.ZodString;
|
|
409
|
+
firstName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
410
|
+
lastName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
411
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
412
|
+
_id: z.ZodString;
|
|
413
|
+
email: z.ZodString;
|
|
414
|
+
firstName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
415
|
+
lastName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
416
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
417
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
418
|
+
_links: z.ZodOptional<z.ZodUnknown>;
|
|
419
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
420
|
+
items: z.ZodArray<z.ZodObject<{
|
|
421
|
+
_id: z.ZodString;
|
|
422
|
+
email: z.ZodString;
|
|
423
|
+
firstName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
424
|
+
lastName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
425
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
426
|
+
_id: z.ZodString;
|
|
427
|
+
email: z.ZodString;
|
|
428
|
+
firstName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
429
|
+
lastName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
430
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
431
|
+
_id: z.ZodString;
|
|
432
|
+
email: z.ZodString;
|
|
433
|
+
firstName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
434
|
+
lastName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
435
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
436
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
437
|
+
_links: z.ZodOptional<z.ZodUnknown>;
|
|
438
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
439
|
+
export type MembersResponse = z.infer<typeof MembersResponseSchema>;
|
|
154
440
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/launchdarkly/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/launchdarkly/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAiCvB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAMhB,CAAA;AAEhB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAuB/D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAGvB,CAAA;AAEhB,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAW7E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAIlB,CAAA;AAEhB,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -5,6 +5,27 @@ const EnvironmentSchema = z.object({
|
|
|
5
5
|
const FlagItemSchema = z.object({
|
|
6
6
|
key: z.string(),
|
|
7
7
|
archived: z.boolean(),
|
|
8
|
+
// `temporary` is LD's user-set flag-lifecycle marker:
|
|
9
|
+
// true → ephemeral feature toggle, expected to be removed someday
|
|
10
|
+
// false → permanent flag (kill switch, operational config, long-lived
|
|
11
|
+
// experiment that should never be cleaned up)
|
|
12
|
+
// We invert to `permanent` in the PlatformFlag mapping. Defaulted to
|
|
13
|
+
// true because LD's flag-creation UI defaults to "temporary"; existing
|
|
14
|
+
// flags that predate the field send true implicitly.
|
|
15
|
+
temporary: z.boolean().optional().default(true),
|
|
16
|
+
// Epoch milliseconds when the flag was first created in LD. Lets us
|
|
17
|
+
// compute platform-side age independently of code age; a flag that's
|
|
18
|
+
// 18 months old in LD AND still in code is a stronger stale signal
|
|
19
|
+
// than either alone. Field has been on LD's API since v2 was
|
|
20
|
+
// introduced, so it should be present on every flag.
|
|
21
|
+
creationDate: z.number().optional(),
|
|
22
|
+
// Free-form labels users apply in the LD UI (e.g. 'kill-switch',
|
|
23
|
+
// 'experiment', 'auth'). Surfaced in FlagShark output so a reviewer
|
|
24
|
+
// sees the LD-side classification next to the flag name.
|
|
25
|
+
tags: z.array(z.string()).optional().default([]),
|
|
26
|
+
// Opaque LD member ID of whoever owns the flag. Resolved to a human
|
|
27
|
+
// name+email via a separate /api/v2/members lookup.
|
|
28
|
+
maintainerId: z.string().optional(),
|
|
8
29
|
environments: z.record(z.string(), EnvironmentSchema).optional(),
|
|
9
30
|
}).passthrough();
|
|
10
31
|
export const FlagsResponseSchema = z.object({
|
|
@@ -14,4 +35,39 @@ export const FlagsResponseSchema = z.object({
|
|
|
14
35
|
next: z.object({ href: z.string() }).optional(),
|
|
15
36
|
}).optional(),
|
|
16
37
|
}).passthrough();
|
|
38
|
+
// ── Flag statuses (P2: LD's per-env staleness verdict) ──────────────────────
|
|
39
|
+
// LD's status values for a flag in a given environment:
|
|
40
|
+
// - 'new': created in the last 7 days; no evaluation events yet
|
|
41
|
+
// - 'active': serving evaluations as expected
|
|
42
|
+
// - 'inactive': no evaluation events in 7+ days (and not 'new')
|
|
43
|
+
// - 'launched': has been serving a single variation for the past 7 days,
|
|
44
|
+
// i.e. effectively rolled out
|
|
45
|
+
const FlagStatusItemSchema = z.object({
|
|
46
|
+
name: z.enum(['new', 'active', 'inactive', 'launched']),
|
|
47
|
+
// ISO timestamp string of the last evaluation event; null when none.
|
|
48
|
+
lastRequested: z.string().nullable(),
|
|
49
|
+
_links: z
|
|
50
|
+
.object({
|
|
51
|
+
// The parent link carries the flag key:
|
|
52
|
+
// /api/v2/flags/{project}/{flag-key}
|
|
53
|
+
parent: z.object({ href: z.string() }).optional(),
|
|
54
|
+
})
|
|
55
|
+
.optional(),
|
|
56
|
+
}).passthrough();
|
|
57
|
+
export const FlagStatusesResponseSchema = z.object({
|
|
58
|
+
items: z.array(FlagStatusItemSchema),
|
|
59
|
+
_links: z.unknown().optional(),
|
|
60
|
+
}).passthrough();
|
|
61
|
+
// ── Members (P3: maintainer name resolution) ────────────────────────────────
|
|
62
|
+
const MemberItemSchema = z.object({
|
|
63
|
+
_id: z.string(),
|
|
64
|
+
email: z.string(),
|
|
65
|
+
firstName: z.string().optional().default(''),
|
|
66
|
+
lastName: z.string().optional().default(''),
|
|
67
|
+
}).passthrough();
|
|
68
|
+
export const MembersResponseSchema = z.object({
|
|
69
|
+
items: z.array(MemberItemSchema),
|
|
70
|
+
totalCount: z.number().optional(),
|
|
71
|
+
_links: z.unknown().optional(),
|
|
72
|
+
}).passthrough();
|
|
17
73
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/providers/launchdarkly/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC,WAAW,EAAE,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