From 68a6d4c9a8954178d90fd9bb14e1e70ecd8f5b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Fri, 23 Jan 2026 20:13:04 +0100 Subject: [PATCH 01/14] :wrench: Add deploy plugin packages workflow placeholder and wrangle config files --- .github/workflows/plugins-deploy-package.yml | 11 +++++++++++ .github/workflows/plugins-deploy-packages.yml | 11 +++++++++++ plugins/apps/colors-to-tokens-plugin/wrangle.toml | 4 ++++ plugins/apps/contrast-plugin/wrangle.toml | 4 ++++ plugins/apps/create-palette-plugin/wrangle.toml | 4 ++++ plugins/apps/icons-plugin/wrangle.toml | 4 ++++ plugins/apps/lorem-ipsum-plugin/wrangle.toml | 4 ++++ plugins/apps/rename-layers-plugin/wrangle.toml | 5 +++++ plugins/apps/table-plugin/wrangle.toml | 5 +++++ 9 files changed, 52 insertions(+) create mode 100644 .github/workflows/plugins-deploy-package.yml create mode 100644 .github/workflows/plugins-deploy-packages.yml create mode 100644 plugins/apps/colors-to-tokens-plugin/wrangle.toml create mode 100644 plugins/apps/contrast-plugin/wrangle.toml create mode 100644 plugins/apps/create-palette-plugin/wrangle.toml create mode 100644 plugins/apps/icons-plugin/wrangle.toml create mode 100644 plugins/apps/lorem-ipsum-plugin/wrangle.toml create mode 100644 plugins/apps/rename-layers-plugin/wrangle.toml create mode 100644 plugins/apps/table-plugin/wrangle.toml diff --git a/.github/workflows/plugins-deploy-package.yml b/.github/workflows/plugins-deploy-package.yml new file mode 100644 index 0000000000..ca5fe817de --- /dev/null +++ b/.github/workflows/plugins-deploy-package.yml @@ -0,0 +1,11 @@ +name: Plugins/package deployer + +on: + workflow_dispatch: + +jobs: + print_text_job: + runs-on: ubuntu-latest + steps: + - name: Print Hello World + run: echo "Hello, World!" diff --git a/.github/workflows/plugins-deploy-packages.yml b/.github/workflows/plugins-deploy-packages.yml new file mode 100644 index 0000000000..cabc045f00 --- /dev/null +++ b/.github/workflows/plugins-deploy-packages.yml @@ -0,0 +1,11 @@ +name: Plugins/packages deployer + +on: + workflow_dispatch: + +jobs: + print_text_job: + runs-on: ubuntu-latest + steps: + - name: Print Hello World + run: echo "Hello, World!" diff --git a/plugins/apps/colors-to-tokens-plugin/wrangle.toml b/plugins/apps/colors-to-tokens-plugin/wrangle.toml new file mode 100644 index 0000000000..7722755890 --- /dev/null +++ b/plugins/apps/colors-to-tokens-plugin/wrangle.toml @@ -0,0 +1,4 @@ +name = "color-to-tokens-plugin" +compatibility_date = "2025-01-01" + +assets = { directory = "../../dist/apps/color-to-tokens-plugin/browser" } diff --git a/plugins/apps/contrast-plugin/wrangle.toml b/plugins/apps/contrast-plugin/wrangle.toml new file mode 100644 index 0000000000..726ae60d6e --- /dev/null +++ b/plugins/apps/contrast-plugin/wrangle.toml @@ -0,0 +1,4 @@ +name = "contrast-plugin" +compatibility_date = "2025-01-01" + +assets = { directory = "../../dist/apps/contrast-plugin/browser" } diff --git a/plugins/apps/create-palette-plugin/wrangle.toml b/plugins/apps/create-palette-plugin/wrangle.toml new file mode 100644 index 0000000000..74c4b73cb6 --- /dev/null +++ b/plugins/apps/create-palette-plugin/wrangle.toml @@ -0,0 +1,4 @@ +name = "create-palette-plugin" +compatibility_date = "2025-01-01" + +assets = { directory = "../../dist/apps/create-palette-plugin" } diff --git a/plugins/apps/icons-plugin/wrangle.toml b/plugins/apps/icons-plugin/wrangle.toml new file mode 100644 index 0000000000..26e7514ec8 --- /dev/null +++ b/plugins/apps/icons-plugin/wrangle.toml @@ -0,0 +1,4 @@ +name = "icons-plugin" +compatibility_date = "2025-01-01" + +assets = { directory = "../../dist/apps/icons-plugin/browser" } diff --git a/plugins/apps/lorem-ipsum-plugin/wrangle.toml b/plugins/apps/lorem-ipsum-plugin/wrangle.toml new file mode 100644 index 0000000000..9e4d9366f0 --- /dev/null +++ b/plugins/apps/lorem-ipsum-plugin/wrangle.toml @@ -0,0 +1,4 @@ +name = "lorem-ipsum-plugin" +compatibility_date = "2025-01-01" + +assets = { directory = "../../dist/apps/lorem-ipsum-plugin/browser" } diff --git a/plugins/apps/rename-layers-plugin/wrangle.toml b/plugins/apps/rename-layers-plugin/wrangle.toml new file mode 100644 index 0000000000..1dc6c2fe0a --- /dev/null +++ b/plugins/apps/rename-layers-plugin/wrangle.toml @@ -0,0 +1,5 @@ +name = "rename-layers-plugin" +compatibility_date = "2025-01-01" + +assets = { directory = "../../dist/apps/rename-layers-plugin/browser" } + diff --git a/plugins/apps/table-plugin/wrangle.toml b/plugins/apps/table-plugin/wrangle.toml new file mode 100644 index 0000000000..516dd54b1e --- /dev/null +++ b/plugins/apps/table-plugin/wrangle.toml @@ -0,0 +1,5 @@ +name = "table-plugin" +compatibility_date = "2025-01-01" + +assets = { directory = "../../dist/apps/table-plugin/browser" } + From 92a319ddd1e63c652c17c32583310ac45dbdbc8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Mon, 26 Jan 2026 09:33:37 +0100 Subject: [PATCH 02/14] :wrench: Rename wrangle to wrangler --- .github/workflows/plugins-deploy-api-doc.yml | 16 ++++++++++++++-- .../{wrangle.toml => wrangler.toml} | 4 ++++ .../{wrangle.toml => wrangler.toml} | 4 ++++ .../{wrangle.toml => wrangler.toml} | 4 ++++ .../icons-plugin/{wrangle.toml => wrangler.toml} | 4 ++++ .../{wrangle.toml => wrangler.toml} | 4 ++++ .../{wrangle.toml => wrangler.toml} | 3 +++ .../table-plugin/{wrangle.toml => wrangler.toml} | 3 +++ ...toml => wrangler-penpot-plugins-api-doc.toml} | 0 9 files changed, 40 insertions(+), 2 deletions(-) rename plugins/apps/colors-to-tokens-plugin/{wrangle.toml => wrangler.toml} (71%) rename plugins/apps/contrast-plugin/{wrangle.toml => wrangler.toml} (69%) rename plugins/apps/create-palette-plugin/{wrangle.toml => wrangler.toml} (70%) rename plugins/apps/icons-plugin/{wrangle.toml => wrangler.toml} (68%) rename plugins/apps/lorem-ipsum-plugin/{wrangle.toml => wrangler.toml} (70%) rename plugins/apps/rename-layers-plugin/{wrangle.toml => wrangler.toml} (71%) rename plugins/apps/table-plugin/{wrangle.toml => wrangler.toml} (68%) rename plugins/{wrangle-penpot-plugins-api-doc.toml => wrangler-penpot-plugins-api-doc.toml} (100%) diff --git a/.github/workflows/plugins-deploy-api-doc.yml b/.github/workflows/plugins-deploy-api-doc.yml index 62a87745bb..f8451e9816 100644 --- a/.github/workflows/plugins-deploy-api-doc.yml +++ b/.github/workflows/plugins-deploy-api-doc.yml @@ -11,7 +11,7 @@ on: - "plugins/libs/plugin-types/REAME.md" - "plugins/tools/typedoc.css" - "plugins/CHANGELOG.md" - - "plugins/wrangle-penpot-plugins-api-doc.toml" + - "plugins/wrangler-penpot-plugins-api-doc.toml" workflow_dispatch: inputs: gh_ref: @@ -98,4 +98,16 @@ jobs: workingDirectory: plugins apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: deploy --config wrangle-penpot-plugins-api-doc.toml --name ${{ env.WORKER_NAME }} + command: deploy --config wrangler-penpot-plugins-api-doc.toml --name ${{ env.WORKER_NAME }} + + - name: Notify Mattermost + if: failure() + uses: mattermost/action-mattermost-notify@master + with: + MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK }} + MATTERMOST_CHANNEL: bot-alerts-cicd + TEXT: | + ❌ πŸ§©πŸ“š *[PENPOT PLUGINS] Error deploying API documentation.* + πŸ“„ Triggered from ref: `${{ inputs.gh_ref }}` + πŸ”— Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + @infra diff --git a/plugins/apps/colors-to-tokens-plugin/wrangle.toml b/plugins/apps/colors-to-tokens-plugin/wrangler.toml similarity index 71% rename from plugins/apps/colors-to-tokens-plugin/wrangle.toml rename to plugins/apps/colors-to-tokens-plugin/wrangler.toml index 7722755890..c1d45f3e87 100644 --- a/plugins/apps/colors-to-tokens-plugin/wrangle.toml +++ b/plugins/apps/colors-to-tokens-plugin/wrangler.toml @@ -2,3 +2,7 @@ name = "color-to-tokens-plugin" compatibility_date = "2025-01-01" assets = { directory = "../../dist/apps/color-to-tokens-plugin/browser" } + +[[routes]] +pattern = "WORKER_URI" +custom_domain = true diff --git a/plugins/apps/contrast-plugin/wrangle.toml b/plugins/apps/contrast-plugin/wrangler.toml similarity index 69% rename from plugins/apps/contrast-plugin/wrangle.toml rename to plugins/apps/contrast-plugin/wrangler.toml index 726ae60d6e..86f456ec95 100644 --- a/plugins/apps/contrast-plugin/wrangle.toml +++ b/plugins/apps/contrast-plugin/wrangler.toml @@ -2,3 +2,7 @@ name = "contrast-plugin" compatibility_date = "2025-01-01" assets = { directory = "../../dist/apps/contrast-plugin/browser" } + +[[routes]] +pattern = "WORKER_URI" +custom_domain = true diff --git a/plugins/apps/create-palette-plugin/wrangle.toml b/plugins/apps/create-palette-plugin/wrangler.toml similarity index 70% rename from plugins/apps/create-palette-plugin/wrangle.toml rename to plugins/apps/create-palette-plugin/wrangler.toml index 74c4b73cb6..40f4f67a38 100644 --- a/plugins/apps/create-palette-plugin/wrangle.toml +++ b/plugins/apps/create-palette-plugin/wrangler.toml @@ -2,3 +2,7 @@ name = "create-palette-plugin" compatibility_date = "2025-01-01" assets = { directory = "../../dist/apps/create-palette-plugin" } + +[[routes]] +pattern = "WORKER_URI" +custom_domain = true diff --git a/plugins/apps/icons-plugin/wrangle.toml b/plugins/apps/icons-plugin/wrangler.toml similarity index 68% rename from plugins/apps/icons-plugin/wrangle.toml rename to plugins/apps/icons-plugin/wrangler.toml index 26e7514ec8..0a690dac57 100644 --- a/plugins/apps/icons-plugin/wrangle.toml +++ b/plugins/apps/icons-plugin/wrangler.toml @@ -2,3 +2,7 @@ name = "icons-plugin" compatibility_date = "2025-01-01" assets = { directory = "../../dist/apps/icons-plugin/browser" } + +[[routes]] +pattern = "WORKER_URI" +custom_domain = true diff --git a/plugins/apps/lorem-ipsum-plugin/wrangle.toml b/plugins/apps/lorem-ipsum-plugin/wrangler.toml similarity index 70% rename from plugins/apps/lorem-ipsum-plugin/wrangle.toml rename to plugins/apps/lorem-ipsum-plugin/wrangler.toml index 9e4d9366f0..398691c3ba 100644 --- a/plugins/apps/lorem-ipsum-plugin/wrangle.toml +++ b/plugins/apps/lorem-ipsum-plugin/wrangler.toml @@ -2,3 +2,7 @@ name = "lorem-ipsum-plugin" compatibility_date = "2025-01-01" assets = { directory = "../../dist/apps/lorem-ipsum-plugin/browser" } + +[[routes]] +pattern = "WORKER_URI" +custom_domain = true diff --git a/plugins/apps/rename-layers-plugin/wrangle.toml b/plugins/apps/rename-layers-plugin/wrangler.toml similarity index 71% rename from plugins/apps/rename-layers-plugin/wrangle.toml rename to plugins/apps/rename-layers-plugin/wrangler.toml index 1dc6c2fe0a..4fdc18597d 100644 --- a/plugins/apps/rename-layers-plugin/wrangle.toml +++ b/plugins/apps/rename-layers-plugin/wrangler.toml @@ -3,3 +3,6 @@ compatibility_date = "2025-01-01" assets = { directory = "../../dist/apps/rename-layers-plugin/browser" } +[[routes]] +pattern = "WORKER_URI" +custom_domain = true diff --git a/plugins/apps/table-plugin/wrangle.toml b/plugins/apps/table-plugin/wrangler.toml similarity index 68% rename from plugins/apps/table-plugin/wrangle.toml rename to plugins/apps/table-plugin/wrangler.toml index 516dd54b1e..9c95160a01 100644 --- a/plugins/apps/table-plugin/wrangle.toml +++ b/plugins/apps/table-plugin/wrangler.toml @@ -3,3 +3,6 @@ compatibility_date = "2025-01-01" assets = { directory = "../../dist/apps/table-plugin/browser" } +[[routes]] +pattern = "WORKER_URI" +custom_domain = true diff --git a/plugins/wrangle-penpot-plugins-api-doc.toml b/plugins/wrangler-penpot-plugins-api-doc.toml similarity index 100% rename from plugins/wrangle-penpot-plugins-api-doc.toml rename to plugins/wrangler-penpot-plugins-api-doc.toml From 5306bed548c6d985b32683afa335ddb683fe66c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Mon, 26 Jan 2026 09:34:01 +0100 Subject: [PATCH 03/14] :wrench: Define deploy plugin packages workflows --- .github/workflows/plugins-deploy-package.yml | 124 ++++++++++++++++- .github/workflows/plugins-deploy-packages.yml | 130 +++++++++++++++++- 2 files changed, 247 insertions(+), 7 deletions(-) diff --git a/.github/workflows/plugins-deploy-package.yml b/.github/workflows/plugins-deploy-package.yml index ca5fe817de..cad4b1524f 100644 --- a/.github/workflows/plugins-deploy-package.yml +++ b/.github/workflows/plugins-deploy-package.yml @@ -1,11 +1,127 @@ name: Plugins/package deployer on: + # Deploy package from manual action workflow_dispatch: + inputs: + gh_ref: + description: 'Name of the branch' + type: choice + required: true + default: 'develop' + options: + - develop + - staging + - main + plugin_name: + description: 'Pluging name (like plugins/apps/-plugin)' + type: string + required: true + workflow_call: + inputs: + gh_ref: + description: 'Name of the branch' + type: string + required: true + default: 'develop' + plugin_name: + description: 'Publig name (from plugins/apps/-plugin)' + type: string + required: true + +permissions: + contents: read jobs: - print_text_job: - runs-on: ubuntu-latest + deploy: + runs-on: penpot-runner-01 steps: - - name: Print Hello World - run: echo "Hello, World!" + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.gh_ref }} + + # START: Setup Node and PNPM enabling cache + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version-file: .nvmrc + + - name: Enable PNPM + working-directory: ./plugins + shell: bash + run: | + corepack enable; + corepack install; + + - name: Get pnpm store path + id: pnpm-store + working-directory: ./plugins + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT + + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('plugins/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + # END: Setup Node and PNPM enabling cache + + - name: Install deps + working-directory: ./plugins + shell: bash + run: | + pnpm install --no-frozen-lockfile; + pnpm add -D -w wrangler@latest; + + - name: "Build package for ${{ inputs.plugin_name }}-plugin" + working-directory: plugins + shell: bash + run: npx nx build ${{ inputs.plugin_name }}-plugin + + - name: Select Worker name + run: | + REF="${{ inputs.gh_ref }}" + case "$REF" in + main) + echo "WORKER_NAME=${{ inputs.plugin_name }}-plugin-pro" >> $GITHUB_ENV + echo "WORKER_URI=${{ inputs.plugin_name }}.plugins.penpot.app" >> $GITHUB_ENV ;; + staging) + echo "WORKER_NAME=${{ inputs.plugin_name }}-plugin-pre" >> $GITHUB_ENV + echo "WORKER_URI=${{ inputs.plugin_name }}.plugins.penpot.dev" >> $GITHUB_ENV ;; + develop) + echo "WORKER_NAME=${{ inputs.plugin_name }}-plugin-hourly" >> $GITHUB_ENV + echo "WORKER_URI=${{ inputs.plugin_name }}.plugins.hourly.penpot.dev" >> $GITHUB_ENV ;; + *) echo "Unsupported branch ${REF}" && exit 1 ;; + esac + + - name: Set the custom url + working-directory: plugins + shell: bash + run: | + sed -i "s/WORKER_URI/${{ env.WORKER_URI }}/g" apps/${{ inputs.plugin_name }}-plugin/wrangler.toml + + - name: Deploy to Cloudflare Workers + uses: cloudflare/wrangler-action@v3 + with: + workingDirectory: plugins + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: deploy --config apps/${{ inputs.plugin_name }}-plugin/wrangler.toml --name ${{ env.WORKER_NAME }} + + - name: Notify Mattermost + if: failure() + uses: mattermost/action-mattermost-notify@master + with: + MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK }} + MATTERMOST_CHANNEL: bot-alerts-cicd + TEXT: | + ❌ πŸ§©πŸ“¦ *[PENPOT PLUGINS] Error deploying ${{ env.WORKER_NAME }}.* + πŸ“„ Triggered from ref: `${{ inputs.gh_ref }}` + Plugin name: `${{ inputs.plugin_name }}-plugin` + Cloudflare worker name: `${{ env.WORKER_NAME }}` + πŸ”— Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + @infra diff --git a/.github/workflows/plugins-deploy-packages.yml b/.github/workflows/plugins-deploy-packages.yml index cabc045f00..d1060389d5 100644 --- a/.github/workflows/plugins-deploy-packages.yml +++ b/.github/workflows/plugins-deploy-packages.yml @@ -1,11 +1,135 @@ name: Plugins/packages deployer on: + push: + branches: + - develop + - staging + - main + paths: + - 'plugins/apps/*-plugin/**' + - 'libs/plugins-styles/**' workflow_dispatch: + inputs: + gh_ref: + description: 'Name of the branch' + type: choice + required: true + default: 'develop' + options: + - develop + - staging + - main jobs: - print_text_job: + detect-changes: runs-on: ubuntu-latest + outputs: + colors_to_tokens: ${{ steps.filter.outputs.colors_to_tokens }} + create_palette: ${{ steps.filter.outputs.create_palette }} + lorem_ipsum: ${{ steps.filter.outputs.lorem_ipsum }} + rename_layers: ${{ steps.filter.outputs.rename_layers }} + contrast: ${{ steps.filter.outputs.contrast }} + icons: ${{ steps.filter.outputs.icons }} + poc_state: ${{ steps.filter.outputs.poc_state }} + table: ${{ steps.filter.outputs.table }} + # [For new plugins] + # Add more outputs here steps: - - name: Print Hello World - run: echo "Hello, World!" + - uses: actions/checkout@v4 + - id: filter + uses: dorny/paths-filter@v3 + with: + filters: | + colors_to_tokens: + - 'plugins/apps/colors-to-tokens-plugin/**' + - 'libs/plugins-styles/**' + contrast: + - 'plugins/apps/contrast-plugin/**' + - 'libs/plugins-styles/**' + create_palette: + - 'plugins/apps/create-palette-plugin/**' + - 'libs/plugins-styles/**' + icons: + - 'plugins/apps/icons-plugin/**' + - 'libs/plugins-styles/**' + lorem_ipsum: + - 'plugins/apps/lorem-ipsum-plugin/**' + - 'libs/plugins-styles/**' + rename_layers: + - 'plugins/apps/rename-layers-plugin/**' + - 'libs/plugins-styles/**' + table: + - 'plugins/apps/table-plugin/**' + - 'libs/plugins-styles/**' + # [For new plugins] + # Add more plugin filters here + # another_plugin: + # - 'plugins/apps/another-plugin/**' + # - 'libs/plugins-styles/**' + + colors-to-tokens-plugin: + needs: detect-changes + if: needs.detect-changes.outputs.colors_to_tokens == 'true' + uses: ./.github/workflows/plugins-deploy-package.yml + with: + gh_ref: "${{ inputs.gh_ref || github.ref_name }}" + plugin_name: colors-to-tokens + + contrast-plugin: + needs: detect-changes + if: needs.detect-changes.outputs.contrast == 'true' + uses: ./.github/workflows/plugins-deploy-package.yml + with: + gh_ref: "${{ inputs.gh_ref || github.ref_name }}" + plugin_name: contrast + + create-palette-plugin: + needs: detect-changes + if: needs.detect-changes.outputs.create_palette == 'true' + uses: ./.github/workflows/plugins-deploy-package.yml + with: + gh_ref: "${{ inputs.gh_ref || github.ref_name }}" + plugin_name: create-palette + + icons-plugin: + needs: detect-changes + if: needs.detect-changes.outputs.icons == 'true' + uses: ./.github/workflows/plugins-deploy-package.yml + with: + gh_ref: "${{ inputs.gh_ref || github.ref_name }}" + plugin_name: icons + + lorem-ipsum-plugin: + needs: detect-changes + if: needs.detect-changes.outputs.lorem_ipsum == 'true' + uses: ./.github/workflows/plugins-deploy-package.yml + with: + gh_ref: "${{ inputs.gh_ref || github.ref_name }}" + plugin_name: lorem-ipsum + + rename-layers-plugin: + needs: detect-changes + if: needs.detect-changes.outputs.rename_layers == 'true' + uses: ./.github/workflows/plugins-deploy-package.yml + with: + gh_ref: "${{ inputs.gh_ref || github.ref_name }}" + plugin_name: rename-layers + + table-plugin: + needs: detect-changes + if: needs.detect-changes.outputs.table == 'true' + uses: ./.github/workflows/plugins-deploy-package.yml + with: + gh_ref: "${{ inputs.gh_ref || github.ref_name }}" + plugin_name: table + + # [For new plugins] + # Add more jobs for other plugins below, following the same pattern + # another-plugin: + # needs: detect-changes + # if: needs.detect-changes.outputs.another_plugin == 'true' + # uses: ./.github/workflows/plugins-deploy-package.yml + # with: + # gh_ref: "${{ inputs.gh_ref || github.ref_name }}" + # plugin_name: another From ef809014009aa2058727c828dab9beeb05e884b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Mon, 26 Jan 2026 14:00:09 +0100 Subject: [PATCH 04/14] :wrench: Enable secret inheritance --- .github/workflows/plugins-deploy-packages.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/plugins-deploy-packages.yml b/.github/workflows/plugins-deploy-packages.yml index d1060389d5..b7c9c3af47 100644 --- a/.github/workflows/plugins-deploy-packages.yml +++ b/.github/workflows/plugins-deploy-packages.yml @@ -72,6 +72,7 @@ jobs: needs: detect-changes if: needs.detect-changes.outputs.colors_to_tokens == 'true' uses: ./.github/workflows/plugins-deploy-package.yml + secrets: inherit with: gh_ref: "${{ inputs.gh_ref || github.ref_name }}" plugin_name: colors-to-tokens @@ -80,6 +81,7 @@ jobs: needs: detect-changes if: needs.detect-changes.outputs.contrast == 'true' uses: ./.github/workflows/plugins-deploy-package.yml + secrets: inherit with: gh_ref: "${{ inputs.gh_ref || github.ref_name }}" plugin_name: contrast @@ -88,6 +90,7 @@ jobs: needs: detect-changes if: needs.detect-changes.outputs.create_palette == 'true' uses: ./.github/workflows/plugins-deploy-package.yml + secrets: inherit with: gh_ref: "${{ inputs.gh_ref || github.ref_name }}" plugin_name: create-palette @@ -96,6 +99,7 @@ jobs: needs: detect-changes if: needs.detect-changes.outputs.icons == 'true' uses: ./.github/workflows/plugins-deploy-package.yml + secrets: inherit with: gh_ref: "${{ inputs.gh_ref || github.ref_name }}" plugin_name: icons @@ -104,6 +108,7 @@ jobs: needs: detect-changes if: needs.detect-changes.outputs.lorem_ipsum == 'true' uses: ./.github/workflows/plugins-deploy-package.yml + secrets: inherit with: gh_ref: "${{ inputs.gh_ref || github.ref_name }}" plugin_name: lorem-ipsum @@ -112,6 +117,7 @@ jobs: needs: detect-changes if: needs.detect-changes.outputs.rename_layers == 'true' uses: ./.github/workflows/plugins-deploy-package.yml + secrets: inherit with: gh_ref: "${{ inputs.gh_ref || github.ref_name }}" plugin_name: rename-layers @@ -120,6 +126,7 @@ jobs: needs: detect-changes if: needs.detect-changes.outputs.table == 'true' uses: ./.github/workflows/plugins-deploy-package.yml + secrets: inherit with: gh_ref: "${{ inputs.gh_ref || github.ref_name }}" plugin_name: table @@ -130,6 +137,7 @@ jobs: # needs: detect-changes # if: needs.detect-changes.outputs.another_plugin == 'true' # uses: ./.github/workflows/plugins-deploy-package.yml + # secrets: inherit # with: # gh_ref: "${{ inputs.gh_ref || github.ref_name }}" # plugin_name: another From 1ce0b60e3de3b9398a506940a7a0dd1d2314c801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Mon, 26 Jan 2026 16:46:03 +0100 Subject: [PATCH 05/14] :wrench: Run all the jobs if the workflow is launched manually --- .github/workflows/plugins-deploy-packages.yml | 16 ++++++++-------- .../apps/colors-to-tokens-plugin/wrangler.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/plugins-deploy-packages.yml b/.github/workflows/plugins-deploy-packages.yml index b7c9c3af47..3223bc52a6 100644 --- a/.github/workflows/plugins-deploy-packages.yml +++ b/.github/workflows/plugins-deploy-packages.yml @@ -70,7 +70,7 @@ jobs: colors-to-tokens-plugin: needs: detect-changes - if: needs.detect-changes.outputs.colors_to_tokens == 'true' + if: github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.colors_to_tokens == 'true' uses: ./.github/workflows/plugins-deploy-package.yml secrets: inherit with: @@ -79,7 +79,7 @@ jobs: contrast-plugin: needs: detect-changes - if: needs.detect-changes.outputs.contrast == 'true' + if: github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.contrast == 'true' uses: ./.github/workflows/plugins-deploy-package.yml secrets: inherit with: @@ -88,7 +88,7 @@ jobs: create-palette-plugin: needs: detect-changes - if: needs.detect-changes.outputs.create_palette == 'true' + if: github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.create_palette == 'true' uses: ./.github/workflows/plugins-deploy-package.yml secrets: inherit with: @@ -97,7 +97,7 @@ jobs: icons-plugin: needs: detect-changes - if: needs.detect-changes.outputs.icons == 'true' + if: github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.icons == 'true' uses: ./.github/workflows/plugins-deploy-package.yml secrets: inherit with: @@ -106,7 +106,7 @@ jobs: lorem-ipsum-plugin: needs: detect-changes - if: needs.detect-changes.outputs.lorem_ipsum == 'true' + if: github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.lorem_ipsum == 'true' uses: ./.github/workflows/plugins-deploy-package.yml secrets: inherit with: @@ -115,7 +115,7 @@ jobs: rename-layers-plugin: needs: detect-changes - if: needs.detect-changes.outputs.rename_layers == 'true' + if: github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.rename_layers == 'true' uses: ./.github/workflows/plugins-deploy-package.yml secrets: inherit with: @@ -124,7 +124,7 @@ jobs: table-plugin: needs: detect-changes - if: needs.detect-changes.outputs.table == 'true' + if: github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.table == 'true' uses: ./.github/workflows/plugins-deploy-package.yml secrets: inherit with: @@ -135,7 +135,7 @@ jobs: # Add more jobs for other plugins below, following the same pattern # another-plugin: # needs: detect-changes - # if: needs.detect-changes.outputs.another_plugin == 'true' + # if: github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.another_plugin == 'true' # uses: ./.github/workflows/plugins-deploy-package.yml # secrets: inherit # with: diff --git a/plugins/apps/colors-to-tokens-plugin/wrangler.toml b/plugins/apps/colors-to-tokens-plugin/wrangler.toml index c1d45f3e87..7f48730a36 100644 --- a/plugins/apps/colors-to-tokens-plugin/wrangler.toml +++ b/plugins/apps/colors-to-tokens-plugin/wrangler.toml @@ -1,7 +1,7 @@ name = "color-to-tokens-plugin" compatibility_date = "2025-01-01" -assets = { directory = "../../dist/apps/color-to-tokens-plugin/browser" } +assets = { directory = "../../dist/apps/colors-to-tokens-plugin/browser" } [[routes]] pattern = "WORKER_URI" From 56fd66b91a09c9d97b86b49075fc21dc5ab9d5c2 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 26 Jan 2026 22:48:57 +0100 Subject: [PATCH 06/14] :bug: Fix several issues related to path edition (#8187) * :sparkles: Improve save-path-content event consistency Mainly removing possible race conditions from the event implementation. * :sparkles: Ensure path content snapshot on start-path-edit event * :sparkles: Reuse already available shape-id on split-segments --- .../app/main/data/workspace/path/changes.cljs | 22 ++++---- .../app/main/data/workspace/path/edition.cljs | 51 +++++++++---------- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/frontend/src/app/main/data/workspace/path/changes.cljs b/frontend/src/app/main/data/workspace/path/changes.cljs index d766487e7e..fc43b61fd5 100644 --- a/frontend/src/app/main/data/workspace/path/changes.cljs +++ b/frontend/src/app/main/data/workspace/path/changes.cljs @@ -70,20 +70,22 @@ (= (-> content last :command) :move-to)) (into [] (take (dec (count content)) content)) content)] - (-> state - (st/set-content content)))) + (st/set-content state content))) ptk/WatchEvent (watch [it state _] (let [page-id (:current-page-id state) - objects (dsh/lookup-page-objects state page-id) - id (dm/get-in state [:workspace-local :edition]) - old-content (dm/get-in state [:workspace-local :edit-path id :old-content]) - shape (st/get-path state)] + local (get state :workspace-local) + id (get local :edition) + objects (dsh/lookup-page-objects state page-id)] - (if (and (some? old-content) (some? (:id shape))) - (let [changes (generate-path-changes it objects page-id shape old-content (:content shape))] - (rx/of (dch/commit-changes changes))) - (rx/empty))))))) + ;; NOTE: we proceed only if the shape is present on the + ;; objects, if shape is a ephimeral drawing shape, we should + ;; do nothing + (when-let [shape (get objects id)] + (when-let [old-content (dm/get-in local [:edit-path id :old-content])] + (let [new-content (get shape :content) + changes (generate-path-changes it objects page-id shape old-content new-content)] + (rx/of (dch/commit-changes changes)))))))))) diff --git a/frontend/src/app/main/data/workspace/path/edition.cljs b/frontend/src/app/main/data/workspace/path/edition.cljs index 1210111f71..a97947ea05 100644 --- a/frontend/src/app/main/data/workspace/path/edition.cljs +++ b/frontend/src/app/main/data/workspace/path/edition.cljs @@ -8,7 +8,6 @@ (:require [app.common.data :as d] [app.common.data.macros :as dm] - [app.common.files.helpers :as cfh] [app.common.geom.point :as gpt] [app.common.types.path :as path] [app.common.types.path.helpers :as path.helpers] @@ -289,34 +288,34 @@ (declare stop-path-edit) + (defn start-path-edit [id] (ptk/reify ::start-path-edit ptk/UpdateEvent (update [_ state] (let [objects (dsh/lookup-page-objects state) - edit-path (dm/get-in state [:workspace-local :edit-path id]) - content (st/get-path state :content) - state (cond-> state - (cfh/path-shape? objects id) - (st/set-content (path/close-subpaths content)))] + shape (get objects id)] - (cond-> state - (or (not edit-path) - (= :draw (:edit-mode edit-path))) - (assoc-in [:workspace-local :edit-path id] {:edit-mode :move - :selected #{} - :snap-toggled false}) - (and (some? edit-path) - (= :move (:edit-mode edit-path))) - (assoc-in [:workspace-local :edit-path id :edit-mode] :draw)))) + (-> state + (st/set-content (path/close-subpaths (:content shape))) + (update-in [:workspace-local :edit-path id] + (fn [state] + (let [state (if state + (if (= :move (:edit-mode state)) + (assoc state :edit-mode :draw) + state) + {:edit-mode :move + :selected #{} + :snap-toggled false})] + (assoc state :old-content (:content shape)))))))) ptk/WatchEvent (watch [_ _ stream] - (let [stopper (->> stream - (rx/filter #(let [type (ptk/type %)] - (= type ::dwe/clear-edition-mode) - (= type ::start-path-edit))))] + (let [stopper (rx/filter #(let [type (ptk/type %)] + (= type ::dwe/clear-edition-mode) + (= type ::start-path-edit)) + stream)] (rx/concat (rx/of (undo/start-path-undo)) (->> stream @@ -325,7 +324,8 @@ (rx/map #(stop-path-edit id)) (rx/take-until stopper))))))) -(defn stop-path-edit [id] +(defn stop-path-edit + [id] (ptk/reify ::stop-path-edit ptk/UpdateEvent (update [_ state] @@ -335,13 +335,12 @@ (watch [_ _ _] (rx/of (ptk/data-event :layout/update {:ids [id]}))))) -(defn split-segments - [{:keys [from-p to-p t]}] +(defn- split-segments + [id {:keys [from-p to-p t]}] (ptk/reify ::split-segments ptk/UpdateEvent (update [_ state] - (let [id (st/get-path-id state) - content (st/get-path state :content)] + (let [content (st/get-path state :content)] (-> state (assoc-in [:workspace-local :edit-path id :old-content] content) (st/set-content (-> content @@ -353,10 +352,10 @@ (rx/of (changes/save-path-content {:preserve-move-to true}))))) (defn create-node-at-position - [event] + [params] (ptk/reify ::create-node-at-position ptk/WatchEvent (watch [_ state _] (let [id (st/get-path-id state)] (rx/of (dwsh/update-shapes [id] path/convert-to-path) - (split-segments event)))))) + (split-segments id params)))))) From 3112b240a006b83cb226f45769205a3dcad7bc8d Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 27 Jan 2026 09:28:41 +0100 Subject: [PATCH 07/14] :paperclip: Add missing entry on changelog --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index b175d03cfb..feff0ba555 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -36,6 +36,7 @@ - Fix exception on uploading large fonts [Github #8135](https://github.com/penpot/penpot/pull/8135) - Fix unhandled exception on open-new-window helper [Github #7787](https://github.com/penpot/penpot/issues/7787) - Fix incorrect handling of input values on layout gap and padding inputs [Github #8113](https://github.com/penpot/penpot/issues/8113) +- Fix several race conditions on path editor [Github #8187](https://github.com/penpot/penpot/pull/8187) ## 2.12.1 From 9ca76c745fa4dfa27394a80fc774ff0ca9ad8261 Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Tue, 27 Jan 2026 17:31:50 +0100 Subject: [PATCH 08/14] :bug: Fix app freeze on token name change (#8214) --- CHANGES.md | 2 +- common/src/app/common/types/token.cljc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index feff0ba555..23f906325c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -37,7 +37,7 @@ - Fix unhandled exception on open-new-window helper [Github #7787](https://github.com/penpot/penpot/issues/7787) - Fix incorrect handling of input values on layout gap and padding inputs [Github #8113](https://github.com/penpot/penpot/issues/8113) - Fix several race conditions on path editor [Github #8187](https://github.com/penpot/penpot/pull/8187) - +- Fix app freeze when introducing an error on a very long token name [Taiga #13214](https://tree.taiga.io/project/penpot/issue/13214) ## 2.12.1 diff --git a/common/src/app/common/types/token.cljc b/common/src/app/common/types/token.cljc index 5ee3661a91..6a9d830a3a 100644 --- a/common/src/app/common/types/token.cljc +++ b/common/src/app/common/types/token.cljc @@ -99,7 +99,7 @@ (def token-name-ref [:re {:title "TokenNameRef" :gen/gen sg/text} - #"^(?!\$)([a-zA-Z0-9-$_]+\.?)*(? Date: Tue, 27 Jan 2026 20:27:30 +0100 Subject: [PATCH 09/14] :wrench: Add custom domain --- .github/workflows/plugins-deploy-api-doc.yml | 28 ++++++++++++++------ plugins/wrangler-penpot-plugins-api-doc.toml | 4 +++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/plugins-deploy-api-doc.yml b/.github/workflows/plugins-deploy-api-doc.yml index f8451e9816..aaa1339c9e 100644 --- a/.github/workflows/plugins-deploy-api-doc.yml +++ b/.github/workflows/plugins-deploy-api-doc.yml @@ -7,11 +7,11 @@ on: - staging - main paths: - - "plugins/libs/plugin-types/index.d.ts" - - "plugins/libs/plugin-types/REAME.md" - - "plugins/tools/typedoc.css" - - "plugins/CHANGELOG.md" - - "plugins/wrangler-penpot-plugins-api-doc.toml" + - 'plugins/libs/plugin-types/index.d.ts' + - 'plugins/libs/plugin-types/REAME.md' + - 'plugins/tools/typedoc.css' + - 'plugins/CHANGELOG.md' + - 'plugins/wrangler-penpot-plugins-api-doc.toml' workflow_dispatch: inputs: gh_ref: @@ -86,12 +86,24 @@ jobs: run: | REF="${{ steps.vars.outputs.gh_ref }}" case "$REF" in - main) echo "WORKER_NAME=penpot-plugins-api-doc-pro" >> $GITHUB_ENV ;; - staging) echo "WORKER_NAME=penpot-plugins-api-doc-pre" >> $GITHUB_ENV ;; - develop) echo "WORKER_NAME=penpot-plugins-api-doc-hourly" >> $GITHUB_ENV ;; + main) + echo "WORKER_NAME=penpot-plugins-api-doc-pro" >> $GITHUB_ENV + echo "WORKER_URI=doc.plugins.penpot.app" >> $GITHUB_ENV ;; + staging) + echo "WORKER_NAME=penpot-plugins-api-doc-pre" >> $GITHUB_ENV + echo "WORKER_URI=doc.plugins.penpot.dev" >> $GITHUB_ENV ;; + develop) + echo "WORKER_NAME=penpot-plugins-api-doc-hourly" >> $GITHUB_ENV + echo "WORKER_URI=doc.plugins.hourly.penpot.dev" >> $GITHUB_ENV ;; *) echo "Unsupported branch ${REF}" && exit 1 ;; esac + - name: Set the custom url + working-directory: plugins + shell: bash + run: | + sed -i "s/WORKER_URI/${{ env.WORKER_URI }}/g" wrangler-penpot-plugins-api-doc.toml + - name: Deploy to Cloudflare Workers uses: cloudflare/wrangler-action@v3 with: diff --git a/plugins/wrangler-penpot-plugins-api-doc.toml b/plugins/wrangler-penpot-plugins-api-doc.toml index e9535be2d8..b09adf8b1a 100644 --- a/plugins/wrangler-penpot-plugins-api-doc.toml +++ b/plugins/wrangler-penpot-plugins-api-doc.toml @@ -2,3 +2,7 @@ name = "penpot-plugins-api-doc" compatibility_date = "2025-01-01" assets = { directory = "dist/doc" } + +[[routes]] +pattern = "WORKER_URI" +custom_domain = true From 1834a18263b3d72d6cc43f2d127581a43767656c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Tue, 27 Jan 2026 20:28:30 +0100 Subject: [PATCH 10/14] :wrench: Deploy plugin styles documentation --- .../workflows/plugins-deploy-styles-doc.yml | 123 ++++++++++++++++++ .../wrangler-penpot-plugins-styles-doc.toml | 8 ++ 2 files changed, 131 insertions(+) create mode 100644 .github/workflows/plugins-deploy-styles-doc.yml create mode 100644 plugins/wrangler-penpot-plugins-styles-doc.toml diff --git a/.github/workflows/plugins-deploy-styles-doc.yml b/.github/workflows/plugins-deploy-styles-doc.yml new file mode 100644 index 0000000000..7c759a62e6 --- /dev/null +++ b/.github/workflows/plugins-deploy-styles-doc.yml @@ -0,0 +1,123 @@ +name: Plugins/styles-doc deployer + +on: + push: + branches: + - develop + - staging + - main + paths: + - 'plugins/apps/example-styles/**' + - 'plugins/libs/plugins-styles/**' + - 'plugins/wrangler-penpot-plugins-styles-doc.toml' + workflow_dispatch: + inputs: + gh_ref: + description: 'Name of the branch' + type: choice + required: true + default: 'develop' + options: + - develop + - staging + - main + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Extract some useful variables + id: vars + run: | + echo "gh_ref=${{ inputs.gh_ref || github.ref_name }}" >> $GITHUB_OUTPUT + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ steps.vars.outputs.gh_ref }} + + # START: Setup Node and PNPM enabling cache + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version-file: .nvmrc + + - name: Enable PNPM + working-directory: ./plugins + shell: bash + run: | + corepack enable; + corepack install; + + - name: Get pnpm store path + id: pnpm-store + working-directory: ./plugins + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT + + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('plugins/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + # END: Setup Node and PNPM enabling cache + + - name: Install deps + working-directory: ./plugins + shell: bash + run: | + pnpm install --no-frozen-lockfile; + pnpm add -D -w wrangler@latest; + + - name: Build styles + working-directory: plugins + shell: bash + run: npx nx run example-styles:build + + - name: Select Worker name + run: | + REF="${{ steps.vars.outputs.gh_ref }}" + case "$REF" in + main) + echo "WORKER_NAME=penpot-plugins-styles-doc-pro" >> $GITHUB_ENV + echo "WORKER_URI=styles-doc.plugins.penpot.app" >> $GITHUB_ENV ;; + staging) + echo "WORKER_NAME=penpot-plugins-styles-doc-pre" >> $GITHUB_ENV + echo "WORKER_URI=styles-doc.plugins.penpot.dev" >> $GITHUB_ENV ;; + develop) + echo "WORKER_NAME=penpot-plugins-styles-doc-hourly" >> $GITHUB_ENV + echo "WORKER_URI=styles-doc.plugins.hourly.penpot.dev" >> $GITHUB_ENV ;; + *) echo "Unsupported branch ${REF}" && exit 1 ;; + esac + + - name: Set the custom url + working-directory: plugins + shell: bash + run: | + sed -i "s/WORKER_URI/${{ env.WORKER_URI }}/g" wrangler-penpot-plugins-api-doc.toml + + - name: Deploy to Cloudflare Workers + uses: cloudflare/wrangler-action@v3 + with: + workingDirectory: plugins + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: deploy --config wrangler-penpot-plugins-styles-doc.toml --name ${{ env.WORKER_NAME }} + + - name: Notify Mattermost + if: failure() + uses: mattermost/action-mattermost-notify@master + with: + MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK }} + MATTERMOST_CHANNEL: bot-alerts-cicd + TEXT: | + ❌ πŸ§©πŸ’… *[PENPOT PLUGINS] Error deploying Styles documentation.* + πŸ“„ Triggered from ref: `${{ inputs.gh_ref }}` + πŸ”— Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + @infra diff --git a/plugins/wrangler-penpot-plugins-styles-doc.toml b/plugins/wrangler-penpot-plugins-styles-doc.toml new file mode 100644 index 0000000000..7aa86eb469 --- /dev/null +++ b/plugins/wrangler-penpot-plugins-styles-doc.toml @@ -0,0 +1,8 @@ +name = "penpot-plugins-style-doc" +compatibility_date = "2025-01-01" + +assets = { directory = "dist/apps/example-styles" } + +[[routes]] +pattern = "WORKER_URI" +custom_domain = true From c6465e27e38779ae779487e93987ca20cddac84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Tue, 27 Jan 2026 14:13:42 +0100 Subject: [PATCH 11/14] :books: Fix links related to penpot plugins --- docs/plugins/api.md | 2 +- docs/plugins/beta-changelog.md | 4 ++-- docs/plugins/create-a-plugin.md | 4 ++-- docs/plugins/examples-templates.md | 2 +- docs/plugins/faq.md | 7 ++++--- docs/plugins/getting-started.md | 13 +++++++------ plugins/CONTRIBUTING.md | 2 +- plugins/docs/api-docs.md | 2 +- plugins/libs/plugins-styles/README.md | 2 +- 9 files changed, 20 insertions(+), 18 deletions(-) diff --git a/docs/plugins/api.md b/docs/plugins/api.md index 9abf6a9fa7..d1cd0bf4c3 100644 --- a/docs/plugins/api.md +++ b/docs/plugins/api.md @@ -6,4 +6,4 @@ desc: Create, deploy, and use the Penpot plugin API with our comprehensive docum # Penpot plugins API -We've got all the documentation you need for the API right here. +We've got all the documentation you need for the API right here. diff --git a/docs/plugins/beta-changelog.md b/docs/plugins/beta-changelog.md index 1f58235752..fb8a656f97 100644 --- a/docs/plugins/beta-changelog.md +++ b/docs/plugins/beta-changelog.md @@ -9,13 +9,13 @@ desc: See the Penpot plugin API changelog for version 1.0! Find breaking changes ### boom Epics and highlights - This marks the release of version 1.0, and from this point forward, we’ll do our best to avoid making any more breaking changes (or make deprecations backward compatible). - We’ve redone the documentation. You can check the API here: -[https://penpot-plugins-api-doc.pages.dev/](https://penpot-plugins-api-doc.pages.dev/) +[https://doc.plugins.penpot.app/](https://doc.plugins.penpot.app/) - New samples repository with lots of samples to use the API: [https://github.com/penpot/penpot-plugins-samples](https://github.com/penpot/penpot-plugins-samples) ### boom Breaking changes & Deprecations -- Changed types names to remove the Penpot prefix. So for example: PenpotShape becomes Shape; PenpotFile becomes File, and so on. Check the [API documentation](https://penpot-plugins-api-doc.pages.dev/) for more details. +- Changed types names to remove the Penpot prefix. So for example: PenpotShape becomes Shape; PenpotFile becomes File, and so on. Check the [API documentation](https://doc.plugins.penpot.app/) for more details. - Changes on the penpot.on and penpot.off methods. Previously you had to send the original callback to the off method in order to remove an event listener. Now, penpot.on will return an *id* that you can pass to the penpot.off method in order to remove the listener. diff --git a/docs/plugins/create-a-plugin.md b/docs/plugins/create-a-plugin.md index 80c4a08df6..42fc096dbe 100644 --- a/docs/plugins/create-a-plugin.md +++ b/docs/plugins/create-a-plugin.md @@ -49,7 +49,7 @@ There are two libraries that can help you with your plugin's development. They a ### Plugin styles -@penpot/plugin-styles contains styles to help build the UI for Penpot plugins. To check the styles go to Plugin styles. +@penpot/plugin-styles contains styles to help build the UI for Penpot plugins. To check the styles go to Plugin styles. ```bash npm install @penpot/plugin-styles @@ -139,7 +139,7 @@ parent.postMessage(responseMessage, targetOrigin); By using these message-based events, any data retrieved through the Penpot API can be communicated to and from your plugin interface seamlessly. -For more detailed information, refer to the [Penpot Plugins API Documentation](https://penpot-plugins-api-doc.pages.dev/). +For more detailed information, refer to the [Penpot Plugins API Documentation](https://doc.plugins.penpot.app/). ## 2.5. Step 5. Build the plugin file diff --git a/docs/plugins/examples-templates.md b/docs/plugins/examples-templates.md index 1836b132c2..d50e49e460 100644 --- a/docs/plugins/examples-templates.md +++ b/docs/plugins/examples-templates.md @@ -86,7 +86,7 @@ penpot.library.local.createTypography(); Penpot has dark and light modes, and you can easily add this to your plugin so your interface adapts to both themes. When you add theme support, your plugin will automatically sync with Penpot's interface settings, so the user experience is consistent no matter which mode is selected. This makes your plugin look better and also ensures it stays in line with Penpot's overall design. -Just a heads-up: if you use the plugin-styles library, many elements will automatically adapt to dark or light mode without any extra effort from you. However, if you need to customize specific elements, be sure to use the selectors provided in the styles.css of the example. +Just a heads-up: if you use the plugin-styles library, many elements will automatically adapt to dark or light mode without any extra effort from you. However, if you need to customize specific elements, be sure to use the selectors provided in the styles.css of the example. Theme example diff --git a/docs/plugins/faq.md b/docs/plugins/faq.md index 4050358597..0d761bde10 100644 --- a/docs/plugins/faq.md +++ b/docs/plugins/faq.md @@ -40,7 +40,7 @@ The plugin PenpotFlow or PenpotInteraction interfaces. +Absolutely! You can definitely create flows and interactions in the same elements as in the interface, like frames, shapes, and groups. Just check out the API documentation for the methods: createFlow, addInteraction, or removeInteraction. And if you need more help, you can always check out the Flow or Interaction interfaces. ### Are there any security or quality criteria I should be aware of? @@ -48,7 +48,8 @@ There are no set requirements. However, we can recommend the use of https:\/\/create-palette-penpot-plugin.pages.dev/assets/manifest.json or check the code here +No, it’s completely optional, in fact, we have an example of a plugin without UI. Try the plugin using this url to install it: https:\/\/create-palette.plugins.penpot.app/assets/manifest.json or check the code here + ### Can I create components? @@ -58,7 +59,7 @@ Yes, it is possible to create components using: createComponent(shapes: Shape[]): LibraryComponent; ``` -Take a look at the Penpot Library methods in the API documentation or this simple example. +Take a look at the Penpot Library methods in the API documentation or this simple example. ### Is there a place where I can share my plugin? diff --git a/docs/plugins/getting-started.md b/docs/plugins/getting-started.md index 9765e737b0..abfbc508b1 100644 --- a/docs/plugins/getting-started.md +++ b/docs/plugins/getting-started.md @@ -69,12 +69,13 @@ You need to provide the plugin's manifest URL for the installation. If there are | Name | URL | | ------------- | ------------------------------------------------------------------- | -| Lorem Ipsum | https://lorem-ipsum-penpot-plugin.pages.dev/assets/manifest.json | -| Contrast | https://contrast-penpot-plugin.pages.dev/assets/manifest.json | -| Feather icons | https://icons-penpot-plugin.pages.dev/assets/manifest.json | -| Tables | https://table-penpot-plugin.pages.dev/assets/manifest.json | -| Color palette | https://create-palette-penpot-plugin.pages.dev/assets/manifest.json | -| Rename layers | https://rename-layers-penpot-plugin.pages.dev/assets/manifest.json | +| Color palette | https://create-palette.plugins.penpot.app/assets/manifest.json | +| Contrast | https://contrast.plugins.penpot.app/assets/manifest.json | +| Feather icons | https://icons.plugins.penpot.app/assets/manifest.json | +| Lorem ipsum | https://lorem-ipsum.plugins.penpot.app/assets/manifest.json | +| Rename layers | https://rename-layers.plugins.penpot.app/assets/manifest.json | +| Tables | https://table.plugins.penpot.app/assets/manifest.json | + ## 1.4. Plugin's basics diff --git a/plugins/CONTRIBUTING.md b/plugins/CONTRIBUTING.md index e4440cf083..10b243cd19 100644 --- a/plugins/CONTRIBUTING.md +++ b/plugins/CONTRIBUTING.md @@ -7,7 +7,7 @@ different parts of the platform, please refer to `docs/` directory. ## Reporting Bugs -We are using [GitHub Issues](https://github.com/penpot/penpot-plugins/issues) +We are using [GitHub Issues](https://github.com/penpot/penpot/issues) for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn't already exist. diff --git a/plugins/docs/api-docs.md b/plugins/docs/api-docs.md index a8cf00b157..dd38659fc9 100644 --- a/plugins/docs/api-docs.md +++ b/plugins/docs/api-docs.md @@ -19,7 +19,7 @@ the latest changes from the `main` branch. This will trigger the deployment at Cloudfare if the `libs/plugin-types/index.d.ts` or the `tools/typedoc.css` files have been updated. -Take a look at the [Penpot plugins API](https://penpot-plugins-api-doc.pages.dev/) to see what's new. +Take a look at the [Penpot plugins API](https://doc.plugins.penpot.app/) to see what's new. #### Styles diff --git a/plugins/libs/plugins-styles/README.md b/plugins/libs/plugins-styles/README.md index 6739a9c393..9291f21cfe 100644 --- a/plugins/libs/plugins-styles/README.md +++ b/plugins/libs/plugins-styles/README.md @@ -20,7 +20,7 @@ Import the CSS file into your project: For detailed examples and to see how to use the styles and components, visit the documentation at: -[Penpot Plugin Styles Documentation](https://penpot-plugins-styles.pages.dev) +[Penpot Plugin Styles Documentation](https://styles-doc.plugins.penpot.app) #### Icons From 18aca16f98d25bf3c512df42bad4c6582ddbff62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Tue, 27 Jan 2026 21:04:25 +0100 Subject: [PATCH 12/14] :wrench: Fix file name --- .github/workflows/plugins-deploy-styles-doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins-deploy-styles-doc.yml b/.github/workflows/plugins-deploy-styles-doc.yml index 7c759a62e6..0ab376cb6e 100644 --- a/.github/workflows/plugins-deploy-styles-doc.yml +++ b/.github/workflows/plugins-deploy-styles-doc.yml @@ -100,7 +100,7 @@ jobs: working-directory: plugins shell: bash run: | - sed -i "s/WORKER_URI/${{ env.WORKER_URI }}/g" wrangler-penpot-plugins-api-doc.toml + sed -i "s/WORKER_URI/${{ env.WORKER_URI }}/g" wrangler-penpot-plugins-styles-doc.toml - name: Deploy to Cloudflare Workers uses: cloudflare/wrangler-action@v3 From a9e2fc8d9498723d6b839e5d10952f96f5f605b8 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 28 Jan 2026 12:54:18 +0100 Subject: [PATCH 13/14] :sparkles: Backport linter fixes and config from develop --- .clj-kondo/config.edn | 9 +++++++++ backend/src/app/binfile/v3.clj | 5 +---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.clj-kondo/config.edn b/.clj-kondo/config.edn index 1d5149d6b6..fba4cac7bc 100644 --- a/.clj-kondo/config.edn +++ b/.clj-kondo/config.edn @@ -45,6 +45,15 @@ :potok/reify-type {:level :error} + :redundant-primitive-coercion + {:level :off} + + :unused-excluded-var + {:level :off} + + :unresolved-excluded-var + {:level :off} + :missing-protocol-method {:level :off} diff --git a/backend/src/app/binfile/v3.clj b/backend/src/app/binfile/v3.clj index bd6c041b0a..0db826e407 100644 --- a/backend/src/app/binfile/v3.clj +++ b/backend/src/app/binfile/v3.clj @@ -873,11 +873,8 @@ (import-storage-objects cfg) (let [files (get manifest :files) - result (reduce (fn [result {:keys [id] :as file}] + result (reduce (fn [result file] (let [name' (get file :name) - name' (if (map? name) - (get name id) - name') file (assoc file :name name')] (conj result (import-file cfg file)))) [] From cc81e56d82ddd1acaa543791859f47be862923a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Wed, 28 Jan 2026 11:58:19 +0100 Subject: [PATCH 14/14] :wrench: Fix CORS error --- plugins/apps/colors-to-tokens-plugin/project.json | 1 + plugins/apps/colors-to-tokens-plugin/src/_headers | 4 ++++ plugins/apps/contrast-plugin/project.json | 1 + plugins/apps/contrast-plugin/src/_headers | 4 ++++ plugins/apps/create-palette-plugin/public/_headers | 4 ++++ plugins/apps/icons-plugin/project.json | 1 + plugins/apps/icons-plugin/src/_headers | 4 ++++ plugins/apps/lorem-ipsum-plugin/project.json | 1 + plugins/apps/lorem-ipsum-plugin/src/_headers | 4 ++++ plugins/apps/rename-layers-plugin/project.json | 1 + plugins/apps/rename-layers-plugin/src/_headers | 4 ++++ plugins/apps/table-plugin/project.json | 1 + plugins/apps/table-plugin/src/_headers | 4 ++++ 13 files changed, 34 insertions(+) create mode 100644 plugins/apps/colors-to-tokens-plugin/src/_headers create mode 100644 plugins/apps/contrast-plugin/src/_headers create mode 100644 plugins/apps/create-palette-plugin/public/_headers create mode 100644 plugins/apps/icons-plugin/src/_headers create mode 100644 plugins/apps/lorem-ipsum-plugin/src/_headers create mode 100644 plugins/apps/rename-layers-plugin/src/_headers create mode 100644 plugins/apps/table-plugin/src/_headers diff --git a/plugins/apps/colors-to-tokens-plugin/project.json b/plugins/apps/colors-to-tokens-plugin/project.json index 01ad02bbe6..87e3fb83d4 100644 --- a/plugins/apps/colors-to-tokens-plugin/project.json +++ b/plugins/apps/colors-to-tokens-plugin/project.json @@ -16,6 +16,7 @@ "polyfills": ["zone.js"], "tsConfig": "apps/colors-to-tokens-plugin/tsconfig.app.json", "assets": [ + "apps/colors-to-tokens-plugin/src/_headers", "apps/colors-to-tokens-plugin/src/favicon.ico", "apps/colors-to-tokens-plugin/src/assets" ], diff --git a/plugins/apps/colors-to-tokens-plugin/src/_headers b/plugins/apps/colors-to-tokens-plugin/src/_headers new file mode 100644 index 0000000000..cdb4e7ed20 --- /dev/null +++ b/plugins/apps/colors-to-tokens-plugin/src/_headers @@ -0,0 +1,4 @@ +/* +Access-Control-Allow-Origin: * +Access-Control-Allow-Methods: GET, POST, OPTIONS +Access-Control-Allow-Headers: Content-Type diff --git a/plugins/apps/contrast-plugin/project.json b/plugins/apps/contrast-plugin/project.json index 6de0d44104..69f9c92766 100644 --- a/plugins/apps/contrast-plugin/project.json +++ b/plugins/apps/contrast-plugin/project.json @@ -16,6 +16,7 @@ "polyfills": ["zone.js"], "tsConfig": "apps/contrast-plugin/tsconfig.app.json", "assets": [ + "apps/contrast-plugin/src/_headers", "apps/contrast-plugin/src/favicon.ico", "apps/contrast-plugin/src/assets" ], diff --git a/plugins/apps/contrast-plugin/src/_headers b/plugins/apps/contrast-plugin/src/_headers new file mode 100644 index 0000000000..cdb4e7ed20 --- /dev/null +++ b/plugins/apps/contrast-plugin/src/_headers @@ -0,0 +1,4 @@ +/* +Access-Control-Allow-Origin: * +Access-Control-Allow-Methods: GET, POST, OPTIONS +Access-Control-Allow-Headers: Content-Type diff --git a/plugins/apps/create-palette-plugin/public/_headers b/plugins/apps/create-palette-plugin/public/_headers new file mode 100644 index 0000000000..cdb4e7ed20 --- /dev/null +++ b/plugins/apps/create-palette-plugin/public/_headers @@ -0,0 +1,4 @@ +/* +Access-Control-Allow-Origin: * +Access-Control-Allow-Methods: GET, POST, OPTIONS +Access-Control-Allow-Headers: Content-Type diff --git a/plugins/apps/icons-plugin/project.json b/plugins/apps/icons-plugin/project.json index 6540a148e1..90f01a50c2 100644 --- a/plugins/apps/icons-plugin/project.json +++ b/plugins/apps/icons-plugin/project.json @@ -16,6 +16,7 @@ "polyfills": ["zone.js"], "tsConfig": "apps/icons-plugin/tsconfig.app.json", "assets": [ + "apps/icons-plugin/src/_headers", "apps/icons-plugin/src/favicon.ico", "apps/icons-plugin/src/assets" ], diff --git a/plugins/apps/icons-plugin/src/_headers b/plugins/apps/icons-plugin/src/_headers new file mode 100644 index 0000000000..cdb4e7ed20 --- /dev/null +++ b/plugins/apps/icons-plugin/src/_headers @@ -0,0 +1,4 @@ +/* +Access-Control-Allow-Origin: * +Access-Control-Allow-Methods: GET, POST, OPTIONS +Access-Control-Allow-Headers: Content-Type diff --git a/plugins/apps/lorem-ipsum-plugin/project.json b/plugins/apps/lorem-ipsum-plugin/project.json index db66c3677b..1747fcf6e8 100644 --- a/plugins/apps/lorem-ipsum-plugin/project.json +++ b/plugins/apps/lorem-ipsum-plugin/project.json @@ -16,6 +16,7 @@ "polyfills": ["zone.js"], "tsConfig": "apps/lorem-ipsum-plugin/tsconfig.app.json", "assets": [ + "apps/lorem-ipsum-plugin/src/_headers", "apps/lorem-ipsum-plugin/src/favicon.ico", "apps/lorem-ipsum-plugin/src/assets" ], diff --git a/plugins/apps/lorem-ipsum-plugin/src/_headers b/plugins/apps/lorem-ipsum-plugin/src/_headers new file mode 100644 index 0000000000..cdb4e7ed20 --- /dev/null +++ b/plugins/apps/lorem-ipsum-plugin/src/_headers @@ -0,0 +1,4 @@ +/* +Access-Control-Allow-Origin: * +Access-Control-Allow-Methods: GET, POST, OPTIONS +Access-Control-Allow-Headers: Content-Type diff --git a/plugins/apps/rename-layers-plugin/project.json b/plugins/apps/rename-layers-plugin/project.json index 9a4e67c5be..71c314986a 100644 --- a/plugins/apps/rename-layers-plugin/project.json +++ b/plugins/apps/rename-layers-plugin/project.json @@ -16,6 +16,7 @@ "polyfills": ["zone.js"], "tsConfig": "apps/rename-layers-plugin/tsconfig.app.json", "assets": [ + "apps/rename-layers-plugin/src/_headers", "apps/rename-layers-plugin/src/favicon.ico", "apps/rename-layers-plugin/src/assets" ], diff --git a/plugins/apps/rename-layers-plugin/src/_headers b/plugins/apps/rename-layers-plugin/src/_headers new file mode 100644 index 0000000000..cdb4e7ed20 --- /dev/null +++ b/plugins/apps/rename-layers-plugin/src/_headers @@ -0,0 +1,4 @@ +/* +Access-Control-Allow-Origin: * +Access-Control-Allow-Methods: GET, POST, OPTIONS +Access-Control-Allow-Headers: Content-Type diff --git a/plugins/apps/table-plugin/project.json b/plugins/apps/table-plugin/project.json index 9ac5758270..e3cc6fc45e 100644 --- a/plugins/apps/table-plugin/project.json +++ b/plugins/apps/table-plugin/project.json @@ -16,6 +16,7 @@ "polyfills": ["zone.js"], "tsConfig": "apps/table-plugin/tsconfig.app.json", "assets": [ + "apps/table-plugin/src/_headers", "apps/table-plugin/src/favicon.ico", "apps/table-plugin/src/assets" ], diff --git a/plugins/apps/table-plugin/src/_headers b/plugins/apps/table-plugin/src/_headers new file mode 100644 index 0000000000..cdb4e7ed20 --- /dev/null +++ b/plugins/apps/table-plugin/src/_headers @@ -0,0 +1,4 @@ +/* +Access-Control-Allow-Origin: * +Access-Control-Allow-Methods: GET, POST, OPTIONS +Access-Control-Allow-Headers: Content-Type