nyte 1.0.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/LICENSE +13 -0
- package/README.md +59 -0
- package/dist/adapters/express.d.ts +7 -0
- package/dist/adapters/express.js +63 -0
- package/dist/adapters/factory.d.ts +23 -0
- package/dist/adapters/factory.js +121 -0
- package/dist/adapters/fastify.d.ts +25 -0
- package/dist/adapters/fastify.js +61 -0
- package/dist/adapters/native.d.ts +8 -0
- package/dist/adapters/native.js +200 -0
- package/dist/api/console.d.ts +81 -0
- package/dist/api/console.js +318 -0
- package/dist/api/http.d.ts +180 -0
- package/dist/api/http.js +469 -0
- package/dist/bin/nytejs.d.ts +2 -0
- package/dist/bin/nytejs.js +277 -0
- package/dist/builder.d.ts +32 -0
- package/dist/builder.js +634 -0
- package/dist/client/DefaultNotFound.d.ts +1 -0
- package/dist/client/DefaultNotFound.js +79 -0
- package/dist/client/client.d.ts +4 -0
- package/dist/client/client.js +27 -0
- package/dist/client/clientRouter.d.ts +58 -0
- package/dist/client/clientRouter.js +132 -0
- package/dist/client/entry.client.d.ts +1 -0
- package/dist/client/entry.client.js +455 -0
- package/dist/client/rpc.d.ts +8 -0
- package/dist/client/rpc.js +97 -0
- package/dist/components/Link.d.ts +7 -0
- package/dist/components/Link.js +13 -0
- package/dist/global/global.d.ts +117 -0
- package/dist/global/global.js +17 -0
- package/dist/helpers.d.ts +20 -0
- package/dist/helpers.js +604 -0
- package/dist/hotReload.d.ts +32 -0
- package/dist/hotReload.js +545 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +515 -0
- package/dist/loaders.d.ts +1 -0
- package/dist/loaders.js +138 -0
- package/dist/renderer.d.ts +14 -0
- package/dist/renderer.js +380 -0
- package/dist/router.d.ts +101 -0
- package/dist/router.js +659 -0
- package/dist/rpc/server.d.ts +11 -0
- package/dist/rpc/server.js +166 -0
- package/dist/rpc/types.d.ts +22 -0
- package/dist/rpc/types.js +20 -0
- package/dist/types/framework.d.ts +37 -0
- package/dist/types/framework.js +2 -0
- package/dist/types.d.ts +218 -0
- package/dist/types.js +2 -0
- package/package.json +87 -0
- package/src/adapters/express.ts +87 -0
- package/src/adapters/factory.ts +112 -0
- package/src/adapters/fastify.ts +104 -0
- package/src/adapters/native.ts +245 -0
- package/src/api/console.ts +348 -0
- package/src/api/http.ts +535 -0
- package/src/bin/nytejs.js +331 -0
- package/src/builder.js +690 -0
- package/src/client/DefaultNotFound.tsx +119 -0
- package/src/client/client.ts +24 -0
- package/src/client/clientRouter.ts +153 -0
- package/src/client/entry.client.tsx +529 -0
- package/src/client/rpc.ts +101 -0
- package/src/components/Link.tsx +38 -0
- package/src/global/global.ts +171 -0
- package/src/helpers.ts +657 -0
- package/src/hotReload.ts +566 -0
- package/src/index.ts +582 -0
- package/src/loaders.js +160 -0
- package/src/renderer.tsx +421 -0
- package/src/router.ts +732 -0
- package/src/rpc/server.ts +190 -0
- package/src/rpc/types.ts +45 -0
- package/src/types/framework.ts +58 -0
- package/src/types.ts +288 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/*
|
|
4
|
+
* This file is part of the Nyte.js Project.
|
|
5
|
+
* Copyright (c) 2026 itsmuzin
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
// Registra o ts-node para que o Node.js entenda TypeScript/TSX
|
|
20
|
+
require('ts-node').register();
|
|
21
|
+
// Registra loaders customizados para arquivos markdown, imagens, etc.
|
|
22
|
+
const { registerLoaders } = require('../loaders');
|
|
23
|
+
registerLoaders();
|
|
24
|
+
const { program } = require('commander');
|
|
25
|
+
program
|
|
26
|
+
.version('1.0.0')
|
|
27
|
+
.description('CLI to manage the application.');
|
|
28
|
+
// --- Comando DEV ---
|
|
29
|
+
const fs = require('fs');
|
|
30
|
+
const path = require('path');
|
|
31
|
+
// 'program' já deve estar definido no seu arquivo
|
|
32
|
+
// const { program } = require('commander');
|
|
33
|
+
/**
|
|
34
|
+
* Função centralizada para iniciar a aplicação
|
|
35
|
+
* @param {object} options - Opções vindas do commander
|
|
36
|
+
* @param {boolean} isDev - Define se é modo de desenvolvimento
|
|
37
|
+
*/
|
|
38
|
+
function initializeApp(options, isDev) {
|
|
39
|
+
const appOptions = {
|
|
40
|
+
dev: isDev,
|
|
41
|
+
port: options.port,
|
|
42
|
+
hostname: options.hostname,
|
|
43
|
+
framework: 'native',
|
|
44
|
+
ssl: null, // Default
|
|
45
|
+
};
|
|
46
|
+
// 1. Verifica se a flag --ssl foi ativada
|
|
47
|
+
if (options.ssl) {
|
|
48
|
+
const C = require("../api/console");
|
|
49
|
+
const { Levels } = C;
|
|
50
|
+
const Console = C.default;
|
|
51
|
+
const sslDir = path.resolve(process.cwd(), 'certs');
|
|
52
|
+
const keyPath = path.join(sslDir, 'key.pem'); // Padrão 1: key.pem
|
|
53
|
+
const certPath = path.join(sslDir, 'cert.pem'); // Padrão 2: cert.pem
|
|
54
|
+
// (Você pode mudar para 'cert.key' se preferir, apenas ajuste os nomes aqui)
|
|
55
|
+
// 2. Verifica se os arquivos existem
|
|
56
|
+
if (fs.existsSync(keyPath) && fs.existsSync(certPath)) {
|
|
57
|
+
appOptions.ssl = {
|
|
58
|
+
key: keyPath,
|
|
59
|
+
cert: certPath
|
|
60
|
+
};
|
|
61
|
+
// 3. Adiciona a porta de redirecionamento (útil para o initNativeServer)
|
|
62
|
+
appOptions.ssl.redirectPort = options.httpRedirectPort || 80;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
Console.logWithout(Levels.ERROR, null, `Ensure that './certs/key.pem' and './certs/cert.pem' exist.`, `--ssl flag was used, but the files were not found.`);
|
|
66
|
+
process.exit(1); // Encerra o processo com erro
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// 4. Inicia o helper com as opções
|
|
70
|
+
const teste = require("../helpers");
|
|
71
|
+
const t = teste.default(appOptions);
|
|
72
|
+
t.init();
|
|
73
|
+
}
|
|
74
|
+
// --- Comando DEV ---
|
|
75
|
+
program
|
|
76
|
+
.command('dev')
|
|
77
|
+
.description('Starts the application in development mode.')
|
|
78
|
+
.option('-p, --port <number>', 'Specifies the port to run on', '3000')
|
|
79
|
+
.option('-H, --hostname <string>', 'Specifies the hostname to run on', '0.0.0.0')
|
|
80
|
+
.option('--ssl', 'Activates HTTPS/SSL mode (requires ./ssl/key.pem and ./ssl/cert.pem)')
|
|
81
|
+
.option('--http-redirect-port <number>', 'Port for HTTP->HTTPS redirection', '80')
|
|
82
|
+
.action((options) => {
|
|
83
|
+
initializeApp(options, true); // Chama a função com dev: true
|
|
84
|
+
});
|
|
85
|
+
// --- Comando START (Produção) ---
|
|
86
|
+
program
|
|
87
|
+
.command('start')
|
|
88
|
+
.description('Starts the application in production mode.')
|
|
89
|
+
.option('-p, --port <number>', 'Specifies the port to run on', '3000')
|
|
90
|
+
.option('-H, --hostname <string>', 'Specifies the hostname to run on', '0.0.0.0')
|
|
91
|
+
.option('--ssl', 'Activates HTTPS/SSL mode (requires ./ssl/key.pem and ./ssl/cert.pem)')
|
|
92
|
+
.option('--http-redirect-port <number>', 'Port for HTTP->HTTPS redirection', '80')
|
|
93
|
+
.action((options) => {
|
|
94
|
+
initializeApp(options, false); // Chama a função com dev: false
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* Função corrigida para copiar diretórios recursivamente.
|
|
98
|
+
* Ela agora verifica se um item é um arquivo ou um diretório.
|
|
99
|
+
*/
|
|
100
|
+
function copyDirRecursive(src, dest) {
|
|
101
|
+
try {
|
|
102
|
+
// Garante que o diretório de destino exista
|
|
103
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
104
|
+
// Usamos { withFileTypes: true } para evitar uma chamada extra de fs.statSync
|
|
105
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
106
|
+
for (let entry of entries) {
|
|
107
|
+
const srcPath = path.join(src, entry.name);
|
|
108
|
+
const destPath = path.join(dest, entry.name);
|
|
109
|
+
if (entry.isDirectory()) {
|
|
110
|
+
// Se for um diretório, chama a si mesma (recursão)
|
|
111
|
+
copyDirRecursive(srcPath, destPath);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
// Se for um arquivo, apenas copia
|
|
115
|
+
fs.copyFileSync(srcPath, destPath);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
console.error(`❌ Erro ao copiar ${src} para ${dest}:`, error);
|
|
121
|
+
// Lança o erro para parar o processo de exportação se a cópia falhar
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// --- INÍCIO DO SEU CÓDIGO (AGORA CORRIGIDO) ---
|
|
126
|
+
program
|
|
127
|
+
.command('export')
|
|
128
|
+
.description('Exports the application as static HTML to the "exported" folder.')
|
|
129
|
+
.option('-o, --output <path>', 'Specifies the output directory', 'exported')
|
|
130
|
+
.option('--assets-dir <path>', 'Directory (inside output) where the .nyte assets will be written', '.nyte')
|
|
131
|
+
.option('--no-html', 'Do not generate index.html (assets only)')
|
|
132
|
+
.option('--output-h-data <file>', 'Write the data-h value from <script id="__nyte_data__" data-h="..."> into this file')
|
|
133
|
+
.action(async (options) => {
|
|
134
|
+
const projectDir = process.cwd();
|
|
135
|
+
// Resolve output:
|
|
136
|
+
// - se vier absoluto, usa como está
|
|
137
|
+
// - se vier relativo, resolve a partir do projeto
|
|
138
|
+
const outputInput = typeof options.output === 'string' && options.output.trim().length
|
|
139
|
+
? options.output.trim()
|
|
140
|
+
: 'exported';
|
|
141
|
+
const exportDir = path.isAbsolute(outputInput)
|
|
142
|
+
? path.resolve(outputInput)
|
|
143
|
+
: path.resolve(projectDir, outputInput);
|
|
144
|
+
// Proteções: nunca permitir apagar a raiz do drive (ex: D:\) ou o root do SO (ex: C:\)
|
|
145
|
+
const exportDirResolved = path.resolve(exportDir);
|
|
146
|
+
const exportDirRoot = path.parse(exportDirResolved).root; // ex: 'D:\\'
|
|
147
|
+
const projectDirResolved = path.resolve(projectDir);
|
|
148
|
+
if (exportDirResolved === exportDirRoot) {
|
|
149
|
+
throw new Error(`Refusing to use output directory at drive root: ${exportDirResolved}`);
|
|
150
|
+
}
|
|
151
|
+
// Também evita `--output .` ou `--output ..` que cairia no diretório do projeto (perigoso)
|
|
152
|
+
// Regra: output precisa estar dentro do projeto, ou dentro de uma subpasta do projeto.
|
|
153
|
+
// (mantém comportamento esperado e evita deletar o repo inteiro por acidente)
|
|
154
|
+
const relExportToProject = path.relative(projectDirResolved, exportDirResolved);
|
|
155
|
+
if (relExportToProject === '' || relExportToProject === '.' || relExportToProject.startsWith('..')) {
|
|
156
|
+
throw new Error(`Refusing to export to ${exportDirResolved}. Use a subfolder like "exported" or an explicit path inside the project.`);
|
|
157
|
+
}
|
|
158
|
+
// assetsDir: sempre relativo ao exportDir (evita escrever fora sem querer)
|
|
159
|
+
// Permite usar '.' (raiz do output)
|
|
160
|
+
const assetsDirInputRaw = typeof options.assetsDir === 'string' ? options.assetsDir : '.nyte';
|
|
161
|
+
const assetsDirInput = assetsDirInputRaw.trim().length ? assetsDirInputRaw.trim() : '.';
|
|
162
|
+
const assetsDirResolved = path.resolve(exportDirResolved, assetsDirInput);
|
|
163
|
+
const relAssetsToExport = path.relative(exportDirResolved, assetsDirResolved);
|
|
164
|
+
if (relAssetsToExport.startsWith('..') || path.isAbsolute(relAssetsToExport)) {
|
|
165
|
+
throw new Error(`Invalid --assets-dir: must be inside output directory. Received: ${assetsDirInputRaw}`);
|
|
166
|
+
}
|
|
167
|
+
// Normaliza a pasta para uso em URL no HTML
|
|
168
|
+
// Se assets-dir for '.', relAssetsToExport vira '' e assetsBaseHref vira './'
|
|
169
|
+
const assetsDirUrl = relAssetsToExport.split(path.sep).join('/').replace(/^\.?\/?/, '');
|
|
170
|
+
const assetsBaseHref = './' + (assetsDirUrl.length ? assetsDirUrl + '/' : '');
|
|
171
|
+
console.log('🚀 Starting export...\n');
|
|
172
|
+
try {
|
|
173
|
+
// 1. Cria a pasta exported (limpa se já existir)
|
|
174
|
+
if (fs.existsSync(exportDirResolved)) {
|
|
175
|
+
console.log('🗑️ Cleaning existing export folder...');
|
|
176
|
+
fs.rmSync(exportDirResolved, { recursive: true, force: true });
|
|
177
|
+
}
|
|
178
|
+
fs.mkdirSync(exportDirResolved, { recursive: true });
|
|
179
|
+
console.log('✅ Export folder created\n');
|
|
180
|
+
// 2. Inicializa e prepara o build
|
|
181
|
+
console.log('🔨 Building application...');
|
|
182
|
+
// ATENÇÃO: Ajuste o caminho deste 'require' conforme a estrutura do seu projeto!
|
|
183
|
+
const teste = require("../helpers");
|
|
184
|
+
const app = teste.default({ dev: false, port: 3000, hostname: '0.0.0.0', framework: 'native' });
|
|
185
|
+
await app.prepare();
|
|
186
|
+
console.log('✅ Build complete\n');
|
|
187
|
+
const distDir = path.join(projectDirResolved, '.nyte');
|
|
188
|
+
if (fs.existsSync(distDir)) {
|
|
189
|
+
console.log('📦 Copying JavaScript files...');
|
|
190
|
+
const exportDistDir = assetsDirResolved;
|
|
191
|
+
copyDirRecursive(distDir, exportDistDir);
|
|
192
|
+
console.log(`✅ JavaScript files copied to: ${path.relative(exportDirResolved, exportDistDir) || '.'}\n`);
|
|
193
|
+
}
|
|
194
|
+
// 4. Copia a pasta public se existir
|
|
195
|
+
const publicDir = path.join(projectDirResolved, 'public');
|
|
196
|
+
if (fs.existsSync(publicDir)) {
|
|
197
|
+
console.log('📁 Copying public files...');
|
|
198
|
+
const exportPublicDir = path.join(exportDirResolved, 'public');
|
|
199
|
+
copyDirRecursive(publicDir, exportPublicDir);
|
|
200
|
+
console.log('✅ Public files copied\n');
|
|
201
|
+
}
|
|
202
|
+
// 5. Gera o index.html (opcional) / ou só renderiza para extrair h-data
|
|
203
|
+
const shouldExtractHData = typeof options.outputHData === 'string' && options.outputHData.trim().length > 0;
|
|
204
|
+
const shouldRenderHtml = Boolean(options.html) || shouldExtractHData;
|
|
205
|
+
if (shouldRenderHtml) {
|
|
206
|
+
const writeHtmlToDisk = Boolean(options.html);
|
|
207
|
+
if (writeHtmlToDisk) {
|
|
208
|
+
console.log('📝 Generating index.html...');
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
console.log('🧩 Rendering HTML to extract h-data (--output-h-data)...');
|
|
212
|
+
}
|
|
213
|
+
// ATENÇÃO: Ajuste os caminhos destes 'requires' conforme a estrutura do seu projeto!
|
|
214
|
+
const { render } = require('../renderer');
|
|
215
|
+
const { loadRoutes, loadLayout, loadNotFound } = require('../router');
|
|
216
|
+
// Carrega as rotas para gerar o HTML
|
|
217
|
+
const userWebDir = path.join(projectDirResolved, 'src', 'web');
|
|
218
|
+
const userWebRoutesDir = path.join(userWebDir, 'routes');
|
|
219
|
+
const routes = loadRoutes(userWebRoutesDir);
|
|
220
|
+
loadLayout(userWebDir);
|
|
221
|
+
loadNotFound(userWebDir);
|
|
222
|
+
// Gera HTML para a rota raiz
|
|
223
|
+
const rootRoute = routes.find(r => r.pattern === '/') || routes[0];
|
|
224
|
+
if (rootRoute) {
|
|
225
|
+
const mockReq = {
|
|
226
|
+
url: '/',
|
|
227
|
+
method: 'GET',
|
|
228
|
+
headers: { host: 'localhost' },
|
|
229
|
+
hwebDev: false,
|
|
230
|
+
hotReloadManager: null
|
|
231
|
+
};
|
|
232
|
+
const html = await render({
|
|
233
|
+
req: mockReq,
|
|
234
|
+
route: rootRoute,
|
|
235
|
+
params: {},
|
|
236
|
+
allRoutes: routes
|
|
237
|
+
});
|
|
238
|
+
if (shouldExtractHData) {
|
|
239
|
+
const m = html.match(/<script\b[^>]*\bid=["']__nyte_data__["'][^>]*\bdata-h=["']([^"']*)["'][^>]*>/i);
|
|
240
|
+
if (!m || typeof m[1] !== 'string') {
|
|
241
|
+
throw new Error('Could not find <script id="__nyte_data__" data-h="..."> in rendered HTML.');
|
|
242
|
+
}
|
|
243
|
+
const hDataValue = m[1];
|
|
244
|
+
// O path do arquivo é relativo ao projeto por padrão
|
|
245
|
+
const outputHDataPathInput = options.outputHData.trim();
|
|
246
|
+
const outputHDataPath = path.isAbsolute(outputHDataPathInput)
|
|
247
|
+
? path.resolve(outputHDataPathInput)
|
|
248
|
+
: path.resolve(projectDirResolved, outputHDataPathInput);
|
|
249
|
+
fs.mkdirSync(path.dirname(outputHDataPath), { recursive: true });
|
|
250
|
+
fs.writeFileSync(outputHDataPath, hDataValue, 'utf8');
|
|
251
|
+
console.log(`✅ h-data written to: ${outputHDataPath}`);
|
|
252
|
+
}
|
|
253
|
+
if (writeHtmlToDisk) {
|
|
254
|
+
const scriptReplaced = html.replace(/\/_nyte\//g, assetsBaseHref);
|
|
255
|
+
const indexPath = path.join(exportDirResolved, 'index.html');
|
|
256
|
+
fs.writeFileSync(indexPath, scriptReplaced, 'utf8');
|
|
257
|
+
console.log('✅ index.html generated\n');
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
console.log('✅ HTML rendered (no index.html written)\n');
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
console.log('⏭️ Skipping index.html generation (--no-html)\n');
|
|
266
|
+
}
|
|
267
|
+
console.log('🎉 Export completed successfully!');
|
|
268
|
+
console.log(`📂 Files exported to: ${exportDirResolved}\n`);
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
// Logar o erro completo (com stack trace) é mais útil
|
|
272
|
+
console.error('❌ Error during export:', error);
|
|
273
|
+
process.exit(1);
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
// Faz o "parse" dos argumentos passados na linha de comando
|
|
277
|
+
program.parse(process.argv);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a single entry point into a single output file.
|
|
3
|
+
* @param {string} entryPoint - The path to the entry file.
|
|
4
|
+
* @param {string} outfile - The full path to the output file.
|
|
5
|
+
* @param {boolean} isProduction - Se está em modo produção ou não.
|
|
6
|
+
* @returns {Promise<void>}
|
|
7
|
+
*/
|
|
8
|
+
export function build(entryPoint: string, outfile: string, isProduction?: boolean): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Watches an entry point and its dependencies, rebuilding to a single output file.
|
|
11
|
+
* @param {string} entryPoint - The path to the entry file.
|
|
12
|
+
* @param {string} outfile - The full path to the output file.
|
|
13
|
+
* @param {Object} hotReloadManager - Manager de hot reload (opcional).
|
|
14
|
+
* @returns {Promise<void>}
|
|
15
|
+
*/
|
|
16
|
+
export function watch(entryPoint: string, outfile: string, hotReloadManager?: Object): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Builds with code splitting into multiple chunks based on module types.
|
|
19
|
+
* @param {string} entryPoint - The path to the entry file.
|
|
20
|
+
* @param {string} outdir - The directory for output files.
|
|
21
|
+
* @param {boolean} isProduction - Se está em modo produção ou não.
|
|
22
|
+
* @returns {Promise<void>}
|
|
23
|
+
*/
|
|
24
|
+
export function buildWithChunks(entryPoint: string, outdir: string, isProduction?: boolean): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Watches with code splitting enabled
|
|
27
|
+
* @param {string} entryPoint - The path to the entry file.
|
|
28
|
+
* @param {string} outdir - The directory for output files.
|
|
29
|
+
* @param {Object} hotReloadManager - Manager de hot reload (opcional).
|
|
30
|
+
* @returns {Promise<void>}
|
|
31
|
+
*/
|
|
32
|
+
export function watchWithChunks(entryPoint: string, outdir: string, hotReloadManager?: Object): Promise<void>;
|