spec-up-t 0.11.41 → 1.0.0

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/index.js CHANGED
@@ -5,7 +5,7 @@ module.exports = function(options = {}) {
5
5
  fetchExternalSpecs,
6
6
  validateReferences,
7
7
  findExternalSpecByKey
8
- } = require('./references.js');
8
+ } = require('./src/references.js');
9
9
 
10
10
  const { runJsonKeyValidatorSync } = require('./src/json-key-validator.js');
11
11
  runJsonKeyValidatorSync();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-up-t",
3
- "version": "0.11.41",
3
+ "version": "1.0.0",
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": {
@@ -288,6 +288,14 @@ function removeXref(term, externalSpec) {
288
288
  // Read the JSON file
289
289
  let currentXrefs = fs.readJsonSync(outputPathJSON);
290
290
 
291
+ // Check if the term and externalSpec exist
292
+ const entryExists = currentXrefs.xrefs.some(xref => xref.term === term && xref.externalSpec === externalSpec);
293
+
294
+ if (!entryExists) {
295
+ console.log(`\n SPEC-UP-T: Entry with term "${term}" and externalSpec "${externalSpec}" not found.\n`);
296
+ return;
297
+ }
298
+
291
299
  // Remove the entry from the JSON file
292
300
  currentXrefs.xrefs = currentXrefs.xrefs.filter(xref => {
293
301
  return !(xref.term === term && xref.externalSpec === externalSpec);
File without changes