Skip to content

Commit d2b9540

Browse files
authored
Update @sveltejs/adapter-cloudflare (#591)
1 parent 59adc39 commit d2b9540

File tree

7 files changed

+337
-632
lines changed

7 files changed

+337
-632
lines changed

.github/workflows/build-preview.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ jobs:
3030
uses: actions/upload-artifact@v4
3131
with:
3232
name: preview-build
33-
path: packages/svelte-ux/.svelte-kit/cloudflare
33+
path: packages/svelte-ux/.svelte-kit
34+
include-hidden-files: true
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
name: Upload Preview Deployment
22

33
on:
4-
workflow_run:
5-
workflows: [Build Preview Deployment]
6-
types:
7-
- completed
4+
workflow_run:
5+
workflows: [Build Preview Deployment]
6+
types:
7+
- completed
88

99
permissions:
10-
actions: read
11-
deployments: write
12-
contents: read
13-
pull-requests: write
10+
actions: read
11+
deployments: write
12+
contents: read
13+
pull-requests: write
1414

1515
jobs:
16-
deploy-preview:
17-
runs-on: ubuntu-latest
18-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19-
steps:
20-
- name: Download build artifact
21-
uses: actions/download-artifact@v4
22-
id: preview-build-artifact
23-
with:
24-
name: preview-build
25-
path: build
26-
github-token: ${{ secrets.GITHUB_TOKEN }}
27-
run-id: ${{ github.event.workflow_run.id }}
16+
deploy-preview:
17+
runs-on: ubuntu-latest
18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19+
steps:
20+
- name: Download build artifact
21+
uses: actions/download-artifact@v4
22+
id: preview-build-artifact
23+
with:
24+
name: preview-build
25+
path: build
26+
github-token: ${{ secrets.GITHUB_TOKEN }}
27+
run-id: ${{ github.event.workflow_run.id }}
2828

29-
- name: Deploy to Cloudflare Pages
30-
uses: AdrianGonz97/refined-cf-pages-action@v1
31-
with:
32-
apiToken: ${{ secrets.CF_API_TOKEN }}
33-
accountId: ${{ secrets.CF_ACCOUNT_ID }}
34-
githubToken: ${{ secrets.GITHUB_TOKEN }}
35-
projectName: svelte-ux
36-
deploymentName: Preview
37-
directory: ${{ steps.preview-build-artifact.outputs.download-path }}
29+
- name: Deploy to Cloudflare Pages
30+
uses: AdrianGonz97/refined-cf-pages-action@v1
31+
with:
32+
apiToken: ${{ secrets.CF_API_TOKEN }}
33+
accountId: ${{ secrets.CF_ACCOUNT_ID }}
34+
githubToken: ${{ secrets.GITHUB_TOKEN }}
35+
projectName: svelte-ux
36+
deploymentName: Preview
37+
directory: ${{ steps.preview-build-artifact.outputs.download-path }}/cloudflare

.github/workflows/deploy-prod.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Production Deployment
2+
23
on:
34
push:
45
branches:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
2222
"prettier-plugin-svelte": "^3.3.3",
2323
"rimraf": "6.0.1",
24-
"wrangler": "^3.110.0"
24+
"wrangler": "^4.14.4"
2525
},
2626
"packageManager": "pnpm@10.5.1"
2727
}

packages/svelte-ux/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"devDependencies": {
2222
"@changesets/cli": "^2.27.8",
2323
"@fortawesome/free-solid-svg-icons": "^6.7.2",
24-
"@sveltejs/adapter-cloudflare": "^4.9.0",
25-
"@sveltejs/kit": "^2.17.3",
26-
"@sveltejs/package": "^2.3.10",
24+
"@sveltejs/adapter-cloudflare": "^7.0.3",
25+
"@sveltejs/kit": "^2.21.0",
26+
"@sveltejs/package": "^2.3.11",
2727
"@sveltejs/vite-plugin-svelte": "5.0.3",
2828
"@tailwindcss/typography": "^0.5.16",
2929
"@types/culori": "^2.1.1",

packages/svelte-ux/vite.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { sveld } from './src/lib/plugins/vite.js';
44

55
export default defineConfig({
66
plugins: [sveltekit() /*, sveld()*/],
7+
resolve: {
8+
noExternal: true, // https://github.com/AdrianGonz97/refined-cf-pages-action/issues/26#issuecomment-2878397440
9+
},
710
test: {
811
include: ['src/**/*.{test,spec}.{js,ts}'],
912
deps: {

0 commit comments

Comments
 (0)