@nexus_js/server 0.9.29 → 0.9.30

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 (80) hide show
  1. package/dist/actions.d.ts +71 -11
  2. package/dist/actions.d.ts.map +1 -1
  3. package/dist/actions.js +442 -51
  4. package/dist/actions.js.map +1 -1
  5. package/dist/build-id.d.ts +14 -0
  6. package/dist/build-id.d.ts.map +1 -0
  7. package/dist/build-id.js +40 -0
  8. package/dist/build-id.js.map +1 -0
  9. package/dist/context.d.ts +38 -4
  10. package/dist/context.d.ts.map +1 -1
  11. package/dist/context.js +13 -3
  12. package/dist/context.js.map +1 -1
  13. package/dist/csrf.d.ts +16 -2
  14. package/dist/csrf.d.ts.map +1 -1
  15. package/dist/csrf.js +68 -30
  16. package/dist/csrf.js.map +1 -1
  17. package/dist/dev-assets.d.ts +31 -0
  18. package/dist/dev-assets.d.ts.map +1 -1
  19. package/dist/dev-assets.js +372 -38
  20. package/dist/dev-assets.js.map +1 -1
  21. package/dist/dev-assets.test.d.ts +2 -0
  22. package/dist/dev-assets.test.d.ts.map +1 -0
  23. package/dist/dev-error-html.d.ts.map +1 -1
  24. package/dist/dev-error-html.js +24 -0
  25. package/dist/dev-error-html.js.map +1 -1
  26. package/dist/devradar.d.ts +1 -1
  27. package/dist/devradar.d.ts.map +1 -1
  28. package/dist/devradar.js.map +1 -1
  29. package/dist/head-renderer.test.d.ts +2 -0
  30. package/dist/head-renderer.test.d.ts.map +1 -0
  31. package/dist/head-renderer.test.js +78 -0
  32. package/dist/head-renderer.test.js.map +1 -0
  33. package/dist/index.d.ts +97 -2
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +442 -47
  36. package/dist/index.js.map +1 -1
  37. package/dist/legacy-wrapper.d.ts +88 -0
  38. package/dist/legacy-wrapper.d.ts.map +1 -0
  39. package/dist/legacy-wrapper.js +104 -0
  40. package/dist/legacy-wrapper.js.map +1 -0
  41. package/dist/lib-assets.d.ts +5 -0
  42. package/dist/lib-assets.d.ts.map +1 -0
  43. package/dist/lib-assets.js +95 -0
  44. package/dist/lib-assets.js.map +1 -0
  45. package/dist/load-module.d.ts +6 -0
  46. package/dist/load-module.d.ts.map +1 -1
  47. package/dist/load-module.js +40 -53
  48. package/dist/load-module.js.map +1 -1
  49. package/dist/metadata.d.ts +95 -0
  50. package/dist/metadata.d.ts.map +1 -0
  51. package/dist/metadata.js +132 -0
  52. package/dist/metadata.js.map +1 -0
  53. package/dist/navigate.d.ts +0 -5
  54. package/dist/navigate.d.ts.map +1 -1
  55. package/dist/navigate.js +0 -1
  56. package/dist/navigate.js.map +1 -1
  57. package/dist/rate-limit.d.ts.map +1 -1
  58. package/dist/rate-limit.js +27 -14
  59. package/dist/rate-limit.js.map +1 -1
  60. package/dist/renderer.d.ts +27 -7
  61. package/dist/renderer.d.ts.map +1 -1
  62. package/dist/renderer.js +152 -25
  63. package/dist/renderer.js.map +1 -1
  64. package/dist/renderer.test.d.ts +2 -0
  65. package/dist/renderer.test.d.ts.map +1 -0
  66. package/dist/renderer.test.js +251 -0
  67. package/dist/renderer.test.js.map +1 -0
  68. package/dist/streaming.d.ts +3 -3
  69. package/dist/streaming.d.ts.map +1 -1
  70. package/dist/streaming.js +33 -13
  71. package/dist/streaming.js.map +1 -1
  72. package/dist/tenancy.d.ts +17 -0
  73. package/dist/tenancy.d.ts.map +1 -0
  74. package/dist/tenancy.js +132 -0
  75. package/dist/tenancy.js.map +1 -0
  76. package/dist/tenancy.test.d.ts +2 -0
  77. package/dist/tenancy.test.d.ts.map +1 -0
  78. package/dist/tenancy.test.js +38 -0
  79. package/dist/tenancy.test.js.map +1 -0
  80. package/package.json +26 -8
@@ -0,0 +1,78 @@
1
+ import { describe, it, expect, beforeEach } from 'vitest';
2
+ import { defineHead, flushHead, renderHeadToString } from '@nexus_js/head';
3
+ // Minimal mock context with head stack
4
+ function makeCtx() {
5
+ return {
6
+ request: new Request('http://example.com/'),
7
+ params: {},
8
+ url: new URL('http://example.com/'),
9
+ headers: new Headers(),
10
+ locals: {},
11
+ secrets: new Map(),
12
+ cspNonce: '',
13
+ setHeader: () => { },
14
+ setCookie: () => { },
15
+ getCookie: () => undefined,
16
+ redirect: (() => { throw new Error('redirect'); }),
17
+ notFound: (() => { throw new Error('notfound'); }),
18
+ __nexusHeadStack: [],
19
+ };
20
+ }
21
+ describe('SEO/Metadata head integration (renderer path)', () => {
22
+ beforeEach(() => {
23
+ // ensure clean global (though we prefer ctx)
24
+ flushHead();
25
+ });
26
+ it('defineHead with ctx stores per-request (isolated)', () => {
27
+ const ctx1 = makeCtx();
28
+ const ctx2 = makeCtx();
29
+ defineHead({ title: 'Page One' }, ctx1);
30
+ defineHead({ title: 'Page Two' }, ctx2);
31
+ const flushed1 = flushHead(ctx1);
32
+ const flushed2 = flushHead(ctx2);
33
+ expect(flushed1).toHaveLength(1);
34
+ expect(flushed1[0].title).toBe('Page One');
35
+ expect(flushed2).toHaveLength(1);
36
+ expect(flushed2[0].title).toBe('Page Two');
37
+ });
38
+ it('flushHead clears the stack for that ctx', () => {
39
+ const ctx = makeCtx();
40
+ defineHead({ title: 'Once' }, ctx);
41
+ const first = flushHead(ctx);
42
+ const second = flushHead(ctx);
43
+ expect(first).toHaveLength(1);
44
+ expect(second).toHaveLength(0);
45
+ });
46
+ it('renderHeadToString produces safe <title> and og tags with escaping', () => {
47
+ const metas = [
48
+ { title: 'Hello <World>', description: 'A "test" & more' },
49
+ { og: { image: 'https://ex.com/img.png?x=1&y=2' } },
50
+ ];
51
+ const html = renderHeadToString(metas);
52
+ expect(html).toContain('Hello &lt;World>'); // < escaped to &lt;, > left as-is (perfectly valid)
53
+ expect(html).toContain('og:title');
54
+ expect(html).toContain('og:image');
55
+ expect(html).not.toContain('<World>'); // XSS prevented
56
+ expect(html).toContain('&amp;'); // description escaped
57
+ });
58
+ it('head from load() result shape is what the renderer expects (smoke)', () => {
59
+ // Simulates what mergeRoutePretext does
60
+ const ctx = makeCtx();
61
+ const loadResult = {
62
+ title: 'from pretext',
63
+ head: { title: 'From load head', description: 'SEO rocks' },
64
+ };
65
+ // The actual interception code (copied logic for test)
66
+ if (loadResult && typeof loadResult === 'object' && 'head' in loadResult) {
67
+ const h = loadResult.head;
68
+ if (h)
69
+ defineHead(h, ctx);
70
+ delete loadResult.head;
71
+ }
72
+ expect('head' in loadResult).toBe(false); // removed before pretext merge
73
+ const flushed = flushHead(ctx);
74
+ expect(flushed[0]?.title).toBe('From load head');
75
+ expect(flushed[0]?.description).toBe('SEO rocks');
76
+ });
77
+ });
78
+ //# sourceMappingURL=head-renderer.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"head-renderer.test.js","sourceRoot":"","sources":["../src/head-renderer.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAG3E,uCAAuC;AACvC,SAAS,OAAO;IACd,OAAO;QACL,OAAO,EAAE,IAAI,OAAO,CAAC,qBAAqB,CAAC;QAC3C,MAAM,EAAE,EAAE;QACV,GAAG,EAAE,IAAI,GAAG,CAAC,qBAAqB,CAAC;QACnC,OAAO,EAAE,IAAI,OAAO,EAAE;QACtB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,IAAI,GAAG,EAAE;QAClB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;QACnB,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;QACnB,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS;QAC1B,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAQ;QACzD,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,MAAM,IAAI,KAAK,CAAC,UAA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,CAAC;gBAAE,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YAC1B,OAAQ,UAAkB,CAAC,IAAI,CAAC;QAClC,CAAC;QAED,MAAM,CAAC,MAAM,IAAI,UAAU,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,+BAA+B;QACzE,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;QAC/B,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -2,15 +2,25 @@
2
2
  * Nexus Server — Node.js HTTP server adapter.
3
3
  * Handles SSR, static assets, Server Actions and dev HMR.
4
4
  */
5
+ import { type TenancyConfig } from './tenancy.js';
5
6
  export { STUDIO_DEFAULT_PORT } from './constants.js';
6
- export { createAction, registerAction, ActionError, getRegisteredActionNames } from './actions.js';
7
+ export { createAction, registerAction, ActionError, getRegisteredActionNames, isInternalUrl, isSafeUrl, } from './actions.js';
8
+ export { loadAndCacheNexusBuildId, getExpectedNexusBuildId } from './build-id.js';
7
9
  export { createContext } from './context.js';
8
10
  export { nexusVault } from '@nexus_js/security';
9
- export type { NexusContext, CookieOptions } from './context.js';
11
+ export { resolveTenant } from './tenancy.js';
12
+ export type { NexusContext, NexusLocals, CookieOptions } from './context.js';
13
+ export type { TenancyConfig, TenantResolution } from './tenancy.js';
10
14
  export type { RenderResult, RenderOptions } from './renderer.js';
11
15
  export { mergeRoutePretext } from './renderer.js';
16
+ export { defineMetadata, escapeHtml } from './metadata.js';
17
+ export type { MetadataInput, MetadataResult } from './metadata.js';
18
+ export { defineHead, useHead, flushHead, renderHeadToString } from '@nexus_js/head';
19
+ export type { HeadMeta, HeadContext } from '@nexus_js/head';
12
20
  export { registerDevRadarSink, emitDevRadar, sanitizeTelemetryValue, newTraceId } from './devradar.js';
13
21
  export type { DevRadarEvent, ActionCallPayload, ActionResultPayload, ActionErrorPayload, PretextProfilePayload, SecurityAuditPayload, SecurityReportPayload, SecurityReportCheck, RuneTelemetryPayload, } from './devradar.js';
22
+ export { wrapExpressMiddleware, wrapExpressHandler } from './legacy-wrapper.js';
23
+ export type { ExpressMiddleware } from './legacy-wrapper.js';
14
24
  export interface RequestLogInfo {
15
25
  method: string;
16
26
  path: string;
@@ -22,6 +32,32 @@ export interface RequestLogInfo {
22
32
  /** True when the route was served from a Server Action */
23
33
  isAction?: boolean;
24
34
  }
35
+ /**
36
+ * Custom route mount — handler is called before static files and SSR.
37
+ * Compatible with `@nexus_js/graphql` createGraphQLHandler() and any other
38
+ * Web-standard (Request → Response) handler.
39
+ *
40
+ * @example
41
+ * import { createGraphQLHandler } from '@nexus_js/graphql';
42
+ * mounts: [{ path: '/graphql', handler: createGraphQLHandler({ schema }) }]
43
+ */
44
+ export interface NexusMountDef {
45
+ /**
46
+ * URL path prefix to match. The handler is invoked when
47
+ * `request.url.pathname === path` or starts with `path + '/'`.
48
+ */
49
+ path: string;
50
+ /**
51
+ * HTTP methods to handle. Default: all methods including OPTIONS
52
+ * (needed for GraphQL CORS preflight).
53
+ */
54
+ methods?: string[];
55
+ /**
56
+ * Web-standard handler.
57
+ * `nexusCtx` gives access to `secrets`, `locals`, `getCookie`, etc.
58
+ */
59
+ handler: (request: Request, nexusCtx: import('./context.js').NexusContext) => Promise<Response>;
60
+ }
25
61
  export interface NexusServerOptions {
26
62
  /** Root directory of the Nexus app */
27
63
  root: string;
@@ -31,19 +67,70 @@ export interface NexusServerOptions {
31
67
  dev?: boolean;
32
68
  /** Static assets directory */
33
69
  publicDir?: string;
70
+ /** Custom global CSS entry path relative to app root (overrides auto-discovery) */
71
+ cssEntry?: string;
34
72
  /**
35
73
  * Called after each HTTP request completes.
36
74
  * Use this to implement a custom request logger in the CLI or integrations.
37
75
  * The server itself does NOT print request logs — the host controls formatting.
38
76
  */
39
77
  onRequest?: (info: RequestLogInfo) => void;
78
+ /**
79
+ * Custom route handlers mounted before static files and SSR.
80
+ * Evaluated in order; the first matching mount wins.
81
+ * Use for GraphQL endpoints, webhooks, or any non-Nexus HTTP handler.
82
+ */
83
+ mounts?: NexusMountDef[];
84
+ /**
85
+ * HTTP proxy fallback for legacy backend integration.
86
+ * If a request doesn't match any Nexus route, mount, or static file,
87
+ * forward it to this URL instead of returning 404.
88
+ *
89
+ * Use this for gradual migration: Nexus sits in front of your old backend,
90
+ * handling new routes while forwarding unknown paths to the legacy system.
91
+ *
92
+ * @example { fallbackProxy: 'http://localhost:8080' }
93
+ */
94
+ fallbackProxy?: string;
40
95
  /**
41
96
  * From `nexus.config.ts` `security` — when `hardened: true`, HTML and API responses get baseline security headers.
42
97
  * `shieldLite`: unknown server action names return 403 (manifest + registry allowlist) instead of 404.
98
+ * `csp`: extend the generated Content-Security-Policy with additional allowed sources per directive.
43
99
  */
44
100
  security?: {
45
101
  hardened?: boolean;
46
102
  shieldLite?: boolean;
103
+ csp?: {
104
+ /**
105
+ * Extra origins for `style-src` — e.g. `['https://fonts.googleapis.com']` for Google Fonts.
106
+ * Nexus always includes `'self' 'unsafe-inline'`; these are appended after.
107
+ */
108
+ additionalStyleSrc?: string[];
109
+ /**
110
+ * Extra origins for `font-src` — e.g. `['https://fonts.gstatic.com']` for Google Fonts files.
111
+ * Nexus always includes `'self'`; these are appended after.
112
+ */
113
+ additionalFontSrc?: string[];
114
+ /**
115
+ * Extra origins for `script-src` — e.g. `['https://cdn.example.com']` for external scripts.
116
+ */
117
+ additionalScriptSrc?: string[];
118
+ /**
119
+ * Extra origins for `connect-src` — e.g. `['https://api.example.com']` for fetch/XHR/WS.
120
+ * Nexus always includes `'self'`; these are appended after.
121
+ */
122
+ additionalConnectSrc?: string[];
123
+ /**
124
+ * Extra origins for `img-src` — e.g. `['https://cdn.example.com']` for external images.
125
+ * Nexus always includes `'self' data: blob:`; these are appended after.
126
+ */
127
+ additionalImgSrc?: string[];
128
+ /**
129
+ * Extra sources for `frame-src` (after baseline `'self' blob:`).
130
+ * Use for embeds, e.g. `['https://www.youtube-nocookie.com']`.
131
+ */
132
+ additionalFrameSrc?: string[];
133
+ };
47
134
  };
48
135
  /**
49
136
  * Flush the HTML shell (head + skeleton) before `nxPretext` resolves — improves TTFB when Pretext is slow.
@@ -52,6 +139,14 @@ export interface NexusServerOptions {
52
139
  streamingPretext?: boolean;
53
140
  /** Merged into document import map for island `import()` resolution (from `nexus.config` `browser.importMap`). */
54
141
  browserImportMap?: Record<string, string>;
142
+ /** Nexus Connect (SSE) endpoint configuration. */
143
+ connect?: {
144
+ /** Which browser origins may subscribe to `/_nexus/connect/*`. Default: `'self'` in production, `'*'` in dev. */
145
+ corsOrigins?: 'self' | '*' | string[];
146
+ };
147
+ tenancy?: TenancyConfig & {
148
+ vaultIsolation?: 'strict' | 'fallback';
149
+ };
55
150
  }
56
151
  export declare function createNexusServer(opts: NexusServerOptions): Promise<{
57
152
  /** Starts listening. Resolves when the server is bound to the port. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmCH,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;A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