OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
ralph(M11-009): DELETE validation/constants/common/json; check:deps wired into check and CI; the dashboard builds and serves /login
ralph448fa219a68b
diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.ymlindex ebe16132f..837f52d6b 100644--- a/.github/workflows/docker-build.yml+++ b/.github/workflows/docker-build.yml@@ -121,6 +121,15 @@ jobs:CLICKHOUSE_URL: http://localhost:8123/openpanelREDIS_URL: redis://localhost:6379+ # ADR-008: dependency-cruiser is the second layer keeping the dissolved+ # validation/constants/common/json packages from growing back (M11-009).+ # Run standalone, not via `pnpm run check`, because `check` also runs+ # `ultracite check` over a repo that has never been bulk-formatted (see+ # .claude/CLAUDE.md) and is not green today for reasons unrelated to+ # dependency boundaries.+ - name: Check dependency boundaries+ run: pnpm run check:deps+# - name: Run Biome# run: pnpm lintdiff --git a/apps/api/Dockerfile b/apps/api/Dockerfileindex 9c717a83c..3c526b209 100644--- a/apps/api/Dockerfile+++ b/apps/api/Dockerfile@@ -64,13 +64,9 @@ COPY apps/api/package.json ./apps/api/# graph changes.COPY packages/core/package.json packages/core/COPY packages/db/package.json packages/db/-COPY packages/json/package.json packages/json/COPY packages/email/package.json packages/email/COPY packages/redis/package.json packages/redis/-COPY packages/common/package.json packages/common/COPY packages/payments/package.json packages/payments/-COPY packages/constants/package.json packages/constants/-COPY packages/validation/package.json packages/validation/COPY patches ./patches# BUILD — full install (codegen needs devDependencies: core's `tar` fordiff --git a/apps/api/package.json b/apps/api/package.jsonindex b7832462b..91fff36b8 100644--- a/apps/api/package.json+++ b/apps/api/package.json@@ -16,7 +16,6 @@"typecheck": "tsc --noEmit"},"dependencies": {- "@openpanel/common": "workspace:*","@openpanel/core": "workspace:*","@openpanel/db": "workspace:*","@openpanel/redis": "workspace:*",diff --git a/apps/api/scripts/mock.ts b/apps/api/scripts/mock.tsindex 3f6c8db32..457e41f30 100644--- a/apps/api/scripts/mock.ts+++ b/apps/api/scripts/mock.ts@@ -1,7 +1,6 @@import fs from 'node:fs';import * as faker from '@faker-js/faker';-import { generateId } from '@openpanel/common';-import { hashPassword } from '@openpanel/core';+import { generateId, hashPassword } from '@openpanel/core';import { ClientType, db } from '@openpanel/db';import { getRedisCache } from '@openpanel/redis';import { v4 as uuidv4 } from 'uuid';diff --git a/apps/public/package.json b/apps/public/package.jsonindex d23a0f33f..6ecf12e58 100644--- a/apps/public/package.json+++ b/apps/public/package.json@@ -18,7 +18,6 @@"@nivo/funnel": "^0.99.0","@number-flow/react": "0.5.10","@opennextjs/cloudflare": "^1.17.1",- "@openpanel/common": "workspace:*","@openpanel/nextjs": "^1.2.0","@openpanel/payments": "workspace:^","@openpanel/sdk-info": "workspace:^",diff --git a/apps/start/Dockerfile b/apps/start/Dockerfileindex c1357a98b..4265bad36 100644--- a/apps/start/Dockerfile+++ b/apps/start/Dockerfile@@ -26,11 +26,7 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./# AppsCOPY apps/start/package.json ./apps/start/# Packages - Only copy what start app needs-COPY packages/json/package.json packages/json/-COPY packages/common/package.json packages/common/COPY packages/payments/package.json packages/payments/-COPY packages/constants/package.json packages/constants/-COPY packages/validation/package.json packages/validation/COPY packages/sdks/_info/package.json packages/sdks/_info/COPY patches ./patches# Copy tracking script to self-hosting dashboard@@ -81,11 +77,7 @@ COPY --from=build /app/pnpm-workspace.yaml ./COPY --from=build /app/apps/start/package.json ./apps/start/COPY --from=build /app/packages/db/package.json ./packages/db/COPY --from=build /app/packages/auth/package.json ./packages/auth/-COPY --from=build /app/packages/json/package.json ./packages/json/-COPY --from=build /app/packages/common/package.json ./packages/common/COPY --from=build /app/packages/payments/package.json ./packages/payments/-COPY --from=build /app/packages/constants/package.json ./packages/constants/-COPY --from=build /app/packages/validation/package.json ./packages/validation/COPY --from=build /app/packages/sdks/_info/package.json ./packages/sdks/_info/COPY --from=build /app/patches ./patches@@ -138,11 +130,7 @@ RUN set -eux; \# Copy necessary packagesCOPY --from=build /app/packages/db ./packages/dbCOPY --from=build /app/packages/auth ./packages/auth-COPY --from=build /app/packages/json ./packages/json-COPY --from=build /app/packages/common ./packages/commonCOPY --from=build /app/packages/payments ./packages/payments-COPY --from=build /app/packages/constants ./packages/constants-COPY --from=build /app/packages/validation ./packages/validationCOPY --from=build /app/packages/sdks/_info ./packages/sdks/_infoCOPY --from=build /app/tooling/typescript ./tooling/typescriptdiff --git a/docs/OPS_P11_DASHBOARD_CHECK.md b/docs/OPS_P11_DASHBOARD_CHECK.mdnew file mode 100644index 000000000..365fe697e--- /dev/null+++ b/docs/OPS_P11_DASHBOARD_CHECK.md@@ -0,0 +1,85 @@+# Dashboard human check-list — P11 dissolution (M11-009)++> This box has no browser. `curl http://127.0.0.1:4173/login` proves the SPA+> shell boots and serves HTML (the automated boot gate); it cannot prove a+> chart renders or a form validates. That half is this checklist — run it by+> hand against `pnpm run build && pnpm run preview` (or `pnpm dev`) in a real+> browser after any change that touches `@openpanel/core`'s+> `*.constants.ts` files or `apps/start/src/utils/{math,slug,super-json,+> union-omit}.ts` — the P11 dissolution's actual runtime surface.++A pass is: no red error overlay, no blank panel where a chart should be, no+console error mentioning `validation`, `constants`, `common` or `json`+(the four deleted packages), and every listed control accepts valid input and+rejects invalid input with a visible message.++## 1. Sign-in (`/login`)++- [ ] Page renders the email/password form, no console errors.+- [ ] Submitting an empty form shows a validation message under each empty+ field (uses `zSignInEmail` from `auth.constants.ts`) — nothing is sent.+- [ ] Submitting a malformed email shows a validation message.+- [ ] Signing in with a valid seeded user redirects to `/<organizationId>`.++## 2. Organization overview (`/:organizationId`)++- [ ] The project list renders.+- [ ] Any per-project metric tiles render numbers, not `NaN` or blank+ (exercises `round`/`average`/`sum` from `apps/start/src/utils/math.ts`).++## 3. Project overview (`/:organizationId/:projectId`)++- [ ] The overview line chart renders a line, with an x-axis labelled by the+ selected interval (exercises `intervals`/`timeWindows` from+ `report.constants.ts`).+- [ ] Switching the time-window picker (e.g. 24h → 7d → 30d) redraws the+ chart and updates the interval shown on the x-axis.+- [ ] The weekly-trends / previous-period comparison tile shows a %+ change, not `NaN%` (exercises `getPreviousMetric`).++## 4. Report builder (`/:organizationId/:projectId/insights` → new report)++- [ ] Adding an event to the report opens the event picker and lists events.+- [ ] Adding a filter to an event opens the filter builder; the operator+ dropdown is populated (exercises `operators`/`getOperatorsForType`+ from `report.constants.ts`) and choosing an operator that needs a+ value (e.g. "is one of") requires one before the filter can be saved.+- [ ] Switching chart type (line / bar / pie / funnel) redraws without a+ crash for at least: line, bar, funnel.+- [ ] Changing the breakdown dimension redraws the chart with a new legend.+- [ ] Saving the report and reloading the page preserves the chart config.++## 5. Cohort builder (`/:organizationId/:projectId/cohorts` → new cohort)++- [ ] The event/property criteria builder renders and accepts at least one+ criterion (exercises `cohort.constants.ts`).+- [ ] Saving with zero criteria is rejected with a visible message.++## 6. Project settings → filters (`/:organizationId/:projectId/settings`)++- [ ] The IP/profile-id filter forms accept a value and show it in the list+ after saving (exercises `project.constants.ts`).++## 7. Notification rule (`/:organizationId/:projectId/notifications` → new rule)++- [ ] The rule-condition form renders and a rule can be saved with at least+ one condition (exercises `notification.constants.ts`).++## 8. Onboarding (`/onboarding` with a fresh org, or `/steps/onboarding/:projectId`)++- [ ] The project-creation step's type dropdown lists the project types+ (exercises `ProjectTypeNames` from `project.constants.ts`).++## What a fail looks like++- A blank panel where a chart should be, or a chart that never stops+ showing its loading state.+- A red React error overlay (dev) or a blank white page (prod build).+- A dropdown with zero options where the sections above say it should be+ populated.+- A form that submits despite an empty required field, or one that never+ accepts valid input.+- Any browser console error whose message names `@openpanel/validation`,+ `@openpanel/constants`, `@openpanel/common` or `@openpanel/json` — those+ four packages are deleted; such an error means a stray reference survived+ the codemod.diff --git a/package.json b/package.jsonindex 34cd1e7dc..c7352f4c3 100644--- a/package.json+++ b/package.json@@ -24,7 +24,7 @@"update-simple-git-hooks": "npx simple-git-hooks","check:workspace": "pnpm dlx sherif@latest","check:deps": "NODE_PATH=$PWD/node_modules pnpm dlx --package [email protected] depcruise --config .dependency-cruiser.cjs --output-type err apps/start packages",- "check": "ultracite check",+ "check": "ultracite check && pnpm run check:deps","fix": "ultracite fix"},"simple-git-hooks": {diff --git a/packages/common/index.ts b/packages/common/index.tsdeleted file mode 100644index da14fc507..000000000--- a/packages/common/index.ts+++ /dev/null@@ -1,14 +0,0 @@-// P11 shim (ADR-008). Definitions live in @openpanel/core; ./src/* are-// re-exports only. `names`, `timezones` and `try-catch` are gone — the-// dissolution map records every symbol they held as DELETE (no importer-// anywhere). Deleted by M11-009.-export * from './src/date';-export * from './src/get-client-ip';-export * from './src/get-previous-metric';-export * from './src/group-by-labels';-export * from './src/id';-export * from './src/math';-export * from './src/object';-export * from './src/slug';-export * from './src/string';-export * from './src/url';diff --git a/packages/common/package.json b/packages/common/package.jsondeleted file mode 100644index 5501526e7..000000000--- a/packages/common/package.json+++ /dev/null@@ -1,33 +0,0 @@-{- "name": "@openpanel/common",- "version": "0.0.1",- "type": "module",- "main": "index.ts",- "exports": {- ".": "./index.ts"- },- "scripts": {- "test": "vitest",- "typecheck": "tsc --noEmit"- },- "dependencies": {- "@openpanel/constants": "workspace:*",- "date-fns": "^3.3.1",- "luxon": "^3.7.2",- "mathjs": "^12.3.2",- "nanoid": "^5.1.6",- "ramda": "^0.29.1",- "slugify": "^1.6.6",- "superjson": "^1.13.3",- "unique-names-generator": "^4.7.1"- },- "devDependencies": {- "@openpanel/tsconfig": "workspace:*",- "@openpanel/validation": "workspace:*",- "@types/luxon": "^3.7.1",- "@types/node": "catalog:",- "@types/ramda": "^0.29.6",- "prisma": "^5.1.1",- "typescript": "catalog:"- }-}diff --git a/packages/common/src/date.ts b/packages/common/src/date.tsdeleted file mode 100644index cae059474..000000000--- a/packages/common/src/date.ts+++ /dev/null@@ -1,5 +0,0 @@-// P11 shim (ADR-008/ADR-007): definitions moved to packages/core/src/shared.-// Reached by relative path, not through @openpanel/core, so that bundling-// this package (packages/sdks/express sets noExternal) pulls the one leaf file-// and not core barrel. Deleted by M11-009.-export { DateTime, getTime } from '../../core/src/shared/date';diff --git a/packages/common/src/get-client-ip.ts b/packages/common/src/get-client-ip.tsdeleted file mode 100644index 7a07646f4..000000000--- a/packages/common/src/get-client-ip.ts+++ /dev/null@@ -1,8 +0,0 @@-// P11 shim (ADR-008/ADR-007): definitions moved to packages/core/src/shared.-// Reached by relative path, not through @openpanel/core, so that bundling-// this package (packages/sdks/express sets noExternal) pulls the one leaf file-// and not core barrel. Deleted by M11-009.-export {- DEFAULT_IP_HEADER_ORDER,- getClientIpFromHeaders,-} from '../../core/src/shared/get-client-ip';diff --git a/packages/common/src/get-previous-metric.ts b/packages/common/src/get-previous-metric.tsdeleted file mode 100644index b0bfaf7b6..000000000--- a/packages/common/src/get-previous-metric.ts+++ /dev/null@@ -1,5 +0,0 @@-// P11 shim (ADR-008/ADR-007): definitions moved to packages/core/src/shared.-// Reached by relative path, not through @openpanel/core, so that bundling-// this package (packages/sdks/express sets noExternal) pulls the one leaf file-// and not core barrel. Deleted by M11-009.-export { getPreviousMetric } from '../../core/src/shared/math';diff --git a/packages/common/src/group-by-labels.ts b/packages/common/src/group-by-labels.tsdeleted file mode 100644index 4d668a66a..000000000--- a/packages/common/src/group-by-labels.ts+++ /dev/null@@ -1,6 +0,0 @@-// P11 shim (ADR-008/ADR-007): definitions moved to packages/core/src/shared.-// Reached by relative path, not through @openpanel/core, so that bundling-// this package (packages/sdks/express sets noExternal) pulls the one leaf file-// and not core barrel. Deleted by M11-009.-export type { ISerieDataItem } from '../../core/src/shared/group-by-labels';-export { groupByLabels } from '../../core/src/shared/group-by-labels';diff --git a/packages/common/src/id.ts b/packages/common/src/id.tsdeleted file mode 100644index 5fc585d96..000000000--- a/packages/common/src/id.ts+++ /dev/null@@ -1,5 +0,0 @@-// P11 shim (ADR-008/ADR-007): definitions moved to packages/core/src/shared.-// Reached by relative path, not through @openpanel/core, so that bundling-// this package (packages/sdks/express sets noExternal) pulls the one leaf file-// and not core barrel. Deleted by M11-009.-export { generateId, shortId } from '../../core/src/shared/id';diff --git a/packages/common/src/math.ts b/packages/common/src/math.tsdeleted file mode 100644index 2701cc051..000000000--- a/packages/common/src/math.ts+++ /dev/null@@ -1,13 +0,0 @@-// P11 shim (ADR-008/ADR-007): definitions moved to packages/core/src/shared.-// Reached by relative path, not through @openpanel/core, so that bundling-// this package (packages/sdks/express sets noExternal) pulls the one leaf file-// and not core barrel. Deleted by M11-009.-// `isFloat` is gone: the map records it as DELETE, no importer anywhere.-export {- average,- ifNaN,- max,- min,- round,- sum,-} from '../../core/src/shared/math';diff --git a/packages/common/src/object.ts b/packages/common/src/object.tsdeleted file mode 100644index 05d6b78bb..000000000--- a/packages/common/src/object.ts+++ /dev/null@@ -1,10 +0,0 @@-// P11 shim (ADR-008/ADR-007): definitions moved to packages/core/src/shared.-// Reached by relative path, not through @openpanel/core, so that bundling-// this package (packages/sdks/express sets noExternal) pulls the one leaf file-// and not core barrel. Deleted by M11-009.-export {- deepMergeObjects,- strip,- toDots,- toObject,-} from '../../core/src/shared/object';diff --git a/packages/common/src/slug.ts b/packages/common/src/slug.tsdeleted file mode 100644index 0798d5249..000000000--- a/packages/common/src/slug.ts+++ /dev/null@@ -1,5 +0,0 @@-// P11 shim (ADR-008/ADR-007): definitions moved to packages/core/src/shared.-// Reached by relative path, not through @openpanel/core, so that bundling-// this package (packages/sdks/express sets noExternal) pulls the one leaf file-// and not core barrel. Deleted by M11-009.-export { slug } from '../../core/src/shared/slug';diff --git a/packages/common/src/string.ts b/packages/common/src/string.tsdeleted file mode 100644index 121632637..000000000--- a/packages/common/src/string.ts+++ /dev/null@@ -1,8 +0,0 @@-// P11 shim (ADR-008/ADR-007): definitions moved to packages/core/src/shared.-// Reached by relative path, not through @openpanel/core, so that bundling-// this package (packages/sdks/express sets noExternal) pulls the one leaf file-// and not core barrel. Deleted by M11-009.-export {- stripLeadingAndTrailingSlashes,- stripTrailingSlash,-} from '../../core/src/shared/string';diff --git a/packages/common/src/url.ts b/packages/common/src/url.tsdeleted file mode 100644index 3a355f692..000000000--- a/packages/common/src/url.ts+++ /dev/null@@ -1,9 +0,0 @@-// P11 shim (ADR-008/ADR-007): definitions moved to packages/core/src/shared.-// Reached by relative path, not through @openpanel/core, so that bundling-// this package (packages/sdks/express sets noExternal) pulls the one leaf file-// and not core barrel. Deleted by M11-009.-export {- isSameDomain,- parsePath,- parseSearchParams,-} from '../../core/src/shared/url';diff --git a/packages/common/tsconfig.json b/packages/common/tsconfig.jsondeleted file mode 100644index 685aae657..000000000--- a/packages/common/tsconfig.json+++ /dev/null@@ -1,14 +0,0 @@-{- "extends": "@openpanel/tsconfig/base.json",- "compilerOptions": {- "baseUrl": ".",- "paths": {- "@/*": ["./src/*"],- "@/server/*": ["./src/server/*"]- },- "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",- "strictNullChecks": true- },- "include": ["."],- "exclude": ["node_modules"]-}diff --git a/packages/common/vitest.config.ts b/packages/common/vitest.config.tsdeleted file mode 100644index f87a2039f..000000000--- a/packages/common/vitest.config.ts+++ /dev/null@@ -1,3 +0,0 @@-import { getSharedVitestConfig } from '../../vitest.shared';--export default getSharedVitestConfig({ __dirname });diff --git a/packages/constants/index.ts b/packages/constants/index.tsdeleted file mode 100644index f52900566..000000000--- a/packages/constants/index.ts+++ /dev/null@@ -1,26 +0,0 @@-// Moved into @openpanel/core's ingest module (M8-002, ADR-008's module map:-// ingest owns "C" — the reserved names are enforced by the same zod refine-// that lives there). Re-exported here for existing @openpanel/constants-// importers — same shape as `ProjectTypeNames` below.--export type { EmailCategory } from '@openpanel/core/modules/email/email.constants';-// Moved into @openpanel/core's email module (M6-004, ADR-008's module map:-// email owns "C"). Re-exported here for existing @openpanel/constants-// importers (packages/trpc's email router, apps/start's unsubscribe +-// email-preferences pages) — same shape as `ProjectTypeNames`'s re-export-// since M6-002. Keys must match the template `category` in @openpanel/email.-export { emailCategories } from '@openpanel/core/modules/email/email.constants';-export { RESERVED_EVENT_NAMES } from '@openpanel/core/modules/ingest/ingest.constants';-// Moved into @openpanel/core's project module (M6-002, ADR-008's module-// map: project owns "C"). Re-exported here for existing-// @openpanel/constants importers — same shape as-// packages/validation/src/import.validation.ts since M5-004.-export { ProjectTypeNames } from '@openpanel/core/modules/project/project.constants';-// Moved into @openpanel/core's report module (M7-006, ADR-008's module map:-// report owns "C" for the chart/report/widget vocabulary — timeWindows,-// operators, chartTypes, chartColors, intervals + helpers, countries,-// NOT_SET_VALUE, alphabetIds, metrics and friends). Re-exported here for-// existing @openpanel/constants importers (apps/start's report builder, the-// chart engine, apps/api's insights controller) — same shape as-// `ProjectTypeNames`'s re-export since M6-002.-export * from '@openpanel/core/modules/report/report.constants';diff --git a/packages/constants/package.json b/packages/constants/package.jsondeleted file mode 100644index 9fe2de481..000000000--- a/packages/constants/package.json+++ /dev/null@@ -1,17 +0,0 @@-{- "name": "@openpanel/constants",- "version": "0.0.1",- "type": "module",- "main": "index.ts",- "scripts": {- "typecheck": "tsc --noEmit"- },- "dependencies": {- "@openpanel/core": "workspace:*"- },- "devDependencies": {- "@openpanel/tsconfig": "workspace:*",- "date-fns": "^3.3.1",- "typescript": "catalog:"- }-}diff --git a/packages/constants/tsconfig.json b/packages/constants/tsconfig.jsondeleted file mode 100644index a4a54fb86..000000000--- a/packages/constants/tsconfig.json+++ /dev/null@@ -1,13 +0,0 @@-{- "extends": "@openpanel/tsconfig/base.json",- "compilerOptions": {- "baseUrl": ".",- "paths": {- "@/*": ["./src/*"]- },- "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",- "strictNullChecks": true- },- "include": ["."],- "exclude": ["node_modules"]-}diff --git a/packages/json/index.ts b/packages/json/index.tsdeleted file mode 100644index 55eabbb34..000000000--- a/packages/json/index.ts+++ /dev/null@@ -1,11 +0,0 @@-// P11 shim (ADR-008/ADR-007). The definitions live in-// packages/core/src/shared/json.ts. Reached by relative path, not through-// @openpanel/core: packages/redis calls these at runtime and core depends on-// packages/redis, so the barrel would invert that edge and drag core's whole-// import graph into the redis (and published-SDK) module graph.-// Deleted by M11-009 once M11-007/M11-008 retarget the last importer.-export {- getSafeJson,- getSuperJson,- setSuperJson,-} from '../core/src/shared/json';diff --git a/packages/json/package.json b/packages/json/package.jsondeleted file mode 100644index 7986f4e7a..000000000--- a/packages/json/package.json+++ /dev/null@@ -1,18 +0,0 @@-{- "name": "@openpanel/json",- "version": "0.0.1",- "type": "module",- "main": "index.ts",- "scripts": {- "typecheck": "tsc --noEmit"- },- "dependencies": {- "superjson": "^1.13.3"- },- "devDependencies": {- "@openpanel/tsconfig": "workspace:*",- "@openpanel/validation": "workspace:*",- "@types/node": "catalog:",- "typescript": "catalog:"- }-}diff --git a/packages/json/tsconfig.json b/packages/json/tsconfig.jsondeleted file mode 100644index 685aae657..000000000--- a/packages/json/tsconfig.json+++ /dev/null@@ -1,14 +0,0 @@-{- "extends": "@openpanel/tsconfig/base.json",- "compilerOptions": {- "baseUrl": ".",- "paths": {- "@/*": ["./src/*"],- "@/server/*": ["./src/server/*"]- },- "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",- "strictNullChecks": true- },- "include": ["."],- "exclude": ["node_modules"]-}diff --git a/packages/redis/json.ts b/packages/redis/json.tsnew file mode 100644index 000000000..e2355b9df--- /dev/null+++ b/packages/redis/json.ts@@ -0,0 +1,26 @@+// Local copy of @openpanel/core's shared/json.ts (deleted with @openpanel/json+// in M11-009). packages/redis cannot import @openpanel/core at runtime —+// @openpanel/core depends on @openpanel/redis, so a runtime import here would+// invert that edge. Keep in sync with packages/core/src/shared/json.ts if the+// semantics ever change.+import superjson from 'superjson';++export function getSafeJson<T>(str: string): T | null {+ try {+ return JSON.parse(str);+ } catch {+ return null;+ }+}++export function getSuperJson<T>(str: string): T | null {+ const json = getSafeJson<T>(str);+ if (typeof json === 'object' && json !== null && 'json' in json) {+ return superjson.parse<T>(str);+ }+ return json;+}++export function setSuperJson(value: unknown): string {+ return superjson.stringify(value);+}diff --git a/packages/redis/package.json b/packages/redis/package.jsonindex aead1a876..96ab50752 100644--- a/packages/redis/package.json+++ b/packages/redis/package.json@@ -7,9 +7,9 @@"typecheck": "tsc --noEmit"},"dependencies": {- "@openpanel/json": "workspace:*","ioredis": "5.8.2",- "lru-cache": "^11.2.2"+ "lru-cache": "^11.2.2",+ "superjson": "^1.13.3"},"devDependencies": {"@openpanel/core": "workspace:*",diff --git a/packages/redis/publisher.ts b/packages/redis/publisher.tsindex 08b5d225f..4e58b5eef 100644--- a/packages/redis/publisher.ts+++ b/packages/redis/publisher.ts@@ -2,7 +2,7 @@ import { type Redis, getRedisPub, getRedisSub } from './redis';import type { IServiceEvent } from '@openpanel/core';import type { Notification, Prisma } from '@openpanel/db';-import { getSuperJson, setSuperJson } from '@openpanel/json';+import { getSuperJson, setSuperJson } from './json';export type IPublishChannels = {organization: {diff --git a/packages/redis/redis.ts b/packages/redis/redis.tsindex 9d5474ef8..af2533688 100644--- a/packages/redis/redis.ts+++ b/packages/redis/redis.ts@@ -1,4 +1,4 @@-import { getSuperJson, setSuperJson } from '@openpanel/json';+import { getSuperJson, setSuperJson } from './json';import type { RedisOptions } from 'ioredis';import { Redis } from 'ioredis';diff --git a/packages/sdks/sdk/package.json b/packages/sdks/sdk/package.jsonindex 94e213640..24efbe354 100644--- a/packages/sdks/sdk/package.json+++ b/packages/sdks/sdk/package.json@@ -13,7 +13,6 @@"dependencies": {},"devDependencies": {"@openpanel/tsconfig": "workspace:*",- "@openpanel/validation": "workspace:*","@types/node": "catalog:","tsup": "^7.2.0","typescript": "catalog:"diff --git a/packages/validation/package.json b/packages/validation/package.jsondeleted file mode 100644index 1fc089603..000000000--- a/packages/validation/package.json+++ /dev/null@@ -1,20 +0,0 @@-{- "name": "@openpanel/validation",- "version": "0.0.1",- "type": "module",- "main": "src/index.ts",- "scripts": {- "typecheck": "tsc --noEmit"- },- "dependencies": {- "@openpanel/constants": "workspace:*",- "@openpanel/core": "workspace:*",- "zod": "catalog:"- },- "devDependencies": {- "@openpanel/tsconfig": "workspace:*",- "@types/node": "catalog:",- "prisma": "^5.1.1",- "typescript": "catalog:"- }-}diff --git a/packages/validation/src/index.ts b/packages/validation/src/index.tsdeleted file mode 100644index 0c020bfad..000000000--- a/packages/validation/src/index.ts+++ /dev/null@@ -1,20 +0,0 @@-// P11 shim (ADR-008). Every symbol this package ever exported is now defined-// in @openpanel/core; this file is re-exports only and is deleted by M11-009-// once M11-007/M11-008 have retargeted the last external importer. The-// per-module targets are tooling/codemods/p11-map.json.-export * from '@openpanel/core/modules/assistant/assistant.constants';-export * from '@openpanel/core/modules/auth/auth.constants';-export * from '@openpanel/core/modules/cohort/cohort.constants';-export * from '@openpanel/core/modules/group/group.constants';-export * from '@openpanel/core/modules/import/import.constants';-export * from '@openpanel/core/modules/ingest/ingest.constants';-export * from '@openpanel/core/modules/insight/insight.constants';-export * from '@openpanel/core/modules/integration/integration.constants';-export * from '@openpanel/core/modules/notification/notification.constants';-export * from '@openpanel/core/modules/onboarding/onboarding.constants';-export * from '@openpanel/core/modules/organization/organization.constants';-export * from '@openpanel/core/modules/project/project.constants';-export * from '@openpanel/core/modules/reference/reference.constants';-export * from '@openpanel/core/modules/report/report.constants';-export * from '@openpanel/core/modules/share/share.constants';-export * from '@openpanel/core/modules/subscription/subscription.constants';diff --git a/packages/validation/tsconfig.json b/packages/validation/tsconfig.jsondeleted file mode 100644index a4a54fb86..000000000--- a/packages/validation/tsconfig.json+++ /dev/null@@ -1,13 +0,0 @@-{- "extends": "@openpanel/tsconfig/base.json",- "compilerOptions": {- "baseUrl": ".",- "paths": {- "@/*": ["./src/*"]- },- "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",- "strictNullChecks": true- },- "include": ["."],- "exclude": ["node_modules"]-}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex b954963ec..dea0301f8 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -83,9 +83,6 @@ importers:apps/api:dependencies:- '@openpanel/common':- specifier: workspace:*- version: link:../../packages/common'@openpanel/core':specifier: workspace:*version: link:../../packages/core@@ -138,9 +135,6 @@ importers:'@opennextjs/cloudflare':specifier: ^1.17.1version: 1.17.1([email protected](@babel/[email protected]([email protected]))(@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])- '@openpanel/common':- specifier: workspace:*- version: link:../../packages/common'@openpanel/nextjs':specifier: ^1.2.0version: 1.2.0([email protected](@babel/[email protected]([email protected]))(@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])@@ -796,74 +790,6 @@ importers:specifier: ^6.0.0version: 6.3.5(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- packages/common:- dependencies:- '@openpanel/constants':- specifier: workspace:*- version: link:../constants- date-fns:- specifier: ^3.3.1- version: 3.3.1- luxon:- specifier: ^3.7.2- version: 3.7.2- mathjs:- specifier: ^12.3.2- version: 12.3.2- nanoid:- specifier: ^5.1.6- version: 5.1.6- ramda:- specifier: ^0.29.1- version: 0.29.1- slugify:- specifier: ^1.6.6- version: 1.6.6- superjson:- specifier: ^1.13.3- version: 1.13.3- unique-names-generator:- specifier: ^4.7.1- version: 4.7.1- devDependencies:- '@openpanel/tsconfig':- specifier: workspace:*- version: link:../../tooling/typescript- '@openpanel/validation':- specifier: workspace:*- version: link:../validation- '@types/luxon':- specifier: ^3.7.1- version: 3.7.1- '@types/node':- specifier: 'catalog:'- version: 24.10.1- '@types/ramda':- specifier: ^0.29.6- version: 0.29.10- prisma:- specifier: ^5.1.1- version: 5.9.1- typescript:- specifier: 'catalog:'- version: 5.9.3-- packages/constants:- dependencies:- '@openpanel/core':- specifier: workspace:*- version: link:../core- devDependencies:- '@openpanel/tsconfig':- specifier: workspace:*- version: link:../../tooling/typescript- date-fns:- specifier: ^3.3.1- version: 3.3.1- typescript:- specifier: 'catalog:'- version: 5.9.3-packages/core:dependencies:'@aws-sdk/client-s3':@@ -1179,25 +1105,6 @@ importers:specifier: 'catalog:'version: 5.9.3- packages/json:- dependencies:- superjson:- specifier: ^1.13.3- version: 1.13.3- devDependencies:- '@openpanel/tsconfig':- specifier: workspace:*- version: link:../../tooling/typescript- '@openpanel/validation':- specifier: workspace:*- version: link:../validation- '@types/node':- specifier: 'catalog:'- version: 24.10.1- typescript:- specifier: 'catalog:'- version: 5.9.3-packages/payments:dependencies:'@polar-sh/sdk':@@ -1237,15 +1144,15 @@ importers:packages/redis:dependencies:- '@openpanel/json':- specifier: workspace:*- version: link:../jsonioredis:specifier: 5.8.2version: 5.8.2([email protected])lru-cache:specifier: ^11.2.2version: 11.2.2+ superjson:+ specifier: ^1.13.3+ version: 1.13.3devDependencies:'@openpanel/core':specifier: workspace:*@@ -1418,9 +1325,6 @@ importers:'@openpanel/tsconfig':specifier: workspace:*version: link:../../../tooling/typescript- '@openpanel/validation':- specifier: workspace:*- version: link:../../validation'@types/node':specifier: 'catalog:'version: 24.10.1@@ -1456,31 +1360,6 @@ importers:specifier: 'catalog:'version: 5.9.3- packages/validation:- dependencies:- '@openpanel/constants':- specifier: workspace:*- version: link:../constants- '@openpanel/core':- specifier: workspace:*- version: link:../core- zod:- specifier: 'catalog:'- version: 4.3.6- devDependencies:- '@openpanel/tsconfig':- specifier: workspace:*- version: link:../../tooling/typescript- '@types/node':- specifier: 'catalog:'- version: 24.10.1- prisma:- specifier: ^5.1.1- version: 5.9.1- typescript:- specifier: 'catalog:'- version: 5.9.3-tooling/publish:dependencies:arg:@@ -9341,9 +9220,6 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==}- '@types/[email protected]':- resolution: {integrity: sha512-0BzWVKtSEtignlk+XBuK88Il5wzQwbRVfEkzE8iKm02NYHMGQ/9ffB05M+zXhTCqo50DOIAT9pNSJsjFMMG4rQ==}-'@types/[email protected]':resolution: {integrity: sha512-1lWWZ/2YiNttGcIUxQwnvMuh55GIEbn/zlpzzEojAsbxquI/TXQZCRaXsfxG1CHjlqGoqxWePkvaM/5qYHNuvQ==}@@ -17364,9 +17240,6 @@ packages:resolution: {integrity: sha512-q7QNVDGTdl702bVFiI5eY4l/HkgCM6at9KhcFbgUAzezHFbOVy4+0O/lCjsABEQwbZPravVfBIiBVGo89yzHFg==}engines: {node: '>= 0.4'}- resolution: {integrity: sha512-8KBxZGJwUF3MpRkkJauSpvfHXk8Ssq15QXGuCBTDGeKd9PfheokkC3wAKRV3djej9O31Qa5M7Owsg8hF0GjtAw==}-resolution: {integrity: sha512-vaoC35CRC3xvL8Z6HkshDbi6KWM1ezK0LHN0YyxXWUn9HKzBNg/T3xSGlJZjCYspnOD3jE7bcizsp0bUXZDxnQ==}@@ -17487,10 +17360,6 @@ packages:resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==}- resolution: {integrity: sha512-lMx9dX+KRmG8sq6gulYYpKWZc9RlGsgBR6aoO8Qsm3qvkSJ+3rAymr+TnV8EDMrIrwuFJ4kruzMWM/OpYzPoow==}- engines: {node: '>=8'}-resolution: {integrity: sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==}@@ -28887,10 +28756,6 @@ snapshots:'@types/[email protected]': {}- '@types/[email protected]':- dependencies:- types-ramda: 0.29.7-'@types/[email protected]':dependencies:types-ramda: 0.31.0@@ -39111,10 +38976,6 @@ snapshots:typed-array-buffer: 1.0.3typed-array-byte-offset: 1.0.4- dependencies:- ts-toolbelt: 9.6.0-dependencies:ts-toolbelt: 9.6.0@@ -39268,8 +39129,6 @@ snapshots:dependencies:unique-slug: 2.0.2- [email protected]: {}-dependencies:imurmurhash: 0.1.4