vertz 0.0.1 → 0.2.1
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 +2 -0
- package/.turbo/turbo-test.log +11 -0
- package/CHANGELOG.md +13 -0
- package/README.md +25 -11
- package/__tests__/subpath-exports.test.ts +96 -0
- package/package.json +76 -18
- package/src/cloudflare.ts +1 -0
- package/src/db.ts +1 -0
- package/src/errors.ts +1 -0
- package/src/fetch.ts +1 -0
- package/src/schema.ts +1 -0
- package/src/server.ts +1 -0
- package/src/testing.ts +1 -0
- package/src/tui.ts +1 -0
- package/src/ui-compiler.ts +1 -0
- package/src/ui-primitives.ts +1 -0
- package/src/ui.ts +1 -0
- package/tsconfig.json +8 -0
- package/index.js +0 -10
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
$ vitest run
|
|
2
|
+
|
|
3
|
+
[1m[46m RUN [49m[22m [36mv4.0.18 [39m[90m/Users/viniciusdacal/vertz-dev/vertz/.claude/worktrees/poc-ssr-hmr/packages/vertz[39m
|
|
4
|
+
|
|
5
|
+
[32m✓[39m __tests__/subpath-exports.test.ts [2m([22m[2m13 tests[22m[2m)[22m[33m 501[2mms[22m[39m
|
|
6
|
+
|
|
7
|
+
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
8
|
+
[2m Tests [22m [1m[32m13 passed[39m[22m[90m (13)[39m
|
|
9
|
+
[2m Start at [22m 07:43:22
|
|
10
|
+
[2m Duration [22m 639ms[2m (transform 271ms, setup 0ms, import 58ms, tests 501ms, environment 0ms)[22m
|
|
11
|
+
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# vertz
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`a207936`](https://github.com/vertz-dev/vertz/commit/a2079362c54a8b61ea2368039abcb08681448380), [`db53497`](https://github.com/vertz-dev/vertz/commit/db534979df714d51227a34b4d5b80960e34ec33c), [`b2d43d4`](https://github.com/vertz-dev/vertz/commit/b2d43d4f265e4b1a806b3e96f00721cc38cc07e8), [`2ec4dd3`](https://github.com/vertz-dev/vertz/commit/2ec4dd3be1ac13f74015e977a699cd59fd7291bc), [`259e250`](https://github.com/vertz-dev/vertz/commit/259e2501116f805fed49b95471aaeb4f80515256), [`6443339`](https://github.com/vertz-dev/vertz/commit/64433394142ddff76d8021b25259c9c901d62b1e), [`3407afd`](https://github.com/vertz-dev/vertz/commit/3407afdf543481cd559e550454144d16e6a26e06), [`f3b132a`](https://github.com/vertz-dev/vertz/commit/f3b132af4f6ff39e967d4ca3d33f7e6ee12eff84), [`4f780bb`](https://github.com/vertz-dev/vertz/commit/4f780bba6bee7a493c9a1e0b8463ea2126a7285b), [`c38def6`](https://github.com/vertz-dev/vertz/commit/c38def6b6e060f63afeaacd93afa85aae9154833), [`0a33c14`](https://github.com/vertz-dev/vertz/commit/0a33c142a12a54e0da61423701ca338118ab9c98), [`0f1c028`](https://github.com/vertz-dev/vertz/commit/0f1c028dd6bb90e37ac71f60e40ba0be774cca11), [`6814cd8`](https://github.com/vertz-dev/vertz/commit/6814cd8da818cd0b36deaea132ca589cf6a03a89), [`7207c4c`](https://github.com/vertz-dev/vertz/commit/7207c4c44c2fc83f67459cbcba8e6010b4d05145), [`a454791`](https://github.com/vertz-dev/vertz/commit/a454791e0c6866cbad1d0d96bc3c0688282b021b), [`e17ccb2`](https://github.com/vertz-dev/vertz/commit/e17ccb261ecebc1ca7d58b75365869cb29253a3c), [`948f127`](https://github.com/vertz-dev/vertz/commit/948f127bf4b752274800c045d010590f1cc266d8), [`9ee0308`](https://github.com/vertz-dev/vertz/commit/9ee03084f71803b04eef5f05ced2f90b52a9fa8e), [`63f074e`](https://github.com/vertz-dev/vertz/commit/63f074eefa96b49eb72724f8ec377a14a1f2c630)]:
|
|
8
|
+
- @vertz/server@0.2.0
|
|
9
|
+
- @vertz/testing@0.2.0
|
|
10
|
+
- @vertz/db@0.2.0
|
|
11
|
+
- @vertz/schema@0.2.0
|
|
12
|
+
- @vertz/ui-compiler@1.0.0
|
|
13
|
+
- @vertz/ui@0.2.0
|
package/README.md
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
# vertz
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The unified meta-package for the [Vertz](https://github.com/vertz-dev/vertz) framework.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Instead of installing individual `@vertz/*` packages, install `vertz` and import what you need via subpath exports:
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
```ts
|
|
8
|
+
import { createServer } from 'vertz/server';
|
|
9
|
+
import { s } from 'vertz/schema';
|
|
10
|
+
import { createDb } from 'vertz/db';
|
|
11
|
+
import { createTestClient } from 'vertz/testing';
|
|
12
|
+
```
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## Why subpath exports?
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
npm install vertz
|
|
17
|
-
|
|
16
|
+
- **Tree-shakeable** — importing `vertz/server` only pulls in `@vertz/server`, nothing else.
|
|
17
|
+
- **One dependency** — `npm install vertz` gives you the whole framework.
|
|
18
|
+
- **No barrel file** — there's no default `import from 'vertz'`; every import is explicit.
|
|
19
|
+
|
|
20
|
+
## Available subpaths
|
|
21
|
+
|
|
22
|
+
| Subpath | Resolves to | Status |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `vertz/server` | `@vertz/server` | ✅ |
|
|
25
|
+
| `vertz/schema` | `@vertz/schema` | ✅ |
|
|
26
|
+
| `vertz/db` | `@vertz/db` | ✅ |
|
|
27
|
+
| `vertz/testing` | `@vertz/testing` | ✅ |
|
|
28
|
+
| `vertz/ui` | `@vertz/ui` | ✅ |
|
|
29
|
+
| `vertz/ui-compiler` | `@vertz/ui-compiler` | ✅ |
|
|
30
|
+
| `vertz/router` | `@vertz/router` | 🚧 Planned |
|
|
31
|
+
| `vertz/signal` | `@vertz/signal` | 🚧 Planned |
|
|
18
32
|
|
|
19
33
|
## License
|
|
20
34
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Tests that each subpath export from the `vertz` meta-package
|
|
5
|
+
* correctly re-exports from the underlying @vertz/* package.
|
|
6
|
+
*
|
|
7
|
+
* Tree-shaking: each subpath is a separate entry point with `sideEffects: false`,
|
|
8
|
+
* so bundlers will only include the code actually imported.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
describe('vertz meta-package subpath exports', () => {
|
|
12
|
+
it('vertz/server re-exports @vertz/server', async () => {
|
|
13
|
+
const mod = await import('vertz/server');
|
|
14
|
+
expect(mod.createServer).toBeDefined();
|
|
15
|
+
expect(typeof mod.createServer).toBe('function');
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('vertz/schema re-exports @vertz/schema', async () => {
|
|
19
|
+
const mod = await import('vertz/schema');
|
|
20
|
+
expect(mod.s).toBeDefined();
|
|
21
|
+
expect(typeof mod.s).toBe('object');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('vertz/db re-exports @vertz/db', async () => {
|
|
25
|
+
const mod = await import('vertz/db');
|
|
26
|
+
expect(Object.keys(mod).length).toBeGreaterThan(0);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('vertz/testing re-exports @vertz/testing', async () => {
|
|
30
|
+
const mod = await import('vertz/testing');
|
|
31
|
+
expect(Object.keys(mod).length).toBeGreaterThan(0);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('vertz/ui re-exports @vertz/ui', async () => {
|
|
35
|
+
const mod = await import('vertz/ui');
|
|
36
|
+
expect(Object.keys(mod).length).toBeGreaterThan(0);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('vertz/ui-compiler re-exports @vertz/ui-compiler', async () => {
|
|
40
|
+
const mod = await import('vertz/ui-compiler');
|
|
41
|
+
expect(Object.keys(mod).length).toBeGreaterThan(0);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('vertz/fetch re-exports @vertz/fetch', async () => {
|
|
45
|
+
const mod = await import('vertz/fetch');
|
|
46
|
+
expect(Object.keys(mod).length).toBeGreaterThan(0);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('vertz/errors re-exports @vertz/errors', async () => {
|
|
50
|
+
const mod = await import('vertz/errors');
|
|
51
|
+
expect(Object.keys(mod).length).toBeGreaterThan(0);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('vertz/cloudflare re-exports @vertz/cloudflare', async () => {
|
|
55
|
+
const mod = await import('vertz/cloudflare');
|
|
56
|
+
expect(Object.keys(mod).length).toBeGreaterThan(0);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('vertz/tui re-exports @vertz/tui', async () => {
|
|
60
|
+
const mod = await import('vertz/tui');
|
|
61
|
+
expect(Object.keys(mod).length).toBeGreaterThan(0);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('vertz/ui-primitives re-exports @vertz/ui-primitives', async () => {
|
|
65
|
+
const mod = await import('vertz/ui-primitives');
|
|
66
|
+
expect(Object.keys(mod).length).toBeGreaterThan(0);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('vertz has no default/root export', async () => {
|
|
70
|
+
const fs = await import('node:fs');
|
|
71
|
+
const path = await import('node:path');
|
|
72
|
+
const pkgPath = path.resolve(import.meta.dirname, '..', 'package.json');
|
|
73
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
74
|
+
expect(pkg.exports['.']).toBeUndefined();
|
|
75
|
+
expect(pkg.main).toBeUndefined();
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
describe('tree-shaking: subpaths are independent modules', () => {
|
|
80
|
+
it('each subpath points to a separate source file', async () => {
|
|
81
|
+
const fs = await import('node:fs');
|
|
82
|
+
const path = await import('node:path');
|
|
83
|
+
const pkgPath = path.resolve(import.meta.dirname, '..', 'package.json');
|
|
84
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
85
|
+
|
|
86
|
+
const exportPaths = Object.values(pkg.exports) as Array<{ import: string }>;
|
|
87
|
+
const importPaths = exportPaths.map((e) => e.import);
|
|
88
|
+
|
|
89
|
+
// All import paths should be unique (no shared entry point)
|
|
90
|
+
const unique = new Set(importPaths);
|
|
91
|
+
expect(unique.size).toBe(importPaths.length);
|
|
92
|
+
|
|
93
|
+
// sideEffects must be false for tree-shaking
|
|
94
|
+
expect(pkg.sideEffects).toBe(false);
|
|
95
|
+
});
|
|
96
|
+
});
|
package/package.json
CHANGED
|
@@ -1,26 +1,84 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vertz",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"index.js",
|
|
8
|
-
"README.md"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"prepublishOnly": "echo 'Publishing vertz placeholder package'"
|
|
12
|
-
},
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "The first TypeScript stack built for LLMs",
|
|
13
7
|
"repository": {
|
|
14
8
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/
|
|
9
|
+
"url": "https://github.com/vertz-dev/vertz.git",
|
|
10
|
+
"directory": "packages/vertz"
|
|
16
11
|
},
|
|
17
|
-
"author": "viniciusdacal",
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"keywords": [
|
|
20
|
-
"vertz",
|
|
21
|
-
"placeholder"
|
|
22
|
-
],
|
|
23
12
|
"publishConfig": {
|
|
24
|
-
"access": "public"
|
|
13
|
+
"access": "public",
|
|
14
|
+
"provenance": true
|
|
15
|
+
},
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"exports": {
|
|
18
|
+
"./server": {
|
|
19
|
+
"import": "./src/server.ts",
|
|
20
|
+
"types": "./src/server.ts"
|
|
21
|
+
},
|
|
22
|
+
"./schema": {
|
|
23
|
+
"import": "./src/schema.ts",
|
|
24
|
+
"types": "./src/schema.ts"
|
|
25
|
+
},
|
|
26
|
+
"./db": {
|
|
27
|
+
"import": "./src/db.ts",
|
|
28
|
+
"types": "./src/db.ts"
|
|
29
|
+
},
|
|
30
|
+
"./testing": {
|
|
31
|
+
"import": "./src/testing.ts",
|
|
32
|
+
"types": "./src/testing.ts"
|
|
33
|
+
},
|
|
34
|
+
"./ui": {
|
|
35
|
+
"import": "./src/ui.ts",
|
|
36
|
+
"types": "./src/ui.ts"
|
|
37
|
+
},
|
|
38
|
+
"./ui-compiler": {
|
|
39
|
+
"import": "./src/ui-compiler.ts",
|
|
40
|
+
"types": "./src/ui-compiler.ts"
|
|
41
|
+
},
|
|
42
|
+
"./fetch": {
|
|
43
|
+
"import": "./src/fetch.ts",
|
|
44
|
+
"types": "./src/fetch.ts"
|
|
45
|
+
},
|
|
46
|
+
"./errors": {
|
|
47
|
+
"import": "./src/errors.ts",
|
|
48
|
+
"types": "./src/errors.ts"
|
|
49
|
+
},
|
|
50
|
+
"./cloudflare": {
|
|
51
|
+
"import": "./src/cloudflare.ts",
|
|
52
|
+
"types": "./src/cloudflare.ts"
|
|
53
|
+
},
|
|
54
|
+
"./tui": {
|
|
55
|
+
"import": "./src/tui.ts",
|
|
56
|
+
"types": "./src/tui.ts"
|
|
57
|
+
},
|
|
58
|
+
"./ui-primitives": {
|
|
59
|
+
"import": "./src/ui-primitives.ts",
|
|
60
|
+
"types": "./src/ui-primitives.ts"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"test": "vitest run",
|
|
65
|
+
"test:watch": "vitest",
|
|
66
|
+
"build": "echo 'meta-package: no build needed'"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@vertz/cloudflare": "0.2.1",
|
|
70
|
+
"@vertz/db": "0.2.1",
|
|
71
|
+
"@vertz/errors": "0.2.1",
|
|
72
|
+
"@vertz/fetch": "0.2.1",
|
|
73
|
+
"@vertz/schema": "0.2.1",
|
|
74
|
+
"@vertz/server": "0.2.1",
|
|
75
|
+
"@vertz/testing": "0.2.1",
|
|
76
|
+
"@vertz/tui": "0.2.1",
|
|
77
|
+
"@vertz/ui": "0.2.1",
|
|
78
|
+
"@vertz/ui-compiler": "0.2.1",
|
|
79
|
+
"@vertz/ui-primitives": "0.2.1"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"vitest": "^4.0.18"
|
|
25
83
|
}
|
|
26
84
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/cloudflare';
|
package/src/db.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/db';
|
package/src/errors.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/errors';
|
package/src/fetch.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/fetch';
|
package/src/schema.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/schema';
|
package/src/server.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/server';
|
package/src/testing.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/testing';
|
package/src/tui.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/tui';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/ui-compiler';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/ui-primitives';
|
package/src/ui.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vertz/ui';
|
package/tsconfig.json
ADDED
package/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Placeholder package to secure the vertz package name on npm.
|
|
3
|
-
* This package is maintained by the @vertz organization.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
name: 'vertz',
|
|
8
|
-
version: '0.0.1',
|
|
9
|
-
description: 'Placeholder package to secure the vertz package name'
|
|
10
|
-
};
|