-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
5,491 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Deploy all Pages sites | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [synchronize, opened, reopened, labeled, unlabeled] | ||
|
||
# There's a fair amount of manual duplication in this file, but it's unfortunately all needed | ||
# In particular, GH Actions doesn't support the `matrix` context in `if` conditions, and so | ||
# using a matrix would make it impossible to skip a deploy at the job level | ||
jobs: | ||
wrangler-devtools: | ||
name: Wrangler DevTools | ||
if: github.repository_owner == 'cloudflare' && (github.event_name != 'pull_request' || (github.event_name == 'pull_request' && contains(github.event.*.labels.*.name, 'preview:wrangler-devtools' ))) | ||
uses: ./.github/workflows/deploy-pages-project.yml | ||
with: | ||
package: "wrangler-devtools" | ||
secrets: | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
|
||
# Quick Edit requires yarn, so needs fairly specific logic | ||
quick-edit: | ||
name: Quick Edit | ||
if: github.repository_owner == 'cloudflare' && (github.event_name != 'pull_request' || (github.event_name == 'pull_request' && contains(github.event.*.labels.*.name, 'preview:quick-edit' ))) | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Dependencies | ||
uses: ./.github/actions/install-dependencies | ||
env: | ||
node-version: 16.14 | ||
|
||
- name: Build | ||
run: pnpm run build | ||
|
||
- name: Build Quick Edit | ||
run: cd packages/quick-edit && yarn setup && yarn custom:build | ||
env: | ||
NPM_PUBLISH_TOKEN: NOT_USED # yarn will error if the env var from .npmrc can't be interpolated | ||
|
||
- name: Publish Quick Edit | ||
run: pnpm --filter quick-edit run deploy | ||
env: | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
|
||
workers-playground: | ||
name: Workers Playground | ||
if: github.repository_owner == 'cloudflare' && (github.event_name != 'pull_request' || (github.event_name == 'pull_request' && contains(github.event.*.labels.*.name, 'preview:workers-playground' ))) | ||
uses: ./.github/workflows/deploy-pages-project.yml | ||
with: | ||
package: "workers-playground" | ||
secrets: | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
package: | ||
required: true | ||
type: string | ||
secrets: | ||
CLOUDFLARE_API_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Dependencies | ||
uses: ./.github/actions/install-dependencies | ||
|
||
- name: Build | ||
run: pnpm run build | ||
|
||
- name: Deploy to Pages | ||
run: pnpm --filter ${{ inputs.package }} run deploy | ||
env: | ||
CLOUDFLARE_ACCOUNT_ID: "e35fd947284363a46fd7061634477114" | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,7 +196,7 @@ packages/quick-edit/web | |
|
||
# VSCode Theme | ||
*.vsix | ||
vendor/vscode | ||
vendor/vscode/ | ||
|
||
.wrangler/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { readFileSync, writeFileSync } from "node:fs"; | ||
|
||
function readDtsFile(reference) { | ||
return readFileSync( | ||
`../../vendor/vscode/extensions/node_modules/typescript/lib/lib.${reference}.d.ts`, | ||
"utf8" | ||
); | ||
} | ||
|
||
function writeDtsFile(reference, content) { | ||
return writeFileSync( | ||
`../../vendor/vscode/extensions/node_modules/typescript/lib/lib.${reference}.d.ts`, | ||
content | ||
); | ||
} | ||
|
||
const importRegex = /\/\/\/ <reference lib="(.+?)" \/>/g; | ||
|
||
function replaceReferences(dts) { | ||
return dts.replaceAll(importRegex, (_, ref) => { | ||
const innerDts = readDtsFile(ref); | ||
console.log("Including", ref, `(${innerDts.split("\n").length} lines)`); | ||
return innerDts; | ||
}); | ||
} | ||
|
||
function inlineDts(dts) { | ||
if (!importRegex.test(dts)) { | ||
return dts; | ||
} | ||
return inlineDts(replaceReferences(dts)); | ||
} | ||
|
||
writeDtsFile("es2022", inlineDts(readDtsFile("es2022"))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
Oops, something went wrong.