@sqlanvil/cli 1.24.0 → 1.25.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.
Files changed (3) hide show
  1. package/README.md +4 -4
  2. package/bundle.js +20 -1
  3. package/package.json +9 -2
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  SQLAnvil is an open-source fork of [Dataform OSS](https://github.com/dataform-co/dataform) (Apache 2.0), extended with first-class PostgreSQL, Supabase, and MySQL/MariaDB support. Define your data transformations in SQLX, have SQLAnvil compile them to idiomatic SQL for your warehouse, and run, validate, and document the whole DAG from one CLI.
6
6
 
7
- > **SQLAnvil is not affiliated with or endorsed by Google.** The Dataform name and related marks are trademarks of Google LLC. See [NOTICE](NOTICE) for attribution.
7
+ > **SQLAnvil is not affiliated with or endorsed by Google.** The Dataform name and related marks are trademarks of Google LLC. See [NOTICE](https://github.com/SQLAnvil/sqlanvil/blob/main/NOTICE) for attribution.
8
8
 
9
9
  ---
10
10
 
@@ -86,7 +86,7 @@ Full documentation at **[sqlanvil.com/docs](https://sqlanvil.com/docs/)**.
86
86
  - [Validate](https://sqlanvil.com/docs/guides/validate/) · [Named Environments](https://sqlanvil.com/docs/guides/environments/) · [Artifacts & Catalog](https://sqlanvil.com/docs/guides/artifacts/)
87
87
  - [Configs Reference](https://sqlanvil.com/docs/reference/configs/) · [What's New](https://sqlanvil.com/docs/whats-new/)
88
88
 
89
- Writing sqlanvil projects with an AI agent? Point it at [`AGENTS.md`](AGENTS.md) — it corrects
89
+ Writing sqlanvil projects with an AI agent? Point it at [`AGENTS.md`](https://github.com/SQLAnvil/sqlanvil/blob/main/AGENTS.md) — it corrects
90
90
  the Dataform/BigQuery priors that otherwise produce broken sqlanvil code. Contributor/design
91
91
  docs live in the separate [`sqlanvil/docs`](https://github.com/sqlanvil/docs) repo.
92
92
 
@@ -123,12 +123,12 @@ bazel test //core/... //cli/...
123
123
  ```
124
124
 
125
125
  A Docker-based build container (`./scripts/docker-bazel`) remains available as an optional
126
- hermetic environment. See [contributing.md](contributing.md) for full instructions.
126
+ hermetic environment. See [contributing.md](https://github.com/SQLAnvil/sqlanvil/blob/main/contributing.md) for full instructions.
127
127
 
128
128
  ---
129
129
 
130
130
  ## License
131
131
 
132
- Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
132
+ Apache License 2.0. See [LICENSE](https://github.com/SQLAnvil/sqlanvil/blob/main/LICENSE) and [NOTICE](https://github.com/SQLAnvil/sqlanvil/blob/main/NOTICE).
133
133
 
134
134
  SQLAnvil is a derivative of Dataform OSS (originally developed by Dataform Co and contributed to by Google LLC). It has been fully renamed and extended with first-class PostgreSQL/Supabase/MySQL support. Licensed under Apache License 2.0.
package/bundle.js CHANGED
@@ -50621,7 +50621,7 @@ function collectEvaluationQueries(queryOrAction, concatenate, queryModifier = (q
50621
50621
  .filter(validationQuery => !!validationQuery.query);
50622
50622
  }
50623
50623
 
50624
- const version = "1.24.0";
50624
+ const version = "1.25.0";
50625
50625
  const dataformVersion = "3.0.61";
50626
50626
 
50627
50627
  async function build(compiledGraph, runConfig, dbadapter) {
@@ -51102,6 +51102,25 @@ it gitignored.`);
51102
51102
  - A mysql warehouse cannot read cross-warehouse \`connections:\` (single write warehouse;
51103
51103
  MySQL works as a SOURCE for a Postgres/Supabase project, not the other way).`);
51104
51104
  }
51105
+ const commentMechanics = isPostgresLike
51106
+ ? "`COMMENT ON TABLE|VIEW|MATERIALIZED VIEW|COLUMN`"
51107
+ : isMysql
51108
+ ? "table/column comments (tables + incrementals only — MySQL views can't carry comments)"
51109
+ : "table + column descriptions (nested fields included)";
51110
+ const constraintNote = warehouse === "bigquery"
51111
+ ? "append `NOT ENFORCED` (BigQuery stores them as catalog metadata for query engines)"
51112
+ : "real enforced constraints";
51113
+ sections.push(`## Metadata for AI/BI engines
51114
+
51115
+ - \`description:\` + \`columns: {}\` persist into the warehouse catalog on every run as
51116
+ ${commentMechanics} — BI copilots and text-to-SQL agents read them back from there. Name
51117
+ join targets in column descriptions (\`customer_id: "Foreign key to
51118
+ public.customers.customer_id."\`).
51119
+ - PK/FK constraints go in \`post_operations\` (no config field for them) — ${constraintNote};
51120
+ on an incremental, wrap the \`ALTER\` in \`\${when(!incremental(), \\\`…\\\`)}\`.
51121
+ - \`assertions: { uniqueKey | uniqueKeys: [[…],[…]], nonNull, rowConditions }\` make key
51122
+ claims TESTED on every run (\`uniqueKey\` and \`uniqueKeys\` are mutually exclusive).
51123
+ - Guide: https://sqlanvil.com/docs/guides/metadata/`);
51105
51124
  if (converted) {
51106
51125
  sections.push(`## This project was converted from Dataform
51107
51126
 
package/package.json CHANGED
@@ -46,7 +46,14 @@
46
46
  "**/wrap-ansi": "7.0.0",
47
47
  "**/string-width": "4.1.0"
48
48
  },
49
- "homepage": "https://github.com/sqlanvil/sqlanvil",
49
+ "homepage": "https://sqlanvil.com",
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "git+https://github.com/sqlanvil/sqlanvil.git"
53
+ },
54
+ "bugs": {
55
+ "url": "https://github.com/sqlanvil/sqlanvil/issues"
56
+ },
50
57
  "license": "Apache-2.0",
51
58
  "keywords": [
52
59
  "sqlanvil",
@@ -64,7 +71,7 @@
64
71
  "bin": {
65
72
  "sqlanvil": "bundle.js"
66
73
  },
67
- "version": "1.24.0",
74
+ "version": "1.25.0",
68
75
  "name": "@sqlanvil/cli",
69
76
  "description": "sqlanvil command line interface.",
70
77
  "main": "bundle.js"