@mbermeo/wa-blaster 0.1.2 → 0.1.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.
- package/bin/wa-blast.js +15 -1
- package/dist/node20/cli/index.jsc +0 -0
- package/dist/node20/cli/lib.jsc +0 -0
- package/dist/node20/mcp/index.jsc +0 -0
- package/dist/node20/src/accountManager.jsc +0 -0
- package/dist/node20/src/campaignRunner.jsc +0 -0
- package/dist/node20/src/db.jsc +0 -0
- package/dist/node20/src/paths.jsc +0 -0
- package/dist/node20/src/routes/accounts.jsc +0 -0
- package/dist/node20/src/routes/campaigns.jsc +0 -0
- package/dist/node20/src/routes/inbound.jsc +0 -0
- package/dist/node20/src/server.jsc +0 -0
- package/dist/node20/src/utils/csvParser.jsc +0 -0
- package/dist/node20/src/utils/templateEngine.jsc +0 -0
- package/dist/node22/cli/index.jsc +0 -0
- package/dist/node22/cli/lib.jsc +0 -0
- package/dist/node22/mcp/index.jsc +0 -0
- package/dist/node22/src/accountManager.jsc +0 -0
- package/dist/node22/src/campaignRunner.jsc +0 -0
- package/dist/node22/src/db.jsc +0 -0
- package/dist/node22/src/paths.jsc +0 -0
- package/dist/node22/src/routes/accounts.jsc +0 -0
- package/dist/node22/src/routes/campaigns.jsc +0 -0
- package/dist/node22/src/routes/inbound.jsc +0 -0
- package/dist/node22/src/server.jsc +0 -0
- package/dist/node22/src/utils/csvParser.jsc +0 -0
- package/dist/node22/src/utils/templateEngine.jsc +0 -0
- package/dist/node24/cli/index.jsc +0 -0
- package/dist/node24/cli/lib.jsc +0 -0
- package/dist/node24/mcp/index.jsc +0 -0
- package/dist/node24/src/accountManager.jsc +0 -0
- package/dist/node24/src/campaignRunner.jsc +0 -0
- package/dist/node24/src/db.jsc +0 -0
- package/dist/node24/src/paths.jsc +0 -0
- package/dist/node24/src/routes/accounts.jsc +0 -0
- package/dist/node24/src/routes/campaigns.jsc +0 -0
- package/dist/node24/src/routes/inbound.jsc +0 -0
- package/dist/node24/src/server.jsc +0 -0
- package/dist/node24/src/utils/csvParser.jsc +0 -0
- package/dist/node24/src/utils/templateEngine.jsc +0 -0
- package/package.json +1 -1
package/bin/wa-blast.js
CHANGED
|
@@ -22,17 +22,31 @@
|
|
|
22
22
|
const fs = require('fs');
|
|
23
23
|
const path = require('path');
|
|
24
24
|
|
|
25
|
-
// ─── Pre-parseo de
|
|
25
|
+
// ─── Pre-parseo de flags globales ────────────────────────────────────────────
|
|
26
26
|
// Minimal, antes de cargar nada más. El CLI/lib reparsea normalmente después.
|
|
27
|
+
//
|
|
28
|
+
// --data-dir <ruta> → process.env.WA_BLAST_HOME (lo lee paths.js al cargar)
|
|
29
|
+
// --url <url> → process.env.WA_BLAST_URL (lo lee cli/lib.js al cargar)
|
|
30
|
+
// --port <n> → si vamos a `serve`, setea PORT del server
|
|
31
|
+
// si no, setea WA_BLAST_URL=http://localhost:<n>
|
|
27
32
|
(function preApplyGlobalFlags() {
|
|
28
33
|
const argv = process.argv.slice(2);
|
|
34
|
+
let port;
|
|
29
35
|
for (let i = 0; i < argv.length - 1; i++) {
|
|
30
36
|
if (argv[i] === '--data-dir') {
|
|
31
37
|
process.env.WA_BLAST_HOME = path.resolve(argv[i + 1]);
|
|
32
38
|
} else if (argv[i] === '--url') {
|
|
33
39
|
process.env.WA_BLAST_URL = argv[i + 1];
|
|
40
|
+
} else if (argv[i] === '--port') {
|
|
41
|
+
port = argv[i + 1];
|
|
34
42
|
}
|
|
35
43
|
}
|
|
44
|
+
if (port) {
|
|
45
|
+
// Para `serve`: el subcomando lee PORT del env
|
|
46
|
+
if (!process.env.PORT) process.env.PORT = port;
|
|
47
|
+
// Para CLI/MCP: lee WA_BLAST_URL si no se pasó --url explícito
|
|
48
|
+
if (!process.env.WA_BLAST_URL) process.env.WA_BLAST_URL = `http://localhost:${port}`;
|
|
49
|
+
}
|
|
36
50
|
})();
|
|
37
51
|
|
|
38
52
|
// ─── Resolución dev vs compilado + target por versión de Node ───────────────
|
|
Binary file
|
package/dist/node20/cli/lib.jsc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/node20/src/db.jsc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/node22/cli/lib.jsc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/node22/src/db.jsc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/node24/cli/lib.jsc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/node24/src/db.jsc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|