innetjs 2.4.0 → 2.4.1
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/_virtual/_rollup-plugin-process-env.js +1 -1
- package/_virtual/_rollup-plugin-process-env.mjs +1 -1
- package/bin/innet +5 -4
- package/index.js +4 -3
- package/index.mjs +4 -3
- package/package.json +1 -1
package/bin/innet
CHANGED
|
@@ -725,8 +725,8 @@ class InnetJS {
|
|
|
725
725
|
fs__default["default"].watch(this.publicIndexFile, update);
|
|
726
726
|
yield update();
|
|
727
727
|
const httpsUsing = !!(cert && key);
|
|
728
|
-
app.use(express__default["default"].static(this.devBuildFolder));
|
|
729
|
-
app.use(express__default["default"].static(this.publicFolder));
|
|
728
|
+
app.use(this.baseUrl, express__default["default"].static(this.devBuildFolder));
|
|
729
|
+
app.use(this.baseUrl, express__default["default"].static(this.publicFolder));
|
|
730
730
|
if ((_a = this.proxy) === null || _a === void 0 ? void 0 : _a.startsWith('http')) {
|
|
731
731
|
if (this.simulateIP) {
|
|
732
732
|
app.use((req, res, next) => {
|
|
@@ -746,7 +746,8 @@ class InnetJS {
|
|
|
746
746
|
const server = httpsUsing ? https__default["default"].createServer({ key, cert }, app) : http__default["default"].createServer(app);
|
|
747
747
|
let port = this.port;
|
|
748
748
|
const listener = () => {
|
|
749
|
-
|
|
749
|
+
const baseUrl = this.baseUrl === '/' ? '' : this.baseUrl;
|
|
750
|
+
console.log(`${chalk__default["default"].green('➤')} Started on http${httpsUsing ? 's' : ''}://localhost:${port}${baseUrl} and http${httpsUsing ? 's' : ''}://${address__default["default"].ip()}:${port}${baseUrl}`);
|
|
750
751
|
};
|
|
751
752
|
server.listen(port, listener);
|
|
752
753
|
server.on('error', (e) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -784,7 +785,7 @@ class InnetJS {
|
|
|
784
785
|
}
|
|
785
786
|
|
|
786
787
|
(function () {
|
|
787
|
-
const env = {"__INNETJS__PACKAGE_VERSION":"2.4.
|
|
788
|
+
const env = {"__INNETJS__PACKAGE_VERSION":"2.4.1"};
|
|
788
789
|
if (typeof process === 'undefined') {
|
|
789
790
|
globalThis.process = { env: env };
|
|
790
791
|
} else if (process.env) {
|
package/index.js
CHANGED
|
@@ -615,8 +615,8 @@ class InnetJS {
|
|
|
615
615
|
fs__default["default"].watch(this.publicIndexFile, update);
|
|
616
616
|
yield update();
|
|
617
617
|
const httpsUsing = !!(cert && key);
|
|
618
|
-
app.use(express__default["default"].static(this.devBuildFolder));
|
|
619
|
-
app.use(express__default["default"].static(this.publicFolder));
|
|
618
|
+
app.use(this.baseUrl, express__default["default"].static(this.devBuildFolder));
|
|
619
|
+
app.use(this.baseUrl, express__default["default"].static(this.publicFolder));
|
|
620
620
|
if ((_a = this.proxy) === null || _a === void 0 ? void 0 : _a.startsWith('http')) {
|
|
621
621
|
if (this.simulateIP) {
|
|
622
622
|
app.use((req, res, next) => {
|
|
@@ -636,7 +636,8 @@ class InnetJS {
|
|
|
636
636
|
const server = httpsUsing ? https__default["default"].createServer({ key, cert }, app) : http__default["default"].createServer(app);
|
|
637
637
|
let port = this.port;
|
|
638
638
|
const listener = () => {
|
|
639
|
-
|
|
639
|
+
const baseUrl = this.baseUrl === '/' ? '' : this.baseUrl;
|
|
640
|
+
console.log(`${chalk__default["default"].green('➤')} Started on http${httpsUsing ? 's' : ''}://localhost:${port}${baseUrl} and http${httpsUsing ? 's' : ''}://${address__default["default"].ip()}:${port}${baseUrl}`);
|
|
640
641
|
};
|
|
641
642
|
server.listen(port, listener);
|
|
642
643
|
server.on('error', (e) => tslib.__awaiter(this, void 0, void 0, function* () {
|
package/index.mjs
CHANGED
|
@@ -580,8 +580,8 @@ class InnetJS {
|
|
|
580
580
|
fs.watch(this.publicIndexFile, update);
|
|
581
581
|
yield update();
|
|
582
582
|
const httpsUsing = !!(cert && key);
|
|
583
|
-
app.use(express.static(this.devBuildFolder));
|
|
584
|
-
app.use(express.static(this.publicFolder));
|
|
583
|
+
app.use(this.baseUrl, express.static(this.devBuildFolder));
|
|
584
|
+
app.use(this.baseUrl, express.static(this.publicFolder));
|
|
585
585
|
if ((_a = this.proxy) === null || _a === void 0 ? void 0 : _a.startsWith('http')) {
|
|
586
586
|
if (this.simulateIP) {
|
|
587
587
|
app.use((req, res, next) => {
|
|
@@ -601,7 +601,8 @@ class InnetJS {
|
|
|
601
601
|
const server = httpsUsing ? https.createServer({ key, cert }, app) : http.createServer(app);
|
|
602
602
|
let port = this.port;
|
|
603
603
|
const listener = () => {
|
|
604
|
-
|
|
604
|
+
const baseUrl = this.baseUrl === '/' ? '' : this.baseUrl;
|
|
605
|
+
console.log(`${chalk.green('➤')} Started on http${httpsUsing ? 's' : ''}://localhost:${port}${baseUrl} and http${httpsUsing ? 's' : ''}://${address.ip()}:${port}${baseUrl}`);
|
|
605
606
|
};
|
|
606
607
|
server.listen(port, listener);
|
|
607
608
|
server.on('error', (e) => __awaiter(this, void 0, void 0, function* () {
|