Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: preflight scripts for laboratory #5564

Merged
merged 128 commits into from
Dec 27, 2024
Merged

feat: preflight scripts for laboratory #5564

merged 128 commits into from
Dec 27, 2024

Conversation

dimaMachina
Copy link
Contributor

@dimaMachina dimaMachina commented Aug 30, 2024

closes #3612

Preview Link for docs: #5564 (comment)

Comment on lines +37 to +39
supertokens:
ports:
- '3567:3567'
Copy link
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

@@ -131,6 +131,7 @@ const createSession = async (
*/
return {
access_token: data.accessToken.token,
refresh_token: data.refreshToken.token,
Copy link
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
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.

package.json Show resolved Hide resolved
Copy link
Contributor

@n1ru4l n1ru4l Dec 19, 2024

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.

Copy link
Member

@jasonkuhrt jasonkuhrt Dec 20, 2024

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.

@n1ru4l n1ru4l requested review from n1ru4l and dotansimha December 19, 2024 18:38
This reverts commit fc178c0.
package.json Show resolved Hide resolved
@n1ru4l n1ru4l changed the title add preflight script graphiql plugin feat: preflight scripts for laboratory Dec 19, 2024
@dotansimha
Copy link
Member

dotansimha commented Dec 25, 2024

@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
28 checks passed
@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
8 participants