@techdocs/cli 0.0.0-nightly-20251003023737 → 0.0.0-nightly-20251009023727
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/CHANGELOG.md +8 -4
- package/dist/embedded-app/.config-schema.json +99 -99
- package/dist/embedded-app/index.html +6 -2
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/{3058.4fcf00d8.chunk.js → 3058.ebf1e6e8.chunk.js} +3 -3
- package/dist/embedded-app/static/{3058.4fcf00d8.chunk.js.map → 3058.ebf1e6e8.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8189.e92b520c.chunk.js → 8189.458f183d.chunk.js} +2 -2
- package/dist/embedded-app/static/{8189.e92b520c.chunk.js.map → 8189.458f183d.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{main.593504a7.js → main.e8d74ffe.js} +18 -18
- package/dist/embedded-app/static/{main.593504a7.js.map → main.e8d74ffe.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.bdaa41ef.js → runtime.eb33ae54.js} +2 -2
- package/dist/embedded-app/static/{runtime.bdaa41ef.js.map → runtime.eb33ae54.js.map} +1 -1
- package/dist/lib/httpServer.cjs.js +20 -0
- package/dist/lib/httpServer.cjs.js.map +1 -1
- package/dist/lib/livereload.cjs.js +95 -0
- package/dist/lib/livereload.cjs.js.map +1 -0
- package/dist/package.json.cjs.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20251009023727
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 43afbe5: Techdocs CLI serve supports automatic refresh, relying on `mkdocs` `watch` feature.
|
|
4
8
|
|
|
5
9
|
### Patch Changes
|
|
6
10
|
|
|
7
11
|
- Updated dependencies
|
|
8
|
-
- @backstage/backend-defaults@0.0.0-nightly-
|
|
9
|
-
- @backstage/config@0.0.0-nightly-
|
|
10
|
-
- @backstage/plugin-techdocs-node@0.0.0-nightly-
|
|
12
|
+
- @backstage/backend-defaults@0.0.0-nightly-20251009023727
|
|
13
|
+
- @backstage/config@0.0.0-nightly-20251009023727
|
|
14
|
+
- @backstage/plugin-techdocs-node@0.0.0-nightly-20251009023727
|
|
11
15
|
- @backstage/catalog-model@1.7.5
|
|
12
16
|
- @backstage/cli-common@0.1.15
|
|
13
17
|
|
|
@@ -1456,105 +1456,6 @@
|
|
|
1456
1456
|
},
|
|
1457
1457
|
"packageName": "@backstage/plugin-auth-backend-module-guest-provider"
|
|
1458
1458
|
},
|
|
1459
|
-
{
|
|
1460
|
-
"path": "../backend-app-api/config.d.ts",
|
|
1461
|
-
"value": {
|
|
1462
|
-
"type": "object",
|
|
1463
|
-
"properties": {
|
|
1464
|
-
"backend": {
|
|
1465
|
-
"type": "object",
|
|
1466
|
-
"properties": {
|
|
1467
|
-
"packages": {
|
|
1468
|
-
"description": "Used by the feature discovery service",
|
|
1469
|
-
"anyOf": [
|
|
1470
|
-
{
|
|
1471
|
-
"type": "object",
|
|
1472
|
-
"properties": {
|
|
1473
|
-
"include": {
|
|
1474
|
-
"type": "array",
|
|
1475
|
-
"items": {
|
|
1476
|
-
"type": "string"
|
|
1477
|
-
}
|
|
1478
|
-
},
|
|
1479
|
-
"exclude": {
|
|
1480
|
-
"type": "array",
|
|
1481
|
-
"items": {
|
|
1482
|
-
"type": "string"
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
},
|
|
1487
|
-
{
|
|
1488
|
-
"const": "all",
|
|
1489
|
-
"type": "string"
|
|
1490
|
-
}
|
|
1491
|
-
]
|
|
1492
|
-
},
|
|
1493
|
-
"startup": {
|
|
1494
|
-
"type": "object",
|
|
1495
|
-
"properties": {
|
|
1496
|
-
"default": {
|
|
1497
|
-
"type": "object",
|
|
1498
|
-
"properties": {
|
|
1499
|
-
"onPluginBootFailure": {
|
|
1500
|
-
"description": "The default value for `onPluginBootFailure` if not specified for a particular plugin.\nThis defaults to 'abort', which means `onPluginBootFailure: continue` must be specified\nfor backend startup to continue on plugin boot failure. This can also be set to\n'continue', which flips the logic for individual plugins so that they must be set to\n`onPluginBootFailure: abort` to be required.",
|
|
1501
|
-
"enum": [
|
|
1502
|
-
"abort",
|
|
1503
|
-
"continue"
|
|
1504
|
-
],
|
|
1505
|
-
"type": "string"
|
|
1506
|
-
},
|
|
1507
|
-
"onPluginModuleBootFailure": {
|
|
1508
|
-
"description": "The default value for `onPluginModuleBootFailure` if not specified for a particular plugin module.\nThis defaults to 'abort', which means `onPluginModuleBootFailure: continue` must be specified\nfor backend startup to continue on plugin module boot failure. This can also be set to\n'continue', which flips the logic for individual plugin modules so that they must be set to\n`onPluginModuleBootFailure: abort` to be required.",
|
|
1509
|
-
"enum": [
|
|
1510
|
-
"abort",
|
|
1511
|
-
"continue"
|
|
1512
|
-
],
|
|
1513
|
-
"type": "string"
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
},
|
|
1517
|
-
"plugins": {
|
|
1518
|
-
"type": "object",
|
|
1519
|
-
"additionalProperties": {
|
|
1520
|
-
"type": "object",
|
|
1521
|
-
"properties": {
|
|
1522
|
-
"onPluginBootFailure": {
|
|
1523
|
-
"description": "Used to control backend startup behavior when this plugin fails to boot up. Setting\nthis to `continue` allows the backend to continue starting up, even if this plugin\nfails. This can enable leaving a crashing plugin installed, but still permit backend\nstartup, which may help troubleshoot data-dependent issues. Plugin failures for plugins\nset to `abort` are fatal (this is the default unless overridden by the `default`\nsetting).",
|
|
1524
|
-
"enum": [
|
|
1525
|
-
"abort",
|
|
1526
|
-
"continue"
|
|
1527
|
-
],
|
|
1528
|
-
"type": "string"
|
|
1529
|
-
},
|
|
1530
|
-
"modules": {
|
|
1531
|
-
"type": "object",
|
|
1532
|
-
"additionalProperties": {
|
|
1533
|
-
"type": "object",
|
|
1534
|
-
"properties": {
|
|
1535
|
-
"onPluginModuleBootFailure": {
|
|
1536
|
-
"description": "Used to control backend startup behavior when this plugin module fails to boot up. Setting\nthis to `continue` allows the backend to continue starting up, even if this plugin\nmodule fails. This can enable leaving a crashing plugin installed, but still permit backend\nstartup, which may help troubleshoot data-dependent issues. Plugin module failures for plugin modules\nset to `abort` are fatal (this is the default unless overridden by the `default`\nsetting).",
|
|
1537
|
-
"enum": [
|
|
1538
|
-
"abort",
|
|
1539
|
-
"continue"
|
|
1540
|
-
],
|
|
1541
|
-
"type": "string"
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
},
|
|
1554
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1555
|
-
},
|
|
1556
|
-
"packageName": "@backstage/backend-app-api"
|
|
1557
|
-
},
|
|
1558
1459
|
{
|
|
1559
1460
|
"path": "../backend-defaults/config.d.ts",
|
|
1560
1461
|
"value": {
|
|
@@ -3151,6 +3052,105 @@
|
|
|
3151
3052
|
},
|
|
3152
3053
|
"packageName": "@backstage/plugin-events-node"
|
|
3153
3054
|
},
|
|
3055
|
+
{
|
|
3056
|
+
"path": "../backend-app-api/config.d.ts",
|
|
3057
|
+
"value": {
|
|
3058
|
+
"type": "object",
|
|
3059
|
+
"properties": {
|
|
3060
|
+
"backend": {
|
|
3061
|
+
"type": "object",
|
|
3062
|
+
"properties": {
|
|
3063
|
+
"packages": {
|
|
3064
|
+
"description": "Used by the feature discovery service",
|
|
3065
|
+
"anyOf": [
|
|
3066
|
+
{
|
|
3067
|
+
"type": "object",
|
|
3068
|
+
"properties": {
|
|
3069
|
+
"include": {
|
|
3070
|
+
"type": "array",
|
|
3071
|
+
"items": {
|
|
3072
|
+
"type": "string"
|
|
3073
|
+
}
|
|
3074
|
+
},
|
|
3075
|
+
"exclude": {
|
|
3076
|
+
"type": "array",
|
|
3077
|
+
"items": {
|
|
3078
|
+
"type": "string"
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
}
|
|
3082
|
+
},
|
|
3083
|
+
{
|
|
3084
|
+
"const": "all",
|
|
3085
|
+
"type": "string"
|
|
3086
|
+
}
|
|
3087
|
+
]
|
|
3088
|
+
},
|
|
3089
|
+
"startup": {
|
|
3090
|
+
"type": "object",
|
|
3091
|
+
"properties": {
|
|
3092
|
+
"default": {
|
|
3093
|
+
"type": "object",
|
|
3094
|
+
"properties": {
|
|
3095
|
+
"onPluginBootFailure": {
|
|
3096
|
+
"description": "The default value for `onPluginBootFailure` if not specified for a particular plugin.\nThis defaults to 'abort', which means `onPluginBootFailure: continue` must be specified\nfor backend startup to continue on plugin boot failure. This can also be set to\n'continue', which flips the logic for individual plugins so that they must be set to\n`onPluginBootFailure: abort` to be required.",
|
|
3097
|
+
"enum": [
|
|
3098
|
+
"abort",
|
|
3099
|
+
"continue"
|
|
3100
|
+
],
|
|
3101
|
+
"type": "string"
|
|
3102
|
+
},
|
|
3103
|
+
"onPluginModuleBootFailure": {
|
|
3104
|
+
"description": "The default value for `onPluginModuleBootFailure` if not specified for a particular plugin module.\nThis defaults to 'abort', which means `onPluginModuleBootFailure: continue` must be specified\nfor backend startup to continue on plugin module boot failure. This can also be set to\n'continue', which flips the logic for individual plugin modules so that they must be set to\n`onPluginModuleBootFailure: abort` to be required.",
|
|
3105
|
+
"enum": [
|
|
3106
|
+
"abort",
|
|
3107
|
+
"continue"
|
|
3108
|
+
],
|
|
3109
|
+
"type": "string"
|
|
3110
|
+
}
|
|
3111
|
+
}
|
|
3112
|
+
},
|
|
3113
|
+
"plugins": {
|
|
3114
|
+
"type": "object",
|
|
3115
|
+
"additionalProperties": {
|
|
3116
|
+
"type": "object",
|
|
3117
|
+
"properties": {
|
|
3118
|
+
"onPluginBootFailure": {
|
|
3119
|
+
"description": "Used to control backend startup behavior when this plugin fails to boot up. Setting\nthis to `continue` allows the backend to continue starting up, even if this plugin\nfails. This can enable leaving a crashing plugin installed, but still permit backend\nstartup, which may help troubleshoot data-dependent issues. Plugin failures for plugins\nset to `abort` are fatal (this is the default unless overridden by the `default`\nsetting).",
|
|
3120
|
+
"enum": [
|
|
3121
|
+
"abort",
|
|
3122
|
+
"continue"
|
|
3123
|
+
],
|
|
3124
|
+
"type": "string"
|
|
3125
|
+
},
|
|
3126
|
+
"modules": {
|
|
3127
|
+
"type": "object",
|
|
3128
|
+
"additionalProperties": {
|
|
3129
|
+
"type": "object",
|
|
3130
|
+
"properties": {
|
|
3131
|
+
"onPluginModuleBootFailure": {
|
|
3132
|
+
"description": "Used to control backend startup behavior when this plugin module fails to boot up. Setting\nthis to `continue` allows the backend to continue starting up, even if this plugin\nmodule fails. This can enable leaving a crashing plugin installed, but still permit backend\nstartup, which may help troubleshoot data-dependent issues. Plugin module failures for plugin modules\nset to `abort` are fatal (this is the default unless overridden by the `default`\nsetting).",
|
|
3133
|
+
"enum": [
|
|
3134
|
+
"abort",
|
|
3135
|
+
"continue"
|
|
3136
|
+
],
|
|
3137
|
+
"type": "string"
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
3148
|
+
}
|
|
3149
|
+
},
|
|
3150
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
3151
|
+
},
|
|
3152
|
+
"packageName": "@backstage/backend-app-api"
|
|
3153
|
+
},
|
|
3154
3154
|
{
|
|
3155
3155
|
"path": "../../plugins/auth-backend-module-google-provider/config.d.ts",
|
|
3156
3156
|
"value": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.eb33ae54.js"></script><script defer="defer" src="/static/module-material-ui.d59b3501.js"></script><script defer="defer" src="/static/module-lodash.011b7e00.js"></script><script defer="defer" src="/static/module-date-fns.0117079c.js"></script><script defer="defer" src="/static/module-mui.642fff5d.js"></script><script defer="defer" src="/static/module-material-table.fb5299bb.js"></script><script defer="defer" src="/static/module-zod.76c8aba2.js"></script><script defer="defer" src="/static/module-react-dom.e3032225.js"></script><script defer="defer" src="/static/module-i18next.93181ae4.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.4021175e.js"></script><script defer="defer" src="/static/module-remix-run.df99de31.js"></script><script defer="defer" src="/static/vendor.06d5fbda.js"></script><script defer="defer" src="/static/main.e8d74ffe.js"></script><script type="backstage.io/config">[
|
|
2
2
|
{
|
|
3
3
|
"context": "app-config.yaml",
|
|
4
4
|
"data": {
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
"baseUrl": "http://localhost:3000"
|
|
11
11
|
},
|
|
12
12
|
"techdocs": {
|
|
13
|
-
"builder": "external"
|
|
13
|
+
"builder": "external",
|
|
14
|
+
"sanitizer": {
|
|
15
|
+
"allowedCustomElementTagNameRegExp": "^live-reload$",
|
|
16
|
+
"allowedCustomElementAttributeNameRegExp": "^live-reload-(epoch|request-id)$"
|
|
17
|
+
}
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
color="#5bbad5"
|
|
43
43
|
/>
|
|
44
44
|
<title><%= config.getString('app.title') %></title>
|
|
45
|
-
<meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.
|
|
45
|
+
<meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.eb33ae54.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.d59b3501.js"></script><script defer src="<%= publicPath %>/static/module-lodash.011b7e00.js"></script><script defer src="<%= publicPath %>/static/module-date-fns.0117079c.js"></script><script defer src="<%= publicPath %>/static/module-mui.642fff5d.js"></script><script defer src="<%= publicPath %>/static/module-material-table.fb5299bb.js"></script><script defer src="<%= publicPath %>/static/module-zod.76c8aba2.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.e3032225.js"></script><script defer src="<%= publicPath %>/static/module-i18next.93181ae4.js"></script><script defer src="<%= publicPath %>/static/module-react-beautiful-dnd.4021175e.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.df99de31.js"></script><script defer src="<%= publicPath %>/static/vendor.06d5fbda.js"></script><script defer src="<%= publicPath %>/static/main.e8d74ffe.js"></script></head>
|
|
46
46
|
<body>
|
|
47
47
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
48
48
|
<div id="root"></div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["3058"],{23490:function(e,t,n){n.d(t,{O:()=>r});var a=n(73557);function r(e){return(0,a.UO)()}},5e4:function(e,t,n){n.d(t,{X2:()=>u,ce:()=>d,h$:()=>c});var a=n(52322),r=n(39381),s=n(60214),o=n(18011),i=n(88260);let l=(0,o.CT)("entity-context"),c=e=>{let{children:t,entity:n,loading:o,error:c,refresh:u}=e;return(0,a.jsx)(l.Provider,{value:(0,i.E)({1:{entity:n,loading:o,error:c,refresh:u}}),children:(0,a.jsx)(s.fC,{attributes:{...n?{entityRef:(0,r.eE)(n)}:void 0},children:t})})};function u(){let e=(0,o.Vt)("entity-context");if(!e)throw Error("Entity context is not available");let t=e.atVersion(1);if(!t)throw Error("EntityContext v1 not available");if(!t.entity)throw Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:t.entity}}function d(){let e=(0,o.Vt)("entity-context");if(!e)throw Error("Entity context is not available");let t=e.atVersion(1);if(!t)throw Error("EntityContext v1 not available");let{entity:n,loading:a,error:r,refresh:s}=t;return{entity:n,loading:a,error:r,refresh:s}}},55195:function(e,t,n){n.r(t),n.d(t,{Router:()=>A,EmbeddedDocsRouter:()=>$,TechDocsReaderRouter:()=>M,LegacyEmbeddedDocsRouter:()=>I,isTechDocsAvailable:()=>Z});var a=n(52322),r=n(73557),s=n(39381),o=n(99503),i=n(25942),l=n(98248),c=n(
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["3058"],{23490:function(e,t,n){n.d(t,{O:()=>r});var a=n(73557);function r(e){return(0,a.UO)()}},5e4:function(e,t,n){n.d(t,{X2:()=>u,ce:()=>d,h$:()=>c});var a=n(52322),r=n(39381),s=n(60214),o=n(18011),i=n(88260);let l=(0,o.CT)("entity-context"),c=e=>{let{children:t,entity:n,loading:o,error:c,refresh:u}=e;return(0,a.jsx)(l.Provider,{value:(0,i.E)({1:{entity:n,loading:o,error:c,refresh:u}}),children:(0,a.jsx)(s.fC,{attributes:{...n?{entityRef:(0,r.eE)(n)}:void 0},children:t})})};function u(){let e=(0,o.Vt)("entity-context");if(!e)throw Error("Entity context is not available");let t=e.atVersion(1);if(!t)throw Error("EntityContext v1 not available");if(!t.entity)throw Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:t.entity}}function d(){let e=(0,o.Vt)("entity-context");if(!e)throw Error("Entity context is not available");let t=e.atVersion(1);if(!t)throw Error("EntityContext v1 not available");let{entity:n,loading:a,error:r,refresh:s}=t;return{entity:n,loading:a,error:r,refresh:s}}},55195:function(e,t,n){n.r(t),n.d(t,{Router:()=>A,EmbeddedDocsRouter:()=>$,TechDocsReaderRouter:()=>M,LegacyEmbeddedDocsRouter:()=>I,isTechDocsAvailable:()=>Z});var a=n(52322),r=n(73557),s=n(39381),o=n(99503),i=n(25942),l=n(98248),c=n(46115),u=n(33741),d=n(2784),h=n(93048),p=n(51173);let m=e=>e.replace(/\/+$/,""),x=({entity:e,withSearch:t=!0})=>{let n=(0,s.iB)(e),r=function(e){let{kind:t,name:n,namespace:a}=e,r=(0,h.t)(p.Fw),s=(0,h.t)(p.pd);return(0,d.useMemo)(()=>{let e=m(r({kind:t,namespace:a,name:n})),o=m(s());return t=>{if(t.toLocaleLowerCase("en-US").startsWith(e.toLocaleLowerCase("en-US"))){let n=t.slice(e.length).replace(/^\/+/,"");return 0===n.length||n.startsWith("#")?`${o}${n}`:`${o}/${n}`}return t}},[r,s,t,n,a])}(n);if(e.metadata.annotations?.[o.Un])try{n=(0,s.of)(e.metadata.annotations?.[o.Un])}catch{}let x=(0,i.IG)(e);return(0,a.jsxs)(l.I6,{entityRef:n,children:[(0,a.jsx)(u.b,{}),(0,a.jsx)(c.F,{withSearch:t,searchResultUrlMapper:r,defaultPath:x})]})};var g=n(84377),f=n(49447),y=n(5e4),j=n(53244),w=n(77277),v=n(79692),b=n(90436),C=n(24780),E=n(12753),k=n(13039);let S=(0,v.Z)(e=>({code:{borderRadius:6,margin:e.spacing(2,0),background:"dark"===e.palette.type?"#444":e.palette.common.white}}),{name:"BackstageMissingAnnotationEmptyState"});function R(e){let t;try{t=(0,y.X2)().entity}catch(e){}let{annotation:n,readMoreUrl:r}=e,s=Array.isArray(n)?n:[n],o=S(),i=t?.kind||"Component",{yamlText:l,lineNumbers:c}=function(e,t){let n=t?.kind||"Component",a=t?.metadata.name||"example",r=t?.spec?.type||"website",s=t?.spec?.owner||"user:default/guest",o=`apiVersion: backstage.io/v1alpha1
|
|
2
2
|
kind: ${n}
|
|
3
3
|
metadata:
|
|
4
4
|
name: ${a}
|
|
@@ -6,5 +6,5 @@ metadata:
|
|
|
6
6
|
${e}: value`).join("")}
|
|
7
7
|
spec:
|
|
8
8
|
type: ${r}
|
|
9
|
-
owner: ${s}`,i=6,l=[];return e.forEach(()=>{l.push(i),i++}),{yamlText:o,lineNumbers:l}}(s,t);return(0,a.jsx)(C.u,{missing:"field",title:"Missing Annotation",description:function(e,t="Component"){let n=e.length<=1;return(0,a.jsxs)(a.Fragment,{children:["The ",n?"annotation":"annotations"," ",e.map(e=>(0,a.jsx)("code",{children:e})).reduce((e,t)=>(0,a.jsxs)(a.Fragment,{children:[e,", ",t]}))," ",n?"is":"are"," missing. You need to add the"," ",n?"annotation":"annotations"," to your ",t," if you want to enable this tool."]})}(s,i),action:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.Z,{variant:"body1",children:["Add the annotation to your ",i," YAML as shown in the highlighted example below:"]}),(0,a.jsx)(j.Z,{className:o.code,children:(0,a.jsx)(E.O,{text:l,language:"yaml",showLineNumbers:!0,highlightedNumbers:c,customStyle:{background:"inherit",fontSize:"115%"}})}),(0,a.jsx)(w.Z,{color:"primary",component:k.rU,to:r||"https://backstage.io/docs/features/software-catalog/well-known-annotations",children:"Read more"})]})})}let Z=e=>!!e?.metadata?.annotations?.[o.w5]||!!e?.metadata?.annotations?.[o.Un],A=()=>(0,a.jsxs)(r.Z5,{children:[(0,a.jsx)(r.AW,{path:"/",element:(0,a.jsx)(g.TechDocsIndexPage,{})}),(0,a.jsx)(r.AW,{path:"/:namespace/:kind/:name/*",element:(0,a.jsx)(f.I,{})})]}),M=e=>{let{children:t}=e;return(0,r.V$)([{path:"*",element:(0,a.jsx)(f.I,{}),children:[{path:"*",element:t}]}])},$=e=>{let{children:t,emptyState:n,withSearch:s=!0}=e,{entity:i}=(0,y.X2)(),l=(0,r.V$)([{path:"/*",element:(0,a.jsx)(x,{entity:i,withSearch:s}),children:[{path:"*",element:t}]}]);return i.metadata.annotations?.[o.w5]||i.metadata.annotations?.[o.Un]?l:n??(0,a.jsx)(R,{annotation:[o.w5]})},I=({children:e,withSearch:t=!0})=>(0,a.jsx)($,{children:e,withSearch:t})},84377:function(e,t,n){n.r(t),n.d(t,{TechDocsIndexPage:()=>o});var a=n(52322),r=n(73557),s=n(74556);let o=e=>(0,r.pC)()||(0,a.jsx)(s.u,{...e})},49447:function(e,t,n){n.d(t,{r:()=>T,I:()=>_});var a=n(52322),r=n(2784),s=n(73557),o=n(64796),i=n(25942),l=n(98049),c=n(31546),u=n(99503),d=n(4812),h=n(
|
|
10
|
-
//# sourceMappingURL=3058.
|
|
9
|
+
owner: ${s}`,i=6,l=[];return e.forEach(()=>{l.push(i),i++}),{yamlText:o,lineNumbers:l}}(s,t);return(0,a.jsx)(C.u,{missing:"field",title:"Missing Annotation",description:function(e,t="Component"){let n=e.length<=1;return(0,a.jsxs)(a.Fragment,{children:["The ",n?"annotation":"annotations"," ",e.map(e=>(0,a.jsx)("code",{children:e})).reduce((e,t)=>(0,a.jsxs)(a.Fragment,{children:[e,", ",t]}))," ",n?"is":"are"," missing. You need to add the"," ",n?"annotation":"annotations"," to your ",t," if you want to enable this tool."]})}(s,i),action:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.Z,{variant:"body1",children:["Add the annotation to your ",i," YAML as shown in the highlighted example below:"]}),(0,a.jsx)(j.Z,{className:o.code,children:(0,a.jsx)(E.O,{text:l,language:"yaml",showLineNumbers:!0,highlightedNumbers:c,customStyle:{background:"inherit",fontSize:"115%"}})}),(0,a.jsx)(w.Z,{color:"primary",component:k.rU,to:r||"https://backstage.io/docs/features/software-catalog/well-known-annotations",children:"Read more"})]})})}let Z=e=>!!e?.metadata?.annotations?.[o.w5]||!!e?.metadata?.annotations?.[o.Un],A=()=>(0,a.jsxs)(r.Z5,{children:[(0,a.jsx)(r.AW,{path:"/",element:(0,a.jsx)(g.TechDocsIndexPage,{})}),(0,a.jsx)(r.AW,{path:"/:namespace/:kind/:name/*",element:(0,a.jsx)(f.I,{})})]}),M=e=>{let{children:t}=e;return(0,r.V$)([{path:"*",element:(0,a.jsx)(f.I,{}),children:[{path:"*",element:t}]}])},$=e=>{let{children:t,emptyState:n,withSearch:s=!0}=e,{entity:i}=(0,y.X2)(),l=(0,r.V$)([{path:"/*",element:(0,a.jsx)(x,{entity:i,withSearch:s}),children:[{path:"*",element:t}]}]);return i.metadata.annotations?.[o.w5]||i.metadata.annotations?.[o.Un]?l:n??(0,a.jsx)(R,{annotation:[o.w5]})},I=({children:e,withSearch:t=!0})=>(0,a.jsx)($,{children:e,withSearch:t})},84377:function(e,t,n){n.r(t),n.d(t,{TechDocsIndexPage:()=>o});var a=n(52322),r=n(73557),s=n(74556);let o=e=>(0,r.pC)()||(0,a.jsx)(s.u,{...e})},49447:function(e,t,n){n.d(t,{r:()=>T,I:()=>_});var a=n(52322),r=n(2784),s=n(73557),o=n(64796),i=n(25942),l=n(98049),c=n(31546),u=n(99503),d=n(4812),h=n(46115),p=n(99064),m=n(33741),x=n(51173),g=n(23490),f=n(16162),y=n(93048),j=n(32904),w=n(33414),v=n(40098),b=n(77277),C=n(42412),E=n(51943),k=n(6020),S=n(91246),R=n(26291);function Z(e){let{children:t,...n}=e,{Progress:s}=(0,v.q)().getComponents(),o=function(e){let{pluginId:t}=e??{},n=(0,f.h_)(C.g),a=(0,f.h_)(E.N),s=(0,r.useMemo)(()=>"BroadcastChannel"in window?new BroadcastChannel(`${t}-auth-cookie-expires-at`):null,[t]),[o,i]=function(e,t){let[n,a]=(0,r.useState)({status:"not-executed",error:void 0,result:void 0}),s=(0,r.useRef)(),o=(0,r.useRef)(),i=(0,k.x)({execute(...t){o.current=t;let n=e(...t);return s.current=n,a(e=>({...e,status:"loading"})),n.then(e=>{n===s.current&&a(t=>({...t,status:"success",error:void 0,result:e}))},e=>{n===s.current&&a(t=>({...t,status:"error",error:e}))}),n},reset(){a({status:"not-executed",error:void 0,result:void 0}),s.current=void 0,o.current=void 0}});return[n,(0,r.useMemo)(()=>({reset(){i.current.reset()},execute:(...e)=>i.current.execute(...e)}),[]),{promise:s.current,lastArgs:o.current}]}(async()=>{let e=await a.getBaseUrl(t),r=`${e}/.backstage/auth/v1/cookie`,s=await n.fetch(`${r}`,{credentials:"include"});if(!s.ok){if(404===s.status)return{expiresAt:new Date(Date.now()+31536e6)};throw await R.V.fromResponse(s)}let o=await s.json();if(!o.expiresAt)throw Error("No expiration date found in response");return o});(0,S.n)(i.execute);let l=(0,r.useCallback)(()=>{i.execute()},[i]),c=(0,r.useCallback)(e=>{let t=(1+3*Math.random())*6e4,n=setTimeout(l,Date.parse(e.expiresAt)-Date.now()-t);return()=>clearTimeout(n)},[l]);return((0,r.useEffect)(()=>{if("success"!==o.status||!o.result)return()=>{};s?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:o.result});let e=c(o.result),t=t=>{let{action:n,payload:a}=t.data;"COOKIE_REFRESH_SUCCESS"===n&&(e(),e=c(a))};return s?.addEventListener("message",t),()=>{e(),s?.removeEventListener("message",t)}},[o,c,s]),"not-executed"===o.status||"loading"===o.status&&!o.result||"loading"===o.status&&o.error)?{status:"loading"}:"error"===o.status&&o.error?{status:"error",error:o.error,retry:l}:{status:"success",data:o.result}}(n);return"loading"===o.status?(0,a.jsx)(s,{}):"error"===o.status?(0,a.jsx)(w.y,{error:o.error,children:(0,a.jsx)(b.Z,{variant:"outlined",onClick:o.retry,children:"Retry"})}):(0,a.jsx)(a.Fragment,{children:t})}var A=n(84081),M=n(36363),$=n(60364),I=n(84620),L=n(41547),F=n(77344);let T=e=>{let{withSearch:t,withHeader:n=!0}=e;return(0,a.jsxs)(o.T,{themeId:"documentation",children:[n&&(0,a.jsx)(p.S,{}),(0,a.jsx)(m.b,{}),(0,a.jsx)(h.F,{withSearch:t})]})},U=(0,M.Z)(o.T)({height:"inherit",overflowY:"visible"}),_=e=>{let t=(0,$.Z)(),n=(0,r.useMemo)(()=>(0,I.Z)({...t,...e.overrideThemeOptions||{}}),[t,e.overrideThemeOptions]),{kind:o,name:h,namespace:p}=(0,g.O)(x.Fw),{children:m,entityRef:w={kind:o,name:h,namespace:p}}=e,v=(0,s.pC)(),b=(0,f.h_)(A.A),C=(0,s.s0)(),E=(0,y.t)(x.Fw),k=(0,r.useMemo)(()=>({kind:w.kind,name:w.name,namespace:w.namespace}),[w.kind,w.name,w.namespace]),S=(0,d.Z)(async()=>{try{let e=await b.getEntityByRef(k);if(e?.metadata?.annotations?.[u.Un])return(0,i.Li)(e,E)}catch(e){}},[k,b,E]),R=(0,r.useCallback)(e=>{C(e,{replace:!0})},[C]);(0,r.useEffect)(()=>{!S.loading&&S.value&&R(S.value)},[S.loading,S.value,R]);let M=(0,r.useMemo)(()=>m?null:(v?r.Children.toArray(v.props.children):[]).flatMap(e=>e?.props?.children??[]).find(e=>!(0,j.I)(e,l.Zz)&&!(0,j.I)(e,l.jM)),[m,v]);return S.loading||S.value?(0,a.jsx)(F.E,{}):m?(0,a.jsx)(L.Z,{theme:n,children:(0,a.jsx)(Z,{pluginId:"techdocs",children:(0,a.jsx)(c.Z,{entityRef:k,children:({metadata:e,entityMetadata:t,onReady:n})=>(0,a.jsx)(U,{themeId:"documentation",className:"techdocs-reader-page",children:m instanceof Function?m({entityRef:k,techdocsMetadataValue:e.value,entityMetadataValue:t.value,onReady:n}):m})})})}):(0,a.jsx)(L.Z,{theme:n,children:(0,a.jsx)(Z,{pluginId:"techdocs",children:(0,a.jsx)(c.Z,{entityRef:k,children:M||(0,a.jsx)(T,{})})})})}},33741:function(e,t,n){n.d(t,{b:()=>g});var a=n(52322),r=n(2784),s=n(79692),o=n(61837),i=n(15223),l=n(80030),c=n(48348),u=n(53244),d=n(47603),h=n(31546),p=n(98049),m=n(63424);let x=(0,s.Z)(e=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:e.spacing(3,3,0),"@media print":{display:"none"}}})),g=e=>{let t=x(),[n,s]=(0,r.useState)(null),g=(0,r.useCallback)(e=>{s(e.currentTarget)},[]),f=(0,r.useCallback)(()=>{s(null)},[]),{entityMetadata:{value:y,loading:j}}=(0,h.x)(),w=(0,p.$L)(),v=w.renderComponentsByLocation(m.o.Subheader),b=w.renderComponentsByLocation(m.o.Settings);return(v||b)&&(!1!==j||y)?(0,a.jsx)(i.Z,{classes:t,...e.toolbarProps,children:(0,a.jsxs)(u.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[v,b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.ZP,{title:"Settings",children:(0,a.jsx)(o.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:g,children:(0,a.jsx)(d.default,{})})}),(0,a.jsx)(c.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:!!n,onClose:f,keepMounted:!0,children:(0,a.jsx)("div",{children:b})})]}):null]})}):null}}}]);
|
|
10
|
+
//# sourceMappingURL=3058.ebf1e6e8.chunk.js.map
|