@terasky/backstage-plugin-ai-rules 0.2.1 → 0.3.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/alpha.d.ts +47 -0
- package/dist/alpha.esm.js +21 -0
- package/dist/alpha.esm.js.map +1 -0
- package/package.json +18 -1
package/dist/alpha.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as _backstage_catalog_model from '@backstage/catalog-model';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
4
|
+
import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha';
|
|
5
|
+
|
|
6
|
+
/** @alpha */
|
|
7
|
+
declare const aiRulesPlugin: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{}, {}, {
|
|
8
|
+
"entity-content:ai-rules": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
9
|
+
kind: "entity-content";
|
|
10
|
+
name: undefined;
|
|
11
|
+
config: {
|
|
12
|
+
path: string | undefined;
|
|
13
|
+
title: string | undefined;
|
|
14
|
+
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
15
|
+
group: string | false | undefined;
|
|
16
|
+
};
|
|
17
|
+
configInput: {
|
|
18
|
+
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
19
|
+
title?: string | undefined;
|
|
20
|
+
path?: string | undefined;
|
|
21
|
+
group?: string | false | undefined;
|
|
22
|
+
};
|
|
23
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
24
|
+
optional: true;
|
|
25
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
26
|
+
optional: true;
|
|
27
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
28
|
+
optional: true;
|
|
29
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-group", {
|
|
30
|
+
optional: true;
|
|
31
|
+
}>;
|
|
32
|
+
inputs: {};
|
|
33
|
+
params: {
|
|
34
|
+
defaultPath?: [Error: `Use the 'path' param instead`];
|
|
35
|
+
path: string;
|
|
36
|
+
defaultTitle?: [Error: `Use the 'title' param instead`];
|
|
37
|
+
title: string;
|
|
38
|
+
defaultGroup?: [Error: `Use the 'group' param instead`];
|
|
39
|
+
group?: ("development" | "deployment" | "documentation" | "operation" | "overview" | "observability") | (string & {});
|
|
40
|
+
loader: () => Promise<JSX.Element>;
|
|
41
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
42
|
+
filter?: string | _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
}>;
|
|
46
|
+
|
|
47
|
+
export { aiRulesPlugin };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
|
3
|
+
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
4
|
+
import { isAIRulesAvailable } from './components/AiRulesComponent/AiRulesComponent.esm.js';
|
|
5
|
+
|
|
6
|
+
const aiRulesPlugin = createFrontendPlugin({
|
|
7
|
+
pluginId: "ai-rules",
|
|
8
|
+
extensions: [
|
|
9
|
+
EntityContentBlueprint.make({
|
|
10
|
+
params: {
|
|
11
|
+
path: "/ai-rules",
|
|
12
|
+
filter: isAIRulesAvailable,
|
|
13
|
+
title: "AI Rules",
|
|
14
|
+
loader: () => import('./components/AiRulesComponent/AiRulesComponent.esm.js').then((m) => /* @__PURE__ */ jsx(m.AIRulesComponent, {}))
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
]
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export { aiRulesPlugin };
|
|
21
|
+
//# sourceMappingURL=alpha.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["import {\n createFrontendPlugin,\n} from '@backstage/frontend-plugin-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport { isAIRulesAvailable } from './components/AiRulesComponent';\n\n/** @alpha */\nexport const aiRulesPlugin = createFrontendPlugin({\n pluginId: 'ai-rules',\n extensions: [\n EntityContentBlueprint.make({\n params: {\n path: '/ai-rules',\n filter: isAIRulesAvailable,\n title: 'AI Rules',\n loader: () => import('./components/AiRulesComponent/AiRulesComponent').then(m => <m.AIRulesComponent />),\n },\n }),\n ],\n});"],"names":[],"mappings":";;;;;AAOO,MAAM,gBAAgB,oBAAqB,CAAA;AAAA,EAChD,QAAU,EAAA,UAAA;AAAA,EACV,UAAY,EAAA;AAAA,IACV,uBAAuB,IAAK,CAAA;AAAA,MAC1B,MAAQ,EAAA;AAAA,QACN,IAAM,EAAA,WAAA;AAAA,QACN,MAAQ,EAAA,kBAAA;AAAA,QACR,KAAO,EAAA,UAAA;AAAA,QACP,MAAA,EAAQ,MAAM,OAAO,uDAAgD,CAAA,CAAE,IAAK,CAAA,CAAA,CAAA,qBAAM,GAAA,CAAA,CAAA,CAAE,gBAAF,EAAA,EAAmB,CAAE;AAAA;AACzG,KACD;AAAA;AAEL,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terasky/backstage-plugin-ai-rules",
|
|
3
3
|
"description": "AI Rules Visualizer Plugin for Backstage",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"@backstage/catalog-model": "^1.7.5",
|
|
40
40
|
"@backstage/core-components": "^0.17.5",
|
|
41
41
|
"@backstage/core-plugin-api": "^1.10.9",
|
|
42
|
+
"@backstage/frontend-plugin-api": "^0.11.0",
|
|
42
43
|
"@backstage/plugin-catalog-react": "^1.20.1",
|
|
43
44
|
"@backstage/theme": "^0.6.8",
|
|
44
45
|
"@material-ui/core": "^4.12.4",
|
|
@@ -71,8 +72,24 @@
|
|
|
71
72
|
"copilot",
|
|
72
73
|
"cline"
|
|
73
74
|
],
|
|
75
|
+
"exports": {
|
|
76
|
+
".": {
|
|
77
|
+
"import": "./dist/index.esm.js",
|
|
78
|
+
"types": "./dist/index.d.ts",
|
|
79
|
+
"default": "./dist/index.esm.js"
|
|
80
|
+
},
|
|
81
|
+
"./alpha": {
|
|
82
|
+
"import": "./dist/alpha.esm.js",
|
|
83
|
+
"types": "./dist/alpha.d.ts",
|
|
84
|
+
"default": "./dist/alpha.esm.js"
|
|
85
|
+
},
|
|
86
|
+
"./package.json": "./package.json"
|
|
87
|
+
},
|
|
74
88
|
"typesVersions": {
|
|
75
89
|
"*": {
|
|
90
|
+
"alpha": [
|
|
91
|
+
"dist/alpha.d.ts"
|
|
92
|
+
],
|
|
76
93
|
"package.json": [
|
|
77
94
|
"package.json"
|
|
78
95
|
]
|