Skip to content

Commit 230e16a

Browse files
webberwangassimhabeekvladyslav-polishchuk
authored
feat: migrate from neo4j ogm to graphql (#3538)
* fix: element action schema * fix: change to array type schema * fix: rename to array * fix: select actions field * wip: fixing reconnect node * refactor: move param out of service * refactor: move param out of service * ci: change image version * ci: change docker init * ci: update node version * ci: update node version * fix: unit specs * chore: fix docker * test: fix subscriptions test * test: fix subscriptions test * wip: move to shared domain folder * wip: move to domain folder * wip: migrate backend repo to graphql * lint: remove un-used * refactor: move config folders * wip: migrate backend repo to graphql * wip: codegen for new client * wip: move graphql to shared * wip: move graphql to shared * wip: refactor repositories * wip: refactor repositories * refactor: use graphql for backend repo refactor: use graphql for backend repo refactor: use graphql for backend repo * chore: fix codegen * fix: codegen * refactor: use static imports for server actions in API modules refactor: Replace dynamic imports with static imports for server actions * wip: remove files * fix: Correct component server actions import and usage * refactor: update serverActions imports to be synchronous * fix: update preference server actions import syntax * refactor: update server actions to use direct imports instead of async functions * fix: union type save * wip: fix actions * feat: add cypher constraints file for Neo4j unique node properties * feat: add aider configuration and environment setup This commit includes several changes to improve aider integration: - Add script to set AIDER_COMMIT_PROMPT environment variable - Update AIDER_COMMIT_PROMPT with default commit message generation instructions - Convert load-env.sh to load-env.js using types from .cz-config.js - Add comments to explain load-env.js script functionality - Add aider wrapper script to load env and run command - Add configuration for aider * refactor: remove async await from server action imports * wip: refactor repositories * refactor: remove await from server actions imports * refactor: remove async function calls from repository server action imports * fix: import issue * refactor: use callback for appApi initialization * fix: missing env nextjs when using env-var * fix: integration specs and db connection * test: fix repo for spec, refactor graphql setup for specs * chore: codegen * fix: add node_options for isolated-vm * fix: migrate tag descendant resolvers * fix: element resolver (#3537) * fix: renderer id * fix: server auth * refactor: header toolbar * revert: user upsert * feat: add get-dependant-types resolver for neo4j element adapter * refactor: replace ogm with nestjs repositories in get-dependant-types * chore: remove comment * refactor: implement dependant types resolver for element * refactor: split neo4j schema and driver * feat: add get-dependant-types service for element domain * refactor: convert getDependantTypes to nestjs service with dependency injection * refactor: replace ogm with repository injections in get-dependant-types service * refactor: move cypher queries to drivers * fix: lint * fix: resolver with repositories * refactor: dependant types * revert: renderer id to make tests pass * fix: resolve circular dependency in graphql and resolver modules refactor: remove circular dependency between resolver and schema modules * refactor: clean up imports and formatting in resolver module and service * refactor: merge resolver providers into resolver service * fix: resolve circular dependency in graphql and resolver modules * fix: import api spec * refactor: simplify domain event test setup and remove unnecessary async operations * test(domain): add delays and improve test setup for domain event subscriptions * fix: resolve test setup issues with multiple listen calls and connection pool * fix: resolve domain event subscription test failures * refactor: move domain gql and apollo client to shared * refactor: update cypher query for element dependant types with improved readability * wip: Element.dependantTypes issue * fix: remove optional chaining for api.id in element render type * refactor: replace elementRepository with direct Cypher query in element-dependant-types * feat: add exports for element cypher queries in index file * wip: Element.dependantTypes issue * refactor: move elements to page module * fix: element dependantTypes circular dep * wip: testing subscriptions in browser * refactor: rename dashboard props * wip: test out default for parallel routes * refactor: domain to parallel routes * refactor: update neo4j module import path in test file * refactor: change providers to service * refactor: rename * test: add spec for union type mapper * fix: import export spec * wip: typebox validator * test: added specs for nested validator and unions * fix: import export spec * fix: build errors * wip: fixing validator and import/export * refactor: add additional schema to typeRef * wip: fixing data export shape * wip: add field validation wip: add field validation wip: fix field mapper fix: import export spec * feat: add INodeType as first generic arg to repository classes feat: add INodeType import to action-type repo service feat: add INodeType import and update repository generics feat: add INodeType as first generic argument in repository services refactor: add INodeType as first generic argument to page and prop repositories refactor: add INodeType as first generic argument in repository classes refactor: add INodeType as first generic argument to repository classes feat: add INodeType import to redirect repository service feat: add __typename field to various update type mutations feat: add __typename before id in all create and update mutations feat: add __typename before id in all create and update mutations feat: add __typename before id in all create and update mutations feat: add __typename before id in all create and update mutations feat: add missing INodeType generic parameter to repositories feat: add missing INodeType import in preference and redirect repositories refactor: remove duplicate __typename in graphql mutations feat: add __typename to update and create mutation responses refactor: remove duplicate __typename in graphql mutations feat: add __typename to mutation responses across multiple modules refactor: remove duplicate __typename in graphql mutations feat: add __typename to mutation responses in atom, preference, and tag modules refactor: remove duplicate __typename in hook.api.graphql refactor: remove duplicate __typename in createHooks mutation refactor: add __typename to create/update mutations * test: fix dependantTypes test: fix dependantTypes * fix: resolve type fix: resolve type * test: add page and component specs * fix: build errors * fix: incorrect query where * test: fix integration specs test: fix integration specs * fix: dependant types resolver fix: dependant types resolver fix: dependant types resolver * fix: codgen * fix: renderer id ref * fix: build errors * lint: remove un-used * fix: general issues fixes (#3541) * fix: generic issues * fix: script error on second element creation * fix: error bacause renderer had the same id as page * fix: page and component element descendants queries * refactor: migrate app dialogs to parallel routes * fix: lint * fix: after rebase * refactor: use @modal parrallel route for modal dialogs * fix: validation (#3542) * test: add unit tests for none schema validation * fix: update validator import path in none.schema.spec.ts * test: add comprehensive test suites for typebox validation schemas * refactor: update validator import across multiple schema spec files * refactor: reorganize typebox imports and exports structure * fix: update validator imports and move nested-validator to validation directory * refactor: schema validation * refactor: remove ajv formats * refactor: simplify validation class * refactor: remove nestjs validation * wip: standardize logger * wip: fix sentry setup * fix: build errors * wip: fix sentry setup * revert: add auth back * refactor: remove getAllFromCache and getOneFromCache methods from services (#3544) refactor: remove cache methods from service * fix: general app fixes (#3543) * fix: error bacause renderer had the same id as page * fix: after rebase * fix: errors during app update/delete * fix: page descendant elements export * fix: apps and components import and export * fix: loading indicator during app import * fix: loading indicator during component import * fix: app e2e spec * fix: app is not removed from cahce if request fails * fix: child-mapper e2e spec error during data seed * fix: child-mapper e2e spec * fix: in-app-routing e2e spec error during data seed * fix: pages e2e spec * fix: types e2e spec * fix: stabilize google-fonts e2e spec * fix: tags tree styling * fix: stabilize state-sharing e2e test * fix: pagination for types page * refactor: migrate admin modals to parallel routes * refactor: migrate component deletion modal * refactor: migrate actions delete and update modals to parallel routes * refactor: migrate auth guard CRUD form to parallel routes * refactor: migrate element delete modal to parallel routes * refactor: migrate all remaining popovers to parallel routes * refactor: cleanup jotai modal and form state utils * fix: e2e * fix: build * fix: css e2e spec * fix: build errors * fix: app crud cache error * fix: child-mapper e2e spec (#3548) * fix: state-sharing spec (#3550) * wip: optimize create element (#3547) * wip: optimize create element * wip: add pino logger to nextjs * feat: add pino file logging for nextjs * feat: add tracker for observability * refactor: builder hook to provider * wip: debug why create element form re-renders * refactor: tree view node preview prevent rendering * revert: remove wdyr * fix: resolver specs * fix: component create popover * wip: fix child mapper component field * fix: general fixes and additional e2e coverage (#3554) * refactor: update nextjs version to latest minor one * feat: add confirmation popup on attempt to reset database * refactor: use optimistic update for atoms and resources * fix: builder e2e spec * fix: google-fonts e2e spec * test: create e2e test cases for Auth Guards and Redirects * fix: auth guard page desiplayed wrong label during loading * fix: page builder was shown on attempt to update page * fix: child-mapper e2e spec * fix: build error * fix: lint * fix: generic platform fixes and improvements (#3560) * refactor: use popconfirm instead of modal to delete pages * fix: page builder opened when page update form was shown * fix: long popover titles * fix: router.back did not close the popover * fix: 404 error on hard reload * fix: import component button issues * fix: field popovers did not close * fix: page redirect caching issue * refactor: optimize create element (#3556) * wip: optimize create element * wip: add pino logger to nextjs * feat: add pino file logging for nextjs feat: add pino file logging for nextjs * feat: add tracker for observability feat: add tracker for observability * refactor: builder hook to provider refactor: builder hook to provider * wip: debug why create element form re-renders * refactor: tree view node preview prevent rendering * revert: remove wdyr * wip: fix child mapper component field wip: fix child mapper component field wip: fix child mapper component field wip: fix child mapper component field wip: fix child mapper component field * refactor: move seed data from backend to shared * refactor: extract server code * lint: apply lint * fix: type import refactor: remove entire env configuration implementation feat: centralize env configuration with shared env.ts module fix: update auth0 domain configuration with new env method refactor: centralize env.get usage across services refactor: simplify environment variable configuration using array mapping refactor: change env export to use env.get instead of destructuring refactor: reorganize imports and remove redundant code in env config services refactor: update env import and usage across services revert: decorator changes * revert: decorator changes * wip: debugging web build error * wip: fix tsconfig * ci: fix circleci config * fix: atom specs (#3561) * fix: atom e2e specs * ci: fix circleci config * fix: tsc-check * ci: test out neo4j * fix: storybook with nextjs decorator * wip: fix interface form spec wip: fix interface form spec wip: fix interface form spec * ci: fixing build * ci: fixing build * refactor: rename gql to gqlgen * lint: fix all * ci: fix cypher scripts path ci: fix neo4j ci: fix neo4j ci: fix neo4j ci: fix neo4j ci: fix neo4j ci: fix neo4j * ci: fix neo4j * ci: install cypher shell ci: install cypher shell ci: install cypher shell * ci: install cypher shell * ci: install cypher shell * ci: install cypher shell * ci: install cypher shell * ci: install cypher shell * fix: css element (#3562) * wip: fix css runtime element * e2e: fix css spec, element tree wait * e2e: add global before all setup to child mapper spec * refactor: speed up ci build * ci: add missing param * ci: test out new flow * fix: component dnd (#3497) * fix: builder script error because of not hydrated tags fix: builder script error after element was added fix: issues with empty Action Select fields fix: action create/update form issues fix: runtime actions cleanup when related action removed refactor: builder click overlay fix: elementTree bad state warning fix: elementTree bad state warning revert: unwanted change after rebase refactor: fix edit component on context menu fix: use converted element directly as root element refactor: builder click overlay wip: fix drag and drop wip: adding droppable rectangles feat: finish element blueprints refactor: comment old spec fix: dnd specs fix: renderer specs fix: build issues lint: fix tsconfig.base lint fix: drop indicator fix: restore builder style fix: restore builder style fix: e2e specs fix: convert to component use case fix: build issue fix: unit specs fix: convert element to component use case * revert: unwated changes after rebase --------- Co-authored-by: Vladyslav Polishchuk <gm.vpolishchuk@gmail.com> * fix: issues from component dnd PR (#3564) * fix: unit specs * lint: fix lint * fix: general fixes (#3566) * fix: unit specs * lint: fix lint * fix: api log level env variable * fix: build errors * fix: enable cdc on docker container start * fix: tsc check * refactor: add @node to ypes * refactor: remove @unique directive * fix: html atoms apis and general app issues (#3567) * fix: auth redirect form wasn't submitted after targetType chagne * fix: type fields hydration script error * fix: script error on hard reload of builder preview page * fix: html atoms errors and add Children prop where needed * fix: html atoms errors and addChildren prop where needed * refactor: update antd version * fix: script error when running react-node-type-transformer * fix: updated html atoms export diff * fix: codegen diff * fix: script error because connectOrCreate is not supported anymore * fix: codegen (#3568) * fix: codegen * fix: codegen * fix: tsc checks * feat: update package version * fix: rebase --------- Co-authored-by: Webber Wang <webber@codelab.app> * fix: antd atom api fixes and general issues fixes (#3570) * fix: migrate deprecated BackTop component to FloatButton * fix: interfaces and field hydration * fix: antd atoms apis * fix: build command * fix: antd atoms apis * refactor: optimize codegen (#3571) * fix: codegen * fix: tsc checks * feat: update package version * chore: update typescript version * refactor: codegen plugins * fix: build errors * fix: build errors * refactor: codegen plugins * refactor: use client preset again * chore: update codegen libs * wip: optimizing codegen * refactor: remove docs files * refactor: move preset to a lib * refactor: restore unwated change * refactor: codegen file * chore: commit schema * refactor: clean up plugins * refactor: codegen plugins * refactor: codgen plugins * refactor: add end of file to gen files * chore: update prettier * lint: update prettier * lint: disable prettier for gen files * fix: wrong export * lint: addking schema.graphql in prettierignore * refactor: sort keys properly * fix: ignore graphql.gen * fix: revert to graphql.ts * fix: revert to graphql.ts * fix: build error * refactor: codelab preset * refactor: codelab preset * chore: upgrade dependencies * fix: unit specs * ci: logging int (#3563) * ci: change logger for debugging * refactor: layout naming * refactor: search params usage * wip: add global router hydration * wip: logging filter * fix: search params spec * fix: rebase * fix: build errors * test: fix specs * wip: add step wrapper * chore: update lockfile --------- Co-authored-by: assim habeek <assimhabe@gmail.com> Co-authored-by: assim habeek <33001357+assimhabeek@users.noreply.github.com> Co-authored-by: Vladyslav Polishchuk <74900868+vladyslav-polishchuk@users.noreply.github.com> Co-authored-by: Vladyslav Polishchuk <gm.vpolishchuk@gmail.com>
1 parent 2414431 commit 230e16a

File tree

2,615 files changed

+80679
-200663
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,615 files changed

+80679
-200663
lines changed

.aiderignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!apps/
3+
!libs/
4+
# Stuck scanning map for some odd reason
5+
**/ChildMapperField.tsx

.circleci/config.yml

Lines changed: 136 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
commands:
2-
build-repo:
3-
description: Build Repo
2+
build-nx-apps:
3+
description: Build Nx Apps
44
steps:
55
- nx/set-shas:
66
main-branch-name: master
@@ -12,6 +12,7 @@ commands:
1212
name: Restore NX Cache
1313
- run:
1414
command: (./scripts/nx/reset-cache.sh)
15+
name: Monitor NX Cache Size
1516
- run:
1617
command: pnpm nx run-many --target=build --projects=web,api -c ci --nx-bail
1718
- save_cache:
@@ -20,6 +21,27 @@ commands:
2021
paths:
2122
- ~/project/.nx/cache
2223
- ~/project/dist/apps/web/.next/cache
24+
build-nx-libs:
25+
description: Build Nx Libs
26+
steps:
27+
- nx/set-shas:
28+
main-branch-name: master
29+
- restore_cache:
30+
keys:
31+
- nx-cache-libs-{{ .Environment.CIRCLE_BRANCH }}-{{ checksum "pnpm-lock.yaml" }}
32+
- nx-cache-libs-{{ .Environment.CIRCLE_BRANCH }}-
33+
- nx-cache-libs-
34+
name: Restore NX Cache
35+
- run:
36+
command: (./scripts/nx/reset-cache.sh)
37+
name: Monitor NX Cache Size
38+
- run:
39+
command: pnpm nx run-many --target=build --all --exclude=web,api -c ci
40+
- save_cache:
41+
key: nx-cache-libs-{{ .Environment.CIRCLE_BRANCH }}-{{ checksum "pnpm-lock.yaml" }}
42+
name: Save NX Cache
43+
paths:
44+
- ~/project/.nx/cache-libs
2345
clear-jest-cache:
2446
description: Clear Jest Spec
2547
steps:
@@ -30,6 +52,19 @@ commands:
3052
description: Increment Docker Version
3153
steps:
3254
- run: ~/project/.circleci/config/commands/increment-docker-version.sh
55+
install-cypher-shell:
56+
steps:
57+
- run:
58+
command: |
59+
# https://neo4j.com/docs/operations-manual/current/installation/linux/debian/
60+
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg
61+
62+
echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable latest' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
63+
64+
sudo apt-get update
65+
66+
sudo apt-get install -y neo4j cypher-shell
67+
name: Install Cypher Shell
3368
install-nvm:
3469
steps:
3570
- restore_cache:
@@ -46,8 +81,8 @@ commands:
4681
- ~/.nvm
4782
- run:
4883
command: |
49-
nvm install 18.18.0
50-
nvm alias default 18.18.0
84+
nvm install 20.18.1
85+
nvm alias default 20.18.1
5186
node -v
5287
name: Set Node Version
5388
install-packages:
@@ -144,28 +179,43 @@ commands:
144179
- nvm-cache-{{ checksum ".nvmrc" }}
145180
name: Restore NVM Cache
146181
- install-pnpm
182+
- install-cypher-shell
147183
- setup-env
148184
setup-env:
149185
description: Setup Env
150186
steps:
151187
- run:
152188
command: source ~/project/.circleci/config/env.sh
153189
name: Setup Env
190+
setup-neo4j:
191+
description: Setup Neo4j
192+
steps:
193+
- run:
194+
command: |
195+
neo4j-admin server memory-recommendation --docker
196+
name: Run Neo4j Memory Recommendations
197+
- run:
198+
command: |
199+
~/project/.docker/cypher/scripts/enable-cdc.sh
200+
name: Enable CDC
201+
- run:
202+
command: |
203+
~/project/.docker/cypher/scripts/apply-constraints.sh
204+
name: Apply Neo4j Constraints
205+
working_directory: ~/project/.docker/cypher
154206
executors:
155207
docker-node:
156208
docker:
157-
- image: cimg/node:18.18.0-browsers
209+
- image: cimg/node:20.18.1-browsers
158210
docker-node-neo4j:
159211
docker:
160-
- image: cimg/node:18.18.0-browsers
212+
- image: cimg/node:20.18.1-browsers
161213
name: 127.0.0.1
162-
- command:
163-
- neo4j
164-
- start
165-
environment:
214+
- environment:
215+
NEO4J_ACCEPT_LICENSE_AGREEMENT: 'yes'
166216
NEO4J_AUTH: neo4j/password
167217
NEO4J_PLUGINS: '["apoc"]'
168-
image: neo4j:5.25.1
218+
image: neo4j:5.26.0-enterprise
169219
machine-ubuntu:
170220
machine:
171221
image: ubuntu-2004:2022.04.1
@@ -178,6 +228,33 @@ executors:
178228
environment:
179229
TF_WORKSPACE: prod
180230
jobs:
231+
build-nx-apps:
232+
environment:
233+
NODE_OPTIONS: --max-old-space-size=<< parameters.max_old_space_size >>
234+
executor: docker-node
235+
parameters:
236+
max_old_space_size:
237+
type: integer
238+
resource_class:
239+
type: string
240+
resource_class: << parameters.resource_class >>
241+
steps:
242+
- restore-workspace
243+
- build-nx-apps
244+
build-nx-libs:
245+
environment:
246+
NODE_OPTIONS: --max-old-space-size=<< parameters.max_old_space_size >>
247+
NX_CACHE_DIRECTORY: ~/project/.nx/cache-libs
248+
executor: docker-node
249+
parameters:
250+
max_old_space_size:
251+
type: integer
252+
resource_class:
253+
type: string
254+
resource_class: << parameters.resource_class >>
255+
steps:
256+
- restore-workspace
257+
- build-nx-libs
181258
codegen:
182259
executor: docker-node-neo4j
183260
parameters:
@@ -186,6 +263,7 @@ jobs:
186263
resource_class: << parameters.resource_class >>
187264
steps:
188265
- restore-workspace
266+
- setup-neo4j
189267
- run:
190268
command: pnpm cli tasks graphql-codegen --stage ci
191269
name: Check GraphQL Codegen
@@ -254,7 +332,7 @@ jobs:
254332
environment:
255333
NODE_OPTIONS: --max-old-space-size=<< parameters.max_old_space_size >>
256334
executor: docker-node-neo4j
257-
parallelism: 2
335+
parallelism: 4
258336
parameters:
259337
max_old_space_size:
260338
type: integer
@@ -263,6 +341,7 @@ jobs:
263341
resource_class: << parameters.resource_class >>
264342
steps:
265343
- restore-workspace
344+
- setup-neo4j
266345
- run: pnpm npx playwright install-deps
267346
- run:
268347
command: |
@@ -291,6 +370,7 @@ jobs:
291370
resource_class: << parameters.resource_class >>
292371
steps:
293372
- restore-workspace
373+
- setup-neo4j
294374
- run:
295375
command: pnpm cli tasks int --stage ci
296376
environment:
@@ -316,9 +396,6 @@ jobs:
316396
- run:
317397
command: pnpm cli tasks lint --stage ci
318398
name: Run Lint on Repository
319-
- run:
320-
command: pnpm cli tasks commitlint --stage ci
321-
name: Commitlint
322399
- store_test_results:
323400
path: ./tmp/reports/lint
324401
notify-failure:
@@ -454,12 +531,6 @@ jobs:
454531
- install-nvm
455532
- install-pnpm
456533
- install-packages
457-
- build-repo
458-
- persist_to_workspace:
459-
paths:
460-
- project/dist/apps/cli
461-
- project/dist/apps/web
462-
root: ~/
463534
tf-apply:
464535
executor: docker-node
465536
parameters:
@@ -508,6 +579,17 @@ jobs:
508579
- .terraformrc
509580
- project/terraform/.terraform
510581
root: ~/
582+
tsc-check:
583+
executor: docker-node
584+
parameters:
585+
resource_class:
586+
type: string
587+
resource_class: << parameters.resource_class >>
588+
steps:
589+
- restore-workspace
590+
- run:
591+
command: pnpm nx run-many --target=tsc-check
592+
name: Run tsc Check
511593
unit:
512594
executor: docker-node
513595
parameters:
@@ -659,6 +741,35 @@ workflows:
659741
requires:
660742
- setup-workspace
661743
resource_class: large
744+
- build-nx-apps:
745+
filters:
746+
branches:
747+
ignore:
748+
- master
749+
- staging
750+
max_old_space_size: 4096
751+
requires:
752+
- setup-workspace
753+
resource_class: large
754+
- build-nx-libs:
755+
filters:
756+
branches:
757+
ignore:
758+
- master
759+
- staging
760+
max_old_space_size: 4096
761+
requires:
762+
- setup-workspace
763+
resource_class: large
764+
- tsc-check:
765+
filters:
766+
branches:
767+
ignore:
768+
- master
769+
- staging
770+
requires:
771+
- setup-workspace
772+
resource_class: large
662773
- codegen:
663774
filters:
664775
branches:
@@ -695,7 +806,7 @@ workflows:
695806
- staging
696807
max_old_space_size: 4096
697808
requires:
698-
- setup-workspace
809+
- build-nx-apps
699810
resource_class: large
700811
- notify-success:
701812
filters:
@@ -708,6 +819,9 @@ workflows:
708819
- codegen
709820
- unit
710821
- integration
822+
- build-nx-libs
823+
- build-nx-apps
824+
- tsc-check
711825
- e2e
712826
resource_class: medium
713827
infra-pr:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Can't use `pnpm cli` doesn't exist yet
2+
# We split `apps` and `libs` along with their cache location
3+
4+
description: 'Build Nx Apps'
5+
steps:
6+
- nx/set-shas:
7+
main-branch-name: 'master'
8+
- restore_cache:
9+
name: 'Restore NX Cache'
10+
keys:
11+
- nx-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ checksum "pnpm-lock.yaml" }}
12+
- nx-cache-{{ .Environment.CIRCLE_BRANCH }}-
13+
- nx-cache-
14+
- run:
15+
name: 'Monitor NX Cache Size'
16+
command: (./scripts/nx/reset-cache.sh)
17+
- run:
18+
command: pnpm nx run-many --target=build --projects=web,api -c ci --nx-bail
19+
# CI caching guide https://nextjs.org/docs/pages/building-your-application/deploying/ci-build-caching
20+
# Can also use cache, but we're using workspace for simplicity
21+
- save_cache:
22+
name: 'Save NX Cache'
23+
key: nx-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ checksum "pnpm-lock.yaml" }}
24+
paths:
25+
- ~/project/.nx/cache
26+
# https://github.com/nrwl/nx/issues/5221
27+
- ~/project/dist/apps/web/.next/cache
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Can't use `pnpm cli` doesn't exist yet
2+
3+
description: 'Build Nx Libs'
4+
steps:
5+
- nx/set-shas:
6+
main-branch-name: 'master'
7+
- restore_cache:
8+
name: 'Restore NX Cache'
9+
keys:
10+
- nx-cache-libs-{{ .Environment.CIRCLE_BRANCH }}-{{ checksum "pnpm-lock.yaml" }}
11+
- nx-cache-libs-{{ .Environment.CIRCLE_BRANCH }}-
12+
- nx-cache-libs-
13+
- run:
14+
name: 'Monitor NX Cache Size'
15+
command: (./scripts/nx/reset-cache.sh)
16+
- run:
17+
command: pnpm nx run-many --target=build --all --exclude=web,api -c ci
18+
# CI caching guide https://nextjs.org/docs/pages/building-your-application/deploying/ci-build-caching
19+
- save_cache:
20+
name: 'Save NX Cache'
21+
key:
22+
nx-cache-libs-{{ .Environment.CIRCLE_BRANCH }}-{{ checksum "pnpm-lock.yaml" }}
23+
# nx doesn't use `lockfile.hash` anymore, so move the pnpm
24+
# - nx-cache-{{ checksum ".nx/cache/lockfile.hash" }}
25+
paths:
26+
- ~/project/.nx/cache-libs

.circleci/config/commands/build-repo.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
steps:
2+
- run:
3+
name: 'Install Cypher Shell'
4+
command: |
5+
# https://neo4j.com/docs/operations-manual/current/installation/linux/debian/
6+
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg
7+
8+
echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable latest' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
9+
10+
sudo apt-get update
11+
12+
sudo apt-get install -y neo4j cypher-shell

0 commit comments

Comments
 (0)