Skip to content
Myr

json.ts

This file

Path

packages/rules/src/rules-evaluator/json.ts

23 lines · 743 bytes · TypeScript

Last changed by

Merge build/comments-packages-rest into mainoscabrielbefore adoption38cd503

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 1–6why, one step back
1import { Effect, Layer } from "effect";
23import { statedWithoutCode } from "../config-folder.ts";4import { Finishers, finishPolicy } from "../finish.ts";5import { RulesEvaluator } from "../rules-evaluator.ts";6

Merge build/comments-packages-rest into mainoscabrielbefore adoption38cd503

line 7why, one step back
7/** It runs no code, so it has no function-valued rules: `call` is always `false`. */

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 8–23why, one step back
8export const RulesEvaluatorJson = Layer.effect(
9 RulesEvaluator,10 Effect.gen(function* () {11 const finishers = yield* Finishers;1213 return RulesEvaluator.of({14 call: () => Effect.succeed(false),15 evaluate: ({ at, facts, modules }) =>16 Effect.gen(function* () {17 const policy = yield* statedWithoutCode(modules);1819 return yield* finishPolicy({ at, facts, finishers, policy });20 }),21 });22 })23);