@floegence/redevplugin-contracts 3.25.1 → 3.26.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/category.d.ts +5 -0
- package/dist/category.js +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/presentation.d.ts +3 -0
- package/dist/presentation.js +2 -1
- package/dist/repository-index.gen.d.ts +5 -0
- package/dist/repository-index.gen.js +13 -0
- package/dist/security-summary.gen.d.ts +23 -0
- package/dist/security-summary.gen.js +30 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Author-owned discovery categories. Omission means other; unknown values are invalid. */
|
|
2
|
+
export declare const pluginCategories: readonly ["development", "infrastructure", "utilities", "data", "collaboration", "productivity", "other"];
|
|
3
|
+
import type { PluginCategory } from "./security-summary.gen.js";
|
|
4
|
+
export type { PluginCategory } from "./security-summary.gen.js";
|
|
5
|
+
export declare function resolvePluginCategory(value: unknown): PluginCategory;
|
package/dist/category.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Author-owned discovery categories. Omission means other; unknown values are invalid. */
|
|
2
|
+
export const pluginCategories = [
|
|
3
|
+
"development", "infrastructure", "utilities", "data",
|
|
4
|
+
"collaboration", "productivity", "other",
|
|
5
|
+
];
|
|
6
|
+
export function resolvePluginCategory(value) {
|
|
7
|
+
if (value === undefined)
|
|
8
|
+
return "other";
|
|
9
|
+
if (typeof value === "string" && pluginCategories.some(category => category === value))
|
|
10
|
+
return value;
|
|
11
|
+
throw new TypeError("presentation.category must be a predefined plugin category");
|
|
12
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./category.js";
|
|
1
2
|
export * from "./presentation.js";
|
|
2
3
|
export type { PresentationCatalog, PresentationLocale, ResolvedSettingPresentation, ResolvedSurfacePresentation, SettingOptionPresentation } from "./presentation.js";
|
|
3
4
|
export * from "./security-summary.js";
|
package/dist/index.js
CHANGED
package/dist/presentation.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type PluginCategory } from "./category.js";
|
|
1
2
|
export type SettingOptionPresentation = Readonly<{
|
|
2
3
|
value: string;
|
|
3
4
|
label: string;
|
|
@@ -23,10 +24,12 @@ export type PresentationLocale = Readonly<{
|
|
|
23
24
|
settings: readonly ResolvedSettingPresentation[];
|
|
24
25
|
}>;
|
|
25
26
|
export type PresentationCatalog = Readonly<{
|
|
27
|
+
category?: PluginCategory;
|
|
26
28
|
default_locale: string;
|
|
27
29
|
locales: readonly PresentationLocale[];
|
|
28
30
|
}>;
|
|
29
31
|
export type ResolvedPresentation = Readonly<{
|
|
32
|
+
category: PluginCategory;
|
|
30
33
|
requested_locale?: string;
|
|
31
34
|
resolved_locale: string;
|
|
32
35
|
default_locale: string;
|
package/dist/presentation.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolvePluginCategory } from "./category.js";
|
|
1
2
|
export function resolvePresentation(catalog, requestedLocale) {
|
|
2
3
|
const byLocale = new Map(catalog.locales.map((locale) => [locale.locale, locale]));
|
|
3
4
|
const requested = canonicalLocale(requestedLocale);
|
|
@@ -13,7 +14,7 @@ export function resolvePresentation(catalog, requestedLocale) {
|
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
return deepClonePresentation(resolved, catalog.default_locale, requested);
|
|
17
|
+
return { ...deepClonePresentation(resolved, catalog.default_locale, requested), category: resolvePluginCategory(catalog.category) };
|
|
17
18
|
}
|
|
18
19
|
function canonicalLocale(value) {
|
|
19
20
|
if (value === "" || value.trim() !== value || value.includes("_"))
|
|
@@ -213,6 +213,11 @@ export declare const sourceManifestJSONSchema: {
|
|
|
213
213
|
};
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
|
+
readonly category: {
|
|
217
|
+
readonly type: "string";
|
|
218
|
+
readonly enum: readonly ["development", "infrastructure", "utilities", "data", "collaboration", "productivity", "other"];
|
|
219
|
+
readonly description: "Author-selected primary discovery category. Omission means other; explicit unknown, empty or null values are invalid.";
|
|
220
|
+
};
|
|
216
221
|
};
|
|
217
222
|
};
|
|
218
223
|
readonly surfaces: {
|
|
@@ -255,6 +255,19 @@ export const sourceManifestJSONSchema = {
|
|
|
255
255
|
"maxLength": 512
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
+
},
|
|
259
|
+
"category": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"enum": [
|
|
262
|
+
"development",
|
|
263
|
+
"infrastructure",
|
|
264
|
+
"utilities",
|
|
265
|
+
"data",
|
|
266
|
+
"collaboration",
|
|
267
|
+
"productivity",
|
|
268
|
+
"other"
|
|
269
|
+
],
|
|
270
|
+
"description": "Author-selected primary discovery category. Omission means other; explicit unknown, empty or null values are invalid."
|
|
258
271
|
}
|
|
259
272
|
}
|
|
260
273
|
},
|
|
@@ -176,10 +176,12 @@ export type PackageInspection = {
|
|
|
176
176
|
security_summary: ExternalPackageSecuritySummary;
|
|
177
177
|
};
|
|
178
178
|
export type PresentationCatalog = {
|
|
179
|
+
category?: PluginCategory;
|
|
179
180
|
default_locale: string;
|
|
180
181
|
icon?: PresentationIcon;
|
|
181
182
|
locales: Array<PresentationLocale>;
|
|
182
183
|
};
|
|
184
|
+
export type PluginCategory = "development" | "infrastructure" | "utilities" | "data" | "collaboration" | "productivity" | "other";
|
|
183
185
|
export type PresentationIcon = {
|
|
184
186
|
path: string;
|
|
185
187
|
};
|
|
@@ -982,6 +984,9 @@ export declare const securitySummarySchemas: {
|
|
|
982
984
|
readonly required: readonly ["default_locale", "locales"];
|
|
983
985
|
readonly additionalProperties: false;
|
|
984
986
|
readonly properties: {
|
|
987
|
+
readonly category: {
|
|
988
|
+
readonly ref: "PluginCategory";
|
|
989
|
+
};
|
|
985
990
|
readonly default_locale: {
|
|
986
991
|
readonly type: "string";
|
|
987
992
|
readonly minLength: 2;
|
|
@@ -1000,6 +1005,10 @@ export declare const securitySummarySchemas: {
|
|
|
1000
1005
|
};
|
|
1001
1006
|
};
|
|
1002
1007
|
};
|
|
1008
|
+
readonly PluginCategory: {
|
|
1009
|
+
readonly type: "string";
|
|
1010
|
+
readonly enum: readonly ["development", "infrastructure", "utilities", "data", "collaboration", "productivity", "other"];
|
|
1011
|
+
};
|
|
1003
1012
|
readonly PresentationIcon: {
|
|
1004
1013
|
readonly type: "object";
|
|
1005
1014
|
readonly required: readonly ["path"];
|
|
@@ -1942,6 +1951,9 @@ export declare const securitySummaryJSONSchema: {
|
|
|
1942
1951
|
readonly required: readonly ["default_locale", "locales"];
|
|
1943
1952
|
readonly additionalProperties: false;
|
|
1944
1953
|
readonly properties: {
|
|
1954
|
+
readonly category: {
|
|
1955
|
+
readonly $ref: "#/$defs/PluginCategory";
|
|
1956
|
+
};
|
|
1945
1957
|
readonly default_locale: {
|
|
1946
1958
|
readonly type: "string";
|
|
1947
1959
|
readonly minLength: 2;
|
|
@@ -1960,6 +1972,10 @@ export declare const securitySummaryJSONSchema: {
|
|
|
1960
1972
|
};
|
|
1961
1973
|
};
|
|
1962
1974
|
};
|
|
1975
|
+
readonly PluginCategory: {
|
|
1976
|
+
readonly type: "string";
|
|
1977
|
+
readonly enum: readonly ["development", "infrastructure", "utilities", "data", "collaboration", "productivity", "other"];
|
|
1978
|
+
};
|
|
1963
1979
|
readonly PresentationIcon: {
|
|
1964
1980
|
readonly type: "object";
|
|
1965
1981
|
readonly required: readonly ["path"];
|
|
@@ -2903,6 +2919,9 @@ export declare const packageInspectionJSONSchema: {
|
|
|
2903
2919
|
readonly required: readonly ["default_locale", "locales"];
|
|
2904
2920
|
readonly additionalProperties: false;
|
|
2905
2921
|
readonly properties: {
|
|
2922
|
+
readonly category: {
|
|
2923
|
+
readonly $ref: "#/$defs/PluginCategory";
|
|
2924
|
+
};
|
|
2906
2925
|
readonly default_locale: {
|
|
2907
2926
|
readonly type: "string";
|
|
2908
2927
|
readonly minLength: 2;
|
|
@@ -2921,6 +2940,10 @@ export declare const packageInspectionJSONSchema: {
|
|
|
2921
2940
|
};
|
|
2922
2941
|
};
|
|
2923
2942
|
};
|
|
2943
|
+
readonly PluginCategory: {
|
|
2944
|
+
readonly type: "string";
|
|
2945
|
+
readonly enum: readonly ["development", "infrastructure", "utilities", "data", "collaboration", "productivity", "other"];
|
|
2946
|
+
};
|
|
2924
2947
|
readonly PresentationIcon: {
|
|
2925
2948
|
readonly type: "object";
|
|
2926
2949
|
readonly required: readonly ["path"];
|
|
@@ -1019,6 +1019,9 @@ export const securitySummarySchemas = {
|
|
|
1019
1019
|
],
|
|
1020
1020
|
"additionalProperties": false,
|
|
1021
1021
|
"properties": {
|
|
1022
|
+
"category": {
|
|
1023
|
+
"ref": "PluginCategory"
|
|
1024
|
+
},
|
|
1022
1025
|
"default_locale": {
|
|
1023
1026
|
"type": "string",
|
|
1024
1027
|
"minLength": 2,
|
|
@@ -1037,6 +1040,18 @@ export const securitySummarySchemas = {
|
|
|
1037
1040
|
}
|
|
1038
1041
|
}
|
|
1039
1042
|
},
|
|
1043
|
+
"PluginCategory": {
|
|
1044
|
+
"type": "string",
|
|
1045
|
+
"enum": [
|
|
1046
|
+
"development",
|
|
1047
|
+
"infrastructure",
|
|
1048
|
+
"utilities",
|
|
1049
|
+
"data",
|
|
1050
|
+
"collaboration",
|
|
1051
|
+
"productivity",
|
|
1052
|
+
"other"
|
|
1053
|
+
]
|
|
1054
|
+
},
|
|
1040
1055
|
"PresentationIcon": {
|
|
1041
1056
|
"type": "object",
|
|
1042
1057
|
"required": [
|
|
@@ -2265,6 +2280,9 @@ export const securitySummaryJSONSchema = {
|
|
|
2265
2280
|
],
|
|
2266
2281
|
"additionalProperties": false,
|
|
2267
2282
|
"properties": {
|
|
2283
|
+
"category": {
|
|
2284
|
+
"$ref": "#/$defs/PluginCategory"
|
|
2285
|
+
},
|
|
2268
2286
|
"default_locale": {
|
|
2269
2287
|
"type": "string",
|
|
2270
2288
|
"minLength": 2,
|
|
@@ -2283,6 +2301,18 @@ export const securitySummaryJSONSchema = {
|
|
|
2283
2301
|
}
|
|
2284
2302
|
}
|
|
2285
2303
|
},
|
|
2304
|
+
"PluginCategory": {
|
|
2305
|
+
"type": "string",
|
|
2306
|
+
"enum": [
|
|
2307
|
+
"development",
|
|
2308
|
+
"infrastructure",
|
|
2309
|
+
"utilities",
|
|
2310
|
+
"data",
|
|
2311
|
+
"collaboration",
|
|
2312
|
+
"productivity",
|
|
2313
|
+
"other"
|
|
2314
|
+
]
|
|
2315
|
+
},
|
|
2286
2316
|
"PresentationIcon": {
|
|
2287
2317
|
"type": "object",
|
|
2288
2318
|
"required": [
|