spec-up-t 1.0.0 → 1.0.2
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/package.json +1 -1
- package/src/get-xrefs-data.js +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-up-t",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Technical specification drafting tool that generates rich specification documents from markdown. Forked from https://github.com/decentralized-identity/spec-up by Daniel Buchner (https://github.com/csuwildcat)",
|
|
5
5
|
"main": "./index",
|
|
6
6
|
"repository": {
|
package/src/get-xrefs-data.js
CHANGED
|
@@ -285,6 +285,8 @@ function getXrefsData() {
|
|
|
285
285
|
|
|
286
286
|
// Write function that removes an entry from xrefs-data.json and xrefs-data.js based on the term and externalSpec
|
|
287
287
|
function removeXref(term, externalSpec) {
|
|
288
|
+
let messages = [];
|
|
289
|
+
|
|
288
290
|
// Read the JSON file
|
|
289
291
|
let currentXrefs = fs.readJsonSync(outputPathJSON);
|
|
290
292
|
|
|
@@ -292,8 +294,8 @@ function removeXref(term, externalSpec) {
|
|
|
292
294
|
const entryExists = currentXrefs.xrefs.some(xref => xref.term === term && xref.externalSpec === externalSpec);
|
|
293
295
|
|
|
294
296
|
if (!entryExists) {
|
|
295
|
-
|
|
296
|
-
return;
|
|
297
|
+
messages.push(`\n SPEC-UP-T: Entry with term "${term}" and externalSpec "${externalSpec}" not found.\n`);
|
|
298
|
+
return messages;
|
|
297
299
|
}
|
|
298
300
|
|
|
299
301
|
// Remove the entry from the JSON file
|
|
@@ -312,6 +314,9 @@ function removeXref(term, externalSpec) {
|
|
|
312
314
|
|
|
313
315
|
// Write the JS code to a .js file
|
|
314
316
|
fs.writeFileSync(outputPathJS, stringReadyForFileWrite, 'utf8');
|
|
317
|
+
|
|
318
|
+
messages.push(`\n SPEC-UP-T: Entry with term "${term}" and externalSpec "${externalSpec}" removed.\n`);
|
|
319
|
+
return messages;
|
|
315
320
|
}
|
|
316
321
|
|
|
317
322
|
module.exports = {
|