tungsten 0.5.6 → 0.5.8

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.
@@ -1 +1 @@
1
- 1789509331643
1
+ 1789634748309
@@ -33,6 +33,7 @@ export type FrameworkConfigBase = {
33
33
  targets?: string | string[];
34
34
  };
35
35
  skipPackageCompilation?: string | string[];
36
+ sourceMaps?: boolean;
36
37
  serverMiddleware?: ServerMiddlewareInfo;
37
38
  apiRoutes?: string;
38
39
  apiPath?: string;
@@ -81,6 +82,7 @@ export type FrameworkConfigCompleteBase = {
81
82
  targets?: string | string[];
82
83
  };
83
84
  skipPackageCompilation?: string | string[];
85
+ sourceMaps?: boolean;
84
86
  serverMiddleware?: ServerMiddlewareInfo;
85
87
  apiRoutes?: string;
86
88
  apiPath: string;
@@ -99,6 +101,6 @@ export type FrameworkConfigCompleteWithoutRootComponent = FrameworkConfigComplet
99
101
  useRootComponent: false;
100
102
  };
101
103
  export type FrameworkConfigComplete = FrameworkConfigCompleteWithRootComponent | FrameworkConfigCompleteWithoutRootComponent;
102
- export type FrameworkConfigOverrides = Pick<FrameworkConfigCompleteBase, 'ignoreDirs' | 'ignorePatterns'>;
104
+ export type FrameworkConfigOverrides = Pick<FrameworkConfigCompleteBase, 'ignoreDirs' | 'ignorePatterns' | 'sourceMaps'>;
103
105
  export {};
104
106
  //# sourceMappingURL=FrameworkConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FrameworkConfig.d.ts","sourceRoot":"","sources":["../src/FrameworkConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAExE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAIxD,KAAK,WAAW,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA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AAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAChC,KAAK,CAAC,EAAE;QAGJ,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAC9B,CAAA;IACD,sBAAsB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAE1C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IAGf,qBAAqB,EAAE,OAAO,CAAA;IAC9B,6BAA6B,EAAE,OAAO,CAAA;IACtC,4BAA4B,EAAE,OAAO,CAAA;IAErC,qBAAqB,EAAE,OAAO,CAAA;IAC9B,GAAG,EAAE,OAAO,GAAG,QAAQ,CAAA;IACvB,GAAG,EAAE,OAAO,CAAA;CACf,CAAA;AAED,MAAM,MAAM,wCAAwC,GAC9C,2BAA2B,GAAG;IAC5B,gBAAgB,EAAE,IAAI,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;CACxB,CAAA;AAEL,MAAM,MAAM,2CAA2C,GACjD,2BAA2B,GAAG;IAC5B,gBAAgB,EAAE,KAAK,CAAA;CAC1B,CAAA;AAEL,MAAM,MAAM,uBAAuB,GAC7B,wCAAwC,GAAG,2CAA2C,CAAA;AAI5F,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACvC,2BAA2B,EAC/B,YAAY,GAAG,gBAAgB,GAAG,YAAY,CAC7C,CAAA"}
@@ -9,7 +9,7 @@ import type { MatchedRouteInfo } from '../Servers/MatchedRouteInfo.js';
9
9
  import type { Routes } from '../routing/Routes.js';
10
10
  import type { RedirectCode } from '../routing/RedirectCode.js';
11
11
  import type { ClientRuntimeContext } from './ClientRuntimeContext.js';
12
- import { type RouteKey } from '../routing/RouteTypes.js';
12
+ import type { RouteKey } from '../routing/RouteTypes.js';
13
13
  type DisposableComponent = {
14
14
  __delete: () => void;
15
15
  __deleted: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M,UAEtC;IACD,QAAQ,GAAI,OAAO,MAAM,UAIxB;IACD,iBAAiB,aAEhB;IAKD,WAAW,GAAI,WAAW,MAAM,GAAG;QAC/B,QAAQ,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;QAChC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAC7B,aAYA;IAED,SAAS,GAAI,MAAM,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,aAAa,MAAM,aAKjE;IAED,SAAS,GAAI,MAAM,MAAM,OAAO,EAAE,aAAa,MAAM,UAIpD;IAED,iBAAiB,GAAI,WAAW,mBAAmB,UAElD;IAED,mBAAmB,GAAI,WAAW,mBAAmB,UAGpD;IAED,2BAA2B,aAM1B;CACJ;AAID,wBAAgB,cAAc,CAC1B,IAAI,EAAE,MAAM,OAAO,EACnB,WAAW,EAAE,MAAM,EACnB,MAAM,GAAE,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,IAA6B,QAejF"}
@@ -4,8 +4,6 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
4
4
  import { isClient } from '../isClient.js';
5
5
  import { routing } from "../Servers/routing.js";
6
6
  import { RoutingRedirect } from '../routing/RoutingRedirect.js';
7
- import { throwError } from '../throwError.js';
8
- import { StringIsValidRouteKey } from '../routing/RouteTypes.js';
9
7
  import { isProd } from '../isProd.js';
10
8
  import { WebRedirect } from '../routing/WebRedirect.js';
11
9
  import { RouteRedirectComponent } from "../components/RouteRedirectComponent.js";
@@ -201,6 +199,7 @@ export class Instance {
201
199
  this.config = instanceConfig; // createInstanceConfig(appConfig)
202
200
  this.persistentHeadChildren = [];
203
201
  this.runtimeContext = runtimeContext;
202
+ // handle back button navigation?
204
203
  //if (AppClass === null) throwError('Instance', 'AppClass is null, did you register an '
205
204
  if (isClient && (runtimeContext?.navigation ?? true)) {
206
205
  const runtimeWindow = runtimeContext?.window ?? window;
@@ -208,10 +207,9 @@ export class Instance {
208
207
  //console.log('popstate', window.location.pathname)
209
208
  //this.updateLocation(window.location.pathname)
210
209
  const newLocation = runtimeWindow.location.pathname;
211
- if (!StringIsValidRouteKey(newLocation, routes)) {
212
- throwError('Instance constructor', `new location 'newLocation' is not a route in the routes object`);
213
- }
214
- this.goto(newLocation); // This should be a RouteKey, if everything worked? But it's still a bit dangerous
210
+ // unchecked: goto's routing() does the pattern matching and 404 fallback
211
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
212
+ void this.goto(newLocation);
215
213
  });
216
214
  }
217
215
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DevServer.d.ts","sourceRoot":"","sources":["../../src/Servers/DevServer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,OAAgF,MAAM,SAAS,CAAA;AAOtG,OAAO,KAAK,EAAE,uBAAuB,EAAwB,MAAM,uBAAuB,CAAA;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AA0B1C,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAC3G,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAqBrD,qBAAa,SAAU,SAAQ,cAAc;IACzC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,eAAe,EAAE,eAAe,CAAA;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAO;IAC9B,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzC,GAAG,EAA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E,MAAM,CAAM;IAiIlD,OAAO,CAAC,mBAAmB,CA2E1B;IAKD,OAAO,CAAC,sBAAsB,CAQ7B;IACD,OAAO,CAAC,mBAAmB,CAA8B;IACzD,OAAO,CAAC,iBAAiB,CAA+B;IACxD,OAAO,CAAC,kBAAkB,CAAyB;IACnD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAM;IAC9C,OAAO,CAAC,oBAAoB,CAwB3B;IACD,OAAO,CAAC,mBAAmB,CAK1B;IACD,OAAO,CAAC,gBAAgB,CAcvB;IAED,OAAO,CAAC,aAAa,CAuOpB;IAaD,OAAO,CAAC,mBAAmB,CAsC1B;IAID,aAAa,GAAU,MAAM,kBAAkB,EAAE,QAAQ,MAAM,yBAQ9D;IACD,QAAQ,GAAI,OAAO,OAAO,UAIzB;IACD,SAAS,GAAI,OAAO,OAAO,EAAE,YAAY,MAAM,EAAE,YAiBhD;IAGD,KAAK,QAAa,OAAO,CAAC,MAAM,CAAC,CAKhC;IACD,IAAI,aAMH;CAGJ"}
@@ -36,6 +36,7 @@ import { iterationQueryString } from '../iterationQueryString.js';
36
36
  import { onReloadEvent } from '../hmr/liveReloadHub.js';
37
37
  import { importDevModuleWithRetry } from '../importDevModuleWithRetry.js';
38
38
  import { devErrorPageAutoRetryScript } from './devErrorPageAutoRetry.js';
39
+ import { listenVerified, registerBootProbe } from './listenVerified.js';
39
40
  //import cookieParser from 'cookie-parser'
40
41
  function debug(...texts) {
41
42
  // console.log(...texts)
@@ -470,13 +471,15 @@ export class DevServer extends TungstenServer {
470
471
  </body>
471
472
  </html>`;
472
473
  });
473
- _defineProperty(this, "start", () => {
474
- return new Promise(resolve => {
475
- this.server = this.app.listen(this.port, () => {
476
- cliNews(`Dev server ready at ${this.location}`);
477
- resolve(this.location ?? '');
478
- });
479
- });
474
+ // rejects (and the process exits non-zero) on a bind error, or if another process answers on
475
+ // the port - a swallowed failure here looked like "dev is up but not responding"
476
+ _defineProperty(this, "start", async () => {
477
+ const {
478
+ server
479
+ } = await listenVerified(this.app, this.port, this.bootId);
480
+ this.server = server;
481
+ cliNews(`Dev server ready at ${this.location}`);
482
+ return this.location ?? '';
480
483
  });
481
484
  _defineProperty(this, "stop", () => {
482
485
  if (this.server !== undefined) this.server.close();
@@ -506,6 +509,7 @@ export class DevServer extends TungstenServer {
506
509
  this.initialProcessEnv = initialProcessEnv;
507
510
  this.app = express();
508
511
  this.reqId = 0;
512
+ registerBootProbe(this.app, this.bootId); // first, so start() can prove it owns the port
509
513
  //this.app.use(cookieParser)
510
514
  this.app.use((req, res, next) => {
511
515
  res.locals.reqId = this.reqId++;
@@ -19,6 +19,7 @@ export declare class ProdServer extends TungstenServer {
19
19
  apiRoutesPromise?: Promise<ApiRoutes>;
20
20
  apiRoutes?: ApiRoutes;
21
21
  server?: Server;
22
+ private bootId;
22
23
  constructor(framework: Framework, config: FrameworkConfigComplete, compilationInfo: CompilationInfo, appRoutes: AppRoutes, RootComponentOrNull: AnyComponentType | null, serverMiddleware: ServerMiddleware | null);
23
24
  private handleRequestApi;
24
25
  handleRequest: (req: express.Request, res: express.Response) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"ProdServer.d.ts","sourceRoot":"","sources":["../../src/Servers/ProdServer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AA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IAAI,CAAC,CA2HjF;IASD,OAAO,CAAC,mBAAmB,CA+C1B;IACD,SAAS,eASR;IAOK,KAAK,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,UAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAoBlE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAY9B"}
@@ -21,6 +21,7 @@ import { TungstenServer } from "./TungstenServer.js";
21
21
  import { portError } from './portError.js';
22
22
  import { initStores } from './initStores.js';
23
23
  import { makeTungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
24
+ import { listenVerified, newBootId, registerBootProbe } from './listenVerified.js';
24
25
  function debug(...texts) {
25
26
  // console.log(...texts)
26
27
  }
@@ -41,6 +42,7 @@ export class ProdServer extends TungstenServer {
41
42
  _defineProperty(this, "apiRoutesPromise", void 0);
42
43
  _defineProperty(this, "apiRoutes", void 0);
43
44
  _defineProperty(this, "server", void 0);
45
+ _defineProperty(this, "bootId", newBootId());
44
46
  // private addServerMiddleware = (serverMiddleware: ServerMiddlewareInfo): void => {
45
47
  // const [middlewareFile, middlewareExportName, middlewarePath] = serverMiddleware
46
48
  // const fullFilePath = 'file://' + join(this.compilationInfo.codeLocation, middlewareFile)
@@ -269,6 +271,7 @@ export class ProdServer extends TungstenServer {
269
271
  // : process.env.TUNGSTEN_SERVER_PORT)
270
272
  // seems like all we need is:
271
273
  this.app = express();
274
+ registerBootProbe(this.app, this.bootId); // first, so start() can prove it owns the port
272
275
  if (tungstenPrivateEnv.DEBUG === true) {
273
276
  let reqId = 0;
274
277
  this.app.use((req, res, next) => {
@@ -337,26 +340,23 @@ export class ProdServer extends TungstenServer {
337
340
  // throw new TungstenError(`Err - Dev server received a post request. Not supported yet.`)
338
341
  // }
339
342
  // I don't think we ever override the port, not sure why
340
- start(portOverride, mute = false) {
341
- return new Promise(resolve => {
342
- const proto = tungstenPublicEnv.FRONTEND_PROTO ?? 'http';
343
- const host = tungstenPublicEnv.FRONTEND_HOST ?? 'localhost';
344
- let port;
345
- if (portOverride !== undefined) {
346
- port = portOverride;
347
- } else {
348
- const _port = tungstenPrivateEnv.TUNGSTEN_SERVER_PORT ?? 3000;
349
- if (isNaN(_port) || _port === 0) throwError('ProdServer', portError(_port));
350
- port = _port;
351
- }
352
- //const port = (portOverride !== undefined) ? portOverride : port
353
- this.server = this.app.listen(port, () => {
354
- const serverAddress = this.server.address(); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
355
- this.location = `${proto}://${host}:${serverAddress.port}`;
356
- if (!mute) cliNews(`${packageNameCapitalized} prod server ready at ${this.location}`);
357
- resolve(this.location);
358
- });
359
- });
343
+ // rejects on a bind error, or if another process answers on the port (see listenVerified.ts)
344
+ async start(portOverride, mute = false) {
345
+ const proto = tungstenPublicEnv.FRONTEND_PROTO ?? 'http';
346
+ const host = tungstenPublicEnv.FRONTEND_HOST ?? 'localhost';
347
+ let port;
348
+ if (portOverride !== undefined) {
349
+ port = portOverride ?? 0; // null: any free port
350
+ } else {
351
+ const _port = tungstenPrivateEnv.TUNGSTEN_SERVER_PORT ?? 3000;
352
+ if (isNaN(_port) || _port === 0) throwError('ProdServer', portError(_port));
353
+ port = _port;
354
+ }
355
+ const listening = await listenVerified(this.app, port, this.bootId);
356
+ this.server = listening.server;
357
+ this.location = `${proto}://${host}:${listening.port}`;
358
+ if (!mute) cliNews(`${packageNameCapitalized} prod server ready at ${this.location}`);
359
+ return this.location;
360
360
  }
361
361
  // close() alone only stops new connections arriving - keep-alive sockets (fetch/undici
362
362
  // holds them open) keep the handle, and so the event loop, alive until they time out
@@ -0,0 +1,12 @@
1
+ import type { Server as HttpServer } from 'http';
2
+ import type { Server as NetServer } from 'net';
3
+ import type { Application } from 'express';
4
+ export declare const bootProbePath = "/__tungsten_boot_probe__";
5
+ export declare function newBootId(): string;
6
+ export declare function registerBootProbe(app: Application, bootId: string): void;
7
+ export declare function verifyListening(server: NetServer, bootId: string, timeoutMs?: number): Promise<number>;
8
+ export declare function listenVerified(app: Application, port: number, bootId: string, timeoutMs?: number): Promise<{
9
+ server: HttpServer;
10
+ port: number;
11
+ }>;
12
+ //# sourceMappingURL=listenVerified.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listenVerified.d.ts","sourceRoot":"","sources":["../../src/Servers/listenVerified.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAA;AAChD,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,KAAK,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAW1C,eAAO,MAAM,aAAa,6BAA6B,CAAA;AAEvD,wBAAgB,SAAS,WAExB;AAGD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,QAEjE;AA2BD,wBAAsB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,SAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CA8B1G;AAcD,wBAAsB,cAAc,CAChC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,SAAO,GACjE,OAAO,CAAC;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAa/C"}
@@ -0,0 +1,116 @@
1
+ import { get as httpGet } from 'http';
2
+ import { TungstenError } from '../TungstenError.js';
3
+ // A successful listen() does not prove this process owns the port. Windows lets a `::` listener
4
+ // bind beside a held 0.0.0.0 one (and vice versa) - each family then reaches a different process.
5
+ // So after listening, the server fetches its own boot id over both loopback addresses, and refuses
6
+ // to report ready unless every address that answers is this process. See docs/dev-notes.md.
7
+ export const bootProbePath = '/__tungsten_boot_probe__';
8
+ export function newBootId() {
9
+ return `${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2)}`;
10
+ }
11
+ // mount before any other middleware, so nothing user-supplied can slow or intercept the probe
12
+ export function registerBootProbe(app, bootId) {
13
+ app.get(bootProbePath, (_req, res) => {
14
+ res.type('text/plain').send(bootId);
15
+ });
16
+ }
17
+ // nobody is listening on that loopback address, e.g. ::1 with IPv6 off, or a 0.0.0.0-only bind
18
+ const nobodyCodes = new Set(['ECONNREFUSED', 'EADDRNOTAVAIL', 'ENETUNREACH', 'EHOSTUNREACH', 'EAFNOSUPPORT']);
19
+ function probe(host, port, bootId, timeoutMs) {
20
+ return new Promise(resolve => {
21
+ const req = httpGet({
22
+ host,
23
+ port,
24
+ path: bootProbePath,
25
+ timeout: timeoutMs,
26
+ agent: false
27
+ }, res => {
28
+ let body = '';
29
+ res.setEncoding('utf8');
30
+ res.on('data', chunk => {
31
+ body += chunk;
32
+ });
33
+ res.on('end', () => {
34
+ if (res.statusCode === 200 && body === bootId) resolve({
35
+ kind: 'me'
36
+ });else resolve({
37
+ kind: 'other',
38
+ detail: `HTTP ${res.statusCode ?? '?'} ${body.slice(0, 80)}`
39
+ });
40
+ });
41
+ });
42
+ req.on('timeout', () => {
43
+ req.destroy();
44
+ resolve({
45
+ kind: 'timeout'
46
+ });
47
+ });
48
+ req.on('error', e => {
49
+ const code = e.code ?? e.message;
50
+ resolve(nobodyCodes.has(code) ? {
51
+ kind: 'nobody'
52
+ } : {
53
+ kind: 'other',
54
+ detail: code
55
+ });
56
+ });
57
+ });
58
+ }
59
+ export async function verifyListening(server, bootId, timeoutMs = 5000) {
60
+ const address = server.address();
61
+ if (address === null || typeof address === 'string') {
62
+ throw new TungstenError('Server is not listening on a TCP port');
63
+ }
64
+ const {
65
+ port
66
+ } = address;
67
+ const hosts = ['127.0.0.1', '::1'];
68
+ const results = await Promise.all(hosts.map(host => probe(host, port, bootId, timeoutMs)));
69
+ const problems = [];
70
+ results.forEach((result, i) => {
71
+ const host = hosts[i];
72
+ if (result.kind === 'other') {
73
+ problems.push(`${host}:${port} is answered by another process (${result.detail})`);
74
+ } else if (result.kind === 'timeout') {
75
+ problems.push(`${host}:${port} accepted a connection but did not answer within ${timeoutMs}ms` + ` - another process is probably holding the port`);
76
+ }
77
+ });
78
+ if (!results.some(result => result.kind === 'me')) {
79
+ problems.push('no loopback address reached this process');
80
+ }
81
+ if (problems.length > 0) {
82
+ throw new TungstenError(`Port ${port} is not owned by this server:\n ${problems.join('\n ')}\n` + `Is another tungsten server (or something else) still running on it?`);
83
+ }
84
+ return port;
85
+ }
86
+ function listenErrorMessage(e, port) {
87
+ switch (e.code) {
88
+ case 'EADDRINUSE':
89
+ return `Port ${port} is already in use. Is another tungsten server (or something else) running on it?`;
90
+ case 'EACCES':
91
+ return `No permission to listen on port ${port}`;
92
+ default:
93
+ return `Could not listen on port ${port}: ${e.code ?? e.message}`;
94
+ }
95
+ }
96
+ // port 0 asks the OS for a free one; the port actually bound is returned
97
+ export async function listenVerified(app, port, bootId, timeoutMs = 5000) {
98
+ const server = await new Promise((resolve, reject) => {
99
+ const s = app.listen(port);
100
+ const onError = e => reject(new TungstenError(listenErrorMessage(e, port)));
101
+ s.once('error', onError);
102
+ s.once('listening', () => {
103
+ s.off('error', onError);
104
+ resolve(s);
105
+ });
106
+ });
107
+ try {
108
+ return {
109
+ server,
110
+ port: await verifyListening(server, bootId, timeoutMs)
111
+ };
112
+ } catch (e) {
113
+ server.close();
114
+ throw e;
115
+ }
116
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/compile.ts"],"names":[],"mappings":"AA6SA,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/compile.ts"],"names":[],"mappings":"AAyTA,OAAO,EAAE,CAAA"}
@@ -33,7 +33,9 @@ const {
33
33
  readyFile: readyFileOption,
34
34
  ignoreDirs,
35
35
  ignorePatterns,
36
- fresh
36
+ fresh,
37
+ sourceMaps,
38
+ sourceMapsNotRefused
37
39
  } = cliArgs({
38
40
  js: '--js',
39
41
  css: '--css',
@@ -51,10 +53,12 @@ const {
51
53
  readyFile: '--ready-file <file>',
52
54
  ignoreDirs: '--ignore-dirs <dir>...',
53
55
  ignorePatterns: '--ignore-patterns <pattern>...',
54
- fresh: '--fresh'
56
+ fresh: '--fresh',
57
+ sourceMaps: '--source-maps',
58
+ sourceMapsNotRefused: '--no-source-maps'
55
59
  }, {
56
60
  handledElsewhere: ['--profile-modules'],
57
- help: ['With no target option (--js, --css, --client, --assets, --public), all targets are compiled.', ' --profile reports the time taken by each compile phase', ' --profile-modules[=<path substring>] reports where module load time goes,', ' splitting each import into what only it needs and what it shares', ' --packages compiles imported packages into the build\'s .packages tree', ' for the dev server to serve. Off by default: compiled code left to', ' node\'s own resolution, as tests use, needs none of it.', ' --ignore-dirs and --ignore-patterns override the config entries of the same name.', ' Repeat either to give several values, or pass an empty value to ignore nothing.', ' --tests also compiles the files the config\'s testPatterns match, which every', ' other compile leaves out.', ' --fresh compiles everything from source, ignoring the packages and styles caches.', ' Both are rewritten, so the next compile starts from a cache this one made.']
61
+ help: ['With no target option (--js, --css, --client, --assets, --public), all targets are compiled.', ' --profile reports the time taken by each compile phase', ' --profile-modules[=<path substring>] reports where module load time goes,', ' splitting each import into what only it needs and what it shares', ' --packages compiles imported packages into the build\'s .packages tree', ' for the dev server to serve. Off by default: compiled code left to', ' node\'s own resolution, as tests use, needs none of it.', ' --ignore-dirs and --ignore-patterns override the config entries of the same name.', ' Repeat either to give several values, or pass an empty value to ignore nothing.', ' --tests also compiles the files the config\'s testPatterns match, which every', ' other compile leaves out.', ' --fresh compiles everything from source, ignoring the packages and styles caches.', ' Both are rewritten, so the next compile starts from a cache this one made.', ' --source-maps and --no-source-maps override the sourceMaps config entry: an inline', ' source map on each compiled app file, chained through any map the source references.']
58
62
  });
59
63
  const allTargets = ['js', 'css', 'client', 'assets', 'public'];
60
64
  const targetGiven = {
@@ -79,6 +83,11 @@ if (packages && !targets.has('js')) {
79
83
  cliError('--packages applies to the js target, which is not being compiled');
80
84
  process.exit(1);
81
85
  }
86
+ if (sourceMaps && !sourceMapsNotRefused) {
87
+ cliError('--source-maps and --no-source-maps cannot both be given');
88
+ process.exit(1);
89
+ }
90
+ const sourceMapsOption = sourceMaps ? true : sourceMapsNotRefused ? undefined : false;
82
91
  const projectDir = process.cwd();
83
92
  const config = await profiler.timeProfileAsync('init', () => getUserConfig({
84
93
  ...(ignoreDirsOption !== undefined ? {
@@ -86,6 +95,9 @@ const config = await profiler.timeProfileAsync('init', () => getUserConfig({
86
95
  } : {}),
87
96
  ...(ignorePatternsOption !== undefined ? {
88
97
  ignorePatterns: ignorePatternsOption
98
+ } : {}),
99
+ ...(sourceMapsOption !== undefined ? {
100
+ sourceMaps: sourceMapsOption
89
101
  } : {})
90
102
  }));
91
103
  const codeLocation = join(projectDir, config.codeDir);
@@ -1 +1 @@
1
- {"version":3,"file":"compileJavascript.d.ts","sourceRoot":"","sources":["../../src/build/compileJavascript.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,MAAM,UAAU,CAAA;AAK/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AA0BtC,KAAK,uBAAuB,GAAG;IAC3B,OAAO,EAAE,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAA;IAClC,WAAW,EAAE,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAA;IACtC,aAAa,EAAE,aAAa,CAAA;IAC5B,cAAc,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,MAAM,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACnC,KAAK,CAAC,E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AED,MAAM,MAAM,0BAA0B,GAAG;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,MAAM,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACnC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,eAAe,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,0BAA0B,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAA;IAE3F,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAuBD,wBAAsB,iBAAiB,CACnC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,uBAAuB,EACtD,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EACrE,aAAa,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,UAAO,EAC1E,OAAO,GAAE,wBAA6B,GACvC,OAAO,CAAC,uBAAuB,CAAC,CA+gBlC"}
@@ -139,15 +139,21 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
139
139
  // the content already read above: transformFileSync would read the file a second time
140
140
  const result = tallied(tallyName, () => babelTransformSync(sourceContent, {
141
141
  ...babelConfig,
142
- filename: file
142
+ filename: file,
143
+ ...(appConfig.sourceMaps === true ? {
144
+ sourceMaps: true
145
+ } : {})
143
146
  }));
144
147
  if (result === null) throw new TungstenError(`Err: babel transform on file ${file} returned null`);
145
148
  const {
146
- code
149
+ code,
150
+ map
147
151
  } = result;
148
152
  if (code === null || code === undefined) {
149
153
  throw new TungstenError(`Err: code from babel transform on file ${file} was null or undefined: ${typeof code}`);
150
154
  }
155
+ // attached here, not by babel's 'inline', so the export-wipe guard below sees bare code
156
+ const output = map === null || map === undefined ? code : `${code}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${Buffer.from(JSON.stringify(map)).toString('base64')}\n`;
151
157
  // tsc's incremental watch can, for one transient pass right after a save, emit
152
158
  // `export {};` for a file that previously had real exports - its own convention
153
159
  // for "this module has nothing to export", produced here as a self-correcting
@@ -159,7 +165,7 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
159
165
  // remove every export), accept the quarantined content once the grace period lapses
160
166
  // instead of hiding it forever. The client tree's guard only - the raw tree is not served.
161
167
  if (guardExportWipe && code.trim() === 'export {};' && fs.existsSync(dest)) {
162
- const previousCode = fs.readFileSync(dest, 'utf8');
168
+ const previousCode = fs.readFileSync(dest, 'utf8').replace(/\/\/# sourceMappingURL=data:\S*\s*$/, '');
163
169
  if (previousCode.trim() !== 'export {};' && previousCode.trim() !== '') {
164
170
  if (!pendingExportWipes.has(file)) {
165
171
  const timer = setTimeout(() => {
@@ -167,14 +173,14 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
167
173
  }, exportWipeGraceMs);
168
174
  pendingExportWipes.set(file, {
169
175
  dest,
170
- code,
176
+ code: output,
171
177
  timer
172
178
  });
173
179
  } else {
174
180
  // keep the original timer (grace period counts from the first sighting),
175
181
  // just refresh the content that'll be written if it elapses
176
182
  const pending = pendingExportWipes.get(file);
177
- if (pending !== undefined) pending.code = code;
183
+ if (pending !== undefined) pending.code = output;
178
184
  }
179
185
  return;
180
186
  }
@@ -194,7 +200,7 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
194
200
  fs.mkdirSync(dirname(dest), {
195
201
  recursive: true
196
202
  });
197
- fs.writeFileSync(dest, code);
203
+ fs.writeFileSync(dest, output);
198
204
  }
199
205
  async function deleteTransformedFile(file) {
200
206
  const pendingWipe = pendingExportWipes.get(file);
@@ -32,6 +32,7 @@ export declare const frameworkConfigValidator: v.VariantSchema<"useRootComponent
32
32
  readonly testDirs: v.ExactOptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>], undefined>, undefined>;
33
33
  readonly testPatterns: v.ExactOptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>], undefined>, undefined>;
34
34
  readonly skipPackageCompilation: v.ExactOptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>], undefined>, undefined>;
35
+ readonly sourceMaps: v.ExactOptionalSchema<v.BooleanSchema<undefined>, undefined>;
35
36
  readonly build: v.ExactOptionalSchema<v.ObjectSchema<{
36
37
  readonly targets: v.ExactOptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>], undefined>, undefined>;
37
38
  }, undefined>, undefined>;
@@ -72,6 +73,7 @@ export declare const frameworkConfigValidator: v.VariantSchema<"useRootComponent
72
73
  readonly testDirs: v.ExactOptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>], undefined>, undefined>;
73
74
  readonly testPatterns: v.ExactOptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>], undefined>, undefined>;
74
75
  readonly skipPackageCompilation: v.ExactOptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>], undefined>, undefined>;
76
+ readonly sourceMaps: v.ExactOptionalSchema<v.BooleanSchema<undefined>, undefined>;
75
77
  readonly build: v.ExactOptionalSchema<v.ObjectSchema<{
76
78
  readonly targets: v.ExactOptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>], undefined>, undefined>;
77
79
  }, undefined>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"frameworkConfigSchema.d.ts","sourceRoot":"","sources":["../src/frameworkConfigSchema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAGxE,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAKxD,MAAM,WAAW,YAAa,SAAQ,kBAAkB;CAAG;AA6E3D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAGnC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAO5E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAG3D"}
1
+ {"version":3,"file":"frameworkConfigSchema.d.ts","sourceRoot":"","sources":["../src/frameworkConfigSchema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAGxE,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAKxD,MAAM,WAAW,YAAa,SAAQ,kBAAkB;CAAG;AA8E3D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAGnC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAO5E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAG3D"}
@@ -40,6 +40,7 @@ const frameworkConfigBaseEntries = {
40
40
  testDirs: v.exactOptional(stringOrStrings),
41
41
  testPatterns: v.exactOptional(stringOrStrings),
42
42
  skipPackageCompilation: v.exactOptional(stringOrStrings),
43
+ sourceMaps: v.exactOptional(v.boolean()),
43
44
  build: v.exactOptional(v.object({
44
45
  // browserslist query the production bundle is lowered to; unset = the framework default
45
46
  targets: v.exactOptional(stringOrStrings)
@@ -1,4 +1,3 @@
1
- import type { Routes } from './Routes.js';
2
1
  import type { RouteDataFunction } from './RouteDataFunction.type.js';
3
2
  import type { ContentNode } from '../ContentNode.js';
4
3
  import type { RouteContentFunction } from './RouteContentFunction.js';
@@ -13,7 +12,6 @@ export type Route = Endpoint<object, unknown> & {
13
12
  export type Path = `/${string}`;
14
13
  export type SpecialRoute = 'default' | '404' | 'error';
15
14
  export type RouteKey = Path | SpecialRoute;
16
- export declare function StringIsValidRouteKey(string: string, routes: Routes): string is RouteKey;
17
15
  export declare function StringIsPath(string: string): string is Path;
18
16
  export declare function RouteKeyIsPath(path: RouteKey): path is Path;
19
17
  //# sourceMappingURL=RouteTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RouteTypes.d.ts","sourceRoot":"","sources":["../../src/routing/RouteTypes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAGrE,MAAM,MAAM,QAAQ,CAAC,MAAM,SAAS,MAAM,EAAE,QAAQ,IAAI;IACpD,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC1C,OAAO,EAAE,WAAW,GAAG,oBAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,CA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,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE1E,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;KAC3C,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC5C,CAAA;AAED,MAAM,MAAM,IAAI,GAAG,IAAI,MAAM,EAAE,CAAA;AAC/B,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,KAAK,GAAG,OAAO,CAAA;AACtD,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,YAAY,CAAA;AAE1C,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,IAAI,CAE3D;AACD,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,IAAI,IAAI,CAE3D"}
@@ -1,6 +1,3 @@
1
- export function StringIsValidRouteKey(string, routes) {
2
- return string in routes;
3
- }
4
1
  export function StringIsPath(string) {
5
2
  return string.startsWith('/');
6
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tungsten",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "bin": {
@@ -87,7 +87,7 @@
87
87
  "chai": "^4.5.0",
88
88
  "cross-env": "^7.0.3",
89
89
  "eslint": "^10.10.0",
90
- "eslint-plugin-imports-regulation": "^0.2.9",
90
+ "eslint-plugin-imports-regulation": "^0.2.11",
91
91
  "eslint-plugin-start-end-lines": "^0.1.0",
92
92
  "eslint-plugin-unused-imports": "^4.4.1",
93
93
  "happy-dom": "^20.11.1",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "lockfile": {
3
- "size": 239822,
4
- "mtimeMs": 1789498752272.2297
3
+ "size": 239826,
4
+ "mtimeMs": 1789513233215.041
5
5
  },
6
6
  "specifiers": {
7
7
  "@babel/core": "babel-core",