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

TS SDK Setup #2299

Merged
merged 26 commits into from
Oct 10, 2024
Merged

TS SDK Setup #2299

merged 26 commits into from
Oct 10, 2024

Conversation

sodic
Copy link
Contributor

@sodic sodic commented Sep 18, 2024

Notes for reviewers

You can ignore the todos (they're mostly notes for me and I'll soon be moving them somewhere else).
You can comment on them if you want, but it isn't necessary.

The wasp ts-setup command is unfinished (more on that below). We can discuss how functional it has to be before the release.

Context

This PR is complementary to #2276.

It contains the changes that enable the user to create and work in a TS SDK project that looks like this:

├── main.wasp.mts         // Wasp config file
├── package.json
├── package-lock.json
├── public
├── schema.prisma
├── src
├── tsconfig.src.json     // tsconfig for src
├── tsconfig.json         // Composite  tsconfig
├── tsconfig.wasp.json    // tsconfig for the Wasp config file
├── vite.config.ts
└── node_moduels
    ├── ...
    └── wasp-config       // The package for the TS sdk

Those changes include:

  1. The wasp-config packages that servers as an API for both our users and waspc.
  2. A wasp ts-setup command that sets up the project to work with a config in TypeScript (TS SDK).

It's just the blue parts from this graph plus the prep work necessary for making the whole thing functional. The idea is to review this PR by treating the purple parts as a black box (that part is covered in #2276).

@sodic sodic force-pushed the filip-ts-sdk-setup branch from 02afc25 to f14b617 Compare September 18, 2024 17:54
@sodic sodic changed the title Filip ts sdk setup Filip tas sdk setup Sep 18, 2024
@sodic sodic changed the title Filip tas sdk setup TS SDK Setup Sep 18, 2024
@sodic sodic mentioned this pull request Sep 26, 2024
waspc/cli/exe/Main.hs Show resolved Hide resolved
waspc/cli/exe/Main.hs Show resolved Hide resolved
waspc/cli/src/Wasp/Cli/Command/TsConfigSetup.hs Outdated Show resolved Hide resolved
waspc/packages/wasp-config/src/appSpec.ts Show resolved Hide resolved
waspc/packages/wasp-config/src/mappers.ts Show resolved Hide resolved
waspc/packages/wasp-config/src/_private.ts Outdated Show resolved Hide resolved
waspc/packages/wasp-config/src/run.ts Show resolved Hide resolved
waspc/packages/wasp-config/src/index.ts Outdated Show resolved Hide resolved
@sodic sodic marked this pull request as ready for review October 7, 2024 13:22
Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

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

Ok, did a quick shallow review, let's take of stuff that is important for release, and the rest we can do after it!

For release, what I think is most important is two comments:

  1. How easy it is for them to set up the project to be able to use TS SDK. Existing or new project.
  2. Is it ok that we pollute their package.json with mention of wasp-config package, and that we have that in our basic template.

waspc/cli/exe/Main.hs Show resolved Hide resolved
waspc/cli/src/Wasp/Cli/Command/TsConfigSetup.hs Outdated Show resolved Hide resolved
waspc/cli/exe/Main.hs Show resolved Hide resolved
waspc/cli/src/Wasp/Cli/Command/TsConfigSetup.hs Outdated Show resolved Hide resolved
waspc/src/Wasp/Generator/NpmInstall.hs Show resolved Hide resolved
waspc/src/Wasp/NodePackageFFI.hs Show resolved Hide resolved
waspc/src/Wasp/NodePackageFFI.hs Show resolved Hide resolved
waspc/src/Wasp/NodePackageFFI.hs Show resolved Hide resolved
Base automatically changed from filip-ts-sdk to ts-sdk-preview October 10, 2024 07:40
@sodic sodic merged commit 21cc896 into ts-sdk-preview Oct 10, 2024
6 checks passed
@sodic sodic deleted the filip-ts-sdk-setup branch October 10, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants