Skip to content

Commit

Permalink
Merge pull request #4 from elielnfinic/main
Browse files Browse the repository at this point in the history
New changes
  • Loading branch information
elielnfinic authored Nov 1, 2024
2 parents cebbc84 + d2ecb29 commit d607945
Show file tree
Hide file tree
Showing 52 changed files with 1,762 additions and 1,120 deletions.
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
interval: daily
ignore:
- dependency-name: "*"
# ignore patch and minor
update-types: [version-update:semver-patch, version-update:semver-minor]
16 changes: 16 additions & 0 deletions .github/workflows/buf-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish buf files
on:
workflow_call:
permissions:
contents: read
jobs:
buf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v1
with:
token: ${{ secrets.BUF_TOKEN }}
pr_comment: false
lint: false
push: true
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ jobs:
packages: write
uses: ./.github/workflows/npm-publish.yml

publish_buf_registry:
name: Publish buf files
secrets: inherit
permissions:
contents: read
needs:
- npm_publish
uses: ./.github/workflows/buf-registry.yml

build_docker_images:
name: Build Docker Images
permissions:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env

dist/
docs/
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @d-roak @JanLewDev @elielnfinic @trungnotchung @winprn @hoangquocvietuet
6 changes: 3 additions & 3 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ managed:
enabled: true
plugins:
- local: ./node_modules/ts-proto/protoc-gen-ts_proto
out: ./packages
out: .
opt:
- esModuleInterop=true
- fileSuffix=_pb
- ts_proto_opt=outputServices=grpc-js
- remote: buf.build/grpc/node
out: ./packages
out: .
opt:
- ts_proto_opt=esModuleInterop=true
inputs:
- directory: ./packages
exclude_paths:
- packages/node/node_modules
- packages/node
- packages/network/node_modules
- packages/object/node_modules
17 changes: 8 additions & 9 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
version: v2
modules:
# - path: packages/node
# excludes:
# - packages/node/node_modules
- path: packages/network
excludes:
- packages/network/node_modules
- path: packages/object
excludes:
- packages/object/node_modules
- path: packages/node/src/proto
name: buf.build/topology/node

- path: packages/object/src/proto
name: buf.build/topology/object

- path: packages/network/src/proto
name: buf.build/topology/network
10 changes: 5 additions & 5 deletions examples/canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-topology-examples-canvas",
"version": "0.2.0",
"version": "0.2.1-4",
"license": "MIT",
"scripts": {
"build": "vite build",
Expand All @@ -9,10 +9,10 @@
"start": "ts-node ./src/index.ts"
},
"dependencies": {
"@topology-foundation/blueprints": "0.2.0",
"@topology-foundation/network": "0.2.0",
"@topology-foundation/node": "0.2.0",
"@topology-foundation/object": "0.2.0",
"@topology-foundation/blueprints": "0.2.1-4",
"@topology-foundation/network": "0.2.1-4",
"@topology-foundation/node": "0.2.1-4",
"@topology-foundation/object": "0.2.1-4",
"crypto-browserify": "^3.12.0",
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
Expand Down
10 changes: 5 additions & 5 deletions examples/chat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "topology-example-chat",
"version": "0.2.0",
"version": "0.2.1-4",
"description": "Topology Protocol Chat Example",
"main": "src/index.ts",
"repository": "https://github.com/topology-foundation/ts-topology.git",
Expand All @@ -13,10 +13,10 @@
"start": "ts-node ./src/index.ts"
},
"dependencies": {
"@topology-foundation/blueprints": "0.2.0",
"@topology-foundation/network": "0.2.0",
"@topology-foundation/node": "0.2.0",
"@topology-foundation/object": "0.2.0",
"@topology-foundation/blueprints": "0.2.1-4",
"@topology-foundation/network": "0.2.1-4",
"@topology-foundation/node": "0.2.1-4",
"@topology-foundation/object": "0.2.1-4",
"assemblyscript": "^0.27.29",
"crypto-browserify": "^3.12.0",
"process": "^0.11.10",
Expand Down
8 changes: 4 additions & 4 deletions examples/grid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "topology-example-grid",
"version": "0.2.0",
"version": "0.2.1-4",
"description": "Topology Protocol Grid Exmaple",
"main": "src/index.ts",
"repository": "https://github.com/topology-foundation/ts-topology.git",
Expand All @@ -13,9 +13,9 @@
"start": "ts-node ./src/index.ts"
},
"dependencies": {
"@topology-foundation/network": "0.2.0",
"@topology-foundation/node": "0.2.0",
"@topology-foundation/object": "0.2.0",
"@topology-foundation/network": "0.2.1-4",
"@topology-foundation/node": "0.2.1-4",
"@topology-foundation/object": "0.2.1-4",
"assemblyscript": "^0.27.29",
"crypto-browserify": "^3.12.0",
"memfs": "^4.11.1",
Expand Down
10 changes: 5 additions & 5 deletions examples/local-bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "topology-example-localdev",
"version": "0.2.0",
"version": "0.2.1-4",
"description": "Topology Protocol Local Dev Example",
"main": "src/index.ts",
"repository": "https://github.com/topology-foundation/ts-topology.git",
Expand All @@ -13,10 +13,10 @@
"start": "ts-node ./src/index.ts"
},
"dependencies": {
"@topology-foundation/blueprints": "0.2.0",
"@topology-foundation/network": "0.2.0",
"@topology-foundation/node": "0.2.0",
"@topology-foundation/object": "0.2.0",
"@topology-foundation/blueprints": "0.2.1-4",
"@topology-foundation/network": "0.2.1-4",
"@topology-foundation/node": "0.2.1-4",
"@topology-foundation/object": "0.2.1-4",
"assemblyscript": "^0.27.29",
"crypto-browserify": "^3.12.0",
"process": "^0.11.10",
Expand Down
110 changes: 56 additions & 54 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
{
"name": "ts-topology",
"description": "The official TypeScript implementation of Topology Protocol",
"version": "0.2.0",
"license": "MIT",
"homepage": "https://topology.gg/",
"repository": {
"type": "git",
"url": "git+https://github.com/topology-foundation/ts-topology.git"
},
"bugs": {
"url": "https://github.com/topology-foundation/ts-topology/issues"
},
"workspaces": [
"packages/*",
"examples/*"
],
"scripts": {
"bench": "vitest bench",
"biome-check": "biome check",
"clean": "pnpm --filter '@topology-foundation/*' clean",
"docs": "typedoc",
"postinstall": "pnpm --filter '@topology-foundation/*' build",
"proto-gen": "buf generate",
"release": "release-it",
"test": "vitest"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@release-it-plugins/workspaces": "^4.2.0",
"@types/node": "^22.5.4",
"assemblyscript": "^0.27.29",
"release-it": "^17.6.0",
"ts-proto": "^2.2.4",
"typedoc": "^0.26.6",
"typescript": "^5.5.4",
"vite": "^5.4.9",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.1.1"
},
"private": true,
"release-it": {
"plugins": {
"@release-it-plugins/workspaces": {
"publish": false
}
},
"npm": false,
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
}
}
"name": "ts-topology",
"description": "The official TypeScript implementation of Topology Protocol",
"version": "0.2.1-4",
"license": "MIT",
"homepage": "https://topology.gg/",
"repository": {
"type": "git",
"url": "git+https://github.com/topology-foundation/ts-topology.git"
},
"bugs": {
"url": "https://github.com/topology-foundation/ts-topology/issues"
},
"workspaces": [
"packages/*",
"examples/*"
],
"scripts": {
"bench": "vitest bench",
"biome-check": "biome check",
"clean": "pnpm --filter '@topology-foundation/*' clean",
"docs": "typedoc",
"postinstall": "pnpm --filter '@topology-foundation/*' build",
"proto-gen": "pnpm proto-gen:object && pnpm proto-gen:network",
"proto-gen:object": "buf generate packages/object/src/proto -o packages/object/src/proto",
"proto-gen:network": "buf generate packages/network/src/proto -o packages/network/src/proto",
"release": "release-it",
"test": "vitest"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@release-it-plugins/workspaces": "^4.2.0",
"@types/node": "^22.5.4",
"assemblyscript": "^0.27.29",
"release-it": "^17.6.0",
"ts-proto": "^2.2.4",
"typedoc": "^0.26.6",
"typescript": "^5.5.4",
"vite": "^5.4.9",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.1.1"
},
"private": true,
"release-it": {
"plugins": {
"@release-it-plugins/workspaces": {
"publish": false
}
},
"npm": false,
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
}
}
}
4 changes: 2 additions & 2 deletions packages/blueprints/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@topology-foundation/blueprints",
"version": "0.2.0",
"version": "0.2.1-4",
"license": "MIT",
"repository": {
"type": "git",
Expand Down Expand Up @@ -34,7 +34,7 @@
"test": "vitest"
},
"devDependencies": {
"@topology-foundation/object": "0.2.0",
"@topology-foundation/object": "0.2.1-4",
"assemblyscript": "^0.27.29"
},
"dependencies": {
Expand Down
31 changes: 31 additions & 0 deletions packages/logger/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Topology Logger

This package makes it easy to log messages in a structured way.

## Usage

This package is intended to be used as a dependency for the Topology Protocol. However, you can use it as a standalone package. For that, you can install it using:

```bash
# yarn
yarn add @topology-foundation/logger

# npm
npm install @topology-foundation/logger
```

### Build

To build the package, you can run:

```bash
yarn build
```

### Tests

To run the tests, you can run:

```bash
yarn test
```
33 changes: 33 additions & 0 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "@topology-foundation/logger",
"version": "0.2.1-4",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/topology-foundation/ts-topology.git"
},
"type": "module",
"types": "./dist/src/index.d.ts",
"files": [
"src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
}
},
"scripts": {
"build": "tsc -b",
"clean": "rm -rf dist/ node_modules/",
"prepack": "tsc -b",
"test": "vitest"
},
"dependencies": {
"loglevel": "^1.9.2",
"loglevel-plugin-prefix": "^0.8.4"
}
}
Loading

0 comments on commit d607945

Please sign in to comment.