mirror of
https://github.com/penpot/penpot.git
synced 2026-11-16 23:20:37 +00:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
49f1936bfc
@ -16,7 +16,10 @@ Penpot records what users do as events in the Postgres `audit_log` table. There
|
||||
|
||||
- Most backend events need no manual code: `wrap-audit` in `app.rpc` runs after every RPC handler when `:webhooks`, `:audit-log` or `:telemetry` is on (unless the command sets `::audit/skip`) and builds the event via `prepare-rpc-event`. The event name defaults to the command name (prefixed with `<module>-` outside `main`), props default to the request params, and timestamps come from the server request time.
|
||||
- Commands customize through result metadata (`rph/with-meta`): `::audit/replace-props` swaps the props wholesale (auth commands use `profile->props` so a register event carries the profile, not the password), `::audit/props` merges extras, `::audit/context`/`profile-id`/`name`/`type` override the defaults. `clean-props` always strips nils, qualified keys and `:session-id/:password/:old-password/:token/:client-secret` as a last line of defense.
|
||||
- INVARIANT: the event's `profile-id` is the caller, resolved as `::audit/profile-id` metadata -> `::rpc/profile-id` -> `uuid/zero`. It is NEVER taken from the response. Results carry `:profile-id` keys that belong to someone else (`get-error-report` returns the report with its content merged, so the profile that owned the report; `verify-token` on a team invitation returns the inviter), and honoring them misattributes the action. Commands with `::rpc/auth false` (`login-*`, `register-profile`, `create-demo-profile`, `verify-token`, `prepare-register-profile`) have no caller to fall back on, so they MUST set `::audit/profile-id` in the result metadata or the event lands on `uuid/zero`.
|
||||
- The `::audit/profile-id` override goes through `coerce-profile-id`: a string is parsed, anything that cannot become a uuid is discarded (with a warning) and the event falls back to the caller. Do not pass the value straight through: `schema:event` requires `::sm/uuid` and `submit*` swallows the validation error, so a non-uuid override silently loses the row instead of failing loudly. Hand-built events built with `event-from-rpc-params` + `submit` (clone-template, accept-team-invitation, `management/nitrate` push-audit-events) do NOT go through that coercion: they must supply a uuid.
|
||||
- `submit` is the normal entry point (fills defaults, validates `schema:event`, runs inside `tx-run!`, logs failures without failing the RPC). `insert` is the low-level one for CLI/helpers and the webhook subsystem: direct write, no webhook/telemetry fan-out, silent unless `:audit-log` is on. Boot emits `trigger/instance-start` from `setup/props` so every restart is visible in the log.
|
||||
- `accept-organization-invitation` distinguishes its two flows with the props, not with an origin: `:organization-member-add-source` is `"direct-organization-invitation"` for a direct organization invitation and `"team-invitation"` for a team invitation that also adds to the organization, and `:belongs-to-team-on-add` repeats the same distinction as a boolean. Do not add a third prop for it. The event `context` has an `:event-origin`, but it belongs to the browser: `make-data-event` in `app.main.data.event` puts the UI origin there and it is on the frontend allowlist, while `safe-backend-context-keys` lists no `:event-origin`, so a backend event has nowhere to put one. Text props are dropped from the telemetry shadow rows by `filter-telemetry-props`; the full `audit_log` row and the Nexus archive still carry them.
|
||||
|
||||
## Consumers I: webhooks (`app.loggers.webhooks`)
|
||||
|
||||
@ -48,4 +51,4 @@ Penpot records what users do as events in the Postgres `audit_log` table. There
|
||||
## Tests
|
||||
|
||||
- `backend_tests/rpc-audit-test.clj` exercises the whole backend path (full-row insert, telemetry-only and dual-row modes, `submit*`, no-op without flags, `insert` gating, `prepare-rpc-event` resolution) with `with-redefs [cf/flags #{...}]` against real `audit_log` rows.
|
||||
- Other RPC suites mock `app.loggers.audit/submit` (nil return; `helpers.clj` stubs it globally) and assert on `:call-args-list`; any new command that must (or must not) emit an event needs the same treatment.
|
||||
- Other RPC suites mock `app.loggers.audit/submit` (nil return; `helpers.clj` stubs it globally) and assert on `:call-args-list`; any new command that must (or must not) emit an event needs the same treatment. `rpc-team-test/accept-organization-invitation-audit-event` is the reference for invitation events: three scenarios (direct org invitation, team invitation that adds to the org, already-a-member) asserting the emitted props, the add source and the team flag that tell the two flows apart, and the exact number of rows per event name. The count matters: asserting props against the first match with `first` passes even when a command emits the same name twice. Props have no schema on either ingest path, so these assertions are the only guard on the event contract.
|
||||
|
||||
@ -135,8 +135,8 @@
|
||||
- Groups relationship loads by source and target table pair.
|
||||
- Resolves relationship endpoints with joins.
|
||||
- Does not use `createArrowRelTable` for UUID relationship endpoints.
|
||||
- Keeps the Arrow `RootAllocator` alive until Ladybug releases staged buffers.
|
||||
- Closes the allocator after the connection and database close sequence.
|
||||
- The Arrow `RootAllocator` nests outside the Ladybug connection and closes after the connection and database close sequence; Ladybug keeps staged buffers until connection close, so an inner allocator leaks.
|
||||
- `with-allocator!` keeps the body exception when the allocator close also throws, attaching the close failure as suppressed.
|
||||
|
||||
### `app.graph.ingest`
|
||||
|
||||
@ -150,6 +150,7 @@
|
||||
- Writes graph metadata last.
|
||||
- Treats the final metadata write as the complete-build marker.
|
||||
- Supports a persistent database path and an open connection.
|
||||
- `ingest-on-connection!` requires a caller-owned `:arrow-alloc` that outlives the connection; it raises `:missing-arrow-allocator` without one.
|
||||
|
||||
### `app.graph.projection.document`
|
||||
|
||||
@ -244,7 +245,7 @@
|
||||
- The map key is the string form of `profile-id`.
|
||||
- One profile has one graph session.
|
||||
- Loading another file first destroys the old session.
|
||||
- A session stores the Ladybug database and connection.
|
||||
- A session stores the Ladybug database, connection, and Arrow allocator; the allocator closes after the connection and database.
|
||||
- A session stores a shared lock for graph access.
|
||||
- A session stores file metadata.
|
||||
- A session stores the incremental sync index.
|
||||
@ -450,8 +451,8 @@
|
||||
|
||||
- `:graph` is defined in `common/src/app/common/flags.cljc`.
|
||||
- The flag is off by default.
|
||||
- `com.ladybugdb/lbug` version `0.19.1` is a backend dependency.
|
||||
- `org.apache.arrow/arrow-memory-netty` version `18.2.0` supports Arrow `RootAllocator`.
|
||||
- `com.ladybugdb/lbug` version `0.20.4` is a backend dependency.
|
||||
- `org.apache.arrow/arrow-memory-netty` version `19.0.0` supports Arrow `RootAllocator`.
|
||||
- The JVM uses `--enable-native-access=ALL-UNNAMED`.
|
||||
- The JVM uses `--add-opens=java.base/java.nio=ALL-UNNAMED`.
|
||||
- The JVM uses `--sun-misc-unsafe-memory-access=allow`.
|
||||
@ -463,7 +464,7 @@
|
||||
|
||||
### `backend-tests.graph-sync-parity-test`
|
||||
|
||||
- Uses two Ladybug `:memory:` databases.
|
||||
- Uses two Ladybug `:memory:` databases under one Arrow allocator outer to both; an allocator closed before its connections leaks.
|
||||
- Does not use PostgreSQL or a live graph session.
|
||||
- Projects initial file data into database A.
|
||||
- Applies changes to database A through incremental sync.
|
||||
@ -473,6 +474,7 @@
|
||||
- Reports differences by table, row key, and column.
|
||||
- Covers shape add, shape modification, shape deletion, movement, and page changes.
|
||||
- Contains a test that injects a sync defect and expects a graph difference.
|
||||
- Contains a test that `ingest-on-connection!` without `:arrow-alloc` raises `:missing-arrow-allocator`.
|
||||
- Does not cover all component change variants.
|
||||
- Does not cover every movement insertion mode.
|
||||
|
||||
@ -530,7 +532,7 @@
|
||||
|
||||
- Sessions have no TTL.
|
||||
- Sessions remain until unload, replacement, or process shutdown.
|
||||
- Each session owns native Ladybug memory.
|
||||
- Each session owns native Ladybug memory and its Arrow allocator.
|
||||
- Many profiles can create many native databases.
|
||||
- A profile load replaces its previous session.
|
||||
- Two browser tabs for one profile share one graph session.
|
||||
@ -590,7 +592,7 @@
|
||||
- A graph query from the console must be read-only.
|
||||
- A graph session must serialize connection access.
|
||||
- Graph routes must remain behind the `:graph` flag and `/dbg` access control.
|
||||
- The Arrow allocator must outlive all Ladybug operations that use its buffers.
|
||||
- The Arrow allocator nests outside the Ladybug connection and must outlive all Ladybug operations that use its buffers; a session owns its allocator until unload.
|
||||
- `GraphMeta` must be written after the full ingest and transforms finish.
|
||||
|
||||
## Key Files
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
- Do not treat nil as a distinct persisted state from absence. Import/export and cleanup paths may filter nil attrs away.
|
||||
- Avoid Clojure-special naming in exported object attrs, especially boolean names ending in `?`; exported/imported data must survive JSON/SVG/Transit and external tooling.
|
||||
- Any new shape attr that participates in component sync must be listed in `app.common.types.component/sync-attrs` with the correct touched group. Attrs absent from `sync-attrs` are ignored by component synchronization.
|
||||
- Shape `:svg-attrs` is the one map whose keys are camelCase React prop names (`fillRule`, not `fill-rule`), because the SVG import path runs them through `app.common.svg/attrs->props`. The `.penpot` reader (`app.common.json/read-kebab-key`) rewrites every json key of every entry to kebab-case, nested maps included, so any code that decodes a binary file must run `:svg-attrs` back through `attrs->props` or the names are lost. `:svg-defs` and the `:content` tree of `svg-raw` shapes keep their source names and round-trip on their own.
|
||||
|
||||
## Cross-module update checklist
|
||||
|
||||
|
||||
@ -28,4 +28,5 @@
|
||||
- Prefer optional attrs/default behavior so old files continue working without migration. If absence cannot preserve old behavior, add a migration.
|
||||
- Migrations are an ordered set mixing legacy version-derived ids and newer named ids. Keep append order stable; `migrate` applies the set difference between available migrations and file migrations.
|
||||
- `migrate-file` synthesizes legacy migration ids from old numeric versions when `:migrations` is absent, migrates legacy features, and records feature flags created through `cfeat/*new*`.
|
||||
- When a file had no previous `:migrations`, `migrate-file` marks all migrations as migrated in metadata so callers persist the complete migration set, not only transformations that changed data.
|
||||
- When a file had no previous `:migrations`, `migrate-file` marks all migrations as migrated in metadata so callers persist the complete migration set, not only transformations that changed data.
|
||||
- Closed schemas (`schema:stroke-attrs` and others) reject a key that was dropped from the declaration, so removing a declared attr needs a migration in the same change, for data already written with it.
|
||||
@ -3,10 +3,10 @@
|
||||
|
||||
:deps
|
||||
{penpot/common {:local/root "../common"}
|
||||
org.clojure/clojure {:mvn/version "1.12.5"}
|
||||
org.clojure/clojure {:mvn/version "1.12.6"}
|
||||
org.clojure/tools.namespace {:mvn/version "1.5.1"}
|
||||
|
||||
com.github.luben/zstd-jni {:mvn/version "1.5.7-12"}
|
||||
com.github.luben/zstd-jni {:mvn/version "1.5.7-20"}
|
||||
|
||||
io.prometheus/simpleclient {:mvn/version "0.16.0"}
|
||||
io.prometheus/simpleclient_hotspot {:mvn/version "0.16.0"}
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
io.prometheus/simpleclient_httpserver {:mvn/version "0.16.0"}
|
||||
|
||||
io.lettuce/lettuce-core {:mvn/version "7.7.0.RELEASE"}
|
||||
io.lettuce/lettuce-core {:mvn/version "7.8.0.RELEASE"}
|
||||
;; Minimal dependencies required by lettuce, we need to include them
|
||||
;; explicitly because clojure dependency management does not support
|
||||
;; yet the BOM format.
|
||||
@ -36,7 +36,7 @@
|
||||
com.github.seancorfield/next.jdbc
|
||||
{:mvn/version "1.3.1118"}
|
||||
|
||||
metosin/reitit-core {:mvn/version "0.10.1"}
|
||||
metosin/reitit-core {:mvn/version "0.11.0"}
|
||||
nrepl/nrepl {:mvn/version "1.7.0"}
|
||||
|
||||
org.postgresql/postgresql {:mvn/version "42.7.13"}
|
||||
@ -55,21 +55,21 @@
|
||||
org.jsoup/jsoup {:mvn/version "1.23.2"}
|
||||
|
||||
at.yawk.lz4/lz4-java
|
||||
{:mvn/version "1.11.2"}
|
||||
{:mvn/version "1.12.0"}
|
||||
|
||||
org.clojars.pntblnk/clj-ldap {:mvn/version "0.0.17"}
|
||||
|
||||
dawran6/emoji {:mvn/version "0.2.0"}
|
||||
markdown-clj/markdown-clj {:mvn/version "1.12.9"}
|
||||
markdown-clj/markdown-clj {:mvn/version "1.12.10"}
|
||||
|
||||
;; Pretty Print specs
|
||||
pretty-spec/pretty-spec {:mvn/version "0.1.4"}
|
||||
software.amazon.awssdk/s3 {:mvn/version "2.54.5"}
|
||||
software.amazon.awssdk/sts {:mvn/version "2.54.5"}
|
||||
software.amazon.awssdk/s3 {:mvn/version "2.55.6"}
|
||||
software.amazon.awssdk/sts {:mvn/version "2.55.6"}
|
||||
|
||||
com.ladybugdb/lbug {:mvn/version "0.19.1"}
|
||||
com.ladybugdb/lbug {:mvn/version "0.20.4"}
|
||||
;; Required by Arrow RootAllocator (lbug only pulls arrow-memory-core).
|
||||
org.apache.arrow/arrow-memory-netty {:mvn/version "18.2.0"}}
|
||||
org.apache.arrow/arrow-memory-netty {:mvn/version "19.0.0"}}
|
||||
|
||||
:paths ["src" "resources" "target/classes"]
|
||||
:aliases
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"license": "MPL-2.0",
|
||||
"author": "Kaleidos INC Sucursal en España SL",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/penpot/penpot"
|
||||
|
||||
122
backend/pnpm-lock.yaml
generated
122
backend/pnpm-lock.yaml
generated
@ -7,153 +7,153 @@ importers:
|
||||
configDependencies: {}
|
||||
packageManagerDependencies:
|
||||
pnpm:
|
||||
specifier: 12.5.1
|
||||
version: 12.5.1
|
||||
specifier: 12.6.0
|
||||
version: 12.6.0
|
||||
|
||||
packages:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6LGBmQuDzUmgpHSuy+haG0jrmkwFNa4EuShDZqK3cIBv4Wfb75CzjJmowkzr+iJg40vnBKMQ62t4Ko6mwsId7A==}
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-kviIHft9h02q+7N2In7tSL9T/HRUSGwYmU74YPtsWU5ee7vgqPyC0JT6RRX6miW+NxX1CvHgQxg69qq1qTLJYQ==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
resolution: {integrity: sha512-091oCltP3Rx89yxL1Wh5rXkUXEyFzyxIzSHKRFDyDFlQkb8Ox8FaDcm+M8PNkMyqnLA+qeGOLzY7Rjj9izl1Ww==}
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
resolution: {integrity: sha512-CT8aJKLq2mtZFE71pr4E5Z2xHL8uGnRGr+NclDqsXlVF4SVcQ2QAs14mWi0C8gjT4hbmi+Q0lJRRIkMAWfjjng==}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-r1vEMQPVjRexZMyL2HonxJoo3+nuB/+G+tg+f2PK6faRdXX1TDwevKXOxJAfqlPInTy6W/pm912+s+m0NcR4BQ==}
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-rafpVkjzugKBMxSvGQd5wK1x5eOTkD/+lcJIFHeQhvd+BJ8kDisOOvwhQDrpGd4vd2Fx+hhW0P2Ptt638OlhFg==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
resolution: {integrity: sha512-YHwI1g2B+Y2cAEylOR31r781GWijdJL7Gy7TEn/ZpZ5v/Cuwp5/Pz0EFCgo0M2MKLafAbL/laUMGvOpAdnerAw==}
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
resolution: {integrity: sha512-72Jpuv1m24gI8zUNcaylYpBWEhBzz1VPhnDIU2GYM2eRP+KsOqVLwV78i+JrihI39zY2NNXmaN4eAKX1inpaDQ==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
resolution: {integrity: sha512-sFUMHiYFs6q5syFwgaVppzhQSmqnXoJIz/YwTXIOXTDE76ndIpTRpDGAnBCBKjsaEBnqjJA/2l6hpJcNDNoMiA==}
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
resolution: {integrity: sha512-LON4QgNy1w/XF4uySZIyC/5hEB0oGdelXsY9tSKqstER+2j2X2oHz67skD11RRd/HWFRtMr64shQZ4I9ZoZ0zg==}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-zupuxYZBuBEGjUz805/4/Asq01UNziFADANt8yp+LdUjU9bbMa3xY78Bx1PsGDqBy7aiad4sdUMK8ZxH4n4gmQ==}
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-BdDpX+DeaMUc5x6WNcE6FkmFy36NwrBbBvwsZU737Zt3u1fTY+iKFPchjEQNCM4rT6q6xvF2oN3ZwExGsJCkxQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6hbMWW2/eQo1b5wvQPe/ndLHVTH88Rav6N+ffD4/h6IuFMjWCgasFYYsFv0GrvpqREAx3SwmZSvli+0NFXqbxA==}
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-8h2sNoIhHDpHDYqZZCh9PXr6krqW10btb0GHVGuw710muDHlFAHMtUG2ogmaHge6zJG1xgY4Y7mwX5g/LWvrYg==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
resolution: {integrity: sha512-Gg3maDzaE/ZFMV9HIx/BwMN0Y6QbEs13URfxmiYHtKjjLAs5wEQZRMUP87YNLYO7cNaEfbM8GRbS9vPosyD9Gw==}
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
resolution: {integrity: sha512-ld6xgcEhFCFrsVsJhbmdmR714PnsEspO/Ij8w0/D7OSiz2hYGu3fZd5tKRxOI5m6H6Gl0/RRFAPncTHbsgXVjQ==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
resolution: {integrity: sha512-6fgWxXYMBMsWQ8DAiRevscX4QZQjwh+FsyCj8ZOk8pMXvqeq84MqBLCmS6KckvnbdqJ+HlSVQ7fs/kd0ldwfhA==}
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
resolution: {integrity: sha512-HIbImydoC3J8NFt+8MXfhTCf5rO6NjCMyinSAHac0VmV8uCHw+kbQkyAzxV84rzz9ZOzmBOnj0b1N461UIYGsw==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
resolution: {integrity: sha512-nzMZruRvxDhEfYUhzu+7EmM39+82Dgagc/6hPFPqGqzXNGcIG0anuxbUxfeNtI64SHt91KuuYUmCB/inlM+Pag==}
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
resolution: {integrity: sha512-DjSqT7+BZ/lWcDHwNMuzsRVfyxUimh+D54Xw4tSWbdVVQhtWtNMUyI93LVnwCmsoEpar2gC3SFeAgywx37svKQ==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-kHCbegdTNHpzmPtUD4S5fqkVkqgdQR47spF9p2VPP3dIIkZl6Ytk8w0vhlAsAGgge8FmucfwX+vvPKgm0NtOCQ==}
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-31lKeGPmRE6xfV6I3VjaEGVFRei14pl/zgoFDK4w+UkbJqOuNl2Ht3O1GuqNIg3Gl14qTEb4kZRAYFHXifDx9A==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
resolution: {integrity: sha512-3PkUBYo5z4dgtlnTNIFj7QGpcDUAuqXz9WGVigPDCeccEnhGiRkWmA5102TmYJHtwJP3LfmE+ZF9PGeWhn8p9Q==}
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
resolution: {integrity: sha512-qFWBneHJAJ73W4whtbaFOL1M/7DBC6ILHXuxc7ZPtEhfPuT1zeZiGrmKHoMAfJA+mcm6xhOFljqVTUS+00Jabw==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-49NvjZIXHly56/PLoEDD7VphbO4N8dwMXoApElDFCpVGDNGeKlwlib1tXtnpTF6i2/XIsAj7GgatHB5KHXgBnA==}
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-OhfefXEEykZlslSUhR8PPRe6MVPV3Oink/dVfIecE5velpc7j80cZYsHlaDrtRDcm3TPwQHkaRW1SJ1efX9oFg==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
resolution: {integrity: sha512-ePUmQFPAPJFNMwg1lelDx2PdjHqYRiF0yfg5e6qeDbPNOu97QNo557Ru/SxmCrmt8ydQWNuZXWpdEp019md5vw==}
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
resolution: {integrity: sha512-L2tuyrD2+Imgxs3VK/ST/2L3xD6vDP0ktJQxM0TaGw7TbAQEMq+RMc8iK6Ew7Id579uzjJe8jSfJID2ZGsOHCA==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
pnpm@12.5.1:
|
||||
resolution: {integrity: sha512-4/MFvHhKK8ifWtO2E4iJRw+ujSr182thIW7JHCw9ZAiXdfneOKrDMQROpA8kXLDVZmOS399lgk4ZB+9qLGLeXw==}
|
||||
pnpm@12.6.0:
|
||||
resolution: {integrity: sha512-PvaPlRyxEawgS0paFvCy3fDaVqluBBPoHYVdnwtV75JnFHCQKOHNAMQFwsX7e56OxNxGd3yAXQNzwvL/AP0g7A==}
|
||||
engines: {node: '>=18.*'}
|
||||
hasBin: true
|
||||
|
||||
snapshots:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
pnpm@12.5.1:
|
||||
pnpm@12.6.0:
|
||||
optionalDependencies:
|
||||
'@pnpm/exe.android-arm64': 12.5.1
|
||||
'@pnpm/exe.android-x64': 12.5.1
|
||||
'@pnpm/exe.darwin-arm64': 12.5.1
|
||||
'@pnpm/exe.darwin-x64': 12.5.1
|
||||
'@pnpm/exe.freebsd-x64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64-musl': 12.5.1
|
||||
'@pnpm/exe.linux-ppc64': 12.5.1
|
||||
'@pnpm/exe.linux-riscv64': 12.5.1
|
||||
'@pnpm/exe.linux-s390x': 12.5.1
|
||||
'@pnpm/exe.linux-x64': 12.5.1
|
||||
'@pnpm/exe.linux-x64-musl': 12.5.1
|
||||
'@pnpm/exe.win32-arm64': 12.5.1
|
||||
'@pnpm/exe.win32-x64': 12.5.1
|
||||
'@pnpm/exe.android-arm64': 12.6.0
|
||||
'@pnpm/exe.android-x64': 12.6.0
|
||||
'@pnpm/exe.darwin-arm64': 12.6.0
|
||||
'@pnpm/exe.darwin-x64': 12.6.0
|
||||
'@pnpm/exe.freebsd-x64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64-musl': 12.6.0
|
||||
'@pnpm/exe.linux-ppc64': 12.6.0
|
||||
'@pnpm/exe.linux-riscv64': 12.6.0
|
||||
'@pnpm/exe.linux-s390x': 12.6.0
|
||||
'@pnpm/exe.linux-x64': 12.6.0
|
||||
'@pnpm/exe.linux-x64-musl': 12.6.0
|
||||
'@pnpm/exe.win32-arm64': 12.6.0
|
||||
'@pnpm/exe.win32-x64': 12.6.0
|
||||
|
||||
---
|
||||
lockfileVersion: '9.0'
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
for recently imported shapes."
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.svg :as csvg]
|
||||
[app.common.types.shape :as cts]
|
||||
[app.common.uuid :as uuid]))
|
||||
|
||||
@ -105,6 +106,15 @@
|
||||
:reverse-column :column-reverse
|
||||
dir))))
|
||||
|
||||
(defn- fix-svg-attrs
|
||||
"The json reader of the binfile rewrites every key of every entry to
|
||||
kebab-case, but `:svg-attrs` keys are react prop names and are stored
|
||||
in camelCase. `attrs->props` is the transform the svg import path
|
||||
already applies to them, so running it again restores the names; it
|
||||
is idempotent, so shapes that come in correct are left untouched."
|
||||
[shape]
|
||||
(d/update-when shape :svg-attrs csvg/attrs->props))
|
||||
|
||||
(defn clean-shape-post-decode
|
||||
"A shape procesor that expected to be executed after schema decoding
|
||||
process but before validation."
|
||||
@ -112,7 +122,8 @@
|
||||
(-> shape
|
||||
(fix-shape-shadow-color)
|
||||
(fix-root-shape)
|
||||
(fix-legacy-flex-dir)))
|
||||
(fix-legacy-flex-dir)
|
||||
(fix-svg-attrs)))
|
||||
|
||||
(defn- fix-container
|
||||
[container]
|
||||
|
||||
@ -79,15 +79,28 @@
|
||||
(defn with-allocator!
|
||||
"Invoke `(f allocator)` with a fresh Arrow `RootAllocator`.
|
||||
|
||||
The allocator must outlive the Ladybug connection, because Ladybug releases
|
||||
its references to the staged buffers only when the Arrow tables are dropped —
|
||||
which happens on connection close at the latest. Closing it first surfaces as
|
||||
The allocator must outlive the Ladybug connection, because Ladybug keeps
|
||||
its references to the staged buffers until the Arrow tables are dropped —
|
||||
which happens on connection close at the latest. Nest this *outside*
|
||||
`ladybug/with-connection!`, and close the allocator after the connection
|
||||
and database close sequence. Closing it first surfaces as
|
||||
`IllegalStateException: Memory was leaked`, *thrown while unwinding*, which
|
||||
hides whatever actually failed. Any diagnostic here must catch inside this
|
||||
scope."
|
||||
[f]
|
||||
(with-open [allocator (RootAllocator.)]
|
||||
(f allocator)))
|
||||
(let [allocator (RootAllocator.)]
|
||||
(try
|
||||
(let [result (f allocator)]
|
||||
(.close allocator)
|
||||
result)
|
||||
(catch Throwable t
|
||||
;; The allocator close can itself throw a leak error while unwinding
|
||||
;; from the body failure; keep the original as the thrown one.
|
||||
(try
|
||||
(.close allocator)
|
||||
(catch Throwable close-cause
|
||||
(.addSuppressed t close-cause)))
|
||||
(throw t)))))
|
||||
|
||||
;; ------------------------------------------------------ Ladybug type → Field
|
||||
|
||||
|
||||
@ -20,7 +20,9 @@
|
||||
[promesa.exec.csp :as sp])
|
||||
(:import
|
||||
com.ladybugdb.Connection
|
||||
com.ladybugdb.Database))
|
||||
com.ladybugdb.Database
|
||||
org.apache.arrow.memory.BufferAllocator
|
||||
org.apache.arrow.memory.RootAllocator))
|
||||
|
||||
(set! *warn-on-reflection* true)
|
||||
|
||||
@ -46,7 +48,12 @@
|
||||
(str profile-id))
|
||||
|
||||
(defn- destroy-session!
|
||||
[{:keys [conn db sync-ch msgbus]}]
|
||||
"Close a session's Ladybug resources.
|
||||
|
||||
The Arrow allocator outlives the connection: Ladybug keeps the staged
|
||||
buffers until its tables are dropped, no later than connection close, so
|
||||
the allocator closes last — see `app.graph.arrow/with-allocator!`."
|
||||
[{:keys [conn db allocator sync-ch msgbus]}]
|
||||
(when sync-ch
|
||||
(sp/close! sync-ch)
|
||||
(when msgbus
|
||||
@ -54,7 +61,9 @@
|
||||
(when conn
|
||||
(ex/ignoring (.close ^Connection conn)))
|
||||
(when db
|
||||
(ex/ignoring (.close ^Database db))))
|
||||
(ex/ignoring (.close ^Database db)))
|
||||
(when allocator
|
||||
(ex/ignoring (.close ^BufferAllocator allocator))))
|
||||
|
||||
(defn- slim-ingest-meta
|
||||
"Drop full projection rows from session meta.
|
||||
@ -162,10 +171,15 @@
|
||||
(swap! sessions dissoc (session-key profile-id)))
|
||||
|
||||
(defn load-session!
|
||||
"Ingest `file-id` into a new in-memory Ladybug database for `profile-id`."
|
||||
"Ingest `file-id` into a new in-memory Ladybug database for `profile-id`.
|
||||
|
||||
The session owns its Arrow allocator for its lifetime: the allocator stays
|
||||
open until the connection and database close, so it is created here, passed
|
||||
to ingest, and closed by `destroy-session!` — never inside ingest."
|
||||
[cfg profile-id file-id]
|
||||
(unload-session! profile-id)
|
||||
(let [^Database db (Database.)
|
||||
(let [^BufferAllocator allocator (RootAllocator.)
|
||||
^Database db (Database.)
|
||||
^Connection conn (Connection. db)
|
||||
msgbus (::mbus/msgbus cfg)]
|
||||
(.setQueryTimeout conn 0)
|
||||
@ -174,7 +188,8 @@
|
||||
(let [meta (graph.ingest/ingest-on-connection! cfg conn file-id
|
||||
:db-path ":memory:"
|
||||
:skip-stats? true
|
||||
:skip-validation? true)
|
||||
:skip-validation? true
|
||||
:arrow-alloc allocator)
|
||||
index (graph.sync/build-index file-id (:revn meta) (:projection meta))
|
||||
;; Discard projection rows after indexing — they are only needed
|
||||
;; to seed the sync index and would otherwise leak heap on each Load.
|
||||
@ -185,6 +200,7 @@
|
||||
;; binding gives no thread-safety guarantee for one Connection.
|
||||
(-> {:db db
|
||||
:conn conn
|
||||
:allocator allocator
|
||||
:lock (Object.)
|
||||
:file-id file-id
|
||||
:meta meta
|
||||
@ -196,7 +212,7 @@
|
||||
(swap! sessions assoc (session-key profile-id) session)
|
||||
meta)
|
||||
(catch Throwable cause
|
||||
(destroy-session! {:conn conn :db db :msgbus msgbus})
|
||||
(destroy-session! {:conn conn :db db :allocator allocator :msgbus msgbus})
|
||||
(throw cause)))))
|
||||
|
||||
(defn query-session!
|
||||
|
||||
@ -77,15 +77,17 @@
|
||||
(defn ingest-on-connection!
|
||||
"Project `file-id` into an already open Ladybug `conn`.
|
||||
|
||||
Takes an `:arrow-alloc` when the caller already owns one; otherwise it makes
|
||||
a short-lived allocator around this call. A caller that opened the connection
|
||||
itself should pass its own, because the allocator has to be closed *after*
|
||||
the connection — see `app.graph.arrow/with-allocator!`."
|
||||
Takes `:arrow-alloc`, owned by the caller. The allocator must stay open
|
||||
until the connection (and database) close — see
|
||||
`app.graph.arrow/with-allocator!` — so a short-lived allocator made inside
|
||||
this call would close too early and leak; the caller nests the allocator
|
||||
outside its connection and passes it here."
|
||||
[system ^Connection conn file-id & {:keys [arrow-alloc] :as opts}]
|
||||
(if arrow-alloc
|
||||
(ingest-on-connection*! system conn file-id arrow-alloc opts)
|
||||
(graph.arrow/with-allocator!
|
||||
(fn [allocator] (ingest-on-connection*! system conn file-id allocator opts)))))
|
||||
(when-not arrow-alloc
|
||||
(ex/raise :type :validation
|
||||
:code :missing-arrow-allocator
|
||||
:hint "ingest-on-connection! requires :arrow-alloc; nest with-allocator! outside the connection"))
|
||||
(ingest-on-connection*! system conn file-id arrow-alloc opts))
|
||||
|
||||
(defn ingest-file!
|
||||
[system file-id & {:keys [db-path reset-db? skip-stats? skip-validation?]
|
||||
|
||||
@ -350,14 +350,44 @@
|
||||
{})]
|
||||
(assoc params :context context)))
|
||||
|
||||
(defn- coerce-profile-id
|
||||
"Normalize a hand-written `::audit/profile-id` override to a uuid.
|
||||
|
||||
`schema:event` requires a uuid and `submit*` swallows the validation
|
||||
error, so a value that is not a uuid loses the event instead of
|
||||
failing loudly. Commands read the override from places that are not
|
||||
typed by us (token claims, stringly-typed drivers), so a string has
|
||||
to be accepted. Anything that cannot become a uuid is discarded, and
|
||||
the event falls back to the caller, which is always a valid uuid."
|
||||
[v]
|
||||
(let [coerced (cond
|
||||
;; Fast path: the override comes straight from a `profile`
|
||||
;; row in almost every command, so it is already a uuid.
|
||||
(uuid? v)
|
||||
v
|
||||
|
||||
(string? v)
|
||||
(uuid/parse* v)
|
||||
|
||||
:else
|
||||
nil)]
|
||||
(when (and (nil? coerced) (some? v))
|
||||
(l/error :hint "ignoring unusable ::audit/profile-id"
|
||||
:profile-id v))
|
||||
|
||||
coerced))
|
||||
|
||||
(defn prepare-rpc-event
|
||||
[cfg mdata params result]
|
||||
(let [resultm (meta result)
|
||||
request (-> params meta ::http/request)
|
||||
profile-id (or (::profile-id resultm)
|
||||
(some-> (:profile-id result)
|
||||
(cond-> (string? (:profile-id result))
|
||||
uuid/parse*))
|
||||
;; SECURITY: the event belongs to whoever made the request. The only
|
||||
;; sanctioned override is the `::audit/profile-id` metadata, set
|
||||
;; explicitly by the command. Never derive it from the response:
|
||||
;; results can carry a `:profile-id` that belongs to somebody else
|
||||
;; (the owner of an error report, the inviter of an invitation, ...)
|
||||
;; and that silently misattributes the action.
|
||||
profile-id (or (coerce-profile-id (::profile-id resultm))
|
||||
(::rpc/profile-id params)
|
||||
uuid/zero)
|
||||
|
||||
|
||||
@ -27,7 +27,8 @@
|
||||
schema:create-demo-profile
|
||||
[:map
|
||||
[:skip-onboarding {:optional true} ::sm/boolean]
|
||||
[:expires-in {:optional true} ::ct/duration]])
|
||||
[:expires-in {:optional true} ::ct/duration]
|
||||
[:renderer {:optional true} [::sm/one-of #{:svg :wasm}]]])
|
||||
|
||||
(def ^:private min-expires-in
|
||||
(ct/duration "5m"))
|
||||
@ -64,9 +65,10 @@
|
||||
::doc/added "1.15"
|
||||
::doc/changes [["1.15" "This method is migrated from mutations to commands."]
|
||||
["2.18" "Add optional `skip-onboarding` param. When true, the profile is created with `onboarding-viewed` and `release-notes-viewed` (current version) set, skipping the onboarding flow."]
|
||||
["2.18" "Add optional `expires-in` param. When set, the demo purge is scheduled that long after creation instead of the global deletion delay. Only values between 5 minutes and the global delay are accepted."]]
|
||||
["2.18" "Add optional `expires-in` param. When set, the demo purge is scheduled that long after creation instead of the global deletion delay. Only values between 5 minutes and the global delay are accepted."]
|
||||
["2.18.1" "Add optional `renderer` param. When set to `wasm` or `svg`, the profile is created with that `renderer` in props. When omitted, no renderer is stored and the Penpot default applies."]]
|
||||
::sm/params schema:create-demo-profile}
|
||||
[cfg {:keys [skip-onboarding expires-in]}]
|
||||
[cfg {:keys [skip-onboarding expires-in renderer]}]
|
||||
|
||||
(when-not (contains? cf/flags :demo-users)
|
||||
(ex/raise :type :validation
|
||||
@ -93,7 +95,8 @@
|
||||
;; overwrites this with the current
|
||||
;; version, kept so the skip does not
|
||||
;; depend on that default.
|
||||
:release-notes-viewed (:main cf/version)))}
|
||||
:release-notes-viewed (:main cf/version))
|
||||
renderer (assoc :renderer renderer))}
|
||||
profile (db/tx-run! cfg (fn [cfg]
|
||||
(->> (auth/create-profile cfg params)
|
||||
(auth/create-profile-rels cfg))))]
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
(ns app.rpc.commands.verify-token
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.schema :as sm]
|
||||
[app.common.time :as ct]
|
||||
@ -99,7 +98,11 @@
|
||||
(profile/strip-private-attrs)
|
||||
(update :props profile/filter-props)
|
||||
(with-nitrate-licence cfg))]
|
||||
(assoc claims :profile profile)))
|
||||
;; The command is anonymous, so the audit event has no caller to fall
|
||||
;; back on and the profile must be declared here. The claims also carry
|
||||
;; a `:profile-id`, but the audit layer ignores the response on purpose.
|
||||
(-> (assoc claims :profile profile)
|
||||
(rph/with-meta {::audit/profile-id (:id profile)}))))
|
||||
|
||||
;; --- Team Invitation
|
||||
|
||||
@ -240,6 +243,12 @@
|
||||
(not (:is-member membership)))
|
||||
(:organization-id membership))
|
||||
|
||||
organization-add-source
|
||||
(when organization-id-on-add
|
||||
(if organization-id
|
||||
"direct-organization-invitation"
|
||||
"team-invitation"))
|
||||
|
||||
organization-member-count-before
|
||||
(when organization-id-on-add
|
||||
(count
|
||||
@ -280,22 +289,34 @@
|
||||
(-> (audit/event-from-rpc-params params)
|
||||
(assoc :profile-id created-by)
|
||||
(assoc :name "accept-team-invitation-from")
|
||||
(assoc :props (assoc props
|
||||
:profile-id (:id profile)
|
||||
:email (:email profile)))))))
|
||||
(assoc :props (-> props
|
||||
(assoc :invited-by (:created-by invitation))
|
||||
(assoc :profile-id (:id profile))
|
||||
(assoc :profile-email (:email profile))
|
||||
(audit/clean-props)))))))
|
||||
|
||||
(let [accepted-team-id (accept-invitation cfg claims invitation profile)]
|
||||
;; NOTE: the browser used to re-submit a copy of this event from
|
||||
;; the `:organization-invitation-audit` payload of this response,
|
||||
;; which wrote two rows per acceptance with two prop vocabularies
|
||||
;; for the same name, and tied the record to the browser finishing
|
||||
;; the flow. Everything the copy carried is computed above.
|
||||
(when organization-id-on-add
|
||||
(audit/submit
|
||||
cfg
|
||||
(-> (audit/event-from-rpc-params params)
|
||||
(assoc :name "accept-organization-invitation")
|
||||
(assoc :props
|
||||
(-> props
|
||||
(assoc :organization-id organization-id-on-add
|
||||
:user-id (:id profile)
|
||||
:user-who-send-invitation (:created-by invitation))
|
||||
(audit/clean-props))))))
|
||||
(audit/submit cfg (-> (audit/event-from-rpc-params params)
|
||||
(assoc :name "accept-organization-invitation")
|
||||
(assoc :props
|
||||
(-> props
|
||||
(assoc :organization-id organization-id-on-add)
|
||||
(assoc :invited-by (:created-by invitation))
|
||||
(assoc :profile-id (:id profile))
|
||||
(assoc :profile-email (:email profile))
|
||||
(assoc :organization-member-add-source
|
||||
organization-add-source)
|
||||
(assoc :belongs-to-team-on-add
|
||||
(boolean team-id))
|
||||
(assoc :organization-member-count-before
|
||||
organization-member-count-before)
|
||||
(audit/clean-props))))))
|
||||
|
||||
(cond-> (assoc claims
|
||||
:state :created
|
||||
@ -316,15 +337,11 @@
|
||||
;; accepted-team-id as :organization-team-id
|
||||
(:organization-id claims)
|
||||
(assoc :organization-team-id accepted-team-id)
|
||||
|
||||
organization-id-on-add
|
||||
(merge (d/without-nils
|
||||
{:invitation-id (:id invitation)
|
||||
:organization-member-count-before
|
||||
organization-member-count-before}))
|
||||
|
||||
(and organization-id-on-add team-id)
|
||||
(assoc :organization-id organization-id-on-add))))))
|
||||
;; The response carries the inviter's profile-id, so the
|
||||
;; audit event has to name the accepting profile explicitly
|
||||
;; or the invitation gets logged against the wrong user.
|
||||
:always
|
||||
(rph/with-meta {::audit/profile-id (:id profile)}))))))
|
||||
|
||||
(do
|
||||
;; If the user is not logged-in and the invitation has been canceled
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
[app.storage.tmp :as tmp]
|
||||
[backend-tests.helpers :as th]
|
||||
[backend-tests.storage-test :as stt]
|
||||
[clojure.java.io :as jio]
|
||||
[clojure.test :as t]
|
||||
[cuerdas.core :as str]
|
||||
[datoteka.fs :as fs]
|
||||
@ -201,6 +202,57 @@
|
||||
;; of failing with :child-not-found on the next update-file.
|
||||
(t/is (nil? (cfv/validate-file imported []))))))
|
||||
|
||||
(defn- import-svg-attrs-asset
|
||||
"Imports the `svg-attrs-camel-case.penpot` asset, a real penpot export
|
||||
whose shapes carry `:svg-attrs` keys in camelCase (the format the
|
||||
binary export writes), and returns the imported file."
|
||||
[profile]
|
||||
(let [input (-> "backend_tests/test_files/svg-attrs-camel-case.penpot"
|
||||
io/resource
|
||||
jio/file)
|
||||
result (-> th/*system*
|
||||
(assoc ::bfc/project-id (:default-project-id profile))
|
||||
(assoc ::bfc/profile-id (:id profile))
|
||||
(assoc ::bfc/input input)
|
||||
(v3/import-files!))]
|
||||
(bfc/get-file th/*system* (first result))))
|
||||
|
||||
(t/deftest import-binfile-v3-preserves-camel-case-svg-attrs
|
||||
;; The json reader used by the v3 import rewrites every key of every
|
||||
;; zip entry to kebab-case, and `:svg-attrs` is the one shape map
|
||||
;; whose keys are camelCase react prop names. A shape exported with
|
||||
;; `fillRule: "evenodd"` must not come back as `:fill-rule`, or the
|
||||
;; renderer falls back to the default fill rule and the shape is
|
||||
;; painted without its hole.
|
||||
(let [profile (th/create-profile* 1)
|
||||
file (import-svg-attrs-asset profile)
|
||||
shape (get-in file [:data :pages-index
|
||||
(uuid/uuid "fc80ab5f-1bf2-817c-8008-b5408f039100")
|
||||
:objects
|
||||
(uuid/uuid "ce3641bd-48c8-804c-8008-b54d35cc6f80")])]
|
||||
|
||||
(t/is (= {:fillRule "evenodd"}
|
||||
(:svg-attrs shape)))))
|
||||
|
||||
(t/deftest import-binfile-v3-preserves-camel-case-svg-attrs-on-components
|
||||
;; Same guarantee for shapes stored inside a component: the v3 import
|
||||
;; cleans those in a different code path than page shapes.
|
||||
(let [profile (th/create-profile* 1)
|
||||
file (import-svg-attrs-asset profile)
|
||||
shape (fn [component-id shape-id]
|
||||
(-> file
|
||||
(get-in [:data :components (uuid/uuid component-id) :objects])
|
||||
(get (uuid/uuid shape-id))
|
||||
:svg-attrs))]
|
||||
|
||||
(t/is (= {:fillRule "evenodd"}
|
||||
(shape "fae4bc76-0cc2-8057-8008-b540912cdf78"
|
||||
"fae4bc76-0cc2-8057-8008-b540912774cb")))
|
||||
|
||||
(t/is (= {:fillRule "nonzero"}
|
||||
(shape "fae4bc76-0cc2-8057-8008-b540912c917b"
|
||||
"fae4bc76-0cc2-8057-8008-b540912774c8")))))
|
||||
|
||||
(t/deftest export-binfile-v3
|
||||
(let [profile (th/create-profile* 1)
|
||||
file (prepare-simple-file profile)
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
[app.common.types.shape :as cts]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.graph.arrow :as arrow]
|
||||
[app.graph.ingest :as ingest]
|
||||
[app.graph.ladybug :as ladybug]
|
||||
[app.graph.projection.document :as projection.document]
|
||||
[app.graph.projection.transforms :as projection.transforms]
|
||||
@ -131,12 +132,13 @@
|
||||
(defn- load-graph!
|
||||
"Create the schema on `conn`, project `data` into it, run the transforms.
|
||||
|
||||
`allocator` must outlive `conn` — see `app.graph.arrow/with-allocator!` —
|
||||
so the caller nests the allocator outside its connections and passes it in.
|
||||
Returns the projection, which is also what the sync index is built from."
|
||||
[conn data file]
|
||||
[conn allocator data file]
|
||||
(let [projection (projection.document/projection-data data file)]
|
||||
(ladybug/exec-on-connection! conn (nodes/ddl-statements))
|
||||
(arrow/with-allocator!
|
||||
(fn [allocator] (arrow/load-projection! conn projection allocator)))
|
||||
(arrow/load-projection! conn projection allocator)
|
||||
(projection.transforms/apply-transforms! nil conn data file)
|
||||
projection))
|
||||
|
||||
@ -222,12 +224,19 @@
|
||||
[[kind table] d])))
|
||||
|
||||
(defn- with-two-connections
|
||||
"Open two `:memory:` databases under one Arrow allocator.
|
||||
|
||||
The allocator stays outer to both connections: Ladybug keeps the staged
|
||||
buffers until connection close, so an allocator closed first leaks —
|
||||
see `app.graph.arrow/with-allocator!`."
|
||||
[f]
|
||||
(ladybug/with-connection! ":memory:"
|
||||
(fn [conn-a]
|
||||
(arrow/with-allocator!
|
||||
(fn [allocator]
|
||||
(ladybug/with-connection! ":memory:"
|
||||
(fn [conn-b]
|
||||
(f conn-a conn-b))))))
|
||||
(fn [conn-a]
|
||||
(ladybug/with-connection! ":memory:"
|
||||
(fn [conn-b]
|
||||
(f conn-a conn-b allocator))))))))
|
||||
|
||||
(defn- round-trip
|
||||
"Sync `change-list` into A, rebuild the same file into B, return the diff."
|
||||
@ -236,11 +245,11 @@
|
||||
data1 (cfc/process-changes data0 change-list)
|
||||
revn1 (inc base-revn)]
|
||||
(with-two-connections
|
||||
(fn [conn-a conn-b]
|
||||
(let [projection (load-graph! conn-a data0 (file-row base-revn))
|
||||
(fn [conn-a conn-b allocator]
|
||||
(let [projection (load-graph! conn-a allocator data0 (file-row base-revn))
|
||||
index (sync/build-index file-id base-revn projection)
|
||||
result (sync/apply-changes! conn-a index change-list revn1)]
|
||||
(load-graph! conn-b data1 (file-row revn1))
|
||||
(load-graph! conn-b allocator data1 (file-row revn1))
|
||||
{:diff (diff (snapshot conn-a) (snapshot conn-b))
|
||||
:applied (:applied result)
|
||||
:skipped (:skipped result)})))))
|
||||
@ -261,6 +270,15 @@
|
||||
(str "cold projection and sync replay disagree on "
|
||||
(pr-str (keys diff)) "\n" (pr-str diff)))))
|
||||
|
||||
(t/deftest ingest-on-connection-requires-allocator
|
||||
;; The allocator must outlive the connection, so ingest cannot make its own
|
||||
;; inside the call — see `app.graph.arrow/with-allocator!`.
|
||||
(try
|
||||
(ingest/ingest-on-connection! nil nil file-id)
|
||||
(t/is false "expected :missing-arrow-allocator")
|
||||
(catch clojure.lang.ExceptionInfo e
|
||||
(t/is (= :missing-arrow-allocator (:code (ex-data e)))))))
|
||||
|
||||
(t/deftest the-diff-catches-an-injected-sync-bug
|
||||
;; The round trip is only worth running if it fails when sync is wrong.
|
||||
;; `apply-mov-objects` maintains `IsChildOf`; drop the change from the list
|
||||
@ -270,11 +288,11 @@
|
||||
crippled (remove #(= :mov-objects (:type %)) changes)
|
||||
revn1 (inc base-revn)
|
||||
result (with-two-connections
|
||||
(fn [conn-a conn-b]
|
||||
(let [projection (load-graph! conn-a data0 (file-row base-revn))
|
||||
(fn [conn-a conn-b allocator]
|
||||
(let [projection (load-graph! conn-a allocator data0 (file-row base-revn))
|
||||
index (sync/build-index file-id base-revn projection)]
|
||||
(sync/apply-changes! conn-a index crippled revn1)
|
||||
(load-graph! conn-b data1 (file-row revn1))
|
||||
(load-graph! conn-b allocator data1 (file-row revn1))
|
||||
(diff (snapshot conn-a) (snapshot conn-b)))))]
|
||||
(t/is (contains? result [:edges "IsChildOf"])
|
||||
"a sync that skips a reparent must show up as an IsChildOf difference")))
|
||||
|
||||
@ -550,46 +550,83 @@
|
||||
(t/is (= {} (:props row)))
|
||||
(t/is (= {} (:context row))))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; PREPARE-RPC-EVENT PROFILE-ID CONVERSION
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; PREPARE-RPC-EVENT PROFILE-ID RESOLUTION
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(t/deftest prepare-rpc-event-converts-string-profile-id-to-uuid
|
||||
;; When result contains a string :profile-id (e.g. from error reports),
|
||||
;; prepare-rpc-event must convert it to a UUID for audit schema compliance.
|
||||
(let [prof (th/create-profile* 1 {:is-active true})
|
||||
string-pid "33601240-a00b-11ea-ba1b-c554cc60e361"
|
||||
expected #uuid "33601240-a00b-11ea-ba1b-c554cc60e361"
|
||||
mdata {::sv/name "test-cmd"}
|
||||
params {::rpc/profile-id (:id prof)
|
||||
::rpc/request-id (uuid/next)
|
||||
::rpc/request-at (ct/now)}
|
||||
mock-req (reify
|
||||
yetti.request/IRequest
|
||||
(get-header [_ _] nil)
|
||||
(remote-addr [_] "127.0.0.1"))
|
||||
params (with-meta params {:app.http/request mock-req})
|
||||
result {:profile-id string-pid :some-data "value"}
|
||||
event (audit/prepare-rpc-event th/*system* mdata params result)]
|
||||
;; profile-id must be a UUID, not a string
|
||||
(t/is (uuid? (:profile-id event)))
|
||||
(t/is (= expected (:profile-id event)))))
|
||||
|
||||
(t/deftest prepare-rpc-event-handles-invalid-string-profile-id
|
||||
;; When result contains an invalid string :profile-id, it should fall back
|
||||
;; to the RPC params profile-id (which is always a valid UUID).
|
||||
(let [prof (th/create-profile* 1 {:is-active true})
|
||||
mdata {::sv/name "test-cmd"}
|
||||
params {::rpc/profile-id (:id prof)
|
||||
::rpc/request-id (uuid/next)
|
||||
::rpc/request-at (ct/now)}
|
||||
(defn- prepare-event
|
||||
"Call prepare-rpc-event with a bare request, returning the built event."
|
||||
[caller result]
|
||||
(let [mdata {::sv/name "test-cmd"}
|
||||
params {::rpc/profile-id caller
|
||||
::rpc/request-id (uuid/next)
|
||||
::rpc/request-at (ct/now)}
|
||||
mock-req (reify
|
||||
yetti.request/IRequest
|
||||
(get-header [_ _] nil)
|
||||
(remote-addr [_] "127.0.0.1"))
|
||||
params (with-meta params {:app.http/request mock-req})
|
||||
result {:profile-id "not-a-valid-uuid"}
|
||||
event (audit/prepare-rpc-event th/*system* mdata params result)]
|
||||
;; profile-id must fall back to the RPC params profile-id
|
||||
(t/is (uuid? (:profile-id event)))
|
||||
(t/is (= (:id prof) (:profile-id event)))))
|
||||
params (with-meta params {:app.http/request mock-req})]
|
||||
(audit/prepare-rpc-event th/*system* mdata params result)))
|
||||
|
||||
(t/deftest prepare-rpc-event-ignores-profile-id-from-result
|
||||
;; An audit event belongs to the caller, never to whatever `:profile-id`
|
||||
;; the response carries. `get-error-report` returns the report with its
|
||||
;; decoded content merged in, and that content can hold the profile that
|
||||
;; owned the report, so honoring it attributed the call to somebody who
|
||||
;; never made it.
|
||||
(let [caller (th/create-profile* 1 {:is-active true})]
|
||||
(t/is (= (:id caller)
|
||||
(:profile-id (prepare-event (:id caller)
|
||||
{:profile-id "33601240-a00b-11ea-ba1b-c554cc60e361"
|
||||
:some-data "value"}))))
|
||||
;; an unparseable one must not break the event either
|
||||
(t/is (= (:id caller)
|
||||
(:profile-id (prepare-event (:id caller)
|
||||
{:profile-id "not-a-valid-uuid"}))))))
|
||||
|
||||
(t/deftest prepare-rpc-event-uses-metadata-profile-id
|
||||
;; `::audit/profile-id` metadata is the only sanctioned override: it is
|
||||
;; how commands that authenticate somebody else (login, verify-token)
|
||||
;; attribute the event to the right profile.
|
||||
(let [caller (th/create-profile* 1 {:is-active true})
|
||||
target (th/create-profile* 2 {:is-active true})
|
||||
result (with-meta {:some-data "value"}
|
||||
{::audit/profile-id (:id target)})]
|
||||
(t/is (= (:id target)
|
||||
(:profile-id (prepare-event (:id caller) result))))))
|
||||
|
||||
(t/deftest prepare-rpc-event-falls-back-to-zero-for-anonymous-callers
|
||||
;; With no metadata and no authenticated caller there is nobody to
|
||||
;; attribute the event to, so it lands on the zero uuid.
|
||||
(t/is (= uuid/zero
|
||||
(:profile-id (prepare-event nil {:some-data "value"})))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; PREPARE-RPC-EVENT PROFILE-ID COERCION
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(t/deftest prepare-rpc-event-coerces-string-metadata-profile-id
|
||||
;; `::audit/profile-id` is set by hand in a dozen commands, and some of
|
||||
;; them read the value from token claims or other stringly-typed sources.
|
||||
;; The audit schema demands a uuid, and `submit*` swallows the validation
|
||||
;; error, so an unconverted string would drop the event on the floor.
|
||||
(let [caller (th/create-profile* 1 {:is-active true})
|
||||
target "33601240-a00b-11ea-ba1b-c554cc60e361"
|
||||
result (with-meta {:some-data "value"}
|
||||
{::audit/profile-id target})]
|
||||
(t/is (= #uuid "33601240-a00b-11ea-ba1b-c554cc60e361"
|
||||
(:profile-id (prepare-event (:id caller) result))))
|
||||
(t/is (uuid? (:profile-id (prepare-event (:id caller) result))))))
|
||||
|
||||
(t/deftest prepare-rpc-event-discards-unusable-metadata-profile-id
|
||||
;; An override that cannot be turned into a uuid is dropped, not honoured
|
||||
;; and not propagated: the event falls back to the caller, which is always
|
||||
;; a valid uuid, instead of failing the schema check and losing the row.
|
||||
(let [caller (th/create-profile* 1 {:is-active true})]
|
||||
(doseq [bad ["not-a-valid-uuid" "" " " 42 {} [] :whatever nil false]]
|
||||
(let [result (with-meta {:some-data "value"}
|
||||
(cond-> {::audit/profile-id bad}
|
||||
(nil? bad) (dissoc ::audit/profile-id)))]
|
||||
(t/is (= (:id caller)
|
||||
(:profile-id (prepare-event (:id caller) result)))
|
||||
(str "override " (pr-str bad) " must fall back to the caller"))))))
|
||||
|
||||
@ -256,31 +256,41 @@
|
||||
|
||||
;; --- Audit event tests
|
||||
|
||||
(t/deftest get-error-report-audit-event-has-uuid-profile-id
|
||||
;; When get-error-report returns a report with string profile-id in content,
|
||||
;; the audit event must have a proper UUID profile-id (not a string).
|
||||
;; This tests the prepare-rpc-event function directly since the test RPC
|
||||
;; flow doesn't include the audit middleware wrapper.
|
||||
(let [profile (th/create-profile* 1 {:is-active true})
|
||||
id (uuid/next)
|
||||
orig-pid "33601240-a00b-11ea-ba1b-c554cc60e361"
|
||||
;; Simulate the result from get-error-report with string profile-id
|
||||
result {:id id
|
||||
:source "logging"
|
||||
:hint "test error"
|
||||
:profile-id orig-pid}
|
||||
mdata {::sv/name "get-error-report"}
|
||||
params {::rpc/profile-id (:id profile)
|
||||
::rpc/request-id (uuid/next)
|
||||
::rpc/request-at (ct/now)}
|
||||
mock-req (reify yetti.request/IRequest
|
||||
(get-header [_ _] nil)
|
||||
(remote-addr [_] "127.0.0.1"))
|
||||
params (with-meta params {:app.http/request mock-req})
|
||||
event (audit/prepare-rpc-event th/*system* mdata params result)]
|
||||
;; profile-id must be a UUID, not a string
|
||||
(t/is (uuid? (:profile-id event)))
|
||||
(t/is (= #uuid "33601240-a00b-11ea-ba1b-c554cc60e361" (:profile-id event)))))
|
||||
(t/deftest get-error-report-audit-event-attributes-the-caller
|
||||
;; The report content carries the profile that owned the report and the
|
||||
;; handler merges that content into the response, so the response holds a
|
||||
;; `:profile-id` that does not belong to the caller. The audit event must
|
||||
;; still belong to the caller: deriving it from the response attributed
|
||||
;; privileged reads to the users whose crashes were being inspected.
|
||||
(let [caller (th/create-profile* 1 {:is-active true})
|
||||
owner "33601240-a00b-11ea-ba1b-c554cc60e361"
|
||||
id (uuid/next)]
|
||||
(insert-report! th/*system*
|
||||
{:id id
|
||||
:source 4
|
||||
:content {:profile-id owner
|
||||
:hint "test error"}})
|
||||
|
||||
(let [out (token-cmd caller {::th/type :get-error-report :id id})]
|
||||
(t/is (th/success? out))
|
||||
|
||||
(let [result (:result out)
|
||||
event (audit/prepare-rpc-event
|
||||
th/*system*
|
||||
{::sv/name "get-error-report"}
|
||||
(with-meta {::rpc/profile-id (:id caller)
|
||||
::rpc/request-id (uuid/next)
|
||||
::rpc/request-at (ct/now)
|
||||
:id id}
|
||||
{:app.http/request (reify
|
||||
yetti.request/IRequest
|
||||
(get-header [_ _] nil)
|
||||
(remote-addr [_] "127.0.0.1"))})
|
||||
result)]
|
||||
;; the response does expose the report owner's profile...
|
||||
(t/is (= owner (get result :profile-id)))
|
||||
;; ...but the audit event belongs to whoever called the command
|
||||
(t/is (= (:id caller) (:profile-id event)))))))
|
||||
|
||||
;; Note: The integration of access token middleware with audit context is tested
|
||||
;; via unit tests in rpc_audit_test.clj and http_middleware_test.clj.
|
||||
|
||||
@ -121,3 +121,36 @@
|
||||
:expires-in "yes"})]
|
||||
(t/is (th/ex-of-type? error :validation))
|
||||
(t/is (th/ex-of-code? error :params-validation)))))
|
||||
|
||||
(t/deftest create-demo-profile-stores-wasm-renderer-when-requested
|
||||
(with-redefs [cf/flags (conj cf/flags :demo-users)]
|
||||
(let [{:keys [error result]} (th/command! {::th/type :create-demo-profile
|
||||
:renderer :wasm})]
|
||||
(t/is (nil? error))
|
||||
(let [saved (th/db-get :profile {:email (:email result)})
|
||||
decoded (profile/decode-row saved)]
|
||||
(t/is (= :wasm (get-in decoded [:props :renderer])))))))
|
||||
|
||||
(t/deftest create-demo-profile-stores-svg-renderer-when-requested
|
||||
(with-redefs [cf/flags (conj cf/flags :demo-users)]
|
||||
(let [{:keys [error result]} (th/command! {::th/type :create-demo-profile
|
||||
:renderer :svg})]
|
||||
(t/is (nil? error))
|
||||
(let [saved (th/db-get :profile {:email (:email result)})
|
||||
decoded (profile/decode-row saved)]
|
||||
(t/is (= :svg (get-in decoded [:props :renderer])))))))
|
||||
|
||||
(t/deftest create-demo-profile-omits-renderer-by-default
|
||||
(with-redefs [cf/flags (conj cf/flags :demo-users)]
|
||||
(let [{:keys [error result]} (th/command! {::th/type :create-demo-profile})]
|
||||
(t/is (nil? error))
|
||||
(let [saved (th/db-get :profile {:email (:email result)})
|
||||
decoded (profile/decode-row saved)]
|
||||
(t/is (false? (contains? (:props decoded) :renderer)))))))
|
||||
|
||||
(t/deftest create-demo-profile-rejects-unknown-renderer
|
||||
(with-redefs [cf/flags (conj cf/flags :demo-users)]
|
||||
(let [{:keys [error]} (th/command! {::th/type :create-demo-profile
|
||||
:renderer :canvas})]
|
||||
(t/is (th/ex-of-type? error :validation))
|
||||
(t/is (th/ex-of-code? error :params-validation)))))
|
||||
|
||||
@ -1594,7 +1594,6 @@
|
||||
(t/is (th/ex-of-type? (:error out) :validation))
|
||||
(t/is (th/ex-of-code? (:error out) :weak-password))))
|
||||
|
||||
|
||||
(t/deftest update-profile-password-sends-notification
|
||||
(with-mocks [mock {:target 'app.email/send! :return nil}]
|
||||
(let [profile (th/create-profile* 1)
|
||||
@ -1645,3 +1644,56 @@
|
||||
(t/is (= eml/password-changed factory))
|
||||
(t/is (= (:email profile) to))
|
||||
(t/is (= (:fullname profile) name))))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; VERIFY-TOKEN AUDIT ATTRIBUTION
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(t/deftest verify-token-auth-audit-event-attributes-the-authenticated-profile
|
||||
;; `verify-token` is anonymous, so the audit event cannot infer the profile
|
||||
;; from the caller: the handler must declare it in the result metadata.
|
||||
(let [profile (th/create-profile* 1 {:is-active true})
|
||||
token (tokens/generate th/*system*
|
||||
{:iss :auth
|
||||
:exp (ct/in-future "1h")
|
||||
:profile-id (:id profile)})
|
||||
out (th/command! {::th/type :verify-token
|
||||
:token token})]
|
||||
(t/is (th/success? out))
|
||||
(t/is (= (:id profile)
|
||||
(get-in (meta (:result out)) [:app.loggers.audit/profile-id])))))
|
||||
|
||||
(t/deftest verify-token-invitation-audit-event-attributes-the-accepting-profile
|
||||
;; Both the invitation claims and the response carry the inviter's
|
||||
;; profile-id, so the event must not end up on the inviter: the member who
|
||||
;; clicked the link is the one who accepted the invitation.
|
||||
(with-redefs [app.config/flags #{:login-with-password}]
|
||||
(let [owner (th/create-profile* 1 {:is-active true})
|
||||
team (th/create-team* 1 {:profile-id (:id owner)})
|
||||
member (th/create-profile* 2 {:is-active true
|
||||
:email "invited@example.com"})
|
||||
email (:email member)
|
||||
token (tokens/generate th/*system*
|
||||
{:iss :team-invitation
|
||||
:exp (ct/in-future "48h")
|
||||
:role :editor
|
||||
:profile-id (:id owner)
|
||||
:team-id (:id team)
|
||||
:member-email email
|
||||
:member-id (:id member)})]
|
||||
(th/db-insert! :team-invitation
|
||||
{:id (uuid/random)
|
||||
:team-id (:id team)
|
||||
:email-to email
|
||||
:created-by (:id owner)
|
||||
:role "editor"
|
||||
:valid-until (ct/in-future "48h")})
|
||||
|
||||
(let [out (th/command! {::th/type :verify-token
|
||||
:token token
|
||||
::rpc/profile-id (:id member)
|
||||
::rpc/auth-type :session})
|
||||
event-pid (get-in (meta (:result out)) [:app.loggers.audit/profile-id])]
|
||||
(t/is (th/success? out))
|
||||
(t/is (= (:id member) event-pid))
|
||||
(t/is (not= (:id owner) event-pid))))))
|
||||
|
||||
@ -492,13 +492,14 @@
|
||||
(th/command! {::th/type :verify-token
|
||||
::rpc/profile-id (:id invitee)
|
||||
:token token}))
|
||||
organization-event
|
||||
(fn []
|
||||
emitted-events
|
||||
(fn [event-name]
|
||||
(->> (:call-args-list @audit-mock)
|
||||
(map second)
|
||||
(filter #(= "accept-organization-invitation" (:name %)))
|
||||
first))
|
||||
token-result (atom nil)]
|
||||
(filter #(= event-name (:name %)))))
|
||||
organization-event
|
||||
(fn []
|
||||
(first (emitted-events "accept-organization-invitation")))]
|
||||
|
||||
(db/insert! (:app.db/pool th/*system*)
|
||||
:team-invitation
|
||||
@ -520,29 +521,22 @@
|
||||
(fn [& _] default-team-id)]
|
||||
(let [out (verify! direct-token)]
|
||||
(t/is (th/success? out))
|
||||
(reset! token-result (:result out))))
|
||||
(t/is (not (contains? (:result out) :organization-invitation-audit)))))
|
||||
|
||||
(let [event (organization-event)]
|
||||
(t/is (= organization-id (get-in event [:props :organization-id])))
|
||||
(t/is (= (:id invitee) (get-in event [:props :user-id])))
|
||||
(t/is (= (:id inviter)
|
||||
(get-in event [:props :user-who-send-invitation])))
|
||||
(t/is (not (contains? (:props event) :organization-member-add-source)))
|
||||
(t/is (not (contains? (:props event) :belongs-to-team-on-add)))
|
||||
(t/is (not (contains? (:props event) :organization-member-count-before)))
|
||||
(t/is (= (:id invitee) (get-in event [:props :profile-id])))
|
||||
(t/is (= (:id inviter) (get-in event [:props :invited-by])))
|
||||
(t/is (= (:email invitee) (get-in event [:props :profile-email])))
|
||||
(t/is (= :editor (get-in event [:props :role])))
|
||||
(t/is (uuid? (get-in event [:props :invitation-id])))
|
||||
(t/is (= organization-id (:organization-id @token-result)))
|
||||
(t/is (= :editor (:role @token-result)))
|
||||
(t/is (not (contains? @token-result :organization-invitation-audit)))
|
||||
(t/is (= (get-in event [:props :invitation-id])
|
||||
(:invitation-id @token-result)))
|
||||
(t/is (= (:id invitee)
|
||||
(:member-id @token-result)))
|
||||
(t/is (= (:id inviter)
|
||||
(:profile-id @token-result)))
|
||||
(t/is (= 3
|
||||
(:organization-member-count-before @token-result)))
|
||||
(t/is (= "direct-organization-invitation"
|
||||
(get-in event [:props :organization-member-add-source])))
|
||||
(t/is (false? (get-in event [:props :belongs-to-team-on-add])))
|
||||
(t/is (= 3 (get-in event [:props :organization-member-count-before])))
|
||||
(t/is (not (contains? (:props event) :invitation-origin)))
|
||||
(t/is (not (contains? (:context event) :event-origin)))
|
||||
(t/is (= 1 (count (emitted-events "accept-organization-invitation"))))
|
||||
(t/is (not-any? #(contains? #{"accept-team-invitation"
|
||||
"accept-team-invitation-from"}
|
||||
(:name (second %)))
|
||||
@ -569,7 +563,7 @@
|
||||
teams/add-profile-to-team! (fn [& _] nil)]
|
||||
(let [out (verify! team-token)]
|
||||
(t/is (th/success? out))
|
||||
(reset! token-result (:result out))))
|
||||
(t/is (not (contains? (:result out) :organization-invitation-audit)))))
|
||||
|
||||
(let [events (mapv second (:call-args-list @audit-mock))
|
||||
event (organization-event)]
|
||||
@ -577,25 +571,27 @@
|
||||
(t/is (some #(= "accept-team-invitation-from" (:name %)) events))
|
||||
(t/is (= (:id team) (get-in event [:props :team-id])))
|
||||
(t/is (= organization-id (get-in event [:props :organization-id])))
|
||||
(t/is (= (:id invitee) (get-in event [:props :user-id])))
|
||||
(t/is (= (:id inviter)
|
||||
(get-in event [:props :user-who-send-invitation])))
|
||||
(t/is (not (contains? (:props event) :organization-member-add-source)))
|
||||
(t/is (not (contains? (:props event) :belongs-to-team-on-add)))
|
||||
(t/is (not (contains? (:props event) :organization-member-count-before)))
|
||||
(t/is (= organization-id
|
||||
(:organization-id @token-result)))
|
||||
(t/is (= (:id team) (:team-id @token-result)))
|
||||
(t/is (= :editor (:role @token-result)))
|
||||
(t/is (not (contains? @token-result :organization-invitation-audit)))
|
||||
(t/is (= (get-in event [:props :invitation-id])
|
||||
(:invitation-id @token-result)))
|
||||
(t/is (= (:id invitee)
|
||||
(:member-id @token-result)))
|
||||
(t/is (= (:id inviter)
|
||||
(:profile-id @token-result)))
|
||||
(t/is (= 5
|
||||
(:organization-member-count-before @token-result))))
|
||||
(t/is (= (:id invitee) (get-in event [:props :profile-id])))
|
||||
(t/is (= (:id inviter) (get-in event [:props :invited-by])))
|
||||
(t/is (= "team-invitation"
|
||||
(get-in event [:props :organization-member-add-source])))
|
||||
(t/is (true? (get-in event [:props :belongs-to-team-on-add])))
|
||||
(t/is (= 5 (get-in event [:props :organization-member-count-before])))
|
||||
(t/is (not (contains? (:props event) :invitation-origin)))
|
||||
(t/is (not (contains? (:context event) :event-origin)))
|
||||
(t/is (= 1 (count (emitted-events "accept-organization-invitation")))))
|
||||
|
||||
(let [from-event (first (emitted-events "accept-team-invitation-from"))]
|
||||
(t/is (= (:id team) (get-in from-event [:props :team-id])))
|
||||
(t/is (= :editor (get-in from-event [:props :role])))
|
||||
(t/is (uuid? (get-in from-event [:props :invitation-id])))
|
||||
(t/is (= (:id inviter) (get-in from-event [:props :invited-by])))
|
||||
(t/is (= (:id invitee) (get-in from-event [:props :profile-id])))
|
||||
(t/is (= (:email invitee) (get-in from-event [:props :profile-email])))
|
||||
(t/is (not (contains? (get-in from-event [:props]) :email)))
|
||||
(t/is (not (contains? (get-in from-event [:props]) :user-id)))
|
||||
(t/is (not (contains? (get-in from-event [:props])
|
||||
:user-who-send-invitation))))
|
||||
|
||||
(th/reset-mock! audit-mock)
|
||||
(db/insert! (:app.db/pool th/*system*)
|
||||
@ -616,57 +612,11 @@
|
||||
teams/add-profile-to-team! (fn [& _] nil)]
|
||||
(let [out (verify! team-token)]
|
||||
(t/is (th/success? out))
|
||||
(reset! token-result (:result out))))
|
||||
(t/is (not (contains? (:result out) :organization-invitation-audit)))))
|
||||
|
||||
(let [events (mapv second (:call-args-list @audit-mock))]
|
||||
(t/is (some #(= "accept-team-invitation" (:name %)) events))
|
||||
(t/is (not-any? #(= "accept-organization-invitation" (:name %)) events))
|
||||
(t/is (not (contains? @token-result :organization-invitation-audit)))
|
||||
(t/is (not (contains? @token-result :organization-member-count-before)))))))
|
||||
|
||||
(t/deftest accept-organization-invitation-response-ids-match-database
|
||||
(with-mocks [audit-mock {:target 'app.loggers.audit/submit :return nil}]
|
||||
(let [inviter (th/create-profile* 211 {:is-active true})
|
||||
invitee (th/create-profile* 212 {:is-active true})
|
||||
organization-id (uuid/random)
|
||||
default-team-id (uuid/random)
|
||||
;; Token minted with a stale :profile-id (e.g. a re-sent link
|
||||
;; requested by someone else) and no :member-id (invitee was
|
||||
;; unregistered when invited); the invitation row says inviter.
|
||||
stale-token (tokens/generate
|
||||
th/*system*
|
||||
{:iss :team-invitation
|
||||
:exp (ct/in-future "1h")
|
||||
:profile-id (uuid/random)
|
||||
:role :editor
|
||||
:organization-id organization-id
|
||||
:member-email (:email invitee)})]
|
||||
(db/insert! (:app.db/pool th/*system*)
|
||||
:team-invitation
|
||||
{:org-id organization-id
|
||||
:email-to (:email invitee)
|
||||
:created-by (:id inviter)
|
||||
:role "editor"
|
||||
:valid-until (ct/in-future "48h")})
|
||||
|
||||
(with-redefs [cf/flags (conj cf/flags :admin-console)
|
||||
nitrate/call
|
||||
(fn [_cfg method _params]
|
||||
(case method
|
||||
:get-organization-membership {:organization-id organization-id
|
||||
:is-member false}
|
||||
:get-organization-members [(:id inviter)]
|
||||
nil))
|
||||
teams/initialize-user-in-organization
|
||||
(fn [& _] default-team-id)]
|
||||
(let [out (th/command! {::th/type :verify-token
|
||||
::rpc/profile-id (:id invitee)
|
||||
:token stale-token})]
|
||||
(t/is (th/success? out))
|
||||
(t/is (= (:id inviter) (:profile-id (:result out))))
|
||||
(t/is (= (:id invitee) (:member-id (:result out))))
|
||||
(t/is (not (contains? (:result out) :user-who-send-invitation)))
|
||||
(t/is (not (contains? (:result out) :user-id))))))))
|
||||
(t/is (not-any? #(= "accept-organization-invitation" (:name %)) events))))))
|
||||
|
||||
(t/deftest create-team-invitations-with-email-verification-disabled
|
||||
(with-mocks [mock {:target 'app.email/send! :return nil}]
|
||||
|
||||
@ -754,6 +754,34 @@
|
||||
(t/is (not (contains? (:props result) :route)))
|
||||
(t/is (not (contains? (:props result) :label)))))
|
||||
|
||||
(t/deftest test-filter-telemetry-props-accept-organization-invitation
|
||||
;; The shadow row of accept-organization-invitation keeps the ids, the boolean
|
||||
;; and the count, and drops every text prop, the raw email among them. The
|
||||
;; full row and the Nexus archive still carry all of them, and there is no
|
||||
;; context key to fall back on: `safe-backend-context-keys` has no
|
||||
;; `:event-origin`, that one belongs to the browser.
|
||||
(let [ftp (ns-resolve 'app.loggers.audit 'filter-telemetry-props)
|
||||
profile-id (uuid/next)
|
||||
organization-id (uuid/next)
|
||||
result (ftp {:source "backend"
|
||||
:name "accept-organization-invitation"
|
||||
:type "action"
|
||||
:props {:profile-id profile-id
|
||||
:invited-by profile-id
|
||||
:organization-id organization-id
|
||||
:team-id (uuid/next)
|
||||
:belongs-to-team-on-add true
|
||||
:organization-member-count-before 3
|
||||
:organization-member-add-source "team-invitation"
|
||||
:profile-email "invitee@example.com"}})]
|
||||
(t/is (= profile-id (get-in result [:props :profile-id])))
|
||||
(t/is (= profile-id (get-in result [:props :invited-by])))
|
||||
(t/is (= organization-id (get-in result [:props :organization-id])))
|
||||
(t/is (true? (get-in result [:props :belongs-to-team-on-add])))
|
||||
(t/is (= 3 (get-in result [:props :organization-member-count-before])))
|
||||
(t/is (not (contains? (:props result) :profile-email)))
|
||||
(t/is (not (contains? (:props result) :organization-member-add-source)))))
|
||||
|
||||
(t/deftest test-filter-telemetry-props-organization-sso-failure-keeps-reason
|
||||
(let [ftp (ns-resolve 'app.loggers.audit 'filter-telemetry-props)
|
||||
organization-id (uuid/next)
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
import { rpcPost, extractCookie } from "./client.mjs";
|
||||
|
||||
export async function createDemoProfile() {
|
||||
const res = await rpcPost("create-demo-profile", {});
|
||||
export async function createDemoProfile(params = {}) {
|
||||
const res = await rpcPost("create-demo-profile", params);
|
||||
if (res.body.type === "validation" || res.body.type === "restriction") {
|
||||
throw new Error(
|
||||
`Failed to create demo profile: ${res.body.code} - ${res.body.hint || ""}`
|
||||
@ -31,8 +31,8 @@ export async function createAccessToken(cookie, name = "e2e-test-token") {
|
||||
return res.body;
|
||||
}
|
||||
|
||||
export async function setupTestProfile() {
|
||||
const { email, password } = await createDemoProfile();
|
||||
export async function setupTestProfile(params = {}) {
|
||||
const { email, password } = await createDemoProfile(params);
|
||||
const { profile, cookie } = await login(email, password);
|
||||
return { profile, cookie, email, password };
|
||||
}
|
||||
|
||||
26
backend/test/e2e/ldap-test-curl.sh
Normal file
26
backend/test/e2e/ldap-test-curl.sh
Normal file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# LDAP injection test script — run against running Penpot backend
|
||||
# Usage: bash backend/test/e2e/ldap-test-curl.sh
|
||||
|
||||
BASE="http://localhost:3450/api/main/methods/login-with-ldap"
|
||||
H1='Content-Type: application/json'
|
||||
H2='Accept: application/json'
|
||||
|
||||
#echo "=== 1. Normal login (fry/fry) ==="
|
||||
#curl -s -X POST "$BASE" -H "$H1" -H "$H2" \
|
||||
# -d '{"email":"fry@planetexpress.com","password":"fry"}' | python3 -m json.tool
|
||||
|
||||
#echo ""
|
||||
#echo "=== 2. Wildcard injection (*@planetexpress.com + amy) ==="
|
||||
#curl -s -X POST "$BASE" -H "$H1" -H "$H2" \
|
||||
# -d '{"email":"*@planetexpress.com","password":"amy"}' | python3 -m json.tool
|
||||
|
||||
echo ""
|
||||
echo "=== 3. Identity swap (hubert@ + professor password) ==="
|
||||
curl -s -X POST "$BASE" -H "$H1" -H "$H2" \
|
||||
-d '{"email":"hubert@planetexpress.com","password":"professor"}' | python3 -m json.tool
|
||||
|
||||
#echo ""
|
||||
#echo "=== 4. Wrong password ==="
|
||||
#curl -s -X POST "$BASE" -H "$H1" -H "$H2" \
|
||||
# -d '{"email":"fry@planetexpress.com","password":"wrong"}' | python3 -m json.tool
|
||||
@ -1,5 +1,5 @@
|
||||
{:deps
|
||||
{org.clojure/clojure {:mvn/version "1.12.5"}
|
||||
{org.clojure/clojure {:mvn/version "1.12.6"}
|
||||
org.clojure/data.json {:mvn/version "2.5.2"}
|
||||
org.clojure/tools.cli {:mvn/version "1.4.256"}
|
||||
org.clojure/test.check {:mvn/version "1.1.3"}
|
||||
@ -14,20 +14,20 @@
|
||||
org.apache.logging.log4j/log4j-web {:mvn/version "2.26.1"}
|
||||
org.apache.logging.log4j/log4j-jul {:mvn/version "2.26.1"}
|
||||
org.apache.logging.log4j/log4j-slf4j2-impl {:mvn/version "2.26.1"}
|
||||
org.slf4j/slf4j-api {:mvn/version "2.0.18"}
|
||||
org.slf4j/slf4j-api {:mvn/version "2.0.20"}
|
||||
pl.tkowalcz.tjahzi/log4j2-appender {:mvn/version "0.9.43"}
|
||||
|
||||
selmer/selmer {:mvn/version "1.13.5"}
|
||||
criterium/criterium {:mvn/version "0.4.6"}
|
||||
|
||||
metosin/jsonista {:mvn/version "1.0.0"
|
||||
metosin/jsonista {:mvn/version "1.0.1"
|
||||
:exclusions [com.fasterxml.jackson.core/jackson-core
|
||||
com.fasterxml.jackson.core/jackson-databind]}
|
||||
com.fasterxml.jackson.core/jackson-core {:mvn/version "2.22.2"}
|
||||
com.fasterxml.jackson.core/jackson-databind {:mvn/version "2.22.2"}
|
||||
com.fasterxml.jackson.core/jackson-core {:mvn/version "2.22.3"}
|
||||
com.fasterxml.jackson.core/jackson-databind {:mvn/version "2.22.3"}
|
||||
|
||||
|
||||
metosin/malli {:mvn/version "0.20.1"}
|
||||
metosin/malli {:mvn/version "0.20.2"}
|
||||
|
||||
expound/expound {:mvn/version "0.9.0"}
|
||||
com.cognitect/transit-clj {:mvn/version "1.1.363"}
|
||||
@ -60,7 +60,7 @@
|
||||
{:dev
|
||||
{:extra-deps
|
||||
{org.clojure/tools.namespace {:mvn/version "1.5.1"}
|
||||
thheller/shadow-cljs {:mvn/version "3.5.0"}
|
||||
thheller/shadow-cljs {:mvn/version "3.5.3"}
|
||||
com.clojure-goes-fast/clj-async-profiler {:mvn/version "2.0.0-beta1"}
|
||||
com.bhauman/rebel-readline {:mvn/version "0.1.11"}
|
||||
criterium/criterium {:mvn/version "0.4.6"}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"license": "MPL-2.0",
|
||||
"author": "Kaleidos INC Sucursal en España SL",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -13,9 +13,9 @@
|
||||
"devDependencies": {
|
||||
"concurrently": "^10.0.5",
|
||||
"nodemon": "^3.1.14",
|
||||
"prettier": "3.9.6",
|
||||
"prettier": "3.9.9",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ws": "^8.21.3"
|
||||
"ws": "^8.22.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"date-fns": "^4.4.0"
|
||||
|
||||
142
common/pnpm-lock.yaml
generated
142
common/pnpm-lock.yaml
generated
@ -7,153 +7,153 @@ importers:
|
||||
configDependencies: {}
|
||||
packageManagerDependencies:
|
||||
pnpm:
|
||||
specifier: 12.5.1
|
||||
version: 12.5.1
|
||||
specifier: 12.6.0
|
||||
version: 12.6.0
|
||||
|
||||
packages:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6LGBmQuDzUmgpHSuy+haG0jrmkwFNa4EuShDZqK3cIBv4Wfb75CzjJmowkzr+iJg40vnBKMQ62t4Ko6mwsId7A==}
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-kviIHft9h02q+7N2In7tSL9T/HRUSGwYmU74YPtsWU5ee7vgqPyC0JT6RRX6miW+NxX1CvHgQxg69qq1qTLJYQ==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
resolution: {integrity: sha512-091oCltP3Rx89yxL1Wh5rXkUXEyFzyxIzSHKRFDyDFlQkb8Ox8FaDcm+M8PNkMyqnLA+qeGOLzY7Rjj9izl1Ww==}
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
resolution: {integrity: sha512-CT8aJKLq2mtZFE71pr4E5Z2xHL8uGnRGr+NclDqsXlVF4SVcQ2QAs14mWi0C8gjT4hbmi+Q0lJRRIkMAWfjjng==}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-r1vEMQPVjRexZMyL2HonxJoo3+nuB/+G+tg+f2PK6faRdXX1TDwevKXOxJAfqlPInTy6W/pm912+s+m0NcR4BQ==}
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-rafpVkjzugKBMxSvGQd5wK1x5eOTkD/+lcJIFHeQhvd+BJ8kDisOOvwhQDrpGd4vd2Fx+hhW0P2Ptt638OlhFg==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
resolution: {integrity: sha512-YHwI1g2B+Y2cAEylOR31r781GWijdJL7Gy7TEn/ZpZ5v/Cuwp5/Pz0EFCgo0M2MKLafAbL/laUMGvOpAdnerAw==}
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
resolution: {integrity: sha512-72Jpuv1m24gI8zUNcaylYpBWEhBzz1VPhnDIU2GYM2eRP+KsOqVLwV78i+JrihI39zY2NNXmaN4eAKX1inpaDQ==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
resolution: {integrity: sha512-sFUMHiYFs6q5syFwgaVppzhQSmqnXoJIz/YwTXIOXTDE76ndIpTRpDGAnBCBKjsaEBnqjJA/2l6hpJcNDNoMiA==}
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
resolution: {integrity: sha512-LON4QgNy1w/XF4uySZIyC/5hEB0oGdelXsY9tSKqstER+2j2X2oHz67skD11RRd/HWFRtMr64shQZ4I9ZoZ0zg==}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-zupuxYZBuBEGjUz805/4/Asq01UNziFADANt8yp+LdUjU9bbMa3xY78Bx1PsGDqBy7aiad4sdUMK8ZxH4n4gmQ==}
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-BdDpX+DeaMUc5x6WNcE6FkmFy36NwrBbBvwsZU737Zt3u1fTY+iKFPchjEQNCM4rT6q6xvF2oN3ZwExGsJCkxQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6hbMWW2/eQo1b5wvQPe/ndLHVTH88Rav6N+ffD4/h6IuFMjWCgasFYYsFv0GrvpqREAx3SwmZSvli+0NFXqbxA==}
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-8h2sNoIhHDpHDYqZZCh9PXr6krqW10btb0GHVGuw710muDHlFAHMtUG2ogmaHge6zJG1xgY4Y7mwX5g/LWvrYg==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
resolution: {integrity: sha512-Gg3maDzaE/ZFMV9HIx/BwMN0Y6QbEs13URfxmiYHtKjjLAs5wEQZRMUP87YNLYO7cNaEfbM8GRbS9vPosyD9Gw==}
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
resolution: {integrity: sha512-ld6xgcEhFCFrsVsJhbmdmR714PnsEspO/Ij8w0/D7OSiz2hYGu3fZd5tKRxOI5m6H6Gl0/RRFAPncTHbsgXVjQ==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
resolution: {integrity: sha512-6fgWxXYMBMsWQ8DAiRevscX4QZQjwh+FsyCj8ZOk8pMXvqeq84MqBLCmS6KckvnbdqJ+HlSVQ7fs/kd0ldwfhA==}
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
resolution: {integrity: sha512-HIbImydoC3J8NFt+8MXfhTCf5rO6NjCMyinSAHac0VmV8uCHw+kbQkyAzxV84rzz9ZOzmBOnj0b1N461UIYGsw==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
resolution: {integrity: sha512-nzMZruRvxDhEfYUhzu+7EmM39+82Dgagc/6hPFPqGqzXNGcIG0anuxbUxfeNtI64SHt91KuuYUmCB/inlM+Pag==}
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
resolution: {integrity: sha512-DjSqT7+BZ/lWcDHwNMuzsRVfyxUimh+D54Xw4tSWbdVVQhtWtNMUyI93LVnwCmsoEpar2gC3SFeAgywx37svKQ==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-kHCbegdTNHpzmPtUD4S5fqkVkqgdQR47spF9p2VPP3dIIkZl6Ytk8w0vhlAsAGgge8FmucfwX+vvPKgm0NtOCQ==}
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-31lKeGPmRE6xfV6I3VjaEGVFRei14pl/zgoFDK4w+UkbJqOuNl2Ht3O1GuqNIg3Gl14qTEb4kZRAYFHXifDx9A==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
resolution: {integrity: sha512-3PkUBYo5z4dgtlnTNIFj7QGpcDUAuqXz9WGVigPDCeccEnhGiRkWmA5102TmYJHtwJP3LfmE+ZF9PGeWhn8p9Q==}
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
resolution: {integrity: sha512-qFWBneHJAJ73W4whtbaFOL1M/7DBC6ILHXuxc7ZPtEhfPuT1zeZiGrmKHoMAfJA+mcm6xhOFljqVTUS+00Jabw==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-49NvjZIXHly56/PLoEDD7VphbO4N8dwMXoApElDFCpVGDNGeKlwlib1tXtnpTF6i2/XIsAj7GgatHB5KHXgBnA==}
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-OhfefXEEykZlslSUhR8PPRe6MVPV3Oink/dVfIecE5velpc7j80cZYsHlaDrtRDcm3TPwQHkaRW1SJ1efX9oFg==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
resolution: {integrity: sha512-ePUmQFPAPJFNMwg1lelDx2PdjHqYRiF0yfg5e6qeDbPNOu97QNo557Ru/SxmCrmt8ydQWNuZXWpdEp019md5vw==}
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
resolution: {integrity: sha512-L2tuyrD2+Imgxs3VK/ST/2L3xD6vDP0ktJQxM0TaGw7TbAQEMq+RMc8iK6Ew7Id579uzjJe8jSfJID2ZGsOHCA==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
pnpm@12.5.1:
|
||||
resolution: {integrity: sha512-4/MFvHhKK8ifWtO2E4iJRw+ujSr182thIW7JHCw9ZAiXdfneOKrDMQROpA8kXLDVZmOS399lgk4ZB+9qLGLeXw==}
|
||||
pnpm@12.6.0:
|
||||
resolution: {integrity: sha512-PvaPlRyxEawgS0paFvCy3fDaVqluBBPoHYVdnwtV75JnFHCQKOHNAMQFwsX7e56OxNxGd3yAXQNzwvL/AP0g7A==}
|
||||
engines: {node: '>=18.*'}
|
||||
hasBin: true
|
||||
|
||||
snapshots:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
pnpm@12.5.1:
|
||||
pnpm@12.6.0:
|
||||
optionalDependencies:
|
||||
'@pnpm/exe.android-arm64': 12.5.1
|
||||
'@pnpm/exe.android-x64': 12.5.1
|
||||
'@pnpm/exe.darwin-arm64': 12.5.1
|
||||
'@pnpm/exe.darwin-x64': 12.5.1
|
||||
'@pnpm/exe.freebsd-x64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64-musl': 12.5.1
|
||||
'@pnpm/exe.linux-ppc64': 12.5.1
|
||||
'@pnpm/exe.linux-riscv64': 12.5.1
|
||||
'@pnpm/exe.linux-s390x': 12.5.1
|
||||
'@pnpm/exe.linux-x64': 12.5.1
|
||||
'@pnpm/exe.linux-x64-musl': 12.5.1
|
||||
'@pnpm/exe.win32-arm64': 12.5.1
|
||||
'@pnpm/exe.win32-x64': 12.5.1
|
||||
'@pnpm/exe.android-arm64': 12.6.0
|
||||
'@pnpm/exe.android-x64': 12.6.0
|
||||
'@pnpm/exe.darwin-arm64': 12.6.0
|
||||
'@pnpm/exe.darwin-x64': 12.6.0
|
||||
'@pnpm/exe.freebsd-x64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64-musl': 12.6.0
|
||||
'@pnpm/exe.linux-ppc64': 12.6.0
|
||||
'@pnpm/exe.linux-riscv64': 12.6.0
|
||||
'@pnpm/exe.linux-s390x': 12.6.0
|
||||
'@pnpm/exe.linux-x64': 12.6.0
|
||||
'@pnpm/exe.linux-x64-musl': 12.6.0
|
||||
'@pnpm/exe.win32-arm64': 12.6.0
|
||||
'@pnpm/exe.win32-x64': 12.6.0
|
||||
|
||||
---
|
||||
lockfileVersion: '9.0'
|
||||
@ -177,14 +177,14 @@ importers:
|
||||
specifier: ^3.1.14
|
||||
version: 3.1.14
|
||||
prettier:
|
||||
specifier: 3.9.6
|
||||
version: 3.9.6
|
||||
specifier: 3.9.9
|
||||
version: 3.9.9
|
||||
source-map-support:
|
||||
specifier: ^0.5.21
|
||||
version: 0.5.21
|
||||
ws:
|
||||
specifier: ^8.21.3
|
||||
version: 8.21.3
|
||||
specifier: ^8.22.0
|
||||
version: 8.22.0
|
||||
|
||||
packages:
|
||||
|
||||
@ -319,8 +319,8 @@ packages:
|
||||
resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==}
|
||||
engines: {node: '>=8.6'}
|
||||
|
||||
prettier@3.9.6:
|
||||
resolution: {integrity: sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==}
|
||||
prettier@3.9.9:
|
||||
resolution: {integrity: sha512-Z/CJHIkdujO/OtN7nXUii0Rf3VT5SRuhjBA82Xvu2XhBUgX3nhP67T0LHceBdQLex7OOFGTox+Q5Yg8Jk2Qivg==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
|
||||
@ -392,8 +392,8 @@ packages:
|
||||
resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
ws@8.21.3:
|
||||
resolution: {integrity: sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==}
|
||||
ws@8.22.0:
|
||||
resolution: {integrity: sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
peerDependencies:
|
||||
bufferutil: ^4.0.1
|
||||
@ -536,7 +536,7 @@ snapshots:
|
||||
|
||||
picomatch@2.3.2: {}
|
||||
|
||||
prettier@3.9.6: {}
|
||||
prettier@3.9.9: {}
|
||||
|
||||
pstree.remy@1.1.8: {}
|
||||
|
||||
@ -597,7 +597,7 @@ snapshots:
|
||||
string-width: 7.2.0
|
||||
strip-ansi: 7.2.0
|
||||
|
||||
ws@8.21.3: {}
|
||||
ws@8.22.0: {}
|
||||
|
||||
y18n@5.0.8: {}
|
||||
|
||||
|
||||
@ -2132,6 +2132,25 @@
|
||||
(update :pages-index d/update-vals repair-container)
|
||||
(d/update-when :components d/update-vals repair-container))))
|
||||
|
||||
(defmethod migrate-data "0030-remove-stroke-per-side-attr"
|
||||
;; Individual stroke widths shipped with a `:stroke-per-side` boolean on every
|
||||
;; stroke, telling the renderer and the CSS generator whether the four side
|
||||
;; widths were meaningful. Comparing the sides answers that on its own, so
|
||||
;; the attribute was dropped from the closed stroke schema and the toggle
|
||||
;; became ephemeral editor state. Files written while it was still persisted
|
||||
;; fail validation with an `:malli.core/extra-key` error; drop the attribute
|
||||
;; and keep the side widths, which hold the real design data.
|
||||
[data _]
|
||||
(letfn [(repair-shape [shape]
|
||||
(d/update-when shape :strokes d/update-vals #(dissoc % :stroke-per-side)))
|
||||
|
||||
(repair-container [container]
|
||||
(d/update-when container :objects d/update-vals repair-shape))]
|
||||
|
||||
(-> data
|
||||
(update :pages-index d/update-vals repair-container)
|
||||
(d/update-when :components d/update-vals repair-container))))
|
||||
|
||||
(def available-migrations
|
||||
(into (d/ordered-set)
|
||||
["legacy-2"
|
||||
@ -2218,4 +2237,5 @@
|
||||
"0026-fix-svg-raw-shapes-uuids"
|
||||
"0027-separate-tokens-status"
|
||||
"0028-normalize-constrained-values"
|
||||
"0029-move-background-blur-out-of-blur"]))
|
||||
"0029-move-background-blur-out-of-blur"
|
||||
"0030-remove-stroke-per-side-attr"]))
|
||||
|
||||
@ -228,7 +228,11 @@
|
||||
:enable-available-viewer-wasm
|
||||
:enable-background-blur
|
||||
:enable-stroke-path
|
||||
:enable-token-combobox])
|
||||
:enable-stroke-per-side
|
||||
:enable-token-combobox
|
||||
:enable-custom-shortcuts
|
||||
:enable-token-lib-sync
|
||||
:enable-link-unfurl])
|
||||
|
||||
(defn parse
|
||||
[& flags]
|
||||
|
||||
@ -317,3 +317,145 @@
|
||||
"background blur moved before schema validation")
|
||||
(t/is (nil? (get-in file' [:data :pages-index page-id :objects shape-id :blur]))
|
||||
"mis-typed :blur removed")))
|
||||
|
||||
(t/deftest migration-0030-removes-stroke-per-side-attr
|
||||
(let [migration-id "0030-remove-stroke-per-side-attr"
|
||||
page-id (uuid/next)
|
||||
shape-id (uuid/next)
|
||||
stroke {:stroke-width 2
|
||||
:stroke-width-top 2
|
||||
:stroke-width-right 4
|
||||
:stroke-width-bottom 3
|
||||
:stroke-width-left 6
|
||||
:stroke-color "#000000"
|
||||
:stroke-per-side true}
|
||||
shape (-> (cts/setup-shape {:id shape-id :type :rect})
|
||||
(assoc :strokes [stroke]))
|
||||
data {:pages-index {page-id {:objects {shape-id shape}}}}
|
||||
data' (cfm/migrate-data data migration-id)
|
||||
shape' (get-in data' [:pages-index page-id :objects shape-id])
|
||||
stroke' (first (:strokes shape'))]
|
||||
|
||||
(t/is (nil? (:stroke-per-side stroke')) "obsolete :stroke-per-side removed")
|
||||
(t/is (= (dissoc stroke :stroke-per-side) stroke')
|
||||
"no other stroke attr changed")
|
||||
(t/is (= [2 4 3 6] [(:stroke-width-top stroke')
|
||||
(:stroke-width-right stroke')
|
||||
(:stroke-width-bottom stroke')
|
||||
(:stroke-width-left stroke')])
|
||||
"per-side widths preserved")
|
||||
(t/is (= data' (cfm/migrate-data data' migration-id))
|
||||
"migration is idempotent")))
|
||||
|
||||
(t/deftest migration-0030-repairs-strokes-rejected-by-schema
|
||||
(let [migration-id "0030-remove-stroke-per-side-attr"
|
||||
file-id (uuid/next)
|
||||
page-id (uuid/next)
|
||||
shape-id (uuid/next)
|
||||
stroke {:stroke-width 1
|
||||
:stroke-width-top 1
|
||||
:stroke-width-right 1
|
||||
:stroke-width-bottom 1
|
||||
:stroke-width-left 1
|
||||
:stroke-color "#000000"
|
||||
:stroke-per-side true}
|
||||
shape (-> (cts/setup-shape {:id shape-id :type :rect})
|
||||
(assoc :strokes [stroke]))
|
||||
data (-> (ctf/make-file-data file-id page-id)
|
||||
(assoc-in [:pages-index page-id :objects shape-id] shape))]
|
||||
|
||||
(t/is (thrown? #?(:clj Exception :cljs js/Error)
|
||||
(ctf/check-file-data data))
|
||||
"new schema rejects a stroke carrying :stroke-per-side")
|
||||
|
||||
(let [data' (cfm/migrate-data data migration-id)]
|
||||
(t/is (= data' (ctf/check-file-data data'))
|
||||
"migrated data passes the schema"))))
|
||||
|
||||
(t/deftest migration-0030-repairs-component-strokes
|
||||
(let [migration-id "0030-remove-stroke-per-side-attr"
|
||||
component-id (uuid/next)
|
||||
shape-id (uuid/next)
|
||||
stroke {:stroke-width 3
|
||||
:stroke-width-top 3
|
||||
:stroke-width-right 5
|
||||
:stroke-width-bottom 3
|
||||
:stroke-width-left 3
|
||||
:stroke-color "#000000"
|
||||
:stroke-per-side true}
|
||||
shape (-> (cts/setup-shape {:id shape-id :type :rect})
|
||||
(assoc :strokes [stroke]))
|
||||
data {:components {component-id {:objects {shape-id shape}}}}
|
||||
data' (cfm/migrate-data data migration-id)
|
||||
stroke' (get-in data' [:components component-id :objects shape-id :strokes 0])]
|
||||
|
||||
(t/is (nil? (:stroke-per-side stroke'))
|
||||
"obsolete attr removed from a component stroke")
|
||||
(t/is (= 5 (:stroke-width-right stroke'))
|
||||
"component per-side width preserved")))
|
||||
|
||||
(t/deftest migration-0030-keeps-strokes-without-the-obsolete-attr
|
||||
(let [migration-id "0030-remove-stroke-per-side-attr"
|
||||
page-id (uuid/next)
|
||||
shape-id (uuid/next)
|
||||
stroke {:stroke-width 2
|
||||
:stroke-width-top 2
|
||||
:stroke-width-right 2
|
||||
:stroke-width-bottom 2
|
||||
:stroke-width-left 2}
|
||||
shape (-> (cts/setup-shape {:id shape-id :type :rect})
|
||||
(assoc :strokes [stroke]))
|
||||
data {:pages-index {page-id {:objects {shape-id shape}}}}]
|
||||
|
||||
(t/is (= data (cfm/migrate-data data migration-id))
|
||||
"a stroke without the obsolete attr is left untouched")))
|
||||
|
||||
(t/deftest migration-0030-keeps-distinct-sides-when-the-attr-was-false
|
||||
(let [migration-id "0030-remove-stroke-per-side-attr"
|
||||
page-id (uuid/next)
|
||||
shape-id (uuid/next)
|
||||
;; The old toggle set the flag to false without equalizing the sides,
|
||||
;; so the per-side values are the saved design intent and must survive.
|
||||
stroke {:stroke-width 1
|
||||
:stroke-width-top 1
|
||||
:stroke-width-right 8
|
||||
:stroke-width-bottom 1
|
||||
:stroke-width-left 1
|
||||
:stroke-color "#000000"
|
||||
:stroke-per-side false}
|
||||
shape (-> (cts/setup-shape {:id shape-id :type :rect})
|
||||
(assoc :strokes [stroke]))
|
||||
data {:pages-index {page-id {:objects {shape-id shape}}}}
|
||||
stroke' (get-in (cfm/migrate-data data migration-id)
|
||||
[:pages-index page-id :objects shape-id :strokes 0])]
|
||||
|
||||
(t/is (nil? (:stroke-per-side stroke')) "obsolete attr removed")
|
||||
(t/is (= 8 (:stroke-width-right stroke'))
|
||||
"distinct side width kept instead of being equalized")))
|
||||
|
||||
(t/deftest migration-0030-runs-through-file-migration
|
||||
(let [migration-id "0030-remove-stroke-per-side-attr"
|
||||
shape-id (uuid/next)
|
||||
stroke {:stroke-width 5
|
||||
:stroke-width-top 5
|
||||
:stroke-width-right 5
|
||||
:stroke-width-bottom 5
|
||||
:stroke-width-left 5
|
||||
:stroke-color "#000000"
|
||||
:stroke-per-side true}
|
||||
file (ctf/make-file {:name "Legacy per-side stroke"})
|
||||
page-id (first (get-in file [:data :pages]))
|
||||
shape (-> (cts/setup-shape {:id shape-id :type :rect})
|
||||
(assoc :strokes [stroke]))
|
||||
file (-> file
|
||||
(assoc :migrations (disj cfm/available-migrations migration-id))
|
||||
(assoc-in [:data :pages-index page-id :objects shape-id] shape))
|
||||
file' (cfm/migrate-file file {})
|
||||
stroke' (get-in file' [:data :pages-index page-id :objects shape-id :strokes 0])]
|
||||
|
||||
(t/is (cfm/need-migration? file) "new migration detected")
|
||||
(t/is (not (cfm/need-migration? file')) "new migration recorded")
|
||||
(t/is (contains? (:migrations file') migration-id) "migration id persisted")
|
||||
(t/is (nil? (:stroke-per-side stroke'))
|
||||
"obsolete attr removed before schema validation")
|
||||
(t/is (= 5 (:stroke-width stroke')) "stroke width preserved")))
|
||||
|
||||
@ -67,7 +67,7 @@ RUN set -ex; \
|
||||
FROM base AS setup-node
|
||||
|
||||
ENV NODE_VERSION=v24.21.0 \
|
||||
PNPM_VERSION=12.5.1 \
|
||||
PNPM_VERSION=12.6.0 \
|
||||
PATH=/opt/node/bin:$PATH
|
||||
|
||||
RUN set -eux; \
|
||||
@ -77,13 +77,13 @@ RUN set -eux; \
|
||||
OPENSSL_ARCH='linux-aarch64'; \
|
||||
BINARY_URL="https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-arm64.tar.gz"; \
|
||||
PNPM_ARCH='arm64'; \
|
||||
PNPM_SHA256='84e1290e82c800acd406b6db27e9650e15db3c2344d12162cc305ea1f942c6ff'; \
|
||||
PNPM_SHA256='973af2b3eb9509416cf889a7336705062c936407d5fda07298814e7532f5dea1'; \
|
||||
;; \
|
||||
amd64|x86_64) \
|
||||
OPENSSL_ARCH='linux-x86_64'; \
|
||||
BINARY_URL="https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-x64.tar.gz"; \
|
||||
PNPM_ARCH='x64'; \
|
||||
PNPM_SHA256='5a397dfb6b3d4b07d3d7769586aeb471048faf04299a492e2808b95a9a1c701f'; \
|
||||
PNPM_SHA256='3f4c66f668d0e84219679982d095b30da68325e1fac9284e7f5dc1584bd3d13e'; \
|
||||
;; \
|
||||
*) \
|
||||
echo "Unsupported arch: ${ARCH}"; \
|
||||
@ -109,7 +109,7 @@ RUN set -eux; \
|
||||
|
||||
FROM base AS setup-opencode
|
||||
|
||||
ENV OPENCODE_VERSION=1.18.31
|
||||
ENV OPENCODE_VERSION=1.18.33
|
||||
|
||||
RUN set -ex; \
|
||||
ARCH="$(dpkg --print-architecture)"; \
|
||||
@ -136,18 +136,18 @@ RUN set -ex; \
|
||||
|
||||
FROM base AS setup-opencode2
|
||||
|
||||
ENV OPENCODE2_VERSION=2.0.16
|
||||
ENV OPENCODE2_VERSION=2.0.18
|
||||
|
||||
RUN set -eux; \
|
||||
ARCH="$(dpkg --print-architecture)"; \
|
||||
case "${ARCH}" in \
|
||||
aarch64|arm64) \
|
||||
BINARY_URL="https://registry.npmjs.org/@opencode/cli-linux-arm64/-/cli-linux-arm64-${OPENCODE2_VERSION}.tgz"; \
|
||||
ESUM='a132a041968b0fcea18824f2f1996f1494c26ad6e4c5be5ca5b9b96a2bb7922e'; \
|
||||
ESUM='ddc98e5c789c496dada1ecfae9fe4e0931c7ac43a46da5436b97ecda5cd0ba5d'; \
|
||||
;; \
|
||||
amd64|x86_64) \
|
||||
BINARY_URL="https://registry.npmjs.org/@opencode/cli-linux-x64/-/cli-linux-x64-${OPENCODE2_VERSION}.tgz"; \
|
||||
ESUM='08221eb6a781354e9be3b3918ab5b7d91aff2f20739e7e2e0af81bcdc0822c8a'; \
|
||||
ESUM='aa455d073b3a0733a6912f477b370f3d50ca7af44715bb7ccc41faa13b3cc2eb'; \
|
||||
;; \
|
||||
*) \
|
||||
echo "Unsupported arch: ${ARCH}"; exit 1; \
|
||||
@ -526,7 +526,6 @@ RUN set -ex; \
|
||||
libjpeg62-turbo \
|
||||
libtiff6 \
|
||||
libwebp7 \
|
||||
libopenexr-3-1-30 \
|
||||
libfreetype6 \
|
||||
libfontconfig1 \
|
||||
libglib2.0-0 \
|
||||
@ -576,7 +575,7 @@ ENV LANG='C.UTF-8' \
|
||||
SERENA_CONTEXT="claude-code" \
|
||||
PATH="/opt/jdk/bin:/opt/gh/bin:/opt/utils/bin:/opt/clojure/bin:/opt/node/bin:/opt/imagick/bin:/opt/cargo/bin:$PATH"
|
||||
|
||||
COPY --from=penpotapp/imagemagick:7.1.2-27 /opt/imagick /opt/imagick
|
||||
COPY --from=penpotapp/imagemagick:7.1.2-27-1 /opt/imagick /opt/imagick
|
||||
COPY --from=setup-jvm /opt/jdk /opt/jdk
|
||||
COPY --from=setup-jvm /opt/clojure /opt/clojure
|
||||
COPY --from=setup-node /opt/node /opt/node
|
||||
|
||||
@ -10,7 +10,6 @@ ARG IMAGEMAGICK_VERSION=7.1.2-27
|
||||
|
||||
RUN set -e; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qq upgrade; \
|
||||
apt-get -qqy --no-install-recommends install init-system-helpers; \
|
||||
apt-get -qqy --no-install-recommends install \
|
||||
autoconf \
|
||||
@ -24,7 +23,6 @@ RUN set -e; \
|
||||
liblcms2-dev \
|
||||
libltdl-dev \
|
||||
liblzma-dev \
|
||||
libopenexr-dev \
|
||||
libxml2-dev \
|
||||
libpng-dev \
|
||||
librsvg2-dev \
|
||||
@ -39,7 +37,7 @@ RUN set -e; \
|
||||
mkdir -p /tmp/magick; \
|
||||
cd /tmp/magick; \
|
||||
tar -xf /tmp/magick.tar.gz --strip-components=1; \
|
||||
./configure --prefix=/opt/imagick; \
|
||||
./configure --prefix=/opt/imagick --without-openexr; \
|
||||
make -j 2; \
|
||||
make install; \
|
||||
rm -rf /opt/imagick/lib/libMagick++*; \
|
||||
@ -58,7 +56,6 @@ RUN set -ex; \
|
||||
libheif1 \
|
||||
libjpeg62-turbo \
|
||||
liblcms2-2 \
|
||||
libopenexr-3-1-30 \
|
||||
libopenjp2-7 \
|
||||
libpng16-16 \
|
||||
librsvg2-2 \
|
||||
|
||||
@ -9,11 +9,11 @@ ENV LANG='C.UTF-8' \
|
||||
|
||||
RUN set -ex; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade; \
|
||||
apt-get -qqy --no-install-recommends install \
|
||||
binutils \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gzip \
|
||||
; \
|
||||
apt-get clean; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
@ -68,7 +68,6 @@ RUN set -ex; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qqy --no-install-recommends install passwd; \
|
||||
useradd -U -M -u 1001 -s /bin/false -d /opt/penpot penpot; \
|
||||
apt-get -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade; \
|
||||
apt-get -qqy --no-install-recommends install \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@ -81,7 +80,6 @@ RUN set -ex; \
|
||||
libheif1 \
|
||||
libjpeg62-turbo \
|
||||
liblcms2-2 \
|
||||
libopenexr-3-1-30 \
|
||||
libopenjp2-7 \
|
||||
libpng16-16 \
|
||||
librsvg2-2 \
|
||||
@ -108,7 +106,7 @@ RUN set -ex; \
|
||||
chown -R penpot:penpot /opt/data;
|
||||
|
||||
COPY --from=build /opt/jre /opt/jre
|
||||
COPY --from=penpotapp/imagemagick:7.1.2-27 /opt/imagick /opt/imagick
|
||||
COPY --from=penpotapp/imagemagick:7.1.2-27-1 /opt/imagick /opt/imagick
|
||||
|
||||
COPY files/imagemagick-policy.xml /opt/imagick/etc/ImageMagick-7/policy.xml
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM dhi.io/node:24.20.0-debian13-dev
|
||||
FROM dhi.io/node:24.21.0-debian13-dev
|
||||
LABEL maintainer="Penpot <docker@penpot.app>"
|
||||
|
||||
ENV LANG=en_US.UTF-8 \
|
||||
@ -11,12 +11,12 @@ RUN set -ex; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qqy --no-install-recommends install passwd; \
|
||||
useradd -U -M -u 1001 -s /bin/false -d /opt/penpot penpot; \
|
||||
apt-get -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade; \
|
||||
apt-get -qqy --no-install-recommends install \
|
||||
curl \
|
||||
tzdata \
|
||||
locales \
|
||||
ca-certificates \
|
||||
gzip \
|
||||
; \
|
||||
apt-get clean; \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
@ -26,7 +26,7 @@ RUN set -ex; \
|
||||
|
||||
RUN set -ex; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qqy install \
|
||||
apt-get -qqy --no-install-recommends install \
|
||||
\
|
||||
xvfb \
|
||||
fonts-noto-color-emoji \
|
||||
@ -37,10 +37,12 @@ RUN set -ex; \
|
||||
xfonts-scalable \
|
||||
fonts-liberation \
|
||||
fonts-ipafont-gothic \
|
||||
fonts-ipafont-mincho \
|
||||
fonts-wqy-zenhei \
|
||||
fonts-tlwg-loma-otf \
|
||||
fonts-freefont-ttf \
|
||||
poppler-utils \
|
||||
poppler-data \
|
||||
\
|
||||
libasound2 \
|
||||
libatk-bridge2.0-0 \
|
||||
@ -68,7 +70,6 @@ RUN set -ex; \
|
||||
libheif1 \
|
||||
libjpeg62-turbo \
|
||||
liblcms2-2 \
|
||||
libopenexr-3-1-30 \
|
||||
libopenjp2-7 \
|
||||
libpng16-16 \
|
||||
librsvg2-2 \
|
||||
@ -87,24 +88,24 @@ RUN set -ex; \
|
||||
|
||||
ARG BUNDLE_PATH="./bundle-exporter/"
|
||||
COPY --chown=penpot:penpot $BUNDLE_PATH /opt/penpot/exporter/
|
||||
COPY --from=penpotapp/imagemagick:7.1.2-27 /opt/imagick /opt/imagick
|
||||
COPY --from=penpotapp/imagemagick:7.1.2-27-1 /opt/imagick /opt/imagick
|
||||
|
||||
WORKDIR /opt/penpot/exporter
|
||||
|
||||
# pnpm ships as a system binary (same tarball + SHA pin as
|
||||
# docker/devenv/Dockerfile); the generated ./setup expects it on PATH.
|
||||
# Corepack is gone from Node 25+, so nothing here may use it.
|
||||
ARG PNPM_VERSION=12.5.1
|
||||
ARG PNPM_VERSION=12.6.0
|
||||
RUN set -eux; \
|
||||
ARCH="$(dpkg --print-architecture)"; \
|
||||
case "${ARCH}" in \
|
||||
aarch64|arm64) \
|
||||
PNPM_ARCH='arm64'; \
|
||||
PNPM_SHA256='84e1290e82c800acd406b6db27e9650e15db3c2344d12162cc305ea1f942c6ff'; \
|
||||
PNPM_SHA256='973af2b3eb9509416cf889a7336705062c936407d5fda07298814e7532f5dea1'; \
|
||||
;; \
|
||||
amd64|x86_64) \
|
||||
PNPM_ARCH='x64'; \
|
||||
PNPM_SHA256='5a397dfb6b3d4b07d3d7769586aeb471048faf04299a492e2808b95a9a1c701f'; \
|
||||
PNPM_SHA256='3f4c66f668d0e84219679982d095b30da68325e1fac9284e7f5dc1584bd3d13e'; \
|
||||
;; \
|
||||
*) \
|
||||
echo "Unsupported arch: ${ARCH}"; \
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM dhi.io/nginx:1.31.1-debian13-dev
|
||||
FROM dhi.io/nginx:1.31.6-debian13-dev
|
||||
LABEL maintainer="Penpot <docker@penpot.app>"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
@ -7,7 +7,6 @@ USER root
|
||||
|
||||
RUN set -ex; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade; \
|
||||
apt-get -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --no-install-recommends install bash gettext-base passwd; \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
groupadd -f -g 1001 penpot; \
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM dhi.io/node:24.20.0-debian13-dev AS build
|
||||
FROM dhi.io/node:24.21.0-debian13-dev AS build
|
||||
LABEL maintainer="Penpot <docker@penpot.app>"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
@ -11,7 +11,7 @@ WORKDIR /opt/penpot/mcp
|
||||
# pnpm ships as a system binary (same tarball + SHA pin as
|
||||
# docker/devenv/Dockerfile); ./setup expects it on PATH.
|
||||
# Corepack is gone from Node 25+, so nothing here may use it.
|
||||
ARG PNPM_VERSION=12.5.1
|
||||
ARG PNPM_VERSION=12.6.0
|
||||
RUN set -eux; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qqy --no-install-recommends install curl ca-certificates gzip; \
|
||||
@ -20,11 +20,11 @@ RUN set -eux; \
|
||||
case "${ARCH}" in \
|
||||
aarch64|arm64) \
|
||||
PNPM_ARCH='arm64'; \
|
||||
PNPM_SHA256='84e1290e82c800acd406b6db27e9650e15db3c2344d12162cc305ea1f942c6ff'; \
|
||||
PNPM_SHA256='973af2b3eb9509416cf889a7336705062c936407d5fda07298814e7532f5dea1'; \
|
||||
;; \
|
||||
amd64|x86_64) \
|
||||
PNPM_ARCH='x64'; \
|
||||
PNPM_SHA256='5a397dfb6b3d4b07d3d7769586aeb471048faf04299a492e2808b95a9a1c701f'; \
|
||||
PNPM_SHA256='3f4c66f668d0e84219679982d095b30da68325e1fac9284e7f5dc1584bd3d13e'; \
|
||||
;; \
|
||||
*) \
|
||||
echo "Unsupported arch: ${ARCH}"; \
|
||||
@ -42,7 +42,7 @@ RUN set -eux; \
|
||||
RUN ./setup
|
||||
|
||||
|
||||
FROM dhi.io/node:24.20.0-debian13 AS image
|
||||
FROM dhi.io/node:24.21.0-debian13 AS image
|
||||
LABEL maintainer="Penpot <docker@penpot.app>"
|
||||
|
||||
ENV LANG=en_US.UTF-8 \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM dhi.io/node:24.20.0-debian13-dev
|
||||
FROM dhi.io/node:24.21.0-debian13-dev
|
||||
LABEL maintainer="Penpot <docker@penpot.app>"
|
||||
|
||||
ENV LANG=en_US.UTF-8 \
|
||||
@ -11,7 +11,6 @@ RUN set -ex; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qqy --no-install-recommends install passwd; \
|
||||
useradd -U -M -u 1001 -s /bin/false -d /opt/penpot penpot; \
|
||||
apt-get -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade; \
|
||||
apt-get -qqy --no-install-recommends install \
|
||||
curl \
|
||||
tzdata \
|
||||
@ -35,7 +34,6 @@ RUN set -ex; \
|
||||
libheif1 \
|
||||
libjpeg62-turbo \
|
||||
liblcms2-2 \
|
||||
libopenexr-3-1-30 \
|
||||
libopenjp2-7 \
|
||||
libpng16-16 \
|
||||
librsvg2-2 \
|
||||
@ -60,7 +58,7 @@ WORKDIR /opt/penpot/media-processor
|
||||
# pnpm ships as a system binary (same tarball + SHA pin as
|
||||
# docker/devenv/Dockerfile); ./setup expects it on PATH.
|
||||
# Corepack is gone from Node 25+, so nothing here may use it.
|
||||
ARG PNPM_VERSION=12.5.1
|
||||
ARG PNPM_VERSION=12.6.0
|
||||
RUN set -eux; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qqy --no-install-recommends install gzip; \
|
||||
@ -69,11 +67,11 @@ RUN set -eux; \
|
||||
case "${ARCH}" in \
|
||||
aarch64|arm64) \
|
||||
PNPM_ARCH='arm64'; \
|
||||
PNPM_SHA256='84e1290e82c800acd406b6db27e9650e15db3c2344d12162cc305ea1f942c6ff'; \
|
||||
PNPM_SHA256='973af2b3eb9509416cf889a7336705062c936407d5fda07298814e7532f5dea1'; \
|
||||
;; \
|
||||
amd64|x86_64) \
|
||||
PNPM_ARCH='x64'; \
|
||||
PNPM_SHA256='5a397dfb6b3d4b07d3d7769586aeb471048faf04299a492e2808b95a9a1c701f'; \
|
||||
PNPM_SHA256='3f4c66f668d0e84219679982d095b30da68325e1fac9284e7f5dc1584bd3d13e'; \
|
||||
;; \
|
||||
*) \
|
||||
echo "Unsupported arch: ${ARCH}"; \
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM dhi.io/nginx:1.31.1-alpine3.22
|
||||
FROM dhi.io/nginx:1.31.6-alpine3.24
|
||||
LABEL maintainer="Penpot <docker@penpot.app>"
|
||||
|
||||
ARG BUNDLE_PATH="./bundle-storybook/"
|
||||
|
||||
@ -70,9 +70,10 @@ export default function (eleventyConfig) {
|
||||
linkify: true,
|
||||
})
|
||||
.use(markdownItAnchor, {
|
||||
permalink: true,
|
||||
permalinkClass: "direct-link",
|
||||
permalinkSymbol: "#",
|
||||
permalink: markdownItAnchor.permalink.linkInsideHeader({
|
||||
symbol: "#",
|
||||
class: "direct-link",
|
||||
}),
|
||||
})
|
||||
.use(markdownItPlantUML, {});
|
||||
eleventyConfig.setLibrary("md", markdownLibrary);
|
||||
|
||||
@ -31,13 +31,13 @@
|
||||
"@tigersway/eleventy-plugin-ancestry": "^1.0.3",
|
||||
"@types/markdown-it": "14.2.0",
|
||||
"elasticlunr": "^0.9.5",
|
||||
"eleventy-plugin-metagen": "^1.8.4",
|
||||
"eleventy-plugin-metagen": "^1.8.5",
|
||||
"eleventy-plugin-nesting-toc": "^1.3.0",
|
||||
"eleventy-plugin-youtube-embed": "^1.13.2",
|
||||
"luxon": "^3.7.2",
|
||||
"markdown-it": "^15.0.0",
|
||||
"markdown-it-anchor": "^9.2.1",
|
||||
"markdown-it": "^15.0.2",
|
||||
"markdown-it-anchor": "^10.0.0",
|
||||
"markdown-it-plantuml": "^1.4.1"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
170
docs/pnpm-lock.yaml
generated
170
docs/pnpm-lock.yaml
generated
@ -7,153 +7,153 @@ importers:
|
||||
configDependencies: {}
|
||||
packageManagerDependencies:
|
||||
pnpm:
|
||||
specifier: 12.5.1
|
||||
version: 12.5.1
|
||||
specifier: 12.6.0
|
||||
version: 12.6.0
|
||||
|
||||
packages:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6LGBmQuDzUmgpHSuy+haG0jrmkwFNa4EuShDZqK3cIBv4Wfb75CzjJmowkzr+iJg40vnBKMQ62t4Ko6mwsId7A==}
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-kviIHft9h02q+7N2In7tSL9T/HRUSGwYmU74YPtsWU5ee7vgqPyC0JT6RRX6miW+NxX1CvHgQxg69qq1qTLJYQ==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
resolution: {integrity: sha512-091oCltP3Rx89yxL1Wh5rXkUXEyFzyxIzSHKRFDyDFlQkb8Ox8FaDcm+M8PNkMyqnLA+qeGOLzY7Rjj9izl1Ww==}
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
resolution: {integrity: sha512-CT8aJKLq2mtZFE71pr4E5Z2xHL8uGnRGr+NclDqsXlVF4SVcQ2QAs14mWi0C8gjT4hbmi+Q0lJRRIkMAWfjjng==}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-r1vEMQPVjRexZMyL2HonxJoo3+nuB/+G+tg+f2PK6faRdXX1TDwevKXOxJAfqlPInTy6W/pm912+s+m0NcR4BQ==}
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-rafpVkjzugKBMxSvGQd5wK1x5eOTkD/+lcJIFHeQhvd+BJ8kDisOOvwhQDrpGd4vd2Fx+hhW0P2Ptt638OlhFg==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
resolution: {integrity: sha512-YHwI1g2B+Y2cAEylOR31r781GWijdJL7Gy7TEn/ZpZ5v/Cuwp5/Pz0EFCgo0M2MKLafAbL/laUMGvOpAdnerAw==}
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
resolution: {integrity: sha512-72Jpuv1m24gI8zUNcaylYpBWEhBzz1VPhnDIU2GYM2eRP+KsOqVLwV78i+JrihI39zY2NNXmaN4eAKX1inpaDQ==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
resolution: {integrity: sha512-sFUMHiYFs6q5syFwgaVppzhQSmqnXoJIz/YwTXIOXTDE76ndIpTRpDGAnBCBKjsaEBnqjJA/2l6hpJcNDNoMiA==}
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
resolution: {integrity: sha512-LON4QgNy1w/XF4uySZIyC/5hEB0oGdelXsY9tSKqstER+2j2X2oHz67skD11RRd/HWFRtMr64shQZ4I9ZoZ0zg==}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-zupuxYZBuBEGjUz805/4/Asq01UNziFADANt8yp+LdUjU9bbMa3xY78Bx1PsGDqBy7aiad4sdUMK8ZxH4n4gmQ==}
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-BdDpX+DeaMUc5x6WNcE6FkmFy36NwrBbBvwsZU737Zt3u1fTY+iKFPchjEQNCM4rT6q6xvF2oN3ZwExGsJCkxQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6hbMWW2/eQo1b5wvQPe/ndLHVTH88Rav6N+ffD4/h6IuFMjWCgasFYYsFv0GrvpqREAx3SwmZSvli+0NFXqbxA==}
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-8h2sNoIhHDpHDYqZZCh9PXr6krqW10btb0GHVGuw710muDHlFAHMtUG2ogmaHge6zJG1xgY4Y7mwX5g/LWvrYg==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
resolution: {integrity: sha512-Gg3maDzaE/ZFMV9HIx/BwMN0Y6QbEs13URfxmiYHtKjjLAs5wEQZRMUP87YNLYO7cNaEfbM8GRbS9vPosyD9Gw==}
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
resolution: {integrity: sha512-ld6xgcEhFCFrsVsJhbmdmR714PnsEspO/Ij8w0/D7OSiz2hYGu3fZd5tKRxOI5m6H6Gl0/RRFAPncTHbsgXVjQ==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
resolution: {integrity: sha512-6fgWxXYMBMsWQ8DAiRevscX4QZQjwh+FsyCj8ZOk8pMXvqeq84MqBLCmS6KckvnbdqJ+HlSVQ7fs/kd0ldwfhA==}
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
resolution: {integrity: sha512-HIbImydoC3J8NFt+8MXfhTCf5rO6NjCMyinSAHac0VmV8uCHw+kbQkyAzxV84rzz9ZOzmBOnj0b1N461UIYGsw==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
resolution: {integrity: sha512-nzMZruRvxDhEfYUhzu+7EmM39+82Dgagc/6hPFPqGqzXNGcIG0anuxbUxfeNtI64SHt91KuuYUmCB/inlM+Pag==}
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
resolution: {integrity: sha512-DjSqT7+BZ/lWcDHwNMuzsRVfyxUimh+D54Xw4tSWbdVVQhtWtNMUyI93LVnwCmsoEpar2gC3SFeAgywx37svKQ==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-kHCbegdTNHpzmPtUD4S5fqkVkqgdQR47spF9p2VPP3dIIkZl6Ytk8w0vhlAsAGgge8FmucfwX+vvPKgm0NtOCQ==}
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-31lKeGPmRE6xfV6I3VjaEGVFRei14pl/zgoFDK4w+UkbJqOuNl2Ht3O1GuqNIg3Gl14qTEb4kZRAYFHXifDx9A==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
resolution: {integrity: sha512-3PkUBYo5z4dgtlnTNIFj7QGpcDUAuqXz9WGVigPDCeccEnhGiRkWmA5102TmYJHtwJP3LfmE+ZF9PGeWhn8p9Q==}
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
resolution: {integrity: sha512-qFWBneHJAJ73W4whtbaFOL1M/7DBC6ILHXuxc7ZPtEhfPuT1zeZiGrmKHoMAfJA+mcm6xhOFljqVTUS+00Jabw==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-49NvjZIXHly56/PLoEDD7VphbO4N8dwMXoApElDFCpVGDNGeKlwlib1tXtnpTF6i2/XIsAj7GgatHB5KHXgBnA==}
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-OhfefXEEykZlslSUhR8PPRe6MVPV3Oink/dVfIecE5velpc7j80cZYsHlaDrtRDcm3TPwQHkaRW1SJ1efX9oFg==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
resolution: {integrity: sha512-ePUmQFPAPJFNMwg1lelDx2PdjHqYRiF0yfg5e6qeDbPNOu97QNo557Ru/SxmCrmt8ydQWNuZXWpdEp019md5vw==}
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
resolution: {integrity: sha512-L2tuyrD2+Imgxs3VK/ST/2L3xD6vDP0ktJQxM0TaGw7TbAQEMq+RMc8iK6Ew7Id579uzjJe8jSfJID2ZGsOHCA==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
pnpm@12.5.1:
|
||||
resolution: {integrity: sha512-4/MFvHhKK8ifWtO2E4iJRw+ujSr182thIW7JHCw9ZAiXdfneOKrDMQROpA8kXLDVZmOS399lgk4ZB+9qLGLeXw==}
|
||||
pnpm@12.6.0:
|
||||
resolution: {integrity: sha512-PvaPlRyxEawgS0paFvCy3fDaVqluBBPoHYVdnwtV75JnFHCQKOHNAMQFwsX7e56OxNxGd3yAXQNzwvL/AP0g7A==}
|
||||
engines: {node: '>=18.*'}
|
||||
hasBin: true
|
||||
|
||||
snapshots:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
pnpm@12.5.1:
|
||||
pnpm@12.6.0:
|
||||
optionalDependencies:
|
||||
'@pnpm/exe.android-arm64': 12.5.1
|
||||
'@pnpm/exe.android-x64': 12.5.1
|
||||
'@pnpm/exe.darwin-arm64': 12.5.1
|
||||
'@pnpm/exe.darwin-x64': 12.5.1
|
||||
'@pnpm/exe.freebsd-x64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64-musl': 12.5.1
|
||||
'@pnpm/exe.linux-ppc64': 12.5.1
|
||||
'@pnpm/exe.linux-riscv64': 12.5.1
|
||||
'@pnpm/exe.linux-s390x': 12.5.1
|
||||
'@pnpm/exe.linux-x64': 12.5.1
|
||||
'@pnpm/exe.linux-x64-musl': 12.5.1
|
||||
'@pnpm/exe.win32-arm64': 12.5.1
|
||||
'@pnpm/exe.win32-x64': 12.5.1
|
||||
'@pnpm/exe.android-arm64': 12.6.0
|
||||
'@pnpm/exe.android-x64': 12.6.0
|
||||
'@pnpm/exe.darwin-arm64': 12.6.0
|
||||
'@pnpm/exe.darwin-x64': 12.6.0
|
||||
'@pnpm/exe.freebsd-x64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64-musl': 12.6.0
|
||||
'@pnpm/exe.linux-ppc64': 12.6.0
|
||||
'@pnpm/exe.linux-riscv64': 12.6.0
|
||||
'@pnpm/exe.linux-s390x': 12.6.0
|
||||
'@pnpm/exe.linux-x64': 12.6.0
|
||||
'@pnpm/exe.linux-x64-musl': 12.6.0
|
||||
'@pnpm/exe.win32-arm64': 12.6.0
|
||||
'@pnpm/exe.win32-x64': 12.6.0
|
||||
|
||||
---
|
||||
lockfileVersion: '9.0'
|
||||
@ -188,8 +188,8 @@ importers:
|
||||
specifier: ^0.9.5
|
||||
version: 0.9.5
|
||||
eleventy-plugin-metagen:
|
||||
specifier: ^1.8.4
|
||||
version: 1.8.4
|
||||
specifier: ^1.8.5
|
||||
version: 1.8.5
|
||||
eleventy-plugin-nesting-toc:
|
||||
specifier: ^1.3.0
|
||||
version: 1.3.0
|
||||
@ -200,11 +200,11 @@ importers:
|
||||
specifier: ^3.7.2
|
||||
version: 3.7.2
|
||||
markdown-it:
|
||||
specifier: ^15.0.0
|
||||
version: 15.0.0
|
||||
specifier: ^15.0.2
|
||||
version: 15.0.2
|
||||
markdown-it-anchor:
|
||||
specifier: ^9.2.1
|
||||
version: 9.2.1(@types/markdown-it@14.2.0)(markdown-it@15.0.0)
|
||||
specifier: ^10.0.0
|
||||
version: 10.0.0(@types/markdown-it@14.2.0)(markdown-it@15.0.2)
|
||||
markdown-it-plantuml:
|
||||
specifier: ^1.4.1
|
||||
version: 1.4.1
|
||||
@ -427,8 +427,8 @@ packages:
|
||||
elasticlunr@0.9.5:
|
||||
resolution: {integrity: sha512-5YM9LFQgVYfuLNEoqMqVWIBuF2UNCA+xu/jz1TyryLN/wmBcQSb+GNAwvLKvEpGESwgGN8XA1nbLAt6rKlyHYQ==}
|
||||
|
||||
eleventy-plugin-metagen@1.8.4:
|
||||
resolution: {integrity: sha512-v8yIjwx7W/A6HKktVltk601KQUb3Sy/syHhtKXmlYMsb7IvIp17KugK3dko8z1oy+z2GDV57PY7vXZLtZs7Fzw==}
|
||||
eleventy-plugin-metagen@1.8.5:
|
||||
resolution: {integrity: sha512-SsjlV+cJ84RMeH3zZLWlNGRsgB4lWp3KkADCXeorFGbFURhT5XjrhmHJhVDV07YdRq+fqIxO981QuqcrQkd92A==}
|
||||
|
||||
eleventy-plugin-nesting-toc@1.3.0:
|
||||
resolution: {integrity: sha512-WZzVkz28nw3A0DpJFQWXZzQxniyjvOZKxVix5x7WVAS0H1OD1hYJbR0go/Lr1kK2SrmxfbsUHUlekR+mQPvqMA==}
|
||||
@ -642,8 +642,8 @@ packages:
|
||||
resolution: {integrity: sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
markdown-it-anchor@9.2.1:
|
||||
resolution: {integrity: sha512-p6APiLJDFAW2GEvaavDvhIBn7jrX2jLv77NkBGgNacFTurbORYc4pyYySg/mI6mpR6cHQuAtzKtmqgQr4K8dsQ==}
|
||||
markdown-it-anchor@10.0.0:
|
||||
resolution: {integrity: sha512-Q8g7Z6OBdH3eXF0lujFqukIxUvgCDZcjzCrJxmD6QiEzU1HWR9fVN+Bf6gxmM+0yrPFs+jUw8gNjLmUQqt6Eew==}
|
||||
peerDependencies:
|
||||
'@types/markdown-it': '*'
|
||||
markdown-it: '*'
|
||||
@ -651,19 +651,19 @@ packages:
|
||||
markdown-it-plantuml@1.4.1:
|
||||
resolution: {integrity: sha512-13KgnZaGYTHBp4iUmGofzZSBz+Zj6cyqfR0SXUIc9wgWTto5Xhn7NjaXYxY0z7uBeTUMlc9LMQq5uP4OM5xCHg==}
|
||||
|
||||
markdown-it@14.3.0:
|
||||
resolution: {integrity: sha512-RCEsPjR+sr0x+AuYp601tKTkgFG4YEPLCzHST3cQ/fhlJkqAkz1L2/Qbp1j9qw5SBwQHFBoW8+hoN5xssOF0Tw==}
|
||||
markdown-it@14.3.2:
|
||||
resolution: {integrity: sha512-sHHjZ5fJKlgrG4qns2YwVcdNep35h5fERrfkD2YNsb9UFk0UIHarbiTaHKVMlPuWAoiilyK8Fv/jAm11slsY7Q==}
|
||||
hasBin: true
|
||||
|
||||
markdown-it@15.0.0:
|
||||
resolution: {integrity: sha512-Lf8ajvVNdRpzSNB4VegxNy7gjs8gU35l4b4+ET49LrQC5PKYwLZ72u60LeJ9gv3qiaesuYjJWCyVeQmv/QWKQw==}
|
||||
markdown-it@15.0.2:
|
||||
resolution: {integrity: sha512-q4IGxMv56jCqT4OCRCADBoDP3LO4MhmTXjFbphHPXs4g3j9Xg5RDnxqN8IF/3vIWEU+VCnUq+7JUg/cfy2E6Qw==}
|
||||
hasBin: true
|
||||
|
||||
mdurl@2.1.0:
|
||||
resolution: {integrity: sha512-1+HBaOx0zi/dQWht8rNv9MYf9qqpqL/kxI0hXImU6Y547zM6Sni8BQibt7ifgMcYtQg41ao3Ivd6cnSM86inpg==}
|
||||
|
||||
meta-generator@0.1.5:
|
||||
resolution: {integrity: sha512-stImEDLa5k2TfIMfpFomJKM9LuYzwIIsxS/ejBop0CifPqc4nHoLdTQkABnjrzzkZgLhmXdN144R7OT4dnbKqw==}
|
||||
meta-generator@0.1.6:
|
||||
resolution: {integrity: sha512-jdwiUXuZ36V28RCGQlAXWG71WyELolwRD77kcW7JknQtl14o91DEPMRqGrAVmPaw6rSC3PFcKQegLs4X+sX4kA==}
|
||||
|
||||
mime-db@1.54.0:
|
||||
resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==}
|
||||
@ -992,7 +992,7 @@ snapshots:
|
||||
kleur: 4.1.5
|
||||
liquidjs: 10.29.0
|
||||
luxon: 3.7.2
|
||||
markdown-it: 14.3.0
|
||||
markdown-it: 14.3.2
|
||||
minimist: 1.2.8
|
||||
moo: 0.5.2
|
||||
node-retrieve-globals: 6.0.1
|
||||
@ -1203,10 +1203,10 @@ snapshots:
|
||||
|
||||
elasticlunr@0.9.5: {}
|
||||
|
||||
eleventy-plugin-metagen@1.8.4:
|
||||
eleventy-plugin-metagen@1.8.5:
|
||||
dependencies:
|
||||
'@11ty/eleventy': 3.1.6
|
||||
meta-generator: 0.1.5
|
||||
meta-generator: 0.1.6
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- supports-color
|
||||
@ -1400,14 +1400,14 @@ snapshots:
|
||||
|
||||
luxon@3.7.2: {}
|
||||
|
||||
markdown-it-anchor@9.2.1(@types/markdown-it@14.2.0)(markdown-it@15.0.0):
|
||||
markdown-it-anchor@10.0.0(@types/markdown-it@14.2.0)(markdown-it@15.0.2):
|
||||
dependencies:
|
||||
'@types/markdown-it': 14.2.0
|
||||
markdown-it: 15.0.0
|
||||
markdown-it: 15.0.2
|
||||
|
||||
markdown-it-plantuml@1.4.1: {}
|
||||
|
||||
markdown-it@14.3.0:
|
||||
markdown-it@14.3.2:
|
||||
dependencies:
|
||||
argparse: 2.0.1
|
||||
entities: 4.5.0
|
||||
@ -1416,7 +1416,7 @@ snapshots:
|
||||
punycode.js: 2.3.1
|
||||
uc.micro: 2.1.0
|
||||
|
||||
markdown-it@15.0.0:
|
||||
markdown-it@15.0.2:
|
||||
dependencies:
|
||||
argparse: 3.0.1
|
||||
entities: 8.0.0
|
||||
@ -1427,7 +1427,7 @@ snapshots:
|
||||
|
||||
mdurl@2.1.0: {}
|
||||
|
||||
meta-generator@0.1.5:
|
||||
meta-generator@0.1.6:
|
||||
dependencies:
|
||||
get-tag: 0.1.10
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
{:paths ["src" "vendor" "resources" "test"]
|
||||
:deps
|
||||
{penpot/common {:local/root "../common"}
|
||||
org.clojure/clojure {:mvn/version "1.12.5"}
|
||||
org.clojure/clojure {:mvn/version "1.12.6"}
|
||||
binaryage/devtools {:mvn/version "1.0.7"}
|
||||
metosin/reitit-core {:mvn/version "0.10.1"}
|
||||
metosin/reitit-core {:mvn/version "0.11.0"}
|
||||
}
|
||||
:aliases
|
||||
{:outdated
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
:dev
|
||||
{:extra-deps
|
||||
{thheller/shadow-cljs {:mvn/version "3.5.0"}}}
|
||||
{thheller/shadow-cljs {:mvn/version "3.5.3"}}}
|
||||
|
||||
:shadow-cljs
|
||||
{:main-opts ["-m" "shadow.cljs.devtools.cli"]
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"license": "MPL-2.0",
|
||||
"author": "Kaleidos INC Sucursal en España SL",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/penpot/penpot"
|
||||
@ -13,20 +13,20 @@
|
||||
"dependencies": {
|
||||
"@penpot/svgo": "penpot/svgo#3.3.0",
|
||||
"archiver": "8.0.0",
|
||||
"cookies": "^0.9.1",
|
||||
"cookies": "^0.9.2",
|
||||
"date-fns": "^4.4.0",
|
||||
"generic-pool": "^3.9.0",
|
||||
"inflation": "^2.1.0",
|
||||
"ioredis": "^6.0.0",
|
||||
"playwright": "1.62.1",
|
||||
"playwright": "1.63.0",
|
||||
"raw-body": "^4.0.0",
|
||||
"source-map-support": "^0.5.21",
|
||||
"undici": "^8.10.0",
|
||||
"undici": "^8.11.2",
|
||||
"xml-js": "^1.6.11",
|
||||
"xregexp": "^5.1.2"
|
||||
"xregexp": "^5.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ws": "^8.21.3"
|
||||
"ws": "^8.22.0"
|
||||
},
|
||||
"scripts": {
|
||||
"clear:shadow-cache": "rm -rf .shadow-cljs && rm -rf target",
|
||||
|
||||
162
exporter/pnpm-lock.yaml
generated
162
exporter/pnpm-lock.yaml
generated
@ -7,153 +7,153 @@ importers:
|
||||
configDependencies: {}
|
||||
packageManagerDependencies:
|
||||
pnpm:
|
||||
specifier: 12.5.1
|
||||
version: 12.5.1
|
||||
specifier: 12.6.0
|
||||
version: 12.6.0
|
||||
|
||||
packages:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6LGBmQuDzUmgpHSuy+haG0jrmkwFNa4EuShDZqK3cIBv4Wfb75CzjJmowkzr+iJg40vnBKMQ62t4Ko6mwsId7A==}
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-kviIHft9h02q+7N2In7tSL9T/HRUSGwYmU74YPtsWU5ee7vgqPyC0JT6RRX6miW+NxX1CvHgQxg69qq1qTLJYQ==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
resolution: {integrity: sha512-091oCltP3Rx89yxL1Wh5rXkUXEyFzyxIzSHKRFDyDFlQkb8Ox8FaDcm+M8PNkMyqnLA+qeGOLzY7Rjj9izl1Ww==}
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
resolution: {integrity: sha512-CT8aJKLq2mtZFE71pr4E5Z2xHL8uGnRGr+NclDqsXlVF4SVcQ2QAs14mWi0C8gjT4hbmi+Q0lJRRIkMAWfjjng==}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-r1vEMQPVjRexZMyL2HonxJoo3+nuB/+G+tg+f2PK6faRdXX1TDwevKXOxJAfqlPInTy6W/pm912+s+m0NcR4BQ==}
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-rafpVkjzugKBMxSvGQd5wK1x5eOTkD/+lcJIFHeQhvd+BJ8kDisOOvwhQDrpGd4vd2Fx+hhW0P2Ptt638OlhFg==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
resolution: {integrity: sha512-YHwI1g2B+Y2cAEylOR31r781GWijdJL7Gy7TEn/ZpZ5v/Cuwp5/Pz0EFCgo0M2MKLafAbL/laUMGvOpAdnerAw==}
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
resolution: {integrity: sha512-72Jpuv1m24gI8zUNcaylYpBWEhBzz1VPhnDIU2GYM2eRP+KsOqVLwV78i+JrihI39zY2NNXmaN4eAKX1inpaDQ==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
resolution: {integrity: sha512-sFUMHiYFs6q5syFwgaVppzhQSmqnXoJIz/YwTXIOXTDE76ndIpTRpDGAnBCBKjsaEBnqjJA/2l6hpJcNDNoMiA==}
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
resolution: {integrity: sha512-LON4QgNy1w/XF4uySZIyC/5hEB0oGdelXsY9tSKqstER+2j2X2oHz67skD11RRd/HWFRtMr64shQZ4I9ZoZ0zg==}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-zupuxYZBuBEGjUz805/4/Asq01UNziFADANt8yp+LdUjU9bbMa3xY78Bx1PsGDqBy7aiad4sdUMK8ZxH4n4gmQ==}
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-BdDpX+DeaMUc5x6WNcE6FkmFy36NwrBbBvwsZU737Zt3u1fTY+iKFPchjEQNCM4rT6q6xvF2oN3ZwExGsJCkxQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6hbMWW2/eQo1b5wvQPe/ndLHVTH88Rav6N+ffD4/h6IuFMjWCgasFYYsFv0GrvpqREAx3SwmZSvli+0NFXqbxA==}
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-8h2sNoIhHDpHDYqZZCh9PXr6krqW10btb0GHVGuw710muDHlFAHMtUG2ogmaHge6zJG1xgY4Y7mwX5g/LWvrYg==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
resolution: {integrity: sha512-Gg3maDzaE/ZFMV9HIx/BwMN0Y6QbEs13URfxmiYHtKjjLAs5wEQZRMUP87YNLYO7cNaEfbM8GRbS9vPosyD9Gw==}
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
resolution: {integrity: sha512-ld6xgcEhFCFrsVsJhbmdmR714PnsEspO/Ij8w0/D7OSiz2hYGu3fZd5tKRxOI5m6H6Gl0/RRFAPncTHbsgXVjQ==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
resolution: {integrity: sha512-6fgWxXYMBMsWQ8DAiRevscX4QZQjwh+FsyCj8ZOk8pMXvqeq84MqBLCmS6KckvnbdqJ+HlSVQ7fs/kd0ldwfhA==}
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
resolution: {integrity: sha512-HIbImydoC3J8NFt+8MXfhTCf5rO6NjCMyinSAHac0VmV8uCHw+kbQkyAzxV84rzz9ZOzmBOnj0b1N461UIYGsw==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
resolution: {integrity: sha512-nzMZruRvxDhEfYUhzu+7EmM39+82Dgagc/6hPFPqGqzXNGcIG0anuxbUxfeNtI64SHt91KuuYUmCB/inlM+Pag==}
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
resolution: {integrity: sha512-DjSqT7+BZ/lWcDHwNMuzsRVfyxUimh+D54Xw4tSWbdVVQhtWtNMUyI93LVnwCmsoEpar2gC3SFeAgywx37svKQ==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-kHCbegdTNHpzmPtUD4S5fqkVkqgdQR47spF9p2VPP3dIIkZl6Ytk8w0vhlAsAGgge8FmucfwX+vvPKgm0NtOCQ==}
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-31lKeGPmRE6xfV6I3VjaEGVFRei14pl/zgoFDK4w+UkbJqOuNl2Ht3O1GuqNIg3Gl14qTEb4kZRAYFHXifDx9A==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
resolution: {integrity: sha512-3PkUBYo5z4dgtlnTNIFj7QGpcDUAuqXz9WGVigPDCeccEnhGiRkWmA5102TmYJHtwJP3LfmE+ZF9PGeWhn8p9Q==}
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
resolution: {integrity: sha512-qFWBneHJAJ73W4whtbaFOL1M/7DBC6ILHXuxc7ZPtEhfPuT1zeZiGrmKHoMAfJA+mcm6xhOFljqVTUS+00Jabw==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-49NvjZIXHly56/PLoEDD7VphbO4N8dwMXoApElDFCpVGDNGeKlwlib1tXtnpTF6i2/XIsAj7GgatHB5KHXgBnA==}
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-OhfefXEEykZlslSUhR8PPRe6MVPV3Oink/dVfIecE5velpc7j80cZYsHlaDrtRDcm3TPwQHkaRW1SJ1efX9oFg==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
resolution: {integrity: sha512-ePUmQFPAPJFNMwg1lelDx2PdjHqYRiF0yfg5e6qeDbPNOu97QNo557Ru/SxmCrmt8ydQWNuZXWpdEp019md5vw==}
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
resolution: {integrity: sha512-L2tuyrD2+Imgxs3VK/ST/2L3xD6vDP0ktJQxM0TaGw7TbAQEMq+RMc8iK6Ew7Id579uzjJe8jSfJID2ZGsOHCA==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
pnpm@12.5.1:
|
||||
resolution: {integrity: sha512-4/MFvHhKK8ifWtO2E4iJRw+ujSr182thIW7JHCw9ZAiXdfneOKrDMQROpA8kXLDVZmOS399lgk4ZB+9qLGLeXw==}
|
||||
pnpm@12.6.0:
|
||||
resolution: {integrity: sha512-PvaPlRyxEawgS0paFvCy3fDaVqluBBPoHYVdnwtV75JnFHCQKOHNAMQFwsX7e56OxNxGd3yAXQNzwvL/AP0g7A==}
|
||||
engines: {node: '>=18.*'}
|
||||
hasBin: true
|
||||
|
||||
snapshots:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
pnpm@12.5.1:
|
||||
pnpm@12.6.0:
|
||||
optionalDependencies:
|
||||
'@pnpm/exe.android-arm64': 12.5.1
|
||||
'@pnpm/exe.android-x64': 12.5.1
|
||||
'@pnpm/exe.darwin-arm64': 12.5.1
|
||||
'@pnpm/exe.darwin-x64': 12.5.1
|
||||
'@pnpm/exe.freebsd-x64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64-musl': 12.5.1
|
||||
'@pnpm/exe.linux-ppc64': 12.5.1
|
||||
'@pnpm/exe.linux-riscv64': 12.5.1
|
||||
'@pnpm/exe.linux-s390x': 12.5.1
|
||||
'@pnpm/exe.linux-x64': 12.5.1
|
||||
'@pnpm/exe.linux-x64-musl': 12.5.1
|
||||
'@pnpm/exe.win32-arm64': 12.5.1
|
||||
'@pnpm/exe.win32-x64': 12.5.1
|
||||
'@pnpm/exe.android-arm64': 12.6.0
|
||||
'@pnpm/exe.android-x64': 12.6.0
|
||||
'@pnpm/exe.darwin-arm64': 12.6.0
|
||||
'@pnpm/exe.darwin-x64': 12.6.0
|
||||
'@pnpm/exe.freebsd-x64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64-musl': 12.6.0
|
||||
'@pnpm/exe.linux-ppc64': 12.6.0
|
||||
'@pnpm/exe.linux-riscv64': 12.6.0
|
||||
'@pnpm/exe.linux-s390x': 12.6.0
|
||||
'@pnpm/exe.linux-x64': 12.6.0
|
||||
'@pnpm/exe.linux-x64-musl': 12.6.0
|
||||
'@pnpm/exe.win32-arm64': 12.6.0
|
||||
'@pnpm/exe.win32-x64': 12.6.0
|
||||
|
||||
---
|
||||
lockfileVersion: '9.0'
|
||||
@ -179,8 +179,8 @@ importers:
|
||||
specifier: 8.0.0
|
||||
version: 8.0.0
|
||||
cookies:
|
||||
specifier: ^0.9.1
|
||||
version: 0.9.1
|
||||
specifier: ^0.9.2
|
||||
version: 0.9.2
|
||||
date-fns:
|
||||
specifier: ^4.4.0
|
||||
version: 4.4.0
|
||||
@ -203,18 +203,18 @@ importers:
|
||||
specifier: ^0.5.21
|
||||
version: 0.5.21
|
||||
undici:
|
||||
specifier: ^8.10.0
|
||||
version: 8.10.0
|
||||
specifier: ^8.11.2
|
||||
version: 8.11.2
|
||||
xml-js:
|
||||
specifier: ^1.6.11
|
||||
version: 1.6.11
|
||||
xregexp:
|
||||
specifier: ^5.1.2
|
||||
version: 5.1.2
|
||||
specifier: ^5.1.3
|
||||
version: 5.1.3
|
||||
devDependencies:
|
||||
ws:
|
||||
specifier: ^8.21.3
|
||||
version: 8.21.3
|
||||
specifier: ^8.22.0
|
||||
version: 8.22.0
|
||||
|
||||
packages:
|
||||
|
||||
@ -326,8 +326,8 @@ packages:
|
||||
resolution: {integrity: sha512-g0S8KAD8qf4+V//pr3BfB1aBnARLXNz2Gx+jmHU0LEriUuoQUOPOulVquHKTJ8+EAIIO7fhseNDr9wK5Q9FKBQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
cookies@0.9.1:
|
||||
resolution: {integrity: sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==}
|
||||
cookies@0.9.2:
|
||||
resolution: {integrity: sha512-8BIbcC6tPZMv2/PD4PrB3CtKks7LmAWhA7FRZK/6/b/WJ2RUz00KCga7gq50S4/RhZ22kxefRFGgsuts0v3eoA==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
||||
core-js-pure@3.49.0:
|
||||
@ -578,15 +578,15 @@ packages:
|
||||
resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==}
|
||||
engines: {node: '>=0.6.x'}
|
||||
|
||||
undici@8.10.0:
|
||||
resolution: {integrity: sha512-HvltHd7avK13QIw/oLe4qoOLyoVSoafqJ2jYOrtMRBkbYT31eiBQ8O0ehRKZiEZCMEyLFQNIADpgCWC5fALvYQ==}
|
||||
undici@8.11.2:
|
||||
resolution: {integrity: sha512-u4UB2/IrKdU6lFxumHmmo1a3fCQO5tzQllRorfoRS63txhrB7xTpSn1PftwC4qEHkOaqP95fCWW4lJzwErwzhQ==}
|
||||
engines: {node: '>=22.19.0'}
|
||||
|
||||
util-deprecate@1.0.2:
|
||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||
|
||||
ws@8.21.3:
|
||||
resolution: {integrity: sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==}
|
||||
ws@8.22.0:
|
||||
resolution: {integrity: sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
peerDependencies:
|
||||
bufferutil: ^4.0.1
|
||||
@ -601,8 +601,8 @@ packages:
|
||||
resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==}
|
||||
hasBin: true
|
||||
|
||||
xregexp@5.1.2:
|
||||
resolution: {integrity: sha512-6hGgEMCGhqCTFEJbqmWrNIPqfpdirdGWkqshu7fFZddmTSfgv5Sn9D2SaKloR79s5VUiUlpwzg3CM3G6D3VIlw==}
|
||||
xregexp@5.1.3:
|
||||
resolution: {integrity: sha512-7uOg8BVk9kt6HnkeBdyW3VEq7KXzs4un/Efge4AN1FsAMzM6fYexggbWWkQcfHExQpQEoNkWXnr4wSWpqtx49Q==}
|
||||
|
||||
zip-stream@7.0.5:
|
||||
resolution: {integrity: sha512-dSvYKdvLsAHCDqPOhIwk/q5CvuWtTB3Dgpoe0uVEFjTzIOAmsQpprX25InCvrvJsirEbu1OHyy67n/kAj1Sw/w==}
|
||||
@ -711,7 +711,7 @@ snapshots:
|
||||
normalize-path: 3.0.0
|
||||
readable-stream: 4.7.0
|
||||
|
||||
cookies@0.9.1:
|
||||
cookies@0.9.2:
|
||||
dependencies:
|
||||
depd: 2.0.0
|
||||
keygrip: 1.1.0
|
||||
@ -960,17 +960,17 @@ snapshots:
|
||||
|
||||
tsscmp@1.0.6: {}
|
||||
|
||||
undici@8.10.0: {}
|
||||
undici@8.11.2: {}
|
||||
|
||||
util-deprecate@1.0.2: {}
|
||||
|
||||
ws@8.21.3: {}
|
||||
ws@8.22.0: {}
|
||||
|
||||
xml-js@1.6.11:
|
||||
dependencies:
|
||||
sax: 1.6.0
|
||||
|
||||
xregexp@5.1.2:
|
||||
xregexp@5.1.3:
|
||||
dependencies:
|
||||
'@babel/runtime-corejs3': 7.29.7
|
||||
|
||||
|
||||
1
frontend/config.js
Normal file
1
frontend/config.js
Normal file
@ -0,0 +1 @@
|
||||
var penpotFlags = "enable-login-with-google enable-login-with-oidc enable-access-tokens enable-mcp enable-render-wasm";
|
||||
1
frontend/config2.js
Normal file
1
frontend/config2.js
Normal file
@ -0,0 +1 @@
|
||||
var penpotPublicURI = "http://localhost:3450/penpot/";
|
||||
@ -4,9 +4,9 @@
|
||||
penpot/common
|
||||
{:local/root "../common"}
|
||||
|
||||
org.clojure/clojure {:mvn/version "1.12.5"}
|
||||
org.clojure/clojure {:mvn/version "1.12.6"}
|
||||
binaryage/devtools {:mvn/version "RELEASE"}
|
||||
metosin/reitit-core {:mvn/version "0.10.1"}
|
||||
metosin/reitit-core {:mvn/version "0.11.0"}
|
||||
funcool/okulary {:mvn/version "2022.04.11-16"}
|
||||
|
||||
funcool/tubax
|
||||
@ -51,7 +51,7 @@
|
||||
"--enable-native-access=ALL-UNNAMED"]
|
||||
|
||||
:extra-deps
|
||||
{thheller/shadow-cljs {:mvn/version "3.5.0"}
|
||||
{thheller/shadow-cljs {:mvn/version "3.5.3"}
|
||||
com.bhauman/rebel-readline {:mvn/version "RELEASE"}
|
||||
org.clojure/tools.namespace {:mvn/version "RELEASE"}
|
||||
criterium/criterium {:mvn/version "0.4.6"}}}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"license": "MPL-2.0",
|
||||
"author": "Kaleidos INC Sucursal en España SL",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"browserslist": [
|
||||
"defaults"
|
||||
],
|
||||
@ -58,79 +58,79 @@
|
||||
"@penpot/text-editor": "link:text-editor",
|
||||
"@penpot/tokenscript": "link:packages/tokenscript",
|
||||
"@penpot/ua-parser": "penpot/ua-parser#1.0.0",
|
||||
"@playwright/test": "1.62.1",
|
||||
"@storybook/addon-docs": "10.5.10",
|
||||
"@storybook/addon-themes": "10.5.10",
|
||||
"@storybook/addon-vitest": "10.5.10",
|
||||
"@storybook/react-vite": "10.5.10",
|
||||
"@playwright/test": "1.63.0",
|
||||
"@storybook/addon-docs": "10.6.0",
|
||||
"@storybook/addon-themes": "10.6.0",
|
||||
"@storybook/addon-vitest": "10.6.0",
|
||||
"@storybook/react-vite": "10.6.0",
|
||||
"@tokens-studio/sd-transforms": "2.0.3",
|
||||
"@types/node": "^26.4.0",
|
||||
"@vitest/browser": "4.1.11",
|
||||
"@vitest/browser-playwright": "4.1.11",
|
||||
"@vitest/coverage-v8": "4.1.11",
|
||||
"@types/node": "^26.6.3",
|
||||
"@vitest/browser": "5.0.2",
|
||||
"@vitest/browser-playwright": "5.0.2",
|
||||
"@vitest/coverage-v8": "5.0.2",
|
||||
"@zip.js/zip.js": "2.8.34",
|
||||
"autoprefixer": "^10.5.4",
|
||||
"compression": "^1.8.1",
|
||||
"autoprefixer": "^10.6.1",
|
||||
"compression": "^1.8.2",
|
||||
"concurrently": "^10.0.5",
|
||||
"date-fns": "^4.4.0",
|
||||
"esbuild": "^0.28.2",
|
||||
"eventsource-parser": "^4.1.0",
|
||||
"eventsource-parser": "^4.1.1",
|
||||
"express": "^5.1.0",
|
||||
"fancy-log": "^2.0.0",
|
||||
"getopts": "^2.3.0",
|
||||
"gettext-parser": "^9.1.1",
|
||||
"highlight.js": "^11.12.0",
|
||||
"js-beautify": "^2.0.3",
|
||||
"jsdom": "^30.0.1",
|
||||
"jsdom": "^30.1.1",
|
||||
"lodash": "^4.18.1",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"map-stream": "0.0.7",
|
||||
"marked": "^18.0.11",
|
||||
"marked": "^18.0.14",
|
||||
"mkdirp": "^3.0.1",
|
||||
"mustache": "^4.2.0",
|
||||
"nodemon": "^3.1.14",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"opentype.js": "^2.0.0",
|
||||
"p-limit": "^7.3.1",
|
||||
"playwright": "1.62.1",
|
||||
"postcss": "^8.5.26",
|
||||
"p-limit": "^7.3.3",
|
||||
"playwright": "1.63.0",
|
||||
"postcss": "^8.5.28",
|
||||
"postcss-clean": "^1.2.2",
|
||||
"postcss-modules": "^9.0.1",
|
||||
"postcss-scss": "^4.0.9",
|
||||
"prettier": "3.9.6",
|
||||
"prettier": "3.9.9",
|
||||
"pretty-time": "^1.1.0",
|
||||
"prop-types": "^15.8.1",
|
||||
"randomcolor": "^0.6.2",
|
||||
"react": "19.2.8",
|
||||
"react-dom": "19.2.8",
|
||||
"react-error-boundary": "^6.1.3",
|
||||
"react": "19.3.0",
|
||||
"react-dom": "19.3.0",
|
||||
"react-error-boundary": "^6.1.6",
|
||||
"react-virtualized": "^9.22.6",
|
||||
"rimraf": "^6.1.3",
|
||||
"rxjs": "8.0.0-alpha.14",
|
||||
"sass": "^1.103.1",
|
||||
"sass-embedded": "^1.103.1",
|
||||
"sass": "^1.105.0",
|
||||
"sass-embedded": "^1.105.0",
|
||||
"sax": "^1.6.1",
|
||||
"scheduler": "^0.27.0",
|
||||
"scheduler": "^0.28.0",
|
||||
"source-map-support": "^0.5.21",
|
||||
"storybook": "10.5.10",
|
||||
"style-dictionary": "5.5.2",
|
||||
"stylelint": "^17.14.1",
|
||||
"storybook": "10.6.0",
|
||||
"style-dictionary": "5.5.5",
|
||||
"stylelint": "^17.15.0",
|
||||
"stylelint-config-standard-scss": "^17.0.0",
|
||||
"stylelint-plugin-logical-css": "^2.1.0",
|
||||
"stylelint-scss": "^7.2.0",
|
||||
"stylelint-scss": "^7.3.0",
|
||||
"svg-sprite": "^2.0.4",
|
||||
"tdigest": "^0.1.3",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"typescript": "^6.0.2",
|
||||
"vite": "^8.2.2",
|
||||
"vitest": "^4.1.11",
|
||||
"vite": "^8.3.1",
|
||||
"vitest": "^5.0.2",
|
||||
"wait-on": "^9.1.0",
|
||||
"watcher": "^2.3.1",
|
||||
"workerpool": "^10.0.3",
|
||||
"xregexp": "^5.1.2"
|
||||
"xregexp": "^5.1.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@penpot/ui": "link:packages/ui",
|
||||
"react-aria-components": "^1.20.0"
|
||||
"react-aria-components": "^1.21.1"
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"description": "Penpot Draft-JS Wrapper",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"author": "Andrey Antukh",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"description": "Simple library for handling keyboard shortcuts",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"author": "Craig Campbell",
|
||||
"license": "Apache-2.0 WITH LLVM-exception"
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"author": "Andrey Antukh",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"version": "0.0.1",
|
||||
"types": "./dist/index.d.ts",
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.js"
|
||||
@ -23,23 +23,23 @@
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^8.0.1",
|
||||
"@babel/core": "^8.0.6",
|
||||
"@babel/preset-react": "^8.0.1",
|
||||
"@storybook/react": "10.5.10",
|
||||
"@storybook/react-vite": "10.5.10",
|
||||
"@testing-library/dom": "10.4.1",
|
||||
"@testing-library/react": "16.3.2",
|
||||
"@types/react": "^19.2.18",
|
||||
"@types/react-dom": "^19.2.5",
|
||||
"@vitejs/plugin-react": "^6.1.0",
|
||||
"@storybook/react": "10.6.0",
|
||||
"@storybook/react-vite": "10.6.0",
|
||||
"@testing-library/dom": "10.4.2",
|
||||
"@testing-library/react": "16.3.3",
|
||||
"@types/react": "^19.3.0",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"@vitejs/plugin-react": "^6.1.1",
|
||||
"babel-plugin-react-compiler": "^1.0.0",
|
||||
"eslint-plugin-import": "2.32.0",
|
||||
"eslint-plugin-jsx-a11y": "6.10.2",
|
||||
"eslint-plugin-react": "7.37.5",
|
||||
"eslint-plugin-react-hooks": "7.1.1",
|
||||
"react-compiler-runtime": "^1.0.0",
|
||||
"storybook": "10.5.10",
|
||||
"vite-plugin-dts": "^5.0.3"
|
||||
"storybook": "10.6.0",
|
||||
"vite-plugin-dts": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-aria-components": "^1.20.0"
|
||||
|
||||
BIN
frontend/paste-1.png
Normal file
BIN
frontend/paste-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@ -288,34 +288,6 @@ test.skip("Update text letter spacing selecting a part of it (starting)", async
|
||||
await expect(workspace.canvas).toHaveScreenshot();
|
||||
});
|
||||
|
||||
test("BUG 11552 - Apply styles to the current caret", async ({ page }) => {
|
||||
const workspace = new WasmWorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockGetFile("text-editor/get-file-11552.json");
|
||||
await workspace.mockRPC(
|
||||
"update-file?id=*",
|
||||
"text-editor/update-file-11552.json",
|
||||
);
|
||||
await workspace.goToWorkspace();
|
||||
await workspace.doubleClickLeafLayer("Lorem ipsum");
|
||||
|
||||
const fontSizeInput = workspace.rightSidebar.getByRole("textbox", {
|
||||
name: "Font Size",
|
||||
});
|
||||
await expect(fontSizeInput).toBeVisible();
|
||||
|
||||
await page.keyboard.press("Enter");
|
||||
await page.keyboard.press("ArrowRight");
|
||||
|
||||
await fontSizeInput.fill("36");
|
||||
|
||||
await workspace.clickLeafLayer("Lorem ipsum");
|
||||
|
||||
// display Mixed placeholder
|
||||
await expect(fontSizeInput).toHaveValue("");
|
||||
await expect(fontSizeInput).toHaveAttribute("placeholder", "Mixed");
|
||||
});
|
||||
|
||||
// This is to prevent QA tests from failing due to playwright
|
||||
// considering 0-width text boxes as invisible
|
||||
test("BUG 14098 - Fix text editor having 0 width or height", async ({ page }) => {
|
||||
@ -328,7 +300,7 @@ test("BUG 14098 - Fix text editor having 0 width or height", async ({ page }) =>
|
||||
await workspace.textShapeButton.click();
|
||||
await workspace.clickAt(200, 200);
|
||||
|
||||
const textEditor = workspace.page.locator(`div[class*="viewport"]`).first().getByRole('textbox').first();
|
||||
const textEditor = workspace.page.getByTestId("text-editor-container");
|
||||
await expect(textEditor).toBeVisible();
|
||||
});
|
||||
|
||||
|
||||
@ -66,6 +66,74 @@ test.describe("Tokens: Apply token", () => {
|
||||
await expect(canvasSection.getByText("black")).toBeVisible();
|
||||
});
|
||||
|
||||
test("Canvas background follows its color token when the active set changes", async ({
|
||||
page,
|
||||
}) => {
|
||||
const { tokenThemesSetsSidebar, tokensUpdateCreateModal } =
|
||||
await setupTokensFileRender(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
|
||||
// Creates a set holding a "canvas-bg" color token with `value`.
|
||||
const createSetWithCanvasToken = async (setName, value) => {
|
||||
await createSet(tokenThemesSetsSidebar, setName);
|
||||
const setButton = tokenThemesSetsSidebar.getByRole("button", {
|
||||
name: setName,
|
||||
});
|
||||
await setButton.click();
|
||||
|
||||
await tokensTabPanel
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
await tokensUpdateCreateModal.getByLabel("Name").fill("canvas-bg");
|
||||
await tokensUpdateCreateModal.getByLabel("Value").fill(value);
|
||||
|
||||
const submitButton = tokensUpdateCreateModal.getByRole("button", {
|
||||
name: "Save",
|
||||
});
|
||||
await expect(submitButton).toBeEnabled();
|
||||
await submitButton.click();
|
||||
await expect(tokensUpdateCreateModal).not.toBeVisible();
|
||||
|
||||
return setButton;
|
||||
};
|
||||
|
||||
const firstSet = await createSetWithCanvasToken("first-bg", "#ff0000");
|
||||
const secondSet = await createSetWithCanvasToken("second-bg", "#00ff00");
|
||||
|
||||
await firstSet.getByRole("checkbox").click();
|
||||
|
||||
// No shape is selected, so the right sidebar shows the canvas options.
|
||||
const canvasSection = page.getByRole("region", {
|
||||
name: "Canvas background section",
|
||||
});
|
||||
await canvasSection.getByRole("button").first().click();
|
||||
|
||||
const colorPicker = page.getByTestId("colorpicker");
|
||||
await expect(colorPicker).toBeVisible();
|
||||
await colorPicker.getByTestId("opt-token-color").click();
|
||||
await colorPicker.getByRole("button", { name: "canvas-bg" }).click();
|
||||
await page.keyboard.press("Escape");
|
||||
await expect(colorPicker).not.toBeVisible();
|
||||
|
||||
const canvas = page.getByTestId("canvas-wasm-shapes");
|
||||
await expect(canvas).toHaveCSS("background-color", "rgb(255, 0, 0)");
|
||||
|
||||
await firstSet.getByRole("checkbox").click();
|
||||
await secondSet.getByRole("checkbox").click();
|
||||
|
||||
await expect(canvas).toHaveCSS("background-color", "rgb(0, 255, 0)");
|
||||
await expect(canvasSection.getByText("canvas-bg")).toBeVisible();
|
||||
|
||||
await firstSet.getByRole("checkbox").click();
|
||||
await expect(canvas).toHaveCSS("background-color", "rgb(0, 255, 0)");
|
||||
|
||||
await secondSet.getByRole("checkbox").click();
|
||||
await expect(canvas).toHaveCSS("background-color", "rgb(255, 0, 0)");
|
||||
await expect(canvasSection.getByText("canvas-bg")).toBeVisible();
|
||||
});
|
||||
|
||||
test("User applies border-radius token to a shape from sidebar", async ({
|
||||
page,
|
||||
}) => {
|
||||
|
||||
@ -59,7 +59,10 @@ test.describe("Tokens: stroke per side", () => {
|
||||
page,
|
||||
}) => {
|
||||
const workspace = new WasmWorkspacePage(page);
|
||||
await workspace.mockConfigFlags(["enable-feature-token-input"]);
|
||||
await workspace.mockConfigFlags([
|
||||
"enable-feature-token-input",
|
||||
"disable-stroke-per-side",
|
||||
]);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockGetFile("workspace/get-file-layout-stroke-token-json");
|
||||
await workspace.goToWorkspace();
|
||||
@ -452,7 +455,10 @@ test.describe("Tokens: stroke per side", () => {
|
||||
page,
|
||||
}) => {
|
||||
const workspace = new WasmWorkspacePage(page);
|
||||
await workspace.mockConfigFlags(["enable-feature-token-input"]);
|
||||
await workspace.mockConfigFlags([
|
||||
"enable-feature-token-input",
|
||||
"disable-stroke-per-side",
|
||||
]);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockGetFile("workspace/get-file-layout-stroke-token-json");
|
||||
await workspace.goToWorkspace();
|
||||
|
||||
@ -0,0 +1,131 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { WorkspacePage } from "../pages/WorkspacePage";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// The "Add typography" button in the local library typographies section
|
||||
// (src/app/main/ui/workspace/sidebar/assets/typographies.cljs) creates a
|
||||
// typography from the selected text. It is disabled, and its label explains
|
||||
// why, when:
|
||||
// - the selected text uses a font that is not installed
|
||||
// - two or more texts are selected
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function addTypographyButton(workspace, name) {
|
||||
return workspace.sidebar.getByRole("button", {
|
||||
name,
|
||||
exact: typeof name === "string",
|
||||
});
|
||||
}
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await WorkspacePage.init(page);
|
||||
});
|
||||
|
||||
test.describe("font of the selected text", () => {
|
||||
// render-wasm/get-file-text-custom-fonts.json has a text shape
|
||||
// ("Penpot & Dragons") using a custom team font-id. The get-font-variants
|
||||
// mock decides whether that font is installed or missing.
|
||||
const FILE = {
|
||||
id: "434b0541-fa2f-802f-8006-59827d964a9b",
|
||||
pageId: "434b0541-fa2f-802f-8006-59827d964a9c",
|
||||
};
|
||||
|
||||
test("Add typography is enabled when the selected text font is installed", async ({
|
||||
page,
|
||||
}) => {
|
||||
const workspace = new WorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockRPC(
|
||||
/get\-file\?/,
|
||||
"render-wasm/get-file-text-custom-fonts.json",
|
||||
);
|
||||
await workspace.mockRPC(
|
||||
"get-font-variants?team-id=*",
|
||||
"render-wasm/get-font-variants-custom-fonts.json",
|
||||
);
|
||||
await workspace.goToWorkspace({ fileId: FILE.id, pageId: FILE.pageId });
|
||||
|
||||
await workspace.clickLeafLayer("Penpot & Dragons");
|
||||
await workspace.clickAssets();
|
||||
|
||||
await expect(
|
||||
addTypographyButton(workspace, "Add typography"),
|
||||
).toBeEnabled();
|
||||
});
|
||||
|
||||
test("Add typography is disabled when the selected text font is missing", async ({
|
||||
page,
|
||||
}) => {
|
||||
const workspace = new WorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockRPC(
|
||||
/get\-file\?/,
|
||||
"render-wasm/get-file-text-custom-fonts.json",
|
||||
);
|
||||
await workspace.mockRPC(
|
||||
"get-font-variants?team-id=*",
|
||||
"workspace/get-font-variants-empty.json",
|
||||
);
|
||||
await workspace.goToWorkspace({ fileId: FILE.id, pageId: FILE.pageId });
|
||||
|
||||
await workspace.clickLeafLayer("Penpot & Dragons");
|
||||
await workspace.clickAssets();
|
||||
|
||||
await expect(
|
||||
addTypographyButton(workspace, /is no longer available/),
|
||||
).toBeDisabled();
|
||||
});
|
||||
});
|
||||
|
||||
test.describe("number of selected texts", () => {
|
||||
// workspace/get-file-text-multiple-selection.json has two text shapes that
|
||||
// use the same built-in font, so only the selection count changes.
|
||||
const FILE = {
|
||||
id: "434b0541-fa2f-802f-8006-6a827d964a9b",
|
||||
pageId: "434b0541-fa2f-802f-8006-6a827d964a9c",
|
||||
};
|
||||
|
||||
test("Add typography is disabled when two texts are selected", async ({
|
||||
page,
|
||||
}) => {
|
||||
const workspace = new WorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockRPC(
|
||||
/get\-file\?/,
|
||||
"workspace/get-file-text-multiple-selection.json",
|
||||
);
|
||||
await workspace.goToWorkspace({ fileId: FILE.id, pageId: FILE.pageId });
|
||||
|
||||
await workspace.clickLeafLayer("Text multiple selection one");
|
||||
await workspace.clickLeafLayer("Text multiple selection two", {
|
||||
modifiers: ["Shift"],
|
||||
});
|
||||
await workspace.clickAssets();
|
||||
|
||||
await expect(
|
||||
addTypographyButton(
|
||||
workspace,
|
||||
"Select one text to create a typography style",
|
||||
),
|
||||
).toBeDisabled();
|
||||
});
|
||||
|
||||
test("Add typography is enabled when one text is selected", async ({
|
||||
page,
|
||||
}) => {
|
||||
const workspace = new WorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockRPC(
|
||||
/get\-file\?/,
|
||||
"workspace/get-file-text-multiple-selection.json",
|
||||
);
|
||||
await workspace.goToWorkspace({ fileId: FILE.id, pageId: FILE.pageId });
|
||||
|
||||
await workspace.clickLeafLayer("Text multiple selection one");
|
||||
await workspace.clickAssets();
|
||||
|
||||
await expect(
|
||||
addTypographyButton(workspace, "Add typography"),
|
||||
).toBeEnabled();
|
||||
});
|
||||
});
|
||||
2117
frontend/pnpm-lock.yaml
generated
2117
frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1473,12 +1473,17 @@
|
||||
(rx/filter (complement :skip-component-sync?))
|
||||
;; Keep waits pending while component changes are checked.
|
||||
(rx/map start-sync-barrier)
|
||||
(rx/observe-on :async))
|
||||
(rx/share))
|
||||
|
||||
get-component-events
|
||||
(fn [[event old-data]]
|
||||
(let [{:keys [file-id changes save-undo? undo-group]} event
|
||||
changed-components
|
||||
;; Buffers commits until a timer turn passes with no new ones. The
|
||||
;; debounce timer (not a microtask) queues behind any timers already
|
||||
;; due, so a burst of commits is inspected as one batch in one task.
|
||||
commit-batches-s
|
||||
(rx/buffer-until (rx/debounce 0 commits-s) commits-s)
|
||||
|
||||
get-component-changes
|
||||
(fn [old-data {:keys [file-id changes save-undo? undo-group]}]
|
||||
(let [changed-components
|
||||
(when (and old-data
|
||||
(or (nil? file-id) (= file-id (:id old-data))))
|
||||
(into #{}
|
||||
@ -1486,29 +1491,39 @@
|
||||
changes))]
|
||||
(cond
|
||||
(empty? changed-components)
|
||||
(rx/empty)
|
||||
nil
|
||||
|
||||
save-undo?
|
||||
(do
|
||||
(log/info :hint "detected component changes"
|
||||
:ids (map str changed-components)
|
||||
:undo-group undo-group)
|
||||
(->> (rx/from changed-components)
|
||||
(rx/map #(component-changed
|
||||
% (:id old-data) undo-group))))
|
||||
(map #(vector ::component-changed % undo-group)
|
||||
changed-components))
|
||||
|
||||
:else
|
||||
;; Undos only bump :modified-at.
|
||||
(->> (rx/from changed-components)
|
||||
(rx/map touch-component)))))
|
||||
(map #(vector ::touch-component %) changed-components))))
|
||||
|
||||
;; One event per distinct component change in the batch
|
||||
get-component-events
|
||||
(fn [batch old-data]
|
||||
(->> batch
|
||||
(mapcat #(get-component-changes old-data (first %)))
|
||||
(distinct)
|
||||
(map (fn [[type component-id undo-group]]
|
||||
(if (= type ::component-changed)
|
||||
(component-changed component-id (:id old-data) undo-group)
|
||||
(touch-component component-id))))
|
||||
(rx/from)))
|
||||
|
||||
component-events-s
|
||||
(->> commits-s
|
||||
(->> commit-batches-s
|
||||
(rx/with-latest-from workspace-buffer-s)
|
||||
(rx/mapcat
|
||||
(fn [[[event task] old-data]]
|
||||
(->> (get-component-events [event old-data])
|
||||
(rx/finalize #(finish-sync-barrier! task)))))
|
||||
(fn [[batch old-data]]
|
||||
(->> (get-component-events batch old-data)
|
||||
(rx/finalize #(run! (comp finish-sync-barrier! second) batch)))))
|
||||
;; Close barriers left behind when the page shuts down.
|
||||
(rx/finalize #(wrf/finish-tasks! @pending-sync-barriers*))
|
||||
(rx/share))
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
(ns app.main.data.workspace.texts-events
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.files.helpers :as cfh]
|
||||
[app.common.math :as mth]
|
||||
[app.common.types.text :as txt]
|
||||
@ -18,9 +17,24 @@
|
||||
[app.main.data.workspace.libraries :as dwl]
|
||||
[app.main.data.workspace.pages :as-alias dwpg]
|
||||
[app.main.data.workspace.texts :as dwt]
|
||||
[app.main.features :as features]
|
||||
[app.main.fonts :as fonts]
|
||||
[beicon.v2.core :as rx]
|
||||
[potok.v2.core :as ptk]))
|
||||
|
||||
(defn editor-text-options
|
||||
"Editor data that `dwt/current-text-values` needs for `shape-id`,
|
||||
taken from the text editor that is active in `state`."
|
||||
[state shape-id]
|
||||
(let [wasm? (features/active-feature? state "text-editor-wasm/v1")
|
||||
v2? (features/active-feature? state "text-editor/v2")
|
||||
state-map (if wasm?
|
||||
(:workspace-wasm-editor-styles state)
|
||||
(:workspace-editor-state state))]
|
||||
{:editor-styles (when wasm? (get state-map shape-id))
|
||||
:editor-state (when-not v2? (get state-map shape-id))
|
||||
:editor-instance (when v2? (:workspace-editor state))}))
|
||||
|
||||
;; This function must be separated from app.main.data.workspace.texts to avoid a circular
|
||||
;; dependency due main.data.workspace.libraries eventually calling app.main.data.workspace.texts.
|
||||
|
||||
@ -45,14 +59,20 @@
|
||||
shape (first shapes)
|
||||
|
||||
values (dwt/current-text-values
|
||||
{:editor-state (dm/get-in state [:workspace-editor-state (:id shape)])
|
||||
:shape shape
|
||||
:attrs txt/text-node-attrs})
|
||||
(assoc (editor-text-options state (:id shape))
|
||||
:shape shape
|
||||
:attrs txt/text-node-attrs))
|
||||
|
||||
multiple? (or (> 1 (count shapes))
|
||||
(d/seek (partial = :multiple)
|
||||
(vals values)))
|
||||
|
||||
too-many-texts? (> (count shapes) 1)
|
||||
|
||||
font-missing? (and (not multiple?)
|
||||
(some? (:font-id values))
|
||||
(not (fonts/installed? (:font-id values))))
|
||||
|
||||
values (-> (d/without-nils values)
|
||||
(select-keys
|
||||
(d/concat-vec txt/text-font-attrs
|
||||
@ -74,12 +94,14 @@
|
||||
(cond-> (string? group-path)
|
||||
(update :name #(str group-path " / " %))))]
|
||||
|
||||
(rx/concat
|
||||
(rx/of (dwl/add-typography typ)
|
||||
(ev/event {::ev/name "add-asset-to-library"
|
||||
:asset-type "typography"}))
|
||||
(if (or font-missing? too-many-texts?)
|
||||
(rx/empty)
|
||||
(rx/concat
|
||||
(rx/of (dwl/add-typography typ)
|
||||
(ev/event {::ev/name "add-asset-to-library"
|
||||
:asset-type "typography"}))
|
||||
|
||||
(when (not multiple?)
|
||||
(rx/of (dwt/update-attrs (:id shape)
|
||||
{:typography-ref-id typ-id
|
||||
:typography-ref-file file-id})))))))))
|
||||
(when (not multiple?)
|
||||
(rx/of (dwt/update-attrs (:id shape)
|
||||
{:typography-ref-id typ-id
|
||||
:typography-ref-file file-id}))))))))))
|
||||
|
||||
@ -7,12 +7,14 @@
|
||||
(ns app.main.data.workspace.tokens.propagation
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.files.changes-builder :as pcb]
|
||||
[app.common.files.helpers :as cfh]
|
||||
[app.common.files.tokens :as cfo]
|
||||
[app.common.logging :as l]
|
||||
[app.common.time :as ct]
|
||||
[app.common.types.token :as ctt]
|
||||
[app.config :as cf]
|
||||
[app.main.data.changes :as dch]
|
||||
[app.main.data.helpers :as dsh]
|
||||
[app.main.data.style-dictionary :as sd]
|
||||
[app.main.data.tokenscript :as ts]
|
||||
@ -131,8 +133,27 @@
|
||||
update-infos)))
|
||||
shapes-update-info))
|
||||
|
||||
(defn- update-canvas-background
|
||||
"Set the background of `page-id` to the resolved value of its linked
|
||||
color token, when that value differs from the current background."
|
||||
[page-id resolved-tokens]
|
||||
(ptk/reify ::update-canvas-background
|
||||
ptk/WatchEvent
|
||||
(watch [it state _]
|
||||
(let [page (dsh/lookup-page state page-id)
|
||||
token-name (:background-token page)
|
||||
color (some-> (get-in resolved-tokens [token-name :resolved-value])
|
||||
(dwta/value->color)
|
||||
(:color))]
|
||||
(when (and (some? color) (not= color (:background page)))
|
||||
(rx/of (dch/commit-changes
|
||||
(-> (pcb/empty-changes it)
|
||||
(pcb/with-page page)
|
||||
(pcb/mod-page {:background color})))))))))
|
||||
|
||||
(defn propagate-tokens
|
||||
"Propagate tokens values to all shapes where they are applied"
|
||||
"Propagate tokens values to all shapes and page backgrounds where they
|
||||
are applied"
|
||||
[state resolved-tokens]
|
||||
(let [file-id (get state :current-file-id)
|
||||
current-page-id (get state :current-page-id)
|
||||
@ -168,6 +189,9 @@
|
||||
(when (seq observable) (apply rx/merge observable))
|
||||
(when (seq normal) (rx/concat-all (rx/of normal)))
|
||||
|
||||
(when (:background-token page)
|
||||
(rx/of (update-canvas-background page-id resolved-tokens)))
|
||||
|
||||
(->> (rx/from frame-ids)
|
||||
(rx/mapcat (fn [frame-id]
|
||||
(rx/of (dwt/clear-thumbnail file-id page-id frame-id "frame")
|
||||
|
||||
@ -58,10 +58,11 @@
|
||||
:else
|
||||
features)]
|
||||
|
||||
;; The WASM renderer requires the v2 text editor (hard dependency).
|
||||
;; Ensure it's always enabled whenever render-wasm/v1 is active.
|
||||
;; The WASM renderer uses the WASM text editor (v3). Keep forcing
|
||||
;; text-editor/v2 as before; the viewport prefers wasm when both are on.
|
||||
;; Classic clears both editor features (SVG v1).
|
||||
(if (contains? features "render-wasm/v1")
|
||||
(conj features "text-editor/v2")
|
||||
(conj features "text-editor/v2" "text-editor-wasm/v1")
|
||||
(disj features "text-editor/v2" "text-editor-wasm/v1"))))
|
||||
|
||||
(defn get-enabled-features
|
||||
|
||||
@ -6,11 +6,9 @@
|
||||
|
||||
(ns app.main.ui.auth.verify-token
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.config :as cf]
|
||||
[app.main.data.auth :as da]
|
||||
[app.main.data.common :as dcm]
|
||||
[app.main.data.event :as ev]
|
||||
[app.main.data.notifications :as ntf]
|
||||
[app.main.data.profile :as du]
|
||||
[app.main.repo :as rp]
|
||||
@ -45,33 +43,8 @@
|
||||
(st/emit! (da/login-from-token tdata)))
|
||||
|
||||
(defmethod handle-token :team-invitation
|
||||
[{:keys [state team-id organization-team-id organization-name invitation-token] :as tdata}]
|
||||
(when (and (= state :created)
|
||||
(contains? tdata :organization-member-count-before))
|
||||
(let [direct-invitation? (some? organization-team-id)]
|
||||
(st/emit!
|
||||
(ev/event
|
||||
(-> (select-keys tdata [:team-id :organization-id :role
|
||||
:invitation-id :member-id :profile-id
|
||||
:organization-member-count-before])
|
||||
;; The audit event keeps its own names: :user-id is the
|
||||
;; invitee (:member-id, backfilled by the backend with the
|
||||
;; accepting profile) and :user-who-send-invitation is the
|
||||
;; inviter (:profile-id, backfilled from `created-by`).
|
||||
(assoc :user-id (:member-id tdata)
|
||||
:user-who-send-invitation (:profile-id tdata))
|
||||
(dissoc :member-id :profile-id)
|
||||
(d/without-nils)
|
||||
(assoc :organization-member-add-source
|
||||
(if direct-invitation?
|
||||
"direct-organization-invitation"
|
||||
"team-invitation")
|
||||
:belongs-to-team-on-add (boolean team-id)
|
||||
::ev/name "accept-organization-invitation"
|
||||
::ev/origin (if direct-invitation?
|
||||
"organization-invitation-acceptance"
|
||||
"team-invitation-acceptance")))))))
|
||||
|
||||
[{:keys [state team-id organization-team-id organization-name invitation-token
|
||||
redirect-to]}]
|
||||
(case state
|
||||
:created
|
||||
(if organization-team-id
|
||||
@ -85,7 +58,7 @@
|
||||
(ntf/success (tr "auth.notifications.team-invitation-accepted"))))
|
||||
|
||||
:pending
|
||||
(let [route-id (:redirect-to tdata :auth-register)]
|
||||
(let [route-id (or redirect-to :auth-register)]
|
||||
(st/emit! (rt/nav route-id {:invitation-token invitation-token})))))
|
||||
|
||||
(defmethod handle-token :default
|
||||
|
||||
@ -20,10 +20,10 @@
|
||||
|
||||
.dashboard-content {
|
||||
display: grid;
|
||||
grid-template-rows: $sz-64 1fr;
|
||||
grid-template-rows: px2rem(72) 1fr;
|
||||
position: relative;
|
||||
grid-row: 1 / span 2;
|
||||
padding: var(--sp-l) var(--sp-l) 0 0;
|
||||
padding: var(--sp-s) var(--sp-l) 0 0;
|
||||
overflow: hidden;
|
||||
inline-size: 100%;
|
||||
}
|
||||
|
||||
@ -158,9 +158,9 @@
|
||||
(defn resolve-admin-console-href
|
||||
"The admin-console link for the pinned action at the bottom of the
|
||||
organizations column: the organization-specific page when `profile`
|
||||
owns `organization`, the generic admin-console page otherwise —
|
||||
including when no organization is previewed at all (e.g. \"Other
|
||||
teams\"/personal projects is selected)."
|
||||
owns `organization` (the active team's one), the generic
|
||||
admin-console page otherwise — including when the active team has
|
||||
no organization at all (\"Other teams\"/personal projects)."
|
||||
[organization profile]
|
||||
(if (and (:id organization) (= (:id profile) (:owner-id organization)))
|
||||
(dnt/build-admin-console-href {:organization-id (:id organization)
|
||||
@ -171,119 +171,205 @@
|
||||
[event]
|
||||
(or (kbd/mod? event) (dom/middle-mouse? event)))
|
||||
|
||||
(mf/defc personal-projects-icon*
|
||||
"The \"Personal projects\" icon at the 20px size the design asks
|
||||
for, which `icon*` has no size for."
|
||||
{::mf/private true}
|
||||
[{:keys [class]}]
|
||||
[:svg {:class class :width "20px" :height "20px"}
|
||||
[:use {:href (dm/str "#icon-" i/files) :width "20px" :height "20px"}]])
|
||||
|
||||
(defn- use-scroll-fade
|
||||
"Whether a column's scroll area has more content below its visible
|
||||
part, so the fade over its bottom edge shows only then and never
|
||||
covers the last row. Rechecks on scroll and whenever `items`
|
||||
change."
|
||||
[items]
|
||||
(let [node-ref (mf/use-ref nil)
|
||||
fade* (mf/use-state false)
|
||||
|
||||
on-scroll
|
||||
(mf/use-fn
|
||||
(fn []
|
||||
(when-let [node (mf/ref-val node-ref)]
|
||||
(reset! fade* (> (- (.-scrollHeight ^js node)
|
||||
(.-scrollTop ^js node)
|
||||
(.-clientHeight ^js node))
|
||||
1)))))]
|
||||
|
||||
(mf/use-layout-effect (mf/deps items) #(do (on-scroll) nil))
|
||||
|
||||
{:ref node-ref
|
||||
:on-scroll on-scroll
|
||||
:fade? (deref fade*)}))
|
||||
|
||||
(mf/defc organization-item*
|
||||
"One row of `organizations-column*`; `organization` is nil for the
|
||||
\"Other teams\" bucket."
|
||||
{::mf/private true}
|
||||
[{:keys [organization selected-id current-id on-select on-context-menu]}]
|
||||
(let [bucket-id (organization-bucket-id organization)
|
||||
personal? (= bucket-id personal-bucket-id)]
|
||||
[:> dropdown-menu-item* {:data-value (str bucket-id)
|
||||
:class (stl/css-case :organization-item true
|
||||
:selected (= bucket-id selected-id))
|
||||
:on-click on-select
|
||||
:on-context-menu #(on-context-menu % organization)}
|
||||
(if personal?
|
||||
[:span {:class (stl/css :my-teams-icon)}
|
||||
[:> raw-svg* {:id penpot-logo-icon-subtle}]]
|
||||
[:> organization-avatar* {:organization organization :size "xxl"}])
|
||||
[:span {:class (stl/css :organization-text-group)}
|
||||
[:span {:class (stl/css :organization-text)
|
||||
:title (if personal? (tr "dashboard.other-teams") (:name organization))}
|
||||
(if personal? (tr "dashboard.other-teams") (:name organization))]
|
||||
(when (= bucket-id current-id)
|
||||
[:span {:class (stl/css :tick-icon)}
|
||||
[:> icon* {:icon-id i/tick :size "s"}]])]
|
||||
[:span {:class (stl/css :chevron-icon)}
|
||||
[:> icon* {:icon-id i/arrow-right :size "s"}]]]))
|
||||
|
||||
(mf/defc organizations-column*
|
||||
{::mf/private true}
|
||||
[{:keys [organizations selected-id current-id ^boolean has-organizations? on-select on-create-organization
|
||||
admin-console-href ^boolean valid-license on-context-menu on-dismiss-context-menu]}]
|
||||
[:li {:role "presentation" :class (stl/css :organizations-column)}
|
||||
[:div {:class (stl/css :column-label)}
|
||||
(tr "dashboard.section.organizations")]
|
||||
(let [;; "Other teams" is always last (see `sort-organizations`). It
|
||||
;; stays out of the scroll area so it sits right under a short
|
||||
;; list and sticks above the actions under a long one. Its
|
||||
;; entry is a bare `nil` (see `organization-bucket-id`), hence
|
||||
;; `some` rather than looking the value up.
|
||||
listed (remove (comp nil? :id) organizations)
|
||||
other? (some (comp nil? :id) organizations)
|
||||
|
||||
[:ul {:class (stl/css :column-list)}
|
||||
(when-not has-organizations?
|
||||
[:li {:class (stl/css :empty-state)}
|
||||
(tr "dashboard.no-organizations-yet")])
|
||||
{:keys [ref on-scroll fade?]} (use-scroll-fade organizations)]
|
||||
|
||||
(for [organization organizations]
|
||||
(let [bucket-id (organization-bucket-id organization)
|
||||
personal? (= bucket-id personal-bucket-id)]
|
||||
[:* {:key (str bucket-id)}
|
||||
;; "Other teams" is always last (see `sort-organizations`),
|
||||
;; set apart from the real organizations above it the same
|
||||
;; way `.column-separator` sets the pinned actions apart
|
||||
;; from the list.
|
||||
(when personal?
|
||||
[:li {:role "separator" :class (stl/css :column-separator)}])
|
||||
[:> dropdown-menu-item* {:data-value (str bucket-id)
|
||||
:class (stl/css-case :organization-item true
|
||||
:selected (= bucket-id selected-id))
|
||||
:on-click on-select
|
||||
:on-context-menu #(on-context-menu % organization)}
|
||||
(if personal?
|
||||
[:span {:class (stl/css :my-teams-icon)}
|
||||
[:> raw-svg* {:id penpot-logo-icon-subtle}]]
|
||||
[:> organization-avatar* {:organization organization :size "xxl"}])
|
||||
[:span {:class (stl/css :organization-text-group)}
|
||||
[:span {:class (stl/css :organization-text)
|
||||
:title (if personal? (tr "dashboard.other-teams") (:name organization))}
|
||||
(if personal? (tr "dashboard.other-teams") (:name organization))]
|
||||
(when (= bucket-id current-id)
|
||||
[:span {:class (stl/css :tick-icon)}
|
||||
[:> icon* {:icon-id i/tick :size "s"}]])]
|
||||
[:span {:class (stl/css :chevron-icon)}
|
||||
[:> icon* {:icon-id i/arrow-right :size "s"}]]]]))]
|
||||
[:li {:role "presentation" :class (stl/css :organizations-column)}
|
||||
[:div {:class (stl/css-case :column-scroll true :fade fade?)
|
||||
:ref ref
|
||||
:on-scroll on-scroll}
|
||||
[:div {:class (stl/css :column-label)}
|
||||
(tr "dashboard.section.organizations")]
|
||||
|
||||
[:ul {:class (stl/css :column-actions)}
|
||||
[:li {:role "separator" :class (stl/css :column-separator)}]
|
||||
[:ul {:class (stl/css :column-list)}
|
||||
(when-not has-organizations?
|
||||
[:li {:class (stl/css :empty-state)}
|
||||
(tr "dashboard.no-organizations-yet")])
|
||||
|
||||
[:> dropdown-menu-item* {:on-click on-create-organization
|
||||
:class (stl/css :organization-item :action)}
|
||||
[:span {:class (stl/css :icon-wrapper)}
|
||||
[:> icon* {:icon-id i/add :class (stl/css :action-icon)}]]
|
||||
[:span {:class (stl/css :organization-text)} (tr "dashboard.create-new-organization")]]
|
||||
(for [organization listed]
|
||||
[:> organization-item* {:key (str (:id organization))
|
||||
:organization organization
|
||||
:selected-id selected-id
|
||||
:current-id current-id
|
||||
:on-select on-select
|
||||
:on-context-menu on-context-menu}])]]
|
||||
|
||||
(when valid-license
|
||||
[:> dropdown-menu-item* {:class (stl/css :organization-item :action :with-link)
|
||||
:on-click (fn [event]
|
||||
(if (new-tab-click? event)
|
||||
(dom/stop-propagation event)
|
||||
(do
|
||||
(dom/prevent-default event)
|
||||
(when other?
|
||||
[:ul {:class (stl/css :column-bucket)}
|
||||
[:li {:role "separator" :class (stl/css :column-separator)}]
|
||||
[:> organization-item* {:organization nil
|
||||
:selected-id selected-id
|
||||
:current-id current-id
|
||||
:on-select on-select
|
||||
:on-context-menu on-context-menu}]])
|
||||
|
||||
[:ul {:class (stl/css :column-actions)}
|
||||
[:li {:role "separator" :class (stl/css :column-separator)}]
|
||||
|
||||
(when valid-license
|
||||
[:> dropdown-menu-item* {:class (stl/css :organization-item :action :with-link)
|
||||
:on-click (fn [event]
|
||||
(if (new-tab-click? event)
|
||||
(dom/stop-propagation event)
|
||||
(st/emit! (rt/nav-raw :href admin-console-href)))))
|
||||
:on-context-menu on-dismiss-context-menu}
|
||||
[:a {:class (stl/css :item-link)
|
||||
:href admin-console-href
|
||||
:tab-index "-1"}
|
||||
[:span {:class (stl/css :icon-wrapper)}
|
||||
[:> icon* {:icon-id i/arrow-up-right :class (stl/css :action-icon)}]]
|
||||
[:span {:class (stl/css :organization-text)} (tr "dashboard.go-to-admin-console")]]])]])
|
||||
(do
|
||||
(dom/prevent-default event)
|
||||
(dom/stop-propagation event)
|
||||
(st/emit! (rt/nav-raw :href admin-console-href)))))
|
||||
:on-context-menu on-dismiss-context-menu}
|
||||
[:a {:class (stl/css :item-link)
|
||||
:href admin-console-href
|
||||
:tab-index "-1"}
|
||||
[:span {:class (stl/css :icon-wrapper)}
|
||||
[:> icon* {:icon-id i/arrow-up-right :class (stl/css :action-icon)}]]
|
||||
[:span {:class (stl/css :organization-text)} (tr "dashboard.go-to-admin-console")]]])
|
||||
|
||||
[:> dropdown-menu-item* {:on-click on-create-organization
|
||||
:class (stl/css :organization-item :action)}
|
||||
[:span {:class (stl/css :icon-wrapper)}
|
||||
[:> icon* {:icon-id i/add :class (stl/css :action-icon)}]]
|
||||
[:span {:class (stl/css :organization-text)} (tr "dashboard.create-new-organization")]]]]))
|
||||
|
||||
(mf/defc team-item*
|
||||
"One row of `teams-column*`."
|
||||
{::mf/private true}
|
||||
[{:keys [team href selected-team-id on-select on-context-menu]}]
|
||||
(let [subscription-type (get-subscription-type (:subscription team))
|
||||
show-badge? (show-subscription-badge? team)]
|
||||
[:> dropdown-menu-item* {:data-value (str (:id team))
|
||||
:class (stl/css-case :team-item true
|
||||
:with-link true)
|
||||
:on-click on-select
|
||||
:on-context-menu on-context-menu}
|
||||
[:a {:class (stl/css :item-link)
|
||||
:href href
|
||||
:tab-index "-1"}
|
||||
(if (:is-default team)
|
||||
[:span {:class (stl/css :team-item-personal-icon)}
|
||||
[:> personal-projects-icon* {:class (stl/css :personal-icon)}]]
|
||||
[:img {:src (cf/resolve-team-photo-url team)
|
||||
:class (stl/css :team-item-picture)
|
||||
:alt (:name team)}])
|
||||
[:span {:class (stl/css :team-text-group)}
|
||||
[:span {:class (stl/css :team-text)
|
||||
:title (team-display-name team)}
|
||||
(team-display-name team)]
|
||||
(when show-badge?
|
||||
[:> menu-team-icon* {:subscription-type subscription-type}])
|
||||
(when (= (:id team) selected-team-id)
|
||||
[:span {:class (stl/css :tick-icon)}
|
||||
[:> icon* {:icon-id i/tick :size "s"}]])]]]))
|
||||
|
||||
(mf/defc teams-column*
|
||||
{::mf/private true}
|
||||
[{:keys [teams selected-team-id on-select on-context-menu on-create-team
|
||||
on-create-organization]}]
|
||||
(let [router (mf/deref refs/router)]
|
||||
[:li {:role "presentation" :class (stl/css :teams-column)}
|
||||
[:div {:class (stl/css :column-label)}
|
||||
(tr "dashboard.section.teams")]
|
||||
(let [router (mf/deref refs/router)
|
||||
|
||||
[:ul {:class (stl/css :column-list)}
|
||||
(for [team teams]
|
||||
(let [subscription-type (get-subscription-type (:subscription team))
|
||||
show-badge? (show-subscription-badge? team)]
|
||||
[:* {:key (str (:id team))}
|
||||
;; "Personal projects" is always last (see
|
||||
;; `sort-organization-teams`/`sort-all-teams`), set apart
|
||||
;; from the real teams above it the same way
|
||||
;; `.column-separator` sets the pinned actions apart from
|
||||
;; the list. Skipped when it's the only team: there's
|
||||
;; nothing above it to separate from.
|
||||
(when (and (:is-default team) (> (count teams) 1))
|
||||
[:li {:role "separator" :class (stl/css :column-separator)}])
|
||||
[:> dropdown-menu-item* {:data-value (str (:id team))
|
||||
:class (stl/css-case :team-item true
|
||||
:with-link true)
|
||||
:on-click on-select
|
||||
:on-context-menu on-context-menu}
|
||||
[:a {:class (stl/css :item-link)
|
||||
:href (team-href router team)
|
||||
:tab-index "-1"}
|
||||
(if (:is-default team)
|
||||
[:span {:class (stl/css :team-item-personal-icon)}
|
||||
[:> icon* {:icon-id i/files}]]
|
||||
[:img {:src (cf/resolve-team-photo-url team)
|
||||
:class (stl/css :team-item-picture)
|
||||
:alt (:name team)}])
|
||||
[:span {:class (stl/css :team-text-group)}
|
||||
[:span {:class (stl/css :team-text)
|
||||
:title (team-display-name team)}
|
||||
(team-display-name team)]
|
||||
(when show-badge?
|
||||
[:> menu-team-icon* {:subscription-type subscription-type}])
|
||||
(when (= (:id team) selected-team-id)
|
||||
[:span {:class (stl/css :tick-icon)}
|
||||
[:> icon* {:icon-id i/tick :size "s"}]])]]]]))]
|
||||
;; "Personal projects" is always last (see
|
||||
;; `sort-organization-teams`/`sort-all-teams`). It stays out of
|
||||
;; the scroll area so it sits right under a short list and
|
||||
;; sticks above the actions under a long one.
|
||||
listed (remove :is-default teams)
|
||||
personal (d/seek :is-default teams)
|
||||
|
||||
{:keys [ref on-scroll fade?]} (use-scroll-fade teams)]
|
||||
|
||||
[:li {:role "presentation" :class (stl/css :teams-column)}
|
||||
[:div {:class (stl/css-case :column-scroll true :fade fade?)
|
||||
:ref ref
|
||||
:on-scroll on-scroll}
|
||||
[:div {:class (stl/css :column-label)}
|
||||
(tr "dashboard.section.teams")]
|
||||
|
||||
[:ul {:class (stl/css :column-list)}
|
||||
(for [team listed]
|
||||
[:> team-item* {:key (str (:id team))
|
||||
:team team
|
||||
:href (team-href router team)
|
||||
:selected-team-id selected-team-id
|
||||
:on-select on-select
|
||||
:on-context-menu on-context-menu}])]]
|
||||
|
||||
(when personal
|
||||
[:ul {:class (stl/css :column-bucket)}
|
||||
;; Skipped when it's the only team: there's nothing above it
|
||||
;; to set it apart from.
|
||||
(when (seq listed)
|
||||
[:li {:role "separator" :class (stl/css :column-separator)}])
|
||||
[:> team-item* {:team personal
|
||||
:href (team-href router personal)
|
||||
:selected-team-id selected-team-id
|
||||
:on-select on-select
|
||||
:on-context-menu on-context-menu}]])
|
||||
|
||||
[:ul {:class (stl/css :column-actions)}
|
||||
[:li {:role "separator" :class (stl/css :column-separator)}]
|
||||
@ -464,16 +550,13 @@
|
||||
(= subscription-type "unlimited")
|
||||
(assoc :show-contact-sales-option true)))))))
|
||||
|
||||
;; "Go to admin console" targets the organization currently
|
||||
;; previewed on the left column (not necessarily the active
|
||||
;; team's organization), and only owners of that organization
|
||||
;; get the option at all.
|
||||
selected-organization
|
||||
(get organizations selected-organization-id)
|
||||
|
||||
;; "Go to admin console" targets the active team's organization
|
||||
;; (the one with the tick), not the one previewed on the left
|
||||
;; column, and only its owner gets the organization-specific
|
||||
;; page.
|
||||
admin-console-href
|
||||
(mf/with-memo [selected-organization profile]
|
||||
(resolve-admin-console-href selected-organization profile))
|
||||
(mf/with-memo [current-organization profile]
|
||||
(resolve-admin-console-href current-organization profile))
|
||||
|
||||
;; "Create new team" targets the organization previewed on the
|
||||
;; left column (`selected-organization-id`), i.e. wherever the
|
||||
@ -537,7 +620,7 @@
|
||||
:aria-haspopup "menu"}
|
||||
(if (:is-default team)
|
||||
[:div {:class (stl/css :personal-projects-icon)}
|
||||
[:> icon* {:icon-id i/files}]]
|
||||
[:> personal-projects-icon* {:class (stl/css :personal-icon)}]]
|
||||
|
||||
[:img {:src (cf/resolve-team-photo-url team)
|
||||
:class (stl/css :team-picture)
|
||||
|
||||
@ -132,13 +132,15 @@
|
||||
}
|
||||
|
||||
.my-teams-icon {
|
||||
height: var(--sp-xxl);
|
||||
width: var(--sp-xxl);
|
||||
display: flex;
|
||||
height: $sz-24;
|
||||
width: $sz-24;
|
||||
|
||||
svg {
|
||||
fill: var(--icon-stroke-color);
|
||||
width: var(--sp-xxl);
|
||||
height: var(--sp-xxl);
|
||||
stroke: none;
|
||||
width: $sz-24;
|
||||
height: $sz-24;
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,10 +152,11 @@
|
||||
width: var(--sp-xxl);
|
||||
}
|
||||
|
||||
.team-item-personal-icon svg {
|
||||
.personal-icon {
|
||||
flex-shrink: 0;
|
||||
color: transparent;
|
||||
fill: none;
|
||||
stroke-width: 1px;
|
||||
stroke-width: 1.2px;
|
||||
stroke: var(--icon-foreground);
|
||||
}
|
||||
|
||||
@ -174,13 +177,6 @@
|
||||
width: var(--sp-xxxl);
|
||||
}
|
||||
|
||||
.personal-projects-icon svg {
|
||||
color: transparent;
|
||||
fill: none;
|
||||
stroke-width: 1px;
|
||||
stroke: var(--icon-foreground);
|
||||
}
|
||||
|
||||
.team-picture {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@ -191,23 +187,28 @@
|
||||
}
|
||||
|
||||
.organization-team-dropdown {
|
||||
--switcher-dropdown-background: var(--color-background-tertiary);
|
||||
|
||||
:global(.light) & {
|
||||
--switcher-dropdown-background: var(--color-background-primary);
|
||||
}
|
||||
|
||||
box-shadow: 0 0 var(--sp-m) 0 var(--menu-shadow-color);
|
||||
position: absolute;
|
||||
padding: var(--sp-xs);
|
||||
padding: var(--sp-s);
|
||||
border-radius: $br-8;
|
||||
z-index: var(--z-index-dropdown);
|
||||
color: var(--title-foreground-color-hover);
|
||||
background-color: var(--menu-background-color);
|
||||
background-color: var(--switcher-dropdown-background);
|
||||
border: $b-2 solid var(--panel-border-color);
|
||||
margin: 0;
|
||||
display: grid;
|
||||
grid-template-columns: px2rem(257) px2rem(257);
|
||||
grid-template-rows: minmax(0, 1fr);
|
||||
gap: var(--sp-m);
|
||||
gap: var(--sp-s);
|
||||
top: calc(var(--sp-s) + #{$sz-64} + var(--sp-xs));
|
||||
left: var(--sp-s);
|
||||
height: fit-content;
|
||||
max-height: px2rem(416);
|
||||
height: px2rem(416);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@ -224,9 +225,8 @@
|
||||
|
||||
.organizations-column,
|
||||
.teams-column {
|
||||
display: grid;
|
||||
grid-template-rows: auto minmax(0, 1fr) auto;
|
||||
gap: var(--sp-xxs);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-width: 0;
|
||||
@ -236,18 +236,39 @@
|
||||
|
||||
.teams-column {
|
||||
border-inline-start: $b-1 solid var(--color-background-quaternary);
|
||||
padding-inline-start: var(--sp-m);
|
||||
padding-inline-start: var(--sp-s);
|
||||
}
|
||||
|
||||
.column-scroll {
|
||||
@include custom-scrollbar;
|
||||
|
||||
flex: 0 1 auto;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
|
||||
&.fade::after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: sticky;
|
||||
inset-block-end: 0;
|
||||
height: px2rem(44);
|
||||
margin-block-start: calc(-1 * #{px2rem(44)});
|
||||
background: linear-gradient(transparent, var(--switcher-dropdown-background));
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.column-label {
|
||||
@include t.use-typography("headline-small");
|
||||
|
||||
color: var(--color-foreground-secondary);
|
||||
padding: $sz-6 $sz-6 $sz-6 var(--sp-m);
|
||||
padding: var(--sp-s) $sz-6 $sz-6 var(--sp-m);
|
||||
margin-block-end: var(--sp-xxs);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.column-list,
|
||||
.column-bucket,
|
||||
.column-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -257,16 +278,13 @@
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.column-list {
|
||||
@include custom-scrollbar;
|
||||
.column-bucket {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
background:
|
||||
linear-gradient(transparent, var(--menu-background-color) 70%) 0 100% / 100% #{$sz-40} local no-repeat,
|
||||
radial-gradient(farthest-side at 50% 100%, var(--menu-shadow-color), transparent) 0 100% / 100% #{$sz-14}
|
||||
scroll no-repeat;
|
||||
background-color: var(--menu-background-color);
|
||||
.column-actions {
|
||||
flex-shrink: 0;
|
||||
margin-block-start: auto;
|
||||
}
|
||||
|
||||
.column-separator {
|
||||
@ -275,6 +293,12 @@
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
// The fade ends right on these lines, with no gap above them.
|
||||
.column-bucket > .column-separator,
|
||||
.column-actions > .column-separator {
|
||||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
@include t.use-typography("body-medium");
|
||||
|
||||
|
||||
@ -202,12 +202,6 @@
|
||||
|
||||
file-id (mf/use-ctx ctx/current-file-id)
|
||||
|
||||
current-colors* (mf/use-state [])
|
||||
current-colors (deref current-colors*)
|
||||
|
||||
grouped-colors* (mf/use-state {})
|
||||
grouped-colors (deref grouped-colors*)
|
||||
|
||||
open-groups* (mf/use-state #{})
|
||||
open-groups (deref open-groups*)
|
||||
|
||||
@ -221,13 +215,15 @@
|
||||
[{:value "recent" :label (tr "workspace.libraries.colors.recent-colors") :id "recent"}
|
||||
{:value "file" :label (tr "workspace.libraries.colors.file-library") :id "file"}])
|
||||
|
||||
;; Equal-stable, since `select*` resets its selection when options change
|
||||
options
|
||||
(mf/with-memo [library-options libraries file-id]
|
||||
(into library-options
|
||||
(comp
|
||||
(map val)
|
||||
(map (fn [lib] {:value (d/name (:id lib)) :label (:name lib) :id (d/name (:id lib))})))
|
||||
(dissoc libraries file-id)))
|
||||
(h/use-equal-memo
|
||||
(mf/with-memo [library-options libraries file-id]
|
||||
(into library-options
|
||||
(comp
|
||||
(map val)
|
||||
(map (fn [lib] {:value (d/name (:id lib)) :label (:name lib) :id (d/name (:id lib))})))
|
||||
(dissoc libraries file-id))))
|
||||
|
||||
on-library-change
|
||||
(mf/use-fn
|
||||
@ -281,49 +277,49 @@
|
||||
(fn [s]
|
||||
(if (contains? s path)
|
||||
(disj s path)
|
||||
(conj s path))))))]
|
||||
(conj s path))))))
|
||||
|
||||
;; Load library colors when the selected library (or filter options) change.
|
||||
;;
|
||||
;; flat current-colors* -- used for the grid view and the recent list view.
|
||||
;; grouped grouped-colors* -- used for the library grouped list view.
|
||||
;;
|
||||
;; Library colors are fully converted with `library-color->color` here so
|
||||
;; the render path never needs to do it. `flat-colors` is materialised as
|
||||
;; an eager vector so realisation does not leak into render time.
|
||||
;; open-groups* is reset to #{} (all groups expanded) on every library switch.
|
||||
(mf/with-effect [selected recent-colors libraries file-id valid-color?]
|
||||
(let [resolved-file-id (if (= selected :file) file-id selected)]
|
||||
(reset! open-groups* #{})
|
||||
(if (= selected :recent)
|
||||
(let [colors (into []
|
||||
(comp
|
||||
(filter valid-color?)
|
||||
(map-indexed (fn [index color]
|
||||
(let [color (if (map? color) color {:color color})]
|
||||
(vary-meta color assoc ::id (dm/str index)))))
|
||||
(take-while some?))
|
||||
(sort ctc/sort-colors (reverse recent-colors)))]
|
||||
(reset! current-colors* colors)
|
||||
(reset! grouped-colors* {}))
|
||||
resolved-file-id
|
||||
(if (= selected :file) file-id selected)
|
||||
|
||||
(let [raw-colors (->> (dm/get-in libraries [resolved-file-id :data :colors])
|
||||
(vals)
|
||||
(filter valid-color?)
|
||||
(sort-by :name))
|
||||
;; Colors of the selected library; stable across unrelated commits
|
||||
library-colors
|
||||
(when (not= selected :recent)
|
||||
(dm/get-in libraries [resolved-file-id :data :colors]))
|
||||
|
||||
;; Eager vector for the grid view -- index-based ::id for keying.
|
||||
flat-colors (into []
|
||||
(map-indexed (fn [index color]
|
||||
(-> (ctc/library-color->color color resolved-file-id)
|
||||
(vary-meta assoc ::id (dm/str index)))))
|
||||
raw-colors)
|
||||
;; Flat (grid and recent list) and grouped (library list) colors, converted for rendering
|
||||
[current-colors grouped-colors]
|
||||
(mf/with-memo [selected recent-colors library-colors resolved-file-id valid-color?]
|
||||
(if (= selected :recent)
|
||||
[(into []
|
||||
(comp
|
||||
(filter valid-color?)
|
||||
(map-indexed (fn [index color]
|
||||
(let [color (if (map? color) color {:color color})]
|
||||
(vary-meta color assoc ::id (dm/str index)))))
|
||||
(take-while some?))
|
||||
(sort ctc/sort-colors (reverse recent-colors)))
|
||||
{}]
|
||||
|
||||
;; Group tree with colors already converted -- no conversions at render time.
|
||||
grouped (some-> (grp/group-assets raw-colors false)
|
||||
(convert-grouped-colors resolved-file-id))]
|
||||
(reset! current-colors* flat-colors)
|
||||
(reset! grouped-colors* (or grouped {}))))))
|
||||
(let [raw-colors (->> (vals library-colors)
|
||||
(filter valid-color?)
|
||||
(sort-by :name))
|
||||
|
||||
;; Eager vector for the grid view -- index-based ::id for keying.
|
||||
flat-colors (into []
|
||||
(map-indexed (fn [index color]
|
||||
(-> (ctc/library-color->color color resolved-file-id)
|
||||
(vary-meta assoc ::id (dm/str index)))))
|
||||
raw-colors)
|
||||
|
||||
;; Group tree with colors already converted -- no conversions at render time.
|
||||
grouped (some-> (grp/group-assets raw-colors false)
|
||||
(convert-grouped-colors resolved-file-id))]
|
||||
[flat-colors (or grouped {})])))]
|
||||
|
||||
;; Expands all groups when the selected library changes
|
||||
(mf/with-effect [selected]
|
||||
(reset! open-groups* #{}))
|
||||
|
||||
[:div {:class (stl/css :libraries)}
|
||||
[:div {:class (stl/css :select-wrapper)}
|
||||
|
||||
@ -121,10 +121,15 @@
|
||||
(reset! internal-color* color)
|
||||
(on-change color))))]
|
||||
|
||||
;; Syncs with color changes made outside the ramp; the colors the ramp
|
||||
;; emits come back with the same components and are skipped
|
||||
(mf/use-effect
|
||||
(mf/deps color)
|
||||
(fn []
|
||||
(reset! internal-color* (enrich-color-map color))))
|
||||
(let [color (enrich-color-map color)]
|
||||
(when (not= (select-keys color [:h :s :v :alpha])
|
||||
(select-keys internal-color [:h :s :v :alpha]))
|
||||
(reset! internal-color* color)))))
|
||||
|
||||
[:*
|
||||
[:> value-saturation-selector*
|
||||
|
||||
@ -9,7 +9,9 @@
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.files.helpers :as cfh]
|
||||
[app.common.path-names :as cpn]
|
||||
[app.common.types.text :as txt]
|
||||
[app.main.data.event :as ev]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.workspace :as dw]
|
||||
@ -17,6 +19,7 @@
|
||||
[app.main.data.workspace.texts :as dwt]
|
||||
[app.main.data.workspace.texts-events :as dwte]
|
||||
[app.main.data.workspace.undo :as dwu]
|
||||
[app.main.fonts :as fonts]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.context :as ctx]
|
||||
@ -243,6 +246,66 @@
|
||||
:selected-full selected-full
|
||||
:is-read-only is-read-only}]))])]))
|
||||
|
||||
;; Kept apart from `typographies-section*` so that selection, shape and
|
||||
;; editor changes only re-render this button, not the typography list.
|
||||
(mf/defc add-typography-button*
|
||||
{::mf/private true}
|
||||
[{:keys [file-id]}]
|
||||
(let [selected (mf/deref refs/selected-shapes)
|
||||
objects (mf/deref refs/workspace-page-objects)
|
||||
text-shapes (mf/with-memo [selected objects]
|
||||
(into []
|
||||
(comp (keep (d/getf objects))
|
||||
(filter cfh/text-shape?))
|
||||
selected))
|
||||
many-texts? (> (count text-shapes) 1)
|
||||
shape (when-not many-texts? (first text-shapes))
|
||||
shape-id (:id shape)
|
||||
|
||||
;; The v2 editor instance is mutable, so its per-shape state is
|
||||
;; included only to re-render when the editor styles change.
|
||||
editor-ref (mf/with-memo [shape-id]
|
||||
(l/derived (fn [state]
|
||||
(when shape-id
|
||||
[(dwte/editor-text-options state shape-id)
|
||||
(dm/get-in state [:workspace-v2-editor-state shape-id])]))
|
||||
st/state =))
|
||||
editor-data (mf/deref editor-ref)
|
||||
loaded-fonts (mf/deref fonts/fontsdb)
|
||||
|
||||
values (mf/with-memo [shape editor-data]
|
||||
(when shape
|
||||
(dwt/current-text-values
|
||||
(assoc (first editor-data)
|
||||
:shape shape
|
||||
:attrs txt/text-node-attrs))))
|
||||
font-id (:font-id values)
|
||||
font-missing? (and (some? font-id)
|
||||
(not (d/seek (partial = :multiple) (vals values)))
|
||||
(not (contains? loaded-fonts font-id)))
|
||||
|
||||
on-click
|
||||
(mf/use-fn
|
||||
(mf/deps file-id)
|
||||
(fn [_]
|
||||
(st/emit! (dw/set-assets-section-open file-id :typographies true))
|
||||
(st/emit! (dwte/add-typography file-id))))]
|
||||
|
||||
[:> icon-button* {:variant "ghost"
|
||||
:aria-label (cond
|
||||
many-texts?
|
||||
(tr "workspace.assets.typography.multiple-texts-selected")
|
||||
|
||||
font-missing?
|
||||
(tr "workspace.options.font-not-available"
|
||||
(:font-family values))
|
||||
|
||||
:else
|
||||
(tr "workspace.assets.typography.add-typography"))
|
||||
:on-click on-click
|
||||
:disabled (or many-texts? font-missing?)
|
||||
:icon i/add}]))
|
||||
|
||||
(mf/defc typographies-section*
|
||||
[{:keys [file file-id typographies open-status-ref selected
|
||||
is-local is-open is-force-open is-reverse-sort
|
||||
@ -274,13 +337,6 @@
|
||||
|
||||
open-groups (mf/deref open-groups-ref)
|
||||
|
||||
add-typography
|
||||
(mf/use-fn
|
||||
(mf/deps file-id)
|
||||
(fn [_]
|
||||
(st/emit! (dw/set-assets-section-open file-id :typographies true))
|
||||
(st/emit! (dwte/add-typography file-id))))
|
||||
|
||||
handle-change
|
||||
(mf/use-fn
|
||||
(mf/deps file-id)
|
||||
@ -427,10 +483,7 @@
|
||||
(when is-local
|
||||
[:> cmm/asset-section-block* {:role :title-button}
|
||||
(when-not read-only?
|
||||
[:> icon-button* {:variant "ghost"
|
||||
:aria-label (tr "workspace.assets.typography.add-typography")
|
||||
:on-click add-typography
|
||||
:icon i/add}])])
|
||||
[:> add-typography-button* {:file-id file-id}])])
|
||||
|
||||
[:> cmm/asset-section-block* {:role :content}
|
||||
[:& typographies-group {:file-id file-id
|
||||
|
||||
@ -100,6 +100,21 @@
|
||||
(when (= (:type panel) :component-swap)
|
||||
[:> component-menu* {:shapes (:shapes panel) :is-swap-opened true}]))
|
||||
|
||||
(defn- get-shapes-with-children
|
||||
"Returns the shapes of `selected` together with all their descendants."
|
||||
[objects selected]
|
||||
(loop [queue (into #queue [] selected)
|
||||
visited selected]
|
||||
(if-let [id (peek queue)]
|
||||
(let [shape (get objects id)
|
||||
children (:shapes shape)]
|
||||
(if (seq children)
|
||||
(let [new-children (remove visited children)]
|
||||
(recur (into (pop queue) new-children)
|
||||
(into visited new-children)))
|
||||
(recur (pop queue) visited)))
|
||||
(sequence (keep (d/getf objects)) visited))))
|
||||
|
||||
(mf/defc design-menu*
|
||||
{::mf/private true}
|
||||
[{:keys [selected objects page-id file-id shapes]}]
|
||||
@ -145,29 +160,16 @@
|
||||
(->> (dm/get-in grid-edition [edition :selected])
|
||||
(map #(dm/get-in objects [edition :layout-grid-cells %])))
|
||||
|
||||
shapes-with-children*
|
||||
(mf/use-state nil)
|
||||
;; Deferred, so the subtree walk runs in a background render
|
||||
deferred-selected
|
||||
(mf/use-deferred selected)
|
||||
|
||||
_ (mf/use-effect
|
||||
(mf/deps selected objects shapes)
|
||||
(fn []
|
||||
(reset! shapes-with-children* nil)
|
||||
(let [result
|
||||
(loop [queue (into #queue [] selected)
|
||||
visited selected]
|
||||
(if-let [id (peek queue)]
|
||||
(let [shape (get objects id)
|
||||
children (:shapes shape)]
|
||||
(if (seq children)
|
||||
(let [new-children (remove visited children)]
|
||||
(recur (into (pop queue) new-children)
|
||||
(into visited new-children)))
|
||||
(recur (pop queue) visited)))
|
||||
(sequence (keep (d/getf objects)) visited)))]
|
||||
(reset! shapes-with-children* result))))
|
||||
deferred-objects
|
||||
(mf/use-deferred objects)
|
||||
|
||||
shapes-with-children
|
||||
(deref shapes-with-children*)
|
||||
(mf/with-memo [deferred-selected deferred-objects]
|
||||
(get-shapes-with-children deferred-objects deferred-selected))
|
||||
|
||||
total-selected
|
||||
(count selected)]
|
||||
|
||||
@ -260,10 +260,10 @@
|
||||
|
||||
on-drag
|
||||
(mf/use-fn
|
||||
(mf/deps path)
|
||||
(mf/deps id is-selected on-select)
|
||||
(fn [_]
|
||||
(when-not is-selected
|
||||
(on-select path))))
|
||||
(on-select id))))
|
||||
|
||||
on-drop
|
||||
(mf/use-fn
|
||||
|
||||
@ -140,74 +140,6 @@
|
||||
(t/is (= :auth-register (:id event)))
|
||||
(t/is (= invitation-token (get-in event [:params :invitation-token])))))))
|
||||
|
||||
(t/deftest accept-organization-invitation-audit-event-test
|
||||
(let [emitted (atom [])]
|
||||
(with-redefs [st/emit! (fn
|
||||
([event]
|
||||
(swap! emitted conj event))
|
||||
([event & events]
|
||||
(swap! emitted into (cons event events))))]
|
||||
(t/testing "accepting a team invitation that adds an organization member"
|
||||
(verify-token/handle-token
|
||||
{:iss :team-invitation
|
||||
:state :created
|
||||
:team-id "team-1"
|
||||
:organization-id "organization-1"
|
||||
:role :editor
|
||||
:invitation-id "invitation-1"
|
||||
:member-id "invitee-1"
|
||||
:profile-id "inviter-1"
|
||||
:organization-member-count-before 4})
|
||||
|
||||
(t/is (= {::ev/name "accept-organization-invitation"
|
||||
::ev/origin "team-invitation-acceptance"
|
||||
:team-id "team-1"
|
||||
:organization-id "organization-1"
|
||||
:role :editor
|
||||
:invitation-id "invitation-1"
|
||||
:user-id "invitee-1"
|
||||
:user-who-send-invitation "inviter-1"
|
||||
:organization-member-add-source "team-invitation"
|
||||
:belongs-to-team-on-add true
|
||||
:organization-member-count-before 4}
|
||||
@(first @emitted))))
|
||||
|
||||
(reset! emitted [])
|
||||
(t/testing "accepting an invitation directly to the organization"
|
||||
(verify-token/handle-token
|
||||
{:iss :team-invitation
|
||||
:state :created
|
||||
:organization-id "organization-2"
|
||||
:organization-team-id "team-default"
|
||||
:role :viewer
|
||||
:invitation-id "invitation-2"
|
||||
:member-id "invitee-2"
|
||||
:profile-id "inviter-2"
|
||||
:organization-member-count-before 0})
|
||||
|
||||
(t/is (= {::ev/name "accept-organization-invitation"
|
||||
::ev/origin "organization-invitation-acceptance"
|
||||
:organization-id "organization-2"
|
||||
:role :viewer
|
||||
:invitation-id "invitation-2"
|
||||
:user-id "invitee-2"
|
||||
:user-who-send-invitation "inviter-2"
|
||||
:organization-member-add-source "direct-organization-invitation"
|
||||
:belongs-to-team-on-add false
|
||||
:organization-member-count-before 0}
|
||||
@(first @emitted))))
|
||||
|
||||
(reset! emitted [])
|
||||
(t/testing "does not audit a team invitation for an existing organization member"
|
||||
(verify-token/handle-token
|
||||
{:iss :team-invitation
|
||||
:state :created
|
||||
:team-id "team-3"
|
||||
:organization-id "organization-3"
|
||||
:role :editor})
|
||||
|
||||
(t/is (= 3 (count @emitted)))))))
|
||||
|
||||
(t/deftest build-admin-console-url-preserves-public-uri-subpath
|
||||
(t/testing "builds admin console routes below the configured Penpot subpath"
|
||||
(let [public-uri (u/uri "https://example.com/penpot/")]
|
||||
|
||||
@ -379,6 +379,74 @@
|
||||
(t/is (= "0.1" (:letter-spacing (first typographies)))
|
||||
"float letter-spacing is normalised to 2-decimal string")))))))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
;; Tests: add-typography must not create an asset from a deleted font
|
||||
;;
|
||||
;; A text shape can keep referencing a font-id that is no longer installed
|
||||
;; (the font was removed, or belongs to an unavailable library). Creating a
|
||||
;; typography from it would bake that broken font-id into a brand-new asset.
|
||||
;; ---------------------------------------------------------------------------
|
||||
|
||||
(t/deftest add-typography-skips-shape-with-deleted-font
|
||||
(t/async
|
||||
done
|
||||
(let [content (txt/change-text nil "hello" :font-id "deleted-font-id")
|
||||
file (-> (cthf/sample-file :file1)
|
||||
(cths/add-sample-shape :text1
|
||||
:type :text
|
||||
:x 0 :y 0
|
||||
:content content))
|
||||
shape-id (:id (cths/get-shape file :text1))
|
||||
file-id (:id file)
|
||||
store (ths/setup-store file)
|
||||
events [(fn [state] (assoc-in state [:workspace-local :selected] #{shape-id}))
|
||||
(dwte/add-typography file-id)]]
|
||||
|
||||
(ths/run-store
|
||||
store done events
|
||||
(fn [new-state]
|
||||
(let [file' (ths/get-file-from-state new-state)
|
||||
typographies (vals (get-in file' [:data :typographies]))
|
||||
shape' (cths/get-shape file' :text1)]
|
||||
(t/is (= 0 (count typographies))
|
||||
"no typography was added for a shape with a deleted font")
|
||||
(t/is (nil? (:typography-ref-id shape'))
|
||||
"the shape was not linked to a typography")))))))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
;; Tests: add-typography must not create an asset from two or more selected texts
|
||||
;;
|
||||
;; Deriving a typography from a specific text only makes sense for a single
|
||||
;; shape; with several texts selected there is no one style to capture.
|
||||
;; ---------------------------------------------------------------------------
|
||||
|
||||
(t/deftest add-typography-skips-multiple-selected-texts
|
||||
(t/async
|
||||
done
|
||||
(let [file (-> (cthf/sample-file :file1)
|
||||
(cths/add-sample-shape :text1
|
||||
:type :text
|
||||
:x 0 :y 0
|
||||
:content (txt/change-text nil "hello"))
|
||||
(cths/add-sample-shape :text2
|
||||
:type :text
|
||||
:x 0 :y 100
|
||||
:content (txt/change-text nil "world")))
|
||||
shape-id-1 (:id (cths/get-shape file :text1))
|
||||
shape-id-2 (:id (cths/get-shape file :text2))
|
||||
file-id (:id file)
|
||||
store (ths/setup-store file)
|
||||
events [(fn [state] (assoc-in state [:workspace-local :selected] #{shape-id-1 shape-id-2}))
|
||||
(dwte/add-typography file-id)]]
|
||||
|
||||
(ths/run-store
|
||||
store done events
|
||||
(fn [new-state]
|
||||
(let [file' (ths/get-file-from-state new-state)
|
||||
typographies (vals (get-in file' [:data :typographies]))]
|
||||
(t/is (= 0 (count typographies))
|
||||
"no typography was added when two texts are selected")))))))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
;; Tests: save-default-font must not persist typography refs into the global default font
|
||||
;;
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
(def ^:private all-label (i18n/tr "labels.all"))
|
||||
|
||||
(def ^:private per-side-flags (conj cf/flags :stroke-per-side))
|
||||
(def ^:private no-per-side-flags (disj cf/flags :stroke-per-side))
|
||||
|
||||
(defn setup-file []
|
||||
(-> (tht/sample-file-with-tokens
|
||||
@ -164,7 +165,7 @@
|
||||
:separator
|
||||
{:title "Border Radius", :submenu :border-radius}
|
||||
:separator
|
||||
{:title "Stroke Width"}
|
||||
{:title "Stroke Width", :submenu :stroke-width}
|
||||
:separator
|
||||
{:title "X"}
|
||||
{:title "Y"}]))))
|
||||
@ -177,7 +178,7 @@
|
||||
:separator
|
||||
{:title "Border Radius", :submenu :border-radius}
|
||||
:separator
|
||||
{:title "Stroke Width"}
|
||||
{:title "Stroke Width", :submenu :stroke-width}
|
||||
:separator
|
||||
{:title "X"}
|
||||
{:title "Y"}]))))
|
||||
@ -208,16 +209,17 @@
|
||||
(t/is (= action-titles ["Rotation"])))))
|
||||
|
||||
(t/deftest stroke-width-items
|
||||
(t/testing "shows a single global item when per-side is disabled"
|
||||
(doseq [shape [:rect1 :frame1 :text1]]
|
||||
(let [actions (token-menu-actions [shape] "token-stroke-width")
|
||||
action-titles (mapv :title actions)]
|
||||
(t/is (= action-titles ["Stroke Width"])))))
|
||||
(with-redefs [cf/flags no-per-side-flags]
|
||||
(t/testing "shows a single global item when per-side is disabled"
|
||||
(doseq [shape [:rect1 :frame1 :text1]]
|
||||
(let [actions (token-menu-actions [shape] "token-stroke-width")
|
||||
action-titles (mapv :title actions)]
|
||||
(t/is (= action-titles ["Stroke Width"])))))
|
||||
|
||||
(t/testing "shows a single global item for mixed selections when per-side is disabled"
|
||||
(let [actions (token-menu-actions [:rect1 :text1] "token-stroke-width")
|
||||
action-titles (mapv :title actions)]
|
||||
(t/is (= action-titles ["Stroke Width"])))))
|
||||
(t/testing "shows a single global item for mixed selections when per-side is disabled"
|
||||
(let [actions (token-menu-actions [:rect1 :text1] "token-stroke-width")
|
||||
action-titles (mapv :title actions)]
|
||||
(t/is (= action-titles ["Stroke Width"]))))))
|
||||
|
||||
(t/deftest stroke-width-items-per-side
|
||||
(with-redefs [cf/flags per-side-flags]
|
||||
|
||||
@ -308,6 +308,40 @@
|
||||
(t/is (= (get-in rect-2' [:strokes 0 :stroke-color]) "#ff0000"))
|
||||
(t/is (= (get-in rect-2' [:strokes 0 :stroke-opacity]) 0.5))))))))))
|
||||
|
||||
(t/deftest test-switch-set-updates-canvas-color
|
||||
(t/testing "switching the active set updates a canvas background linked to a color token"
|
||||
(t/async
|
||||
done
|
||||
(let [file (ctht/sample-file-with-tokens
|
||||
:lib-fn #(-> %
|
||||
(ctob/add-set (ctob/make-token-set :id (cthi/new-id! :set-a)
|
||||
:name "Set A"))
|
||||
(ctob/add-set (ctob/make-token-set :id (cthi/new-id! :set-b)
|
||||
:name "Set B"))
|
||||
(ctob/add-token (cthi/id :set-a)
|
||||
(ctob/make-token {:name "canvas.bg"
|
||||
:value "#ff0000"
|
||||
:type :color}))
|
||||
(ctob/add-token (cthi/id :set-b)
|
||||
(ctob/make-token {:name "canvas.bg"
|
||||
:value "#00ff00"
|
||||
:type :color})))
|
||||
;; Both sets active: "Set B" comes last, so its value wins.
|
||||
:status-fn #(ctos/set-tokens-status % #{} #{(cthi/id :set-a)
|
||||
(cthi/id :set-b)}))
|
||||
page-id (cthf/current-page-id file)
|
||||
file (update-in file [:data :pages-index page-id]
|
||||
assoc :background "#00ff00" :background-token "canvas.bg")
|
||||
store (ths/setup-store file)
|
||||
events [(dwtl/set-enabled-token-set (cthi/id :set-b) false)]]
|
||||
(tohs/run-store-async
|
||||
store done events
|
||||
(fn [new-state]
|
||||
(let [file' (ths/get-file-from-state new-state)
|
||||
page' (get-in file' [:data :pages-index page-id])]
|
||||
(t/is (= "#ff0000" (:background page')))
|
||||
(t/is (= "canvas.bg" (:background-token page'))))))))))
|
||||
|
||||
(t/deftest test-apply-dimensions
|
||||
(t/testing "applies dimensions token and updates the shapes width and height"
|
||||
(t/async
|
||||
|
||||
@ -15,18 +15,18 @@
|
||||
"test:watch:e2e": "vitest --browser"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "1.62.1",
|
||||
"@types/node": "^26.1.2",
|
||||
"@vitest/browser": "^4.1.10",
|
||||
"@vitest/coverage-v8": "^4.1.10",
|
||||
"@vitest/ui": "^4.1.11",
|
||||
"@playwright/test": "1.63.0",
|
||||
"@types/node": "^26.6.3",
|
||||
"@vitest/browser": "^5.0.2",
|
||||
"@vitest/coverage-v8": "^5.0.2",
|
||||
"@vitest/ui": "^5.0.2",
|
||||
"canvas": "^3.2.3",
|
||||
"esbuild": "^0.28.0",
|
||||
"jsdom": "^30.0.1",
|
||||
"playwright": "1.62.1",
|
||||
"playwright": "1.63.0",
|
||||
"prettier": "^3.9.6",
|
||||
"vite": "^8.2.0",
|
||||
"vitest": "^4.1.10"
|
||||
"vitest": "^5.0.2"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
@ -6245,6 +6245,10 @@ msgstr "Typographies"
|
||||
msgid "workspace.assets.typography.add-typography"
|
||||
msgstr "Add typography"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/assets/typographies.cljs:461
|
||||
msgid "workspace.assets.typography.multiple-texts-selected"
|
||||
msgstr "Select one text to create a typography style"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/typography.cljs:855
|
||||
msgid "workspace.assets.typography.font-size"
|
||||
msgstr "Size"
|
||||
|
||||
@ -6314,6 +6314,10 @@ msgstr "Tipografías"
|
||||
msgid "workspace.assets.typography.add-typography"
|
||||
msgstr "Añadir tipografía"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/assets/typographies.cljs:461
|
||||
msgid "workspace.assets.typography.multiple-texts-selected"
|
||||
msgstr "Selecciona un solo texto para crear un estilo de tipografía"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/typography.cljs:855
|
||||
msgid "workspace.assets.typography.font-size"
|
||||
msgstr "Tamaño"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"version": "1.2.0-RC1",
|
||||
"license": "MPL-2.0",
|
||||
"author": "Kaleidos INC Sucursal en España SL",
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
122
library/pnpm-lock.yaml
generated
122
library/pnpm-lock.yaml
generated
@ -7,153 +7,153 @@ importers:
|
||||
configDependencies: {}
|
||||
packageManagerDependencies:
|
||||
pnpm:
|
||||
specifier: 12.5.1
|
||||
version: 12.5.1
|
||||
specifier: 12.6.0
|
||||
version: 12.6.0
|
||||
|
||||
packages:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6LGBmQuDzUmgpHSuy+haG0jrmkwFNa4EuShDZqK3cIBv4Wfb75CzjJmowkzr+iJg40vnBKMQ62t4Ko6mwsId7A==}
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-kviIHft9h02q+7N2In7tSL9T/HRUSGwYmU74YPtsWU5ee7vgqPyC0JT6RRX6miW+NxX1CvHgQxg69qq1qTLJYQ==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
resolution: {integrity: sha512-091oCltP3Rx89yxL1Wh5rXkUXEyFzyxIzSHKRFDyDFlQkb8Ox8FaDcm+M8PNkMyqnLA+qeGOLzY7Rjj9izl1Ww==}
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
resolution: {integrity: sha512-CT8aJKLq2mtZFE71pr4E5Z2xHL8uGnRGr+NclDqsXlVF4SVcQ2QAs14mWi0C8gjT4hbmi+Q0lJRRIkMAWfjjng==}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-r1vEMQPVjRexZMyL2HonxJoo3+nuB/+G+tg+f2PK6faRdXX1TDwevKXOxJAfqlPInTy6W/pm912+s+m0NcR4BQ==}
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-rafpVkjzugKBMxSvGQd5wK1x5eOTkD/+lcJIFHeQhvd+BJ8kDisOOvwhQDrpGd4vd2Fx+hhW0P2Ptt638OlhFg==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
resolution: {integrity: sha512-YHwI1g2B+Y2cAEylOR31r781GWijdJL7Gy7TEn/ZpZ5v/Cuwp5/Pz0EFCgo0M2MKLafAbL/laUMGvOpAdnerAw==}
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
resolution: {integrity: sha512-72Jpuv1m24gI8zUNcaylYpBWEhBzz1VPhnDIU2GYM2eRP+KsOqVLwV78i+JrihI39zY2NNXmaN4eAKX1inpaDQ==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
resolution: {integrity: sha512-sFUMHiYFs6q5syFwgaVppzhQSmqnXoJIz/YwTXIOXTDE76ndIpTRpDGAnBCBKjsaEBnqjJA/2l6hpJcNDNoMiA==}
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
resolution: {integrity: sha512-LON4QgNy1w/XF4uySZIyC/5hEB0oGdelXsY9tSKqstER+2j2X2oHz67skD11RRd/HWFRtMr64shQZ4I9ZoZ0zg==}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-zupuxYZBuBEGjUz805/4/Asq01UNziFADANt8yp+LdUjU9bbMa3xY78Bx1PsGDqBy7aiad4sdUMK8ZxH4n4gmQ==}
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-BdDpX+DeaMUc5x6WNcE6FkmFy36NwrBbBvwsZU737Zt3u1fTY+iKFPchjEQNCM4rT6q6xvF2oN3ZwExGsJCkxQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6hbMWW2/eQo1b5wvQPe/ndLHVTH88Rav6N+ffD4/h6IuFMjWCgasFYYsFv0GrvpqREAx3SwmZSvli+0NFXqbxA==}
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-8h2sNoIhHDpHDYqZZCh9PXr6krqW10btb0GHVGuw710muDHlFAHMtUG2ogmaHge6zJG1xgY4Y7mwX5g/LWvrYg==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
resolution: {integrity: sha512-Gg3maDzaE/ZFMV9HIx/BwMN0Y6QbEs13URfxmiYHtKjjLAs5wEQZRMUP87YNLYO7cNaEfbM8GRbS9vPosyD9Gw==}
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
resolution: {integrity: sha512-ld6xgcEhFCFrsVsJhbmdmR714PnsEspO/Ij8w0/D7OSiz2hYGu3fZd5tKRxOI5m6H6Gl0/RRFAPncTHbsgXVjQ==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
resolution: {integrity: sha512-6fgWxXYMBMsWQ8DAiRevscX4QZQjwh+FsyCj8ZOk8pMXvqeq84MqBLCmS6KckvnbdqJ+HlSVQ7fs/kd0ldwfhA==}
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
resolution: {integrity: sha512-HIbImydoC3J8NFt+8MXfhTCf5rO6NjCMyinSAHac0VmV8uCHw+kbQkyAzxV84rzz9ZOzmBOnj0b1N461UIYGsw==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
resolution: {integrity: sha512-nzMZruRvxDhEfYUhzu+7EmM39+82Dgagc/6hPFPqGqzXNGcIG0anuxbUxfeNtI64SHt91KuuYUmCB/inlM+Pag==}
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
resolution: {integrity: sha512-DjSqT7+BZ/lWcDHwNMuzsRVfyxUimh+D54Xw4tSWbdVVQhtWtNMUyI93LVnwCmsoEpar2gC3SFeAgywx37svKQ==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-kHCbegdTNHpzmPtUD4S5fqkVkqgdQR47spF9p2VPP3dIIkZl6Ytk8w0vhlAsAGgge8FmucfwX+vvPKgm0NtOCQ==}
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-31lKeGPmRE6xfV6I3VjaEGVFRei14pl/zgoFDK4w+UkbJqOuNl2Ht3O1GuqNIg3Gl14qTEb4kZRAYFHXifDx9A==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
resolution: {integrity: sha512-3PkUBYo5z4dgtlnTNIFj7QGpcDUAuqXz9WGVigPDCeccEnhGiRkWmA5102TmYJHtwJP3LfmE+ZF9PGeWhn8p9Q==}
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
resolution: {integrity: sha512-qFWBneHJAJ73W4whtbaFOL1M/7DBC6ILHXuxc7ZPtEhfPuT1zeZiGrmKHoMAfJA+mcm6xhOFljqVTUS+00Jabw==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-49NvjZIXHly56/PLoEDD7VphbO4N8dwMXoApElDFCpVGDNGeKlwlib1tXtnpTF6i2/XIsAj7GgatHB5KHXgBnA==}
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-OhfefXEEykZlslSUhR8PPRe6MVPV3Oink/dVfIecE5velpc7j80cZYsHlaDrtRDcm3TPwQHkaRW1SJ1efX9oFg==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
resolution: {integrity: sha512-ePUmQFPAPJFNMwg1lelDx2PdjHqYRiF0yfg5e6qeDbPNOu97QNo557Ru/SxmCrmt8ydQWNuZXWpdEp019md5vw==}
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
resolution: {integrity: sha512-L2tuyrD2+Imgxs3VK/ST/2L3xD6vDP0ktJQxM0TaGw7TbAQEMq+RMc8iK6Ew7Id579uzjJe8jSfJID2ZGsOHCA==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
pnpm@12.5.1:
|
||||
resolution: {integrity: sha512-4/MFvHhKK8ifWtO2E4iJRw+ujSr182thIW7JHCw9ZAiXdfneOKrDMQROpA8kXLDVZmOS399lgk4ZB+9qLGLeXw==}
|
||||
pnpm@12.6.0:
|
||||
resolution: {integrity: sha512-PvaPlRyxEawgS0paFvCy3fDaVqluBBPoHYVdnwtV75JnFHCQKOHNAMQFwsX7e56OxNxGd3yAXQNzwvL/AP0g7A==}
|
||||
engines: {node: '>=18.*'}
|
||||
hasBin: true
|
||||
|
||||
snapshots:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
pnpm@12.5.1:
|
||||
pnpm@12.6.0:
|
||||
optionalDependencies:
|
||||
'@pnpm/exe.android-arm64': 12.5.1
|
||||
'@pnpm/exe.android-x64': 12.5.1
|
||||
'@pnpm/exe.darwin-arm64': 12.5.1
|
||||
'@pnpm/exe.darwin-x64': 12.5.1
|
||||
'@pnpm/exe.freebsd-x64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64-musl': 12.5.1
|
||||
'@pnpm/exe.linux-ppc64': 12.5.1
|
||||
'@pnpm/exe.linux-riscv64': 12.5.1
|
||||
'@pnpm/exe.linux-s390x': 12.5.1
|
||||
'@pnpm/exe.linux-x64': 12.5.1
|
||||
'@pnpm/exe.linux-x64-musl': 12.5.1
|
||||
'@pnpm/exe.win32-arm64': 12.5.1
|
||||
'@pnpm/exe.win32-x64': 12.5.1
|
||||
'@pnpm/exe.android-arm64': 12.6.0
|
||||
'@pnpm/exe.android-x64': 12.6.0
|
||||
'@pnpm/exe.darwin-arm64': 12.6.0
|
||||
'@pnpm/exe.darwin-x64': 12.6.0
|
||||
'@pnpm/exe.freebsd-x64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64-musl': 12.6.0
|
||||
'@pnpm/exe.linux-ppc64': 12.6.0
|
||||
'@pnpm/exe.linux-riscv64': 12.6.0
|
||||
'@pnpm/exe.linux-s390x': 12.6.0
|
||||
'@pnpm/exe.linux-x64': 12.6.0
|
||||
'@pnpm/exe.linux-x64-musl': 12.6.0
|
||||
'@pnpm/exe.win32-arm64': 12.6.0
|
||||
'@pnpm/exe.win32-x64': 12.6.0
|
||||
|
||||
---
|
||||
lockfileVersion: '9.0'
|
||||
|
||||
@ -23,9 +23,9 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/penpot/penpot.git"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"devDependencies": {
|
||||
"concurrently": "^10.0.5",
|
||||
"prettier": "^3.9.6"
|
||||
"prettier": "^3.9.9"
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"description": "Shared type definitions and interfaces for Penpot MCP",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"scripts": {
|
||||
"build": "tsc --build --clean && tsc --build",
|
||||
"watch": "tsc --watch",
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"scripts": {
|
||||
"start": "vite build --watch --config vite.config.ts",
|
||||
"start:multi-user": "pnpm run start",
|
||||
@ -19,7 +19,7 @@
|
||||
"devDependencies": {
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.2.0",
|
||||
"vite": "^8.3.1",
|
||||
"vite-live-preview": "^0.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,35 +27,35 @@
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/node": "^2.0.0",
|
||||
"@modelcontextprotocol/server": "^2.0.0",
|
||||
"@modelcontextprotocol/node": "^2.1.0",
|
||||
"@modelcontextprotocol/server": "^2.1.0",
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.15.1",
|
||||
"express": "^5.2.1",
|
||||
"ioredis": "^6.0.0",
|
||||
"js-yaml": "^5.2.3",
|
||||
"js-yaml": "^5.4.2",
|
||||
"nrepl-client": "^0.3.0",
|
||||
"pino": "^10.3.1",
|
||||
"pino-loki": "^3.0.0",
|
||||
"pino-pretty": "^13.1.3",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"sharp": "^0.35.3",
|
||||
"ws": "^8.21.1",
|
||||
"zod": "^4.4.3"
|
||||
"sharp": "^0.35.5",
|
||||
"ws": "^8.22.0",
|
||||
"zod": "^4.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@modelcontextprotocol/client": "^2.0.0",
|
||||
"@modelcontextprotocol/client": "^2.1.0",
|
||||
"@penpot/mcp-common": "workspace:../common",
|
||||
"@types/express": "^5.0.6",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^26.1.2",
|
||||
"@types/node": "^26.6.3",
|
||||
"@types/ws": "^8.18.1",
|
||||
"cross-env": "^10.1.0",
|
||||
"esbuild": "^0.28.1",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsx": "^4.23.5",
|
||||
"tsx": "^4.23.15",
|
||||
"typescript": "^6.0.3"
|
||||
},
|
||||
"ts-node": {
|
||||
|
||||
@ -32,6 +32,7 @@ async function modernRequest(method: string, params: Record<string, unknown> = {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json, text/event-stream",
|
||||
"MCP-Protocol-Version": "2026-07-28",
|
||||
"Mcp-Method": method,
|
||||
...(typeof params.name === "string" ? { "Mcp-Name": params.name } : {}),
|
||||
},
|
||||
|
||||
672
mcp/pnpm-lock.yaml
generated
672
mcp/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@
|
||||
"fmt:check": "prettier --check src/ test/",
|
||||
"clean": "rm -rf dist/"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"dependencies": {
|
||||
"express": "^5.2.1",
|
||||
"multer": "^2.2.0",
|
||||
|
||||
122
media-processor/pnpm-lock.yaml
generated
122
media-processor/pnpm-lock.yaml
generated
@ -7,153 +7,153 @@ importers:
|
||||
configDependencies: {}
|
||||
packageManagerDependencies:
|
||||
pnpm:
|
||||
specifier: 12.5.1
|
||||
version: 12.5.1
|
||||
specifier: 12.6.0
|
||||
version: 12.6.0
|
||||
|
||||
packages:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6LGBmQuDzUmgpHSuy+haG0jrmkwFNa4EuShDZqK3cIBv4Wfb75CzjJmowkzr+iJg40vnBKMQ62t4Ko6mwsId7A==}
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-kviIHft9h02q+7N2In7tSL9T/HRUSGwYmU74YPtsWU5ee7vgqPyC0JT6RRX6miW+NxX1CvHgQxg69qq1qTLJYQ==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
resolution: {integrity: sha512-091oCltP3Rx89yxL1Wh5rXkUXEyFzyxIzSHKRFDyDFlQkb8Ox8FaDcm+M8PNkMyqnLA+qeGOLzY7Rjj9izl1Ww==}
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
resolution: {integrity: sha512-CT8aJKLq2mtZFE71pr4E5Z2xHL8uGnRGr+NclDqsXlVF4SVcQ2QAs14mWi0C8gjT4hbmi+Q0lJRRIkMAWfjjng==}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-r1vEMQPVjRexZMyL2HonxJoo3+nuB/+G+tg+f2PK6faRdXX1TDwevKXOxJAfqlPInTy6W/pm912+s+m0NcR4BQ==}
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-rafpVkjzugKBMxSvGQd5wK1x5eOTkD/+lcJIFHeQhvd+BJ8kDisOOvwhQDrpGd4vd2Fx+hhW0P2Ptt638OlhFg==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
resolution: {integrity: sha512-YHwI1g2B+Y2cAEylOR31r781GWijdJL7Gy7TEn/ZpZ5v/Cuwp5/Pz0EFCgo0M2MKLafAbL/laUMGvOpAdnerAw==}
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
resolution: {integrity: sha512-72Jpuv1m24gI8zUNcaylYpBWEhBzz1VPhnDIU2GYM2eRP+KsOqVLwV78i+JrihI39zY2NNXmaN4eAKX1inpaDQ==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
resolution: {integrity: sha512-sFUMHiYFs6q5syFwgaVppzhQSmqnXoJIz/YwTXIOXTDE76ndIpTRpDGAnBCBKjsaEBnqjJA/2l6hpJcNDNoMiA==}
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
resolution: {integrity: sha512-LON4QgNy1w/XF4uySZIyC/5hEB0oGdelXsY9tSKqstER+2j2X2oHz67skD11RRd/HWFRtMr64shQZ4I9ZoZ0zg==}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-zupuxYZBuBEGjUz805/4/Asq01UNziFADANt8yp+LdUjU9bbMa3xY78Bx1PsGDqBy7aiad4sdUMK8ZxH4n4gmQ==}
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-BdDpX+DeaMUc5x6WNcE6FkmFy36NwrBbBvwsZU737Zt3u1fTY+iKFPchjEQNCM4rT6q6xvF2oN3ZwExGsJCkxQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-6hbMWW2/eQo1b5wvQPe/ndLHVTH88Rav6N+ffD4/h6IuFMjWCgasFYYsFv0GrvpqREAx3SwmZSvli+0NFXqbxA==}
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-8h2sNoIhHDpHDYqZZCh9PXr6krqW10btb0GHVGuw710muDHlFAHMtUG2ogmaHge6zJG1xgY4Y7mwX5g/LWvrYg==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
resolution: {integrity: sha512-Gg3maDzaE/ZFMV9HIx/BwMN0Y6QbEs13URfxmiYHtKjjLAs5wEQZRMUP87YNLYO7cNaEfbM8GRbS9vPosyD9Gw==}
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
resolution: {integrity: sha512-ld6xgcEhFCFrsVsJhbmdmR714PnsEspO/Ij8w0/D7OSiz2hYGu3fZd5tKRxOI5m6H6Gl0/RRFAPncTHbsgXVjQ==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
resolution: {integrity: sha512-6fgWxXYMBMsWQ8DAiRevscX4QZQjwh+FsyCj8ZOk8pMXvqeq84MqBLCmS6KckvnbdqJ+HlSVQ7fs/kd0ldwfhA==}
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
resolution: {integrity: sha512-HIbImydoC3J8NFt+8MXfhTCf5rO6NjCMyinSAHac0VmV8uCHw+kbQkyAzxV84rzz9ZOzmBOnj0b1N461UIYGsw==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
resolution: {integrity: sha512-nzMZruRvxDhEfYUhzu+7EmM39+82Dgagc/6hPFPqGqzXNGcIG0anuxbUxfeNtI64SHt91KuuYUmCB/inlM+Pag==}
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
resolution: {integrity: sha512-DjSqT7+BZ/lWcDHwNMuzsRVfyxUimh+D54Xw4tSWbdVVQhtWtNMUyI93LVnwCmsoEpar2gC3SFeAgywx37svKQ==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
resolution: {integrity: sha512-kHCbegdTNHpzmPtUD4S5fqkVkqgdQR47spF9p2VPP3dIIkZl6Ytk8w0vhlAsAGgge8FmucfwX+vvPKgm0NtOCQ==}
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
resolution: {integrity: sha512-31lKeGPmRE6xfV6I3VjaEGVFRei14pl/zgoFDK4w+UkbJqOuNl2Ht3O1GuqNIg3Gl14qTEb4kZRAYFHXifDx9A==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
resolution: {integrity: sha512-3PkUBYo5z4dgtlnTNIFj7QGpcDUAuqXz9WGVigPDCeccEnhGiRkWmA5102TmYJHtwJP3LfmE+ZF9PGeWhn8p9Q==}
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
resolution: {integrity: sha512-qFWBneHJAJ73W4whtbaFOL1M/7DBC6ILHXuxc7ZPtEhfPuT1zeZiGrmKHoMAfJA+mcm6xhOFljqVTUS+00Jabw==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
resolution: {integrity: sha512-49NvjZIXHly56/PLoEDD7VphbO4N8dwMXoApElDFCpVGDNGeKlwlib1tXtnpTF6i2/XIsAj7GgatHB5KHXgBnA==}
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
resolution: {integrity: sha512-OhfefXEEykZlslSUhR8PPRe6MVPV3Oink/dVfIecE5velpc7j80cZYsHlaDrtRDcm3TPwQHkaRW1SJ1efX9oFg==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
resolution: {integrity: sha512-ePUmQFPAPJFNMwg1lelDx2PdjHqYRiF0yfg5e6qeDbPNOu97QNo557Ru/SxmCrmt8ydQWNuZXWpdEp019md5vw==}
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
resolution: {integrity: sha512-L2tuyrD2+Imgxs3VK/ST/2L3xD6vDP0ktJQxM0TaGw7TbAQEMq+RMc8iK6Ew7Id579uzjJe8jSfJID2ZGsOHCA==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
pnpm@12.5.1:
|
||||
resolution: {integrity: sha512-4/MFvHhKK8ifWtO2E4iJRw+ujSr182thIW7JHCw9ZAiXdfneOKrDMQROpA8kXLDVZmOS399lgk4ZB+9qLGLeXw==}
|
||||
pnpm@12.6.0:
|
||||
resolution: {integrity: sha512-PvaPlRyxEawgS0paFvCy3fDaVqluBBPoHYVdnwtV75JnFHCQKOHNAMQFwsX7e56OxNxGd3yAXQNzwvL/AP0g7A==}
|
||||
engines: {node: '>=18.*'}
|
||||
hasBin: true
|
||||
|
||||
snapshots:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.5.1':
|
||||
'@pnpm/exe.android-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.android-x64@12.5.1':
|
||||
'@pnpm/exe.android-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.5.1':
|
||||
'@pnpm/exe.darwin-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.5.1':
|
||||
'@pnpm/exe.darwin-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.5.1':
|
||||
'@pnpm/exe.freebsd-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-arm64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.5.1':
|
||||
'@pnpm/exe.linux-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.5.1':
|
||||
'@pnpm/exe.linux-ppc64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.5.1':
|
||||
'@pnpm/exe.linux-riscv64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.5.1':
|
||||
'@pnpm/exe.linux-s390x@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.5.1':
|
||||
'@pnpm/exe.linux-x64-musl@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64@12.5.1':
|
||||
'@pnpm/exe.linux-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.5.1':
|
||||
'@pnpm/exe.win32-arm64@12.6.0':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-x64@12.5.1':
|
||||
'@pnpm/exe.win32-x64@12.6.0':
|
||||
optional: true
|
||||
|
||||
pnpm@12.5.1:
|
||||
pnpm@12.6.0:
|
||||
optionalDependencies:
|
||||
'@pnpm/exe.android-arm64': 12.5.1
|
||||
'@pnpm/exe.android-x64': 12.5.1
|
||||
'@pnpm/exe.darwin-arm64': 12.5.1
|
||||
'@pnpm/exe.darwin-x64': 12.5.1
|
||||
'@pnpm/exe.freebsd-x64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64': 12.5.1
|
||||
'@pnpm/exe.linux-arm64-musl': 12.5.1
|
||||
'@pnpm/exe.linux-ppc64': 12.5.1
|
||||
'@pnpm/exe.linux-riscv64': 12.5.1
|
||||
'@pnpm/exe.linux-s390x': 12.5.1
|
||||
'@pnpm/exe.linux-x64': 12.5.1
|
||||
'@pnpm/exe.linux-x64-musl': 12.5.1
|
||||
'@pnpm/exe.win32-arm64': 12.5.1
|
||||
'@pnpm/exe.win32-x64': 12.5.1
|
||||
'@pnpm/exe.android-arm64': 12.6.0
|
||||
'@pnpm/exe.android-x64': 12.6.0
|
||||
'@pnpm/exe.darwin-arm64': 12.6.0
|
||||
'@pnpm/exe.darwin-x64': 12.6.0
|
||||
'@pnpm/exe.freebsd-x64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64': 12.6.0
|
||||
'@pnpm/exe.linux-arm64-musl': 12.6.0
|
||||
'@pnpm/exe.linux-ppc64': 12.6.0
|
||||
'@pnpm/exe.linux-riscv64': 12.6.0
|
||||
'@pnpm/exe.linux-s390x': 12.6.0
|
||||
'@pnpm/exe.linux-x64': 12.6.0
|
||||
'@pnpm/exe.linux-x64-musl': 12.6.0
|
||||
'@pnpm/exe.win32-arm64': 12.6.0
|
||||
'@pnpm/exe.win32-x64': 12.6.0
|
||||
|
||||
---
|
||||
lockfileVersion: '9.0'
|
||||
|
||||
@ -2,13 +2,6 @@
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# package.json pins pnpm via "packageManager", so the first build on a fresh
|
||||
# devenv makes corepack fetch it. Without this it asks for confirmation on
|
||||
# stdin, which hangs a CI build (and aborts an interactive one); `corepack
|
||||
# install` then fetches the pinned version explicitly.
|
||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
corepack install
|
||||
|
||||
pnpm run build
|
||||
|
||||
# Assemble the release bundle under target/, the way the other modules do.
|
||||
@ -23,8 +16,7 @@ cp package.json pnpm-lock.yaml pnpm-workspace.yaml target/
|
||||
cat <<SETUP | tee target/setup > /dev/null
|
||||
#!/usr/bin/env bash
|
||||
set -e;
|
||||
corepack enable;
|
||||
corepack install;
|
||||
command -v pnpm >/dev/null || { echo "error: pnpm not found in PATH" >&2; exit 1; };
|
||||
pnpm install -P;
|
||||
SETUP
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"license": "MPL-2.0",
|
||||
"author": "Kaleidos INC Sucursal en España SL",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f",
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/penpot/penpot"
|
||||
|
||||
@ -13,5 +13,5 @@
|
||||
"lint": "eslint .",
|
||||
"test": "vitest"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
@ -27,5 +27,5 @@
|
||||
"vite": "^8.2.2",
|
||||
"vite-live-preview": "^0.4.0"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
@ -13,5 +13,5 @@
|
||||
"lint": "eslint .",
|
||||
"test": "vitest"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
@ -12,5 +12,5 @@
|
||||
"lint": "eslint .",
|
||||
"test": "vitest"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
@ -7,5 +7,5 @@
|
||||
"test": "vitest",
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
@ -11,5 +11,5 @@
|
||||
"serve": "vite preview",
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
@ -13,5 +13,5 @@
|
||||
"lint": "eslint .",
|
||||
"test": "vitest"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
@ -13,5 +13,5 @@
|
||||
"lint": "eslint .",
|
||||
"test": "vitest"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
@ -20,5 +20,5 @@
|
||||
"devDependencies": {
|
||||
"playwright": "^1.62.1"
|
||||
},
|
||||
"packageManager": "pnpm@12.5.1+sha512.e3f305bc784a2bc89f5ad3b6138889470fae8d2af5f36b61216ec91c2c3d64089775f9de38aac331044ea40f245cb0d5666392dfdf65824e1907ef6a2c62de5f"
|
||||
"packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec"
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user