@wneng/create-keel 0.3.3 → 0.3.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/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/version.ts
|
|
4
|
-
var SCAFFOLDER_VERSION = "0.3.
|
|
4
|
+
var SCAFFOLDER_VERSION = "0.3.4";
|
|
5
5
|
|
|
6
6
|
// src/schema/options.ts
|
|
7
7
|
import Ajv from "ajv";
|
|
@@ -1724,7 +1724,7 @@ async function writePlan(plan, opts) {
|
|
|
1724
1724
|
} catch {
|
|
1725
1725
|
}
|
|
1726
1726
|
}
|
|
1727
|
-
await fs6.writeFile(abs, file.content, "utf8");
|
|
1727
|
+
await fs6.writeFile(abs, normalizeLineEndings(file.content), "utf8");
|
|
1728
1728
|
if (file.mode !== void 0) {
|
|
1729
1729
|
await fs6.chmod(abs, file.mode);
|
|
1730
1730
|
}
|
|
@@ -1778,6 +1778,9 @@ async function preflightBackupCapacity(absTarget, plan) {
|
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
+
function normalizeLineEndings(content) {
|
|
1782
|
+
return content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
1783
|
+
}
|
|
1781
1784
|
async function rollback(journal) {
|
|
1782
1785
|
for (let i = journal.overwrites.length - 1; i >= 0; i -= 1) {
|
|
1783
1786
|
const { absPath, originalContent } = journal.overwrites[i];
|