Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nix/oxc-config-plugin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let
pnpm = pinnedPnpm;
};
packageDir = "packages/@overeng/oxc-config";
pnpmDepsHash = "sha256-UPDXMkAo6ZbawNzCZRiQ7066m6fo+Shq6CfhMHHx07w=";
pnpmDepsHash = "sha256-HM+QdonkgSfj4h4Q4XmVKpQD2hW2Rf4TLanvFYYaqo8=";

srcPath =
if builtins.isAttrs src && builtins.hasAttr "outPath" src then
Expand Down
2 changes: 1 addition & 1 deletion packages/@overeng/genie/nix/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let
# Managed by the repo FOD refresh workflow — do not edit manually.
depsBuilds = {
"." = {
hash = "sha256-D7Z0w54Tn/LmKVZuun9ndutkAtJGM/dkDEAfKcgfJ1Q=";
hash = "sha256-xc01fEymQyAwgwDbnaa5uVCoE30XhKG8bO9CHtnigik=";
};
};
nativeNodePackages = [ opentuiCoreNative ];
Expand Down
2 changes: 1 addition & 1 deletion packages/@overeng/megarepo/nix/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let
# Managed by the repo FOD refresh workflow — do not edit manually.
depsBuilds = {
"." = {
hash = "sha256-AgCjUDGkQ115HNjU9GSRRKkJEofXLgaHzEtObR54Nmo=";
hash = "sha256-MyW7Um2sE/4H5bWIdHHN4kOdnqj8c7MGQSeaA/JE0Fs=";
};
};
nativeNodePackages = [ opentuiCoreNative ];
Expand Down
2 changes: 1 addition & 1 deletion packages/@overeng/notion-cli/nix/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let
# Managed by the repo FOD refresh workflow — do not edit manually.
depsBuilds = {
"." = {
hash = "sha256-Nzrd6Wz7OWympJSsLBU0uodHL5/v1fgfvBvx/Q9IBf4=";
hash = "sha256-2mqls7rueBX2fJb9dNb+m3Lo1iD9dFK8jO18rM1DdZA=";
};
};
nativeNodePackages = [ opentuiCoreNative ];
Expand Down
2 changes: 1 addition & 1 deletion packages/@overeng/notion-md/nix/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let
# Managed by the repo FOD refresh workflow — do not edit manually.
depsBuilds = {
"." = {
hash = "sha256-jU1WCdUEuiPC6EJRfbg8poF+JGVR8+KJ7ACnmjsnerw=";
hash = "sha256-tbtOTx40FPsbl8oJSHjk6k+1D3vstfiVvzwPj2zt/S8=";
};
};
smokeTestArgs = [ "--help" ];
Expand Down
8 changes: 8 additions & 0 deletions packages/@overeng/react-inspector/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/@overeng/react-inspector/package.json.genie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const workspaceDeps = catalog.compose({
},
},
peerDependencies: {
workspace: [utilsPkg],
external: catalog.pick(...peerDepNames),
},
})
Expand Down
36 changes: 13 additions & 23 deletions packages/@overeng/react-inspector/src/schema/effectSchema.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import type { Schema as S, SchemaAST } from 'effect'

import {
type Authority,
type Freshness,
type LineageDisplay,
type Reference,
getAuthority,
getFreshness,
getLineage,
getLineageDisplay,
getReference,
} from './lineage.ts'
import { Lineage } from '@overeng/utils'

/** Symbols used by Effect Schema for annotations */
const IdentifierAnnotationId = Symbol.for('effect/annotation/Identifier')
Expand Down Expand Up @@ -87,10 +77,10 @@ export interface SchemaInfo {
* @see https://github.com/overengineeringstudio/effect-utils/issues/687
*/
export interface LineageBundle {
display: LineageDisplay
authority?: Authority
freshness?: Freshness
reference?: Reference
display: Lineage.LineageDisplay
authority?: Lineage.Authority
freshness?: Lineage.Freshness
reference?: Lineage.Reference
}

const isNullishAst = (ast: SchemaAST.AST): boolean => {
Expand Down Expand Up @@ -759,20 +749,20 @@ export const getSchemaInfo = (schema: S.Schema.AnyNoContext): SchemaInfo => {
* lineage to the refinement wrapper, and unwrapping would lose it. The
* helpers themselves try raw-then-unwrapped so either layer wins.
*/
const lineageValue = getLineage(schema)
const lineageValue = Lineage.getLineage(schema)
const lineage: LineageBundle | undefined =
lineageValue !== undefined
? {
display: getLineageDisplay(lineageValue),
authority: getAuthority(schema),
freshness: getFreshness(schema),
reference: getReference(schema),
display: Lineage.getLineageDisplay(lineageValue),
authority: Lineage.getAuthority(schema),
freshness: Lineage.getFreshness(schema),
reference: Lineage.getReference(schema),
}
: (() => {
/* No primary Lineage but companion annotations may still exist. */
const authority = getAuthority(schema)
const freshness = getFreshness(schema)
const reference = getReference(schema)
const authority = Lineage.getAuthority(schema)
const freshness = Lineage.getFreshness(schema)
const reference = Lineage.getReference(schema)
if (authority === undefined && freshness === undefined && reference === undefined) {
return undefined
}
Expand Down
4 changes: 1 addition & 3 deletions packages/@overeng/react-inspector/src/schema/mod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,4 @@ export { SchemaAwareObjectValue } from './SchemaAwareObjectValue.tsx'
export { SchemaAwareObjectPreview } from './SchemaAwareObjectPreview.tsx'
export { SchemaTooltip, type SchemaTooltipProps } from './SchemaTooltip.tsx'

import * as Lineage from './lineage.ts'

export { Lineage }
export { Lineage } from '@overeng/utils'
Original file line number Diff line number Diff line change
Expand Up @@ -964,16 +964,18 @@ export const RuntimeTaggedUnionNarrowing = {
const OrderTotalsSchema = Schema.Struct({
subtotal: Schema.Number.pipe(Lineage.sourceOfTruth({ owner: 'orders' })),
tax: Schema.Number.pipe(Lineage.sourceOfTruth()),
total: Schema.Number.pipe(Lineage.derivedFrom(['subtotal', 'tax'], 'Pure', { pure: true })),
total: Schema.Number.pipe(
Lineage.derivedFrom({ from: ['subtotal', 'tax'], how: 'Pure', pure: true }),
),
displayTotal: Schema.String.pipe(Lineage.computed({ fn: 'formatMoney(total)' })),
cachedFxRate: Schema.Number.pipe(Lineage.cache('fxRate', { ttlMs: 60_000 })),
mirroredStripeId: Schema.String.pipe(Lineage.mirror('id', { system: 'stripe' })),
legacyOrderRef: Schema.String.pipe(Lineage.external('legacy-erp', 'order-id')),
lastSyncedSnapshot: Schema.Number.pipe(Lineage.projection('total', { stalenessMs: 30_000 })),
cachedFxRate: Schema.Number.pipe(Lineage.cache({ of: 'fxRate', ttlMs: 60_000 })),
mirroredStripeId: Schema.String.pipe(Lineage.mirror({ of: 'id', system: 'stripe' })),
legacyOrderRef: Schema.String.pipe(Lineage.external({ system: 'legacy-erp', ref: 'order-id' })),
lastSyncedSnapshot: Schema.Number.pipe(Lineage.projection({ of: 'total', stalenessMs: 30_000 })),
customerId: Schema.String.pipe(
Lineage.authority({ writers: ['orders-svc'], readers: ['*'] }),
Lineage.freshness({ capturedAt: 'event-time', maxAgeMs: 5_000 }),
Lineage.foreignKey('Customer', 'id'),
Lineage.foreignKey({ targetSchema: 'Customer', targetField: 'id' }),
),
}).annotations({
identifier: 'OrderTotals',
Expand Down
2 changes: 1 addition & 1 deletion packages/@overeng/tui-stories/nix/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let
# Managed by the repo FOD refresh workflow — do not edit manually.
depsBuilds = {
"." = {
hash = "sha256-0VxYgFoPszkCa1bpaSEWGFm5TBIO1g8CMDhVzrKNVx8=";
hash = "sha256-d/vdg8I2DCZgZnGz5XaYeOibHhaJio1dqp81mrmjS98=";
};
};
nativeNodePackages = [ opentuiCoreNative ];
Expand Down
Loading
Loading