@arkstack/driver-express 0.17.17 → 0.17.18

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -2
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -195,17 +195,22 @@ var ExpressDriver = class extends ArkstackKitDriver {
195
195
  const host = env("APP_HOST", env("HOST", "0.0.0.0"));
196
196
  const secure = env("APP_SECURE", false) === true;
197
197
  const tunneled = env("TUNNEL", false);
198
+ const tunnelUrl = env("TUNNEL_URL");
198
199
  const scheme = secure ? "https" : "http";
199
200
  const onListen = async () => {
200
201
  let log = startupLogLines(scheme, host, port);
201
- if (tunneled === true) {
202
+ if (tunnelUrl) {
203
+ log = log.concat(Logger.log([["Traffic has been tunnelled to", "white"], [tunnelUrl, "green"]], " ", false));
204
+ this.tunnel_url = tunnelUrl;
205
+ globalThis.tunnelUrl = () => tunnelUrl;
206
+ } else if (tunneled === true) {
202
207
  const url = (await ngrok.forward({
203
208
  addr: port,
204
209
  authtoken: env("NGROK_AUTHTOKEN"),
205
210
  domain: env("NGROK_DOMAIN")
206
211
  })).url();
207
212
  if (url) {
208
- log = log.concat(Logger.log([["Trafic has been tunnelled to", "white"], [url, "green"]], " ", false));
213
+ log = log.concat(Logger.log([["Traffic has been tunnelled to", "white"], [url, "green"]], " ", false));
209
214
  process.env.TUNNEL_URL = url;
210
215
  this.tunnel_url = url;
211
216
  globalThis.tunnelUrl = () => url;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/driver-express",
3
- "version": "0.17.17",
3
+ "version": "0.17.18",
4
4
  "type": "module",
5
5
  "description": "Express driver for Arkstack, providing Express-based runtime integration for the framework.",
6
6
  "homepage": "https://arkstack.toneflix.net",
@@ -43,15 +43,15 @@
43
43
  "express-rate-limit": "^8.4.1",
44
44
  "multer": "^2.1.1",
45
45
  "resora": "^1.3.34",
46
- "@arkstack/contract": "^0.17.17",
47
- "@arkstack/http": "^0.17.17"
46
+ "@arkstack/contract": "^0.17.18",
47
+ "@arkstack/http": "^0.17.18"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "express": "^5.2.1",
51
- "@arkstack/common": "^0.17.17",
52
- "@arkstack/auth": "^0.17.17",
53
- "@arkstack/foundry": "^0.17.17",
54
- "@arkstack/inertia": "^0.17.17"
51
+ "@arkstack/auth": "^0.17.18",
52
+ "@arkstack/common": "^0.17.18",
53
+ "@arkstack/foundry": "^0.17.18",
54
+ "@arkstack/inertia": "^0.17.18"
55
55
  },
56
56
  "peerDependenciesMeta": {
57
57
  "@arkstack/auth": {