Skip to content

Commit 36d4e12

Browse files
committed
feat(cli): create hypergraph-cli package and wiring
1 parent 0c517b7 commit 36d4e12

File tree

19 files changed

+458
-36
lines changed

19 files changed

+458
-36
lines changed

apps/events/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@xstate/store": "^2.6.2",
2323
"class-variance-authority": "^0.7.1",
2424
"clsx": "^2.1.1",
25-
"effect": "^3.12.4",
25+
"effect": "^3.12.7",
2626
"isomorphic-ws": "^5.0.0",
2727
"lucide-react": "^0.471.1",
2828
"react": "^19.0.0",

apps/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@noble/ciphers": "^1.2.0",
1414
"@prisma/client": "^6.2.1",
1515
"cors": "^2.8.5",
16-
"effect": "^3.12.4",
16+
"effect": "^3.12.7",
1717
"express": "^5.0.1",
1818
"siwe": "^2.3.2",
1919
"viem": "^2.22.9",

packages/hypergraph-cli/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023-present The Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/hypergraph-cli/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# @graphprotocol/hypergraph-cli
2+
3+
CLI framework with connected web app that lets users browse created types and schemas from the Knowledge Graph and select/extend these types as well as create net-new types.
4+
When the user has a schema built, they can generate the schema files ontop of the `@graphprotocol/hypergraph` framework and the files will be created locally on the users machine.
5+
6+
TODO: examples, api, usage, etc.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "@graphprotocol/hypergraph-cli",
3+
"description": "CLI framework with connected web app that lets users browse created types and schemas from the Knowledge Graph and select/extend these types as well as create net-new types",
4+
"version": "0.0.1",
5+
"publishConfig": {
6+
"access": "public",
7+
"directory": "publish",
8+
"provenance": true
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/graphprotocol/hypergraph.git",
13+
"directory": "packages/hypergraph-cli"
14+
},
15+
"license": "MIT",
16+
"type": "module",
17+
"main": "./dist/index.js",
18+
"module": "./dist/index.js",
19+
"types": "./dist/index.d.ts",
20+
"sideEffects": [],
21+
"scripts": {
22+
"build": "tsc -b tsconfig.build.json && babel dist --plugins annotate-pure-calls --out-dir dist --source-maps && node ../../scripts/package.mjs",
23+
"test": "vitest"
24+
},
25+
"keywords": ["Web3", "Knowledge Graph", "Hypergraph", "CLI", "Local-First"],
26+
"dependencies": {
27+
"@effect/cli": "^0.54.1",
28+
"@effect/platform": "^0.75.1",
29+
"@effect/platform-node": "^0.71.1",
30+
"@graphprotocol/hypergraph": "workspace:*",
31+
"@graphprotocol/hypergraph-react": "workspace:*",
32+
"effect": "^3.12.7"
33+
},
34+
"devDependencies": {
35+
"@testing-library/jest-dom": "^6.6.3",
36+
"@testing-library/react": "^16.2.0",
37+
"@vitejs/plugin-react": "^4.3.4"
38+
}
39+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const HypergraphCliVersion = '0.0.1';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { describe, expect, it } from 'vitest';
2+
3+
import { HypergraphCliVersion } from '../src/index.js';
4+
5+
describe('hypergraph-cli', () => {
6+
it('should return version', () => {
7+
expect(HypergraphCliVersion).toEqual('0.0.1');
8+
});
9+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./tsconfig.src.json",
3+
"references": [
4+
{ "path": "../hypergraph/tsconfig.build.json" },
5+
{ "path": "../hypergraph-react/tsconfig.build.json" }
6+
],
7+
"compilerOptions": {
8+
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
9+
"outDir": "dist",
10+
"stripInternal": true
11+
}
12+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"include": [],
4+
"references": [{ "path": "tsconfig.src.json" }, { "path": "tsconfig.test.json" }]
5+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"include": ["src"],
4+
"references": [
5+
{ "path": "../hypergraph/tsconfig.src.json" },
6+
{ "path": "../hypergraph-react/tsconfig.src.json" }
7+
],
8+
"compilerOptions": {
9+
"tsBuildInfoFile": ".tsbuildinfo/src.tsbuildinfo",
10+
"rootDir": "src"
11+
}
12+
}

0 commit comments

Comments
 (0)