@techdocs/cli 1.9.0-next.0 → 1.9.0-next.1

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.
Files changed (25) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/embedded-app/.config-schema.json +322 -46
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/index.html.tmpl +1 -1
  5. package/dist/embedded-app/static/9234.26971228.chunk.js +4 -0
  6. package/dist/embedded-app/static/9234.26971228.chunk.js.map +1 -0
  7. package/dist/embedded-app/static/{main.a2e1e30a.js → main.5b071983.js} +2 -2
  8. package/dist/embedded-app/static/{main.a2e1e30a.js.map → main.5b071983.js.map} +1 -1
  9. package/dist/embedded-app/static/module-remix-run.ae6d33c5.js +13 -0
  10. package/dist/embedded-app/static/module-remix-run.ae6d33c5.js.map +1 -0
  11. package/dist/embedded-app/static/{runtime.a2e1e30a.js → runtime.5b071983.js} +2 -2
  12. package/dist/embedded-app/static/{runtime.a2e1e30a.js.map → runtime.5b071983.js.map} +1 -1
  13. package/dist/embedded-app/static/{vendor.a2e1e30a.js → vendor.5b071983.js} +4 -4
  14. package/dist/embedded-app/static/{vendor.a2e1e30a.js.map → vendor.5b071983.js.map} +1 -1
  15. package/dist/package.json.cjs.js +1 -1
  16. package/package.json +3 -3
  17. package/dist/embedded-app/static/9234.6839c56f.chunk.js +0 -4
  18. package/dist/embedded-app/static/9234.6839c56f.chunk.js.map +0 -1
  19. package/dist/embedded-app/static/module-remix-run.ba6397c2.js +0 -13
  20. package/dist/embedded-app/static/module-remix-run.ba6397c2.js.map +0 -1
  21. /package/dist/embedded-app/static/{createComponent.975d1e1e..svg → createComponent.975d1e1e.svg} +0 -0
  22. /package/dist/embedded-app/static/{mic-drop.fe3ef4d0..svg → mic-drop.fe3ef4d0.svg} +0 -0
  23. /package/dist/embedded-app/static/{missingAnnotation.67f79e98..svg → missingAnnotation.67f79e98.svg} +0 -0
  24. /package/dist/embedded-app/static/{noBuild.1715fa71..svg → noBuild.1715fa71.svg} +0 -0
  25. /package/dist/embedded-app/static/{noInformation.4b426325..svg → noInformation.4b426325.svg} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @techdocs/cli
2
2
 
3
+ ## 1.9.0-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-defaults@0.8.0-next.1
9
+ - @backstage/catalog-model@1.7.3
10
+ - @backstage/cli-common@0.1.15
11
+ - @backstage/config@1.3.2
12
+ - @backstage/plugin-techdocs-node@1.13.0-next.0
13
+
3
14
  ## 1.9.0-next.0
4
15
 
5
16
  ### Minor Changes
@@ -1135,52 +1135,6 @@
1135
1135
  },
1136
1136
  "packageName": "@backstage/backend-plugin-api"
1137
1137
  },
1138
- {
1139
- "path": "../../plugins/auth-backend-module-guest-provider/config.d.ts",
1140
- "value": {
1141
- "type": "object",
1142
- "properties": {
1143
- "auth": {
1144
- "description": "Configuration options for the auth plugin",
1145
- "type": "object",
1146
- "properties": {
1147
- "providers": {
1148
- "type": "object",
1149
- "properties": {
1150
- "guest": {
1151
- "type": "object",
1152
- "properties": {
1153
- "userEntityRef": {
1154
- "description": "The entity reference to use for the guest user.",
1155
- "default": "user:development/guest",
1156
- "type": "string"
1157
- },
1158
- "ownershipEntityRefs": {
1159
- "description": "A list of entity references to user for ownership of the guest user if the user\n is not found in the catalog.",
1160
- "default": "[userEntityRef]",
1161
- "type": "array",
1162
- "items": {
1163
- "type": "string"
1164
- }
1165
- },
1166
- "dangerouslyAllowOutsideDevelopment": {
1167
- "description": "Allow users to sign in with the guest provider outside of their development environments.",
1168
- "type": "boolean"
1169
- }
1170
- }
1171
- }
1172
- }
1173
- }
1174
- },
1175
- "required": [
1176
- "providers"
1177
- ]
1178
- }
1179
- },
1180
- "$schema": "http://json-schema.org/draft-07/schema#"
1181
- },
1182
- "packageName": "@backstage/plugin-auth-backend-module-guest-provider"
1183
- },
1184
1138
  {
1185
1139
  "path": "../../plugins/auth-backend/config.d.ts",
1186
1140
  "value": {
@@ -1439,6 +1393,52 @@
1439
1393
  },
1440
1394
  "packageName": "@backstage/plugin-auth-backend"
1441
1395
  },
1396
+ {
1397
+ "path": "../../plugins/auth-backend-module-guest-provider/config.d.ts",
1398
+ "value": {
1399
+ "type": "object",
1400
+ "properties": {
1401
+ "auth": {
1402
+ "description": "Configuration options for the auth plugin",
1403
+ "type": "object",
1404
+ "properties": {
1405
+ "providers": {
1406
+ "type": "object",
1407
+ "properties": {
1408
+ "guest": {
1409
+ "type": "object",
1410
+ "properties": {
1411
+ "userEntityRef": {
1412
+ "description": "The entity reference to use for the guest user.",
1413
+ "default": "user:development/guest",
1414
+ "type": "string"
1415
+ },
1416
+ "ownershipEntityRefs": {
1417
+ "description": "A list of entity references to user for ownership of the guest user if the user\n is not found in the catalog.",
1418
+ "default": "[userEntityRef]",
1419
+ "type": "array",
1420
+ "items": {
1421
+ "type": "string"
1422
+ }
1423
+ },
1424
+ "dangerouslyAllowOutsideDevelopment": {
1425
+ "description": "Allow users to sign in with the guest provider outside of their development environments.",
1426
+ "type": "boolean"
1427
+ }
1428
+ }
1429
+ }
1430
+ }
1431
+ }
1432
+ },
1433
+ "required": [
1434
+ "providers"
1435
+ ]
1436
+ }
1437
+ },
1438
+ "$schema": "http://json-schema.org/draft-07/schema#"
1439
+ },
1440
+ "packageName": "@backstage/plugin-auth-backend-module-guest-provider"
1441
+ },
1442
1442
  {
1443
1443
  "path": "../../node_modules/@backstage-community/plugin-puppetdb/node_modules/@backstage/core-components/config.d.ts",
1444
1444
  "value": {
@@ -1485,6 +1485,236 @@
1485
1485
  },
1486
1486
  "packageName": "@backstage/core-components"
1487
1487
  },
1488
+ {
1489
+ "path": "../../node_modules/@backstage-community/plugin-puppetdb/node_modules/@backstage/core-app-api/config.d.ts",
1490
+ "value": {
1491
+ "type": "object",
1492
+ "properties": {
1493
+ "app": {
1494
+ "description": "Generic frontend configuration.",
1495
+ "type": "object",
1496
+ "properties": {
1497
+ "baseUrl": {
1498
+ "description": "The public absolute root URL that the frontend.",
1499
+ "visibility": "frontend",
1500
+ "type": "string"
1501
+ },
1502
+ "title": {
1503
+ "description": "The title of the app, as shown in the Backstage web interface.",
1504
+ "visibility": "frontend",
1505
+ "type": "string"
1506
+ },
1507
+ "support": {
1508
+ "description": "Information about support of this Backstage instance and how to contact the integrator team.",
1509
+ "type": "object",
1510
+ "properties": {
1511
+ "url": {
1512
+ "description": "The primary support url.",
1513
+ "visibility": "frontend",
1514
+ "type": "string"
1515
+ },
1516
+ "items": {
1517
+ "description": "A list of categorized support item groupings.",
1518
+ "type": "array",
1519
+ "items": {
1520
+ "type": "object",
1521
+ "properties": {
1522
+ "title": {
1523
+ "description": "The title of the support item grouping.",
1524
+ "visibility": "frontend",
1525
+ "type": "string"
1526
+ },
1527
+ "icon": {
1528
+ "description": "An optional icon for the support item grouping.",
1529
+ "visibility": "frontend",
1530
+ "type": "string"
1531
+ },
1532
+ "links": {
1533
+ "description": "A list of support links for the Backstage instance inside this grouping.",
1534
+ "type": "array",
1535
+ "items": {
1536
+ "type": "object",
1537
+ "properties": {
1538
+ "url": {
1539
+ "visibility": "frontend",
1540
+ "type": "string"
1541
+ },
1542
+ "title": {
1543
+ "visibility": "frontend",
1544
+ "type": "string"
1545
+ }
1546
+ },
1547
+ "required": [
1548
+ "url"
1549
+ ]
1550
+ }
1551
+ }
1552
+ },
1553
+ "required": [
1554
+ "links",
1555
+ "title"
1556
+ ]
1557
+ }
1558
+ }
1559
+ },
1560
+ "required": [
1561
+ "items",
1562
+ "url"
1563
+ ]
1564
+ },
1565
+ "routes": {
1566
+ "type": "object",
1567
+ "properties": {
1568
+ "bindings": {
1569
+ "description": "Maps external route references to regular route references. Both the\nkey and the value is expected to be on the form `<pluginId>.<routeId>`.\nIf the value is `false`, the route will be disabled even if it has a\ndefault mapping.",
1570
+ "deepVisibility": "frontend",
1571
+ "type": "object",
1572
+ "additionalProperties": {
1573
+ "anyOf": [
1574
+ {
1575
+ "const": false,
1576
+ "type": "boolean"
1577
+ },
1578
+ {
1579
+ "type": "string"
1580
+ }
1581
+ ]
1582
+ }
1583
+ }
1584
+ }
1585
+ }
1586
+ },
1587
+ "required": [
1588
+ "baseUrl"
1589
+ ]
1590
+ },
1591
+ "backend": {
1592
+ "description": "Generic backend configuration.",
1593
+ "type": "object",
1594
+ "properties": {
1595
+ "baseUrl": {
1596
+ "description": "The public absolute root URL that the backend is reachable at, from the browser's perspective.",
1597
+ "visibility": "frontend",
1598
+ "type": "string"
1599
+ }
1600
+ },
1601
+ "required": [
1602
+ "baseUrl"
1603
+ ]
1604
+ },
1605
+ "organization": {
1606
+ "description": "Configuration that provides information about the organization that the app is for.",
1607
+ "type": "object",
1608
+ "properties": {
1609
+ "name": {
1610
+ "description": "The name of the organization that the app belongs to.",
1611
+ "visibility": "frontend",
1612
+ "type": "string"
1613
+ }
1614
+ }
1615
+ },
1616
+ "homepage": {
1617
+ "description": "This config was used by the HomepageTimer but has been replaced by the HeaderWorldClock in the home plugin",
1618
+ "deprecated": "in favor of the HeaderWorldClock which is found in the home plugin",
1619
+ "type": "object",
1620
+ "properties": {
1621
+ "clocks": {
1622
+ "type": "array",
1623
+ "items": {
1624
+ "type": "object",
1625
+ "properties": {
1626
+ "label": {
1627
+ "visibility": "frontend",
1628
+ "type": "string"
1629
+ },
1630
+ "timezone": {
1631
+ "visibility": "frontend",
1632
+ "type": "string"
1633
+ }
1634
+ },
1635
+ "required": [
1636
+ "label",
1637
+ "timezone"
1638
+ ]
1639
+ }
1640
+ }
1641
+ }
1642
+ },
1643
+ "auth": {
1644
+ "description": "Configuration that provides information on available configured authentication providers.",
1645
+ "type": "object",
1646
+ "properties": {
1647
+ "environment": {
1648
+ "description": "The 'environment' attribute added as an optional parameter to have configurable environment value for `auth.providers`.\ndefault value: 'development'\noptional values: 'development' | 'production'",
1649
+ "visibility": "frontend",
1650
+ "type": "string"
1651
+ }
1652
+ }
1653
+ },
1654
+ "enableExperimentalRedirectFlow": {
1655
+ "description": "Enable redirect authentication flow type, instead of a popup for authentication.",
1656
+ "visibility": "frontend",
1657
+ "type": "boolean"
1658
+ },
1659
+ "discovery": {
1660
+ "description": "Discovery options.",
1661
+ "visibility": "frontend",
1662
+ "type": "object",
1663
+ "properties": {
1664
+ "endpoints": {
1665
+ "description": "Endpoints\n\nA list of target baseUrls and the associated plugins.",
1666
+ "visibility": "frontend",
1667
+ "type": "array",
1668
+ "items": {
1669
+ "type": "object",
1670
+ "properties": {
1671
+ "target": {
1672
+ "description": "The target baseUrl to use for the plugin\n\nCan be either a string or an object with internal and external keys. (Internal is used for the backend, external for the frontend)\nTargets with `{{pluginId}}` or `{{ pluginId }} in the url will be replaced with the pluginId.",
1673
+ "visibility": "frontend",
1674
+ "anyOf": [
1675
+ {
1676
+ "type": "object",
1677
+ "properties": {
1678
+ "external": {
1679
+ "visibility": "frontend",
1680
+ "type": "string"
1681
+ }
1682
+ },
1683
+ "required": [
1684
+ "external"
1685
+ ]
1686
+ },
1687
+ {
1688
+ "type": "string"
1689
+ }
1690
+ ]
1691
+ },
1692
+ "plugins": {
1693
+ "description": "Array of plugins which use the target baseUrl.",
1694
+ "visibility": "frontend",
1695
+ "type": "array",
1696
+ "items": {
1697
+ "type": "string"
1698
+ }
1699
+ }
1700
+ },
1701
+ "required": [
1702
+ "plugins",
1703
+ "target"
1704
+ ]
1705
+ }
1706
+ }
1707
+ }
1708
+ }
1709
+ },
1710
+ "required": [
1711
+ "app",
1712
+ "backend"
1713
+ ],
1714
+ "$schema": "http://json-schema.org/draft-07/schema#"
1715
+ },
1716
+ "packageName": "@backstage/core-app-api"
1717
+ },
1488
1718
  {
1489
1719
  "path": "../../node_modules/@oriflame/backstage-plugin-score-card/node_modules/@backstage/core-components/config.d.ts",
1490
1720
  "value": {
@@ -3980,6 +4210,52 @@
3980
4210
  },
3981
4211
  "packageName": "@backstage/plugin-auth-backend-module-onelogin-provider"
3982
4212
  },
4213
+ {
4214
+ "path": "../../node_modules/@backstage-community/plugin-puppetdb/node_modules/@backstage/plugin-catalog-react/node_modules/@backstage/core-components/config.d.ts",
4215
+ "value": {
4216
+ "type": "object",
4217
+ "properties": {
4218
+ "auth": {
4219
+ "type": "object",
4220
+ "properties": {
4221
+ "autologout": {
4222
+ "description": "Autologout feature configuration",
4223
+ "type": "object",
4224
+ "properties": {
4225
+ "enabled": {
4226
+ "description": "Enable or disable the autologout feature",
4227
+ "visibility": "frontend",
4228
+ "type": "boolean"
4229
+ },
4230
+ "idleTimeoutMinutes": {
4231
+ "description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
4232
+ "visibility": "frontend",
4233
+ "type": "number"
4234
+ },
4235
+ "promptBeforeIdleSeconds": {
4236
+ "description": "Number of seconds before the idle timeout where the user will be asked if it's still active.\nA dialog will be shown.\nDefault is 10 seconds.\nSet to 0 seconds to disable the prompt.",
4237
+ "visibility": "frontend",
4238
+ "type": "number"
4239
+ },
4240
+ "useWorkerTimers": {
4241
+ "description": "Enable/disable the usage of worker thread timers instead of main thread timers.\nDefault is true.\nIf you experience some browser incompatibility, you may try to set this to false.",
4242
+ "visibility": "frontend",
4243
+ "type": "boolean"
4244
+ },
4245
+ "logoutIfDisconnected": {
4246
+ "description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
4247
+ "visibility": "frontend",
4248
+ "type": "boolean"
4249
+ }
4250
+ }
4251
+ }
4252
+ }
4253
+ }
4254
+ },
4255
+ "$schema": "http://json-schema.org/draft-07/schema#"
4256
+ },
4257
+ "packageName": "@backstage/core-components"
4258
+ },
3983
4259
  {
3984
4260
  "path": "../integration-aws-node/config.d.ts",
3985
4261
  "value": {
@@ -1 +1 @@
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.a2e1e30a.js"></script><script defer="defer" src="/static/module-material-ui.b24ef3a3.js"></script><script defer="defer" src="/static/module-lodash.aa647045.js"></script><script defer="defer" src="/static/module-date-fns.c633d602.js"></script><script defer="defer" src="/static/module-mui.f702282a.js"></script><script defer="defer" src="/static/module-material-table.d6e8d890.js"></script><script defer="defer" src="/static/module-react-dom.42a304d3.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.b474cfe9.js"></script><script defer="defer" src="/static/module-zod.4f2eeb8c.js"></script><script defer="defer" src="/static/module-i18next.f50c1612.js"></script><script defer="defer" src="/static/module-remix-run.ba6397c2.js"></script><script defer="defer" src="/static/vendor.a2e1e30a.js"></script><script defer="defer" src="/static/main.a2e1e30a.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
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.5b071983.js"></script><script defer="defer" src="/static/module-material-ui.b24ef3a3.js"></script><script defer="defer" src="/static/module-lodash.aa647045.js"></script><script defer="defer" src="/static/module-date-fns.c633d602.js"></script><script defer="defer" src="/static/module-mui.f702282a.js"></script><script defer="defer" src="/static/module-material-table.d6e8d890.js"></script><script defer="defer" src="/static/module-react-dom.42a304d3.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.b474cfe9.js"></script><script defer="defer" src="/static/module-zod.4f2eeb8c.js"></script><script defer="defer" src="/static/module-i18next.f50c1612.js"></script><script defer="defer" src="/static/module-remix-run.ae6d33c5.js"></script><script defer="defer" src="/static/vendor.5b071983.js"></script><script defer="defer" src="/static/main.5b071983.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -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.a2e1e30a.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.b24ef3a3.js"></script><script defer src="<%= publicPath %>/static/module-lodash.aa647045.js"></script><script defer src="<%= publicPath %>/static/module-date-fns.c633d602.js"></script><script defer src="<%= publicPath %>/static/module-mui.f702282a.js"></script><script defer src="<%= publicPath %>/static/module-material-table.d6e8d890.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.42a304d3.js"></script><script defer src="<%= publicPath %>/static/module-react-beautiful-dnd.b474cfe9.js"></script><script defer src="<%= publicPath %>/static/module-zod.4f2eeb8c.js"></script><script defer src="<%= publicPath %>/static/module-i18next.f50c1612.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.ba6397c2.js"></script><script defer src="<%= publicPath %>/static/vendor.a2e1e30a.js"></script><script defer src="<%= publicPath %>/static/main.a2e1e30a.js"></script></head>
45
+ <meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.5b071983.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.b24ef3a3.js"></script><script defer src="<%= publicPath %>/static/module-lodash.aa647045.js"></script><script defer src="<%= publicPath %>/static/module-date-fns.c633d602.js"></script><script defer src="<%= publicPath %>/static/module-mui.f702282a.js"></script><script defer src="<%= publicPath %>/static/module-material-table.d6e8d890.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.42a304d3.js"></script><script defer src="<%= publicPath %>/static/module-react-beautiful-dnd.b474cfe9.js"></script><script defer src="<%= publicPath %>/static/module-zod.4f2eeb8c.js"></script><script defer src="<%= publicPath %>/static/module-i18next.f50c1612.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.ae6d33c5.js"></script><script defer src="<%= publicPath %>/static/vendor.5b071983.js"></script><script defer src="<%= publicPath %>/static/main.5b071983.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>
@@ -0,0 +1,4 @@
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[9234],{99234:(pe,C,c)=>{c.r(C),c.d(C,{RealLogViewer:()=>xe});var d=c(31085),A=c(10394),y=c(29365),U=c(99594),W=c(53373),j=c.n(W),f=c(14041),D=c(18690),G=c(19686),P=c(84392),$=c(84774);const I=(0,$.A)(),b=/\n\r?/g,Y=Object.fromEntries(Object.entries({1:e=>({...e,bold:!0}),3:e=>({...e,italic:!0}),4:e=>({...e,underline:!0}),22:({bold:e,...t})=>t,23:({italic:e,...t})=>t,24:({underline:e,...t})=>t,30:e=>({...e,foreground:"black"}),31:e=>({...e,foreground:"red"}),32:e=>({...e,foreground:"green"}),33:e=>({...e,foreground:"yellow"}),34:e=>({...e,foreground:"blue"}),35:e=>({...e,foreground:"magenta"}),36:e=>({...e,foreground:"cyan"}),37:e=>({...e,foreground:"white"}),39:({foreground:e,...t})=>t,90:e=>({...e,foreground:"grey"}),40:e=>({...e,background:"black"}),41:e=>({...e,background:"red"}),42:e=>({...e,background:"green"}),43:e=>({...e,background:"yellow"}),44:e=>({...e,background:"blue"}),45:e=>({...e,background:"magenta"}),46:e=>({...e,background:"cyan"}),47:e=>({...e,background:"white"}),49:({background:e,...t})=>t}).map(([e,t])=>[`\x1B[${e}m`,t]));class v{lineNumber;chunks;text;constructor(t=1,n=[]){this.lineNumber=t,this.chunks=n,this.text=n.map(s=>s.text).join("").toLocaleLowerCase("en-US")}lastChunk(){return this.chunks[this.chunks.length-1]}replaceLastChunk(t){t&&(this.chunks.splice(this.chunks.length-1,1,...t),this.text=this.chunks.map(n=>n.text).join("").toLocaleLowerCase("en-US"))}}class X{text="";lines=[];process(t){if(this.text===t)return this.lines;if(this.text&&t.startsWith(this.text)){const n=this.lines.length>0?this.lines.length-1:0,s=this.lines[n]??new v,i=s.lastChunk(),l=this.processLines((i?.text??"")+t.slice(this.text.length),i?.modifiers,s?.lineNumber);s.replaceLastChunk(l[0]?.chunks),this.lines[n]=s,this.lines=this.lines.concat(l.slice(1))}else this.lines=this.processLines(t);return this.text=t,this.lines}processLines=(t,n={},s=1)=>{const i=[];let l=n,o=s,u=0;for(b.lastIndex=0;;){const r=b.exec(t);if(!r){const x=this.processText(t.slice(u),l);return i.push(new v(o,x)),i}const h=t.slice(u,r.index);u=r.index+r[0].length;const a=this.processText(h,l);i.push(new v(o,a)),l=a[a.length-1].modifiers??l,o+=1}};processText=(t,n)=>{const s=[];let i=n,l=0;for(I.lastIndex=0;;){const o=I.exec(t);if(!o)return s.push({text:t.slice(l),modifiers:i}),s;const u=t.slice(l,o.index);s.push({text:u,modifiers:i}),l=o.index+o[0].length,i=this.processCode(o[0],i)}};processCode=(t,n)=>Y[t]?.(n)??n}var Z=c(95479),B=c.n(Z),J=c(37639),Q=c(72072);function w(e,t){const n=new Array;if(t.bold&&n.push(e.modifierBold),t.italic&&n.push(e.modifierItalic),t.underline&&n.push(e.modifierUnderline),t.foreground){const s=`modifierForeground${B()(t.foreground)}`;n.push(e[s])}if(t.background){const s=`modifierBackground${B()(t.background)}`;n.push(e[s])}return n.length>0?n.join(" "):void 0}function q(e,t){if(!t||!e.includes(t))return;const n=new Array;let s=0;for(;;){const i=e.indexOf(t,s);if(i===-1)break;const l=i+t.length;n.push({start:i,end:l}),s=l}return n}function _(e,t){const n=q(e.text,t);if(!n)return e.chunks;const s=new Array;let i=0,l=0,o=n[l];for(const u of e.chunks){const{text:r,modifiers:h}=u;if(!o||i+r.length<o.start){s.push(u),i+=r.length;continue}let a=0;for(;o;){const m=Math.max(o.start-i,0);if(m>r.length)break;const g=Math.min(o.end-i,r.length);if(m>a&&s.push({text:r.slice(a,m),modifiers:h}),g>m&&s.push({modifiers:h,highlight:l,text:r.slice(m,g)}),a=g,o.end-i===g)l+=1,o=n[l];else break}a<r.length&&s.push({text:r.slice(a),modifiers:h}),i+=r.length}return s}const ee=({attributes:e,content:t})=>{const{href:n,...s}=e;return(0,d.jsx)(Q.N_,{to:n,...s,children:t})};function te({line:e,classes:t,searchText:n,highlightResultIndex:s}){const i=(0,f.useMemo)(()=>_(e,n),[e,n]),l=(0,f.useMemo)(()=>i.map(({text:o,modifiers:u,highlight:r},h)=>(0,d.jsx)("span",{className:j()(w(t,u),r!==void 0&&(r===s?t.textSelectedHighlight:t.textHighlight)),children:(0,d.jsx)(J.A,{options:{render:ee},children:o})},h)),[i,s,t]);return(0,d.jsx)(d.Fragment,{children:l})}var ne=c(16249),se=c(72501),oe=c(68887),re=c(63798),R=c(65859);function ie(e){const{resultCount:t,resultIndexStep:n,toggleShouldFilter:s}=e,i=e.resultIndex??0,l=o=>{o.key==="Enter"&&(o.metaKey||o.ctrlKey||o.altKey?s():n(o.shiftKey))};return(0,d.jsxs)(d.Fragment,{children:[t!==void 0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y.A,{size:"small",onClick:()=>n(!0),children:(0,d.jsx)(oe.A,{})}),(0,d.jsxs)(se.A,{children:[Math.min(i+1,t),"/",t]}),(0,d.jsx)(y.A,{size:"small",onClick:()=>n(),children:(0,d.jsx)(re.A,{})})]}),(0,d.jsx)(ne.A,{size:"small",variant:"standard",placeholder:"Search",value:e.searchInput,onKeyPress:l,onChange:o=>e.setSearchInput(o.target.value)}),(0,d.jsx)(y.A,{size:"small",onClick:s,children:e.shouldFilter?(0,d.jsx)(R.A,{color:"primary"}):(0,d.jsx)(R.A,{color:"disabled"})})]})}var le=c(58837),F=c(268),k=c(95186),M=c(38084),N=c(54024),T=c(40935),z=c(4499),E=c(85229),K=c(42020),H=c(6456);const O=40,ce=(0,le.A)(e=>({root:{background:e.palette.background.paper},header:{height:O,display:"flex",alignItems:"center",justifyContent:"flex-end"},log:{fontFamily:'"Monaco", monospace',fontSize:e.typography.pxToRem(12)},line:{position:"relative",whiteSpace:"pre","&:hover":{background:e.palette.action.hover}},lineSelected:{background:e.palette.action.selected,"&:hover":{background:e.palette.action.selected}},lineCopyButton:{position:"absolute",paddingTop:0,paddingBottom:0},lineNumber:{display:"inline-block",textAlign:"end",width:60,marginRight:e.spacing(1),cursor:"pointer"},textHighlight:{background:(0,F.X4)(e.palette.info.main,.15)},textSelectedHighlight:{background:(0,F.X4)(e.palette.info.main,.4)},modifierBold:{fontWeight:e.typography.fontWeightBold},modifierItalic:{fontStyle:"italic"},modifierUnderline:{textDecoration:"underline"},modifierForegroundBlack:{color:k.A.black},modifierForegroundRed:{color:M.A[500]},modifierForegroundGreen:{color:N.A[500]},modifierForegroundYellow:{color:T.A[500]},modifierForegroundBlue:{color:z.A[500]},modifierForegroundMagenta:{color:E.A[500]},modifierForegroundCyan:{color:K.A[500]},modifierForegroundWhite:{color:k.A.white},modifierForegroundGrey:{color:H.A[500]},modifierBackgroundBlack:{background:k.A.black},modifierBackgroundRed:{background:M.A[500]},modifierBackgroundGreen:{background:N.A[500]},modifierBackgroundYellow:{background:T.A[500]},modifierBackgroundBlue:{background:z.A[500]},modifierBackgroundMagenta:{background:E.A[500]},modifierBackgroundCyan:{background:K.A[500]},modifierBackgroundWhite:{background:k.A.white},modifierBackgroundGrey:{background:H.A[500]}}),{name:"BackstageLogViewer"});var ae=c(42);function de(e,t){if(!t)return{lines:e};const n=[],s=[];for(const i of e)if(i.text.includes(t)){n.push(i);let l=0,o=0;for(;;){const u=i.text.indexOf(t,l);if(u===-1)break;s.push({lineNumber:i.lineNumber,lineIndex:o++}),l=u+t.length}}return{lines:n,results:s}}function ue(e){const[t,n]=(0,f.useState)(""),s=t.toLocaleLowerCase("en-US"),[i,l]=(0,f.useState)(0),[o,u]=(0,ae.e)(!1),r=(0,f.useMemo)(()=>de(e,s),[e,s]),h=r.results?r.results[Math.min(i,r.results.length-1)]:void 0,a=r.results?.length,x=m=>{if(m){if(a!==void 0){const g=Math.min(i-1,a-2);l(g<0?a-1:g)}}else if(a!==void 0){const g=i+1;l(g>=a?0:g)}};return{lines:o?r.lines:e,searchText:s,searchInput:t,setSearchInput:n,shouldFilter:o,toggleShouldFilter:u,resultCount:a,resultIndex:i,resultIndexStep:x,resultLine:h?.lineNumber,resultLineIndex:h?.lineIndex}}var he=c(72427),fe=c(39837),ge=c(36338);function me(e){const t=(0,he.gf)(fe.m),[n,s]=(0,f.useState)(),i=n?Math.min(n.start,n.end):void 0,l=n?Math.max(n.start,n.end):void 0,[{error:o},u]=(0,ge.A)();return(0,f.useEffect)(()=>{o&&t.post(o)},[o,t]),{shouldShowButton(r){return i===r||l===r},isSelected(r){return n?i<=r&&r<=l:!1},setSelection(r,h){s(h?a=>a?{start:a.start,end:r}:{start:r,end:r}:a=>a?.start===r&&a?.end===r?void 0:{start:r,end:r})},copySelection(){if(n){const r=e.slice(Math.min(n.start,n.end)-1,Math.max(n.start,n.end)).map(h=>h.chunks.map(a=>a.text).join("")).join(`
2
+ `);u(r),s(void 0)}}}}function xe(e){const t=ce({classes:e.classes}),[n,s]=(0,f.useState)(null),l=(0,f.useMemo)(()=>new X,[]).process(e.text),o=ue(l),u=me(l),r=(0,D.zy)();(0,f.useEffect)(()=>{n&&n.scrollToItem(l.length-1,"end")},[n,l]),(0,f.useEffect)(()=>{n&&(o.resultLine?n.scrollToItem(o.resultLine-1,"center"):n.scrollToItem(l.length-1,"end"))},[n,o.resultLine,l]),(0,f.useEffect)(()=>{if(r.hash){const a=parseInt(r.hash.replace(/\D/g,""),10);u.setSelection(a,!1)}},[]);const h=(a,x)=>{u.setSelection(a,x.shiftKey)};return(0,d.jsx)(G.Ay,{children:({height:a,width:x})=>(0,d.jsxs)(A.A,{style:{width:x,height:a},className:t.root,children:[(0,d.jsx)(A.A,{className:t.header,children:(0,d.jsx)(ie,{...o})}),(0,d.jsx)(P.Y1,{ref:m=>{s(m)},className:t.log,height:(a||480)-O,width:x||640,itemData:o.lines,itemSize:20,itemCount:o.lines.length,children:({index:m,style:g,data:V})=>{const S=V[m],{lineNumber:p}=S;return(0,d.jsxs)(A.A,{style:{...g},className:j()(t.line,{[t.lineSelected]:u.isSelected(p)}),children:[u.shouldShowButton(p)&&(0,d.jsx)(y.A,{"data-testid":"copy-button",size:"small",className:t.lineCopyButton,onClick:()=>u.copySelection(),children:(0,d.jsx)(U.A,{fontSize:"inherit"})}),(0,d.jsx)("a",{role:"row",target:"_self",href:`#line-${p}`,className:t.lineNumber,onClick:L=>h(p,L),onKeyPress:L=>h(p,L),children:p}),(0,d.jsx)(te,{line:S,classes:t,searchText:o.searchText,highlightResultIndex:o.resultLine===p?o.resultLineIndex:void 0})]})}})]})})}}}]);})();
3
+
4
+ //# sourceMappingURL=9234.26971228.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static/9234.26971228.chunk.js","mappings":"8SAkBA,MAAMA,KAAYC,EAAAA,GAAe,EAC3BC,EAAe,SAGfC,EAAgBC,OAAOC,YAC3BD,OAAOE,QAAQ,CACb,EAAGC,IAAM,CAAE,GAAGA,EAAGC,KAAM,EAAK,GAC5B,EAAGD,IAAM,CAAE,GAAGA,EAAGE,OAAQ,EAAK,GAC9B,EAAGF,IAAM,C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OvB,aAAezL,EAClBgN,EAAOtB,gBACP/I,M,KAKd,C,OAMZ,C","sources":["webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/AnsiProcessor.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/LogLine.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/LogViewerControls.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/styles.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/useLogViewerSearch.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/useLogViewerSelection.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/RealLogViewer.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport ansiRegexMaker from 'ansi-regex';\n\nconst ansiRegex = ansiRegexMaker();\nconst newlineRegex = /\\n\\r?/g;\n\n// A mapping of how each escape code changes the modifiers\nconst codeModifiers = Object.fromEntries(\n Object.entries({\n 1: m => ({ ...m, bold: true }),\n 3: m => ({ ...m, italic: true }),\n 4: m => ({ ...m, underline: true }),\n 22: ({ bold: _, ...m }) => m,\n 23: ({ italic: _, ...m }) => m,\n 24: ({ underline: _, ...m }) => m,\n 30: m => ({ ...m, foreground: 'black' }),\n 31: m => ({ ...m, foreground: 'red' }),\n 32: m => ({ ...m, foreground: 'green' }),\n 33: m => ({ ...m, foreground: 'yellow' }),\n 34: m => ({ ...m, foreground: 'blue' }),\n 35: m => ({ ...m, foreground: 'magenta' }),\n 36: m => ({ ...m, foreground: 'cyan' }),\n 37: m => ({ ...m, foreground: 'white' }),\n 39: ({ foreground: _, ...m }) => m,\n 90: m => ({ ...m, foreground: 'grey' }),\n 40: m => ({ ...m, background: 'black' }),\n 41: m => ({ ...m, background: 'red' }),\n 42: m => ({ ...m, background: 'green' }),\n 43: m => ({ ...m, background: 'yellow' }),\n 44: m => ({ ...m, background: 'blue' }),\n 45: m => ({ ...m, background: 'magenta' }),\n 46: m => ({ ...m, background: 'cyan' }),\n 47: m => ({ ...m, background: 'white' }),\n 49: ({ background: _, ...m }) => m,\n } as Record<string, (m: ChunkModifiers) => ChunkModifiers>).map(\n ([code, modifier]) => [`\\x1b[${code}m`, modifier],\n ),\n);\n\nexport type AnsiColor =\n | 'black'\n | 'red'\n | 'green'\n | 'yellow'\n | 'blue'\n | 'magenta'\n | 'cyan'\n | 'white'\n | 'grey';\n\nexport interface ChunkModifiers {\n foreground?: AnsiColor;\n background?: AnsiColor;\n bold?: boolean;\n italic?: boolean;\n underline?: boolean;\n}\n\nexport interface AnsiChunk {\n text: string;\n modifiers: ChunkModifiers;\n}\n\nexport class AnsiLine {\n text: string;\n\n constructor(\n readonly lineNumber: number = 1,\n readonly chunks: AnsiChunk[] = [],\n ) {\n this.text = chunks\n .map(c => c.text)\n .join('')\n .toLocaleLowerCase('en-US');\n }\n\n lastChunk(): AnsiChunk | undefined {\n return this.chunks[this.chunks.length - 1];\n }\n\n replaceLastChunk(newChunks?: AnsiChunk[]) {\n if (newChunks) {\n this.chunks.splice(this.chunks.length - 1, 1, ...newChunks);\n this.text = this.chunks\n .map(c => c.text)\n .join('')\n .toLocaleLowerCase('en-US');\n }\n }\n}\n\nexport class AnsiProcessor {\n private text: string = '';\n private lines: AnsiLine[] = [];\n\n /**\n * Processes a chunk of text while keeping internal state that optimizes\n * subsequent processing that appends to the text.\n */\n process(text: string): AnsiLine[] {\n if (this.text === text) {\n return this.lines;\n }\n\n if (this.text && text.startsWith(this.text)) {\n const lastLineIndex = this.lines.length > 0 ? this.lines.length - 1 : 0;\n const lastLine = this.lines[lastLineIndex] ?? new AnsiLine();\n const lastChunk = lastLine.lastChunk();\n\n const newLines = this.processLines(\n (lastChunk?.text ?? '') + text.slice(this.text.length),\n lastChunk?.modifiers,\n lastLine?.lineNumber,\n );\n lastLine.replaceLastChunk(newLines[0]?.chunks);\n\n this.lines[lastLineIndex] = lastLine;\n this.lines = this.lines.concat(newLines.slice(1));\n } else {\n this.lines = this.processLines(text);\n }\n this.text = text;\n\n return this.lines;\n }\n\n // Split a chunk of text up into lines and process each line individually\n private processLines = (\n text: string,\n modifiers: ChunkModifiers = {},\n startingLineNumber: number = 1,\n ): AnsiLine[] => {\n const lines: AnsiLine[] = [];\n\n let currentModifiers = modifiers;\n let currentLineNumber = startingLineNumber;\n\n let prevIndex = 0;\n newlineRegex.lastIndex = 0;\n for (;;) {\n const match = newlineRegex.exec(text);\n if (!match) {\n const chunks = this.processText(\n text.slice(prevIndex),\n currentModifiers,\n );\n lines.push(new AnsiLine(currentLineNumber, chunks));\n return lines;\n }\n\n const line = text.slice(prevIndex, match.index);\n prevIndex = match.index + match[0].length;\n\n const chunks = this.processText(line, currentModifiers);\n lines.push(new AnsiLine(currentLineNumber, chunks));\n\n // Modifiers that are active in the last chunk are carried over to the next line\n currentModifiers =\n chunks[chunks.length - 1].modifiers ?? currentModifiers;\n currentLineNumber += 1;\n }\n };\n\n // Processing of a one individual text chunk\n private processText = (\n fullText: string,\n modifiers: ChunkModifiers,\n ): AnsiChunk[] => {\n const chunks: AnsiChunk[] = [];\n\n let currentModifiers = modifiers;\n\n let prevIndex = 0;\n ansiRegex.lastIndex = 0;\n for (;;) {\n const match = ansiRegex.exec(fullText);\n if (!match) {\n chunks.push({\n text: fullText.slice(prevIndex),\n modifiers: currentModifiers,\n });\n return chunks;\n }\n\n const text = fullText.slice(prevIndex, match.index);\n chunks.push({ text, modifiers: currentModifiers });\n\n // For every escape code that we encounter we keep track of where the\n // next chunk of text starts, and what modifiers it has\n prevIndex = match.index + match[0].length;\n currentModifiers = this.processCode(match[0], currentModifiers);\n }\n };\n\n private processCode = (\n code: string,\n modifiers: ChunkModifiers,\n ): ChunkModifiers => {\n return codeModifiers[code]?.(modifiers) ?? modifiers;\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useMemo } from 'react';\nimport { AnsiChunk, AnsiLine, ChunkModifiers } from './AnsiProcessor';\nimport startCase from 'lodash/startCase';\nimport classnames from 'classnames';\nimport { useStyles } from './styles';\nimport Linkify from 'linkify-react';\nimport { Link } from '../Link';\n\nexport function getModifierClasses(\n classes: ReturnType<typeof useStyles>,\n modifiers: ChunkModifiers,\n) {\n const classNames = new Array<string>();\n if (modifiers.bold) {\n classNames.push(classes.modifierBold);\n }\n if (modifiers.italic) {\n classNames.push(classes.modifierItalic);\n }\n if (modifiers.underline) {\n classNames.push(classes.modifierUnderline);\n }\n if (modifiers.foreground) {\n const key = `modifierForeground${startCase(\n modifiers.foreground,\n )}` as keyof typeof classes;\n classNames.push(classes[key]);\n }\n if (modifiers.background) {\n const key = `modifierBackground${startCase(\n modifiers.background,\n )}` as keyof typeof classes;\n classNames.push(classes[key]);\n }\n return classNames.length > 0 ? classNames.join(' ') : undefined;\n}\n\nexport function findSearchResults(text: string, searchText: string) {\n if (!searchText || !text.includes(searchText)) {\n return undefined;\n }\n const searchResults = new Array<{ start: number; end: number }>();\n let offset = 0;\n for (;;) {\n const start = text.indexOf(searchText, offset);\n if (start === -1) {\n break;\n }\n const end = start + searchText.length;\n searchResults.push({ start, end });\n offset = end;\n }\n return searchResults;\n}\n\nexport interface HighlightAnsiChunk extends AnsiChunk {\n highlight?: number;\n}\n\nexport function calculateHighlightedChunks(\n line: AnsiLine,\n searchText: string,\n): HighlightAnsiChunk[] {\n const results = findSearchResults(line.text, searchText);\n if (!results) {\n return line.chunks;\n }\n\n const chunks = new Array<HighlightAnsiChunk>();\n\n let lineOffset = 0;\n let resultIndex = 0;\n let result = results[resultIndex];\n for (const chunk of line.chunks) {\n const { text, modifiers } = chunk;\n if (!result || lineOffset + text.length < result.start) {\n chunks.push(chunk);\n lineOffset += text.length;\n continue;\n }\n\n let localOffset = 0;\n while (result) {\n const localStart = Math.max(result.start - lineOffset, 0);\n if (localStart > text.length) {\n break; // The next result is not in this chunk\n }\n\n const localEnd = Math.min(result.end - lineOffset, text.length);\n\n const hasTextBeforeResult = localStart > localOffset;\n if (hasTextBeforeResult) {\n chunks.push({ text: text.slice(localOffset, localStart), modifiers });\n }\n const hasResultText = localEnd > localStart;\n if (hasResultText) {\n chunks.push({\n modifiers,\n highlight: resultIndex,\n text: text.slice(localStart, localEnd),\n });\n }\n\n localOffset = localEnd;\n\n const foundCompleteResult = result.end - lineOffset === localEnd;\n if (foundCompleteResult) {\n resultIndex += 1;\n result = results[resultIndex];\n } else {\n break; // The rest of the result is in the following chunks\n }\n }\n\n const hasTextAfterResult = localOffset < text.length;\n if (hasTextAfterResult) {\n chunks.push({ text: text.slice(localOffset), modifiers });\n }\n\n lineOffset += text.length;\n }\n\n return chunks;\n}\n\nconst renderLink = ({\n attributes,\n content,\n}: {\n attributes: { [attr: string]: any };\n content: string;\n}) => {\n const { href, ...props } = attributes;\n return (\n <Link to={href} {...props}>\n {content}\n </Link>\n );\n};\n\nexport interface LogLineProps {\n line: AnsiLine;\n classes: ReturnType<typeof useStyles>;\n searchText: string;\n highlightResultIndex?: number;\n}\n\nexport function LogLine({\n line,\n classes,\n searchText,\n highlightResultIndex,\n}: LogLineProps) {\n const chunks = useMemo(\n () => calculateHighlightedChunks(line, searchText),\n [line, searchText],\n );\n\n const elements = useMemo(\n () =>\n chunks.map(({ text, modifiers, highlight }, index) => (\n // eslint-disable-next-line react/forbid-elements\n <span\n key={index}\n className={classnames(\n getModifierClasses(classes, modifiers),\n highlight !== undefined &&\n (highlight === highlightResultIndex\n ? classes.textSelectedHighlight\n : classes.textHighlight),\n )}\n >\n <Linkify options={{ render: renderLink }}>{text}</Linkify>\n </span>\n )),\n [chunks, highlightResultIndex, classes],\n );\n\n return <>{elements}</>;\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport IconButton from '@material-ui/core/IconButton';\nimport TextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\nimport ChevronRightIcon from '@material-ui/icons/ChevronRight';\nimport FilterListIcon from '@material-ui/icons/FilterList';\nimport { LogViewerSearch } from './useLogViewerSearch';\n\nexport interface LogViewerControlsProps extends LogViewerSearch {}\n\nexport function LogViewerControls(props: LogViewerControlsProps) {\n const { resultCount, resultIndexStep, toggleShouldFilter } = props;\n const resultIndex = props.resultIndex ?? 0;\n\n const handleKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n if (event.metaKey || event.ctrlKey || event.altKey) {\n toggleShouldFilter();\n } else {\n resultIndexStep(event.shiftKey);\n }\n }\n };\n\n return (\n <>\n {resultCount !== undefined && (\n <>\n <IconButton size=\"small\" onClick={() => resultIndexStep(true)}>\n <ChevronLeftIcon />\n </IconButton>\n <Typography>\n {Math.min(resultIndex + 1, resultCount)}/{resultCount}\n </Typography>\n <IconButton size=\"small\" onClick={() => resultIndexStep()}>\n <ChevronRightIcon />\n </IconButton>\n </>\n )}\n <TextField\n size=\"small\"\n variant=\"standard\"\n placeholder=\"Search\"\n value={props.searchInput}\n onKeyPress={handleKeyPress}\n onChange={e => props.setSearchInput(e.target.value)}\n />\n <IconButton size=\"small\" onClick={toggleShouldFilter}>\n {props.shouldFilter ? (\n <FilterListIcon color=\"primary\" />\n ) : (\n <FilterListIcon color=\"disabled\" />\n )}\n </IconButton>\n </>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { alpha, makeStyles } from '@material-ui/core/styles';\nimport * as colors from '@material-ui/core/colors';\n\nexport const HEADER_SIZE = 40;\n\n/** @public Class keys for overriding LogViewer styles */\nexport type LogViewerClassKey =\n | 'root'\n | 'header'\n | 'log'\n | 'line'\n | 'lineSelected'\n | 'lineCopyButton'\n | 'lineNumber'\n | 'textHighlight'\n | 'textSelectedHighlight'\n | 'modifierBold'\n | 'modifierItalic'\n | 'modifierUnderline'\n | 'modifierForegroundBlack'\n | 'modifierForegroundRed'\n | 'modifierForegroundGreen'\n | 'modifierForegroundYellow'\n | 'modifierForegroundBlue'\n | 'modifierForegroundMagenta'\n | 'modifierForegroundCyan'\n | 'modifierForegroundWhite'\n | 'modifierForegroundGrey'\n | 'modifierBackgroundBlack'\n | 'modifierBackgroundRed'\n | 'modifierBackgroundGreen'\n | 'modifierBackgroundYellow'\n | 'modifierBackgroundBlue'\n | 'modifierBackgroundMagenta'\n | 'modifierBackgroundCyan'\n | 'modifierBackgroundWhite'\n | 'modifierBackgroundGrey';\n\nexport const useStyles = makeStyles(\n theme => ({\n root: {\n background: theme.palette.background.paper,\n },\n header: {\n height: HEADER_SIZE,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n log: {\n fontFamily: '\"Monaco\", monospace',\n fontSize: theme.typography.pxToRem(12),\n },\n line: {\n position: 'relative',\n whiteSpace: 'pre',\n\n '&:hover': {\n background: theme.palette.action.hover,\n },\n },\n lineSelected: {\n background: theme.palette.action.selected,\n\n '&:hover': {\n background: theme.palette.action.selected,\n },\n },\n lineCopyButton: {\n position: 'absolute',\n paddingTop: 0,\n paddingBottom: 0,\n },\n lineNumber: {\n display: 'inline-block',\n textAlign: 'end',\n width: 60,\n marginRight: theme.spacing(1),\n cursor: 'pointer',\n },\n textHighlight: {\n background: alpha(theme.palette.info.main, 0.15),\n },\n textSelectedHighlight: {\n background: alpha(theme.palette.info.main, 0.4),\n },\n modifierBold: {\n fontWeight: theme.typography.fontWeightBold,\n },\n modifierItalic: {\n fontStyle: 'italic',\n },\n modifierUnderline: {\n textDecoration: 'underline',\n },\n modifierForegroundBlack: {\n color: colors.common.black,\n },\n modifierForegroundRed: {\n color: colors.red[500],\n },\n modifierForegroundGreen: {\n color: colors.green[500],\n },\n modifierForegroundYellow: {\n color: colors.yellow[500],\n },\n modifierForegroundBlue: {\n color: colors.blue[500],\n },\n modifierForegroundMagenta: {\n color: colors.purple[500],\n },\n modifierForegroundCyan: {\n color: colors.cyan[500],\n },\n modifierForegroundWhite: {\n color: colors.common.white,\n },\n modifierForegroundGrey: {\n color: colors.grey[500],\n },\n modifierBackgroundBlack: {\n background: colors.common.black,\n },\n modifierBackgroundRed: {\n background: colors.red[500],\n },\n modifierBackgroundGreen: {\n background: colors.green[500],\n },\n modifierBackgroundYellow: {\n background: colors.yellow[500],\n },\n modifierBackgroundBlue: {\n background: colors.blue[500],\n },\n modifierBackgroundMagenta: {\n background: colors.purple[500],\n },\n modifierBackgroundCyan: {\n background: colors.cyan[500],\n },\n modifierBackgroundWhite: {\n background: colors.common.white,\n },\n modifierBackgroundGrey: {\n background: colors.grey[500],\n },\n }),\n { name: 'BackstageLogViewer' },\n);\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo, useState } from 'react';\nimport { useToggle } from '@react-hookz/web';\nimport { AnsiLine } from './AnsiProcessor';\n\nexport function applySearchFilter(lines: AnsiLine[], searchText: string) {\n if (!searchText) {\n return { lines };\n }\n\n const matchingLines = [];\n const searchResults = [];\n for (const line of lines) {\n if (line.text.includes(searchText)) {\n matchingLines.push(line);\n\n let offset = 0;\n let lineResultIndex = 0;\n for (;;) {\n const start = line.text.indexOf(searchText, offset);\n if (start === -1) {\n break;\n }\n searchResults.push({\n lineNumber: line.lineNumber,\n lineIndex: lineResultIndex++,\n });\n offset = start + searchText.length;\n }\n }\n }\n\n return {\n lines: matchingLines,\n results: searchResults,\n };\n}\n\nexport interface LogViewerSearch {\n lines: AnsiLine[];\n\n searchText: string;\n searchInput: string;\n setSearchInput: (searchInput: string) => void;\n\n shouldFilter: boolean;\n toggleShouldFilter: () => void;\n\n resultCount: number | undefined;\n resultIndex: number | undefined;\n resultIndexStep: (decrement?: boolean) => void;\n\n resultLine: number | undefined;\n resultLineIndex: number | undefined;\n}\n\nexport function useLogViewerSearch(lines: AnsiLine[]): LogViewerSearch {\n const [searchInput, setSearchInput] = useState('');\n const searchText = searchInput.toLocaleLowerCase('en-US');\n\n const [resultIndex, setResultIndex] = useState<number>(0);\n\n const [shouldFilter, toggleShouldFilter] = useToggle(false);\n\n const filter = useMemo(\n () => applySearchFilter(lines, searchText),\n [lines, searchText],\n );\n\n const searchResult = filter.results\n ? filter.results[Math.min(resultIndex, filter.results.length - 1)]\n : undefined;\n const resultCount = filter.results?.length;\n\n const resultIndexStep = (decrement?: boolean) => {\n if (decrement) {\n if (resultCount !== undefined) {\n const next = Math.min(resultIndex - 1, resultCount - 2);\n setResultIndex(next < 0 ? resultCount - 1 : next);\n }\n } else {\n if (resultCount !== undefined) {\n const next = resultIndex + 1;\n setResultIndex(next >= resultCount ? 0 : next);\n }\n }\n };\n\n return {\n lines: shouldFilter ? filter.lines : lines,\n searchText,\n searchInput,\n setSearchInput,\n shouldFilter,\n toggleShouldFilter,\n resultCount,\n resultIndex,\n resultIndexStep,\n resultLine: searchResult?.lineNumber,\n resultLineIndex: searchResult?.lineIndex,\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useEffect, useState } from 'react';\nimport useCopyToClipboard from 'react-use/esm/useCopyToClipboard';\nimport { AnsiLine } from './AnsiProcessor';\n\nexport function useLogViewerSelection(lines: AnsiLine[]) {\n const errorApi = useApi(errorApiRef);\n const [sel, setSelection] = useState<{ start: number; end: number }>();\n const start = sel ? Math.min(sel.start, sel.end) : undefined;\n const end = sel ? Math.max(sel.start, sel.end) : undefined;\n\n const [{ error }, copyToClipboard] = useCopyToClipboard();\n\n useEffect(() => {\n if (error) {\n errorApi.post(error);\n }\n }, [error, errorApi]);\n\n return {\n shouldShowButton(line: number) {\n return start === line || end === line;\n },\n isSelected(line: number) {\n if (!sel) {\n return false;\n }\n return start! <= line && line <= end!;\n },\n setSelection(line: number, add: boolean) {\n if (add) {\n setSelection(s =>\n s ? { start: s.start, end: line } : { start: line, end: line },\n );\n } else {\n setSelection(s =>\n s?.start === line && s?.end === line\n ? undefined\n : { start: line, end: line },\n );\n }\n },\n copySelection() {\n if (sel) {\n const copyText = lines\n .slice(Math.min(sel.start, sel.end) - 1, Math.max(sel.start, sel.end))\n .map(l => l.chunks.map(c => c.text).join(''))\n .join('\\n');\n copyToClipboard(copyText);\n setSelection(undefined);\n }\n },\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport IconButton from '@material-ui/core/IconButton';\nimport CopyIcon from '@material-ui/icons/FileCopy';\nimport classnames from 'classnames';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { FixedSizeList } from 'react-window';\n\nimport { AnsiLine, AnsiProcessor } from './AnsiProcessor';\nimport { LogLine } from './LogLine';\nimport { LogViewerControls } from './LogViewerControls';\nimport { HEADER_SIZE, useStyles } from './styles';\nimport { useLogViewerSearch } from './useLogViewerSearch';\nimport { useLogViewerSelection } from './useLogViewerSelection';\n\nexport interface RealLogViewerProps {\n text: string;\n classes?: { root?: string };\n}\n\nexport function RealLogViewer(props: RealLogViewerProps) {\n const classes = useStyles({ classes: props.classes });\n const [fixedListInstance, setFixedListInstance] = useState<FixedSizeList<\n AnsiLine[]\n > | null>(null);\n\n // The processor keeps state that optimizes appending to the text\n const processor = useMemo(() => new AnsiProcessor(), []);\n const lines = processor.process(props.text);\n\n const search = useLogViewerSearch(lines);\n const selection = useLogViewerSelection(lines);\n const location = useLocation();\n\n useEffect(() => {\n if (fixedListInstance) {\n fixedListInstance.scrollToItem(lines.length - 1, 'end');\n }\n }, [fixedListInstance, lines]);\n\n useEffect(() => {\n if (!fixedListInstance) {\n return;\n }\n if (search.resultLine) {\n fixedListInstance.scrollToItem(search.resultLine - 1, 'center');\n } else {\n fixedListInstance.scrollToItem(lines.length - 1, 'end');\n }\n }, [fixedListInstance, search.resultLine, lines]);\n\n useEffect(() => {\n if (location.hash) {\n // #line-6 -> 6\n const line = parseInt(location.hash.replace(/\\D/g, ''), 10);\n selection.setSelection(line, false);\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleSelectLine = (\n line: number,\n event: { shiftKey: boolean; preventDefault: () => void },\n ) => {\n selection.setSelection(line, event.shiftKey);\n };\n\n return (\n <AutoSizer>\n {({ height, width }: { height?: number; width?: number }) => (\n <Box style={{ width, height }} className={classes.root}>\n <Box className={classes.header}>\n <LogViewerControls {...search} />\n </Box>\n <FixedSizeList\n ref={(instance: FixedSizeList<AnsiLine[]>) => {\n setFixedListInstance(instance);\n }}\n className={classes.log}\n height={(height || 480) - HEADER_SIZE}\n width={width || 640}\n itemData={search.lines}\n itemSize={20}\n itemCount={search.lines.length}\n >\n {({ index, style, data }) => {\n const line = data[index];\n const { lineNumber } = line;\n return (\n <Box\n style={{ ...style }}\n className={classnames(classes.line, {\n [classes.lineSelected]: selection.isSelected(lineNumber),\n })}\n >\n {selection.shouldShowButton(lineNumber) && (\n <IconButton\n data-testid=\"copy-button\"\n size=\"small\"\n className={classes.lineCopyButton}\n onClick={() => selection.copySelection()}\n >\n <CopyIcon fontSize=\"inherit\" />\n </IconButton>\n )}\n <a\n role=\"row\"\n target=\"_self\"\n href={`#line-${lineNumber}`}\n className={classes.lineNumber}\n onClick={event => handleSelectLine(lineNumber, event)}\n onKeyPress={event => handleSelectLine(lineNumber, event)}\n >\n {lineNumber}\n </a>\n <LogLine\n line={line}\n classes={classes}\n searchText={search.searchText}\n highlightResultIndex={\n search.resultLine === lineNumber\n ? search.resultLineIndex\n : undefined\n }\n />\n </Box>\n );\n }}\n </FixedSizeList>\n </Box>\n )}\n </AutoSizer>\n );\n}\n"],"names":["ansiRegex","ansiRegexMaker","newlineRegex","codeModifiers","Object","fromEntries","entries","m","bold","italic","underline","_","foreground","background","map","code","modifier","AnsiLine","text","constructor","lineNumber","chunks","c","join","toLocaleLowerCase","lastChunk","length","replaceLastChunk","newChunks","splice","AnsiProcessor","lines","process","startsWith","lastLineIndex","lastLine","newLines","processLines","slice","modifiers","concat","startingLineNumber","currentModifiers","currentLineNumber","prevIndex","lastIndex","match","exec","processText","push","line","index","fullText","processCode","getModifierClasses","classes","classNames","Array","modifierBold","modifierItalic","modifierUnderline","key","startCase","undefined","findSearchResults","searchText","includes","searchResults","offset","start","indexOf","end","calculateHighlightedChunks","results","lineOffset","resultIndex","result","chunk","localOffset","localStart","Math","max","localEnd","min","highlight","renderLink","attributes","content","href","props","Link","to","LogLine","highlightResultIndex","useMemo","elements","span","className","classnames","textSelectedHighlight","textHighlight","Linkify","options","render","LogViewerControls","resultCount","resultIndexStep","toggleShouldFilter","handleKeyPress","event","metaKey","ctrlKey","altKey","shiftKey","IconButton","size","onClick","ChevronLeftIcon","Typography","ChevronRightIcon","TextField","variant","placeholder","value","searchInput","onKeyPress","onChange","e","setSearchInput","target","shouldFilter","FilterListIcon","color","HEADER_SIZE","useStyles","makeStyles","theme","root","palette","paper","header","height","display","alignItems","justifyContent","log","fontFamily","fontSize","typography","pxToRem","position","whiteSpace","action","hover","lineSelected","selected","lineCopyButton","paddingTop","paddingBottom","textAlign","width","marginRight","spacing","cursor","alpha","info","main","fontWeight","fontWeightBold","fontStyle","textDecoration","modifierForegroundBlack","colors","black","modifierForegroundRed","modifierForegroundGreen","modifierForegroundYellow","modifierForegroundBlue","modifierForegroundMagenta","modifierForegroundCyan","modifierForegroundWhite","white","modifierForegroundGrey","modifierBackgroundBlack","modifierBackgroundRed","modifierBackgroundGreen","modifierBackgroundYellow","modifierBackgroundBlue","modifierBackgroundMagenta","modifierBackgroundCyan","modifierBackgroundWhite","modifierBackgroundGrey","name","applySearchFilter","matchingLines","lineResultIndex","lineIndex","useLogViewerSearch","useState","setResultIndex","useToggle","filter","searchResult","decrement","next","resultLine","resultLineIndex","useLogViewerSelection","errorApi","useApi","errorApiRef","sel","setSelection","error","copyToClipboard","useCopyToClipboard","useEffect","post","shouldShowButton","isSelected","add","s","copySelection","copyText","l","RealLogViewer","fixedListInstance","setFixedListInstance","search","selection","location","useLocation","scrollToItem","hash","parseInt","replace","handleSelectLine","AutoSizer","Box","style","FixedSizeList","ref","instance","itemData","itemSize","itemCount","data","data-testid","CopyIcon","a","role"],"sourceRoot":""}