@fragno-dev/node 0.0.7 → 0.0.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.
- package/.turbo/turbo-build.log +7 -4
- package/CHANGELOG.md +6 -0
- package/LICENSE.md +16 -0
- package/fragno-node-express.test.ts +12 -9
- package/fragno-node-http.test.ts +13 -10
- package/node-stream.test.ts +12 -9
- package/package.json +22 -19
- package/.turbo/turbo-test.log +0 -17
- package/.turbo/turbo-types$colon$check.log +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
|
|
2
|
+
> @fragno-dev/node@0.0.8 build /home/runner/work/fragno/fragno/packages/fragno-node
|
|
3
|
+
> tsdown
|
|
4
|
+
|
|
5
|
+
[34mℹ[39m tsdown [2mv0.15.12[22m powered by rolldown [2mv1.0.0-beta.45[22m
|
|
3
6
|
[34mℹ[39m Using tsdown config: [4m/home/runner/work/fragno/fragno/packages/fragno-node/tsdown.config.ts[24m
|
|
4
7
|
[34mℹ[39m entry: [34mfragno-node.ts[39m
|
|
5
|
-
[34mℹ[39m target: [
|
|
8
|
+
[34mℹ[39m target: [34mnode22.0.0[39m
|
|
6
9
|
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
7
10
|
[34mℹ[39m Build start
|
|
8
11
|
[34mℹ[39m [2mdist/[22m[1mfragno-node.js[22m [2m1.37 kB[22m [2m│ gzip: 0.50 kB[22m
|
|
@@ -10,4 +13,4 @@ $ tsdown
|
|
|
10
13
|
[34mℹ[39m [2mdist/[22mfragno-node.d.ts.map [2m0.20 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
11
14
|
[34mℹ[39m [2mdist/[22m[32m[1mfragno-node.d.ts[22m[39m [2m1.40 kB[22m [2m│ gzip: 0.50 kB[22m
|
|
12
15
|
[34mℹ[39m 4 files, total: 4.64 kB
|
|
13
|
-
[32m✔[39m Build complete in [
|
|
16
|
+
[32m✔[39m Build complete in [32m5597ms[39m
|
package/CHANGELOG.md
CHANGED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Copyright 2025 - present "ReJot Nederland B.V.", and individual contributors.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
4
|
+
associated documentation files (the “Software”), to deal in the Software without restriction,
|
|
5
|
+
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
6
|
+
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
|
7
|
+
furnished to do so, subject to the following conditions:
|
|
8
|
+
|
|
9
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
10
|
+
portions of the Software.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
|
13
|
+
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
14
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
|
|
15
|
+
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
16
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import express, { type Application } from "express";
|
|
2
2
|
import { test, expect, describe, beforeAll, afterAll } from "vitest";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
defineRoute,
|
|
7
|
-
createFragment,
|
|
8
|
-
type FragnoInstantiatedFragment,
|
|
9
|
-
type FragnoPublicClientConfig,
|
|
10
|
-
} from "@fragno-dev/core";
|
|
4
|
+
import { defineFragment, defineRoute, instantiate } from "@fragno-dev/core";
|
|
5
|
+
import { type FragnoPublicClientConfig } from "@fragno-dev/core/client";
|
|
11
6
|
import { toNodeHandler } from "./fragno-node";
|
|
12
7
|
|
|
13
8
|
describe("Fragno Express integration", () => {
|
|
@@ -23,13 +18,21 @@ describe("Fragno Express integration", () => {
|
|
|
23
18
|
const clientConfig: FragnoPublicClientConfig = {
|
|
24
19
|
baseUrl: "http://localhost",
|
|
25
20
|
};
|
|
26
|
-
|
|
21
|
+
|
|
22
|
+
function instantiateTestFragment() {
|
|
23
|
+
return instantiate(testFragmentDefinition)
|
|
24
|
+
.withRoutes([usersRoute])
|
|
25
|
+
.withOptions(clientConfig)
|
|
26
|
+
.build();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let testFragment: ReturnType<typeof instantiateTestFragment>;
|
|
27
30
|
let app: Application;
|
|
28
31
|
let server: ReturnType<typeof app.listen>;
|
|
29
32
|
let port: number;
|
|
30
33
|
|
|
31
34
|
function createExpressServerForTest() {
|
|
32
|
-
testFragment =
|
|
35
|
+
testFragment = instantiateTestFragment();
|
|
33
36
|
app = express();
|
|
34
37
|
|
|
35
38
|
app.all("/api/test-fragment/{*any}", toNodeHandler(testFragment.handler));
|
package/fragno-node-http.test.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { createServer, type RequestListener, type Server } from "node:http";
|
|
2
2
|
import { test, expect, describe } from "vitest";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
defineRoute,
|
|
7
|
-
createFragment,
|
|
8
|
-
type FragnoInstantiatedFragment,
|
|
9
|
-
type FragnoPublicClientConfig,
|
|
10
|
-
} from "@fragno-dev/core";
|
|
4
|
+
import { defineFragment, defineRoute, instantiate } from "@fragno-dev/core";
|
|
5
|
+
import { type FragnoPublicClientConfig } from "@fragno-dev/core/client";
|
|
11
6
|
import { toNodeHandler } from "./fragno-node";
|
|
12
7
|
|
|
13
8
|
describe("Fragno Node.js integration", () => {
|
|
@@ -23,14 +18,22 @@ describe("Fragno Node.js integration", () => {
|
|
|
23
18
|
const clientConfig: FragnoPublicClientConfig = {
|
|
24
19
|
baseUrl: "http://localhost",
|
|
25
20
|
};
|
|
26
|
-
|
|
21
|
+
|
|
22
|
+
function instantiateTestFragment() {
|
|
23
|
+
return instantiate(testFragmentDefinition)
|
|
24
|
+
.withRoutes([usersRoute])
|
|
25
|
+
.withOptions(clientConfig)
|
|
26
|
+
.build();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let testFragment: ReturnType<typeof instantiateTestFragment>;
|
|
27
30
|
let server: Server;
|
|
28
31
|
let port: number;
|
|
29
32
|
|
|
30
33
|
function createServerForTest(
|
|
31
|
-
listenerFactory: (fragment:
|
|
34
|
+
listenerFactory: (fragment: ReturnType<typeof instantiateTestFragment>) => RequestListener,
|
|
32
35
|
) {
|
|
33
|
-
testFragment =
|
|
36
|
+
testFragment = instantiateTestFragment();
|
|
34
37
|
server = createServer(listenerFactory(testFragment));
|
|
35
38
|
server.listen(0);
|
|
36
39
|
|
package/node-stream.test.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import express, { type Application } from "express";
|
|
2
2
|
import { test, expect, describe, beforeAll, afterAll, assert } from "vitest";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
defineRoute,
|
|
7
|
-
createFragment,
|
|
8
|
-
type FragnoInstantiatedFragment,
|
|
9
|
-
type FragnoPublicClientConfig,
|
|
10
|
-
} from "@fragno-dev/core";
|
|
4
|
+
import { defineFragment, defineRoute, instantiate } from "@fragno-dev/core";
|
|
5
|
+
import { type FragnoPublicClientConfig } from "@fragno-dev/core/client";
|
|
11
6
|
import { toNodeHandler } from "./fragno-node";
|
|
12
7
|
|
|
13
8
|
describe("Node.js Streaming", () => {
|
|
@@ -29,13 +24,21 @@ describe("Node.js Streaming", () => {
|
|
|
29
24
|
const clientConfig: FragnoPublicClientConfig = {
|
|
30
25
|
baseUrl: "http://localhost",
|
|
31
26
|
};
|
|
32
|
-
|
|
27
|
+
|
|
28
|
+
function instantiateTestFragment() {
|
|
29
|
+
return instantiate(testFragmentDefinition)
|
|
30
|
+
.withRoutes([streamRoute])
|
|
31
|
+
.withOptions(clientConfig)
|
|
32
|
+
.build();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
let testFragment: ReturnType<typeof instantiateTestFragment>;
|
|
33
36
|
let app: Application;
|
|
34
37
|
let server: ReturnType<typeof app.listen>;
|
|
35
38
|
let port: number;
|
|
36
39
|
|
|
37
40
|
function createExpressServerForTest() {
|
|
38
|
-
testFragment =
|
|
41
|
+
testFragment = instantiateTestFragment();
|
|
39
42
|
app = express();
|
|
40
43
|
|
|
41
44
|
app.all("/api/test-fragment/{*any}", toNodeHandler(testFragment.handler));
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fragno-dev/node",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
|
-
"bun": "./fragno-node.ts",
|
|
7
6
|
"development": "./fragno-node.ts",
|
|
8
7
|
"types": "./dist/fragno-node.d.ts",
|
|
9
8
|
"default": "./dist/fragno-node.js"
|
|
@@ -11,34 +10,38 @@
|
|
|
11
10
|
"./package.json": "./package.json"
|
|
12
11
|
},
|
|
13
12
|
"type": "module",
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "tsdown",
|
|
16
|
-
"build:watch": "tsdown --watch",
|
|
17
|
-
"types:check": "tsc --noEmit",
|
|
18
|
-
"test": "vitest run",
|
|
19
|
-
"test:watch": "vitest --watch"
|
|
20
|
-
},
|
|
21
|
-
"peerDependencies": {
|
|
22
|
-
"@fragno-dev/core": "0.0.7"
|
|
23
|
-
},
|
|
24
13
|
"engines": {
|
|
25
|
-
"node": "
|
|
14
|
+
"node": ">=22"
|
|
26
15
|
},
|
|
27
16
|
"devDependencies": {
|
|
28
|
-
"@fragno-dev/core": "0.0.7",
|
|
29
|
-
"@fragno-private/typescript-config": "0.0.1",
|
|
30
|
-
"@fragno-private/vitest-config": "0.0.0",
|
|
31
17
|
"@types/node": "^22",
|
|
32
18
|
"@types/express": "^5.0.3",
|
|
33
19
|
"@vitest/coverage-istanbul": "^3.2.4",
|
|
34
20
|
"express": "^5.1.0",
|
|
35
21
|
"vitest": "^3.2.4",
|
|
36
|
-
"zod": "^4.0.5"
|
|
22
|
+
"zod": "^4.0.5",
|
|
23
|
+
"@fragno-dev/core": "0.1.9",
|
|
24
|
+
"@fragno-private/typescript-config": "0.0.1",
|
|
25
|
+
"@fragno-private/vitest-config": "0.0.0"
|
|
37
26
|
},
|
|
38
27
|
"dependencies": {
|
|
39
28
|
"@remix-run/node-fetch-server": "^0.8.0"
|
|
40
29
|
},
|
|
41
30
|
"main": "./dist/fragno-node.js",
|
|
42
31
|
"module": "./dist/fragno-node.js",
|
|
43
|
-
"types": "./dist/fragno-node.d.ts"
|
|
44
|
-
|
|
32
|
+
"types": "./dist/fragno-node.d.ts",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/rejot-dev/fragno.git",
|
|
36
|
+
"directory": "packages/fragno-node"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://fragno.dev",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsdown",
|
|
42
|
+
"build:watch": "tsdown --watch",
|
|
43
|
+
"types:check": "tsc --noEmit",
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"test:watch": "vitest --watch"
|
|
46
|
+
}
|
|
47
|
+
}
|
package/.turbo/turbo-test.log
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
$ vitest run
|
|
2
|
-
|
|
3
|
-
[1m[46m RUN [49m[22m [36mv3.2.4 [39m[90m/home/runner/work/fragno/fragno/packages/fragno-node[39m
|
|
4
|
-
[2mCoverage enabled with [22m[33mistanbul[39m
|
|
5
|
-
|
|
6
|
-
[32m✓[39m node-stream.test.ts [2m([22m[2m1 test[22m[2m)[22m[33m 458[2mms[22m[39m
|
|
7
|
-
[33m[2m✓[22m[39m Node.js Streaming[2m > [22mshould fetch data from the GET /stream route [33m 407[2mms[22m[39m
|
|
8
|
-
[32m✓[39m fragno-node-express.test.ts [2m([22m[2m2 tests[22m[2m)[22m[33m 477[2mms[22m[39m
|
|
9
|
-
[33m[2m✓[22m[39m Fragno Express integration[2m > [22mshould fetch data from the GET /users route [33m 401[2mms[22m[39m
|
|
10
|
-
[32m✓[39m fragno-node-http.test.ts [2m([22m[2m2 tests[22m[2m)[22m[33m 491[2mms[22m[39m
|
|
11
|
-
[33m[2m✓[22m[39m Fragno Node.js integration[2m > [22mshould fetch data from the GET /users route [33m 433[2mms[22m[39m
|
|
12
|
-
|
|
13
|
-
[2m Test Files [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
14
|
-
[2m Tests [22m [1m[32m5 passed[39m[22m[90m (5)[39m
|
|
15
|
-
[2m Start at [22m 14:42:27
|
|
16
|
-
[2m Duration [22m 3.45s[2m (transform 1.09s, setup 0ms, collect 3.77s, tests 1.43s, environment 1ms, prepare 1.24s)[22m
|
|
17
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
$ tsc --noEmit
|