@hazem3500/palette 0.9.110 → 0.9.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NODE.md +90 -0
- package/README.md +25 -0
- package/dist/{account-tokens-LBRVZAEJ.js → account-tokens-YO6MIZFF.js} +1 -1
- package/dist/chunk-CF4GJN3B.js +1 -0
- package/dist/index.js +1 -1
- package/dist/node.mjs +382 -298
- package/dist/postgres/008_webhook_outbox.sql +14 -0
- package/dist/public-env.d.ts +4 -0
- package/dist/react.js +1 -1
- package/dist/server.d.ts +1 -0
- package/dist/server.js +366 -289
- package/dist/setup.js +1 -1
- package/dist/{snapshot-3PSQKXUV.js → snapshot-YYM5GW6I.js} +1 -1
- package/dist/snapshot.d.ts +3 -2
- package/package.json +1 -1
- package/server/index.ts +75 -79
- package/server/migrations/0022_webhook_outbox.sql +14 -0
- package/server/node-webhooks.ts +5 -0
- package/server/proxy-auth.ts +2 -0
- package/server/public-env.ts +4 -0
- package/server/setup-client.txt +55 -55
- package/server/tokens.ts +14 -0
- package/server/webhooks.ts +98 -13
- package/dist/chunk-U55ASP2Y.js +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
CREATE TABLE webhook_outbox (
|
|
2
|
+
id TEXT PRIMARY KEY,
|
|
3
|
+
project TEXT NOT NULL,
|
|
4
|
+
body TEXT NOT NULL,
|
|
5
|
+
url TEXT NOT NULL,
|
|
6
|
+
secret TEXT NOT NULL,
|
|
7
|
+
attempts INTEGER NOT NULL DEFAULT 0,
|
|
8
|
+
next_attempt BIGINT NOT NULL,
|
|
9
|
+
claim_until BIGINT NOT NULL DEFAULT 0,
|
|
10
|
+
claim_token TEXT NOT NULL DEFAULT '',
|
|
11
|
+
state TEXT NOT NULL DEFAULT 'pending'
|
|
12
|
+
);
|
|
13
|
+
CREATE INDEX webhook_outbox_due ON webhook_outbox(state,next_attempt,claim_until);
|
|
14
|
+
ALTER TABLE threads ADD COLUMN snapshot_status TEXT;
|
package/dist/public-env.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export interface ServerEnv {
|
|
|
15
15
|
PALETTE_PAUSED?: string;
|
|
16
16
|
/** Trusted identity proxy that signs reviewers in, e.g. "gcp-iap". Off unless set. */
|
|
17
17
|
PALETTE_PROXY_AUTH?: string;
|
|
18
|
+
/** Explicitly allow bounded, project-scoped access tokens behind a proxy. */
|
|
19
|
+
PALETTE_PROXY_ACCESS_TOKENS?: string;
|
|
18
20
|
/** The audience the proxy signs its assertions for. */
|
|
19
21
|
PALETTE_PROXY_AUDIENCE?: string;
|
|
20
22
|
/** Older name: setting it alone turns on "gcp-iap" with this audience. */
|
|
@@ -46,6 +48,8 @@ export interface ServerEnv {
|
|
|
46
48
|
KOMO_PAUSED?: string;
|
|
47
49
|
/** @deprecated Read when PALETTE_PROXY_AUTH is unset. */
|
|
48
50
|
KOMO_PROXY_AUTH?: string;
|
|
51
|
+
/** @deprecated Read when PALETTE_PROXY_ACCESS_TOKENS is unset. */
|
|
52
|
+
KOMO_PROXY_ACCESS_TOKENS?: string;
|
|
49
53
|
/** @deprecated Read when PALETTE_PROXY_AUDIENCE is unset. */
|
|
50
54
|
KOMO_PROXY_AUDIENCE?: string;
|
|
51
55
|
/** @deprecated Read when PALETTE_IAP_AUDIENCE is unset. */
|
package/dist/react.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{B as e,d as n,e as t,h as r}from"./chunk-FGZXQUAD.js";import{b as s}from"./chunk-
|
|
1
|
+
"use client";import{B as e,d as n,e as t,h as r}from"./chunk-FGZXQUAD.js";import{b as s}from"./chunk-CF4GJN3B.js";import"./chunk-KLPQTFVH.js";import"./chunk-RBHY7UDS.js";import"./chunk-LMXFSXO6.js";import"./chunk-DU7H4TEX.js";import"./chunk-5HZI7HRR.js";import"./chunk-2BS2OWWH.js";import"./chunk-XOMOONGK.js";import"./chunk-J47R52WX.js";import"./chunk-VX6XCU4E.js";import"./chunk-4HBBEVFK.js";import{useEffect as o,useRef as i}from"react";function c(e){let n=i(null);o(()=>{if(n.current&&function(e,n){return[...new Set([...Object.keys(e),...Object.keys(n)])].every(t=>{if("shortcuts"===t||"features"===t||"frame"===t||"pins"===t){let r=e[t]??{},s=n[t]??{};return Object.keys({...r,...s}).every(e=>Object.is(r[e],s[e]))}if("design"===t){let t=e.design,r=n.design;if(!t||!r)return t===r;let s=t.themes??[],o=r.themes??[];return t.tokens===r.tokens&&t.components===r.components&&s.length===o.length&&s.every((e,n)=>e===o[n])}if("persistentRegions"===t)return e[t]?.length===n[t]?.length&&(e[t]??[]).every((e,r)=>e===n[t]?.[r]);if("onboarding"!==t)return Object.is(e[t],n[t]);let r=e.onboarding,s=n.onboarding;return r&&s?Object.keys({...r,...s}).every(e=>"sites"===e?r.sites?.length===s.sites?.length&&(r.sites??[]).every((e,n)=>e===s.sites?.[n]):Object.is(r[e],s[e])):r===s})}(n.current.config,e)||(n.current?.controller.destroy(),n.current=null,!1===e.enabled))return;let t={...e,...e.persistentRegions?{persistentRegions:[...e.persistentRegions]}:{},...e.onboarding?{onboarding:{...e.onboarding,...e.onboarding.sites?{sites:[...e.onboarding.sites]}:{}}}:{}};n.current={config:t,controller:s(t)}}),o(()=>()=>{n.current?.controller.destroy(),n.current=null},[])}function u(e){let r=i(null),s=i(null);return s.current||(s.current=e=>{r.current=e}),o(()=>{if(!0===e.enabled&&r.current)return n(r.current,e.component,e.props,e.onChange)},[e.enabled,e.component]),o(()=>{!0===e.enabled&&t(r.current,e.component,e.props,e.onChange)},[e.enabled,e.component,e.props,e.onChange]),{ref:s.current,"data-palette-inspectable":e.component.id,"data-komo-inspectable":e.component.id}}function a(e){o(()=>{if(!0!==e.enabled)return;let n=e.root??document.documentElement;return r(n,e.tokens)},[e.root,e.tokens,e.enabled])}var l=c,p=u,m=a;export{e as cssVariableTokens,l as useKomo,m as useKomoDesignTokens,p as useKomoInspectable,c as usePalette,a as usePaletteDesignTokens,u as usePaletteInspectable};
|
package/dist/server.d.ts
CHANGED