@stage5/lumine 0.3.74 → 0.3.75
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/lib/workspace.js +14 -3
- package/package.json +1 -1
package/lib/workspace.js
CHANGED
|
@@ -8,9 +8,11 @@ import {
|
|
|
8
8
|
EXCLUDED_UPLOAD_FILES,
|
|
9
9
|
LUMINE_AGENT_INSTRUCTIONS,
|
|
10
10
|
LUMINE_AGENT_INSTRUCTIONS_MARKER,
|
|
11
|
+
LUMINE_MAIN_CHECKOUT_INSTRUCTIONS_MARKER,
|
|
11
12
|
LUMINE_REFERENCE_INSTRUCTIONS,
|
|
12
13
|
LUMINE_REFERENCE_INSTRUCTIONS_MARKER,
|
|
13
14
|
LUMINE_SDK_REFERENCE_MARKER,
|
|
15
|
+
LUMINE_VERSION_CHECKOUT_INSTRUCTIONS_MARKER,
|
|
14
16
|
PROJECT_EFFECTIVE_LINE_MAX_COLUMNS,
|
|
15
17
|
PROJECT_MAX_EFFECTIVE_FILE_LINES,
|
|
16
18
|
PROJECT_MAX_FILES,
|
|
@@ -39,14 +41,23 @@ export async function writeReferenceInstructions({ dir }) {
|
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
+
// All checkout modes generate these same two files. A previous mode's header
|
|
45
|
+
// still identifies a CLI-managed guide and must change with the checkout.
|
|
46
|
+
// Custom guides omit the generated header; quoting a marker later is not ownership.
|
|
44
47
|
export async function writeInstructionFiles({ dir, marker, content }) {
|
|
48
|
+
const managedHeaders = new Set([
|
|
49
|
+
marker,
|
|
50
|
+
LUMINE_AGENT_INSTRUCTIONS_MARKER,
|
|
51
|
+
LUMINE_REFERENCE_INSTRUCTIONS_MARKER,
|
|
52
|
+
LUMINE_MAIN_CHECKOUT_INSTRUCTIONS_MARKER,
|
|
53
|
+
LUMINE_VERSION_CHECKOUT_INSTRUCTIONS_MARKER,
|
|
54
|
+
]);
|
|
45
55
|
for (const fileName of AGENT_INSTRUCTION_FILES) {
|
|
46
56
|
const filePath = path.join(dir, fileName);
|
|
47
57
|
try {
|
|
48
58
|
const existing = await fs.readFile(filePath, "utf8");
|
|
49
|
-
|
|
59
|
+
const header = existing.replace(/^\uFEFF/, "").split(/\r?\n/, 1)[0];
|
|
60
|
+
if (!managedHeaders.has(header)) {
|
|
50
61
|
continue;
|
|
51
62
|
}
|
|
52
63
|
} catch (error) {
|