@nshiab/setup-data-project 1.0.31 → 1.0.32
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensureManagedSection.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureManagedSection.ts"],"names":[],"mappings":"AAGA,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,GAC7B,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ensureManagedSection.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureManagedSection.ts"],"names":[],"mappings":"AAGA,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,GAC7B,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,iBAAiB,CAqCzD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { log } from "@clack/prompts";
|
|
2
2
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
export function ensureManagedSection(options) {
|
|
4
|
-
const startMarker = `<!-- setup-data-project:${options.name}:start -->`;
|
|
5
|
-
const endMarker = `<!-- setup-data-project:${options.name}:end -->`;
|
|
4
|
+
const startMarker = `<!-- Do not remove / setup-data-project:${options.name}:start -->`;
|
|
5
|
+
const endMarker = `<!-- Do not remove / setup-data-project:${options.name}:end -->`;
|
|
6
6
|
const trimmedContent = options.content.trim();
|
|
7
7
|
const section = trimmedContent === ""
|
|
8
8
|
? `${startMarker}\n${endMarker}`
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensureManagedSection.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureManagedSection.ts"],"names":[],"mappings":"AAGA,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,GAC7B,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ensureManagedSection.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureManagedSection.ts"],"names":[],"mappings":"AAGA,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,GAC7B,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,iBAAiB,CAqCzD"}
|
|
@@ -4,8 +4,8 @@ exports.ensureManagedSection = ensureManagedSection;
|
|
|
4
4
|
const prompts_1 = require("@clack/prompts");
|
|
5
5
|
const node_fs_1 = require("node:fs");
|
|
6
6
|
function ensureManagedSection(options) {
|
|
7
|
-
const startMarker = `<!-- setup-data-project:${options.name}:start -->`;
|
|
8
|
-
const endMarker = `<!-- setup-data-project:${options.name}:end -->`;
|
|
7
|
+
const startMarker = `<!-- Do not remove / setup-data-project:${options.name}:start -->`;
|
|
8
|
+
const endMarker = `<!-- Do not remove / setup-data-project:${options.name}:end -->`;
|
|
9
9
|
const trimmedContent = options.content.trim();
|
|
10
10
|
const section = trimmedContent === ""
|
|
11
11
|
? `${startMarker}\n${endMarker}`
|