entexto-cli 2.2.1 → 2.2.3
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/entexto.js +20 -0
- package/package.json +1 -1
package/bin/entexto.js
CHANGED
|
@@ -86,6 +86,15 @@ program
|
|
|
86
86
|
require('../lib/commands/tunnel')({ target: target || '3000', link: opts.link });
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
+
// ─── entexto t <port> [link] — atajo para tunnel ─────────────
|
|
90
|
+
program
|
|
91
|
+
.command('t [target] [link]')
|
|
92
|
+
.description('Atajo: entexto t 1200 reyjosias = entexto tunnel 1200 --link reyjosias')
|
|
93
|
+
.option('-l, --link <name>', 'Link personalizado')
|
|
94
|
+
.action((target, link, opts) => {
|
|
95
|
+
require('../lib/commands/tunnel')({ target: target || '3000', link: link || opts.link });
|
|
96
|
+
});
|
|
97
|
+
|
|
89
98
|
// ─── entexto tunnels ─────────────────────────────────────────
|
|
90
99
|
program
|
|
91
100
|
.command('tunnels')
|
|
@@ -131,6 +140,17 @@ program
|
|
|
131
140
|
.description('Guía del Live SDK (WebRTC, videollamadas, tiempo real)')
|
|
132
141
|
.action(require('../lib/commands/live'));
|
|
133
142
|
|
|
143
|
+
// ─── Shorthand: entexto t-PORT-l-LINK → tunnel PORT -l LINK ──
|
|
144
|
+
// Allows compact syntax like: entexto t-1200-l-reyjosias
|
|
145
|
+
const args = process.argv.slice(2);
|
|
146
|
+
if (args.length >= 1) {
|
|
147
|
+
const shorthand = args[0];
|
|
148
|
+
const match = shorthand.match(/^t-(\d+)-l-(.+)$/i);
|
|
149
|
+
if (match) {
|
|
150
|
+
process.argv = [process.argv[0], process.argv[1], 'tunnel', match[1], '-l', match[2], ...args.slice(1)];
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
134
154
|
program.parse(process.argv);
|
|
135
155
|
|
|
136
156
|
if (!process.argv.slice(2).length) {
|