diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..37a67009 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +charset = utf-8 +indent_style = space +indent_size = 2 +tab_width = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.gitignore b/.gitignore index 43e17d23..38525f5f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,10 @@ -/template/app/migrations -/template/app/package-lock.json +# Dependencies +node_modules/ + +# MacOS-specific files. .DS_Store -# Local Netlify folder -.netlify +# We want to keep the template clean from the usual build artifacts. +# We also don't want to ship these ignore rules to the users. +template/app/migrations +template/app/package-lock.json diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..d3409cb1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,13 @@ +# Build outputs. +.wasp/ +dist/ + +# OpenSaaS app diff folder. +app_diff/ + +# Formatting `.md` and `.mdx` files can introduce logical changes. +**/blog/**/*.md +**/blog/**/*.mdx + +# Ignore minified JS files in the public folder. +**/public/**/*.js diff --git a/.prettierrc b/.prettierrc index e9c509bb..1f6141c0 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,9 +1,12 @@ { - "trailingComma": "es5", + "plugins": [ + "prettier-plugin-organize-imports", + "prettier-plugin-pkg", + "prettier-plugin-sh", + "prettier-plugin-tailwindcss" + ], "semi": true, - "singleQuote": true, - "endOfLine": "lf", - "tabWidth": 2, - "jsxSingleQuote": true, - "printWidth": 110 + "singleQuote": false, + "jsxSingleQuote": false, + "trailingComma": "all" } diff --git a/opensaas-sh/app_diff/.gitignore.diff b/opensaas-sh/app_diff/.gitignore.diff index ca7c5763..a85eae29 100644 --- a/opensaas-sh/app_diff/.gitignore.diff +++ b/opensaas-sh/app_diff/.gitignore.diff @@ -1,17 +1,20 @@ --- template/app/.gitignore +++ opensaas-sh/app/.gitignore -@@ -6,6 +6,17 @@ - .env - .env.* - +@@ -1,2 +1,20 @@ + node_modules/ + .wasp/ ++ ++.env ++.env.* ++ +# These two we added only because dotenv-vault keeps adding them if it doesn't find them, +# even though we don't need them. Remove them once dotenv-vault stops doing that. +.env* +.flaskenv* + - # Don't ignore example dotenv files. - !.env.example - !.env.*.example ++# Don't ignore example dotenv files. ++!.env.example ++!.env.*.example + +# We don't want to ignore .env.client as it doesn't have any secrets. +!.env.client diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..9e9be059 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,213 @@ +{ + "name": "wasp-repo", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "wasp-repo", + "devDependencies": { + "prettier": "3.5.3", + "prettier-plugin-organize-imports": "4.1.0", + "prettier-plugin-pkg": "0.19.1", + "prettier-plugin-sh": "0.17.4", + "prettier-plugin-tailwindcss": "0.6.13", + "typescript": "~5.8.3" + } + }, + "node_modules/@reteps/dockerfmt": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@reteps/dockerfmt/-/dockerfmt-0.3.6.tgz", + "integrity": "sha512-Tb5wIMvBf/nLejTQ61krK644/CEMB/cpiaIFXqGApfGqO3GwcR3qnI0DbmkFVCl2OyEp8LnLX3EkucoL0+tbFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^v12.20.0 || ^14.13.0 || >=16.0.0" + } + }, + "node_modules/prettier": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-organize-imports": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-4.1.0.tgz", + "integrity": "sha512-5aWRdCgv645xaa58X8lOxzZoiHAldAPChljr/MT0crXVOWTZ+Svl4hIWlz+niYSlO6ikE5UXkN1JrRvIP2ut0A==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "prettier": ">=2.0", + "typescript": ">=2.9", + "vue-tsc": "^2.1.0" + }, + "peerDependenciesMeta": { + "vue-tsc": { + "optional": true + } + } + }, + "node_modules/prettier-plugin-pkg": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-pkg/-/prettier-plugin-pkg-0.19.1.tgz", + "integrity": "sha512-9x2USWidQHxzd6a1+ikVqIm1K9qNs3f+XoUvq9EChaSdkkFUxUnWU/4+2EGttFLDT9DK4d9CwCKGSNZC/EE98g==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + }, + "peerDependencies": { + "prettier": "^3.0.3" + } + }, + "node_modules/prettier-plugin-sh": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/prettier-plugin-sh/-/prettier-plugin-sh-0.17.4.tgz", + "integrity": "sha512-aAVKXZ7GTEMZdZsIPSwMwddwPvt2ibMbRGd4OJAP0G7QoeYZV+mPNg2Oln3R53sZ4PVjeAA7Xzi/PuI0QlHHfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@reteps/dockerfmt": "^0.3.5", + "sh-syntax": "^0.5.6" + }, + "engines": { + "node": ">=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + }, + "peerDependencies": { + "prettier": "^3.0.3" + } + }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.13.tgz", + "integrity": "sha512-uQ0asli1+ic8xrrSmIOaElDu0FacR4x69GynTh2oZjFY10JUt6EEumTQl5tB4fMeD6I1naKd+4rXQQ7esT2i1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.21.3" + }, + "peerDependencies": { + "@ianvs/prettier-plugin-sort-imports": "*", + "@prettier/plugin-pug": "*", + "@shopify/prettier-plugin-liquid": "*", + "@trivago/prettier-plugin-sort-imports": "*", + "@zackad/prettier-plugin-twig": "*", + "prettier": "^3.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-import-sort": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", + "prettier-plugin-multiline-arrays": "*", + "prettier-plugin-organize-attributes": "*", + "prettier-plugin-organize-imports": "*", + "prettier-plugin-sort-imports": "*", + "prettier-plugin-style-order": "*", + "prettier-plugin-svelte": "*" + }, + "peerDependenciesMeta": { + "@ianvs/prettier-plugin-sort-imports": { + "optional": true + }, + "@prettier/plugin-pug": { + "optional": true + }, + "@shopify/prettier-plugin-liquid": { + "optional": true + }, + "@trivago/prettier-plugin-sort-imports": { + "optional": true + }, + "@zackad/prettier-plugin-twig": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + }, + "prettier-plugin-css-order": { + "optional": true + }, + "prettier-plugin-import-sort": { + "optional": true + }, + "prettier-plugin-jsdoc": { + "optional": true + }, + "prettier-plugin-marko": { + "optional": true + }, + "prettier-plugin-multiline-arrays": { + "optional": true + }, + "prettier-plugin-organize-attributes": { + "optional": true + }, + "prettier-plugin-organize-imports": { + "optional": true + }, + "prettier-plugin-sort-imports": { + "optional": true + }, + "prettier-plugin-style-order": { + "optional": true + }, + "prettier-plugin-svelte": { + "optional": true + } + } + }, + "node_modules/sh-syntax": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/sh-syntax/-/sh-syntax-0.5.8.tgz", + "integrity": "sha512-JfVoxf4FxQI5qpsPbkHhZo+n6N9YMJobyl4oGEUBb/31oQYlgTjkXQD8PBiafS2UbWoxrTO0Z5PJUBXEPAG1Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/sh-syntax" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..b245b26c --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "wasp-repo", + "scripts": { + "prettier:check": "prettier --ignore-unknown --check --config .prettierrc .", + "prettier:format": "prettier --ignore-unknown --write --config .prettierrc ." + }, + "devDependencies": { + "prettier": "3.5.3", + "prettier-plugin-organize-imports": "4.1.0", + "prettier-plugin-pkg": "0.19.1", + "prettier-plugin-sh": "0.17.4", + "prettier-plugin-tailwindcss": "0.6.13", + "typescript": "~5.8.3" + } +} diff --git a/template/.gitignore b/template/.gitignore new file mode 100644 index 00000000..a532fe55 --- /dev/null +++ b/template/.gitignore @@ -0,0 +1,11 @@ +# MacOS-specific files. +.DS_Store + +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. +.env +.env.* + +# Don't ignore example dotenv files. +!.env.example +!.env.*.example diff --git a/template/app/.gitignore b/template/app/.gitignore index fd453426..060a26c6 100644 --- a/template/app/.gitignore +++ b/template/app/.gitignore @@ -1,11 +1,2 @@ -.wasp/ node_modules/ - -# Ignore all dotenv files by default to prevent accidentally committing any secrets. -# To include specific dotenv files, use the `!` operator or adjust these rules. -.env -.env.* - -# Don't ignore example dotenv files. -!.env.example -!.env.*.example +.wasp/ diff --git a/template/blog/.gitignore b/template/blog/.gitignore index 772efb8d..dab5dd66 100644 --- a/template/blog/.gitignore +++ b/template/blog/.gitignore @@ -1,24 +1,3 @@ -# build output -dist/ -# generated types -.astro/ - -# deployment -.netlify/ - -# dependencies node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store +.astro/ +dist/ diff --git a/template/e2e-tests/.gitignore b/template/e2e-tests/.gitignore index 94976ceb..e65ed724 100644 --- a/template/e2e-tests/.gitignore +++ b/template/e2e-tests/.gitignore @@ -1,5 +1,5 @@ -/reports/ -/test-results/ -/.cache/ -/node_modules/ -prisma/ \ No newline at end of file +reports/ +test-results/ +.cache/ +node_modules/ +prisma/