diff --git a/.env.example b/.env.example
index 5dd2ba524..1311777c3 100644
--- a/.env.example
+++ b/.env.example
@@ -1,3 +1,21 @@
-PUBLIC_SUPABASE_URL = ""
-PUBLIC_SUPABASE_PUBLIC_KEY = ""
-PRIVATE_SUPABASE_PRIVATE_KEY = ""
\ No newline at end of file
+# Resend (transactional emails)
+PRIVATE_RESEND_KEY=
+
+PUBLIC_VITE_DEV=true
+
+# Cloudflare (site hosting)
+PRIVATE_CLOUDFLARE_ZONE_ID=
+PRIVATE_CLOUDFLARE_ACCOUNT_ID=
+PRIVATE_R2_TOKEN=
+PRIVATE_R2_ACCESS_KEY_ID=
+PRIVATE_R2_SECRET_ACCESS_KEY=
+PRIVATE_CLOUDFLARE_WORKER_NAME=
+PRIVATE_CLOUDFLARE_WORKERS_API_TOKEN=
+PRIVATE_CLOUDFLARE_HOSTNAMES_TOKEN=
+PRIVATE_CLOUDFLARE_ZONE_TOKEN=
+PRIVATE_CLOUDFLARE_SITES_BUCKET=
+
+# Supabase (database & auth)
+PUBLIC_SUPABASE_URL=
+PUBLIC_SUPABASE_PUBLIC_KEY=
+PRIVATE_SUPABASE_PRIVATE_KEY=
diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml
deleted file mode 100644
index b1467fff5..000000000
--- a/.github/workflows/playwright.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-# Failing because of some ci dependency issue, running locally for now
-# name: Playwright Tests
-# on:
-# push:
-# branches: [ main, master ]
-# pull_request:
-# branches: [ main, master ]
-# jobs:
-# test:
-# timeout-minutes: 60
-# runs-on: ubuntu-latest
-# steps:
-# - uses: actions/checkout@v2
-# - uses: actions/setup-node@v2
-# with:
-# node-version: '14.x'
-# - name: Install dependencies
-# run: npm ci
-# - name: Install Playwright Browsers
-# run: npx playwright install --with-deps
-# - name: Run Playwright tests
-# run: npx playwright test
-# - uses: actions/upload-artifact@v2
-# if: always()
-# with:
-# name: playwright-report
-# path: playwright-report/
-# retention-days: 30
diff --git a/.gitignore b/.gitignore
index 3ec9dd8a2..bb3d75952 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
.env
.DS_Store
+.vercel/output
+.vscode
.vercel_build_output
.svelte-kit
node_modules
diff --git a/.prettierrc b/.prettierrc
index 27ee5b3f3..279332d3a 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,6 +1,23 @@
{
"tabWidth": 2,
- "singleQuote": true,
"semi": false,
- "htmlWhitespaceSensitivity": "ignore"
+ "htmlWhitespaceSensitivity": "ignore",
+ "useTabs": true,
+ "singleQuote": true,
+ "trailingComma": "none",
+ "printWidth": 200,
+ "plugins": [
+ "prettier-plugin-svelte"
+ ],
+ "pluginSearchDirs": [
+ "."
+ ],
+ "overrides": [
+ {
+ "files": "*.svelte",
+ "options": {
+ "parser": "svelte"
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7c4db0bdf..478527e05 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,31 +1,3 @@
# Contributing
-Contributions to Primo are very welcome. You can start by submitting a PR to address any of the [open issues](https://github.com/primocms/primo/issues), but for the sake of keeping the codebase simple and aligned towards the project's mission, we ask that you first start a discussion before attempting to contribute any new features. You can do this by starting a discussion in the [Forum](https://forum.primo.so), [Github Discussions](https://github.com/primocms/primo/discussions), or the [Discord](https://discord.gg/vzSFTS9). Or, if you'd like to contribute to the project but don't know where to start, feel free to fill out the [contributor form](https://primocms.org/contributions).
-
-## Running locally
-
-1. Clone the main Primo repo
-```
-git clone https://github.com/primocms/primo.git
-```
-2. Clone the builder repo
-```
-git clone https://github.com/primocms/builder
-```
-3. Link the builder to Primo
-```
-cd builder
-npm link
-npm install
-npm run package-watch
-```
-4. Run Primo
-```
-cd ../primo
-npm install
-npm link @primocms/builder
-npm run dev
-```
-5. Open your browser to http://localhost:5173
-
-If you have any issues setting this up, it's probably *not* just you, so feel free to pop into any of the discussion spaces linked above for some help.
+Contributions to Primo are very welcome. You can start by submitting a PR to address any of the [open issues](https://github.com/primocms/primo/issues), but for the sake of keeping the codebase simple and aligned towards the project's mission, we ask that you first start a discussion before attempting to contribute any new features. You can do this by starting a discussion in the [Forum](https://forum.primo.so), [Github Discussions](https://github.com/primocms/primo/discussions), or the [Discord](https://discord.gg/vzSFTS9).
\ No newline at end of file
diff --git a/README.md b/README.md
index f8bcda9d9..79845cce6 100644
--- a/README.md
+++ b/README.md
@@ -7,80 +7,89 @@
-
The modern monolithic CMS
-
Primo makes it a blast to build pages, update content, and edit code - one block at a time.
+
+
\ No newline at end of file
diff --git a/src/compiler/cloud-workers/server-compiler.js b/src/compiler/cloud-workers/server-compiler.js
index c80141dbb..36726748d 100644
--- a/src/compiler/cloud-workers/server-compiler.js
+++ b/src/compiler/cloud-workers/server-compiler.js
@@ -2,6 +2,10 @@ import vm from 'vm'
import { Volume } from 'memfs'
import _ from 'lodash-es'
import rollup from './server-rollup'
+import { Blob } from 'fetch-blob'
+// import { render } from '../lib/svelte-5/server/index.js'
+
+globalThis.Blob = Blob // use Node.js Blob instead of Jsdom's Blob
const COMPILED_COMPONENTS_CACHE = new Map()
@@ -12,113 +16,111 @@ const COMPILED_COMPONENTS_CACHE = new Map()
* @param {Object|Object[]} options.component - The component(s) to be rendered. Can be a single component or an array of components for a page.
* @param {boolean} [options.buildStatic=true] - Indicates whether to build the component statically or not.
* @param {string} [options.format='esm'] - The module format to use, such as 'esm' for ES Modules.
+ * @param {boolean} [options.dev_mode=false] - Whether Svelte should be compiled in dev mode (i.e. attaches LOC for inspecting) or not
* @returns {Promise