@intentius/sql-yodeler 0.9.0 → 0.10.0
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/README.md +5 -5
- package/dist/chant/apply.d.ts +6 -0
- package/dist/chant/apply.js +6 -2
- package/dist/chant/apply.js.map +1 -1
- package/dist/chant/build.d.ts +1 -0
- package/dist/chant/build.js +5 -0
- package/dist/chant/build.js.map +1 -1
- package/dist/chant/drift.d.ts +12 -1
- package/dist/chant/drift.js +41 -1
- package/dist/chant/drift.js.map +1 -1
- package/dist/chant/export-name.d.ts +9 -0
- package/dist/chant/export-name.js +16 -0
- package/dist/chant/export-name.js.map +1 -0
- package/dist/chant/runnable.d.ts +1 -1
- package/dist/chant/runnable.js +1 -1
- package/dist/chant/sql-types.d.ts +19 -0
- package/dist/chant/sql-types.js +29 -0
- package/dist/chant/sql-types.js.map +1 -0
- package/dist/check/flyway.d.ts +67 -0
- package/dist/check/flyway.js +106 -0
- package/dist/check/flyway.js.map +1 -0
- package/dist/check/readers.d.ts +77 -0
- package/dist/check/readers.js +270 -0
- package/dist/check/readers.js.map +1 -0
- package/dist/check/run.d.ts +72 -0
- package/dist/check/run.js +243 -0
- package/dist/check/run.js.map +1 -0
- package/dist/ci/render.d.ts +30 -0
- package/dist/ci/render.js +150 -21
- package/dist/ci/render.js.map +1 -1
- package/dist/commands/apply.d.ts +27 -3
- package/dist/commands/apply.js +98 -30
- package/dist/commands/apply.js.map +1 -1
- package/dist/commands/check.d.ts +5 -0
- package/dist/commands/check.js +211 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/config.js +5 -5
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/drift.js +5 -0
- package/dist/commands/drift.js.map +1 -1
- package/dist/commands/index.js +2 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.js +15 -6
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/lint.js +94 -16
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/new.js +79 -6
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/override.js +80 -33
- package/dist/commands/override.js.map +1 -1
- package/dist/commands/plan.js +62 -30
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/revert.js +1 -1
- package/dist/config/define.d.ts +21 -0
- package/dist/config/define.js.map +1 -1
- package/dist/config/load.js +18 -2
- package/dist/config/load.js.map +1 -1
- package/dist/credentials.d.ts +18 -5
- package/dist/credentials.js +29 -11
- package/dist/credentials.js.map +1 -1
- package/dist/declarative/plan.d.ts +84 -0
- package/dist/declarative/plan.js +187 -0
- package/dist/declarative/plan.js.map +1 -0
- package/dist/declarative/review.d.ts +78 -0
- package/dist/declarative/review.js +162 -0
- package/dist/declarative/review.js.map +1 -0
- package/dist/init/adopt.d.ts +16 -7
- package/dist/init/adopt.js +37 -8
- package/dist/init/adopt.js.map +1 -1
- package/dist/init/baseline.d.ts +2 -1
- package/dist/init/baseline.js +3 -3
- package/dist/init/baseline.js.map +1 -1
- package/dist/init/clickhouse-access.d.ts +29 -10
- package/dist/init/clickhouse-access.js +84 -13
- package/dist/init/clickhouse-access.js.map +1 -1
- package/dist/init/live.d.ts +4 -2
- package/dist/init/live.js +8 -3
- package/dist/init/live.js.map +1 -1
- package/dist/init/unsupported.d.ts +15 -0
- package/dist/init/unsupported.js +34 -0
- package/dist/init/unsupported.js.map +1 -0
- package/dist/lint/annotations.d.ts +1 -1
- package/dist/lint/annotations.js +2 -0
- package/dist/lint/annotations.js.map +1 -1
- package/dist/lint/check.d.ts +5 -1
- package/dist/lint/check.js +58 -1
- package/dist/lint/check.js.map +1 -1
- package/dist/lint/report.js +6 -0
- package/dist/lint/report.js.map +1 -1
- package/dist/migrations/create.d.ts +6 -1
- package/dist/migrations/create.js +3 -0
- package/dist/migrations/create.js.map +1 -1
- package/dist/migrations/document.d.ts +6 -0
- package/dist/migrations/document.js +1 -0
- package/dist/migrations/document.js.map +1 -1
- package/dist/migrations/handwritten.d.ts +75 -0
- package/dist/migrations/handwritten.js +157 -0
- package/dist/migrations/handwritten.js.map +1 -0
- package/dist/migrations/index.d.ts +2 -0
- package/dist/migrations/index.js +2 -0
- package/dist/migrations/index.js.map +1 -1
- package/dist/pr/overdue.d.ts +48 -0
- package/dist/pr/overdue.js +88 -0
- package/dist/pr/overdue.js.map +1 -0
- package/dist/pr/part.d.ts +15 -0
- package/dist/pr/part.js +30 -0
- package/dist/pr/part.js.map +1 -0
- package/dist/rebase/index.js +28 -1
- package/dist/rebase/index.js.map +1 -1
- package/dist/release/index.d.ts +32 -7
- package/dist/release/index.js +42 -0
- package/dist/release/index.js.map +1 -1
- package/dist/replay/replay.d.ts +2 -0
- package/dist/replay/replay.js +7 -3
- package/dist/replay/replay.js.map +1 -1
- package/dist/replay/report.js +3 -1
- package/dist/replay/report.js.map +1 -1
- package/dist/schemas.d.ts +2 -1
- package/dist/schemas.js +1 -0
- package/dist/schemas.js.map +1 -1
- package/dist/steps/backfill.d.ts +8 -3
- package/dist/steps/backfill.js +20 -9
- package/dist/steps/backfill.js.map +1 -1
- package/dist/steps/index.d.ts +5 -0
- package/dist/steps/index.js +10 -0
- package/dist/steps/index.js.map +1 -1
- package/dist/steps/kinds.d.ts +44 -1
- package/dist/steps/kinds.js +50 -1
- package/dist/steps/kinds.js.map +1 -1
- package/dist/steps/orm-handoff.d.ts +74 -0
- package/dist/steps/orm-handoff.js +154 -0
- package/dist/steps/orm-handoff.js.map +1 -0
- package/dist/testing/run.js +3 -1
- package/dist/testing/run.js.map +1 -1
- package/dist/versioned/approval.d.ts +27 -7
- package/dist/versioned/approval.js +69 -18
- package/dist/versioned/approval.js.map +1 -1
- package/dist/versioned/engine.js +31 -2
- package/dist/versioned/engine.js.map +1 -1
- package/dist/versioned/op.d.ts +20 -3
- package/dist/versioned/op.js +12 -6
- package/dist/versioned/op.js.map +1 -1
- package/dist/versioned/policy.d.ts +2 -0
- package/dist/versioned/policy.js +2 -2
- package/dist/versioned/policy.js.map +1 -1
- package/dist/versioned/state.js +5 -0
- package/dist/versioned/state.js.map +1 -1
- package/package.json +9 -8
- package/schemas/apply.schema.json +36 -2
- package/schemas/check.schema.json +78 -0
- package/schemas/drift.schema.json +1 -0
- package/schemas/init.schema.json +1 -0
- package/schemas/lint.schema.json +9 -1
- package/schemas/new.schema.json +1 -0
- package/schemas/plan.schema.json +33 -0
package/dist/credentials.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAiBH,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,SAAS,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;AAIzF,MAAM,CAAC,MAAM,KAAK,GAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAoB3D,gIAAgI;AAChI,MAAM,CAAC,MAAM,WAAW,GAAkB,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAU,CAAC;AASpG,oFAAoF;AACpF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,OAA2B,EAAU,EAAE,CAAC,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,IAAI,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;AAElK,qGAAqG;AACrG,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AACrC,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,aAAgC,OAAO,CAAC,GAAG;IACrE,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnC,MAAM,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACr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AAC,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/C,MAAM,IAAI,GAAG,UAAU,CAAE,OAAqC,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IAClF,MAAM,GAAG,GAAG,CAAC,EAAE,IAAI,KAAK,QAAQ;QAC9B,CAAC,CAAC,yBAAyB,QAAQ,WAAW,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG;QACjE,CAAC,CAAC,0EAA0E,CAAC;IAC/E,OAAO,+BAA+B,OAAO,wBAAwB,IAAI,GAAG,IAAI,IAAI,oBAAoB,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;AACvI,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `yodel plan <env>` for a project with no migrations (#249): chant's plan
|
|
3
|
+
* from the live database to the declared schema, with the review
|
|
4
|
+
* `./review.ts` gives it: the lint findings over the planned changes, the
|
|
5
|
+
* policy's outcome and how the ApplyOp's gate is approved. Collected once,
|
|
6
|
+
* rendered as text, as the pull request comment (`--format markdown`,
|
|
7
|
+
* `--comment`) and as JSON. Nothing here writes. As on the versioned path,
|
|
8
|
+
* the comment names no server address.
|
|
9
|
+
*/
|
|
10
|
+
import type { ClassifiedChange } from "@intentius/chant-lexicon-sql/core/classifier";
|
|
11
|
+
import { YodelError, type Environment, type Project, type SqlDialect } from "../project.js";
|
|
12
|
+
import { type Plan } from "../chant/plan.js";
|
|
13
|
+
import { type AccessReview } from "../chant/access.js";
|
|
14
|
+
import type { Build } from "../chant/build.js";
|
|
15
|
+
import { type ServerInfo } from "../server.js";
|
|
16
|
+
import { type LintReport, type LintSettings } from "../lint/index.js";
|
|
17
|
+
import { loadPolicies } from "../lint/policies.js";
|
|
18
|
+
import { type OverrideSource, type RuleResult } from "../versioned/policy.js";
|
|
19
|
+
import type { PolicyConfig } from "../config/define.js";
|
|
20
|
+
import type { StandingOverride } from "@intentius/chant/override-gate";
|
|
21
|
+
export type DeclarativeApproval = {
|
|
22
|
+
kind: "op";
|
|
23
|
+
op: string;
|
|
24
|
+
gate: string;
|
|
25
|
+
} | {
|
|
26
|
+
kind: "no-op";
|
|
27
|
+
message: string;
|
|
28
|
+
};
|
|
29
|
+
export interface DeclarativePlan {
|
|
30
|
+
environment: string;
|
|
31
|
+
dialect: SqlDialect;
|
|
32
|
+
server?: ServerInfo | undefined;
|
|
33
|
+
/** chant's plan. */
|
|
34
|
+
plan: Plan;
|
|
35
|
+
/** The changes to declared objects: the work the ApplyOp would do. */
|
|
36
|
+
changes: ClassifiedChange[];
|
|
37
|
+
/** chant's report of the plan, as text. */
|
|
38
|
+
report: string;
|
|
39
|
+
/** The same report for the pull request comment, its title naming no server address. */
|
|
40
|
+
commentReport: string;
|
|
41
|
+
access: AccessReview;
|
|
42
|
+
/** The lint findings over the planned changes. */
|
|
43
|
+
lint: LintReport;
|
|
44
|
+
/** The digest a policy override binds; absent when there is nothing to apply. */
|
|
45
|
+
digest?: string | undefined;
|
|
46
|
+
/** Each policy rule's outcome, with an override that counts; absent when yodel.config.ts declares no policy or nothing would change. */
|
|
47
|
+
policy?: RuleResult[] | undefined;
|
|
48
|
+
approval: DeclarativeApproval;
|
|
49
|
+
notes: string[];
|
|
50
|
+
}
|
|
51
|
+
/** The lint settings a declarative review reads, with the project's own checks. */
|
|
52
|
+
export declare function declarativeLintSettings(project: Project): Promise<{
|
|
53
|
+
settings: LintSettings;
|
|
54
|
+
policies: Awaited<ReturnType<typeof loadPolicies>>;
|
|
55
|
+
}>;
|
|
56
|
+
/** The policy of `env`'s declarative plan, with the override on the ledger for its digest. Empty when there is no policy or nothing to apply. */
|
|
57
|
+
export declare function judgeDeclarative(input: {
|
|
58
|
+
policy: PolicyConfig | undefined;
|
|
59
|
+
environment: string;
|
|
60
|
+
dialect: SqlDialect;
|
|
61
|
+
changes: readonly ClassifiedChange[];
|
|
62
|
+
digest: string;
|
|
63
|
+
ledger: () => Promise<OverrideSource | undefined>;
|
|
64
|
+
spend?: (override: StandingOverride) => Promise<void>;
|
|
65
|
+
}): Promise<RuleResult[]>;
|
|
66
|
+
/** The override ledger for the ApplyOp `op` of `env`, as the environment's approval mode at base counts it. */
|
|
67
|
+
export declare function declarativeOverrideSource(project: Project, env: string, op: string): Promise<OverrideSource>;
|
|
68
|
+
/** Collects the plan and its review; `build` is the current build of src/. */
|
|
69
|
+
export declare function collectDeclarativePlan(project: Project, env: Environment, build: Build, plan: Plan, options?: {
|
|
70
|
+
opName?: string | undefined;
|
|
71
|
+
processEnv?: NodeJS.ProcessEnv;
|
|
72
|
+
}): Promise<DeclarativePlan>;
|
|
73
|
+
/** The exit code: chant's plan's (2 when a change needs its own Op or a live object could not be read). */
|
|
74
|
+
export declare const declarativePlanExitCode: (p: DeclarativePlan) => number;
|
|
75
|
+
/** Why `yodel apply` would refuse the plan before its gate, or `undefined`. */
|
|
76
|
+
export declare function declarativeRefusalOf(p: DeclarativePlan): YodelError | undefined;
|
|
77
|
+
/** `yodel plan <env>` as text: chant's report, the access review, the findings and the policy. */
|
|
78
|
+
export declare function renderDeclarativeText(p: DeclarativePlan): string;
|
|
79
|
+
/** The pull request comment body; the same marker as the versioned comment, so a project that adopts migrations updates the same comment. */
|
|
80
|
+
export declare function renderDeclarativeMarkdown(p: DeclarativePlan, options?: {
|
|
81
|
+
report?: boolean;
|
|
82
|
+
}): string;
|
|
83
|
+
/** `yodel plan <env> --json` for a declarative project: chant's diff as before, with the review. */
|
|
84
|
+
export declare function declarativePlanJson(p: DeclarativePlan): Record<string, unknown>;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `yodel plan <env>` for a project with no migrations (#249): chant's plan
|
|
3
|
+
* from the live database to the declared schema, with the review
|
|
4
|
+
* `./review.ts` gives it: the lint findings over the planned changes, the
|
|
5
|
+
* policy's outcome and how the ApplyOp's gate is approved. Collected once,
|
|
6
|
+
* rendered as text, as the pull request comment (`--format markdown`,
|
|
7
|
+
* `--comment`) and as JSON. Nothing here writes. As on the versioned path,
|
|
8
|
+
* the comment names no server address.
|
|
9
|
+
*/
|
|
10
|
+
import { YodelError } from "../project.js";
|
|
11
|
+
import { declaredChanges, planExitCode, planJson, renderPlan, unreadableOf } from "../chant/plan.js";
|
|
12
|
+
import { accessReview, renderAccessReview } from "../chant/access.js";
|
|
13
|
+
import { applyOpExample, findApplyOp } from "../chant/apply.js";
|
|
14
|
+
import { describeServer, probeServer } from "../server.js";
|
|
15
|
+
import { describeSettingsTopology, environmentSettings } from "../config/settings.js";
|
|
16
|
+
import { policyAtBase } from "../config/base.js";
|
|
17
|
+
import { migrationsApprovalAtBase } from "../approval-mode/index.js";
|
|
18
|
+
import { lintSettings, renderLint, LINT_RULES, SCHEMA_RULES, lintJson } from "../lint/index.js";
|
|
19
|
+
import { loadPolicies, policyRules } from "../lint/policies.js";
|
|
20
|
+
import { describeResults, judgePolicyPlan, overrideCommand, overrideSourceAt, overrideSubject, policyRefusal } from "../versioned/policy.js";
|
|
21
|
+
import { cell, commentMarker, COMMENT_LIMIT, fence } from "../pr/render.js";
|
|
22
|
+
import { changeFindings, declarativeDigest, declarativeLint, declarativePolicyPlan } from "./review.js";
|
|
23
|
+
/** The lint settings a declarative review reads, with the project's own checks. */
|
|
24
|
+
export async function declarativeLintSettings(project) {
|
|
25
|
+
const policies = await loadPolicies(project);
|
|
26
|
+
const rules = { ...LINT_RULES, ...SCHEMA_RULES, ...policyRules(policies) };
|
|
27
|
+
return { settings: lintSettings(project.yodel?.config.lint, rules, project.yodel?.path), policies };
|
|
28
|
+
}
|
|
29
|
+
/** The policy of `env`'s declarative plan, with the override on the ledger for its digest. Empty when there is no policy or nothing to apply. */
|
|
30
|
+
export async function judgeDeclarative(input) {
|
|
31
|
+
if (!input.policy || input.changes.length === 0)
|
|
32
|
+
return [];
|
|
33
|
+
return judgePolicyPlan(input.policy, declarativePolicyPlan(input.environment, input.dialect, input.changes, input.digest), input.digest, input.ledger, input.spend);
|
|
34
|
+
}
|
|
35
|
+
/** The override ledger for the ApplyOp `op` of `env`, as the environment's approval mode at base counts it. */
|
|
36
|
+
export async function declarativeOverrideSource(project, env, op) {
|
|
37
|
+
return overrideSourceAt(project.dir, overrideSubject(op), await migrationsApprovalAtBase(project, env));
|
|
38
|
+
}
|
|
39
|
+
/** Collects the plan and its review; `build` is the current build of src/. */
|
|
40
|
+
export async function collectDeclarativePlan(project, env, build, plan, options = {}) {
|
|
41
|
+
const notes = [];
|
|
42
|
+
const server = await probeServer(project, env);
|
|
43
|
+
const topology = project.dialect === "clickhouse" ? `, topology ${describeSettingsTopology(environmentSettings(project, env.name))}` : "";
|
|
44
|
+
const report = await renderPlan(plan, `Plan for ${env.name} (${server ? describeServer(server) : project.dialect}, sql.profiles.${env.name}${topology})`);
|
|
45
|
+
const commentReport = await renderPlan(plan, `Plan for ${env.name} (${project.dialect}, sql.profiles.${env.name}${topology})`);
|
|
46
|
+
const access = await accessReview(project, env.name, plan.diff.changes, build.output);
|
|
47
|
+
const changes = declaredChanges(plan, build);
|
|
48
|
+
const { settings, policies } = await declarativeLintSettings(project);
|
|
49
|
+
const lint = declarativeLint({ project, settings, policies, schema: [], plan: { environment: env.name, findings: changeFindings(project.dialect, changes, plan.refused) } });
|
|
50
|
+
let approval;
|
|
51
|
+
try {
|
|
52
|
+
const op = await findApplyOp(project, env, options.opName);
|
|
53
|
+
approval = { kind: "op", op: op.name, gate: op.gate };
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
if (!(e instanceof YodelError))
|
|
57
|
+
throw e;
|
|
58
|
+
approval = { kind: "no-op", message: e.message.includes("no Op applies") ? `no Op applies the declared schema to ${env.name}; declare one, for example:\n\n${applyOpExample(env.name, project.dialect)}` : e.message };
|
|
59
|
+
}
|
|
60
|
+
const digest = changes.length > 0 ? await declarativeDigest(env.name, project.dialect, changes) : undefined;
|
|
61
|
+
let policy;
|
|
62
|
+
// The policy as the base commit has it (#73): a pull request that loosens a rule is judged by the old one.
|
|
63
|
+
const base = await policyAtBase(project, options.processEnv);
|
|
64
|
+
if (base.note)
|
|
65
|
+
notes.push(base.note);
|
|
66
|
+
if (base.policy && digest) {
|
|
67
|
+
policy = await judgeDeclarative({
|
|
68
|
+
policy: base.policy,
|
|
69
|
+
environment: env.name,
|
|
70
|
+
dialect: project.dialect,
|
|
71
|
+
changes,
|
|
72
|
+
digest,
|
|
73
|
+
ledger: async () => {
|
|
74
|
+
if (approval.kind !== "op")
|
|
75
|
+
return undefined;
|
|
76
|
+
try {
|
|
77
|
+
return await declarativeOverrideSource(project, env.name, approval.op);
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return { environment: env.name, dialect: project.dialect, server, plan, changes, report, commentReport, access, lint, digest, policy, approval, notes };
|
|
86
|
+
}
|
|
87
|
+
/** The exit code: chant's plan's (2 when a change needs its own Op or a live object could not be read). */
|
|
88
|
+
export const declarativePlanExitCode = (p) => planExitCode(p.plan);
|
|
89
|
+
/** Why `yodel apply` would refuse the plan before its gate, or `undefined`. */
|
|
90
|
+
export function declarativeRefusalOf(p) {
|
|
91
|
+
return p.policy ? policyRefusal(p.policy, p.environment, p.digest, "before the gate") : undefined;
|
|
92
|
+
}
|
|
93
|
+
/** `yodel plan <env>` as text: chant's report, the access review, the findings and the policy. */
|
|
94
|
+
export function renderDeclarativeText(p) {
|
|
95
|
+
const out = [p.report];
|
|
96
|
+
const review = renderAccessReview(p.access, p.environment);
|
|
97
|
+
if (review.length > 0)
|
|
98
|
+
out.push("", ...review);
|
|
99
|
+
if (p.lint.findings.length > 0)
|
|
100
|
+
out.push("", renderLint(p.lint).trimEnd());
|
|
101
|
+
for (const n of p.notes)
|
|
102
|
+
out.push("", n);
|
|
103
|
+
if (p.policy && p.policy.length > 0) {
|
|
104
|
+
out.push("", ...describeResults(p.policy));
|
|
105
|
+
const refusal = declarativeRefusalOf(p);
|
|
106
|
+
if (refusal)
|
|
107
|
+
out.push(`yodel apply ${p.environment} refuses this plan before the gate until someone policy.overriders lists records why: ${overrideCommand(p.environment, p.policy.filter((r) => r.outcome === "denied").map((r) => r.id))}`);
|
|
108
|
+
}
|
|
109
|
+
return `${out.join("\n")}\n`;
|
|
110
|
+
}
|
|
111
|
+
/** The policy's outcome: a table of the rules, then how to override a denial. */
|
|
112
|
+
function policyMarkdown(results, environment) {
|
|
113
|
+
const out = ["#### Policy", "", "| Rule | Outcome | Why |", "|---|---|---|"];
|
|
114
|
+
for (const r of results) {
|
|
115
|
+
const outcome = r.outcome === "allowed" ? "allowed" : r.outcome === "denied" ? "**denied**" : `overridden by ${cell(r.override?.by ?? "")}`;
|
|
116
|
+
const why = r.outcome === "overridden" ? `${cell(r.reasons.join("; "))}; override: ${cell(r.override?.reason ?? "")}` : cell(r.reasons.join("; "));
|
|
117
|
+
out.push(`| \`${cell(r.id)}\`${r.description ? ` ${cell(r.description)}` : ""} | ${outcome} | ${why} |`);
|
|
118
|
+
}
|
|
119
|
+
const denied = results.filter((r) => r.outcome === "denied");
|
|
120
|
+
if (denied.length > 0)
|
|
121
|
+
out.push("", "`yodel apply` refuses this plan before the gate until someone `policy.overriders` lists records why, for exactly this plan:", "", fence(overrideCommand(environment, denied.map((r) => r.id)), "sh"));
|
|
122
|
+
return out;
|
|
123
|
+
}
|
|
124
|
+
/** The pull request comment body; the same marker as the versioned comment, so a project that adopts migrations updates the same comment. */
|
|
125
|
+
export function renderDeclarativeMarkdown(p, options = {}) {
|
|
126
|
+
const withReport = options.report !== false;
|
|
127
|
+
const n = p.changes.length;
|
|
128
|
+
const out = [
|
|
129
|
+
commentMarker(p.environment),
|
|
130
|
+
`### yodel plan: \`${p.environment}\``,
|
|
131
|
+
"",
|
|
132
|
+
`${p.dialect === "clickhouse" ? "ClickHouse" : "Postgres"}${p.server?.version ? ` ${cell(p.server.version)}` : ""}, the declared schema against the live database: **${n === 0 ? "no change" : `${String(n)} change${n === 1 ? "" : "s"}`}**.`,
|
|
133
|
+
];
|
|
134
|
+
for (const note of p.notes)
|
|
135
|
+
out.push("", `> ${note}`);
|
|
136
|
+
if (withReport)
|
|
137
|
+
out.push("", fence(p.commentReport.trimEnd(), "text"));
|
|
138
|
+
const access = renderAccessReview(p.access, p.environment);
|
|
139
|
+
if (access.length > 0)
|
|
140
|
+
out.push("", "#### Access", "", ...access.map((l) => `- ${cell(l)}`));
|
|
141
|
+
const unreadable = unreadableOf(p.plan);
|
|
142
|
+
if (p.plan.refused.length > 0 || unreadable.length > 0) {
|
|
143
|
+
out.push("", `**\`yodel apply\` would refuse (exit 2)**, and applies nothing: ${unreadable.length > 0 ? `${unreadable.map((u) => `\`${cell(u.object)}\``).join(", ")} could not be read` : `${String(p.plan.refused.length)} change${p.plan.refused.length === 1 ? "" : "s"} need${p.plan.refused.length === 1 ? "s" : ""} ${p.plan.refused.length === 1 ? "its" : "their"} own Op`}.`);
|
|
144
|
+
}
|
|
145
|
+
if (p.lint.findings.length > 0) {
|
|
146
|
+
out.push("", `#### Lint (${String(p.lint.errors)} error${p.lint.errors === 1 ? "" : "s"}, ${String(p.lint.warnings)} warning${p.lint.warnings === 1 ? "" : "s"})`, "", "| Level | Rule | Finding |", "|---|---|---|");
|
|
147
|
+
for (const f of p.lint.findings)
|
|
148
|
+
out.push(`| ${f.level === "error" ? "**error**" : f.level} | \`${cell(f.rule)}\` | ${cell(f.message)} |`);
|
|
149
|
+
out.push("", "_On the declarative path nothing is silenced: `yodel.config.ts` `lint.rules` sets a rule's level, and a policy override answers a denial._");
|
|
150
|
+
}
|
|
151
|
+
if (p.policy && p.policy.length > 0)
|
|
152
|
+
out.push("", ...policyMarkdown(p.policy, p.environment));
|
|
153
|
+
out.push("", "#### Approval", "");
|
|
154
|
+
if (p.approval.kind === "no-op") {
|
|
155
|
+
out.push(`No ApplyOp: ${cell(p.approval.message.split("\n")[0] ?? "")}`);
|
|
156
|
+
const example = p.approval.message.split("\n\n").slice(1).join("\n\n");
|
|
157
|
+
if (example)
|
|
158
|
+
out.push("", "<details><summary>Declare one</summary>", "", fence(example, "ts"), "", "</details>");
|
|
159
|
+
}
|
|
160
|
+
else if (n === 0) {
|
|
161
|
+
out.push(`Nothing to approve: \`${p.environment}\` already matches the declared schema.`);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
out.push(`After merge, \`yodel apply ${p.environment}\` runs \`${p.approval.op}\`, which stops at gate \`${p.approval.gate}\` with this plan. Approve it at a terminal (it shows the plan and asks you first):`, "", fence(`npx yodel approve ${p.environment}`, "sh"), "", "The gate binds the plan it stopped with: if the live database or `src/` changes before the apply runs, it asks again and nothing is applied.");
|
|
165
|
+
}
|
|
166
|
+
if (!withReport)
|
|
167
|
+
out.push("", "_chant's report is left out: the comment would be too long. `yodel plan` prints it._");
|
|
168
|
+
const body = `${out.join("\n")}\n`;
|
|
169
|
+
if (withReport && body.length > COMMENT_LIMIT)
|
|
170
|
+
return renderDeclarativeMarkdown(p, { report: false });
|
|
171
|
+
return body;
|
|
172
|
+
}
|
|
173
|
+
/** `yodel plan <env> --json` for a declarative project: chant's diff as before, with the review. */
|
|
174
|
+
export function declarativePlanJson(p) {
|
|
175
|
+
const lint = lintJson(p.lint);
|
|
176
|
+
return {
|
|
177
|
+
...planJson(p.plan),
|
|
178
|
+
access: p.access,
|
|
179
|
+
...(p.server ? { server: p.server } : {}),
|
|
180
|
+
lint: { status: lint.status, errors: lint.errors, warnings: lint.warnings, findings: lint.findings },
|
|
181
|
+
...(p.digest ? { digest: p.digest } : {}),
|
|
182
|
+
...(p.policy ? { policy: p.policy } : {}),
|
|
183
|
+
approval: p.approval.kind === "op" ? { op: p.approval.op, gate: p.approval.gate, ...(p.changes.length > 0 ? { command: `yodel approve ${p.environment}` } : {}) } : { message: p.approval.message },
|
|
184
|
+
...(p.notes.length > 0 ? { notes: p.notes } : {}),
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../src/declarative/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,UAAU,EAAmD,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAa,MAAM,kBAAkB,CAAC;AAChH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAqB,MAAM,oBAAoB,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAmB,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAsC,MAAM,kBAAkB,CAAC;AACpI,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAwC,MAAM,wBAAwB,CAAC;AAGnL,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AA2BxG,mFAAm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E,CAAC;QACzC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;QACpG,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE;QACnM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The declarative path's review (#249): what a project with no
|
|
3
|
+
* `migrations/` gets on a pull request, the same review the versioned
|
|
4
|
+
* path has where it can apply.
|
|
5
|
+
*
|
|
6
|
+
* - Lint over the plan: each change chant plans from the live database to
|
|
7
|
+
* the declared schema, against the statement rules that read a change's
|
|
8
|
+
* rule and class (`destructive`, `pg-rewrite`, `pg-access`,
|
|
9
|
+
* `ch-mutation`, `ch-rebuild`, `ch-access`), and `refused-step` for a
|
|
10
|
+
* change that needs its own Op. The plan carries no statement, so the
|
|
11
|
+
* rules that read one (`pg-lock`, `data-dependent`, `pg-signature`) run
|
|
12
|
+
* on the versioned path only. There is no `migration.sql` to hold a
|
|
13
|
+
* `-- yodel:allow` line, so nothing is silenced: `lint.rules` lowers a
|
|
14
|
+
* rule, and a policy override answers a denial.
|
|
15
|
+
* - Lint over the declared schema, offline: the lexicon's schema checks,
|
|
16
|
+
* the project's own checks and `lint.naming`, over the build of `src/`.
|
|
17
|
+
* - The policy (`yodel.config.ts` `policy`, at the base commit): the plan
|
|
18
|
+
* a rule sees is one entry of `pending`, `declared`, its steps the
|
|
19
|
+
* planned changes, and `declarative` says so. An override binds the
|
|
20
|
+
* digest {@link declarativeDigest} takes over the declared changes, under
|
|
21
|
+
* the ApplyOp's name.
|
|
22
|
+
*
|
|
23
|
+
* The ApplyOp's own gate binds chant's digest of the plan it runs; that
|
|
24
|
+
* one is known only once `yodel apply` stops at the gate, so the comment
|
|
25
|
+
* says how to approve, not which digest.
|
|
26
|
+
*/
|
|
27
|
+
import type { ClassifiedChange } from "@intentius/chant-lexicon-sql/core/classifier";
|
|
28
|
+
import type { PolicyPlan } from "../config/define.js";
|
|
29
|
+
import type { BuildOutput } from "../chant/build.js";
|
|
30
|
+
import type { Project, SqlDialect } from "../project.js";
|
|
31
|
+
import { type LintSettings } from "../lint/config.js";
|
|
32
|
+
import { type LintLevel } from "../lint/rules.js";
|
|
33
|
+
import type { LintReport } from "../lint/check.js";
|
|
34
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
35
|
+
/** The id of the one entry a declarative plan has in a policy rule's `pending`. */
|
|
36
|
+
export declare const DECLARED = "declared";
|
|
37
|
+
/** A finding before its level: the rule, and what it says. */
|
|
38
|
+
interface RawChangeFinding {
|
|
39
|
+
rule: string;
|
|
40
|
+
object: string;
|
|
41
|
+
message: string;
|
|
42
|
+
}
|
|
43
|
+
/** The statement-rule findings for the planned changes; `refused` are the ones that need their own Op. */
|
|
44
|
+
export declare function changeFindings(dialect: SqlDialect, changes: readonly ClassifiedChange[], refused?: readonly ClassifiedChange[]): RawChangeFinding[];
|
|
45
|
+
/** The schema findings over the declared schema: the lexicon's checks, the project's own, and `lint.naming`. */
|
|
46
|
+
export declare function declaredSchemaFindings(build: BuildOutput, options: {
|
|
47
|
+
settings?: LintSettings | undefined;
|
|
48
|
+
chantRules?: Record<string, unknown> | undefined;
|
|
49
|
+
policies?: readonly PostSynthCheck[];
|
|
50
|
+
env?: string | undefined;
|
|
51
|
+
}): Array<RawChangeFinding & {
|
|
52
|
+
level?: LintLevel;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* The lint report of a declarative project: the declared schema's findings
|
|
56
|
+
* (`src/`), and with `plan` the planned changes' (`the plan for <env>`),
|
|
57
|
+
* each at the level `lint.rules` gives it. Nothing is silenced.
|
|
58
|
+
*/
|
|
59
|
+
export declare function declarativeLint(input: {
|
|
60
|
+
project: Pick<Project, "dir" | "dialect">;
|
|
61
|
+
settings?: LintSettings | undefined;
|
|
62
|
+
schema: Array<RawChangeFinding & {
|
|
63
|
+
level?: LintLevel;
|
|
64
|
+
}>;
|
|
65
|
+
plan?: {
|
|
66
|
+
environment: string;
|
|
67
|
+
findings: RawChangeFinding[];
|
|
68
|
+
} | undefined;
|
|
69
|
+
policies?: readonly PostSynthCheck[];
|
|
70
|
+
}): LintReport;
|
|
71
|
+
/** Where a declarative finding is, as `yodel lint` groups it. */
|
|
72
|
+
export declare const DECLARED_SCHEMA = "src/ (the declared schema)";
|
|
73
|
+
export declare const planScope: (environment: string) => string;
|
|
74
|
+
/** The plan a policy rule sees for a declarative apply. */
|
|
75
|
+
export declare function declarativePolicyPlan(environment: string, dialect: SqlDialect, changes: readonly ClassifiedChange[], digest: string, now?: Date): PolicyPlan;
|
|
76
|
+
/** The digest an override of a declarative plan binds: chant's plan digest over the environment, dialect and declared changes. */
|
|
77
|
+
export declare function declarativeDigest(environment: string, dialect: SqlDialect, changes: readonly ClassifiedChange[]): Promise<string>;
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The declarative path's review (#249): what a project with no
|
|
3
|
+
* `migrations/` gets on a pull request, the same review the versioned
|
|
4
|
+
* path has where it can apply.
|
|
5
|
+
*
|
|
6
|
+
* - Lint over the plan: each change chant plans from the live database to
|
|
7
|
+
* the declared schema, against the statement rules that read a change's
|
|
8
|
+
* rule and class (`destructive`, `pg-rewrite`, `pg-access`,
|
|
9
|
+
* `ch-mutation`, `ch-rebuild`, `ch-access`), and `refused-step` for a
|
|
10
|
+
* change that needs its own Op. The plan carries no statement, so the
|
|
11
|
+
* rules that read one (`pg-lock`, `data-dependent`, `pg-signature`) run
|
|
12
|
+
* on the versioned path only. There is no `migration.sql` to hold a
|
|
13
|
+
* `-- yodel:allow` line, so nothing is silenced: `lint.rules` lowers a
|
|
14
|
+
* rule, and a policy override answers a denial.
|
|
15
|
+
* - Lint over the declared schema, offline: the lexicon's schema checks,
|
|
16
|
+
* the project's own checks and `lint.naming`, over the build of `src/`.
|
|
17
|
+
* - The policy (`yodel.config.ts` `policy`, at the base commit): the plan
|
|
18
|
+
* a rule sees is one entry of `pending`, `declared`, its steps the
|
|
19
|
+
* planned changes, and `declarative` says so. An override binds the
|
|
20
|
+
* digest {@link declarativeDigest} takes over the declared changes, under
|
|
21
|
+
* the ApplyOp's name.
|
|
22
|
+
*
|
|
23
|
+
* The ApplyOp's own gate binds chant's digest of the plan it runs; that
|
|
24
|
+
* one is known only once `yodel apply` stops at the gate, so the comment
|
|
25
|
+
* says how to approve, not which digest.
|
|
26
|
+
*/
|
|
27
|
+
import { takesAccessAway } from "../chant/access.js";
|
|
28
|
+
import { CLASSIFIER_RULES } from "@intentius/chant-lexicon-sql/clickhouse/plan/rules";
|
|
29
|
+
import { PG_CLASSIFIER_RULES } from "@intentius/chant-lexicon-sql/postgres/plan/rules";
|
|
30
|
+
import { levelOf } from "../lint/config.js";
|
|
31
|
+
import { LINT_RULES } from "../lint/rules.js";
|
|
32
|
+
import { SCHEMA_RULES, schemaDiagnostics, chantLevel } from "../lint/schema-checks.js";
|
|
33
|
+
import { schemaNames, NAMING_PRESETS } from "../lint/naming.js";
|
|
34
|
+
import { policyRules } from "../lint/policies.js";
|
|
35
|
+
/** The id of the one entry a declarative plan has in a policy rule's `pending`. */
|
|
36
|
+
export const DECLARED = "declared";
|
|
37
|
+
/** chant's plan digest kind for the declared changes an override binds. */
|
|
38
|
+
const DIGEST_KIND = "yodel-declarative";
|
|
39
|
+
const titled = (dialect, rule) => {
|
|
40
|
+
const r = (dialect === "clickhouse" ? CLASSIFIER_RULES : PG_CLASSIFIER_RULES)[rule];
|
|
41
|
+
return r?.title ? `${rule} ${r.title}` : rule;
|
|
42
|
+
};
|
|
43
|
+
/** How a change is named in a finding: `events (app.events) orderBy`. */
|
|
44
|
+
const changeName = (c) => `${c.object} ${c.field}`;
|
|
45
|
+
/** The statement-rule findings for the planned changes; `refused` are the ones that need their own Op. */
|
|
46
|
+
export function changeFindings(dialect, changes, refused = []) {
|
|
47
|
+
const out = [];
|
|
48
|
+
const isRefused = new Set(refused.map((c) => `${c.object}\u0000${c.field}\u0000${c.rule}`));
|
|
49
|
+
for (const c of changes) {
|
|
50
|
+
const what = `${titled(dialect, c.rule)} on ${changeName(c)}`;
|
|
51
|
+
const at = { object: c.object };
|
|
52
|
+
if (c.destructive)
|
|
53
|
+
out.push({ rule: "destructive", ...at, message: `${what}: removes data that cannot be recovered` });
|
|
54
|
+
if (dialect === "clickhouse" && c.class === "rewrite")
|
|
55
|
+
out.push({ rule: "ch-mutation", ...at, message: `${what}: a mutation that rewrites existing parts in the background, with no rollback` });
|
|
56
|
+
if (dialect === "clickhouse" && c.class === "rebuild")
|
|
57
|
+
out.push({ rule: "ch-rebuild", ...at, message: `${what}: a rebuild, every row copied into a new table and swapped in (ClickHouseRebuildOp)` });
|
|
58
|
+
if (dialect === "postgres" && c.class === "rewrite")
|
|
59
|
+
out.push({ rule: "pg-rewrite", ...at, message: `${what}: blocks reads and writes on the table while it runs` });
|
|
60
|
+
const away = takesAccessAway({ rule: c.rule });
|
|
61
|
+
if (away)
|
|
62
|
+
out.push({ rule: dialect === "clickhouse" ? "ch-access" : "pg-access", ...at, message: `${what}: ${away}, which changes what a ${dialect === "clickhouse" ? "user or role" : "role"} can do` });
|
|
63
|
+
if (isRefused.has(`${c.object}\u0000${c.field}\u0000${c.rule}`)) {
|
|
64
|
+
out.push({ rule: "refused-step", ...at, message: `${what}: yodel apply refuses it in place; it needs its own Op (${dialect === "clickhouse" ? "ClickHouseRebuildOp" : "PostgresMigrationOp"}), or a versioned migration that runs one` });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return out;
|
|
68
|
+
}
|
|
69
|
+
/** The schema findings over the declared schema: the lexicon's checks, the project's own, and `lint.naming`. */
|
|
70
|
+
export function declaredSchemaFindings(build, options) {
|
|
71
|
+
const out = [];
|
|
72
|
+
const configured = new Set(Object.keys(options.settings?.levels ?? {}));
|
|
73
|
+
for (const d of schemaDiagnostics(build, { ...(options.policies ? { policies: options.policies } : {}), env: options.env })) {
|
|
74
|
+
let level;
|
|
75
|
+
if (!configured.has(d.rule)) {
|
|
76
|
+
const set = chantLevel(options.chantRules?.[d.rule]);
|
|
77
|
+
if (set === "off")
|
|
78
|
+
continue;
|
|
79
|
+
level = set ?? d.level;
|
|
80
|
+
}
|
|
81
|
+
out.push({ rule: d.rule, object: d.entity ?? "", message: d.message, ...(level !== undefined ? { level } : {}) });
|
|
82
|
+
}
|
|
83
|
+
const naming = options.settings?.naming ?? {};
|
|
84
|
+
if (Object.keys(naming).length > 0) {
|
|
85
|
+
for (const n of schemaNames(build)) {
|
|
86
|
+
const rule = naming[n.kind];
|
|
87
|
+
if (!rule || rule.pattern.test(n.name))
|
|
88
|
+
continue;
|
|
89
|
+
out.push({ rule: "naming", object: n.export, message: `${n.label}: ${JSON.stringify(n.name)} does not match the naming rule for ${PLURAL[n.kind]} (${NAMING_PRESETS[rule.rule] ? `${rule.rule}, ` : ""}${NAMING_PRESETS[rule.rule] ?? rule.rule})` });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return out;
|
|
93
|
+
}
|
|
94
|
+
const PLURAL = { table: "tables", column: "columns", index: "indexes", constraint: "constraints" };
|
|
95
|
+
/** Every rule a declarative finding can name, for levels. */
|
|
96
|
+
const rulesFor = (policies) => ({ ...LINT_RULES, ...SCHEMA_RULES, ...policyRules(policies) });
|
|
97
|
+
/**
|
|
98
|
+
* The lint report of a declarative project: the declared schema's findings
|
|
99
|
+
* (`src/`), and with `plan` the planned changes' (`the plan for <env>`),
|
|
100
|
+
* each at the level `lint.rules` gives it. Nothing is silenced.
|
|
101
|
+
*/
|
|
102
|
+
export function declarativeLint(input) {
|
|
103
|
+
const rules = rulesFor(input.policies ?? []);
|
|
104
|
+
const findings = [];
|
|
105
|
+
const add = (where, f) => {
|
|
106
|
+
const rule = rules[f.rule];
|
|
107
|
+
const setting = rule ? levelOf(rule, input.settings) : "error";
|
|
108
|
+
if (setting === "off")
|
|
109
|
+
return;
|
|
110
|
+
if (rule?.dialect !== undefined && rule.dialect !== input.project.dialect)
|
|
111
|
+
return;
|
|
112
|
+
findings.push({ rule: f.rule, level: f.level ?? setting, message: f.object && !f.message.includes(f.object) ? `${f.object}: ${f.message}` : f.message, migration: where, ...(f.object ? { object: f.object } : {}) });
|
|
113
|
+
};
|
|
114
|
+
for (const f of input.schema)
|
|
115
|
+
add(DECLARED_SCHEMA, f);
|
|
116
|
+
if (input.plan)
|
|
117
|
+
for (const f of input.plan.findings)
|
|
118
|
+
add(planScope(input.plan.environment), f);
|
|
119
|
+
return {
|
|
120
|
+
dir: input.project.dir,
|
|
121
|
+
dialect: input.project.dialect,
|
|
122
|
+
environment: input.plan?.environment,
|
|
123
|
+
migrations: [],
|
|
124
|
+
findings,
|
|
125
|
+
silences: {},
|
|
126
|
+
errors: findings.filter((f) => f.level === "error").length,
|
|
127
|
+
warnings: findings.filter((f) => f.level === "warning").length,
|
|
128
|
+
silenced: 0,
|
|
129
|
+
declarative: true,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
/** Where a declarative finding is, as `yodel lint` groups it. */
|
|
133
|
+
export const DECLARED_SCHEMA = "src/ (the declared schema)";
|
|
134
|
+
export const planScope = (environment) => `the plan for ${environment}`;
|
|
135
|
+
/** The plan a policy rule sees for a declarative apply. */
|
|
136
|
+
export function declarativePolicyPlan(environment, dialect, changes, digest, now = new Date()) {
|
|
137
|
+
return {
|
|
138
|
+
environment,
|
|
139
|
+
dialect,
|
|
140
|
+
now: now.toISOString(),
|
|
141
|
+
declarative: true,
|
|
142
|
+
pending: [
|
|
143
|
+
{
|
|
144
|
+
id: DECLARED,
|
|
145
|
+
checksum: digest,
|
|
146
|
+
outOfOrder: false,
|
|
147
|
+
steps: changes.map((c, index) => ({ index, kind: "statement", object: c.object, name: changeName(c), classes: [c.class], destructive: c.destructive === true, rules: [c.rule] })),
|
|
148
|
+
silences: [],
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
/** The digest an override of a declarative plan binds: chant's plan digest over the environment, dialect and declared changes. */
|
|
154
|
+
export async function declarativeDigest(environment, dialect, changes) {
|
|
155
|
+
const { computePlanDigest } = await import("@intentius/chant/lifecycle/plan-digest");
|
|
156
|
+
const key = (c) => `${c.object}\u0000${c.field}\u0000${c.rule}`;
|
|
157
|
+
const sorted = [...changes]
|
|
158
|
+
.sort((a, b) => key(a).localeCompare(key(b)))
|
|
159
|
+
.map((c) => ({ object: c.object, field: c.field, rule: c.rule, class: c.class, destructive: c.destructive === true, ...(c.before !== undefined ? { before: c.before } : {}), ...(c.after !== undefined ? { after: c.after } : {}) }));
|
|
160
|
+
return computePlanDigest(DIGEST_KIND, { environment, dialect, changes: sorted });
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=review.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../src/declarative/review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAMH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,EAAE,OAAO,EAAqB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAiC,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAmB,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,mFAAmF;AACnF,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AAEnC,2EAA2E;AAC3E,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAExC,MAAM,MAAM,GAAG,CAAC,OAAmB,EAAE,IAAY,EAAU,EAAE;IAC3D,MAAM,CAAC,GAAG,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAa,CAAmC,CAAC;IAC/H,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAChD,CAAC,CAAC;AAEF,yEAAyE;AACzE,MAAM,UAAU,GAAG,CAAC,CAAmB,EAAU,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