@robinmordasiewicz/f5xc-api-mcp 3.5.0 → 3.6.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/generator/dependency-extractor.d.ts +103 -0
- package/dist/generator/dependency-extractor.d.ts.map +1 -0
- package/dist/generator/dependency-extractor.js +473 -0
- package/dist/generator/dependency-extractor.js.map +1 -0
- package/dist/generator/dependency-graph.d.ts +67 -0
- package/dist/generator/dependency-graph.d.ts.map +1 -0
- package/dist/generator/dependency-graph.js +330 -0
- package/dist/generator/dependency-graph.js.map +1 -0
- package/dist/generator/dependency-types.d.ts +206 -0
- package/dist/generator/dependency-types.d.ts.map +1 -0
- package/dist/generator/dependency-types.js +37 -0
- package/dist/generator/dependency-types.js.map +1 -0
- package/dist/generator/openapi-parser.d.ts +7 -0
- package/dist/generator/openapi-parser.d.ts.map +1 -1
- package/dist/generator/openapi-parser.js +41 -0
- package/dist/generator/openapi-parser.js.map +1 -1
- package/dist/generator/tool-generator.d.ts +17 -0
- package/dist/generator/tool-generator.d.ts.map +1 -1
- package/dist/generator/tool-generator.js +25 -0
- package/dist/generator/tool-generator.js.map +1 -1
- package/dist/tools/discovery/dependencies.d.ts +113 -0
- package/dist/tools/discovery/dependencies.d.ts.map +1 -0
- package/dist/tools/discovery/dependencies.js +258 -0
- package/dist/tools/discovery/dependencies.js.map +1 -0
- package/dist/tools/discovery/index.d.ts +33 -0
- package/dist/tools/discovery/index.d.ts.map +1 -1
- package/dist/tools/discovery/index.js +43 -0
- package/dist/tools/discovery/index.js.map +1 -1
- package/dist/tools/generated/admin_console_and_ui/index.d.ts.map +1 -1
- package/dist/tools/generated/admin_console_and_ui/index.js +6 -0
- package/dist/tools/generated/admin_console_and_ui/index.js.map +1 -1
- package/dist/tools/generated/api/index.d.ts.map +1 -1
- package/dist/tools/generated/api/index.js +1206 -2
- package/dist/tools/generated/api/index.js.map +1 -1
- package/dist/tools/generated/authentication/index.d.ts.map +1 -1
- package/dist/tools/generated/authentication/index.js +49 -0
- package/dist/tools/generated/authentication/index.js.map +1 -1
- package/dist/tools/generated/bigip/index.d.ts.map +1 -1
- package/dist/tools/generated/bigip/index.js +319 -0
- package/dist/tools/generated/bigip/index.js.map +1 -1
- package/dist/tools/generated/billing_and_usage/index.d.ts.map +1 -1
- package/dist/tools/generated/billing_and_usage/index.js +169 -0
- package/dist/tools/generated/billing_and_usage/index.js.map +1 -1
- package/dist/tools/generated/blindfold/index.d.ts.map +1 -1
- package/dist/tools/generated/blindfold/index.js +328 -0
- package/dist/tools/generated/blindfold/index.js.map +1 -1
- package/dist/tools/generated/bot_and_threat_defense/index.d.ts.map +1 -1
- package/dist/tools/generated/bot_and_threat_defense/index.js +482 -0
- package/dist/tools/generated/bot_and_threat_defense/index.js.map +1 -1
- package/dist/tools/generated/cdn/index.d.ts.map +1 -1
- package/dist/tools/generated/cdn/index.js +347 -0
- package/dist/tools/generated/cdn/index.js.map +1 -1
- package/dist/tools/generated/ce_management/index.d.ts.map +1 -1
- package/dist/tools/generated/ce_management/index.js +375 -0
- package/dist/tools/generated/ce_management/index.js.map +1 -1
- package/dist/tools/generated/certificates/index.d.ts.map +1 -1
- package/dist/tools/generated/certificates/index.js +268 -0
- package/dist/tools/generated/certificates/index.js.map +1 -1
- package/dist/tools/generated/cloud_infrastructure/index.d.ts.map +1 -1
- package/dist/tools/generated/cloud_infrastructure/index.js +374 -0
- package/dist/tools/generated/cloud_infrastructure/index.js.map +1 -1
- package/dist/tools/generated/container_services/index.d.ts.map +1 -1
- package/dist/tools/generated/container_services/index.js +212 -0
- package/dist/tools/generated/container_services/index.js.map +1 -1
- package/dist/tools/generated/data_and_privacy_security/index.d.ts.map +1 -1
- package/dist/tools/generated/data_and_privacy_security/index.js +143 -0
- package/dist/tools/generated/data_and_privacy_security/index.js.map +1 -1
- package/dist/tools/generated/data_intelligence/index.d.ts.map +1 -1
- package/dist/tools/generated/data_intelligence/index.js +105 -0
- package/dist/tools/generated/data_intelligence/index.js.map +1 -1
- package/dist/tools/generated/ddos/index.d.ts.map +1 -1
- package/dist/tools/generated/ddos/index.js +664 -0
- package/dist/tools/generated/ddos/index.js.map +1 -1
- package/dist/tools/generated/dns/index.d.ts.map +1 -1
- package/dist/tools/generated/dns/index.js +492 -0
- package/dist/tools/generated/dns/index.js.map +1 -1
- package/dist/tools/generated/generative_ai/index.d.ts.map +1 -1
- package/dist/tools/generated/generative_ai/index.js +47 -0
- package/dist/tools/generated/generative_ai/index.js.map +1 -1
- package/dist/tools/generated/managed_kubernetes/index.d.ts.map +1 -1
- package/dist/tools/generated/managed_kubernetes/index.js +510 -0
- package/dist/tools/generated/managed_kubernetes/index.js.map +1 -1
- package/dist/tools/generated/marketplace/index.d.ts.map +1 -1
- package/dist/tools/generated/marketplace/index.js +307 -0
- package/dist/tools/generated/marketplace/index.js.map +1 -1
- package/dist/tools/generated/network/index.d.ts.map +1 -1
- package/dist/tools/generated/network/index.js +1292 -0
- package/dist/tools/generated/network/index.js.map +1 -1
- package/dist/tools/generated/network_security/index.d.ts.map +1 -1
- package/dist/tools/generated/network_security/index.js +1819 -9
- package/dist/tools/generated/network_security/index.js.map +1 -1
- package/dist/tools/generated/nginx_one/index.d.ts.map +1 -1
- package/dist/tools/generated/nginx_one/index.js +94 -0
- package/dist/tools/generated/nginx_one/index.js.map +1 -1
- package/dist/tools/generated/object_storage/index.d.ts.map +1 -1
- package/dist/tools/generated/object_storage/index.js +32 -0
- package/dist/tools/generated/object_storage/index.js.map +1 -1
- package/dist/tools/generated/observability/index.d.ts.map +1 -1
- package/dist/tools/generated/observability/index.js +265 -0
- package/dist/tools/generated/observability/index.js.map +1 -1
- package/dist/tools/generated/rate_limiting/index.d.ts.map +1 -1
- package/dist/tools/generated/rate_limiting/index.js +396 -0
- package/dist/tools/generated/rate_limiting/index.js.map +1 -1
- package/dist/tools/generated/secops_and_incident_response/index.d.ts.map +1 -1
- package/dist/tools/generated/secops_and_incident_response/index.js +132 -0
- package/dist/tools/generated/secops_and_incident_response/index.js.map +1 -1
- package/dist/tools/generated/service_mesh/index.d.ts.map +1 -1
- package/dist/tools/generated/service_mesh/index.js +1062 -0
- package/dist/tools/generated/service_mesh/index.js.map +1 -1
- package/dist/tools/generated/shape/index.d.ts.map +1 -1
- package/dist/tools/generated/shape/index.js +917 -0
- package/dist/tools/generated/shape/index.js.map +1 -1
- package/dist/tools/generated/sites/index.d.ts.map +1 -1
- package/dist/tools/generated/sites/index.js +1666 -0
- package/dist/tools/generated/sites/index.js.map +1 -1
- package/dist/tools/generated/statistics/index.d.ts.map +1 -1
- package/dist/tools/generated/statistics/index.js +574 -0
- package/dist/tools/generated/statistics/index.js.map +1 -1
- package/dist/tools/generated/support/index.d.ts.map +1 -1
- package/dist/tools/generated/support/index.js +274 -0
- package/dist/tools/generated/support/index.js.map +1 -1
- package/dist/tools/generated/telemetry_and_insights/index.d.ts.map +1 -1
- package/dist/tools/generated/telemetry_and_insights/index.js +100 -0
- package/dist/tools/generated/telemetry_and_insights/index.js.map +1 -1
- package/dist/tools/generated/tenant_and_identity/index.d.ts.map +1 -1
- package/dist/tools/generated/tenant_and_identity/index.js +1378 -0
- package/dist/tools/generated/tenant_and_identity/index.js.map +1 -1
- package/dist/tools/generated/threat_campaign/index.d.ts.map +1 -1
- package/dist/tools/generated/threat_campaign/index.js +3 -0
- package/dist/tools/generated/threat_campaign/index.js.map +1 -1
- package/dist/tools/generated/users/index.d.ts.map +1 -1
- package/dist/tools/generated/users/index.js +139 -0
- package/dist/tools/generated/users/index.js.map +1 -1
- package/dist/tools/generated/virtual/index.d.ts.map +1 -1
- package/dist/tools/generated/virtual/index.js +1160 -0
- package/dist/tools/generated/virtual/index.js.map +1 -1
- package/dist/tools/generated/vpm_and_node_management/index.d.ts.map +1 -1
- package/dist/tools/generated/vpm_and_node_management/index.js +3 -0
- package/dist/tools/generated/vpm_and_node_management/index.js.map +1 -1
- package/dist/tools/generated/waf/index.d.ts.map +1 -1
- package/dist/tools/generated/waf/index.js +784 -0
- package/dist/tools/generated/waf/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency Extractor
|
|
3
|
+
*
|
|
4
|
+
* Extracts resource dependencies from OpenAPI specifications:
|
|
5
|
+
* - $ref patterns for resource relationships
|
|
6
|
+
* - x-ves-oneof-field-* patterns for mutually exclusive options
|
|
7
|
+
* - Addon service definitions from billing specs
|
|
8
|
+
*/
|
|
9
|
+
import type { ResourceReference, OneOfGroup, AddonServiceDefinition, ExtractedDependencies, ParsedRef } from "./dependency-types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Parse a $ref string and extract resource information
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* parseRef("#/components/schemas/origin_poolCreateRequest")
|
|
15
|
+
* // => { fullPath: "...", schemaName: "origin_poolCreateRequest",
|
|
16
|
+
* // resourceType: "origin_pool", operationType: "create" }
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseRef(refString: string): ParsedRef | null;
|
|
19
|
+
/**
|
|
20
|
+
* Normalize a resource type name to kebab-case for consistency
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* normalizeResourceType("origin_pool") // => "origin-pool"
|
|
24
|
+
* normalizeResourceType("httpLoadbalancer") // => "http-loadbalancer"
|
|
25
|
+
*/
|
|
26
|
+
export declare function normalizeResourceType(resourceType: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Recursively extract all $ref patterns from a schema object
|
|
29
|
+
*
|
|
30
|
+
* @param schema - OpenAPI schema object to traverse
|
|
31
|
+
* @param currentPath - Current JSON path (for fieldPath tracking)
|
|
32
|
+
* @returns Array of resource references found
|
|
33
|
+
*/
|
|
34
|
+
export declare function extractRefPatterns(schema: Record<string, unknown>, currentPath?: string): ResourceReference[];
|
|
35
|
+
/**
|
|
36
|
+
* Extract x-ves-oneof-field-* patterns from a schema
|
|
37
|
+
*
|
|
38
|
+
* @param schema - OpenAPI schema object (typically a component schema)
|
|
39
|
+
* @returns Array of OneOfGroup definitions
|
|
40
|
+
*/
|
|
41
|
+
export declare function extractOneOfPatterns(schema: Record<string, unknown>): OneOfGroup[];
|
|
42
|
+
/**
|
|
43
|
+
* Extract addon service definitions from subscription schema
|
|
44
|
+
*
|
|
45
|
+
* @param subscriptionSchema - The subscriptionSubscribeRequest schema
|
|
46
|
+
* @returns Array of addon service definitions
|
|
47
|
+
*/
|
|
48
|
+
export declare function extractAddonServicesFromSchema(subscriptionSchema: Record<string, unknown>): AddonServiceDefinition[];
|
|
49
|
+
/**
|
|
50
|
+
* Format an addon service ID into a display name
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* formatAddonDisplayName("f5xc_waap_advanced")
|
|
54
|
+
* // => "F5XC WAAP Advanced"
|
|
55
|
+
*/
|
|
56
|
+
export declare function formatAddonDisplayName(serviceId: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* Extract tier level from addon service ID
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* extractTierFromAddon("f5xc_waap_advanced") // => "advanced"
|
|
62
|
+
* extractTierFromAddon("f5xc_waap_standard") // => "standard"
|
|
63
|
+
*/
|
|
64
|
+
export declare function extractTierFromAddon(serviceId: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* Extract all subscription services from a billing spec
|
|
67
|
+
*
|
|
68
|
+
* @param billingSpec - Parsed billing_and_usage.json spec
|
|
69
|
+
* @returns Array of addon service definitions
|
|
70
|
+
*/
|
|
71
|
+
export declare function extractSubscriptionServices(billingSpec: {
|
|
72
|
+
schemas: Record<string, unknown>;
|
|
73
|
+
}): AddonServiceDefinition[];
|
|
74
|
+
/**
|
|
75
|
+
* Extract dependencies from a single operation's request body schema
|
|
76
|
+
*
|
|
77
|
+
* @param requestBodySchema - The operation's request body schema
|
|
78
|
+
* @param componentSchemas - All component schemas for resolving references
|
|
79
|
+
* @returns Extracted dependencies including references and oneOf groups
|
|
80
|
+
*/
|
|
81
|
+
export declare function extractOperationDependencies(requestBodySchema: Record<string, unknown> | null, componentSchemas: Record<string, unknown>): ExtractedDependencies;
|
|
82
|
+
/**
|
|
83
|
+
* Map known resources to their required subscription services
|
|
84
|
+
* This is a heuristic mapping based on F5 XC product offerings
|
|
85
|
+
*
|
|
86
|
+
* @param resource - Resource name (e.g., "http-loadbalancer")
|
|
87
|
+
* @param domain - Domain name (e.g., "virtual")
|
|
88
|
+
* @returns Array of subscription service IDs that may be required
|
|
89
|
+
*/
|
|
90
|
+
export declare function mapResourceToSubscriptions(resource: string, domain: string): string[];
|
|
91
|
+
/**
|
|
92
|
+
* Domain mapping for resource types
|
|
93
|
+
* Maps common resource type patterns to their typical domains
|
|
94
|
+
*/
|
|
95
|
+
export declare const RESOURCE_DOMAIN_MAP: Record<string, string>;
|
|
96
|
+
/**
|
|
97
|
+
* Resolve a resource type to its domain using the mapping
|
|
98
|
+
*
|
|
99
|
+
* @param resourceType - Normalized resource type
|
|
100
|
+
* @returns Domain string or empty string if unknown
|
|
101
|
+
*/
|
|
102
|
+
export declare function resolveResourceDomain(resourceType: string): string;
|
|
103
|
+
//# sourceMappingURL=dependency-extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-extractor.d.ts","sourceRoot":"","sources":["../../src/generator/dependency-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,sBAAsB,EACtB,qBAAqB,EACrB,SAAS,EACV,MAAM,uBAAuB,CAAC;AA2C/B;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAwC5D;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAKlE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OA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ource relationships
|
|
6
|
+
* - x-ves-oneof-field-* patterns for mutually exclusive options
|
|
7
|
+
* - Addon service definitions from billing specs
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Known resource type suffixes to strip from schema names
|
|
11
|
+
* Order matters - more specific suffixes first
|
|
12
|
+
*/
|
|
13
|
+
const RESOURCE_SUFFIXES = [
|
|
14
|
+
"CreateRequest",
|
|
15
|
+
"CreateResponse",
|
|
16
|
+
"ReplaceRequest",
|
|
17
|
+
"ReplaceResponse",
|
|
18
|
+
"GetRequest",
|
|
19
|
+
"GetResponse",
|
|
20
|
+
"ListRequest",
|
|
21
|
+
"ListResponse",
|
|
22
|
+
"DeleteRequest",
|
|
23
|
+
"DeleteResponse",
|
|
24
|
+
"UpdateRequest",
|
|
25
|
+
"UpdateResponse",
|
|
26
|
+
"Spec",
|
|
27
|
+
"SpecType",
|
|
28
|
+
"Object",
|
|
29
|
+
"Type",
|
|
30
|
+
];
|
|
31
|
+
/**
|
|
32
|
+
* Known operation types inferred from schema names
|
|
33
|
+
*/
|
|
34
|
+
const OPERATION_PATTERNS = {
|
|
35
|
+
CreateRequest: "create",
|
|
36
|
+
CreateResponse: "create",
|
|
37
|
+
ReplaceRequest: "replace",
|
|
38
|
+
ReplaceResponse: "replace",
|
|
39
|
+
GetRequest: "get",
|
|
40
|
+
GetResponse: "get",
|
|
41
|
+
ListRequest: "list",
|
|
42
|
+
ListResponse: "list",
|
|
43
|
+
DeleteRequest: "delete",
|
|
44
|
+
DeleteResponse: "delete",
|
|
45
|
+
UpdateRequest: "update",
|
|
46
|
+
UpdateResponse: "update",
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Parse a $ref string and extract resource information
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* parseRef("#/components/schemas/origin_poolCreateRequest")
|
|
53
|
+
* // => { fullPath: "...", schemaName: "origin_poolCreateRequest",
|
|
54
|
+
* // resourceType: "origin_pool", operationType: "create" }
|
|
55
|
+
*/
|
|
56
|
+
export function parseRef(refString) {
|
|
57
|
+
if (!refString || typeof refString !== "string") {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
// Match OpenAPI component schema references
|
|
61
|
+
const match = refString.match(/#\/components\/schemas\/(.+)/);
|
|
62
|
+
if (!match || !match[1]) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
const schemaName = match[1];
|
|
66
|
+
let resourceType = null;
|
|
67
|
+
let operationType = null;
|
|
68
|
+
// Try to extract resource type and operation from schema name
|
|
69
|
+
for (const [suffix, operation] of Object.entries(OPERATION_PATTERNS)) {
|
|
70
|
+
if (schemaName.endsWith(suffix)) {
|
|
71
|
+
resourceType = schemaName.slice(0, -suffix.length);
|
|
72
|
+
operationType = operation;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// If no operation pattern matched, try just removing known suffixes
|
|
77
|
+
if (!resourceType) {
|
|
78
|
+
for (const suffix of RESOURCE_SUFFIXES) {
|
|
79
|
+
if (schemaName.endsWith(suffix)) {
|
|
80
|
+
resourceType = schemaName.slice(0, -suffix.length);
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
fullPath: refString,
|
|
87
|
+
schemaName,
|
|
88
|
+
resourceType,
|
|
89
|
+
operationType,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Normalize a resource type name to kebab-case for consistency
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* normalizeResourceType("origin_pool") // => "origin-pool"
|
|
97
|
+
* normalizeResourceType("httpLoadbalancer") // => "http-loadbalancer"
|
|
98
|
+
*/
|
|
99
|
+
export function normalizeResourceType(resourceType) {
|
|
100
|
+
return resourceType
|
|
101
|
+
.replace(/_/g, "-")
|
|
102
|
+
.replace(/([a-z])([A-Z])/g, "$1-$2")
|
|
103
|
+
.toLowerCase();
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Recursively extract all $ref patterns from a schema object
|
|
107
|
+
*
|
|
108
|
+
* @param schema - OpenAPI schema object to traverse
|
|
109
|
+
* @param currentPath - Current JSON path (for fieldPath tracking)
|
|
110
|
+
* @returns Array of resource references found
|
|
111
|
+
*/
|
|
112
|
+
export function extractRefPatterns(schema, currentPath = "") {
|
|
113
|
+
const references = [];
|
|
114
|
+
if (!schema || typeof schema !== "object") {
|
|
115
|
+
return references;
|
|
116
|
+
}
|
|
117
|
+
// Handle direct $ref
|
|
118
|
+
if ("$ref" in schema && typeof schema.$ref === "string") {
|
|
119
|
+
const parsed = parseRef(schema.$ref);
|
|
120
|
+
if (parsed?.resourceType) {
|
|
121
|
+
references.push({
|
|
122
|
+
resourceType: normalizeResourceType(parsed.resourceType),
|
|
123
|
+
domain: "", // Will be resolved later from the full spec context
|
|
124
|
+
fieldPath: currentPath,
|
|
125
|
+
required: false, // Will be updated based on parent "required" array
|
|
126
|
+
inline: false, // Simple refs are not inline
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Handle properties object
|
|
131
|
+
if ("properties" in schema && typeof schema.properties === "object" && schema.properties) {
|
|
132
|
+
const properties = schema.properties;
|
|
133
|
+
const requiredFields = Array.isArray(schema.required) && schema.required.every((r) => typeof r === "string")
|
|
134
|
+
? schema.required
|
|
135
|
+
: [];
|
|
136
|
+
for (const [propName, propSchema] of Object.entries(properties)) {
|
|
137
|
+
if (typeof propSchema === "object" && propSchema !== null) {
|
|
138
|
+
const propPath = currentPath ? `${currentPath}.${propName}` : propName;
|
|
139
|
+
const propRefs = extractRefPatterns(propSchema, propPath);
|
|
140
|
+
// Mark as required if in parent's required array
|
|
141
|
+
for (const ref of propRefs) {
|
|
142
|
+
if (ref.fieldPath === propPath && requiredFields.includes(propName)) {
|
|
143
|
+
ref.required = true;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
references.push(...propRefs);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// Handle allOf
|
|
151
|
+
if ("allOf" in schema && Array.isArray(schema.allOf)) {
|
|
152
|
+
for (const [index, item] of schema.allOf.entries()) {
|
|
153
|
+
if (typeof item === "object" && item !== null) {
|
|
154
|
+
const allOfPath = currentPath ? `${currentPath}.allOf[${index}]` : `allOf[${index}]`;
|
|
155
|
+
references.push(...extractRefPatterns(item, allOfPath));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
// Handle oneOf (inline capability)
|
|
160
|
+
if ("oneOf" in schema && Array.isArray(schema.oneOf)) {
|
|
161
|
+
for (const [index, item] of schema.oneOf.entries()) {
|
|
162
|
+
if (typeof item === "object" && item !== null) {
|
|
163
|
+
const oneOfPath = currentPath ? `${currentPath}.oneOf[${index}]` : `oneOf[${index}]`;
|
|
164
|
+
const oneOfRefs = extractRefPatterns(item, oneOfPath);
|
|
165
|
+
// Mark oneOf refs as supporting inline definitions
|
|
166
|
+
for (const ref of oneOfRefs) {
|
|
167
|
+
ref.inline = true;
|
|
168
|
+
}
|
|
169
|
+
references.push(...oneOfRefs);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
// Handle anyOf (inline capability)
|
|
174
|
+
if ("anyOf" in schema && Array.isArray(schema.anyOf)) {
|
|
175
|
+
for (const [index, item] of schema.anyOf.entries()) {
|
|
176
|
+
if (typeof item === "object" && item !== null) {
|
|
177
|
+
const anyOfPath = currentPath ? `${currentPath}.anyOf[${index}]` : `anyOf[${index}]`;
|
|
178
|
+
const anyOfRefs = extractRefPatterns(item, anyOfPath);
|
|
179
|
+
for (const ref of anyOfRefs) {
|
|
180
|
+
ref.inline = true;
|
|
181
|
+
}
|
|
182
|
+
references.push(...anyOfRefs);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// Handle items (arrays)
|
|
187
|
+
if ("items" in schema && typeof schema.items === "object" && schema.items !== null) {
|
|
188
|
+
const itemsPath = currentPath ? `${currentPath}[]` : "[]";
|
|
189
|
+
references.push(...extractRefPatterns(schema.items, itemsPath));
|
|
190
|
+
}
|
|
191
|
+
// Handle additionalProperties
|
|
192
|
+
if ("additionalProperties" in schema &&
|
|
193
|
+
typeof schema.additionalProperties === "object" &&
|
|
194
|
+
schema.additionalProperties !== null) {
|
|
195
|
+
const addPropsPath = currentPath ? `${currentPath}[*]` : "[*]";
|
|
196
|
+
references.push(...extractRefPatterns(schema.additionalProperties, addPropsPath));
|
|
197
|
+
}
|
|
198
|
+
return references;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Extract x-ves-oneof-field-* patterns from a schema
|
|
202
|
+
*
|
|
203
|
+
* @param schema - OpenAPI schema object (typically a component schema)
|
|
204
|
+
* @returns Array of OneOfGroup definitions
|
|
205
|
+
*/
|
|
206
|
+
export function extractOneOfPatterns(schema) {
|
|
207
|
+
const groups = [];
|
|
208
|
+
if (!schema || typeof schema !== "object") {
|
|
209
|
+
return groups;
|
|
210
|
+
}
|
|
211
|
+
// Look for x-ves-oneof-field-* keys
|
|
212
|
+
for (const [key, value] of Object.entries(schema)) {
|
|
213
|
+
if (key.startsWith("x-ves-oneof-field-") && typeof value === "string") {
|
|
214
|
+
const choiceField = key.replace("x-ves-oneof-field-", "");
|
|
215
|
+
try {
|
|
216
|
+
// Value is a JSON array string like "[\"option1\",\"option2\"]"
|
|
217
|
+
const options = JSON.parse(value);
|
|
218
|
+
if (Array.isArray(options) && options.every((o) => typeof o === "string")) {
|
|
219
|
+
groups.push({
|
|
220
|
+
choiceField,
|
|
221
|
+
options: options,
|
|
222
|
+
fieldPath: choiceField,
|
|
223
|
+
description: undefined, // Could be extracted from property description if available
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
catch {
|
|
228
|
+
// Invalid JSON, skip this pattern
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
// Also check nested properties for description
|
|
233
|
+
if ("properties" in schema && typeof schema.properties === "object" && schema.properties) {
|
|
234
|
+
const properties = schema.properties;
|
|
235
|
+
for (const group of groups) {
|
|
236
|
+
const prop = properties[group.choiceField];
|
|
237
|
+
if (prop && typeof prop === "object" && "description" in prop) {
|
|
238
|
+
group.description = String(prop.description);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return groups;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Extract addon service definitions from subscription schema
|
|
246
|
+
*
|
|
247
|
+
* @param subscriptionSchema - The subscriptionSubscribeRequest schema
|
|
248
|
+
* @returns Array of addon service definitions
|
|
249
|
+
*/
|
|
250
|
+
export function extractAddonServicesFromSchema(subscriptionSchema) {
|
|
251
|
+
const services = [];
|
|
252
|
+
// Look for x-ves-oneof-field-addon_choice
|
|
253
|
+
const addonChoiceKey = "x-ves-oneof-field-addon_choice";
|
|
254
|
+
const addonChoiceValue = subscriptionSchema[addonChoiceKey];
|
|
255
|
+
if (typeof addonChoiceValue === "string") {
|
|
256
|
+
try {
|
|
257
|
+
const addons = JSON.parse(addonChoiceValue);
|
|
258
|
+
if (Array.isArray(addons) && addons.every((a) => typeof a === "string")) {
|
|
259
|
+
for (const addon of addons) {
|
|
260
|
+
services.push({
|
|
261
|
+
serviceId: addon,
|
|
262
|
+
displayName: formatAddonDisplayName(addon),
|
|
263
|
+
tier: extractTierFromAddon(addon),
|
|
264
|
+
description: undefined, // Could be extracted from property description
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
catch {
|
|
270
|
+
// Invalid JSON, skip
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return services;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Format an addon service ID into a display name
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* formatAddonDisplayName("f5xc_waap_advanced")
|
|
280
|
+
* // => "F5XC WAAP Advanced"
|
|
281
|
+
*/
|
|
282
|
+
export function formatAddonDisplayName(serviceId) {
|
|
283
|
+
return serviceId
|
|
284
|
+
.replace(/^f5xc_/, "F5XC ")
|
|
285
|
+
.replace(/_/g, " ")
|
|
286
|
+
.split(" ")
|
|
287
|
+
.map((word) => {
|
|
288
|
+
// Keep common acronyms uppercase
|
|
289
|
+
if (["F5XC", "WAAP", "CDN", "API", "WAF", "DNS"].includes(word.toUpperCase())) {
|
|
290
|
+
return word.toUpperCase();
|
|
291
|
+
}
|
|
292
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
293
|
+
})
|
|
294
|
+
.join(" ");
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Extract tier level from addon service ID
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* extractTierFromAddon("f5xc_waap_advanced") // => "advanced"
|
|
301
|
+
* extractTierFromAddon("f5xc_waap_standard") // => "standard"
|
|
302
|
+
*/
|
|
303
|
+
export function extractTierFromAddon(serviceId) {
|
|
304
|
+
const tiers = ["advanced", "standard", "premium", "basic", "enterprise"];
|
|
305
|
+
const lowerServiceId = serviceId.toLowerCase();
|
|
306
|
+
for (const tier of tiers) {
|
|
307
|
+
if (lowerServiceId.includes(tier)) {
|
|
308
|
+
return tier;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return "standard"; // Default tier
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Extract all subscription services from a billing spec
|
|
315
|
+
*
|
|
316
|
+
* @param billingSpec - Parsed billing_and_usage.json spec
|
|
317
|
+
* @returns Array of addon service definitions
|
|
318
|
+
*/
|
|
319
|
+
export function extractSubscriptionServices(billingSpec) {
|
|
320
|
+
const schemas = billingSpec.schemas || {};
|
|
321
|
+
// Look for subscriptionSubscribeRequest schema
|
|
322
|
+
const subscribeSchema = schemas.subscriptionSubscribeRequest;
|
|
323
|
+
if (subscribeSchema && typeof subscribeSchema === "object") {
|
|
324
|
+
return extractAddonServicesFromSchema(subscribeSchema);
|
|
325
|
+
}
|
|
326
|
+
// Fallback: look for any schema with x-ves-oneof-field-addon_choice
|
|
327
|
+
for (const schemaName of Object.keys(schemas)) {
|
|
328
|
+
const schema = schemas[schemaName];
|
|
329
|
+
if (schema && typeof schema === "object") {
|
|
330
|
+
const schemaObj = schema;
|
|
331
|
+
if ("x-ves-oneof-field-addon_choice" in schemaObj) {
|
|
332
|
+
return extractAddonServicesFromSchema(schemaObj);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
return [];
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Extract dependencies from a single operation's request body schema
|
|
340
|
+
*
|
|
341
|
+
* @param requestBodySchema - The operation's request body schema
|
|
342
|
+
* @param componentSchemas - All component schemas for resolving references
|
|
343
|
+
* @returns Extracted dependencies including references and oneOf groups
|
|
344
|
+
*/
|
|
345
|
+
export function extractOperationDependencies(requestBodySchema, componentSchemas) {
|
|
346
|
+
const result = {
|
|
347
|
+
references: [],
|
|
348
|
+
oneOfGroups: [],
|
|
349
|
+
};
|
|
350
|
+
if (!requestBodySchema) {
|
|
351
|
+
return result;
|
|
352
|
+
}
|
|
353
|
+
// Extract references from the request body schema
|
|
354
|
+
result.references = extractRefPatterns(requestBodySchema);
|
|
355
|
+
// If the request body has a $ref, also look in that component schema
|
|
356
|
+
if ("$ref" in requestBodySchema && typeof requestBodySchema.$ref === "string") {
|
|
357
|
+
const parsed = parseRef(requestBodySchema.$ref);
|
|
358
|
+
if (parsed?.schemaName) {
|
|
359
|
+
const componentSchema = componentSchemas[parsed.schemaName];
|
|
360
|
+
if (componentSchema && typeof componentSchema === "object") {
|
|
361
|
+
// Extract oneOf patterns from the component schema
|
|
362
|
+
result.oneOfGroups = extractOneOfPatterns(componentSchema);
|
|
363
|
+
// Also extract nested references from the component schema
|
|
364
|
+
const componentRefs = extractRefPatterns(componentSchema);
|
|
365
|
+
result.references.push(...componentRefs);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
// Deduplicate references by resourceType + fieldPath
|
|
370
|
+
const seenRefs = new Set();
|
|
371
|
+
result.references = result.references.filter((ref) => {
|
|
372
|
+
const key = `${ref.resourceType}:${ref.fieldPath}`;
|
|
373
|
+
if (seenRefs.has(key)) {
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
seenRefs.add(key);
|
|
377
|
+
return true;
|
|
378
|
+
});
|
|
379
|
+
return result;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Map known resources to their required subscription services
|
|
383
|
+
* This is a heuristic mapping based on F5 XC product offerings
|
|
384
|
+
*
|
|
385
|
+
* @param resource - Resource name (e.g., "http-loadbalancer")
|
|
386
|
+
* @param domain - Domain name (e.g., "virtual")
|
|
387
|
+
* @returns Array of subscription service IDs that may be required
|
|
388
|
+
*/
|
|
389
|
+
export function mapResourceToSubscriptions(resource, domain) {
|
|
390
|
+
const subscriptions = [];
|
|
391
|
+
// WAAP-related resources
|
|
392
|
+
const waapResources = [
|
|
393
|
+
"app-firewall",
|
|
394
|
+
"waf",
|
|
395
|
+
"service-policy",
|
|
396
|
+
"rate-limiter",
|
|
397
|
+
"api-definition",
|
|
398
|
+
"api-security",
|
|
399
|
+
"data-guard",
|
|
400
|
+
"trusted-client",
|
|
401
|
+
"malicious-user",
|
|
402
|
+
"client-side-defense",
|
|
403
|
+
"service-policy-set",
|
|
404
|
+
];
|
|
405
|
+
const waapDomains = ["waf", "api", "rate_limiting", "bot_and_threat_defense"];
|
|
406
|
+
if (waapResources.some((r) => resource.includes(r)) || waapDomains.includes(domain)) {
|
|
407
|
+
subscriptions.push("f5xc_waap_standard", "f5xc_waap_advanced");
|
|
408
|
+
}
|
|
409
|
+
// CDN-related resources
|
|
410
|
+
const cdnResources = ["cdn-loadbalancer", "cdn-origin", "cdn-origin-pool"];
|
|
411
|
+
if (cdnResources.some((r) => resource.includes(r)) || domain === "cdn") {
|
|
412
|
+
subscriptions.push("f5xc_content_delivery_network_standard");
|
|
413
|
+
}
|
|
414
|
+
// SecureMesh-related resources
|
|
415
|
+
const meshResources = ["site-mesh-group", "mesh-policy", "global-network"];
|
|
416
|
+
if (meshResources.some((r) => resource.includes(r)) ||
|
|
417
|
+
domain === "service_mesh" ||
|
|
418
|
+
domain === "network_security") {
|
|
419
|
+
subscriptions.push("f5xc_securemesh_standard", "f5xc_securemesh_advanced");
|
|
420
|
+
}
|
|
421
|
+
// AppStack-related resources
|
|
422
|
+
if (domain === "managed_kubernetes" || resource.includes("vk8s")) {
|
|
423
|
+
subscriptions.push("f5xc_appstack_standard");
|
|
424
|
+
}
|
|
425
|
+
// Site management resources
|
|
426
|
+
const siteResources = ["site", "fleet", "token", "tunnel"];
|
|
427
|
+
if (siteResources.some((r) => resource.includes(r)) || domain === "sites") {
|
|
428
|
+
subscriptions.push("f5xc_site_management_standard");
|
|
429
|
+
}
|
|
430
|
+
return [...new Set(subscriptions)]; // Deduplicate
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Domain mapping for resource types
|
|
434
|
+
* Maps common resource type patterns to their typical domains
|
|
435
|
+
*/
|
|
436
|
+
export const RESOURCE_DOMAIN_MAP = {
|
|
437
|
+
"origin-pool": "network",
|
|
438
|
+
origin_pool: "network",
|
|
439
|
+
"http-loadbalancer": "virtual",
|
|
440
|
+
http_loadbalancer: "virtual",
|
|
441
|
+
"tcp-loadbalancer": "virtual",
|
|
442
|
+
tcp_loadbalancer: "virtual",
|
|
443
|
+
"dns-lb-pool": "dns",
|
|
444
|
+
dns_lb_pool: "dns",
|
|
445
|
+
"dns-zone": "dns",
|
|
446
|
+
dns_zone: "dns",
|
|
447
|
+
"app-firewall": "waf",
|
|
448
|
+
app_firewall: "waf",
|
|
449
|
+
"service-policy": "network_security",
|
|
450
|
+
service_policy: "network_security",
|
|
451
|
+
certificate: "certificates",
|
|
452
|
+
"api-definition": "api",
|
|
453
|
+
api_definition: "api",
|
|
454
|
+
site: "sites",
|
|
455
|
+
"aws-vpc-site": "sites",
|
|
456
|
+
"azure-vnet-site": "sites",
|
|
457
|
+
"gcp-vpc-site": "sites",
|
|
458
|
+
healthcheck: "network",
|
|
459
|
+
"virtual-host": "virtual",
|
|
460
|
+
namespace: "tenant_and_identity",
|
|
461
|
+
secret: "blindfold",
|
|
462
|
+
token: "authentication",
|
|
463
|
+
};
|
|
464
|
+
/**
|
|
465
|
+
* Resolve a resource type to its domain using the mapping
|
|
466
|
+
*
|
|
467
|
+
* @param resourceType - Normalized resource type
|
|
468
|
+
* @returns Domain string or empty string if unknown
|
|
469
|
+
*/
|
|
470
|
+
export function resolveResourceDomain(resourceType) {
|
|
471
|
+
return (RESOURCE_DOMAIN_MAP[resourceType] || RESOURCE_DOMAIN_MAP[resourceType.replace(/-/g, "_")] || "");
|
|
472
|
+
}
|
|
473
|
+
//# sourceMappingURL=dependency-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-extractor.js","sourceRoot":"","sources":["../../src/generator/dependency-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH;;;GAGG;AACH,MAAM,iBAAiB,GAAG;IACxB,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,YAAY;IACZ,aAAa;IACb,aAAa;IACb,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,MAAM;IACN,UAAU;IACV,QAAQ;IACR,MAAM;CACP,CAAC;AAEF;;GAEG;AACH,MAAM,kBAAkB,GAA2B;IACjD,aAAa,EAAE,QAAQ;IACvB,cAAc,EAAE,QAAQ;IACxB,cAAc,EAAE,SAAS;IACzB,eAAe,EAAE,SAAS;IAC1B,UAAU,EAAE,KAAK;IACjB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,MAAM;IACpB,aAAa,EAAE,QAAQ;IACvB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,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,KAAK;IACf,cAAc,EAAE,KAAK;IACrB,YAAY,EAAE,KAAK;IACnB,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,kBAAkB;IAClC,WAAW,EAAE,cAAc;IAC3B,gBAAgB,EAAE,KAAK;IACvB,cAAc,EAAE,KAAK;IACrB,IAAI,EAAE,OAAO;IACb,cAAc,EAAE,OAAO;IACvB,iBAAiB,EAAE,OAAO;IAC1B,cAAc,EAAE,OAAO;IACvB,WAAW,EAAE,SAAS;IACtB,cAAc,EAAE,SAAS;IACzB,SAAS,EAAE,qBAAqB;IAChC,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,gBAAgB;CACxB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,YAAoB;IACxD,OAAO,CACL,mBAAmB,CAAC,YAAY,CAAC,IAAI,mBAAmB,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAChG,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency Graph Builder
|
|
3
|
+
*
|
|
4
|
+
* Builds a complete resource dependency graph from parsed operations,
|
|
5
|
+
* computes reverse dependencies, and provides topological sorting
|
|
6
|
+
* for resource creation order.
|
|
7
|
+
*/
|
|
8
|
+
import type { ParsedSpec } from "./openapi-parser.js";
|
|
9
|
+
import type { DependencyGraph, ResourceDependencies, DependencyGraphOptions } from "./dependency-types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Build a complete dependency graph from parsed specifications
|
|
12
|
+
*
|
|
13
|
+
* @param specs - Array of parsed specification files
|
|
14
|
+
* @param options - Graph generation options
|
|
15
|
+
* @returns Complete dependency graph
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildDependencyGraph(specs: ParsedSpec[], options?: Partial<DependencyGraphOptions>): DependencyGraph;
|
|
18
|
+
/**
|
|
19
|
+
* Compute topologically sorted creation order for a resource
|
|
20
|
+
* Uses depth-first search with cycle detection
|
|
21
|
+
*
|
|
22
|
+
* @param resourceKey - The resource to compute creation order for
|
|
23
|
+
* @param dependencies - All resource dependencies
|
|
24
|
+
* @param maxDepth - Maximum depth for traversal
|
|
25
|
+
* @returns Array of resource keys in creation order
|
|
26
|
+
*/
|
|
27
|
+
export declare function computeCreationOrder(resourceKey: string, dependencies: Record<string, ResourceDependencies>, maxDepth?: number): string[];
|
|
28
|
+
/**
|
|
29
|
+
* Serialize a dependency graph to JSON-compatible format
|
|
30
|
+
*/
|
|
31
|
+
export declare function serializeDependencyGraph(graph: DependencyGraph): string;
|
|
32
|
+
/**
|
|
33
|
+
* Deserialize a dependency graph from JSON
|
|
34
|
+
*/
|
|
35
|
+
export declare function deserializeDependencyGraph(json: string): DependencyGraph;
|
|
36
|
+
/**
|
|
37
|
+
* Get resources that must be created before a given resource
|
|
38
|
+
*
|
|
39
|
+
* @param resourceKey - The target resource ("domain/resource")
|
|
40
|
+
* @param graph - The dependency graph
|
|
41
|
+
* @returns Array of prerequisite resource keys
|
|
42
|
+
*/
|
|
43
|
+
export declare function getPrerequisites(resourceKey: string, graph: DependencyGraph): string[];
|
|
44
|
+
/**
|
|
45
|
+
* Get resources that depend on a given resource
|
|
46
|
+
*
|
|
47
|
+
* @param resourceKey - The target resource ("domain/resource")
|
|
48
|
+
* @param graph - The dependency graph
|
|
49
|
+
* @returns Array of dependent resource keys
|
|
50
|
+
*/
|
|
51
|
+
export declare function getDependents(resourceKey: string, graph: DependencyGraph): string[];
|
|
52
|
+
/**
|
|
53
|
+
* Get all resources that require a specific subscription
|
|
54
|
+
*
|
|
55
|
+
* @param addonService - The addon service ID
|
|
56
|
+
* @param graph - The dependency graph
|
|
57
|
+
* @returns Array of resource keys requiring this subscription
|
|
58
|
+
*/
|
|
59
|
+
export declare function getResourcesBySubscription(addonService: string, graph: DependencyGraph): string[];
|
|
60
|
+
/**
|
|
61
|
+
* Validate the dependency graph for cycles
|
|
62
|
+
*
|
|
63
|
+
* @param graph - The dependency graph to validate
|
|
64
|
+
* @returns Array of cycle paths found (empty if no cycles)
|
|
65
|
+
*/
|
|
66
|
+
export declare function validateGraph(graph: DependencyGraph): string[][];
|
|
67
|
+
//# sourceMappingURL=dependency-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-graph.d.ts","sourceRoot":"","sources":["../../src/generator/dependency-graph.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EAKpB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAG/B;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,UAAU,EAAE,EACnB,OAAO,GAAE,OAAO,CAAC,sBAAsB,CAAM,GAC5C,eAAe,CAkGjB;AAiGD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EAClD,QAAQ,GAAE,MAAW,GACpB,MAAM,EAAE,CAqCV;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAWvE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAWxE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,MAAM,EAAE,CAOtF;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,MAAM,EAAE,CAOnF;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,MAAM,EAAE,CAEjG;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,EAAE,EAAE,CA2ChE"}
|