@drzl/cli 4.24.2 → 4.24.4
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/dist/{chunk-54E2IO7N.js → chunk-QNYJFUVS.js} +6 -1
- package/dist/chunk-QNYJFUVS.js.map +1 -0
- package/dist/cli.cjs +12 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +8 -2
- package/dist/cli.js.map +1 -1
- package/dist/config.cjs +5 -0
- package/dist/config.cjs.map +1 -1
- package/dist/config.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-54E2IO7N.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
tableAliases,
|
|
25
25
|
tableFilterWarnings,
|
|
26
26
|
trpcOutDir
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QNYJFUVS.js";
|
|
28
28
|
|
|
29
29
|
// src/cli.ts
|
|
30
30
|
import { qualifiedTableName as qualifiedTableName2, SchemaAnalyzer as SchemaAnalyzer2 } from "@drzl/analyzer";
|
|
@@ -1886,6 +1886,8 @@ var EmitPlan = class {
|
|
|
1886
1886
|
constructor(options) {
|
|
1887
1887
|
this.byFile = /* @__PURE__ */ new Map();
|
|
1888
1888
|
this.dirs = /* @__PURE__ */ new Set();
|
|
1889
|
+
/** Paths this run has actually put bytes on disk for, which is not every path it recorded. */
|
|
1890
|
+
this.wrote = /* @__PURE__ */ new Set();
|
|
1889
1891
|
this.writes = options.write;
|
|
1890
1892
|
this.existing = options.existing;
|
|
1891
1893
|
}
|
|
@@ -1902,7 +1904,11 @@ var EmitPlan = class {
|
|
|
1902
1904
|
after: contents,
|
|
1903
1905
|
verdict: before === null ? "created" : before === contents ? "unchanged" : "changed"
|
|
1904
1906
|
});
|
|
1905
|
-
if (this.writes)
|
|
1907
|
+
if (!this.writes) return;
|
|
1908
|
+
const onDisk = prior ? this.wrote.has(file) ? prior.after : prior.before : before;
|
|
1909
|
+
if (onDisk === contents) return;
|
|
1910
|
+
await fs3.writeFile(file, contents, "utf8");
|
|
1911
|
+
this.wrote.add(file);
|
|
1906
1912
|
}
|
|
1907
1913
|
async read(file) {
|
|
1908
1914
|
if (this.existing) return this.existing.get(file) ?? null;
|