@designliquido/delegua-node 1.16.1 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -3
- package/avaliador-sintatico/avaliador-sintatico-com-importacao.d.ts.map +1 -1
- package/avaliador-sintatico/avaliador-sintatico-com-importacao.js +1 -1
- package/avaliador-sintatico/avaliador-sintatico-com-importacao.js.map +1 -1
- package/avaliador-sintatico/dialetos/index.js +1 -0
- package/bibliotecas/dialetos/portugol-studio/arquivos.d.ts.map +1 -1
- package/bibliotecas/dialetos/portugol-studio/arquivos.js +29 -26
- package/bibliotecas/dialetos/portugol-studio/arquivos.js.map +1 -1
- package/bibliotecas/dialetos/portugol-studio/graficos.d.ts +87 -0
- package/bibliotecas/dialetos/portugol-studio/graficos.d.ts.map +1 -0
- package/bibliotecas/dialetos/portugol-studio/graficos.js +642 -0
- package/bibliotecas/dialetos/portugol-studio/graficos.js.map +1 -0
- package/bibliotecas/dialetos/portugol-studio/util.js +1 -1
- package/bibliotecas/dialetos/portugol-studio/util.js.map +1 -1
- package/bin/delegua-dap +4 -0
- package/bin/delegua-dap.cmd +2 -0
- package/delegua.d.ts +2 -2
- package/delegua.d.ts.map +1 -1
- package/delegua.js +4 -4
- package/delegua.js.map +1 -1
- package/depuracao/dap/adaptador-dap.d.ts +8 -0
- package/depuracao/dap/adaptador-dap.d.ts.map +1 -0
- package/depuracao/dap/adaptador-dap.js +22 -0
- package/depuracao/dap/adaptador-dap.js.map +1 -0
- package/depuracao/dap/index.d.ts +6 -0
- package/depuracao/dap/index.d.ts.map +1 -0
- package/depuracao/dap/index.js +22 -0
- package/depuracao/dap/index.js.map +1 -0
- package/depuracao/dap/ponte-tempo-execucao-depuracao.d.ts +34 -0
- package/depuracao/dap/ponte-tempo-execucao-depuracao.d.ts.map +1 -0
- package/depuracao/dap/ponte-tempo-execucao-depuracao.js +349 -0
- package/depuracao/dap/ponte-tempo-execucao-depuracao.js.map +1 -0
- package/depuracao/dap/sessao-depuracao-dap.d.ts +30 -0
- package/depuracao/dap/sessao-depuracao-dap.d.ts.map +1 -0
- package/depuracao/dap/sessao-depuracao-dap.js +275 -0
- package/depuracao/dap/sessao-depuracao-dap.js.map +1 -0
- package/depuracao/dap/transporte-dap-stdio.d.ts +20 -0
- package/depuracao/dap/transporte-dap-stdio.d.ts.map +1 -0
- package/depuracao/dap/transporte-dap-stdio.js +103 -0
- package/depuracao/dap/transporte-dap-stdio.js.map +1 -0
- package/depuracao/index.d.ts +1 -0
- package/depuracao/index.d.ts.map +1 -1
- package/depuracao/index.js +1 -0
- package/depuracao/index.js.map +1 -1
- package/execucao.js +12 -3
- package/execucao.js.map +1 -1
- package/infraestruturas/host-windows/infraestrutura-host-windows.d.ts +17 -0
- package/infraestruturas/host-windows/infraestrutura-host-windows.d.ts.map +1 -0
- package/infraestruturas/host-windows/infraestrutura-host-windows.js +260 -0
- package/infraestruturas/host-windows/infraestrutura-host-windows.js.map +1 -0
- package/infraestruturas/invocacao-electron/infraestrutura-invocacao-electron.d.ts +48 -0
- package/infraestruturas/invocacao-electron/infraestrutura-invocacao-electron.d.ts.map +1 -0
- package/infraestruturas/invocacao-electron/infraestrutura-invocacao-electron.js +530 -0
- package/infraestruturas/invocacao-electron/infraestrutura-invocacao-electron.js.map +1 -0
- package/interfaces/depuracao/configuracao-lancamento-interface.d.ts +5 -0
- package/interfaces/depuracao/configuracao-lancamento-interface.d.ts.map +1 -0
- package/interfaces/depuracao/configuracao-lancamento-interface.js +3 -0
- package/interfaces/depuracao/configuracao-lancamento-interface.js.map +1 -0
- package/interfaces/depuracao/escopo-depuracao-interface.d.ts +6 -0
- package/interfaces/depuracao/escopo-depuracao-interface.d.ts.map +1 -0
- package/interfaces/depuracao/escopo-depuracao-interface.js +3 -0
- package/interfaces/depuracao/escopo-depuracao-interface.js.map +1 -0
- package/interfaces/depuracao/evento-dap-interface.d.ts +7 -0
- package/interfaces/depuracao/evento-dap-interface.d.ts.map +1 -0
- package/interfaces/depuracao/evento-dap-interface.js +3 -0
- package/interfaces/depuracao/evento-dap-interface.js.map +1 -0
- package/interfaces/depuracao/index.d.ts +14 -0
- package/interfaces/depuracao/index.d.ts.map +1 -0
- package/interfaces/depuracao/index.js +30 -0
- package/interfaces/depuracao/index.js.map +1 -0
- package/interfaces/depuracao/mensagem-dap-interface.d.ts +5 -0
- package/interfaces/depuracao/mensagem-dap-interface.d.ts.map +1 -0
- package/interfaces/depuracao/mensagem-dap-interface.js +3 -0
- package/interfaces/depuracao/mensagem-dap-interface.js.map +1 -0
- package/interfaces/depuracao/parada-depuracao-interface.d.ts +6 -0
- package/interfaces/depuracao/parada-depuracao-interface.d.ts.map +1 -0
- package/interfaces/depuracao/parada-depuracao-interface.js +3 -0
- package/interfaces/depuracao/parada-depuracao-interface.js.map +1 -0
- package/interfaces/depuracao/ponte-tempo-execucao-depuracao-interface.d.ts +20 -0
- package/interfaces/depuracao/ponte-tempo-execucao-depuracao-interface.d.ts.map +1 -0
- package/interfaces/depuracao/ponte-tempo-execucao-depuracao-interface.js +3 -0
- package/interfaces/depuracao/ponte-tempo-execucao-depuracao-interface.js.map +1 -0
- package/interfaces/depuracao/quadro-pilha-depuracao-interface.d.ts +8 -0
- package/interfaces/depuracao/quadro-pilha-depuracao-interface.d.ts.map +1 -0
- package/interfaces/depuracao/quadro-pilha-depuracao-interface.js +3 -0
- package/interfaces/depuracao/quadro-pilha-depuracao-interface.js.map +1 -0
- package/interfaces/depuracao/requisicao-dap-interface.d.ts +7 -0
- package/interfaces/depuracao/requisicao-dap-interface.d.ts.map +1 -0
- package/interfaces/depuracao/requisicao-dap-interface.js +3 -0
- package/interfaces/depuracao/requisicao-dap-interface.js.map +1 -0
- package/interfaces/depuracao/resposta-dap-interface.d.ts +10 -0
- package/interfaces/depuracao/resposta-dap-interface.d.ts.map +1 -0
- package/interfaces/depuracao/resposta-dap-interface.js +3 -0
- package/interfaces/depuracao/resposta-dap-interface.js.map +1 -0
- package/interfaces/depuracao/sessao-depuracao-dap-interface.d.ts +5 -0
- package/interfaces/depuracao/sessao-depuracao-dap-interface.d.ts.map +1 -0
- package/interfaces/depuracao/sessao-depuracao-dap-interface.js +3 -0
- package/interfaces/depuracao/sessao-depuracao-dap-interface.js.map +1 -0
- package/interfaces/depuracao/thread-depuracao-interface.d.ts +5 -0
- package/interfaces/depuracao/thread-depuracao-interface.d.ts.map +1 -0
- package/interfaces/depuracao/thread-depuracao-interface.js +3 -0
- package/interfaces/depuracao/thread-depuracao-interface.js.map +1 -0
- package/interfaces/depuracao/transporte-dap-interface.d.ts +10 -0
- package/interfaces/depuracao/transporte-dap-interface.d.ts.map +1 -0
- package/interfaces/depuracao/transporte-dap-interface.js +3 -0
- package/interfaces/depuracao/transporte-dap-interface.js.map +1 -0
- package/interfaces/depuracao/variavel-depuracao-interface.d.ts +7 -0
- package/interfaces/depuracao/variavel-depuracao-interface.d.ts.map +1 -0
- package/interfaces/depuracao/variavel-depuracao-interface.js +3 -0
- package/interfaces/depuracao/variavel-depuracao-interface.js.map +1 -0
- package/interpretador/dialetos/interpretador-pitugues-com-importacao.d.ts +2 -2
- package/interpretador/dialetos/portugol-studio-comum.d.ts.map +1 -1
- package/interpretador/dialetos/portugol-studio-comum.js +54 -0
- package/interpretador/dialetos/portugol-studio-comum.js.map +1 -1
- package/interpretador/interpretador-com-importacao.d.ts +2 -2
- package/mecanismo-importacao-bibliotecas/index.d.ts +19 -0
- package/mecanismo-importacao-bibliotecas/index.d.ts.map +1 -1
- package/mecanismo-importacao-bibliotecas/index.js +84 -4
- package/mecanismo-importacao-bibliotecas/index.js.map +1 -1
- package/nucleo-execucao.d.ts +1 -1
- package/nucleo-execucao.d.ts.map +1 -1
- package/nucleo-execucao.js +27 -2
- package/nucleo-execucao.js.map +1 -1
- package/package.json +26 -18
- package/bin/package.json +0 -51
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.InfraestruturaInvocacaoElectron = void 0;
|
|
37
|
+
exports.localizarElectron = localizarElectron;
|
|
38
|
+
const child_process = __importStar(require("child_process"));
|
|
39
|
+
const fs = __importStar(require("fs"));
|
|
40
|
+
const net = __importStar(require("net"));
|
|
41
|
+
const os = __importStar(require("os"));
|
|
42
|
+
const path = __importStar(require("path"));
|
|
43
|
+
const readline = __importStar(require("readline"));
|
|
44
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
45
|
+
// Conteúdo dos arquivos estáticos gravados no diretório temporário
|
|
46
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
47
|
+
const ELECTRON_MAIN_JS = `
|
|
48
|
+
'use strict';
|
|
49
|
+
const { app, BrowserWindow, ipcMain } = require('electron');
|
|
50
|
+
const net = require('net');
|
|
51
|
+
const path = require('path');
|
|
52
|
+
const readline = require('readline');
|
|
53
|
+
|
|
54
|
+
let mainWindow = null;
|
|
55
|
+
const pendentes = [];
|
|
56
|
+
let carregou = false;
|
|
57
|
+
|
|
58
|
+
// Socket de IPC com o processo Node.js pai
|
|
59
|
+
let socketHost = null;
|
|
60
|
+
const filaTcp = []; // mensagens enviadas antes da conexão estar pronta
|
|
61
|
+
|
|
62
|
+
process.on('uncaughtException', (err) => {
|
|
63
|
+
process.stderr.write('[InterfaceGrafica] Erro não tratado: ' + err.stack + '\\n');
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
function enviarAoHost(msg) {
|
|
67
|
+
const linha = JSON.stringify(msg) + '\\n';
|
|
68
|
+
if (socketHost) {
|
|
69
|
+
socketHost.write(linha);
|
|
70
|
+
} else {
|
|
71
|
+
filaTcp.push(linha);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function enviarAoRenderer(msg) {
|
|
76
|
+
if (carregou && mainWindow) {
|
|
77
|
+
mainWindow.webContents.send('mensagem', msg);
|
|
78
|
+
} else {
|
|
79
|
+
pendentes.push(msg);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
app.whenReady().then(() => {
|
|
84
|
+
const rendererPath = process.argv[2];
|
|
85
|
+
const porta = parseInt(process.argv[3], 10);
|
|
86
|
+
if (!rendererPath || isNaN(porta)) {
|
|
87
|
+
process.stderr.write('[InterfaceGrafica] Argumentos inválidos\\n');
|
|
88
|
+
app.quit();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ── Conexão TCP de volta ao servidor do processo pai ──────────────────────
|
|
93
|
+
const cliente = net.createConnection(porta, '127.0.0.1');
|
|
94
|
+
|
|
95
|
+
cliente.on('error', (err) => {
|
|
96
|
+
process.stderr.write('[InterfaceGrafica] Erro de conexão TCP: ' + err.message + '\\n');
|
|
97
|
+
app.quit();
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
cliente.on('connect', () => {
|
|
101
|
+
socketHost = cliente;
|
|
102
|
+
for (const msg of filaTcp) socketHost.write(msg);
|
|
103
|
+
filaTcp.length = 0;
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const rl = readline.createInterface({ input: cliente, terminal: false });
|
|
107
|
+
|
|
108
|
+
rl.on('close', () => app.quit());
|
|
109
|
+
|
|
110
|
+
rl.on('line', (linha) => {
|
|
111
|
+
if (!linha.trim()) return;
|
|
112
|
+
try {
|
|
113
|
+
const msg = JSON.parse(linha);
|
|
114
|
+
if (msg.tipo === 'criar-janela' && !mainWindow) {
|
|
115
|
+
mainWindow = new BrowserWindow({
|
|
116
|
+
width: msg.largura || 800,
|
|
117
|
+
height: (msg.altura || 400) + 40,
|
|
118
|
+
title: msg.titulo || 'Delégua',
|
|
119
|
+
show: false,
|
|
120
|
+
webPreferences: {
|
|
121
|
+
preload: path.join(__dirname, 'preload.js'),
|
|
122
|
+
contextIsolation: true,
|
|
123
|
+
nodeIntegration: false,
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
mainWindow.loadFile(rendererPath);
|
|
128
|
+
|
|
129
|
+
mainWindow.webContents.on('did-finish-load', () => {
|
|
130
|
+
carregou = true;
|
|
131
|
+
for (const m of pendentes) {
|
|
132
|
+
mainWindow.webContents.send('mensagem', m);
|
|
133
|
+
}
|
|
134
|
+
pendentes.length = 0;
|
|
135
|
+
mainWindow.show();
|
|
136
|
+
// No Windows, setAlwaysOnTop contorna a proteção contra roubo de foco.
|
|
137
|
+
if (process.platform === 'win32') {
|
|
138
|
+
mainWindow.setAlwaysOnTop(true, 'screen-saver');
|
|
139
|
+
mainWindow.setAlwaysOnTop(false);
|
|
140
|
+
}
|
|
141
|
+
mainWindow.focus();
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
mainWindow.webContents.on('did-fail-load', (_e, errCode, errDesc) => {
|
|
145
|
+
process.stderr.write('[InterfaceGrafica] Falha ao carregar renderer: ' + errCode + ' ' + errDesc + '\\n');
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
mainWindow.on('closed', () => {
|
|
149
|
+
enviarAoHost({ tipo: 'fechado' });
|
|
150
|
+
mainWindow = null;
|
|
151
|
+
app.quit();
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
enviarAoRenderer(msg);
|
|
155
|
+
} catch (e) {
|
|
156
|
+
process.stderr.write('[InterfaceGrafica] Erro ao processar mensagem: ' + e.message + '\\n');
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
// Eventos do renderer (cliques, texto alterado, etc.) → socket TCP
|
|
161
|
+
ipcMain.on('mensagem', (_event, msg) => {
|
|
162
|
+
enviarAoHost(msg);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
app.on('window-all-closed', () => app.quit());
|
|
167
|
+
`;
|
|
168
|
+
const PRELOAD_JS = `
|
|
169
|
+
'use strict';
|
|
170
|
+
const { contextBridge, ipcRenderer } = require('electron');
|
|
171
|
+
|
|
172
|
+
contextBridge.exposeInMainWorld('electronAPI', {
|
|
173
|
+
enviar: (msg) => ipcRenderer.send('mensagem', msg),
|
|
174
|
+
receber: (callback) => ipcRenderer.on('mensagem', (_, msg) => callback(msg)),
|
|
175
|
+
});
|
|
176
|
+
`;
|
|
177
|
+
const RENDERER_HTML = `<!DOCTYPE html>
|
|
178
|
+
<html lang="pt-BR">
|
|
179
|
+
<head>
|
|
180
|
+
<meta charset="UTF-8">
|
|
181
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
182
|
+
<title>Interface Gráfica – Delégua</title>
|
|
183
|
+
<style>
|
|
184
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
185
|
+
body {
|
|
186
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
187
|
+
background: #f0f0f0;
|
|
188
|
+
padding: 10px;
|
|
189
|
+
display: flex;
|
|
190
|
+
flex-direction: column;
|
|
191
|
+
gap: 8px;
|
|
192
|
+
}
|
|
193
|
+
.delegua-caixa-vertical { display: flex; flex-direction: column; gap: 8px; }
|
|
194
|
+
.delegua-caixa-horizontal { display: flex; flex-direction: row; gap: 8px; align-items: center; }
|
|
195
|
+
.delegua-botao {
|
|
196
|
+
padding: 6px 16px; font-size: 13px; cursor: pointer;
|
|
197
|
+
border: 1px solid #999; border-radius: 3px; background: #e8e8e8;
|
|
198
|
+
align-self: flex-start;
|
|
199
|
+
}
|
|
200
|
+
.delegua-rotulo { font-size: 13px; color: #222; }
|
|
201
|
+
.delegua-caixa-texto {
|
|
202
|
+
font-size: 13px; padding: 5px 8px;
|
|
203
|
+
border: 1px solid #999; border-radius: 3px;
|
|
204
|
+
}
|
|
205
|
+
</style>
|
|
206
|
+
</head>
|
|
207
|
+
<body>
|
|
208
|
+
<div id="delegua-raiz"></div>
|
|
209
|
+
<script>
|
|
210
|
+
const elementos = {};
|
|
211
|
+
|
|
212
|
+
window.electronAPI.receber((msg) => {
|
|
213
|
+
switch (msg.tipo) {
|
|
214
|
+
case 'criar-janela': {
|
|
215
|
+
// A janela já foi criada pelo processo principal; apenas registramos
|
|
216
|
+
// a área de conteúdo (o próprio body) como componente raiz.
|
|
217
|
+
elementos[msg.id] = document.getElementById('delegua-raiz');
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
case 'criar-botao': {
|
|
221
|
+
const btn = document.createElement('button');
|
|
222
|
+
btn.className = 'delegua-botao';
|
|
223
|
+
btn.textContent = msg.rotulo;
|
|
224
|
+
btn.onclick = () => window.electronAPI.enviar({
|
|
225
|
+
tipo: 'evento', componenteId: msg.id, evento: 'clique'
|
|
226
|
+
});
|
|
227
|
+
elementos[msg.paiId].appendChild(btn);
|
|
228
|
+
elementos[msg.id] = btn;
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
case 'criar-rotulo': {
|
|
232
|
+
const lbl = document.createElement('label');
|
|
233
|
+
lbl.className = 'delegua-rotulo';
|
|
234
|
+
lbl.textContent = msg.texto;
|
|
235
|
+
elementos[msg.paiId].appendChild(lbl);
|
|
236
|
+
elementos[msg.id] = lbl;
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
case 'criar-caixa-texto': {
|
|
240
|
+
const inp = document.createElement('input');
|
|
241
|
+
inp.className = 'delegua-caixa-texto';
|
|
242
|
+
inp.type = 'text';
|
|
243
|
+
inp.value = msg.textoInicial || '';
|
|
244
|
+
inp.addEventListener('input', () => {
|
|
245
|
+
window.electronAPI.enviar({ tipo: 'valor-atualizado', id: msg.id, valor: inp.value });
|
|
246
|
+
window.electronAPI.enviar({
|
|
247
|
+
tipo: 'evento', componenteId: msg.id, evento: 'alterado', valor: inp.value
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
elementos[msg.paiId].appendChild(inp);
|
|
251
|
+
elementos[msg.id] = inp;
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
case 'criar-caixa-vertical': {
|
|
255
|
+
const div = document.createElement('div');
|
|
256
|
+
div.className = 'delegua-caixa-vertical';
|
|
257
|
+
elementos[msg.paiId].appendChild(div);
|
|
258
|
+
elementos[msg.id] = div;
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
case 'criar-caixa-horizontal': {
|
|
262
|
+
const div = document.createElement('div');
|
|
263
|
+
div.className = 'delegua-caixa-horizontal';
|
|
264
|
+
elementos[msg.paiId].appendChild(div);
|
|
265
|
+
elementos[msg.id] = div;
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
case 'definir-texto': {
|
|
269
|
+
const el = elementos[msg.id];
|
|
270
|
+
if (el) {
|
|
271
|
+
if (el.tagName === 'INPUT') el.value = msg.texto;
|
|
272
|
+
else el.textContent = msg.texto;
|
|
273
|
+
}
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
case 'encerrar': {
|
|
277
|
+
document.getElementById('delegua-raiz').innerHTML = '';
|
|
278
|
+
window.close();
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
</script>
|
|
284
|
+
</body>
|
|
285
|
+
</html>`;
|
|
286
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
287
|
+
// InfraestruturaInvocacaoElectron
|
|
288
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
289
|
+
/**
|
|
290
|
+
* Infraestrutura de interface gráfica que spawna um processo Electron filho.
|
|
291
|
+
*
|
|
292
|
+
* Usada quando o programa Delégua roda na linha de comando (Node.js puro),
|
|
293
|
+
* sem DOM e sem WebView do VS Code. Requer que o pacote `electron` esteja
|
|
294
|
+
* instalado local ou globalmente.
|
|
295
|
+
*
|
|
296
|
+
* Protocolo de comunicação: servidor TCP local (127.0.0.1, porta aleatória).
|
|
297
|
+
* O processo pai cria o servidor; o Electron conecta de volta como cliente.
|
|
298
|
+
* Mensagens trocadas como JSON delimitadas por `\n` — idêntico ao protocolo
|
|
299
|
+
* de `InfraestruturaWebView`, porém via socket em vez de stdin/stdout
|
|
300
|
+
* (stdin é consumido pelo Chromium durante a inicialização no Windows).
|
|
301
|
+
*/
|
|
302
|
+
class InfraestruturaInvocacaoElectron {
|
|
303
|
+
constructor(caminhoBinario) {
|
|
304
|
+
this.contadorIds = 0;
|
|
305
|
+
this.textosComponentes = new Map();
|
|
306
|
+
this.resolverLaco = null;
|
|
307
|
+
this.processoFinalizou = false;
|
|
308
|
+
this.tratadoresEventos = new Map();
|
|
309
|
+
this.processo = null;
|
|
310
|
+
this.socket = null;
|
|
311
|
+
this.filaEnvio = [];
|
|
312
|
+
const dirTemp = fs.mkdtempSync(path.join(os.tmpdir(), 'delegua-gui-'));
|
|
313
|
+
const caminhoMain = path.join(dirTemp, 'electron-main.js');
|
|
314
|
+
const caminhoPreload = path.join(dirTemp, 'preload.js');
|
|
315
|
+
const caminhoRenderer = path.join(dirTemp, 'renderer.html');
|
|
316
|
+
fs.writeFileSync(caminhoMain, ELECTRON_MAIN_JS, 'utf-8');
|
|
317
|
+
fs.writeFileSync(caminhoPreload, PRELOAD_JS, 'utf-8');
|
|
318
|
+
fs.writeFileSync(caminhoRenderer, RENDERER_HTML, 'utf-8');
|
|
319
|
+
// Servidor TCP local: Electron conecta de volta depois de iniciar.
|
|
320
|
+
// Usamos TCP em vez de stdin/stdout porque o Chromium consome fd 0
|
|
321
|
+
// durante a inicialização no Windows, descartando os dados do pipe.
|
|
322
|
+
this.servidor = net.createServer();
|
|
323
|
+
this.servidor.once('connection', (socket) => {
|
|
324
|
+
this.servidor.close();
|
|
325
|
+
this.socket = socket;
|
|
326
|
+
socket.on('error', () => this._encerrarInterno());
|
|
327
|
+
socket.on('close', () => this._encerrarInterno());
|
|
328
|
+
const leitor = readline.createInterface({ input: socket });
|
|
329
|
+
leitor.on('line', (linha) => {
|
|
330
|
+
try {
|
|
331
|
+
this._processarMensagem(JSON.parse(linha));
|
|
332
|
+
}
|
|
333
|
+
catch (_) { }
|
|
334
|
+
});
|
|
335
|
+
// Descarrega mensagens enviadas antes da conexão estar pronta
|
|
336
|
+
for (const msg of this.filaEnvio)
|
|
337
|
+
socket.write(msg);
|
|
338
|
+
this.filaEnvio.length = 0;
|
|
339
|
+
});
|
|
340
|
+
this.servidor.listen(0, '127.0.0.1', () => {
|
|
341
|
+
var _a;
|
|
342
|
+
const porta = this.servidor.address().port;
|
|
343
|
+
this.processo = child_process.spawn(caminhoBinario, [caminhoMain, caminhoRenderer, String(porta)], { stdio: ['ignore', 'ignore', 'pipe'] });
|
|
344
|
+
(_a = this.processo.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (dados) => process.stderr.write(dados));
|
|
345
|
+
this.processo.on('error', (err) => {
|
|
346
|
+
process.stderr.write('[InterfaceGrafica] Erro ao iniciar Electron: ' + err.message + '\n');
|
|
347
|
+
this._encerrarInterno();
|
|
348
|
+
});
|
|
349
|
+
this.processo.on('close', () => this._encerrarInterno());
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
353
|
+
// Helpers internos
|
|
354
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
355
|
+
proximoId() {
|
|
356
|
+
return `delegua-gui-${++this.contadorIds}`;
|
|
357
|
+
}
|
|
358
|
+
_enviar(msg) {
|
|
359
|
+
const linha = JSON.stringify(msg) + '\n';
|
|
360
|
+
if (this.socket) {
|
|
361
|
+
this.socket.write(linha);
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
this.filaEnvio.push(linha);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
_encerrarInterno() {
|
|
368
|
+
if (this.resolverLaco) {
|
|
369
|
+
this.resolverLaco();
|
|
370
|
+
this.resolverLaco = null;
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
this.processoFinalizou = true;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
_processarMensagem(msg) {
|
|
377
|
+
if (msg.tipo === 'evento') {
|
|
378
|
+
const tratadores = this.tratadoresEventos.get(msg.componenteId);
|
|
379
|
+
if (tratadores) {
|
|
380
|
+
const cb = tratadores.get(msg.evento);
|
|
381
|
+
if (cb) {
|
|
382
|
+
const args = msg.valor !== undefined ? [msg.valor] : [];
|
|
383
|
+
cb(...args).catch(console.error);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else if (msg.tipo === 'valor-atualizado') {
|
|
388
|
+
this.textosComponentes.set(msg.id, msg.valor);
|
|
389
|
+
}
|
|
390
|
+
else if (msg.tipo === 'fechado') {
|
|
391
|
+
this._encerrarInterno();
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
395
|
+
// Criação de componentes
|
|
396
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
397
|
+
criarJanela(largura, altura, titulo) {
|
|
398
|
+
const idComponente = this.proximoId();
|
|
399
|
+
this._enviar({ tipo: 'criar-janela', id: idComponente, largura, altura, titulo });
|
|
400
|
+
return { idComponente };
|
|
401
|
+
}
|
|
402
|
+
criarBotao(pai, rotulo) {
|
|
403
|
+
const idComponente = this.proximoId();
|
|
404
|
+
this._enviar({ tipo: 'criar-botao', id: idComponente, paiId: pai.idComponente, rotulo });
|
|
405
|
+
return { idComponente };
|
|
406
|
+
}
|
|
407
|
+
criarRotulo(pai, texto) {
|
|
408
|
+
const idComponente = this.proximoId();
|
|
409
|
+
this.textosComponentes.set(idComponente, texto);
|
|
410
|
+
this._enviar({ tipo: 'criar-rotulo', id: idComponente, paiId: pai.idComponente, texto });
|
|
411
|
+
return { idComponente };
|
|
412
|
+
}
|
|
413
|
+
criarCaixaTexto(pai, textoInicial) {
|
|
414
|
+
const idComponente = this.proximoId();
|
|
415
|
+
this.textosComponentes.set(idComponente, textoInicial);
|
|
416
|
+
this._enviar({ tipo: 'criar-caixa-texto', id: idComponente, paiId: pai.idComponente, textoInicial });
|
|
417
|
+
return { idComponente };
|
|
418
|
+
}
|
|
419
|
+
criarCaixaVertical(pai) {
|
|
420
|
+
const idComponente = this.proximoId();
|
|
421
|
+
this._enviar({ tipo: 'criar-caixa-vertical', id: idComponente, paiId: pai.idComponente });
|
|
422
|
+
return { idComponente };
|
|
423
|
+
}
|
|
424
|
+
criarCaixaHorizontal(pai) {
|
|
425
|
+
const idComponente = this.proximoId();
|
|
426
|
+
this._enviar({ tipo: 'criar-caixa-horizontal', id: idComponente, paiId: pai.idComponente });
|
|
427
|
+
return { idComponente };
|
|
428
|
+
}
|
|
429
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
430
|
+
// Leitura e escrita de propriedades
|
|
431
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
432
|
+
definirTexto(componente, texto) {
|
|
433
|
+
this.textosComponentes.set(componente.idComponente, texto);
|
|
434
|
+
this._enviar({ tipo: 'definir-texto', id: componente.idComponente, texto });
|
|
435
|
+
}
|
|
436
|
+
obterTexto(componente) {
|
|
437
|
+
var _a;
|
|
438
|
+
return (_a = this.textosComponentes.get(componente.idComponente)) !== null && _a !== void 0 ? _a : '';
|
|
439
|
+
}
|
|
440
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
441
|
+
// Eventos
|
|
442
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
443
|
+
conectarEvento(componente, evento, callback) {
|
|
444
|
+
if (!this.tratadoresEventos.has(componente.idComponente)) {
|
|
445
|
+
this.tratadoresEventos.set(componente.idComponente, new Map());
|
|
446
|
+
}
|
|
447
|
+
this.tratadoresEventos.get(componente.idComponente).set(evento, callback);
|
|
448
|
+
}
|
|
449
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
450
|
+
// Ciclo de vida
|
|
451
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
452
|
+
async iniciarLaco() {
|
|
453
|
+
if (this.processoFinalizou)
|
|
454
|
+
return;
|
|
455
|
+
return new Promise((resolve) => {
|
|
456
|
+
this.resolverLaco = resolve;
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
encerrar() {
|
|
460
|
+
var _a, _b;
|
|
461
|
+
this._enviar({ tipo: 'encerrar' });
|
|
462
|
+
this._encerrarInterno();
|
|
463
|
+
(_a = this.socket) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
464
|
+
this.servidor.close();
|
|
465
|
+
try {
|
|
466
|
+
(_b = this.processo) === null || _b === void 0 ? void 0 : _b.kill();
|
|
467
|
+
}
|
|
468
|
+
catch (_) { }
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
exports.InfraestruturaInvocacaoElectron = InfraestruturaInvocacaoElectron;
|
|
472
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
473
|
+
// Utilitário: localizar o binário do Electron
|
|
474
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
475
|
+
/**
|
|
476
|
+
* Tenta localizar o binário do Electron instalado como pacote npm.
|
|
477
|
+
* Verifica primeiro nas dependências locais e depois no diretório global do npm.
|
|
478
|
+
* Retorna `null` se o Electron não estiver disponível.
|
|
479
|
+
*/
|
|
480
|
+
/**
|
|
481
|
+
* Tenta obter o binário do Electron a partir do `index.js` do pacote, usando
|
|
482
|
+
* `require`. O `index.js` do pacote Electron já resolve `path.txt` corretamente
|
|
483
|
+
* (inclusive quando o executável está em uma subpasta como `dist/`).
|
|
484
|
+
*
|
|
485
|
+
* @param diretorioPacote Caminho absoluto para o diretório do pacote `electron`.
|
|
486
|
+
*/
|
|
487
|
+
function resolverBinarioDoIndexJs(diretorioPacote) {
|
|
488
|
+
try {
|
|
489
|
+
const indexJs = path.join(diretorioPacote, 'index.js');
|
|
490
|
+
if (!fs.existsSync(indexJs))
|
|
491
|
+
return null;
|
|
492
|
+
const caminho = require(indexJs);
|
|
493
|
+
if (typeof caminho === 'string' && fs.existsSync(caminho))
|
|
494
|
+
return caminho;
|
|
495
|
+
}
|
|
496
|
+
catch (_) { }
|
|
497
|
+
return null;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Tenta localizar o binário do Electron instalado como pacote npm.
|
|
501
|
+
* Verifica primeiro nas dependências locais e depois no diretório global do npm.
|
|
502
|
+
* Retorna `null` se o Electron não estiver disponível.
|
|
503
|
+
*/
|
|
504
|
+
function localizarElectron() {
|
|
505
|
+
// 1. Dependência local do projeto atual (require resolve normal)
|
|
506
|
+
try {
|
|
507
|
+
const caminho = require('electron');
|
|
508
|
+
if (typeof caminho === 'string' && fs.existsSync(caminho))
|
|
509
|
+
return caminho;
|
|
510
|
+
}
|
|
511
|
+
catch (_) { }
|
|
512
|
+
// 2. Instalação global do npm — requer o index.js do pacote diretamente
|
|
513
|
+
try {
|
|
514
|
+
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
515
|
+
const globalRoot = child_process
|
|
516
|
+
.execSync(`${npm} root -g`, { encoding: 'utf-8' })
|
|
517
|
+
.trim();
|
|
518
|
+
// 2a. global/electron
|
|
519
|
+
const resultado = resolverBinarioDoIndexJs(path.join(globalRoot, 'electron'));
|
|
520
|
+
if (resultado)
|
|
521
|
+
return resultado;
|
|
522
|
+
// 2b. global/delegua/node_modules/electron
|
|
523
|
+
const resultadoDelegua = resolverBinarioDoIndexJs(path.join(globalRoot, 'delegua', 'node_modules', 'electron'));
|
|
524
|
+
if (resultadoDelegua)
|
|
525
|
+
return resultadoDelegua;
|
|
526
|
+
}
|
|
527
|
+
catch (_) { }
|
|
528
|
+
return null;
|
|
529
|
+
}
|
|
530
|
+
//# sourceMappingURL=infraestrutura-invocacao-electron.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infraestrutura-invocacao-electron.js","sourceRoot":"","sources":["../../../fontes/infraestruturas/invocacao-electron/infraestrutura-invocacao-electron.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0fA,8CA0BC;AAphBD,6DAA+C;AAC/C,uCAAyB;AACzB,yCAA2B;AAC3B,uCAAyB;AACzB,2CAA6B;AAC7B,mDAAqC;AAIrC,gFAAgF;AAChF,mEAAmE;AACnE,gFAAgF;AAEhF,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwHxB,CAAC;AAEF,MAAM,UAAU,GAAG;;;;;;;;CAQlB,CAAC;A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AC;QAC9C,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;YAAE,OAAO,OAAO,CAAC;IAC9E,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;IAEd,wEAAwE;IACxE,IAAI,CAAC;QACD,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;QAC7D,MAAM,UAAU,GAAG,aAAa;aAC3B,QAAQ,CAAC,GAAG,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;aACjD,IAAI,EAAE,CAAC;QAEZ,sBAAsB;QACtB,MAAM,SAAS,GAAG,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;QAC9E,IAAI,SAAS;YAAE,OAAO,SAAS,CAAC;QAEhC,2CAA2C;QAC3C,MAAM,gBAAgB,GAAG,wBAAwB,CAC7C,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,CAAC,CAC/D,CAAC;QACF,IAAI,gBAAgB;YAAE,OAAO,gBAAgB,CAAC;IAClD,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;IAEd,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuracao-lancamento-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces/depuracao/configuracao-lancamento-interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuracao-lancamento-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces/depuracao/configuracao-lancamento-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escopo-depuracao-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces/depuracao/escopo-depuracao-interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escopo-depuracao-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces/depuracao/escopo-depuracao-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evento-dap-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces/depuracao/evento-dap-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evento-dap-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces/depuracao/evento-dap-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './configuracao-lancamento-interface';
|
|
2
|
+
export * from './escopo-depuracao-interface';
|
|
3
|
+
export * from './evento-dap-interface';
|
|
4
|
+
export * from './mensagem-dap-interface';
|
|
5
|
+
export * from './parada-depuracao-interface';
|
|
6
|
+
export * from './quadro-pilha-depuracao-interface';
|
|
7
|
+
export * from './requisicao-dap-interface';
|
|
8
|
+
export * from './resposta-dap-interface';
|
|
9
|
+
export * from './ponte-tempo-execucao-depuracao-interface';
|
|
10
|
+
export * from './sessao-depuracao-dap-interface';
|
|
11
|
+
export * from './thread-depuracao-interface';
|
|
12
|
+
export * from './transporte-dap-interface';
|
|
13
|
+
export * from './variavel-depuracao-interface';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces/depuracao/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./configuracao-lancamento-interface"), exports);
|
|
18
|
+
__exportStar(require("./escopo-depuracao-interface"), exports);
|
|
19
|
+
__exportStar(require("./evento-dap-interface"), exports);
|
|
20
|
+
__exportStar(require("./mensagem-dap-interface"), exports);
|
|
21
|
+
__exportStar(require("./parada-depuracao-interface"), exports);
|
|
22
|
+
__exportStar(require("./quadro-pilha-depuracao-interface"), exports);
|
|
23
|
+
__exportStar(require("./requisicao-dap-interface"), exports);
|
|
24
|
+
__exportStar(require("./resposta-dap-interface"), exports);
|
|
25
|
+
__exportStar(require("./ponte-tempo-execucao-depuracao-interface"), exports);
|
|
26
|
+
__exportStar(require("./sessao-depuracao-dap-interface"), exports);
|
|
27
|
+
__exportStar(require("./thread-depuracao-interface"), exports);
|
|
28
|
+
__exportStar(require("./transporte-dap-interface"), exports);
|
|
29
|
+
__exportStar(require("./variavel-depuracao-interface"), exports);
|
|
30
|
+
//# sourceMappingURL=index.js.map
|