mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-04-09 12:29:38 +02:00
Upgrade v0.16 (#357)
* bump version * add update banner and cursorrules
This commit is contained in:
parent
f995341f0b
commit
8eecd97147
@ -1,7 +1,7 @@
|
||||
--- template/app/main.wasp
|
||||
+++ opensaas-sh/app/main.wasp
|
||||
@@ -3,30 +3,29 @@
|
||||
version: "^0.15.0"
|
||||
version: "^0.16.0"
|
||||
},
|
||||
|
||||
- title: "My Open SaaS App",
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- template/app/package-lock.json
|
||||
+++ opensaas-sh/app/package-lock.json
|
||||
@@ -0,0 +1,11736 @@
|
||||
@@ -0,0 +1,11737 @@
|
||||
+{
|
||||
+ "name": "opensaas",
|
||||
+ "lockfileVersion": 3,
|
||||
@ -31,6 +31,7 @@
|
||||
+ "react-router-dom": "^6.26.2",
|
||||
+ "stripe": "11.15.0",
|
||||
+ "tailwind-merge": "^2.2.1",
|
||||
+ "tailwindcss": "^3.2.7",
|
||||
+ "vanilla-cookieconsent": "^3.0.1",
|
||||
+ "wasp": "file:.wasp/out/sdk/wasp",
|
||||
+ "zod": "^3.23.8"
|
||||
@ -61,7 +62,6 @@
|
||||
+ "axios": "^1.4.0",
|
||||
+ "express": "~4.21.0",
|
||||
+ "jsdom": "^21.1.1",
|
||||
+ "lodash.merge": "^4.6.2",
|
||||
+ "lucia": "^3.0.1",
|
||||
+ "mitt": "3.0.0",
|
||||
+ "msw": "^1.1.0",
|
||||
@ -74,7 +74,8 @@
|
||||
+ "react-router-dom": "^6.26.2",
|
||||
+ "superjson": "^2.2.1",
|
||||
+ "tailwindcss": "^3.2.7",
|
||||
+ "vitest": "^1.2.1"
|
||||
+ "vitest": "^1.2.1",
|
||||
+ "zod": "^3.23.8"
|
||||
+ },
|
||||
+ "devDependencies": {
|
||||
+ "@tsconfig/node18": "latest",
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Admin Dashboard
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
import { Image } from 'astro:assets';
|
||||
import dbStudio from '@assets/stripe/db-studio.png';
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: User Overview
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
|
||||
This reference will help you understand how the User entity works in this template.
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Analytics
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
This guide will show you how to integrate analytics for your app. You can choose between [Google Analytics](#google-analytics) and [Plausible](#plausible).
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Authentication
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
|
||||
Setting up your app's authentication is easy with Wasp. In fact, it's already set up for you in the `main.wasp` file:
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Authorization
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
|
||||
This guide will help you get started with authorization in your SaaS app.
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Cookie Consent Modal
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
import { Image } from 'astro:assets';
|
||||
import cookieBanner from '@assets/cookie-consent/cookiebanner.png';
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Deploying
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
import { Image } from 'astro:assets';
|
||||
import npmVersion from '@assets/stripe/npm-version.png';
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Email Sending
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
import { Tabs, TabItem } from '@astrojs/starlight/components';
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: File Uploading
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
import { Image } from 'astro:assets';
|
||||
import findS3 from '@assets/file-uploads/find-s3.png';
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Payments Integration
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
import { Image } from 'astro:assets';
|
||||
import testApiKeys from '@assets/stripe/api-keys.png';
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: SEO
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
import { Image } from 'astro:assets';
|
||||
import openSaaSGoogle from '@assets/seo/open-saas-google.png';
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Tests
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
|
||||
This guide will show you how to use the included end-to-end (e2e) tests for your Open SaaS application.
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Introduction
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
import HiddenLLMHelper from '../../components/HiddenLLMHelper.astro';
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Getting Started
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
import VideoPlayer from '../../../components/VideoPlayer.astro';
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Guided Tour
|
||||
banner:
|
||||
content: |
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.15</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15">migration instructions.</a>
|
||||
Open SaaS is now running on <b><a href='https://wasp-lang.dev'>Wasp v0.16</a></b>! <br/>⚙️<br/>If you're running an older version and would like to upgrade, please follow the <a href="https://wasp-lang.dev/docs/migration-guides/migrate-from-0-15-to-0-16">migration instructions.</a>
|
||||
---
|
||||
|
||||
Awesome, you now have your very own SaaS app up and running! But, first, here are some important things you need to know about your app in its current state:
|
||||
|
52
template/app/.cursorrules
Normal file
52
template/app/.cursorrules
Normal file
@ -0,0 +1,52 @@
|
||||
// Wasp Import Rules
|
||||
- Path to Wasp functions within .ts files must come from 'wasp', not '@wasp'!
|
||||
✓ import { Task } from 'wasp/entities'
|
||||
✓ import type { GetTasks } from 'wasp/server/operations'
|
||||
✓ import { getTasks, useQuery } from 'wasp/client/operations'
|
||||
✗ import { getTasks, useQuery } from '@wasp/...'
|
||||
✗ import { getTasks, useQuery } from '@src/feature/operations.ts'
|
||||
|
||||
- Path to external imports within 'main.wasp' must start with "@src/"!
|
||||
✓ component: import { LoginPage } from "@src/client/pages/auth/LoginPage.tsx"
|
||||
✗ component: import { LoginPage } from "@client/pages/auth/LoginPage.tsx"
|
||||
- In the client's root component, use the Outlet component rather than children
|
||||
✓ import { Outlet } from 'react-router-dom';
|
||||
|
||||
// Wasp DB Schema Rules
|
||||
- Add databse models to the 'schema.prisma' file, NOT to 'main.wasp' as "entities"
|
||||
- Do NOT add a db.system nor a db.prisma property to 'main.wasp'. This is taken care of in 'schema.prisma'
|
||||
- Keep the 'schema.prisma' within the root of the project
|
||||
|
||||
// Wasp Operations
|
||||
- Types are generated automatically from the function definition in 'main.wasp',
|
||||
✓ import type { GetTimeLogs, CreateTimeLog, UpdateTimeLog } from 'wasp/server/operations'
|
||||
- Wasp also generates entity types based on the models in 'schema.prisma'
|
||||
✓ import type { Project, TimeLog } from 'wasp/entities'
|
||||
- Make sure that all Entities that should be included in the operations context are defined in its definition in 'main.wasp'
|
||||
✓ action createTimeLog { fn: import { createTimeLog } from "@src/server/timeLogs/operations.js", entities: [TimeLog, Project] }
|
||||
|
||||
// Wasp Auth
|
||||
- When creating Auth pages, use the LoginForm and SignupForm components provided by Wasp
|
||||
✓ import { LoginForm } from 'wasp/client/auth'
|
||||
- Wasp takes care of creating the user's auth model id, username, and password for a user, so a user model DOES NOT need these properties
|
||||
✓ model User { id Int @id @default(autoincrement()) }
|
||||
|
||||
// Wasp Dependencies
|
||||
- Do NOT add dependencies to 'main.wasp'
|
||||
- Install dependencies via 'npm install' instead
|
||||
|
||||
// Wasp
|
||||
- Use the latest Wasp version, ^0.16.0
|
||||
- Always use typescript for Wasp code.
|
||||
- When creating Wasp operations (queries and actions) combine them into an operations.ts file within the feature directory rather than into separate queries.ts and actions.ts files
|
||||
|
||||
// React
|
||||
- Use relative imports for other react components
|
||||
- If importing a function from an operations file, defer to the wasp import rules
|
||||
|
||||
// CSS
|
||||
- Use Tailwind CSS for styling.
|
||||
- Do not use inline styles unless necessary
|
||||
|
||||
// General
|
||||
- Use single quotes
|
@ -1,6 +1,6 @@
|
||||
app OpenSaaS {
|
||||
wasp: {
|
||||
version: "^0.15.0"
|
||||
version: "^0.16.0"
|
||||
},
|
||||
|
||||
title: "My Open SaaS App",
|
||||
|
@ -5,6 +5,8 @@
|
||||
// compiler. Proper TS compiler configuration in Wasp is coming soon :)
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": ".wasp/out/user",
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
// We're bundling all code in the end so this is the most appropriate option,
|
||||
@ -32,10 +34,5 @@
|
||||
// Source 2: https://github.com/testing-library/jest-dom/issues/546#issuecomment-1889884843
|
||||
"node_modules/@types"
|
||||
],
|
||||
// Since this TS config is used only for IDE support and not for
|
||||
// compilation, the following directory doesn't exist. We need to specify
|
||||
// it to prevent this error:
|
||||
// https://stackoverflow.com/questions/42609768/typescript-error-cannot-write-file-because-it-would-overwrite-input-file
|
||||
"outDir": ".wasp/phantom"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user