Skip to content

Commit adf27d5

Browse files
Merge pull request #314 from lightningrodlabs/add-zod
add zod schemas to validate migration data parsing logic
2 parents 9711e73 + df621ec commit adf27d5

File tree

73 files changed

+978
-334
lines changed

Some content is hidden

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

73 files changed

+978
-334
lines changed

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
- name: Install nodejs dependencies
1818
run: |
1919
npm run web-install
20+
npm run zod-models-install
21+
npm run zod-models-build
2022
shell: bash
2123
- name: run unit tests
2224
run: |

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ user2-data
55
user-data
66
electron/web
77

8+
zod-models/dist
9+
810
web/dist/fonts
911
web/dist/images
1012
web/dist/*.js

electron/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ ipcMain.handle('getVersion', () => {
218218
version: `v${app.getVersion()}`,
219219
platform: process.platform,
220220
arch: process.arch,
221+
integrityVersion: INTEGRITY_VERSION_NUMBER,
221222
}
222223
})
223224

electron/src/paths.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const PREV_VER_USER_DATA_MIGRATION_FILE_PATHS = [
3131
// Acorn 6
3232
path.join(USER_DATA_PATH, `${MIGRATION_FILE_NAME_PREFIX}9`),
3333
// uncomment the below line for development testing
34+
// of migration-feature
3435
// path.join(USER_DATA_PATH, `${MIGRATION_FILE_NAME_PREFIX}${INTEGRITY_VERSION_NUMBER}`),
3536
]
3637

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
"url": "git+https://github.com/h-be/acorn.git"
88
},
99
"scripts": {
10-
"install-deps": "npm install && npm run web-install && npm run electron-install && npm run electron-tsc",
10+
"install-deps": "npm install && npm run web-install && npm run zod-models-install && npm run electron-install && npm run electron-tsc",
1111
"dev": "pm2-dev pm2.config.js",
1212
"user-data-reset": "rm -rf user-data && mkdir user-data",
1313
"web-install": "cd web && npm install",
14+
"zod-models-install": "cd zod-models && npm install",
15+
"zod-models-build": "cd zod-models && npm run build",
1416
"web": "cd web && WEB_PORT=8081 ADMIN_WS_PORT=1101 APP_WS_PORT=8101 npx webpack-dev-server --config webpack.dev.js",
1517
"web2": "cd web && WEB_PORT=8082 ADMIN_WS_PORT=1102 APP_WS_PORT=8102 npx webpack-dev-server --config webpack.dev.js",
1618
"web3": "cd web && WEB_PORT=8083 ADMIN_WS_PORT=1103 APP_WS_PORT=8103 npx webpack-dev-server --config webpack.dev.js",

web/package-lock.json

Lines changed: 37 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@
7979
"reselect": "^4.1.5",
8080
"resolve-url-loader": "^5.0.0",
8181
"type-fest": "^0.17.0",
82-
"use-onclickoutside": "^0.3.1"
82+
"use-onclickoutside": "^0.3.1",
83+
"zod": "^3.21.4",
84+
"zod-models": "file:../zod-models"
8385
},
8486
"scripts": {
8587
"storybook": "storybook dev -p 6006",

web/src/components/ExpandedViewMode/EVMiddleColumn/TabContent/EvDetails/EvDetails.component.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ const EvDetails: React.FC<EvDetailsProps> = ({
364364
projectId={projectId}
365365
onClose={() => setEditAssignees(false)}
366366
activeAgentPubKey={activeAgentPubKey}
367+
profilesPresent={presentMembers}
367368
people={people}
368369
outcomeActionHash={outcomeActionHash}
369370
createOutcomeMember={createOutcomeMember}

web/src/components/Footer/Footer.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.footer {
22
max-height: 48px;
3+
z-index: 3;
34
}
45

56
/* Buttom Left Panel */

web/src/components/MapViewingOptions/MapViewingOptions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ const MapViewingOptions: React.FC<MapViewingOptionsProps> = ({
4949
selectedOptionId={selectedLayeringAlgo}
5050
options={[
5151
{
52-
id: LayeringAlgorithm.LongestPath,
52+
id: "LongestPath",
5353
text: 'Minimum Height',
5454
},
5555
{
56-
id: LayeringAlgorithm.CoffmanGraham,
56+
id: "CoffmanGraham",
5757
text: 'Constrained Width',
5858
},
5959
]}

0 commit comments

Comments
 (0)