Граф коммитов

49 Коммитов

Автор SHA1 Сообщение Дата
Kristaps Fabians Geikins ee16b083ba
feat(server): run tests in multiregion mode if RUN_TESTS_IN_MULTIREGION_MODE=true 2024-11-08 18:03:13 +02:00
Kristaps Fabians Geikins 5df716bf1c
feat: add & list server regions (#3423)
* WIP create modal

* babababa

* create dialog looks ok

* FE largely there

* workss

* cleanup

* fixed up test plumbing to avoid deadlocks and simplify GQL calls

* test fix

* added all tests

* CI fix
2024-10-31 16:08:50 +01:00
Iain Sproat 55d51bd84f
feat(db monitor): adds a new metric speckle_db_tablesize with db table sizes (#2474)
* feat(db queries): adds db query scripts for determining db sizes

* Adds a new metric `speckle_db_tablesize` with db table sizes

* lower case all the file types to provide a combined metric

* group file status count by lower cased file type

* reinstate accidentally deleted metric

* Fix developer script
2024-07-05 15:12:27 +01:00
Kristaps Fabians Geikins 2f8272b6ae
feat(shared): modularized package & node16 support (#2336)
* feat(shared): modularized package & node16 support

* lockfile update

* various fixes

* moar fixes

* added znv and zod as devdeps of shared

* lockfile update
2024-06-11 14:12:13 +03:00
Iain Sproat c7a5beacf8
chore(.gitignore): add data directories (#1896) 2023-12-01 18:23:01 +00:00
Gergő Jedlicska 25633ca17f
fix(frontend 1 config): make sure fe1 serves on 127.0.0.1 instead of localhost 2023-08-09 16:21:57 +02:00
Iain Sproat dc762525c6
chore(gitignore): ignore temporary vite config files (#1624) 2023-06-13 11:24:50 +01:00
Kristaps Fabians Geikins 440adbd3f9
feat: checking schema changes against apollo studio (#1603) 2023-05-30 12:35:15 +03:00
Kristaps Fabians Geikins 2eb5f51af3
feat: dui3 package (#1585) 2023-05-19 16:57:28 +03:00
Kristaps Fabians Geikins 7d3be1d131
feat: tailwind theme & Vue base components extracted to own NPM packages (#1576) 2023-05-16 13:43:04 +03:00
Kristaps Fabians Geikins b02a07e2b6
feat: Frontend 2.0 MVP 2023-05-08 10:47:01 +03:00
Iain Sproat a537d34dcc
Rate limit all endpoints (#1213)
* Demonstration of bug to test when middleware added
- Adding middleware, even no-op, causes test to fail

* Make middleware async, but introduce delay.
Revert test back to original.

* Revert tests

* Add a 1ms sleep to the test to reduce likelihood of flakiness

* Rate limiting on all express endpoints using middleware

* Adds all configuration for existing rate limited endpoints

* It is helpful to add the package to yarn first

* Implements respectsLimits using Redis rate limiter

* Fix for test `Should rate-limit user creation`
- if rate limit error, post to `/auth/local/register` will return a 429 status code

* All rate limiting provided by new ratelimiter.ts

* Consolidate typescript interfaces

* Amend signature of function to require source to be passed in, and not try to guess it from the request

* Rename respectsLimits to isWithinRateLimits

* Throw within catch of Promise

* Replace rejectsRequestWithRatelimitStatusIfNeeded throughout code

* Sending rate limit response should deal with other types of error
- Sentry notified of the error

* Express middleware rate limits by a 3 second burst or a daily rate
- Provide action when generating 429 response

* Prevent DOS of Redis

* Add 'Retry-After' for all cases when responding with 429 status code
- default of 1 day, but dynamic based on available information

* Generate rate limiters once, on init
- Improved and consistent handling of exit from functions
- fixed environment variable names

* WIP Refactor rate limiting setup

Co-authored-by: Iain Sproat <iainsproat@users.noreply.github.com>

* WIP: fixed references, now runs but tests fail

* Use getSourceFromRequest where possible

* WIP: unit tests for rate limiter

* Unit tests for ratelimiter

* feat(IFC): WIP IFC parser improvements

* Revert "feat(IFC): WIP IFC parser improvements"

This reverts commit 093089a2c4.

* refactor authz, rate limiting middleware to global

Co-authored-by: Kristaps Fabians Geikins <fabis94@users.noreply.github.com>
Co-authored-by: Iain Sproat <iainsproat@users.noreply.github.com>

* invites tests fix

* fix(server ratelimiter): export public interfaces

* Unit test for rate limiter use in memory rate limiter
- in memory rate limiter is configured with zero limit by default

* Fixed #1219 (#1221)

* WIP: improve auth test for rate limiting user creation

* ci(circleci config): publishing was broken when main branch was tagged (i.e. for releases) (#1224)

* Gitignore CPU profiles

* All tests are  now passing locally

* Fixed an issue in the frontend which was causing the views not to work. Fixed an issue with object selection camera animation where the dolly lerp factor was much too high for smooth animation (#1225)

* feat(structured logging): implements structured logging for backend (#1217)

* each log line is a json object
* structured logging allows logs to be ingested by machines and the logs to be indexed and queried addresses #1105
* structured logging allows arbitrary properties to be appended to each log line, and ingestion of logs to remain robust
* Structured logging provided by `pino` library
* Add `express-pino-logger` dependency
* Remove `debug`, `morgan`, and `morgan-debug` and replace with structured logging
* `console.log` & `console.error` replaced with structured logging in backend
* Remove `DEBUG` environment variable and replace with `LOG_LEVEL`
- Note that there is a test which reads from a logged line on `stdout`. This is not robust, it would be better to use the childProcess.pid to look up the port number.
* Log errors at points we explicitly send error to Sentry
* Amend indentation of a couple of log messages to align indentation with others

* Revert "feat(structured logging): implements structured logging for backend (#1217)" (#1227)

This reverts commit 84cb74e8b3.

* Move error to core/errors
- augmented typescript types moved to type-augmentations

* Added a missing wait in the screenshot generation loop (#1228)

* refactor(server rest api): remove duplicate rate limit requests

* feat(server rate limits): increase rate limits for the upload endpoints

* chore(server rate limits): final cleanup

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Iain Sproat <iainsproat@users.noreply.github.com>
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@users.noreply.github.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
Co-authored-by: Alexandru Popovici <alexandrupopoviciioan@gmail.com>
2022-11-29 17:06:11 +01:00
Iain Sproat 8255015696
Adds gitguardian ggshield pre-commit hook (#912)
* Adds gitguardian ggshield pre-commit step
* Intended to be run locally and not in CI
* Updates gitguardian config to version 2
2022-10-25 13:41:00 +01:00
Kristaps Fabians Geikins 0a58381174
feat: @speckle/shared & some comments fixes (#997) 2022-10-10 16:32:23 +03:00
Kristaps Fabians Geikins 2fef8b7de3
refactor(frontend): vue cli v4 -> vite (#1000) 2022-10-05 15:59:11 +03:00
Kristaps Fabians Geikins 0427f5cfd1
feat(server): new base email template + implementation for invites emails (#903)
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2022-08-11 11:00:01 +03:00
Kristaps Fabians Geikins b966f20fdb
refactor(server): typescript support (#874)
Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-08-04 14:21:39 +02:00
Iain Sproat 965c89c1b4
chore(.gitignore): ignore VSCode log files (#854)
In the event of an error in VSCode, the IDE produces log files in the .vscode file.  These should
not be checked in to the project as they are specific to the error on the developer's local machine.
2022-08-02 12:39:51 +02:00
Gergő Jedlicska ed458fb619
Add blob storage backend (#802)
* feat(server): add server authz pipeline rework first sketch

* feat(server authz): add new server authz middleware poc implementation

* test(server authz): add unittests for the new server authz workflow

* feat(wip rework of fileuploads vs blob storage): add basim impl of separate blob storage service

* feat(fileimport service): refactored file import service to utilize the new asssetstorage service

* refactor(server errors): refactor server errors to use the shared module definitions

Now all the errors inherit from BaseError

* refactor(fileimport service): cleanup after refactor

* feat(frontend fileimports): use the new blob storage for downloading the original file

* refactor(server fileimports): clean up the remnants of S3 storage from file imports

* refactor(server authz): centralize generic authz pipeline configs

* refactor(server blob storage): refactor / rename everything to use the `blob-storage` name

* ci(circleci): add s3 objectstorage environment variables

* ci(circleci): fix missing env variables

* ci(circleci): add minio test container

* ci(circleci): fix minio app startup

* ci(circleci): enable circleci remote docker

* ci(circleci): fix minio startup

* ci(cirleci): detach and wait properly for minio to start

* ci(circleci): revert to additional minio img config, it only fails when the container is stopped ?!

* ci(circleci): disable file uploads

* fix(fileimports): update with blob storage refactor leftovers

* feat(server blob storage): add blob storage graphql api

* refactor(server errors): merge new errors to shared module

* fix(server comments rte): fix import for RTE error

* chore(fileimports): remove node-fetch from dependency

* chore(server): remove body parser dependency

* fix(server blob storage): fix gql api

* fix(frontend): fix fileupload item not loading the new upload status, cause of premature event fire

* feat(server blob storage): fix file size limit and allow for public streams

* Update packages/server/modules/blobstorage/graph/schemas/blobstorage.graphql

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>

* chore(blobstorage): fix PR review issues

* fix(server): fix import bugs

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2022-06-16 11:31:03 +02:00
AlexandruPopovici 439201ce0e Merged with main 2022-05-24 12:12:30 +03:00
Gergő Jedlicska 638969cd01
gergo/yarn (#753)
* yarn first go

* fix frontend build cache loader

* yarn workspaces built server Docker

* build(yarn): add workspaces plugin config

* chore(package defs): clean package*.json -s

* chore(gitignore): ignore yarn error log

* build(yarn): update yarn lock

* build(preview-service webpack): add extra resolved path to preview service webpack config

because of yarn package hoisting, there are no package level node_modules folder anymore.

* build(docker): update dockerignore with yarn specific configs

* build(docker): update Dockerfiles for yarn workspaces utilization

* ci(circleci): update server test job to yarn

* ci(circle): disable cache restore

* ci(circleci): trying the node orb yarn-run

* ci(circleci): yarn-run again

* ci(circleci): disable node orb

* ci(circleci): change base node image for tests

* ci(circleci): add yarn cache

* ci(circleci): remove node install step

* ci(circleci): add server specific cache archives

* ci(circleci): test build and publish

* ci(circleci): change npm auth method to suit yarn

* ci(circleci): trying new builder image

* ci(circleci): another base image, maybe this works

* ci(circleci): force a specific docker engine version

* ci(circleci): add yarn version plugin and its changes

* ci(circleci): cleanup and remove temp branch config

* chore(package defs): moving from npm run to yarn

* explicitly specifying webpack4 as a frontend dep

* chore(package defs): replace npm with yarn everywhere

* docs(root readme): update with some yarn specific docs

* chore(root workspace): update dev scripts and package lock

* ci(circleci): enable package publish step with yarn

Co-authored-by: Fabians <fabis94@live.com>
2022-05-19 19:53:07 +02:00
Fabians a47e226a0c Fixing TS config for viewer 2022-05-10 11:51:12 +03:00
Kristaps Fabians Geikins 5fdd17b63b
feat: husky for linting only staged code (#698) 2022-04-14 10:35:34 +03:00
Kristaps Fabians Geikins e8869e210c
feat(frontend): build speed & chunk structure optimization (#690)
* feat(frontend): build speed & chunk structure optimization

* fix: attempting to work around precommit inconsistent eslint config

* chore(pre-commit config): ignore mocharc for eslint

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-04-13 10:21:24 +03:00
Fabians c91f0a4bba feat: fixed viewer & objectloader build configs 2022-04-08 12:46:34 +03:00
Gergő Jedlicska 99868dbce2 ci(circle ci): add npm publish route 2022-04-07 11:37:30 +02:00
Kristaps Fabians Geikins 94b0174b16 feat(server): configurable .env.test & auto-creation of the test db 2022-03-17 13:08:27 +02:00
Kristaps Fabians Geikins 8010bf3c4c
feat: Standardized & cleaned up formatting & linting across repo #617 (#618)
* feat: Standardized & cleaned up formatting & linting across repo

Co-authored-by: Kristaps Fabians Geikins <fabians@speckle.systems>
Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-03-16 10:10:30 +02:00
Alan Rynne e45844c2ef fix(ifc): Resolve promises in values and arrays 2022-02-09 19:42:55 +01:00
Gergő Jedlicska 12fcf99425 build(test-deployment): add Dockerfile and CI to test deployment script
For Helm test operations, a test container is needed, this add a container definition and ci steps
2022-01-13 19:44:25 +01:00
Gergő Jedlicska db7694d7c9 build((server) test reporting): add CircleCI test reporting from mocha 2021-10-14 16:49:31 +02:00
Gergő Jedlicska 7a2fce2d8a chore(gitignore): ignore asdf tool-versions convig file 2021-09-08 12:32:03 +02:00
Alan Rynne 310ae9c9a8 Admin Panel: Sidebar, overview and settings 2021-06-07 09:34:48 +02:00
Dimitrie Stefanescu f978556ddf chore: *.crt added to gitignore 2021-04-23 15:31:50 +01:00
cristi8 4fcfd56664 CI test for separate fe and be builds 2021-03-15 11:47:24 +02:00
Alan Rynne f784efa9c3 chore(build): Added demo build files to gitignore 2021-02-25 11:24:13 +01:00
Nicolas Chaulet 1fe3d87fd6 Specify supported node version 2021-01-29 12:15:29 +00:00
Dimitrie Stefanescu 628fac0be0
Merge pull request #84 from gjedlicska/viewer_in_docker
WIP: Viewer in docker
2021-01-26 14:02:03 +00:00
Gergő Jedlicska f14c600470 fix(git and docker ignore files): merged node_modules ignore commands into a single glob pattern
With each new package a new gitignore entry was required, it is now automatically ignored with a
glob pattern. Same thing added to the dockerignore file.
2021-01-26 09:27:14 +01:00
Alan Rynne 6c436ca440 chore(git): Ignore mac hidden files. 2021-01-25 14:54:59 +01:00
Dimitrie Stefanescu 9ec099ef0d feat(viewer): adds small help menu to renderer component 2021-01-22 09:43:31 +00:00
Dimitrie Stefanescu 5d4cf9c616 feat(viewer): scaffolds frontend renderer integration 2021-01-20 20:00:00 +00:00
Dimitrie Stefanescu ce417dd5b2 chore(readme): added readmes for server and frontend 2021-01-03 20:11:36 +02:00
Dimitrie Stefanescu e760c83aef chore(server): minor cleanup 2020-12-22 22:17:30 +02:00
Dimitrie Stefanescu a9a77872d2 feat(gql): stream users now returns a custom type - no longer polluting the original
& many other fixes & squashed bugs (stream counts, other users' streams, etc.)
2020-07-21 23:40:42 +01:00
Dimitrie Stefanescu 23b63c749c feat(structure): structured frontend into an MPA and various other fixes 2020-05-24 20:16:51 +01:00
Dimitrie Stefanescu 7011dd3759 feat(frontend): added vue app 2020-05-22 18:06:34 +01:00
Dimitrie Stefanescu f797365d90 test(coverage): added test coverage reports via nyc/istanbul 2020-04-09 11:07:44 +01:00
Dimitrie Stefanescu 75f0472b03 first commit 2020-03-26 21:45:24 +00:00