@nexus_js/server 0.9.26 → 0.9.27
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus_js/server",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.27",
|
|
4
4
|
"description": "Nexus Node HTTP server — SSR, server actions, islands & assets (middleware lives in @nexus_js/middleware for edge runtimes)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/dist/dev-assets.test.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { compileExternalIslandBundle } from './dev-assets.js';
|
|
3
|
-
describe('compileExternalIslandBundle', () => {
|
|
4
|
-
it('returns a micro-bundle importing the $lib file', async () => {
|
|
5
|
-
const url = new URL('http://localhost/_nexus/external-island?path=src%2Flib%2Fislands%2Fhello.ts');
|
|
6
|
-
const result = await compileExternalIslandBundle('/Users/bierhffor/nexus/examples/with-islands', url);
|
|
7
|
-
expect(result.status).toBe(200);
|
|
8
|
-
expect(result.body).toContain('import init from "/_nexus/lib/islands/hello.js"');
|
|
9
|
-
expect(result.body).toContain('export function mount(el, props)');
|
|
10
|
-
});
|
|
11
|
-
it('returns 404 for missing source', async () => {
|
|
12
|
-
const url = new URL('http://localhost/_nexus/external-island?path=src%2Flib%2Fmissing.ts');
|
|
13
|
-
const result = await compileExternalIslandBundle('/Users/bierhffor/nexus/examples/with-islands', url);
|
|
14
|
-
expect(result.status).toBe(404);
|
|
15
|
-
expect(result.body).toContain('External island source not found');
|
|
16
|
-
});
|
|
17
|
-
it('returns 400 for invalid path traversal', async () => {
|
|
18
|
-
const url = new URL('http://localhost/_nexus/external-island?path=..%2Fsecret.ts');
|
|
19
|
-
const result = await compileExternalIslandBundle('/Users/bierhffor/nexus/examples/with-islands', url);
|
|
20
|
-
expect(result.status).toBe(400);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=dev-assets.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dev-assets.test.js","sourceRoot":"","sources":["../src/dev-assets.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QAC9D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,6EAA6E,CAAC,CAAC;QACnG,MAAM,MAAM,GAAG,MAAM,2BAA2B,CAAC,8CAA8C,EAAE,GAAG,CAAC,CAAC;QACtG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,iDAAiD,CAAC,CAAC;QACjF,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,kCAAkC,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;QAC9C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,qEAAqE,CAAC,CAAC;QAC3F,MAAM,MAAM,GAAG,MAAM,2BAA2B,CAAC,8CAA8C,EAAE,GAAG,CAAC,CAAC;QACtG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,kCAAkC,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EA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