Skip to content

Commit

Permalink
Move ts packages from core/ to packages/ (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergekh2 authored Jun 7, 2024
1 parent a3d2d7e commit d45051a
Show file tree
Hide file tree
Showing 270 changed files with 6,783 additions and 67 deletions.
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
##

/core/ @sergekh2
/packages/ @sergekh2
/protocol/ @sergekh2
/.github/ @mechanical-turk
/infra @mechanical-turk
turbo.json @mechanical-turk
/contracts/src/node-network @mechanical-turk
/core/sdk/src/stream* @erikolsson
/packages/sdk/src/stream* @erikolsson
3 changes: 1 addition & 2 deletions .github/workflows/Stress_test_node_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ on:
branches:
- main
paths:
- 'packages/stress-testing/**'
- 'core/**'
- 'packages/**'
workflow_dispatch:

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ jobs:
- name: Run SDK Tests (without entitlements)
run: |
yarn run turbo run build
cd core/sdk
cd packages/sdk
yarn test:ci:multi:ne
- name: Archive River Node Logs and Settings
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ abi/

clients/web/app/storybook-static

core/**/dist/
core/proto/src/gen/*
packages/**/dist/
packages/proto/src/gen/*

contracts/deployments/localhost/
contracts/cache
Expand Down
7 changes: 5 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ servers/workers/**/.keys/*
core/**/gen/*
core/**/coverage/*
core/**/run_files/*
packages/**/gen/*
packages/**/coverage/*
packages/**/run_files/*
core/node/.mockery.yaml
core/node/auth/contracts/*.json
core/node/registries/contracts/*.json
core/encryption-pkg/turbo.json
packages/encryption-pkg/turbo.json
contracts/cache/*
contracts/deployments/*
contracts/addresses/*
Expand All @@ -44,4 +47,4 @@ yarn.lock

packages/generated/*

core/proto/src/protocol_*.ts
packages/proto/src/protocol_*.ts
24 changes: 12 additions & 12 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,63 +12,63 @@
"processId": "river_node"
},
{
"name": "Jest: current file in 'core/dlog/'",
"name": "Jest: current file in 'packages/dlog/'",
"type": "node",
"request": "launch",
"env": { "NODE_ENV": "development", "NODE_TLS_REJECT_UNAUTHORIZED": "0" },
"program": "${workspaceFolder}/node_modules/.bin/jest",
"runtimeArgs": ["--experimental-vm-modules", "--experimental-wasm-modules"],
"args": ["${file}", "--config", "${workspaceFolder}/core/dlog/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"args": ["${file}", "--config", "${workspaceFolder}/packages/dlog/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"console": "integratedTerminal",
},
{
"name": "Jest: current file in 'core/encryption/'",
"name": "Jest: current file in 'packages/encryption/'",
"type": "node",
"request": "launch",
"env": { "NODE_ENV": "development", "NODE_TLS_REJECT_UNAUTHORIZED": "0" },
"program": "${workspaceFolder}/node_modules/.bin/jest",
"runtimeArgs": ["--experimental-vm-modules", "--experimental-wasm-modules"],
"args": ["${file}", "--config", "${workspaceFolder}/core/encryption/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"args": ["${file}", "--config", "${workspaceFolder}/packages/encryption/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"console": "integratedTerminal",
},
{
"name": "Jest: current file in 'core/sdk/' (multi ne)",
"name": "Jest: current file in 'packages/sdk/' (multi ne)",
"type": "node",
"request": "launch",
"env": { "NODE_ENV": "development", "NODE_TLS_REJECT_UNAUTHORIZED": "0", "RIVER_ENV": "local_multi_ne", "DEBUG": "csb:*,test:*", "DEBUG_DEPTH":"10" },
"program": "${workspaceFolder}/node_modules/.bin/jest",
"runtimeArgs": ["--experimental-vm-modules", "--experimental-wasm-modules"],
"args": ["${file}", "--config", "${workspaceFolder}/core/sdk/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"args": ["${file}", "--config", "${workspaceFolder}/packages/sdk/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"console": "integratedTerminal",
},
{
"name": "Jest: current file in 'core/sdk/' (multi entitlements)",
"name": "Jest: current file in 'packages/sdk/' (multi entitlements)",
"type": "node",
"request": "launch",
"env": { "NODE_ENV": "development", "NODE_TLS_REJECT_UNAUTHORIZED": "0", "RIVER_ENV": "local_multi", "DEBUG": "csb:*,test:*", "DEBUG_DEPTH":"10" },
"program": "${workspaceFolder}/node_modules/.bin/jest",
"runtimeArgs": ["--experimental-vm-modules", "--experimental-wasm-modules"],
"args": ["${file}", "--config", "${workspaceFolder}/core/sdk/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"args": ["${file}", "--config", "${workspaceFolder}/packages/sdk/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"console": "integratedTerminal",
},
{
"name": "Jest: current file in 'core/sdk/' (single ne)",
"name": "Jest: current file in 'packages/sdk/' (single ne)",
"type": "node",
"request": "launch",
"env": { "NODE_ENV": "development", "NODE_TLS_REJECT_UNAUTHORIZED": "0", "RIVER_ENV": "local_single_ne", "DEBUG": "csb:*,test:*", "DEBUG_DEPTH":"10" },
"program": "${workspaceFolder}/node_modules/.bin/jest",
"runtimeArgs": ["--experimental-vm-modules", "--experimental-wasm-modules"],
"args": ["${file}", "--config", "${workspaceFolder}/core/sdk/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"args": ["${file}", "--config", "${workspaceFolder}/packages/sdk/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"console": "integratedTerminal",
},
{
"name": "Jest: current file in 'core/sdk/' (single entitlements)",
"name": "Jest: current file in 'packages/sdk/' (single entitlements)",
"type": "node",
"request": "launch",
"env": { "NODE_ENV": "development", "NODE_TLS_REJECT_UNAUTHORIZED": "0", "RIVER_ENV": "local_single", "DEBUG": "csb:*,test:*", "DEBUG_DEPTH":"10" },
"program": "${workspaceFolder}/node_modules/.bin/jest",
"runtimeArgs": ["--experimental-vm-modules", "--experimental-wasm-modules"],
"args": ["${file}", "--config", "${workspaceFolder}/core/sdk/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"args": ["${file}", "--config", "${workspaceFolder}/packages/sdk/jest.config.ts", "-i", "--no-cache", "--forceExit"],
"console": "integratedTerminal",
},
]
Expand Down
14 changes: 7 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"source.fixAll.eslint": "explicit"
},
"eslint.workingDirectories": [
"./core/debug-app",
"./core/dlog",
"./core/encryption",
"./core/proto",
"./core/sdk",
"./core/stress",
"./core/web3",
"./packages/debug-app",
"./packages/dlog",
"./packages/encryption",
"./packages/proto",
"./packages/sdk",
"./packages/stress",
"./packages/web3",
],
"[solidity]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
14 changes: 7 additions & 7 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@
{
"label": "WatchCasablancaSdk",
"type": "shell",
"command": "cd core/sdk && yarn watch",
"command": "cd packages/sdk && yarn watch",
"isBackground": true,
"problemMatcher": [],
"presentation": {
Expand All @@ -372,7 +372,7 @@
{
"label": "WatchCasablancaEncryption",
"type": "shell",
"command": "cd core/encryption && yarn watch",
"command": "cd packages/encryption && yarn watch",
"isBackground": true,
"problemMatcher": [],
"presentation": {
Expand All @@ -382,7 +382,7 @@
{
"label": "WatchCasablancaDlog",
"type": "shell",
"command": "cd core/dlog && yarn watch",
"command": "cd packages/dlog && yarn watch",
"isBackground": true,
"problemMatcher": [],
"presentation": {
Expand All @@ -392,7 +392,7 @@
{
"label": "WatchCasablancaProto",
"type": "shell",
"command": "cd core/proto && yarn watch",
"command": "cd packages/proto && yarn watch",
"isBackground": true,
"problemMatcher": [],
"presentation": {
Expand All @@ -402,7 +402,7 @@
{
"label": "WatchCasablancaWeb3",
"type": "shell",
"command": "cd core/web3 && yarn watch",
"command": "cd packages/web3 && yarn watch",
"isBackground": true,
"problemMatcher": [],
"presentation": {
Expand All @@ -412,7 +412,7 @@
{
"label": "WatchCasablancaProto_Go",
"type": "shell",
"command": "cd core/proto && yarn watch:go",
"command": "cd packages/proto && yarn watch:go",
"isBackground": true,
"problemMatcher": [],
"presentation": {
Expand All @@ -422,7 +422,7 @@
{
"label": "Casablanca DebugApp",
"type": "shell",
"command": "./scripts/wait-for-core.sh && cd core/debug-app && yarn dev",
"command": "./scripts/wait-for-core.sh && cd packages/debug-app && yarn dev",
"isBackground": true,
"problemMatcher": [],
"presentation": {
Expand Down
2 changes: 1 addition & 1 deletion buf.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: v2
modules:
- path: protocol
- path: core/proto
- path: packages/proto
breaking:
use:
- FILE
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"csb:dev": "yarn csb:dev:entitlements",
"csb:dev:entitlements": "./core/scripts/launch.sh",
"csb:dev:no-entitlements": "./core/scripts/launch.sh --disable_entitlements",
"csb:list": "yarn workspaces list --json | grep core | grep -o '\"name\":\"[^\"]*' | grep -o '[^\"]*$'",
"csb:list": "yarn workspaces list --json | grep packages | grep -o '\"name\":\"[^\"]*' | grep -o '[^\"]*$'",
"csb:list:exclude:filter": "yarn csb:list | xargs -I arg echo -n \"--filter=!arg \"",
"csb:list:filter": "yarn csb:list | xargs -I arg echo -n \"--filter arg \"",
"csb:list:filter-without-sdk": "yarn csb:list | grep -v sdk | xargs -I arg echo -n \"--filter arg \"",
"csb:list:include": "yarn csb:list | xargs -I arg echo -n \"--include arg \"",
"csb:multi": "./core/scripts/launch_multi.sh",
"csb:multi:no-entitlements": "./core/scripts/launch_multi.sh --disable_entitlements",
"csb:node": "./core/scripts/start_node.sh",
"csb:prettier:check": "prettier --check ./core",
"csb:prettier:fix": "prettier --write ./core",
"csb:prettier:check": "prettier --check ./packages",
"csb:prettier:fix": "prettier --write ./packages",
"csb:start": "yarn csb:start:entitlements",
"csb:start:entitlements": "./core/scripts/start_node.sh",
"csb:start:no-entitlements": "./core/scripts/start_node.sh --disable_entitlements",
Expand Down Expand Up @@ -128,7 +128,6 @@
]
},
"workspaces": [
"core/*",
"protocol",
"packages/*",
"contracts"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions core/proto/buf.gen.yaml → packages/proto/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: v2
plugins:
- local: protoc-gen-es
out: core/proto/src/gen
out: packages/proto/src/gen
opt: target=ts
- local: protoc-gen-connect-es
out: core/proto/src/gen
out: packages/proto/src/gen
opt: target=ts
inputs:
- directory: protocol
- directory: core/proto
- directory: packages/proto
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions core/proto/package.json → packages/proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"types": "dist/index.d.ts",
"scripts": {
"buf:clean": "rm -rf ./src/gen/*",
"buf:generate": "cd ../.. && buf generate --template core/proto/buf.gen.yaml --path protocol/protocol.proto --path protocol/payloads.proto --path core/proto/internal.proto",
"buf:lint": "cd ../.. && buf lint --path protocol/protocol.proto --path protocol/payloads.proto --path core/proto/internal.proto",
"buf:generate": "cd ../.. && buf generate --template packages/proto/buf.gen.yaml --path protocol/protocol.proto --path protocol/payloads.proto --path packages/proto/internal.proto",
"buf:lint": "cd ../.. && buf lint --path protocol/protocol.proto --path protocol/payloads.proto --path packages/proto/internal.proto",
"build": "yarn buf:generate && tsc",
"cb": "yarn clean && yarn build",
"clean": "yarn buf:clean && rm -rf ./dist",
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d45051a

Please sign in to comment.