iobroker.javascript 9.2.2 → 9.2.4

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 (84) hide show
  1. package/README.md +10 -25
  2. package/admin/assets/{AiChatPanel-Bbux7LP7.js → AiChatPanel-B4vPXgLz.js} +1 -1
  3. package/admin/assets/{ScriptEditor-DKljeYQN.js → ScriptEditor-CmEeMfC2.js} +1 -1
  4. package/admin/assets/ScriptEditorVanillaMonaco-C22Gpet7.js +3 -0
  5. package/admin/assets/cronHoverProvider-Bg0Vz-1E.js +2 -0
  6. package/admin/assets/index-45IwpC7_.js +1 -0
  7. package/admin/assets/{index-DgE6XhUM.js → index-7mrTpzQy.js} +1 -1
  8. package/admin/assets/{index-DSvAO584.js → index-BTQOdA7v.js} +83 -83
  9. package/admin/assets/{index-_BUuZlI0.js → index-Dggem6AX.js} +1 -1
  10. package/admin/assets/{index-CexrwGGC.js → index-qoSy77Bg.js} +41 -37
  11. package/admin/assets/{localSharedImportMap-BCwqnmn4.js → localSharedImportMap-CVlAGiIu.js} +1 -1
  12. package/admin/assets/stateHoverProvider-DxTNxyYN.js +9 -0
  13. package/admin/assets/{virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DNrEsMrg.js → virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-CeYV4czE.js} +2 -2
  14. package/admin/custom/assets/Components-CGiJE5Zh.js +1 -0
  15. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_emotion_mf_1_react__loadShare__.mjs-sg07E3QA.js +1 -0
  16. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_emotion_mf_1_styled__loadShare__.mjs-CwjI4A-J.js +1 -0
  17. package/admin/custom/assets/{ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs-0SjJESw9.js → ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs-BW9Qbxx5.js} +1 -1
  18. package/admin/custom/assets/{ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs_commonjs-proxy-CInLgMWW.js → ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs_commonjs-proxy-2W2BYT2K.js} +1 -1
  19. package/admin/custom/assets/{ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-CorOEig8.js → ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-D8zcZsJo.js} +1 -1
  20. package/admin/custom/assets/DefaultPropsProvider-CfKHPa-G.js +1 -0
  21. package/admin/custom/assets/{TextField-DNzklBSl.js → TextField-CxPfV5Sr.js} +12 -12
  22. package/admin/custom/assets/{ThemeProvider-B4G3jidj.js → ThemeProvider-DSTCckLJ.js} +4 -4
  23. package/admin/custom/assets/{createSvgIcon-ZdrQ8zSU.js → createSvgIcon-b2B2NI3g.js} +1 -1
  24. package/admin/custom/assets/createTheme-MsdB8zt7.js +8 -0
  25. package/admin/custom/assets/defaultTheme-CmVP-QNF.js +1 -0
  26. package/admin/custom/assets/emotion-cache.browser.esm-BgJfNZJN.js +1 -0
  27. package/admin/custom/assets/emotion-react.browser.esm-chZAeh_-.js +1 -0
  28. package/admin/custom/assets/emotion-serialize.esm-BUa21YfQ.js +1 -0
  29. package/admin/custom/assets/emotion-styled.browser.esm-Yi13plpH.js +1 -0
  30. package/admin/custom/assets/emotion-use-insertion-effect-with-fallbacks.browser.esm-CEPeBbh9.js +1 -0
  31. package/admin/custom/assets/extends-CF3RwP-h.js +1 -0
  32. package/admin/custom/assets/index-17vbGv00.js +1 -0
  33. package/admin/custom/assets/{index-iRHaQfi-.js → index-B5DqCD_a.js} +1 -1
  34. package/admin/custom/assets/{index-DNKzDki_.js → index-B6NrrORQ.js} +159 -159
  35. package/admin/custom/assets/index-CT5PwRfY.js +964 -0
  36. package/admin/custom/assets/{index-YBvFYuP6.js → index-CzRngQHl.js} +1 -1
  37. package/admin/custom/assets/index-DLNtxshy.js +1 -0
  38. package/admin/custom/assets/{index-NItS-TWp.js → index-DTbSiEk2.js} +1 -1
  39. package/admin/custom/assets/{index-Dp7A3XHd.js → index-DV76KW3-.js} +4 -4
  40. package/admin/custom/assets/{index-D0iTiVVG.js → index-DlQbqHom.js} +1 -1
  41. package/admin/custom/assets/{index-BptSiKBK.js → index-FTmk0JJx.js} +5 -5
  42. package/admin/custom/assets/{jsx-runtime-DfVU3AZG.js → jsx-runtime-BplTyRFk.js} +1 -1
  43. package/admin/custom/assets/localSharedImportMap-ChjFDKsq.js +1 -0
  44. package/admin/custom/assets/useTheme-BV4xOYIL.js +1 -0
  45. package/admin/custom/assets/useTheme-ldICnlmf.js +1 -0
  46. package/admin/custom/assets/{virtualExposes-jSvr-kK3.js → virtualExposes-D402kVGY.js} +1 -1
  47. package/admin/custom/assets/{virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Br3IlnqO.js → virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-ClQrb2n1.js} +2 -2
  48. package/admin/custom/customComponents.js +1 -1
  49. package/admin/google-blockly/own/field_oid.js +151 -2
  50. package/admin/i18n/es.json +77 -77
  51. package/admin/mf-manifest.json +1 -1
  52. package/admin/remoteEntry.js +1 -1
  53. package/admin/tab.html +10 -8
  54. package/build/lib/debugger.js +1 -1
  55. package/build/lib/debugger.js.map +1 -1
  56. package/build/lib/eventObj.js +31 -14
  57. package/build/lib/eventObj.js.map +1 -1
  58. package/build/lib/inspect.js +3 -3
  59. package/build/lib/inspect.js.map +1 -1
  60. package/build/lib/sandbox.js +336 -119
  61. package/build/lib/sandbox.js.map +1 -1
  62. package/build/lib/scheduler.js +18 -13
  63. package/build/lib/scheduler.js.map +1 -1
  64. package/build/main.js +282 -149
  65. package/build/main.js.map +1 -1
  66. package/build/types.d.ts +18 -6
  67. package/io-package.json +27 -14
  68. package/package.json +11 -11
  69. package/admin/assets/ScriptEditorVanillaMonaco-CaFyKuJ2.js +0 -3
  70. package/admin/assets/index-SHs7_wDh.js +0 -1
  71. package/admin/assets/stateHoverProvider-CGChzV5W.js +0 -3
  72. package/admin/custom/assets/Components-B9ZyjeRI.js +0 -1
  73. package/admin/custom/assets/DefaultPropsProvider-CGb21NGY.js +0 -1
  74. package/admin/custom/assets/createTheme-Wd4QxQE0.js +0 -8
  75. package/admin/custom/assets/defaultTheme-F2iJF2G2.js +0 -1
  76. package/admin/custom/assets/index-AZB1OHDH.js +0 -1
  77. package/admin/custom/assets/index-C0RmLaAj.js +0 -1
  78. package/admin/custom/assets/index-sozs10Ij.js +0 -960
  79. package/admin/custom/assets/localSharedImportMap-BxT0VwTO.js +0 -1
  80. package/admin/custom/assets/useTheme-BfhDdtAr.js +0 -1
  81. package/admin/custom/assets/useTheme-DWZ6jNyq.js +0 -1
  82. /package/admin/custom/assets/{index-huvZQhZw.js → index-D_5kZmfw.js} +0 -0
  83. /package/admin/custom/assets/{index-CmJ8HzSc.js → index-DpJ18x6R.js} +0 -0
  84. /package/admin/custom/assets/{leaflet-src-k2rCV-Ix.js → leaflet-src-B472P7Y1.js} +0 -0
@@ -1,78 +1,78 @@
1
1
  {
2
- "Activate syntax help for these npm modules": "Active la ayuda de sintaxis para estos módulos npm",
3
- "Add module": "Agregar módulo",
4
- "Additional npm modules": "Módulos npm adicionales",
5
- "Allow self-signed certificates for URL requests": "Permitir certificados autofirmados para solicitudes de URL",
6
- "And not later": "Y no despues",
7
- "Astro settings": "Configuración de Astro",
8
- "But not earlier": "Pero no antes",
9
- "Create states for all astro times": "Crea estados para todos los tiempos astro.",
10
- "Day time settings": "Configuraciones del día",
11
- "Do not subscribe all states on start": "No suscriba todos los estados al inicio",
12
- "Enable command \"exec\"": "Habilite el comando \"exec\"",
13
- "Enable command \"sendToHost\"": "Habilitar el comando \"sendToHost\"",
14
- "Enable command \"setObject\"": "Habilitar el comando \"setObject\"",
15
- "Help": "Use el formulario con 49.1245 y <b>no</b> 49°34'0 \". De lo contrario, se convertirá automáticamente.",
16
- "Instance, that do mirroring": "Instancia, que se refleja",
17
- "Invalid format. Use A°B'C\"D": "Formato inválido. Use A°B'C\"D",
18
- "Javascript scripts adapter settings": "Configuración del adaptador de scripts de Javascript",
19
- "Latitude °": "Latitud °",
20
- "Longitude °": "Longitud °",
21
- "Maximum setState requests per Minute per Script": "Máximas solicitudes de Estados por minuto por script",
22
- "Maximum triggers per Script (until warning)": "Activadores máximos por script (hasta el aviso)",
23
- "Mirror scripts to file path": "Guiones espejo a la ruta del archivo",
24
- "Sort global scripts alphabetically": "Ordenar scripts globales alfabéticamente",
25
- "Module names": "Nombres de módulos",
26
- "Next sunrise": "Próximo amanecer:",
27
- "Next sunset": "Próxima puesta de sol:",
28
- "Offset": "Compensar",
29
- "Security relevant": "Seguridad relevante",
30
- "Settings": "Configuraciones",
31
- "This path is not allowed for mirroring. Please change it.": "Esta ruta no está permitida para la duplicación. Por favor cámbialo.",
32
- "Use system settings:": "Use la configuración del sistema",
33
- "Used as end of the daytime": "Usado como final del día",
34
- "Used as start of the daytime": "Utilizado como inicio del día",
35
- "Your home": "Tu hogar",
36
- "in minutes": "en minutos",
37
- "info_enableExec": "Seguridad del sistema relevante",
38
- "info_enableSendToHost": "Seguridad relevante",
39
- "info_enableSetObject": "Seguridad relevante",
40
- "info_libraries": "Dividido por coma",
41
- "sch_astro_dawn": "Amanecer",
42
- "sch_astro_dusk": "Oscuridad",
43
- "sch_astro_goldenHour": "hora dorada",
44
- "sch_astro_goldenHourEnd": "Fin de la hora dorada",
45
- "sch_astro_nadir": "Nadir",
46
- "sch_astro_nauticalDawn": "Amanecer náutico",
47
- "sch_astro_nauticalDusk": "Anochecer náutico",
48
- "sch_astro_night": "Noche",
49
- "sch_astro_nightEnd": "Fin de la noche",
50
- "sch_astro_solarNoon": "Mediodía solar",
51
- "sch_astro_sunrise": "amanecer",
52
- "sch_astro_sunriseEnd": "Fin del amanecer",
53
- "sch_astro_sunset": "Puesta de sol",
54
- "sch_astro_sunsetStart": "Puesta de sol",
55
- "tooltip_enableExec": "Permitir llamar al ejecutivo en scripts",
56
- "tooltip_enableSendToHost": "Permitir enviar mensajes a hosts en scripts",
57
- "tooltip_enableSetObject": "Permitir cambios de los objetos del sistema en scripts",
58
- "tooltip_latitude": "Latitud como 5.345 para usar funciones astro",
59
- "tooltip_libraries": "Bibliotecas adicionales de NPM divididas por comas. Puede acceder a ellos con require ('nombre') en las secuencias de comandos.",
60
- "tooltip_longitude": "Longitud como 5.345 para usar funciones astro",
61
- "tooltip_useSystemGPS": "Usa las coordenadas de la configuración del sistema",
62
- "Custom API Base URL": "URL base de API personalizada (p. ej. para Ollama, LM Studio)",
63
- "Custom API Base URL help": "Dejar vacío para OpenAI. Para Ollama usar http://localhost:11434/v1",
64
- "Test API connection": "Probar conexión API",
65
- "Test OpenAI": "Test OpenAI",
66
- "Test Anthropic": "Test Anthropic",
67
- "Test Gemini": "Test Gemini",
68
- "Test DeepSeek": "Test DeepSeek",
69
- "Test Custom API": "Test Custom API",
70
- "Custom API key": "API key (optional)",
71
- "Custom API key help": "Only needed if your provider requires authentication",
72
- "AI settings": "Configuración de IA",
73
- "AI settings description": "Si desea utilizar la generación de código con IA, puede definir aquí las claves API de los proveedores correspondientes. Solo se necesita la clave del proveedor que utilice.",
74
- "ChatGPT API key": "Clave API de ChatGPT",
75
- "Anthropic API key": "Clave API de Anthropic",
76
- "Gemini API key": "Clave API de Gemini",
77
- "DeepSeek API key": "Clave API de DeepSeek"
78
- }
2
+ "Activate syntax help for these npm modules": "Active la ayuda de sintaxis para estos módulos npm",
3
+ "Add module": "Agregar módulo",
4
+ "Additional npm modules": "Módulos npm adicionales",
5
+ "Allow self-signed certificates for URL requests": "Permitir certificados autofirmados para solicitudes de URL",
6
+ "And not later": "Y no después",
7
+ "Astro settings": "Configuración de Astro",
8
+ "But not earlier": "Pero no antes",
9
+ "Create states for all astro times": "Crea estados para todos los tiempos astro.",
10
+ "Day time settings": "Configuraciones del día",
11
+ "Do not subscribe all states on start": "No suscriba todos los estados al inicio",
12
+ "Enable command \"exec\"": "Habilite el comando \"exec\"",
13
+ "Enable command \"sendToHost\"": "Habilitar el comando \"sendToHost\"",
14
+ "Enable command \"setObject\"": "Habilitar el comando \"setObject\"",
15
+ "Help": "Use el formulario con 49.1245 y <b>no</b> 49°34'0 \". De lo contrario, se convertirá automáticamente.",
16
+ "Instance, that do mirroring": "Instancia, que se refleja",
17
+ "Invalid format. Use A°B'C\"D": "Formato inválido. Use A°B'C\"D",
18
+ "Javascript scripts adapter settings": "Configuración del adaptador de scripts de Javascript",
19
+ "Latitude °": "Latitud °",
20
+ "Longitude °": "Longitud °",
21
+ "Maximum setState requests per Minute per Script": "Máximas solicitudes de Estados por minuto por script",
22
+ "Maximum triggers per Script (until warning)": "Activadores máximos por script (hasta el aviso)",
23
+ "Mirror scripts to file path": "Guiones espejo a la ruta del archivo",
24
+ "Sort global scripts alphabetically": "Ordenar scripts globales alfabéticamente",
25
+ "Module names": "Nombres de módulos",
26
+ "Next sunrise": "Próximo amanecer:",
27
+ "Next sunset": "Próxima puesta de sol:",
28
+ "Offset": "Desplazamiento",
29
+ "Security relevant": "Seguridad relevante",
30
+ "Settings": "Ajustes",
31
+ "This path is not allowed for mirroring. Please change it.": "Esta ruta no está permitida para la duplicación. Por favor cámbialo.",
32
+ "Use system settings:": "Use la configuración del sistema",
33
+ "Used as end of the daytime": "Usado como final del día",
34
+ "Used as start of the daytime": "Utilizado como inicio del día",
35
+ "Your home": "Tu hogar",
36
+ "in minutes": "en minutos",
37
+ "info_enableExec": "Seguridad del sistema relevante",
38
+ "info_enableSendToHost": "Seguridad relevante",
39
+ "info_enableSetObject": "Seguridad relevante",
40
+ "info_libraries": "Dividido por coma",
41
+ "sch_astro_dawn": "Amanecer",
42
+ "sch_astro_dusk": "Anochecer",
43
+ "sch_astro_goldenHour": "hora dorada",
44
+ "sch_astro_goldenHourEnd": "Fin de la hora dorada",
45
+ "sch_astro_nadir": "Nadir",
46
+ "sch_astro_nauticalDawn": "Amanecer náutico",
47
+ "sch_astro_nauticalDusk": "Anochecer náutico",
48
+ "sch_astro_night": "Noche",
49
+ "sch_astro_nightEnd": "Fin de la noche",
50
+ "sch_astro_solarNoon": "Mediodía solar",
51
+ "sch_astro_sunrise": "amanecer",
52
+ "sch_astro_sunriseEnd": "Fin del amanecer",
53
+ "sch_astro_sunset": "Puesta de sol",
54
+ "sch_astro_sunsetStart": "Inicio de la puesta de sol",
55
+ "tooltip_enableExec": "Permitir llamar a exec en scripts",
56
+ "tooltip_enableSendToHost": "Permitir enviar mensajes a hosts en scripts",
57
+ "tooltip_enableSetObject": "Permitir cambios de los objetos del sistema en scripts",
58
+ "tooltip_latitude": "Latitud como 5.345 para usar funciones astro",
59
+ "tooltip_libraries": "Bibliotecas adicionales de NPM divididas por comas. Puede acceder a ellos con require ('nombre') en las secuencias de comandos.",
60
+ "tooltip_longitude": "Longitud como 5.345 para usar funciones astro",
61
+ "tooltip_useSystemGPS": "Usa las coordenadas de la configuración del sistema",
62
+ "Custom API Base URL": "URL base de API personalizada (p. ej. para Ollama, LM Studio)",
63
+ "Custom API Base URL help": "Dejar vacío para OpenAI. Para Ollama usar http://localhost:11434/v1",
64
+ "Test API connection": "Probar conexión API",
65
+ "Test OpenAI": "Test OpenAI",
66
+ "Test Anthropic": "Test Anthropic",
67
+ "Test Gemini": "Test Gemini",
68
+ "Test DeepSeek": "Test DeepSeek",
69
+ "Test Custom API": "Test Custom API",
70
+ "Custom API key": "API key (optional)",
71
+ "Custom API key help": "Only needed if your provider requires authentication",
72
+ "AI settings": "Configuración de IA",
73
+ "AI settings description": "Si desea utilizar la generación de código con IA, puede definir aquí las claves API de los proveedores correspondientes. Solo se necesita la clave del proveedor que utilice.",
74
+ "ChatGPT API key": "Clave API de ChatGPT",
75
+ "Anthropic API key": "Clave API de Anthropic",
76
+ "Gemini API key": "Clave API de Gemini",
77
+ "DeepSeek API key": "Clave API de DeepSeek"
78
+ }
@@ -1 +1 @@
1
- {"id":"iobroker_javascript","name":"iobroker_javascript","metaData":{"name":"iobroker_javascript","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"iobroker_javascript"},"remoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"iobroker_javascript","pluginVersion":"0.2.5","publicPath":"./"},"shared":[{"id":"iobroker_javascript:react","name":"react","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-Dsh1HfIY.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom","name":"react-dom","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-BkyLyaYT.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@mui/material","name":"@mui/material","version":"6.5.0","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-dN73sbyQ.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:prop-types","name":"prop-types","version":"15.8.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-CVZSzCXy.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@iobroker/adapter-react-v5","name":"@iobroker/adapter-react-v5","version":"8.1.8","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-CexrwGGC.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[]}
1
+ {"id":"iobroker_javascript","name":"iobroker_javascript","metaData":{"name":"iobroker_javascript","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"iobroker_javascript"},"remoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"iobroker_javascript","pluginVersion":"0.2.5","publicPath":"./"},"shared":[{"id":"iobroker_javascript:react","name":"react","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-Dsh1HfIY.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom","name":"react-dom","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-BkyLyaYT.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@mui/material","name":"@mui/material","version":"6.5.0","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-dN73sbyQ.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:prop-types","name":"prop-types","version":"15.8.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-CVZSzCXy.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@iobroker/adapter-react-v5","name":"@iobroker/adapter-react-v5","version":"8.2.6","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-qoSy77Bg.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[]}
@@ -1 +1 @@
1
- import"./assets/preload-helper-BDBacUwf.js";import{g as r,i as a}from"./assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DNrEsMrg.js";export{r as get,a as init};
1
+ import"./assets/preload-helper-BDBacUwf.js";import{g as r,i as a}from"./assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-CeYV4czE.js";export{r as get,a as init};
package/admin/tab.html CHANGED
@@ -115,9 +115,9 @@
115
115
  type="text/javascript"
116
116
  src="google-blockly/own/blocks_object.js"
117
117
  ></script>
118
- <script type="module" crossorigin src="./assets/index-DSvAO584.js"></script>
118
+ <script type="module" crossorigin src="./assets/index-BTQOdA7v.js"></script>
119
119
  <link rel="modulepreload" crossorigin href="./assets/preload-helper-BDBacUwf.js">
120
- <link rel="modulepreload" crossorigin href="./assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DNrEsMrg.js">
120
+ <link rel="modulepreload" crossorigin href="./assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-CeYV4czE.js">
121
121
  <link rel="modulepreload" crossorigin href="./assets/iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js">
122
122
  <link rel="modulepreload" crossorigin href="./assets/iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js">
123
123
  <link rel="modulepreload" crossorigin href="./assets/iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js">
@@ -134,18 +134,20 @@
134
134
  <noscript> You need to enable JavaScript to run this app. </noscript>
135
135
  <script>
136
136
  if (window.localStorage.getItem('App.theme') === 'dark' && !window.vendorPrefix) {
137
- window.document.body.style.background = 'black';
137
+ window.document.body.style.backgroundColor = 'black';
138
+ } else if (window.vendorPrefix === 'HA') {
139
+ window.document.body.style.backgroundColor = '#000000';
138
140
  }
139
141
 
140
142
  // support for older blockly extensions like blockly-plus
141
143
  if (window.Blockly) {
142
- window.Blockly.Constants = window.Blockly.Constants || {};
143
- window.Blockly.Constants.Loops = window.Blockly.Constants.Loops || {};
144
- window.Blockly.Constants.Variables = window.Blockly.Constants.Variables || {};
144
+ window.Blockly.Constants ||= {};
145
+ window.Blockly.Constants.Loops ||= {};
146
+ window.Blockly.Constants.Variables ||= {};
145
147
  window.Blockly.Constants.Variables.HUE = 'rgb(165, 91, 128)';
146
- window.Blockly.Constants.Logic = window.Blockly.Constants.Logic || {};
148
+ window.Blockly.Constants.Logic ||= {};
147
149
  window.Blockly.Constants.Logic.HUE = 'rgb(91, 128, 165)';
148
- window.Blockly.Constants.Math = window.Blockly.Constants.Logic || {};
150
+ window.Blockly.Constants.Math ||= {};
149
151
  window.Blockly.Constants.Math.HUE = 'rgb(91, 103, 165)';
150
152
  }
151
153
  </script>
@@ -377,7 +377,7 @@ function createRepl(inspector) {
377
377
  const absoluteFile = Path.resolve(filename);
378
378
  const json = JSON.stringify(this.data);
379
379
  FS.writeFileSync(absoluteFile, json);
380
- print('Saved profile to ' + absoluteFile);
380
+ print(`Saved profile to ${absoluteFile}`);
381
381
  }
382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AAC,CAAC,CAAC;QAEH,uCAAuC;QACvC,cAAc,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACzB,KAAK,CAAC,6BAA6B,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC","sourcesContent":["/*\n * Copyright Node.js contributors. All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\nimport { join, resolve } from 'node:path';\nimport { type ReplOptions, type REPLServer, start } from 'node:repl';\nimport {\n debuglog as debuglogUtil,\n inspect as inspectUtil,\n type InspectOptions,\n type InspectOptionsStylized,\n type Style,\n} from 'node:util';\nimport { type Context, runInContext } from 'node:vm';\nimport { fileURLToPath } from 'node:url';\nimport { builtinModules as PUBLIC_BUILTINS } from 'node:module';\nimport type { Debugger, Runtime } from 'node:inspector';\n\nimport type { NodeInspector } from './inspect';\n\nconst debuglog = debuglogUtil('inspect');\n\ninterface PropertyPreview {\n /**\n * Property name.\n */\n name: string;\n /**\n * Object type. Accessor means that the property itself is an accessor property.\n */\n type: string;\n /**\n * User-friendly property value string.\n */\n value?: string | undefined;\n /**\n * Object subtype hint. Specified for <code>object</code> type values only.\n */\n subtype?: string | undefined;\n}\n/*const SHORTCUTS = {\n cont: 'c',\n next: 'n',\n step: 's',\n out: 'o',\n backtrace: 'bt',\n setBreakpoint: 'sb',\n clearBreakpoint: 'cb',\n run: 'r',\n};\n\nconst HELP = `\nrun, restart, r Run the application or reconnect\nkill Kill a running application or disconnect\n\ncont, c Resume execution\nnext, n Continue to next line in current file\nstep, s Step into, potentially entering a function\nout, o Step out, leaving the current function\nbacktrace, bt Print the current backtrace\nlist Print the source around the current line where execution\n is currently paused\n\nsetBreakpoint, sb Set a breakpoint\nclearBreakpoint, cb Clear a breakpoint\nbreakpoints List all known breakpoints\nbreakOnException Pause execution whenever an exception is thrown\nbreakOnUncaught Pause execution whenever an exception isn't caught\nbreakOnNone Don't pause on exceptions (this is the default)\n\nwatch(expr) Start watching the given expression\nunwatch(expr) Stop watching an expression\nwatchers Print all watched expressions and their current values\n\nexec(expr) Evaluate the expression and print the value\nrepl Enter a debug repl that works like exec\n\nscripts List application scripts that are currently loaded\nscripts(true) List all scripts (including node-internals)\n\nprofile Start CPU profiling session.\nprofileEnd Stop current CPU profiling session.\nprofiles Array of completed CPU profiling sessions.\nprofiles[n].save(filepath = 'node.cpuprofile')\n Save CPU profiling session to disk as JSON.\n\ntakeHeapSnapshot(filepath = 'node.heapsnapshot')\n Take a heap snapshot and save to disk as JSON.\n`.trim();*/\n\nconst FUNCTION_NAME_PATTERN = /^(?:function\\*? )?([^(\\s]+)\\(/;\nfunction extractFunctionName(description: string | undefined): string {\n const fnNameMatch = description?.match(FUNCTION_NAME_PATTERN);\n return fnNameMatch ? `: ${fnNameMatch[1]}` : '';\n}\n\n// process.binding is a method available on the process object, which allows you to load internal modules written in C++\n// @ts-expect-error binding is internal function\nconst NATIVES = PUBLIC_BUILTINS ? process.binding('natives') : {};\n\nfunction isNativeUrl(url: string): boolean {\n url = url.replace(/\\.js$/, '');\n if (PUBLIC_BUILTINS) {\n if (url.startsWith('internal/') || PUBLIC_BUILTINS.includes(url)) {\n return true;\n }\n }\n\n return url in NATIVES || url === 'bootstrap_node';\n}\n\nfunction getRelativePath(filenameOrURL: string): string {\n const dir = join(resolve(), 'x').slice(0, -1);\n\n const filename = filenameOrURL.startsWith('file://') ? fileURLToPath(filenameOrURL) : filenameOrURL;\n\n // Change a path to relative, if possible\n if (filename.indexOf(dir) === 0) {\n return filename.slice(dir.length);\n }\n return filename;\n}\n\nfunction toCallback(promise: Promise<any>, callback: (...args: any[]) => void): void {\n function forward(...args: any[]): void {\n process.nextTick(() => callback(...args));\n }\n\n promise.then(forward.bind(null, null), forward);\n}\n\n// Adds spaces and prefix to number\n// maxN is a maximum number we should have space for\nfunction leftPad(n: number, prefix: string, maxN: number): string {\n const s = n.toString();\n const nchars = Math.max(2, String(maxN).length) + 1;\n const nspaces = nchars - s.length - 1;\n\n return prefix + ' '.repeat(nspaces) + s;\n}\n\nfunction markSourceColumn(sourceText: string, position: number, useColors?: boolean): string {\n if (!sourceText) {\n return '';\n }\n\n const head = sourceText.slice(0, position);\n let tail = sourceText.slice(position);\n\n // Colorize char if stdout supports colours\n if (useColors) {\n tail = tail.replace(/(.+?)([^\\w]|$)/, '\\u001b[32m$1\\u001b[39m$2');\n }\n\n // Return source line with coloured char at `position`\n return [head, tail].join('');\n}\n\nfunction extractErrorMessage(stack: string | undefined): string {\n if (!stack) {\n return '<unknown>';\n }\n const m = stack.match(/^\\w+: ([^\\n]+)/);\n return m ? m[1] : stack;\n}\n\nfunction convertResultToError(result: Runtime.RemoteObject): Error {\n const { className, description } = result;\n const err = new Error(extractErrorMessage(description));\n err.stack = description;\n Object.defineProperty(err, 'name', { value: className });\n return err;\n}\n\nclass RemoteObject implements Runtime.RemoteObject {\n type: string;\n subtype?: string | undefined;\n className?: string | undefined;\n\n value: any;\n unserializableValue?: Runtime.UnserializableValue | undefined;\n description: string | undefined;\n objectId?: Runtime.RemoteObjectId | undefined;\n preview?: Runtime.ObjectPreview | undefined;\n customPreview?: Runtime.CustomPreview | undefined;\n\n constructor(attributes: Runtime.RemoteObject | undefined) {\n this.type = 'undefined';\n Object.assign(this, attributes);\n if (this.type === 'number') {\n this.value = this.unserializableValue ? +this.unserializableValue : +this.value;\n }\n }\n\n [inspectUtil.custom](_depth: number, opts: InspectOptionsStylized): string {\n function formatProperty(prop: PropertyPreview): any {\n switch (prop.type) {\n case 'string':\n case 'undefined':\n return inspectUtil(prop.value, opts);\n\n case 'number':\n case 'boolean':\n return opts.stylize(prop.value as string, prop.type);\n\n case 'object':\n case 'symbol':\n if (prop.subtype === 'date') {\n return inspectUtil(new Date(prop.value as string), opts);\n }\n if (prop.subtype === 'array') {\n return opts.stylize(prop.value as string, 'special');\n }\n return opts.stylize(prop.value as string, (prop.subtype as Style) || 'special');\n\n default:\n return prop.value;\n }\n }\n\n switch (this.type) {\n case 'boolean':\n case 'number':\n case 'string':\n case 'undefined':\n return inspectUtil(this.value, opts);\n\n case 'symbol':\n return opts.stylize(this.description as string, 'special');\n\n case 'function': {\n const fnName = extractFunctionName(this.description);\n const formatted = `[${this.className}${fnName}]`;\n return opts.stylize(formatted, 'special');\n }\n\n case 'object':\n switch (this.subtype) {\n case 'date':\n return inspectUtil(new Date(this.description as string), opts);\n\n case 'null':\n return inspectUtil(null, opts);\n\n case 'regexp':\n return opts.stylize(this.description as string, 'regexp');\n\n default:\n break;\n }\n if (this.preview) {\n const props: any[] = this.preview.properties.map((prop, idx) => {\n const value = formatProperty(prop);\n if (prop.name === `${idx}`) {\n return value;\n }\n return `${prop.name}: ${value}`;\n });\n if (this.preview.overflow) {\n props.push('...');\n }\n const singleLine = props.join(', ');\n const propString = singleLine.length > 60 ? props.join(',\\n ') : singleLine;\n\n return this.subtype === 'array' ? `[ ${propString} ]` : `{ ${propString} }`;\n }\n return this.description || '';\n\n default:\n return this.description || '';\n }\n }\n\n static fromEvalResult({ result, wasThrown }: { result: RemoteObject; wasThrown?: boolean }): RemoteObject | Error {\n if (wasThrown) {\n return convertResultToError(result);\n }\n return new RemoteObject(result);\n }\n}\n\nclass ScopeSnapshot implements Debugger.Scope {\n /**\n * Scope type.\n */\n type: string;\n /**\n * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.\n */\n object: Runtime.RemoteObject;\n\n name?: string | undefined;\n /**\n * Location in the source code where scope starts\n */\n startLocation?: Debugger.Location | undefined;\n /**\n * Location in the source code where scope ends\n */\n endLocation?: Debugger.Location | undefined;\n\n properties: Map<string, RemoteObject>;\n\n completionGroup: string[];\n\n constructor(scope: Debugger.Scope, properties: Runtime.PropertyDescriptor[]) {\n this.type = scope.type;\n this.object = scope.object;\n\n Object.assign(this, scope);\n\n this.properties = new Map(\n properties.map(prop => {\n const value = new RemoteObject(prop.value);\n return [prop.name, value];\n }),\n );\n\n this.completionGroup = properties.map(prop => prop.name);\n }\n\n [inspectUtil.custom](_depth: number, opts: InspectOptions): string {\n const type = `${this.type[0].toUpperCase()}${this.type.slice(1)}`;\n const name = this.name ? `<${this.name}>` : '';\n const prefix = `${type}${name} `;\n return inspectUtil(this.properties, opts).replace(/^Map /, prefix);\n }\n}\n/*\nfunction copyOwnProperties(target: any, source: any): void {\n Object.getOwnPropertyNames(source).forEach(prop => {\n const descriptor = Object.getOwnPropertyDescriptor(source, prop);\n if (descriptor) {\n Object.defineProperty(target, prop, descriptor);\n }\n });\n}\n\nfunction aliasProperties(target, mapping) {\n Object.keys(mapping).forEach((key) => {\n const descriptor = Object.getOwnPropertyDescriptor(target, key);\n Object.defineProperty(target, mapping[key], descriptor);\n });\n}\n*/\nexport default function createRepl(inspector: NodeInspector): () => REPLServer {\n const { Debugger, /*HeapProfiler, Profiler,*/ Runtime } = inspector;\n\n let repl: REPLServer;\n\n // Things we want to keep around\n // const history = { control: [], debug: [] };\n // const watchedExpressions = [];\n // const knownBreakpoints = [];\n // let pauseOnExceptionState = 'none';\n let lastCommand: string;\n\n // Things we need to reset when the app restarts\n let knownScripts: Record<string, Debugger.ScriptParsedEventDataType & { isNative: boolean }> = {};\n let currentBacktrace: CallFrame[] | undefined;\n let selectedFrame: CallFrame | undefined;\n let exitDebugRepl: undefined | (() => void);\n\n function resetOnStart(): void {\n knownScripts = {};\n currentBacktrace = undefined;\n selectedFrame = undefined;\n\n if (exitDebugRepl) {\n exitDebugRepl();\n }\n exitDebugRepl = undefined;\n }\n\n resetOnStart();\n\n const INSPECT_OPTIONS: InspectOptions = { colors: inspector.stdout.isTTY };\n function inspect(value: any): string {\n return inspectUtil(value, INSPECT_OPTIONS);\n }\n\n function print(value: any, oneline = false): void {\n const text = typeof value === 'string' ? value : inspect(value);\n return inspector.print(text, oneline);\n }\n\n function getCurrentLocation(): Debugger.Location {\n if (!selectedFrame) {\n throw new Error('Requires execution to be paused');\n }\n return selectedFrame.location;\n }\n\n function isCurrentScript(script: Debugger.ScriptParsedEventDataType & { isNative: boolean }): boolean {\n return !!selectedFrame && getCurrentLocation().scriptId === script.scriptId;\n }\n\n function formatScripts(displayNatives = false): string {\n function isVisible(script: Debugger.ScriptParsedEventDataType & { isNative: boolean }): boolean {\n if (displayNatives) {\n return true;\n }\n return !script.isNative || isCurrentScript(script);\n }\n\n return Object.keys(knownScripts)\n .map(scriptId => knownScripts[scriptId])\n .filter(isVisible)\n .map(script => {\n const isCurrent = isCurrentScript(script);\n const { isNative, url } = script;\n const name = `${getRelativePath(url)}${isNative ? ' <native>' : ''}`;\n return `${isCurrent ? '*' : ' '} ${script.scriptId}: ${name}`;\n })\n .join('\\n');\n }\n function listScripts(displayNatives = false): void {\n print(formatScripts(displayNatives));\n }\n // @ts-expect-error no idea what this is\n listScripts[inspectUtil.custom] = function listWithoutInternal(): string {\n return formatScripts();\n };\n /*\n const profiles = [];\n class Profile {\n constructor(data) {\n this.data = data;\n }\n\n static createAndRegister({ profile }) {\n const p = new Profile(profile);\n profiles.push(p);\n return p;\n }\n\n [util.inspect.custom](depth, { stylize }) {\n const { startTime, endTime } = this.data;\n return stylize(`[Profile ${endTime - startTime}μs]`, 'special');\n }\n\n save(filename = 'node.cpuprofile') {\n const absoluteFile = Path.resolve(filename);\n const json = JSON.stringify(this.data);\n FS.writeFileSync(absoluteFile, json);\n print('Saved profile to ' + absoluteFile);\n }\n }\n*/\n class SourceSnippet {\n scriptSource: string;\n /**\n * Script identifier as reported in the <code>Debugger.scriptParsed</code>.\n */\n scriptId: Runtime.ScriptId;\n /**\n * Line number in the script (0-based).\n */\n lineNumber: number;\n /**\n * Column number in the script (0-based).\n */\n columnNumber: number;\n delta: number;\n constructor(location: Debugger.Location, delta: number, scriptSource: string) {\n this.lineNumber = location.lineNumber;\n this.columnNumber = location.columnNumber || 0;\n this.scriptId = location.scriptId;\n this.scriptSource = scriptSource;\n this.delta = delta;\n Object.assign(this, location);\n }\n\n [inspectUtil.custom](_depth: number, options: InspectOptions): string {\n const { /* scriptId, */ lineNumber, columnNumber, delta, scriptSource } = this;\n const start = Math.max(1, lineNumber - delta + 1);\n const end = lineNumber + delta + 1;\n\n const lines = scriptSource.split('\\n');\n return lines\n .slice(start - 1, end)\n .map((lineText, offset) => {\n const i = start + offset;\n const isCurrent = i === lineNumber + 1;\n\n const markedLine = isCurrent ? markSourceColumn(lineText, columnNumber, options.colors) : lineText;\n\n /*\n let isBreakpoint = false;\n knownBreakpoints.forEach(({ location }) => {\n if (!location) return;\n if (scriptId === location.scriptId &&\n i === (location.lineNumber + 1)) {\n isBreakpoint = true;\n }\n });\n */\n\n let prefixChar = ' ';\n if (isCurrent) {\n prefixChar = '>';\n } /*else if (isBreakpoint) {\n prefixChar = '*';\n }*/\n return `${leftPad(i, prefixChar, end)} ${markedLine}`;\n })\n .join('\\n');\n }\n }\n\n function getSourceSnippet(location: Debugger.Location, delta: number = 5): SourceSnippet {\n const { scriptId } = location;\n return Debugger.getScriptSource({ scriptId }).then(\n ({ scriptSource }: Debugger.GetScriptSourceReturnType) => new SourceSnippet(location, delta, scriptSource),\n );\n }\n\n class CallFrame implements Debugger.CallFrame {\n /**\n * Call frame identifier. This identifier is only valid while the virtual machine is paused.\n */\n callFrameId: Debugger.CallFrameId;\n /**\n * Name of the JavaScript function called on this call frame.\n */\n functionName: string;\n /**\n * Location in the source code.\n */\n functionLocation?: Debugger.Location | undefined;\n /**\n * Location in the source code.\n */\n location: Debugger.Location;\n /**\n * JavaScript script name or url.\n */\n url: string;\n /**\n * Scope chain for this call frame.\n */\n scopeChain: Debugger.Scope[];\n /**\n * <code>this</code> object for this call frame.\n */\n this: Runtime.RemoteObject;\n /**\n * The value being returned if the function is at return point.\n */\n returnValue?: Runtime.RemoteObject | undefined;\n\n constructor(callFrame: Debugger.CallFrame) {\n this.functionName = callFrame.functionName;\n this.url = callFrame.url;\n this.scopeChain = callFrame.scopeChain;\n this.this = callFrame.this;\n this.returnValue = callFrame.returnValue;\n this.location = callFrame.location;\n this.callFrameId = callFrame.callFrameId;\n\n Object.assign(this, callFrame);\n }\n\n loadScopes(): Promise<ScopeSnapshot[]> {\n return Promise.all(\n this.scopeChain\n .filter(scope => scope.type !== 'global')\n .map(scope => {\n const { objectId } = scope.object;\n return Runtime.getProperties({\n objectId,\n generatePreview: true,\n } as Runtime.GetPropertiesParameterType).then(({ result }: Runtime.GetPropertiesReturnType) => {\n return new ScopeSnapshot(scope, result);\n });\n }),\n );\n }\n\n list(delta: number = 5): SourceSnippet {\n return getSourceSnippet(this.location, delta);\n }\n }\n\n class Backtrace extends Array {\n [inspectUtil.custom](): string {\n return this.map((callFrame, idx) => {\n const {\n location: { scriptId, lineNumber, columnNumber },\n functionName,\n } = callFrame;\n const name = functionName || '(anonymous)';\n\n const script = knownScripts[scriptId];\n const relativeUrl = (script && getRelativePath(script.url)) || '<unknown>';\n const frameLocation = `${relativeUrl}:${lineNumber + 1}:${columnNumber}`;\n\n return `#${idx} ${name} ${frameLocation}`;\n }).join('\\n');\n }\n\n static from(callFrames: CallFrame[]): CallFrame[] {\n return super.from(\n Array.from(callFrames).map(callFrame => {\n if (callFrame instanceof CallFrame) {\n return callFrame;\n }\n return new CallFrame(callFrame);\n }),\n );\n }\n }\n\n function prepareControlCode(input: string): string {\n if (input === '\\n') {\n return lastCommand;\n }\n // exec process.title => exec(\"process.title\");\n const match = input.match(/^\\s*exec\\s+([^\\n]*)/);\n if (match) {\n lastCommand = `exec(${JSON.stringify(match[1])})`;\n } else {\n lastCommand = input;\n }\n return lastCommand;\n }\n\n // function evalInCurrentContext(code) {\n // // Repl asked for scope variables\n // if (code === '.scope') {\n // if (!selectedFrame) {\n // return Promise.reject(new Error('Requires execution to be paused'));\n // }\n // return selectedFrame.loadScopes().then((scopes) => {\n // return scopes.map((scope) => scope.completionGroup);\n // });\n // }\n //\n // if (selectedFrame) {\n // return Debugger.evaluateOnCallFrame({\n // callFrameId: selectedFrame.callFrameId,\n // expression: code,\n // objectGroup: 'node-inspect',\n // generatePreview: true,\n // }).then(RemoteObject.fromEvalResult);\n // }\n // return Runtime.evaluate({\n // expression: code,\n // objectGroup: 'node-inspect',\n // generatePreview: true,\n // }).then(RemoteObject.fromEvalResult);\n // }\n\n function controlEval(\n input: string,\n context: Context,\n filename: string,\n callback: (error: Error | null, result?: any) => void,\n ): void {\n debuglog('eval:', input);\n function returnToCallback(error: Error | null, result?: any): void {\n debuglog('end-eval:', input, error);\n callback(error, result);\n }\n\n try {\n const code = prepareControlCode(input);\n const result = runInContext(code, context, filename);\n\n if (result && typeof result.then === 'function') {\n toCallback(result, returnToCallback);\n return;\n }\n returnToCallback(null, result);\n } catch (e: any) {\n returnToCallback(e as Error);\n }\n }\n\n // function debugEval(input, context, filename, callback) {\n // debuglog('eval:', input);\n // function returnToCallback(error, result) {\n // debuglog('end-eval:', input, error);\n // callback(error, result);\n // }\n //\n // try {\n // const result = evalInCurrentContext(input);\n //\n // if (result && typeof result.then === 'function') {\n // toCallback(result, returnToCallback);\n // return;\n // }\n // returnToCallback(null, result);\n // } catch (e) {\n // returnToCallback(e);\n // }\n // }\n\n /*function formatWatchers(verbose = false) {\n if (!watchedExpressions.length) {\n return Promise.resolve('');\n }\n\n const inspectValue = (expr) =>\n evalInCurrentContext(expr)\n // .then(formatValue)\n .catch((error) => `<${error.message}>`);\n const lastIndex = watchedExpressions.length - 1;\n\n return Promise.all(watchedExpressions.map(inspectValue))\n .then((values) => {\n const lines = watchedExpressions\n .map((expr, idx) => {\n const prefix = `${leftPad(idx, ' ', lastIndex)}: ${expr} =`;\n const value = inspect(values[idx], { colors: true });\n if (value.indexOf('\\n') === -1) {\n return `${prefix} ${value}`;\n }\n return `${prefix}\\n ${value.split('\\n').join('\\n ')}`;\n });\n return lines.join('\\n');\n })\n .then((valueList) => {\n return verbose ? `Watchers:\\n${valueList}\\n` : valueList;\n });\n }*/\n\n //function watchers(verbose = false) {\n // return formatWatchers(verbose).then(print);\n //}\n\n // List source code\n // function list(delta = 5) {\n // return selectedFrame.list(delta)\n // .then(null, (error) => {\n // print('You can\\'t list source code right now');\n // throw error;\n // });\n // }\n\n //function handleBreakpointResolved({ breakpointId, location }) {\n // const script = knownScripts[location.scriptId];\n // const scriptUrl = script && script.url;\n // if (scriptUrl) {\n // Object.assign(location, { scriptUrl });\n // }\n // const isExisting = knownBreakpoints.some((bp) => {\n // if (bp.breakpointId === breakpointId) {\n // Object.assign(bp, { location });\n // return true;\n // }\n // return false;\n // });\n // if (!isExisting) {\n // knownBreakpoints.push({ breakpointId, location });\n // }\n //}\n\n // function listBreakpoints() {\n // if (!knownBreakpoints.length) {\n // print('No breakpoints yet');\n // return;\n // }\n //\n // function formatLocation(location) {\n // if (!location) return '<unknown location>';\n // const script = knownScripts[location.scriptId];\n // const scriptUrl = script ? script.url : location.scriptUrl;\n // return `${getRelativePath(scriptUrl)}:${location.lineNumber + 1}`;\n // }\n // const breaklist = knownBreakpoints\n // .map((bp, idx) => `#${idx} ${formatLocation(bp.location)}`)\n // .join('\\n');\n // print(breaklist);\n // }\n\n // function setBreakpoint(script, line, condition, silent) {\n // function registerBreakpoint({ breakpointId, actualLocation }) {\n // handleBreakpointResolved({ breakpointId, location: actualLocation });\n // if (actualLocation && actualLocation.scriptId) {\n // if (!silent) return getSourceSnippet(actualLocation, 5);\n // } else {\n // print(`Warning: script '${script}' was not loaded yet.`);\n // }\n // return undefined;\n // }\n //\n // // setBreakpoint(): set breakpoint at current location\n // if (script === undefined) {\n // return Debugger\n // .setBreakpoint({ location: getCurrentLocation(), condition })\n // .then(registerBreakpoint);\n // }\n //\n // // setBreakpoint(line): set breakpoint in current script at specific line\n // if (line === undefined && typeof script === 'number') {\n // const location = {\n // scriptId: getCurrentLocation().scriptId,\n // lineNumber: script - 1,\n // };\n // return Debugger.setBreakpoint({ location, condition })\n // .then(registerBreakpoint);\n // }\n //\n // if (typeof script !== 'string') {\n // throw new TypeError(`setBreakpoint() expects a string, got ${script}`);\n // }\n //\n // // setBreakpoint('fn()'): Break when a function is called\n // if (script.endsWith('()')) {\n // const debugExpr = `debug(${script.slice(0, -2)})`;\n // const debugCall = selectedFrame\n // ? Debugger.evaluateOnCallFrame({\n // callFrameId: selectedFrame.callFrameId,\n // expression: debugExpr,\n // includeCommandLineAPI: true,\n // })\n // : Runtime.evaluate({\n // expression: debugExpr,\n // includeCommandLineAPI: true,\n // });\n // return debugCall.then(({ result, wasThrown }) => {\n // if (wasThrown) return convertResultToError(result);\n // return undefined; // This breakpoint can't be removed the same way\n // });\n // }\n //\n // // setBreakpoint('scriptname')\n // let scriptId = null;\n // let ambiguous = false;\n // if (knownScripts[script]) {\n // scriptId = script;\n // } else {\n // for (const id of Object.keys(knownScripts)) {\n // const scriptUrl = knownScripts[id].url;\n // if (scriptUrl && scriptUrl.indexOf(script) !== -1) {\n // if (scriptId !== null) {\n // ambiguous = true;\n // }\n // scriptId = id;\n // }\n // }\n // }\n //\n // if (ambiguous) {\n // print('Script name is ambiguous');\n // return undefined;\n // }\n // if (line <= 0) {\n // print('Line should be a positive value');\n // return undefined;\n // }\n //\n // if (scriptId !== null) {\n // const location = { scriptId, lineNumber: line - 1 };\n // return Debugger.setBreakpoint({ location, condition })\n // .then(registerBreakpoint);\n // }\n //\n // const escapedPath = script.replace(/([/\\\\.?*()^${}|[\\]])/g, '\\\\$1');\n // const urlRegex = `^(.*[\\\\/\\\\\\\\])?${escapedPath}$`;\n //\n // return Debugger\n // .setBreakpointByUrl({ urlRegex, lineNumber: line - 1, condition })\n // .then((bp) => {\n // // TODO: handle bp.locations in case the regex matches existing files\n // if (!bp.location) { // Fake it for now.\n // Object.assign(bp, {\n // actualLocation: {\n // scriptUrl: `.*/${script}$`,\n // lineNumber: line - 1,\n // },\n // });\n // }\n // return registerBreakpoint(bp);\n // });\n // }\n //\n // function clearBreakpoint(url, line) {\n // const breakpoint = knownBreakpoints.find(({ location }) => {\n // if (!location) return false;\n // const script = knownScripts[location.scriptId];\n // if (!script) return false;\n // return (\n // script.url.indexOf(url) !== -1 && (location.lineNumber + 1) === line\n // );\n // });\n // if (!breakpoint) {\n // print(`Could not find breakpoint at ${url}:${line}`);\n // return Promise.resolve();\n // }\n // return Debugger.removeBreakpoint({ breakpointId: breakpoint.breakpointId })\n // .then(() => {\n // const idx = knownBreakpoints.indexOf(breakpoint);\n // knownBreakpoints.splice(idx, 1);\n // });\n // }\n //\n // function restoreBreakpoints() {\n // const lastBreakpoints = knownBreakpoints.slice();\n // knownBreakpoints.length = 0;\n // const newBreakpoints = lastBreakpoints\n // .filter(({ location }) => !!location.scriptUrl)\n // .map(({ location }) =>\n // setBreakpoint(location.scriptUrl, location.lineNumber + 1));\n // if (!newBreakpoints.length) return Promise.resolve();\n // return Promise.all(newBreakpoints).then((results) => {\n // print(`${results.length} breakpoints restored.`);\n // });\n // }\n\n // function setPauseOnExceptions(state) {\n // return Debugger.setPauseOnExceptions({ state })\n // .then(() => {\n // pauseOnExceptionState = state;\n // });\n // }\n\n Debugger.on('paused', (data: Debugger.PausedEventDataType): void => {\n const callFrames: CallFrame[] = data.callFrames as CallFrame[];\n const reason: string = data.reason;\n\n if (process.env.NODE_INSPECT_RESUME_ON_START === '1' && reason === 'Break on start') {\n debuglog('Paused on start, but NODE_INSPECT_RESUME_ON_START environment variable is set to 1, resuming');\n inspector.client.callMethod('Debugger.resume');\n return;\n }\n\n // Save execution context's data\n currentBacktrace = Backtrace.from(callFrames);\n selectedFrame = currentBacktrace[0];\n // const { scriptId, lineNumber } = selectedFrame.location;\n\n // const breakType = reason === 'other' ? 'break' : reason;\n // const script = knownScripts[scriptId];\n // const scriptUrl = script ? getRelativePath(script.url) : '[unknown]';\n\n // const header = `${breakType} in ${scriptUrl}:${lineNumber + 1}`;\n\n void inspector.suspendReplWhile(() => {\n const context = selectedFrame?.list(3);\n inspect(context);\n });\n });\n\n function handleResumed(): void {\n currentBacktrace = undefined;\n selectedFrame = undefined;\n }\n\n Debugger.on('resumed', handleResumed);\n\n //Debugger.on('breakpointResolved', handleBreakpointResolved);\n\n Debugger.on('scriptParsed', (script: Debugger.ScriptParsedEventDataType) => {\n const { scriptId, url } = script;\n if (url) {\n knownScripts[scriptId] = Object.assign(\n {\n isNative: isNativeUrl(url),\n },\n script,\n );\n }\n });\n\n /*Profiler.on('consoleProfileFinished', ({ profile }) => {\n Profile.createAndRegister({ profile });\n print([\n 'Captured new CPU profile.',\n `Access it with profiles[${profiles.length - 1}]`\n ].join('\\n'));\n });*/\n\n function initializeContext(context: Context): void {\n Object.defineProperty(context, 'Debugger', {\n value: inspector.Debugger,\n enumerable: true,\n configurable: true,\n // @ts-expect-error fix later\n writeable: false,\n });\n Object.defineProperty(context, 'HeapProfiler', {\n value: inspector.HeapProfiler,\n enumerable: true,\n configurable: true,\n // @ts-expect-error fix later\n writeable: false,\n });\n Object.defineProperty(context, 'Profiler', {\n value: inspector.Profiler,\n enumerable: true,\n configurable: true,\n // @ts-expect-error fix later\n writeable: false,\n });\n Object.defineProperty(context, 'Runtime', {\n value: inspector.Runtime,\n enumerable: true,\n configurable: true,\n // @ts-expect-error fix later\n writeable: false,\n });\n\n /*copyOwnProperties(context, {\n get help() {\n print(HELP);\n },\n\n get run() {\n return inspector.run();\n },\n\n get kill() {\n return inspector.killChild();\n },\n\n get restart() {\n return inspector.run();\n },\n\n get cont() {\n handleResumed();\n return Debugger.resume();\n },\n\n get next() {\n handleResumed();\n return Debugger.stepOver();\n },\n\n get step() {\n handleResumed();\n return Debugger.stepInto();\n },\n\n get out() {\n handleResumed();\n return Debugger.stepOut();\n },\n\n get pause() {\n return Debugger.pause();\n },\n\n get backtrace() {\n return currentBacktrace;\n },\n\n get breakpoints() {\n return listBreakpoints();\n },\n\n exec(expr) {\n return evalInCurrentContext(expr);\n },\n\n get profile() {\n return Profiler.start();\n },\n\n get profileEnd() {\n return Profiler.stop()\n .then(Profile.createAndRegister);\n },\n\n get profiles() {\n return profiles;\n },\n\n takeHeapSnapshot(filename = 'node.heapsnapshot') {\n return new Promise((resolve, reject) => {\n const absoluteFile = Path.resolve(filename);\n const writer = FS.createWriteStream(absoluteFile);\n let sizeWritten = 0;\n function onProgress({ done, total, finished }) {\n if (finished) {\n print('Heap snaphost prepared.');\n } else {\n print(`Heap snapshot: ${done}/${total}`, true);\n }\n }\n function onChunk({ chunk }) {\n sizeWritten += chunk.length;\n writer.write(chunk);\n print(`Writing snapshot: ${sizeWritten}`, true);\n }\n function onResolve() {\n writer.end(() => {\n teardown();\n print(`Wrote snapshot: ${absoluteFile}`);\n resolve();\n });\n }\n function onReject(error) {\n teardown();\n reject(error);\n }\n function teardown() {\n HeapProfiler.removeListener(\n 'reportHeapSnapshotProgress', onProgress);\n HeapProfiler.removeListener('addHeapSnapshotChunk', onChunk);\n }\n\n HeapProfiler.on('reportHeapSnapshotProgress', onProgress);\n HeapProfiler.on('addHeapSnapshotChunk', onChunk);\n\n print('Heap snapshot: 0/0', true);\n HeapProfiler.takeHeapSnapshot({ reportProgress: true })\n .then(onResolve, onReject);\n });\n },\n\n get watchers() {\n return watchers();\n },\n\n watch(expr) {\n watchedExpressions.push(expr);\n },\n\n unwatch(expr) {\n const index = watchedExpressions.indexOf(expr);\n\n // Unwatch by expression\n // or\n // Unwatch by watcher number\n watchedExpressions.splice(index !== -1 ? index : +expr, 1);\n },\n\n get repl() {\n // Don't display any default messages\n const listeners = repl.listeners('SIGINT').slice(0);\n repl.removeAllListeners('SIGINT');\n\n const oldContext = repl.context;\n\n exitDebugRepl = () => {\n // Restore all listeners\n process.nextTick(() => {\n listeners.forEach((listener) => {\n repl.on('SIGINT', listener);\n });\n });\n\n // Exit debug repl\n repl.eval = controlEval;\n\n // Swap history\n history.debug = repl.history;\n repl.history = history.control;\n\n repl.context = oldContext;\n repl.setPrompt('debug> ');\n repl.displayPrompt();\n\n repl.removeListener('SIGINT', exitDebugRepl);\n repl.removeListener('exit', exitDebugRepl);\n\n exitDebugRepl = null;\n };\n\n // Exit debug repl on SIGINT\n repl.on('SIGINT', exitDebugRepl);\n\n // Exit debug repl on repl exit\n repl.on('exit', exitDebugRepl);\n\n // Set new\n repl.eval = debugEval;\n repl.context = {};\n\n // Swap history\n history.control = repl.history;\n repl.history = history.debug;\n\n repl.setPrompt('> ');\n\n print('Press Ctrl + C to leave debug repl');\n repl.displayPrompt();\n },\n\n get version() {\n return Runtime.evaluate({\n expression: 'process.versions.v8',\n contextId: 1,\n returnByValue: true,\n }).then(({ result }) => {\n print(result.value);\n });\n },\n\n scripts: listScripts,\n\n //setBreakpoint,\n //clearBreakpoint,\n setPauseOnExceptions,\n get breakOnException() {\n return setPauseOnExceptions('all');\n },\n get breakOnUncaught() {\n return setPauseOnExceptions('uncaught');\n },\n get breakOnNone() {\n return setPauseOnExceptions('none');\n },\n\n list,\n });*/\n //aliasProperties(context, SHORTCUTS);\n }\n\n function initAfterStart(): Promise<void> {\n const setupTasks = [\n Runtime.enable(),\n //Profiler.enable(),\n //Profiler.setSamplingInterval({ interval: 100 }),\n Debugger.enable(),\n Debugger.setPauseOnExceptions({ state: 'none' }),\n Debugger.setAsyncCallStackDepth({ maxDepth: 1 }),\n Debugger.setBlackboxPatterns({ patterns: [] }),\n // Debugger.setPauseOnExceptions({ state: 'all' }),\n //restoreBreakpoints(),\n Runtime.runIfWaitingForDebugger(),\n ];\n return Promise.all(setupTasks);\n }\n\n return function startRepl(): REPLServer {\n inspector.client.on('close', () => resetOnStart());\n inspector.client.on('ready', () => {\n initAfterStart().catch(err => {\n print(`Error starting inspector: ${err.message}`);\n });\n });\n\n const replOptions: ReplOptions = {\n prompt: 'debug> ',\n input: inspector.stdin,\n output: inspector.stdout,\n eval: controlEval,\n useGlobal: false,\n ignoreUndefined: true,\n };\n\n repl = start(replOptions);\n initializeContext(repl.context);\n repl.on('reset', initializeContext);\n\n repl.defineCommand('interrupt', () => {\n // We want this for testing purposes where sending CTRL-C can be tricky.\n repl.emit('SIGINT');\n });\n\n // Init once for the initial connection\n initAfterStart().catch(err => {\n print(`Error starting inspector: ${err.message}`);\n });\n\n return repl;\n };\n}\n"]}
1
+ {"version":3,"file":"debugger.js","sourceRoot":"","sources":["../../src/lib/debugger.ts"],"names":[],"mappings":";;AA0WA,6BAq5BC;AA/vCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,yCAA0C;AAC1C,yCAAqE;AACrE,yCAMmB;AACnB,qCAAqD;AACrD,uCAAyC;AACzC,6CAAgE;AAKhE,MAAM,QAAQ,GAAG,IAAA,oBAAY,EAAC,SAAS,CAAC,CAAC;AAoBzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAgDW;AAEX,MAAM,qBAAqB,GAAG,+BAA+B,CAAC;AAC9D,SAAS,mBAAmB,CAAC,WAA+B;IACxD,MAAM,WAAW,GAAG,WAAW,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC9D,OAAO,WAAW,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACpD,CAAC;A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AA6B,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,MAAM,WAAW,GAAgB;YAC7B,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,MAAM,EAAE,SAAS,CAAC,MAAM;YACxB,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,KAAK;YAChB,eAAe,EAAE,IAAI;SACxB,CAAC;QAEF,IAAI,GAAG,IAAA,iBAAK,EAAC,WAAW,CAAC,CAAC;QAC1B,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAEpC,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,GAAG,EAAE;YACjC,wEAAwE;YACxE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,uCAAuC;QACvC,cAAc,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACzB,KAAK,CAAC,6BAA6B,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC","sourcesContent":["/*\n * Copyright Node.js contributors. All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\nimport { join, resolve } from 'node:path';\nimport { type ReplOptions, type REPLServer, start } from 'node:repl';\nimport {\n debuglog as debuglogUtil,\n inspect as inspectUtil,\n type InspectOptions,\n type InspectOptionsStylized,\n type Style,\n} from 'node:util';\nimport { type Context, runInContext } from 'node:vm';\nimport { fileURLToPath } from 'node:url';\nimport { builtinModules as PUBLIC_BUILTINS } from 'node:module';\nimport type { Debugger, Runtime } from 'node:inspector';\n\nimport type { NodeInspector } from './inspect';\n\nconst debuglog = debuglogUtil('inspect');\n\ninterface PropertyPreview {\n /**\n * Property name.\n */\n name: string;\n /**\n * Object type. Accessor means that the property itself is an accessor property.\n */\n type: string;\n /**\n * User-friendly property value string.\n */\n value?: string | undefined;\n /**\n * Object subtype hint. Specified for <code>object</code> type values only.\n */\n subtype?: string | undefined;\n}\n/*const SHORTCUTS = {\n cont: 'c',\n next: 'n',\n step: 's',\n out: 'o',\n backtrace: 'bt',\n setBreakpoint: 'sb',\n clearBreakpoint: 'cb',\n run: 'r',\n};\n\nconst HELP = `\nrun, restart, r Run the application or reconnect\nkill Kill a running application or disconnect\n\ncont, c Resume execution\nnext, n Continue to next line in current file\nstep, s Step into, potentially entering a function\nout, o Step out, leaving the current function\nbacktrace, bt Print the current backtrace\nlist Print the source around the current line where execution\n is currently paused\n\nsetBreakpoint, sb Set a breakpoint\nclearBreakpoint, cb Clear a breakpoint\nbreakpoints List all known breakpoints\nbreakOnException Pause execution whenever an exception is thrown\nbreakOnUncaught Pause execution whenever an exception isn't caught\nbreakOnNone Don't pause on exceptions (this is the default)\n\nwatch(expr) Start watching the given expression\nunwatch(expr) Stop watching an expression\nwatchers Print all watched expressions and their current values\n\nexec(expr) Evaluate the expression and print the value\nrepl Enter a debug repl that works like exec\n\nscripts List application scripts that are currently loaded\nscripts(true) List all scripts (including node-internals)\n\nprofile Start CPU profiling session.\nprofileEnd Stop current CPU profiling session.\nprofiles Array of completed CPU profiling sessions.\nprofiles[n].save(filepath = 'node.cpuprofile')\n Save CPU profiling session to disk as JSON.\n\ntakeHeapSnapshot(filepath = 'node.heapsnapshot')\n Take a heap snapshot and save to disk as JSON.\n`.trim();*/\n\nconst FUNCTION_NAME_PATTERN = /^(?:function\\*? )?([^(\\s]+)\\(/;\nfunction extractFunctionName(description: string | undefined): string {\n const fnNameMatch = description?.match(FUNCTION_NAME_PATTERN);\n return fnNameMatch ? `: ${fnNameMatch[1]}` : '';\n}\n\n// process.binding is a method available on the process object, which allows you to load internal modules written in C++\n// @ts-expect-error binding is internal function\nconst NATIVES = PUBLIC_BUILTINS ? process.binding('natives') : {};\n\nfunction isNativeUrl(url: string): boolean {\n url = url.replace(/\\.js$/, '');\n if (PUBLIC_BUILTINS) {\n if (url.startsWith('internal/') || PUBLIC_BUILTINS.includes(url)) {\n return true;\n }\n }\n\n return url in NATIVES || url === 'bootstrap_node';\n}\n\nfunction getRelativePath(filenameOrURL: string): string {\n const dir = join(resolve(), 'x').slice(0, -1);\n\n const filename = filenameOrURL.startsWith('file://') ? fileURLToPath(filenameOrURL) : filenameOrURL;\n\n // Change a path to relative, if possible\n if (filename.indexOf(dir) === 0) {\n return filename.slice(dir.length);\n }\n return filename;\n}\n\nfunction toCallback(promise: Promise<any>, callback: (...args: any[]) => void): void {\n function forward(...args: any[]): void {\n process.nextTick(() => callback(...args));\n }\n\n promise.then(forward.bind(null, null), forward);\n}\n\n// Adds spaces and prefix to number\n// maxN is a maximum number we should have space for\nfunction leftPad(n: number, prefix: string, maxN: number): string {\n const s = n.toString();\n const nchars = Math.max(2, String(maxN).length) + 1;\n const nspaces = nchars - s.length - 1;\n\n return prefix + ' '.repeat(nspaces) + s;\n}\n\nfunction markSourceColumn(sourceText: string, position: number, useColors?: boolean): string {\n if (!sourceText) {\n return '';\n }\n\n const head = sourceText.slice(0, position);\n let tail = sourceText.slice(position);\n\n // Colorize char if stdout supports colours\n if (useColors) {\n tail = tail.replace(/(.+?)([^\\w]|$)/, '\\u001b[32m$1\\u001b[39m$2');\n }\n\n // Return source line with coloured char at `position`\n return [head, tail].join('');\n}\n\nfunction extractErrorMessage(stack: string | undefined): string {\n if (!stack) {\n return '<unknown>';\n }\n const m = stack.match(/^\\w+: ([^\\n]+)/);\n return m ? m[1] : stack;\n}\n\nfunction convertResultToError(result: Runtime.RemoteObject): Error {\n const { className, description } = result;\n const err = new Error(extractErrorMessage(description));\n err.stack = description;\n Object.defineProperty(err, 'name', { value: className });\n return err;\n}\n\nclass RemoteObject implements Runtime.RemoteObject {\n type: string;\n subtype?: string | undefined;\n className?: string | undefined;\n\n value: any;\n unserializableValue?: Runtime.UnserializableValue | undefined;\n description: string | undefined;\n objectId?: Runtime.RemoteObjectId | undefined;\n preview?: Runtime.ObjectPreview | undefined;\n customPreview?: Runtime.CustomPreview | undefined;\n\n constructor(attributes: Runtime.RemoteObject | undefined) {\n this.type = 'undefined';\n Object.assign(this, attributes);\n if (this.type === 'number') {\n this.value = this.unserializableValue ? +this.unserializableValue : +this.value;\n }\n }\n\n [inspectUtil.custom](_depth: number, opts: InspectOptionsStylized): string {\n function formatProperty(prop: PropertyPreview): any {\n switch (prop.type) {\n case 'string':\n case 'undefined':\n return inspectUtil(prop.value, opts);\n\n case 'number':\n case 'boolean':\n return opts.stylize(prop.value as string, prop.type);\n\n case 'object':\n case 'symbol':\n if (prop.subtype === 'date') {\n return inspectUtil(new Date(prop.value as string), opts);\n }\n if (prop.subtype === 'array') {\n return opts.stylize(prop.value as string, 'special');\n }\n return opts.stylize(prop.value as string, (prop.subtype as Style) || 'special');\n\n default:\n return prop.value;\n }\n }\n\n switch (this.type) {\n case 'boolean':\n case 'number':\n case 'string':\n case 'undefined':\n return inspectUtil(this.value, opts);\n\n case 'symbol':\n return opts.stylize(this.description as string, 'special');\n\n case 'function': {\n const fnName = extractFunctionName(this.description);\n const formatted = `[${this.className}${fnName}]`;\n return opts.stylize(formatted, 'special');\n }\n\n case 'object':\n switch (this.subtype) {\n case 'date':\n return inspectUtil(new Date(this.description as string), opts);\n\n case 'null':\n return inspectUtil(null, opts);\n\n case 'regexp':\n return opts.stylize(this.description as string, 'regexp');\n\n default:\n break;\n }\n if (this.preview) {\n const props: any[] = this.preview.properties.map((prop, idx) => {\n const value = formatProperty(prop);\n if (prop.name === `${idx}`) {\n return value;\n }\n return `${prop.name}: ${value}`;\n });\n if (this.preview.overflow) {\n props.push('...');\n }\n const singleLine = props.join(', ');\n const propString = singleLine.length > 60 ? props.join(',\\n ') : singleLine;\n\n return this.subtype === 'array' ? `[ ${propString} ]` : `{ ${propString} }`;\n }\n return this.description || '';\n\n default:\n return this.description || '';\n }\n }\n\n static fromEvalResult({ result, wasThrown }: { result: RemoteObject; wasThrown?: boolean }): RemoteObject | Error {\n if (wasThrown) {\n return convertResultToError(result);\n }\n return new RemoteObject(result);\n }\n}\n\nclass ScopeSnapshot implements Debugger.Scope {\n /**\n * Scope type.\n */\n type: string;\n /**\n * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.\n */\n object: Runtime.RemoteObject;\n\n name?: string | undefined;\n /**\n * Location in the source code where scope starts\n */\n startLocation?: Debugger.Location | undefined;\n /**\n * Location in the source code where scope ends\n */\n endLocation?: Debugger.Location | undefined;\n\n properties: Map<string, RemoteObject>;\n\n completionGroup: string[];\n\n constructor(scope: Debugger.Scope, properties: Runtime.PropertyDescriptor[]) {\n this.type = scope.type;\n this.object = scope.object;\n\n Object.assign(this, scope);\n\n this.properties = new Map(\n properties.map(prop => {\n const value = new RemoteObject(prop.value);\n return [prop.name, value];\n }),\n );\n\n this.completionGroup = properties.map(prop => prop.name);\n }\n\n [inspectUtil.custom](_depth: number, opts: InspectOptions): string {\n const type = `${this.type[0].toUpperCase()}${this.type.slice(1)}`;\n const name = this.name ? `<${this.name}>` : '';\n const prefix = `${type}${name} `;\n return inspectUtil(this.properties, opts).replace(/^Map /, prefix);\n }\n}\n/*\nfunction copyOwnProperties(target: any, source: any): void {\n Object.getOwnPropertyNames(source).forEach(prop => {\n const descriptor = Object.getOwnPropertyDescriptor(source, prop);\n if (descriptor) {\n Object.defineProperty(target, prop, descriptor);\n }\n });\n}\n\nfunction aliasProperties(target, mapping) {\n Object.keys(mapping).forEach((key) => {\n const descriptor = Object.getOwnPropertyDescriptor(target, key);\n Object.defineProperty(target, mapping[key], descriptor);\n });\n}\n*/\nexport default function createRepl(inspector: NodeInspector): () => REPLServer {\n const { Debugger, /*HeapProfiler, Profiler,*/ Runtime } = inspector;\n\n let repl: REPLServer;\n\n // Things we want to keep around\n // const history = { control: [], debug: [] };\n // const watchedExpressions = [];\n // const knownBreakpoints = [];\n // let pauseOnExceptionState = 'none';\n let lastCommand: string;\n\n // Things we need to reset when the app restarts\n let knownScripts: Record<string, Debugger.ScriptParsedEventDataType & { isNative: boolean }> = {};\n let currentBacktrace: CallFrame[] | undefined;\n let selectedFrame: CallFrame | undefined;\n let exitDebugRepl: undefined | (() => void);\n\n function resetOnStart(): void {\n knownScripts = {};\n currentBacktrace = undefined;\n selectedFrame = undefined;\n\n if (exitDebugRepl) {\n exitDebugRepl();\n }\n exitDebugRepl = undefined;\n }\n\n resetOnStart();\n\n const INSPECT_OPTIONS: InspectOptions = { colors: inspector.stdout.isTTY };\n function inspect(value: any): string {\n return inspectUtil(value, INSPECT_OPTIONS);\n }\n\n function print(value: any, oneline = false): void {\n const text = typeof value === 'string' ? value : inspect(value);\n return inspector.print(text, oneline);\n }\n\n function getCurrentLocation(): Debugger.Location {\n if (!selectedFrame) {\n throw new Error('Requires execution to be paused');\n }\n return selectedFrame.location;\n }\n\n function isCurrentScript(script: Debugger.ScriptParsedEventDataType & { isNative: boolean }): boolean {\n return !!selectedFrame && getCurrentLocation().scriptId === script.scriptId;\n }\n\n function formatScripts(displayNatives = false): string {\n function isVisible(script: Debugger.ScriptParsedEventDataType & { isNative: boolean }): boolean {\n if (displayNatives) {\n return true;\n }\n return !script.isNative || isCurrentScript(script);\n }\n\n return Object.keys(knownScripts)\n .map(scriptId => knownScripts[scriptId])\n .filter(isVisible)\n .map(script => {\n const isCurrent = isCurrentScript(script);\n const { isNative, url } = script;\n const name = `${getRelativePath(url)}${isNative ? ' <native>' : ''}`;\n return `${isCurrent ? '*' : ' '} ${script.scriptId}: ${name}`;\n })\n .join('\\n');\n }\n function listScripts(displayNatives = false): void {\n print(formatScripts(displayNatives));\n }\n // @ts-expect-error no idea what this is\n listScripts[inspectUtil.custom] = function listWithoutInternal(): string {\n return formatScripts();\n };\n /*\n const profiles = [];\n class Profile {\n constructor(data) {\n this.data = data;\n }\n\n static createAndRegister({ profile }) {\n const p = new Profile(profile);\n profiles.push(p);\n return p;\n }\n\n [util.inspect.custom](depth, { stylize }) {\n const { startTime, endTime } = this.data;\n return stylize(`[Profile ${endTime - startTime}μs]`, 'special');\n }\n\n save(filename = 'node.cpuprofile') {\n const absoluteFile = Path.resolve(filename);\n const json = JSON.stringify(this.data);\n FS.writeFileSync(absoluteFile, json);\n print(`Saved profile to ${absoluteFile}`);\n }\n }\n*/\n class SourceSnippet {\n scriptSource: string;\n /**\n * Script identifier as reported in the <code>Debugger.scriptParsed</code>.\n */\n scriptId: Runtime.ScriptId;\n /**\n * Line number in the script (0-based).\n */\n lineNumber: number;\n /**\n * Column number in the script (0-based).\n */\n columnNumber: number;\n delta: number;\n constructor(location: Debugger.Location, delta: number, scriptSource: string) {\n this.lineNumber = location.lineNumber;\n this.columnNumber = location.columnNumber || 0;\n this.scriptId = location.scriptId;\n this.scriptSource = scriptSource;\n this.delta = delta;\n Object.assign(this, location);\n }\n\n [inspectUtil.custom](_depth: number, options: InspectOptions): string {\n const { /* scriptId, */ lineNumber, columnNumber, delta, scriptSource } = this;\n const start = Math.max(1, lineNumber - delta + 1);\n const end = lineNumber + delta + 1;\n\n const lines = scriptSource.split('\\n');\n return lines\n .slice(start - 1, end)\n .map((lineText, offset) => {\n const i = start + offset;\n const isCurrent = i === lineNumber + 1;\n\n const markedLine = isCurrent ? markSourceColumn(lineText, columnNumber, options.colors) : lineText;\n\n /*\n let isBreakpoint = false;\n knownBreakpoints.forEach(({ location }) => {\n if (!location) return;\n if (scriptId === location.scriptId &&\n i === (location.lineNumber + 1)) {\n isBreakpoint = true;\n }\n });\n */\n\n let prefixChar = ' ';\n if (isCurrent) {\n prefixChar = '>';\n } /*else if (isBreakpoint) {\n prefixChar = '*';\n }*/\n return `${leftPad(i, prefixChar, end)} ${markedLine}`;\n })\n .join('\\n');\n }\n }\n\n function getSourceSnippet(location: Debugger.Location, delta: number = 5): SourceSnippet {\n const { scriptId } = location;\n return Debugger.getScriptSource({ scriptId }).then(\n ({ scriptSource }: Debugger.GetScriptSourceReturnType) => new SourceSnippet(location, delta, scriptSource),\n );\n }\n\n class CallFrame implements Debugger.CallFrame {\n /**\n * Call frame identifier. This identifier is only valid while the virtual machine is paused.\n */\n callFrameId: Debugger.CallFrameId;\n /**\n * Name of the JavaScript function called on this call frame.\n */\n functionName: string;\n /**\n * Location in the source code.\n */\n functionLocation?: Debugger.Location | undefined;\n /**\n * Location in the source code.\n */\n location: Debugger.Location;\n /**\n * JavaScript script name or url.\n */\n url: string;\n /**\n * Scope chain for this call frame.\n */\n scopeChain: Debugger.Scope[];\n /**\n * <code>this</code> object for this call frame.\n */\n this: Runtime.RemoteObject;\n /**\n * The value being returned if the function is at return point.\n */\n returnValue?: Runtime.RemoteObject | undefined;\n\n constructor(callFrame: Debugger.CallFrame) {\n this.functionName = callFrame.functionName;\n this.url = callFrame.url;\n this.scopeChain = callFrame.scopeChain;\n this.this = callFrame.this;\n this.returnValue = callFrame.returnValue;\n this.location = callFrame.location;\n this.callFrameId = callFrame.callFrameId;\n\n Object.assign(this, callFrame);\n }\n\n loadScopes(): Promise<ScopeSnapshot[]> {\n return Promise.all(\n this.scopeChain\n .filter(scope => scope.type !== 'global')\n .map(scope => {\n const { objectId } = scope.object;\n return Runtime.getProperties({\n objectId,\n generatePreview: true,\n } as Runtime.GetPropertiesParameterType).then(({ result }: Runtime.GetPropertiesReturnType) => {\n return new ScopeSnapshot(scope, result);\n });\n }),\n );\n }\n\n list(delta: number = 5): SourceSnippet {\n return getSourceSnippet(this.location, delta);\n }\n }\n\n class Backtrace extends Array {\n [inspectUtil.custom](): string {\n return this.map((callFrame, idx) => {\n const {\n location: { scriptId, lineNumber, columnNumber },\n functionName,\n } = callFrame;\n const name = functionName || '(anonymous)';\n\n const script = knownScripts[scriptId];\n const relativeUrl = (script && getRelativePath(script.url)) || '<unknown>';\n const frameLocation = `${relativeUrl}:${lineNumber + 1}:${columnNumber}`;\n\n return `#${idx} ${name} ${frameLocation}`;\n }).join('\\n');\n }\n\n static from(callFrames: CallFrame[]): CallFrame[] {\n return super.from(\n Array.from(callFrames).map(callFrame => {\n if (callFrame instanceof CallFrame) {\n return callFrame;\n }\n return new CallFrame(callFrame);\n }),\n );\n }\n }\n\n function prepareControlCode(input: string): string {\n if (input === '\\n') {\n return lastCommand;\n }\n // exec process.title => exec(\"process.title\");\n const match = input.match(/^\\s*exec\\s+([^\\n]*)/);\n if (match) {\n lastCommand = `exec(${JSON.stringify(match[1])})`;\n } else {\n lastCommand = input;\n }\n return lastCommand;\n }\n\n // function evalInCurrentContext(code) {\n // // Repl asked for scope variables\n // if (code === '.scope') {\n // if (!selectedFrame) {\n // return Promise.reject(new Error('Requires execution to be paused'));\n // }\n // return selectedFrame.loadScopes().then((scopes) => {\n // return scopes.map((scope) => scope.completionGroup);\n // });\n // }\n //\n // if (selectedFrame) {\n // return Debugger.evaluateOnCallFrame({\n // callFrameId: selectedFrame.callFrameId,\n // expression: code,\n // objectGroup: 'node-inspect',\n // generatePreview: true,\n // }).then(RemoteObject.fromEvalResult);\n // }\n // return Runtime.evaluate({\n // expression: code,\n // objectGroup: 'node-inspect',\n // generatePreview: true,\n // }).then(RemoteObject.fromEvalResult);\n // }\n\n function controlEval(\n input: string,\n context: Context,\n filename: string,\n callback: (error: Error | null, result?: any) => void,\n ): void {\n debuglog('eval:', input);\n function returnToCallback(error: Error | null, result?: any): void {\n debuglog('end-eval:', input, error);\n callback(error, result);\n }\n\n try {\n const code = prepareControlCode(input);\n const result = runInContext(code, context, filename);\n\n if (result && typeof result.then === 'function') {\n toCallback(result, returnToCallback);\n return;\n }\n returnToCallback(null, result);\n } catch (e: any) {\n returnToCallback(e as Error);\n }\n }\n\n // function debugEval(input, context, filename, callback) {\n // debuglog('eval:', input);\n // function returnToCallback(error, result) {\n // debuglog('end-eval:', input, error);\n // callback(error, result);\n // }\n //\n // try {\n // const result = evalInCurrentContext(input);\n //\n // if (result && typeof result.then === 'function') {\n // toCallback(result, returnToCallback);\n // return;\n // }\n // returnToCallback(null, result);\n // } catch (e) {\n // returnToCallback(e);\n // }\n // }\n\n /*function formatWatchers(verbose = false) {\n if (!watchedExpressions.length) {\n return Promise.resolve('');\n }\n\n const inspectValue = (expr) =>\n evalInCurrentContext(expr)\n // .then(formatValue)\n .catch((error) => `<${error.message}>`);\n const lastIndex = watchedExpressions.length - 1;\n\n return Promise.all(watchedExpressions.map(inspectValue))\n .then((values) => {\n const lines = watchedExpressions\n .map((expr, idx) => {\n const prefix = `${leftPad(idx, ' ', lastIndex)}: ${expr} =`;\n const value = inspect(values[idx], { colors: true });\n if (value.indexOf('\\n') === -1) {\n return `${prefix} ${value}`;\n }\n return `${prefix}\\n ${value.split('\\n').join('\\n ')}`;\n });\n return lines.join('\\n');\n })\n .then((valueList) => {\n return verbose ? `Watchers:\\n${valueList}\\n` : valueList;\n });\n }*/\n\n //function watchers(verbose = false) {\n // return formatWatchers(verbose).then(print);\n //}\n\n // List source code\n // function list(delta = 5) {\n // return selectedFrame.list(delta)\n // .then(null, (error) => {\n // print('You can\\'t list source code right now');\n // throw error;\n // });\n // }\n\n //function handleBreakpointResolved({ breakpointId, location }) {\n // const script = knownScripts[location.scriptId];\n // const scriptUrl = script && script.url;\n // if (scriptUrl) {\n // Object.assign(location, { scriptUrl });\n // }\n // const isExisting = knownBreakpoints.some((bp) => {\n // if (bp.breakpointId === breakpointId) {\n // Object.assign(bp, { location });\n // return true;\n // }\n // return false;\n // });\n // if (!isExisting) {\n // knownBreakpoints.push({ breakpointId, location });\n // }\n //}\n\n // function listBreakpoints() {\n // if (!knownBreakpoints.length) {\n // print('No breakpoints yet');\n // return;\n // }\n //\n // function formatLocation(location) {\n // if (!location) return '<unknown location>';\n // const script = knownScripts[location.scriptId];\n // const scriptUrl = script ? script.url : location.scriptUrl;\n // return `${getRelativePath(scriptUrl)}:${location.lineNumber + 1}`;\n // }\n // const breaklist = knownBreakpoints\n // .map((bp, idx) => `#${idx} ${formatLocation(bp.location)}`)\n // .join('\\n');\n // print(breaklist);\n // }\n\n // function setBreakpoint(script, line, condition, silent) {\n // function registerBreakpoint({ breakpointId, actualLocation }) {\n // handleBreakpointResolved({ breakpointId, location: actualLocation });\n // if (actualLocation && actualLocation.scriptId) {\n // if (!silent) return getSourceSnippet(actualLocation, 5);\n // } else {\n // print(`Warning: script '${script}' was not loaded yet.`);\n // }\n // return undefined;\n // }\n //\n // // setBreakpoint(): set breakpoint at current location\n // if (script === undefined) {\n // return Debugger\n // .setBreakpoint({ location: getCurrentLocation(), condition })\n // .then(registerBreakpoint);\n // }\n //\n // // setBreakpoint(line): set breakpoint in current script at specific line\n // if (line === undefined && typeof script === 'number') {\n // const location = {\n // scriptId: getCurrentLocation().scriptId,\n // lineNumber: script - 1,\n // };\n // return Debugger.setBreakpoint({ location, condition })\n // .then(registerBreakpoint);\n // }\n //\n // if (typeof script !== 'string') {\n // throw new TypeError(`setBreakpoint() expects a string, got ${script}`);\n // }\n //\n // // setBreakpoint('fn()'): Break when a function is called\n // if (script.endsWith('()')) {\n // const debugExpr = `debug(${script.slice(0, -2)})`;\n // const debugCall = selectedFrame\n // ? Debugger.evaluateOnCallFrame({\n // callFrameId: selectedFrame.callFrameId,\n // expression: debugExpr,\n // includeCommandLineAPI: true,\n // })\n // : Runtime.evaluate({\n // expression: debugExpr,\n // includeCommandLineAPI: true,\n // });\n // return debugCall.then(({ result, wasThrown }) => {\n // if (wasThrown) return convertResultToError(result);\n // return undefined; // This breakpoint can't be removed the same way\n // });\n // }\n //\n // // setBreakpoint('scriptname')\n // let scriptId = null;\n // let ambiguous = false;\n // if (knownScripts[script]) {\n // scriptId = script;\n // } else {\n // for (const id of Object.keys(knownScripts)) {\n // const scriptUrl = knownScripts[id].url;\n // if (scriptUrl && scriptUrl.indexOf(script) !== -1) {\n // if (scriptId !== null) {\n // ambiguous = true;\n // }\n // scriptId = id;\n // }\n // }\n // }\n //\n // if (ambiguous) {\n // print('Script name is ambiguous');\n // return undefined;\n // }\n // if (line <= 0) {\n // print('Line should be a positive value');\n // return undefined;\n // }\n //\n // if (scriptId !== null) {\n // const location = { scriptId, lineNumber: line - 1 };\n // return Debugger.setBreakpoint({ location, condition })\n // .then(registerBreakpoint);\n // }\n //\n // const escapedPath = script.replace(/([/\\\\.?*()^${}|[\\]])/g, '\\\\$1');\n // const urlRegex = `^(.*[\\\\/\\\\\\\\])?${escapedPath}$`;\n //\n // return Debugger\n // .setBreakpointByUrl({ urlRegex, lineNumber: line - 1, condition })\n // .then((bp) => {\n // // TODO: handle bp.locations in case the regex matches existing files\n // if (!bp.location) { // Fake it for now.\n // Object.assign(bp, {\n // actualLocation: {\n // scriptUrl: `.*/${script}$`,\n // lineNumber: line - 1,\n // },\n // });\n // }\n // return registerBreakpoint(bp);\n // });\n // }\n //\n // function clearBreakpoint(url, line) {\n // const breakpoint = knownBreakpoints.find(({ location }) => {\n // if (!location) return false;\n // const script = knownScripts[location.scriptId];\n // if (!script) return false;\n // return (\n // script.url.indexOf(url) !== -1 && (location.lineNumber + 1) === line\n // );\n // });\n // if (!breakpoint) {\n // print(`Could not find breakpoint at ${url}:${line}`);\n // return Promise.resolve();\n // }\n // return Debugger.removeBreakpoint({ breakpointId: breakpoint.breakpointId })\n // .then(() => {\n // const idx = knownBreakpoints.indexOf(breakpoint);\n // knownBreakpoints.splice(idx, 1);\n // });\n // }\n //\n // function restoreBreakpoints() {\n // const lastBreakpoints = knownBreakpoints.slice();\n // knownBreakpoints.length = 0;\n // const newBreakpoints = lastBreakpoints\n // .filter(({ location }) => !!location.scriptUrl)\n // .map(({ location }) =>\n // setBreakpoint(location.scriptUrl, location.lineNumber + 1));\n // if (!newBreakpoints.length) return Promise.resolve();\n // return Promise.all(newBreakpoints).then((results) => {\n // print(`${results.length} breakpoints restored.`);\n // });\n // }\n\n // function setPauseOnExceptions(state) {\n // return Debugger.setPauseOnExceptions({ state })\n // .then(() => {\n // pauseOnExceptionState = state;\n // });\n // }\n\n Debugger.on('paused', (data: Debugger.PausedEventDataType): void => {\n const callFrames: CallFrame[] = data.callFrames as CallFrame[];\n const reason: string = data.reason;\n\n if (process.env.NODE_INSPECT_RESUME_ON_START === '1' && reason === 'Break on start') {\n debuglog('Paused on start, but NODE_INSPECT_RESUME_ON_START environment variable is set to 1, resuming');\n inspector.client.callMethod('Debugger.resume');\n return;\n }\n\n // Save execution context's data\n currentBacktrace = Backtrace.from(callFrames);\n selectedFrame = currentBacktrace[0];\n // const { scriptId, lineNumber } = selectedFrame.location;\n\n // const breakType = reason === 'other' ? 'break' : reason;\n // const script = knownScripts[scriptId];\n // const scriptUrl = script ? getRelativePath(script.url) : '[unknown]';\n\n // const header = `${breakType} in ${scriptUrl}:${lineNumber + 1}`;\n\n void inspector.suspendReplWhile(() => {\n const context = selectedFrame?.list(3);\n inspect(context);\n });\n });\n\n function handleResumed(): void {\n currentBacktrace = undefined;\n selectedFrame = undefined;\n }\n\n Debugger.on('resumed', handleResumed);\n\n //Debugger.on('breakpointResolved', handleBreakpointResolved);\n\n Debugger.on('scriptParsed', (script: Debugger.ScriptParsedEventDataType) => {\n const { scriptId, url } = script;\n if (url) {\n knownScripts[scriptId] = Object.assign(\n {\n isNative: isNativeUrl(url),\n },\n script,\n );\n }\n });\n\n /*Profiler.on('consoleProfileFinished', ({ profile }) => {\n Profile.createAndRegister({ profile });\n print([\n 'Captured new CPU profile.',\n `Access it with profiles[${profiles.length - 1}]`\n ].join('\\n'));\n });*/\n\n function initializeContext(context: Context): void {\n Object.defineProperty(context, 'Debugger', {\n value: inspector.Debugger,\n enumerable: true,\n configurable: true,\n // @ts-expect-error fix later\n writeable: false,\n });\n Object.defineProperty(context, 'HeapProfiler', {\n value: inspector.HeapProfiler,\n enumerable: true,\n configurable: true,\n // @ts-expect-error fix later\n writeable: false,\n });\n Object.defineProperty(context, 'Profiler', {\n value: inspector.Profiler,\n enumerable: true,\n configurable: true,\n // @ts-expect-error fix later\n writeable: false,\n });\n Object.defineProperty(context, 'Runtime', {\n value: inspector.Runtime,\n enumerable: true,\n configurable: true,\n // @ts-expect-error fix later\n writeable: false,\n });\n\n /*copyOwnProperties(context, {\n get help() {\n print(HELP);\n },\n\n get run() {\n return inspector.run();\n },\n\n get kill() {\n return inspector.killChild();\n },\n\n get restart() {\n return inspector.run();\n },\n\n get cont() {\n handleResumed();\n return Debugger.resume();\n },\n\n get next() {\n handleResumed();\n return Debugger.stepOver();\n },\n\n get step() {\n handleResumed();\n return Debugger.stepInto();\n },\n\n get out() {\n handleResumed();\n return Debugger.stepOut();\n },\n\n get pause() {\n return Debugger.pause();\n },\n\n get backtrace() {\n return currentBacktrace;\n },\n\n get breakpoints() {\n return listBreakpoints();\n },\n\n exec(expr) {\n return evalInCurrentContext(expr);\n },\n\n get profile() {\n return Profiler.start();\n },\n\n get profileEnd() {\n return Profiler.stop()\n .then(Profile.createAndRegister);\n },\n\n get profiles() {\n return profiles;\n },\n\n takeHeapSnapshot(filename = 'node.heapsnapshot') {\n return new Promise((resolve, reject) => {\n const absoluteFile = Path.resolve(filename);\n const writer = FS.createWriteStream(absoluteFile);\n let sizeWritten = 0;\n function onProgress({ done, total, finished }) {\n if (finished) {\n print('Heap snaphost prepared.');\n } else {\n print(`Heap snapshot: ${done}/${total}`, true);\n }\n }\n function onChunk({ chunk }) {\n sizeWritten += chunk.length;\n writer.write(chunk);\n print(`Writing snapshot: ${sizeWritten}`, true);\n }\n function onResolve() {\n writer.end(() => {\n teardown();\n print(`Wrote snapshot: ${absoluteFile}`);\n resolve();\n });\n }\n function onReject(error) {\n teardown();\n reject(error);\n }\n function teardown() {\n HeapProfiler.removeListener(\n 'reportHeapSnapshotProgress', onProgress);\n HeapProfiler.removeListener('addHeapSnapshotChunk', onChunk);\n }\n\n HeapProfiler.on('reportHeapSnapshotProgress', onProgress);\n HeapProfiler.on('addHeapSnapshotChunk', onChunk);\n\n print('Heap snapshot: 0/0', true);\n HeapProfiler.takeHeapSnapshot({ reportProgress: true })\n .then(onResolve, onReject);\n });\n },\n\n get watchers() {\n return watchers();\n },\n\n watch(expr) {\n watchedExpressions.push(expr);\n },\n\n unwatch(expr) {\n const index = watchedExpressions.indexOf(expr);\n\n // Unwatch by expression\n // or\n // Unwatch by watcher number\n watchedExpressions.splice(index !== -1 ? index : +expr, 1);\n },\n\n get repl() {\n // Don't display any default messages\n const listeners = repl.listeners('SIGINT').slice(0);\n repl.removeAllListeners('SIGINT');\n\n const oldContext = repl.context;\n\n exitDebugRepl = () => {\n // Restore all listeners\n process.nextTick(() => {\n listeners.forEach((listener) => {\n repl.on('SIGINT', listener);\n });\n });\n\n // Exit debug repl\n repl.eval = controlEval;\n\n // Swap history\n history.debug = repl.history;\n repl.history = history.control;\n\n repl.context = oldContext;\n repl.setPrompt('debug> ');\n repl.displayPrompt();\n\n repl.removeListener('SIGINT', exitDebugRepl);\n repl.removeListener('exit', exitDebugRepl);\n\n exitDebugRepl = null;\n };\n\n // Exit debug repl on SIGINT\n repl.on('SIGINT', exitDebugRepl);\n\n // Exit debug repl on repl exit\n repl.on('exit', exitDebugRepl);\n\n // Set new\n repl.eval = debugEval;\n repl.context = {};\n\n // Swap history\n history.control = repl.history;\n repl.history = history.debug;\n\n repl.setPrompt('> ');\n\n print('Press Ctrl + C to leave debug repl');\n repl.displayPrompt();\n },\n\n get version() {\n return Runtime.evaluate({\n expression: 'process.versions.v8',\n contextId: 1,\n returnByValue: true,\n }).then(({ result }) => {\n print(result.value);\n });\n },\n\n scripts: listScripts,\n\n //setBreakpoint,\n //clearBreakpoint,\n setPauseOnExceptions,\n get breakOnException() {\n return setPauseOnExceptions('all');\n },\n get breakOnUncaught() {\n return setPauseOnExceptions('uncaught');\n },\n get breakOnNone() {\n return setPauseOnExceptions('none');\n },\n\n list,\n });*/\n //aliasProperties(context, SHORTCUTS);\n }\n\n function initAfterStart(): Promise<void> {\n const setupTasks = [\n Runtime.enable(),\n //Profiler.enable(),\n //Profiler.setSamplingInterval({ interval: 100 }),\n Debugger.enable(),\n Debugger.setPauseOnExceptions({ state: 'none' }),\n Debugger.setAsyncCallStackDepth({ maxDepth: 1 }),\n Debugger.setBlackboxPatterns({ patterns: [] }),\n // Debugger.setPauseOnExceptions({ state: 'all' }),\n //restoreBreakpoints(),\n Runtime.runIfWaitingForDebugger(),\n ];\n return Promise.all(setupTasks);\n }\n\n return function startRepl(): REPLServer {\n inspector.client.on('close', () => resetOnStart());\n inspector.client.on('ready', () => {\n initAfterStart().catch(err => {\n print(`Error starting inspector: ${err.message}`);\n });\n });\n\n const replOptions: ReplOptions = {\n prompt: 'debug> ',\n input: inspector.stdin,\n output: inspector.stdout,\n eval: controlEval,\n useGlobal: false,\n ignoreUndefined: true,\n };\n\n repl = start(replOptions);\n initializeContext(repl.context);\n repl.on('reset', initializeContext);\n\n repl.defineCommand('interrupt', () => {\n // We want this for testing purposes where sending CTRL-C can be tricky.\n repl.emit('SIGINT');\n });\n\n // Init once for the initial connection\n initAfterStart().catch(err => {\n print(`Error starting inspector: ${err.message}`);\n });\n\n return repl;\n };\n}\n"]}