Skip to content

Commit

Permalink
Merge pull request #184 from proto-kit/feature/devops-finishing-touches
Browse files Browse the repository at this point in the history
Devops Integration: Framework side
  • Loading branch information
rpanic authored Jul 30, 2024
2 parents ad47dea + a7e1827 commit ba000be
Show file tree
Hide file tree
Showing 96 changed files with 5,609 additions and 7,623 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
packages/*/dist
packages/research
entry.sh
node_modules
packages/*/node_modules
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"rules": {}
},
{
"files": ["cli.tsx"],
"files": ["cli.ts"],
"rules": {
// Disable this because of the comment shell thingy in cli.tsx
"max-len": "off"
Expand Down
30 changes: 30 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": [
"build",
"lint",
"test",
"integration"
]
}
}
},
"targetDefaults": {
"build": {
"dependsOn": [
"^build"
],
"inputs": [
"{projectRoot}/src/**/*",
"{projectRoot}/package.json",
"{projectRoot}/tsconfig.json"
],
"outputs": [
"{projectRoot}/dist"
]
}
}
}
11,011 changes: 4,234 additions & 6,777 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
"scripts": {
"dev": "npx lerna run dev",
"build": "npx lerna run build",
"lint": "npx lerna run lint --parallel",
"build-docker": "docker build -t protokit-base -f ./packages/deployment/docker/base/Dockerfile .",
"lint": "npx lerna run lint",
"lint:staged": "eslint",
"test": "npx lerna run test -- --passWithNoTests",
"test:ci": "npx lerna run test -- --passWithNoTests --forceExit",
"test:integration": "npx lerna run integration -- --passWithNoTests --forceExit",
"test:watch": "npx lerna run test:watch",
"migrate": "npx lerna run prisma-migrate",
"prisma-generate": "npx lerna run prisma-generate",
"commit": "cz",
"publish:canary": "npx lerna publish prerelease --no-private --exact --yes --canary --preid develop --dist-tag latest --loglevel verbose --force-git-tag --force-publish"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@proto-kit/module": "*",
"@proto-kit/protocol": "*",
"@proto-kit/sequencer": "*",
"o1js": "1.1.0",
"o1js": "^1.1.0",
"tsyringe": "^4.7.0"
},
"devDependencies": {
Expand Down
45 changes: 45 additions & 0 deletions packages/api/src/graphql/VanillaGraphqlModules.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { ModulesConfig } from "@proto-kit/common";

import { GraphqlModulesRecord } from "./GraphqlSequencerModule";
import { MempoolResolver } from "./modules/MempoolResolver";
import { QueryGraphqlModule } from "./modules/QueryGraphqlModule";
import { BlockStorageResolver } from "./modules/BlockStorageResolver";
import { NodeStatusResolver } from "./modules/NodeStatusResolver";
import { UnprovenBlockResolver } from "./modules/UnprovenBlockResolver";
import { MerkleWitnessResolver } from "./modules/MerkleWitnessResolver";

export type VanillaGraphqlModulesRecord = {
MempoolResolver: typeof MempoolResolver;
QueryGraphqlModule: typeof QueryGraphqlModule;
BlockStorageResolver: typeof BlockStorageResolver;
NodeStatusResolver: typeof NodeStatusResolver;
UnprovenBlockResolver: typeof UnprovenBlockResolver;
MerkleWitnessResolver: typeof MerkleWitnessResolver;
};

export class VanillaGraphqlModules {
public static with<AdditionalModules extends GraphqlModulesRecord>(
additionalModules: AdditionalModules
) {
return {
MempoolResolver,
QueryGraphqlModule,
BlockStorageResolver,
NodeStatusResolver,
UnprovenBlockResolver,
MerkleWitnessResolver,
...additionalModules,
} satisfies VanillaGraphqlModulesRecord;
}

public static defaultConfig() {
return {
MempoolResolver: {},
QueryGraphqlModule: {},
BlockStorageResolver: {},
NodeStatusResolver: {},
UnprovenBlockResolver: {},
MerkleWitnessResolver: {},
} satisfies ModulesConfig<VanillaGraphqlModulesRecord>;
}
}
1 change: 1 addition & 0 deletions packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export * from "./graphql/modules/NodeStatusResolver";
export * from "./graphql/modules/AdvancedNodeStatusResolver";
export * from "./graphql/services/NodeStatusService";
export * from "./graphql/modules/MerkleWitnessResolver";
export * from "./graphql/VanillaGraphqlModules";
166 changes: 0 additions & 166 deletions packages/cli/src/LocalhostAppChain.ts

This file was deleted.

21 changes: 0 additions & 21 deletions packages/cli/src/cli.tsx

This file was deleted.

Loading

0 comments on commit ba000be

Please sign in to comment.