Skip to content

feat: preflight scripts for laboratory#5564

Merged
n1ru4l merged 128 commits into
mainfrom
preflight-script
Dec 27, 2024
Merged

feat: preflight scripts for laboratory#5564
n1ru4l merged 128 commits into
mainfrom
preflight-script

Conversation

@dimaMachina

@dimaMachina dimaMachina commented Aug 30, 2024

Copy link
Copy Markdown
Contributor

closes #3612

Preview Link for docs: #5564 (comment)

Comment on lines +37 to +39
supertokens:
ports:
- '3567:3567'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be exposed for the seed script

*/
return {
access_token: data.accessToken.token,
refresh_token: data.refreshToken.token,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need this in cypress for "logging" in the user

Comment on lines +68 to +74
const pg = {
user: ensureEnv('POSTGRES_USER'),
password: ensureEnv('POSTGRES_PASSWORD'),
host: ensureEnv('POSTGRES_HOST'),
port: ensureEnv('POSTGRES_PORT'),
db: ensureEnv('POSTGRES_DB'),
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delaying this assertion because it is not required for seeding within the e2e tests.

Comment thread package.json
Comment thread packages/web/app/package.json Outdated

@n1ru4l n1ru4l Dec 19, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inspired by @jasonkuhrt I tried some namespace action. 😄

I kind of like that types are isolated.

@jasonkuhrt jasonkuhrt Dec 20, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@n1ru4l @dotansimha per some of our other recent discussions, one limitation of TS namespace UNLIKE ESM is that you cannot export * from .... Its a significant limitation in some cases, enough not to use them (for example consider my Typebox namespace in my PR). Another reason to not use them, as mentioned before, is that, again UNLIKE ESM, namespace does not support tree shaking since its actually not a static ECMA feature.

As previously mentioned, IMO the nirvana would be the tc39 inline modules spec (assuming it does what I think it will do haha). It would decouple the concept of module and file, replacing all the use-cases of namespace, while bringing symmetry with ESM such as the aforementioned export * from ... and tree shaking (should, since its a static structure, so bundlers should be able to track it just like they do with ESM file-modules today).

Also, currently, TS unfortunately has poor autocomplete for ESM based namespaces. Truly annoying because it means we are stuck, in some cases, between this choice:

  1. Good IDE experience
  2. Good runtime characteristics (tree shaking namely)

Anyways, I'm pretty passionate and nerdy about this stuff as you can see... 🫶. My interest comes from my belief that namespaces are hugely important to maintainable and readable code.

Comment thread cypress.config.ts
@n1ru4l n1ru4l requested review from dotansimha and n1ru4l December 19, 2024 18:38
This reverts commit fc178c0.
Comment thread package.json
@n1ru4l n1ru4l changed the title add preflight script graphiql plugin feat: preflight scripts for laboratory Dec 19, 2024
@dotansimha

dotansimha commented Dec 25, 2024

Copy link
Copy Markdown
Member

@n1ru4l it needs a rebase.

btw, what about this one? #5748

@n1ru4l n1ru4l enabled auto-merge (squash) December 27, 2024 09:51
@n1ru4l n1ru4l merged commit e0eb3bd into main Dec 27, 2024
@n1ru4l n1ru4l deleted the preflight-script branch December 27, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Preflight script in Laboratory when querying API

9 participants