Commit Graph

29 Commits

Author SHA1 Message Date
Kristaps Fabians Geikins bde148f286 chore(server): migrating fully to ESM (#5042)
* wip

* some extra fixes

* stuff kinda works?

* need to figure out mocks

* need to figure out mocks

* fix db listener

* gqlgen fix

* minor gqlgen watch adjustment

* lint fixes

* delete old codegen file

* converting migrations to ESM

* getModuleDIrectory

* vitest sort of works

* added back ts-vitest

* resolve gql double load

* fixing test timeout configs

* TSC lint fix

* fix automate tests

* moar debugging

* debugging

* more debugging

* codegen update

* server works

* yargs migrated

* chore(server): getting rid of global mocks for Server ESM (#5046)

* got rid of email mock

* got rid of comment mocks

* got rid of multi region mocks

* got rid of stripe mock

* admin override mock updated

* removed final mock

* fixing import.meta.resolve calls

* another import.meta.resolve fix

* added requested test

* nyc ESM fix

* removed unneeded deps + linting

* yarn lock forgot to commit

* tryna fix flakyness

* email capture util fix

* sendEmail fix

* fix TSX check

* sender transporter fix + CR comments

* merge main fix

* test fixx

* circleci fix

* gqlgen bigint fix

* error formatter fix

* more error formatting improvements

* esmloader added to Dockerfile

* more dockerfile fixes

* bg jobs fix
2025-07-14 10:26:19 +03:00
Iain Sproat 556c2791b3 feat(file imports): large file uploads now work on docker compose (#5037) 2025-07-07 11:00:55 +01:00
Iain Sproat 413937c0fa Merge branch 'main' into iain/ratelimiter-should-respect-configuration 2025-04-28 08:16:19 +01:00
Iain Sproat 861092c93b chore(server/logging): operations logging for gendo module 2025-04-14 20:36:48 +01:00
Kristaps Fabians Geikins f59c0a72c6 feat: model related auth checks in BE & FE (#4374)
* limit fragment cleanup

* be updated

* model checks in FE

* tests fix

* fakes util fix
2025-04-11 10:09:54 +03:00
Kristaps Fabians Geikins f76a2c34d3 chore: add no floating promises lint rule (#4249)
* chore: add no floating promises lint rule

* minor cleanup

* fix test by only running if node 22 or greater

---------

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2025-03-25 13:36:49 +02:00
Iain Sproat 5655b3e758 fix(metrics): pass registry in to modules (#4113)
- ensure metrics are added to the correct registry
2025-03-06 08:37:05 +00:00
Iain Sproat fb95dd3bdd Merge branch 'main' into iain/ratelimiter-should-respect-configuration 2025-02-28 09:23:48 +00:00
Iain Sproat ce08e5e02d refactor(server): logging directory renamed to observability (#4077) 2025-02-28 08:43:54 +00:00
Iain Sproat 8d1aceb7fc incorporate PR review comment - set rate limit enabled once 2025-02-25 11:37:51 +00:00
Iain Sproat c593990b22 Move ratelimiter from services to utils 2025-02-25 09:27:24 +00:00
Iain Sproat 62b65bb566 wrap the logic into a callable function and add tests 2025-02-24 12:26:34 +00:00
Iain Sproat d2436e3a4d fix(ratelimiter): do not check rates if rate limiter disabled 2025-02-21 17:45:31 +00:00
Kristaps Fabians Geikins 1d2a594f0a chore: upgrade TS 5.2 -> 5.7.3 & ESLint to 9.20.1 (#4032)
* chore: upgrade TS 5.2 -> 5.7.3

* vite dts fix

* lint fix

* resolutions fix

* ui comp build fix

* precommit fix?

* latest eslint version

* autoloader fix

* undo unnecessary viewer change

* eslint fixes fe2 + trying disabled type linting

* lint fixes
2025-02-20 14:18:18 +02:00
Iain Sproat 1c0b6e228d chore(server/middleware): allow CORS to be configurable (#4018)
- renames corsMiddleware to corsMiddlewareFactory to follow naming convention
- optionally allow cors middleware to be configured
- amend direct calls of `cors` package to now use middleware factory
2025-02-18 13:50:34 +00:00
Kristaps Fabians Geikins 8d0cbad8b6 feat(server): multi region blob support (#3653)
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2024-12-10 09:05:18 +00:00
Gergő Jedlicska 01b222ced8 gergo/web 2155 gendo module multi region (#3528)
* fix(workspaces): allow workspace delete for paid workspaces

* feat(gendo): multi region gendo with new api integration and limits

* feat(gendo): user credits

* feat: adds limits to gendo panel, and terms and conditions link

* fix: reworks setting back camera view

* feat(gendo): webhook signature verification

* fix(gendo): nullability

* test(blobstorage): fix test dependency injection

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-11-22 16:43:31 +01:00
Kristaps Fabians Geikins 4a29e5f650 chore(server): gendo IoC #5 - getVersionRenderRequestFactory 2024-10-24 17:01:09 +03:00
Kristaps Fabians Geikins 62e9c60111 chore(server): gendo IoC #4 - getLatestVersionRenderRequestsFactory 2024-10-24 16:52:30 +03:00
Kristaps Fabians Geikins c9aed9c92a chore(server): gendo IoC #3 - updateRenderRequestFactory 2024-10-24 16:36:39 +03:00
Kristaps Fabians Geikins fcbd7f2eb7 chore(server): gendo IoC #2 - createRenderRequestFactory 2024-10-24 16:07:27 +03:00
Kristaps Fabians Geikins 6d53308fd8 chore(server): gendo IoC #1 - prep/cleanup before getting started 2024-10-24 15:39:41 +03:00
Iain Sproat 0ec4a87c7c fix(file import): server port was broken when localhost was canonical url (#3360)
* fix(file import): server port was broken when localhost was canonical url
- use getServerOrigin() instead of directly calling process.env.CANONICAL_URL
- where server is calling itself, use 127.0.0.1 instead of CANONICAL_URL.
- where server is calling itself (i.e. 127.0.0.1, use the server's listening port and not default for protocol http/80, https/443
- tidy some areas where process.env was called directly; should use envHelper.

* fix tests
2024-10-22 21:12:18 +02:00
Gergő Jedlicska 8cba7eb6f7 gergo/web 1968 add features list (#3332)
* feat(gatekeeper): add gatekeeper module feature flag

* feat(gatekeeper): add workspace pricing table domain

* feat(gatekeeper): add checkout session creation

* feat(gatekeeper): verify stripe signature

* wip(gatekeeper): checkout callbacks

* feat(gatekeeper): add unlimited and academia plan types

* refactor(envHelper): getStringFromEnv helper

* chore(gatekeeper): add future todos

* feat(gatekeeper): add productId to the subscription domain

* feat(gatekeeper): add in memory repositories

* feat(gatekeeper): add more errors

* feat(gatekeeper): complete checkout session service

* feat(gatekeeper): add stripe client implementation

* feat(gatekeeper): add checkout session completion webhook callback path

* feat(gendo): fix not needing env vars if gendo module is not enabled

* feat(gatekeeper): require a license for billing

* chore(gatekeeper): cleanup before testing

* feat(gatekeeper): subscriptionData parsing model

* ci: add billing integration and gatekeeper modules to test config

* test(gatekeeper): add checkout service tests

* feat(gatekeeper): make completeCheckout callback idempotent properly

* feat(gatekeeper): move to knex based repositories

* test(gatekeeper): billing repository tests

* feat(gatekeeper): add yearly billing cycle toggle

* feat(ci): add stripe integration context to test job

* feat(billingPage): conditionally render the checkout CTAs

* fix(gatekeeper): remove flaky test condition

* feat(helm): add billing integration feature flag
2024-10-20 15:40:31 +02:00
Iain Sproat f93d9093a0 fix(errors): all error should define an appropriate status code (#3112)
* fix(errors): all error should define a status code (default is 500)
- rename NoInviteFoundError to InviteNotFoundError to match xNotFoundError pattern

* remove unused errors
2024-09-25 13:08:13 +02:00
Kristaps Fabians Geikins d8693b59a7 chore(server): blobstorage IoC 7 - getFileStreamFactory 2024-09-12 13:32:02 +03:00
Kristaps Fabians Geikins 33071c7e2c chore(server): blobstorage IoC 3 - uploadFileStreamFactory 2024-09-11 16:14:38 +03:00
Kristaps Fabians Geikins d944b99172 fix(server): unexpected INTERNAL_SERVER_ERROR error codes for expected error cases (#2461) 2024-07-02 12:44:36 +03:00
Dimitrie Stefanescu 35ed179799 Dim/gendo (#2283)
* feat(gendo): scaffolding

* feat(gendo): wip

* feat(gendo): wip

* feat(gendo): wip

* feat(gendo): wip

* feat(gendo): wip

* feat(gendo): it's alive

* feat(gendo): wip

* feat(gendo): blobifies responses to make gergo happy

* feat(gendo): ratelimiting + lints

* feat(gendo): prettier fix

* feat(gendo): last fixes

* feat(gendo): clarifications

* feat(gendo): helm base

* update helm values and deployment to use secrets and allow them to be configured

* Allow the rate limiter to be configured

* Use valid Gendo AI api as default

* fix(helm chart): environment variables should be strings

---------

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2024-05-29 11:48:17 +02:00