@suss/manifest-aws 0.20.0 → 0.21.1

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.cjs CHANGED
@@ -541,12 +541,13 @@ function childStacksOf(document, ancestors) {
541
541
  }
542
542
  function childStack(opts) {
543
543
  const stackPath = [...opts.document.stackPath, opts.logicalId];
544
- const report = (reason, detail, templateUrl) => ({
544
+ const report = (reason, detail, templateUrl, templatePath = null) => ({
545
545
  type: "unfollowed",
546
546
  stack: {
547
547
  declaredIn: opts.document.path,
548
548
  stackPath,
549
549
  templateUrl,
550
+ templatePath,
550
551
  reason,
551
552
  detail
552
553
  }
@@ -578,10 +579,15 @@ function childStack(opts) {
578
579
  }
579
580
  const childPath = import_node_path2.default.resolve(import_node_path2.default.dirname(opts.document.path), url);
580
581
  if (opts.ancestors.includes(childPath)) {
581
- return report("cycle", `${url} is already open further up the tree`, url);
582
+ return report(
583
+ "cycle",
584
+ `${url} is already open further up the tree`,
585
+ url,
586
+ childPath
587
+ );
582
588
  }
583
589
  if (!import_node_fs2.default.existsSync(childPath)) {
584
- return report("fileMissing", `${url} is not on disk`, url);
590
+ return report("fileMissing", `${url} is not on disk`, url, childPath);
585
591
  }
586
592
  try {
587
593
  return {
@@ -596,7 +602,8 @@ function childStack(opts) {
596
602
  return report(
597
603
  "unreadable",
598
604
  `${url} could not be parsed: ${err instanceof Error ? err.message : String(err)}`,
599
- url
605
+ url,
606
+ childPath
600
607
  );
601
608
  }
602
609
  }
package/dist/index.d.cts CHANGED
@@ -233,6 +233,13 @@ interface UnfollowedStack {
233
233
  stackPath: string[];
234
234
  /** The template location as the document writes it, when it is a string. */
235
235
  templateUrl: string | null;
236
+ /**
237
+ * The file the location resolved to, for a location that points into
238
+ * this repository. Null for a remote URL, or for one nothing static
239
+ * can resolve. A caller that hashes what it read uses this to notice
240
+ * the day a missing or unparseable child becomes readable.
241
+ */
242
+ templatePath: string | null;
236
243
  reason: UnfollowedReason;
237
244
  /** One phrase saying what stopped the read, for a message to a person. */
238
245
  detail: string;
package/dist/index.d.ts CHANGED
@@ -233,6 +233,13 @@ interface UnfollowedStack {
233
233
  stackPath: string[];
234
234
  /** The template location as the document writes it, when it is a string. */
235
235
  templateUrl: string | null;
236
+ /**
237
+ * The file the location resolved to, for a location that points into
238
+ * this repository. Null for a remote URL, or for one nothing static
239
+ * can resolve. A caller that hashes what it read uses this to notice
240
+ * the day a missing or unparseable child becomes readable.
241
+ */
242
+ templatePath: string | null;
236
243
  reason: UnfollowedReason;
237
244
  /** One phrase saying what stopped the read, for a message to a person. */
238
245
  detail: string;
package/dist/index.js CHANGED
@@ -488,12 +488,13 @@ function childStacksOf(document, ancestors) {
488
488
  }
489
489
  function childStack(opts) {
490
490
  const stackPath = [...opts.document.stackPath, opts.logicalId];
491
- const report = (reason, detail, templateUrl) => ({
491
+ const report = (reason, detail, templateUrl, templatePath = null) => ({
492
492
  type: "unfollowed",
493
493
  stack: {
494
494
  declaredIn: opts.document.path,
495
495
  stackPath,
496
496
  templateUrl,
497
+ templatePath,
497
498
  reason,
498
499
  detail
499
500
  }
@@ -525,10 +526,15 @@ function childStack(opts) {
525
526
  }
526
527
  const childPath = path2.resolve(path2.dirname(opts.document.path), url);
527
528
  if (opts.ancestors.includes(childPath)) {
528
- return report("cycle", `${url} is already open further up the tree`, url);
529
+ return report(
530
+ "cycle",
531
+ `${url} is already open further up the tree`,
532
+ url,
533
+ childPath
534
+ );
529
535
  }
530
536
  if (!fs2.existsSync(childPath)) {
531
- return report("fileMissing", `${url} is not on disk`, url);
537
+ return report("fileMissing", `${url} is not on disk`, url, childPath);
532
538
  }
533
539
  try {
534
540
  return {
@@ -543,7 +549,8 @@ function childStack(opts) {
543
549
  return report(
544
550
  "unreadable",
545
551
  `${url} could not be parsed: ${err instanceof Error ? err.message : String(err)}`,
546
- url
552
+ url,
553
+ childPath
547
554
  );
548
555
  }
549
556
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suss/manifest-aws",
3
- "version": "0.20.0",
3
+ "version": "0.21.1",
4
4
  "type": "module",
5
5
  "description": "Parse AWS CloudFormation / SAM templates into plain data — the shared facts layer contract readers and manifest-driven framework packs both consume.",
6
6
  "keywords": [
@@ -45,7 +45,7 @@
45
45
  "typecheck": "tsc --noEmit"
46
46
  },
47
47
  "dependencies": {
48
- "@suss/ir-core": "0.20.0",
48
+ "@suss/ir-core": "0.21.1",
49
49
  "yaml": "^2.4.0"
50
50
  },
51
51
  "devDependencies": {