@backstage/plugin-techdocs-node 1.7.3-next.0 → 1.7.4-next.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/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @backstage/plugin-techdocs-node
2
2
 
3
+ ## 1.7.4-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-common@0.19.2-next.0
9
+ - @backstage/catalog-model@1.4.1
10
+ - @backstage/config@1.0.8
11
+ - @backstage/errors@1.2.1
12
+ - @backstage/integration@1.5.1
13
+ - @backstage/integration-aws-node@0.1.5
14
+ - @backstage/plugin-search-common@1.2.5
15
+
16
+ ## 1.7.3
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+ - @backstage/errors@1.2.1
22
+ - @backstage/backend-common@0.19.1
23
+ - @backstage/catalog-model@1.4.1
24
+ - @backstage/config@1.0.8
25
+ - @backstage/integration@1.5.1
26
+ - @backstage/integration-aws-node@0.1.5
27
+ - @backstage/plugin-search-common@1.2.5
28
+
3
29
  ## 1.7.3-next.0
4
30
 
5
31
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -424,7 +424,23 @@ const pathMkdocsYmlWithTechdocsPlugin = async (mkdocsYmlPath, logger) => {
424
424
  });
425
425
  };
426
426
 
427
- const _TechdocsGenerator = class {
427
+ var __defProp$a = Object.defineProperty;
428
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
429
+ var __publicField$a = (obj, key, value) => {
430
+ __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
431
+ return value;
432
+ };
433
+ const _TechdocsGenerator = class _TechdocsGenerator {
434
+ constructor(options) {
435
+ __publicField$a(this, "logger");
436
+ __publicField$a(this, "containerRunner");
437
+ __publicField$a(this, "options");
438
+ __publicField$a(this, "scmIntegrations");
439
+ this.logger = options.logger;
440
+ this.options = readGeneratorConfig(options.config, options.logger);
441
+ this.containerRunner = options.containerRunner;
442
+ this.scmIntegrations = options.scmIntegrations;
443
+ }
428
444
  /**
429
445
  * Returns a instance of TechDocs generator
430
446
  * @param config - A Backstage configuration
@@ -440,12 +456,6 @@ const _TechdocsGenerator = class {
440
456
  scmIntegrations
441
457
  });
442
458
  }
443
- constructor(options) {
444
- this.logger = options.logger;
445
- this.options = readGeneratorConfig(options.config, options.logger);
446
- this.containerRunner = options.containerRunner;
447
- this.scmIntegrations = options.scmIntegrations;
448
- }
449
459
  /** {@inheritDoc GeneratorBase.run} */
450
460
  async run(options) {
451
461
  var _a;
@@ -543,12 +553,12 @@ const _TechdocsGenerator = class {
543
553
  }
544
554
  }
545
555
  };
546
- let TechdocsGenerator = _TechdocsGenerator;
547
556
  /**
548
557
  * The default docker image (and version) used to generate content. Public
549
558
  * and static so that techdocs-node consumers can use the same version.
550
559
  */
551
- TechdocsGenerator.defaultDockerImage = "spotify/techdocs:v1.2.1";
560
+ __publicField$a(_TechdocsGenerator, "defaultDockerImage", "spotify/techdocs:v1.2.1");
561
+ let TechdocsGenerator = _TechdocsGenerator;
552
562
  function readGeneratorConfig(config, logger) {
553
563
  var _a;
554
564
  const legacyGeneratorType = config.getOptionalString(
@@ -572,9 +582,15 @@ function readGeneratorConfig(config, logger) {
572
582
  };
573
583
  }
574
584
 
585
+ var __defProp$9 = Object.defineProperty;
586
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
587
+ var __publicField$9 = (obj, key, value) => {
588
+ __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
589
+ return value;
590
+ };
575
591
  class Generators {
576
592
  constructor() {
577
- this.generatorMap = /* @__PURE__ */ new Map();
593
+ __publicField$9(this, "generatorMap", /* @__PURE__ */ new Map());
578
594
  }
579
595
  /**
580
596
  * Returns a generators instance containing a generator for TechDocs
@@ -682,7 +698,19 @@ const getDocFilesFromRepository = async (reader, entity, opts) => {
682
698
  };
683
699
  };
684
700
 
701
+ var __defProp$8 = Object.defineProperty;
702
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
703
+ var __publicField$8 = (obj, key, value) => {
704
+ __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
705
+ return value;
706
+ };
685
707
  class DirectoryPreparer {
708
+ constructor(config, _logger, reader) {
709
+ __publicField$8(this, "scmIntegrations");
710
+ __publicField$8(this, "reader");
711
+ this.reader = reader;
712
+ this.scmIntegrations = integration.ScmIntegrations.fromConfig(config);
713
+ }
686
714
  /**
687
715
  * Returns a directory preparer instance
688
716
  * @param config - A backstage config
@@ -691,10 +719,6 @@ class DirectoryPreparer {
691
719
  static fromConfig(config, options) {
692
720
  return new DirectoryPreparer(config, options.logger, options.reader);
693
721
  }
694
- constructor(config, _logger, reader) {
695
- this.reader = reader;
696
- this.scmIntegrations = integration.ScmIntegrations.fromConfig(config);
697
- }
698
722
  /** {@inheritDoc PreparerBase.prepare} */
699
723
  async prepare(entity, options) {
700
724
  var _a, _b;
@@ -734,7 +758,19 @@ class DirectoryPreparer {
734
758
  }
735
759
  }
736
760
 
761
+ var __defProp$7 = Object.defineProperty;
762
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
763
+ var __publicField$7 = (obj, key, value) => {
764
+ __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
765
+ return value;
766
+ };
737
767
  class UrlPreparer {
768
+ constructor(reader, logger) {
769
+ __publicField$7(this, "logger");
770
+ __publicField$7(this, "reader");
771
+ this.logger = logger;
772
+ this.reader = reader;
773
+ }
738
774
  /**
739
775
  * Returns a directory preparer instance
740
776
  * @param config - A URL preparer config containing the a logger and reader
@@ -742,10 +778,6 @@ class UrlPreparer {
742
778
  static fromConfig(options) {
743
779
  return new UrlPreparer(options.reader, options.logger);
744
780
  }
745
- constructor(reader, logger) {
746
- this.logger = logger;
747
- this.reader = reader;
748
- }
749
781
  /** {@inheritDoc PreparerBase.prepare} */
750
782
  async prepare(entity, options) {
751
783
  try {
@@ -767,9 +799,15 @@ class UrlPreparer {
767
799
  }
768
800
  }
769
801
 
802
+ var __defProp$6 = Object.defineProperty;
803
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
804
+ var __publicField$6 = (obj, key, value) => {
805
+ __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
806
+ return value;
807
+ };
770
808
  class Preparers {
771
809
  constructor() {
772
- this.preparerMap = /* @__PURE__ */ new Map();
810
+ __publicField$6(this, "preparerMap", /* @__PURE__ */ new Map());
773
811
  }
774
812
  /**
775
813
  * Returns a generators instance containing a generator for TechDocs
@@ -817,6 +855,12 @@ class Preparers {
817
855
  }
818
856
  }
819
857
 
858
+ var __defProp$5 = Object.defineProperty;
859
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
860
+ var __publicField$5 = (obj, key, value) => {
861
+ __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
862
+ return value;
863
+ };
820
864
  const streamToBuffer$1 = (stream) => {
821
865
  return new Promise((resolve, reject) => {
822
866
  try {
@@ -834,6 +878,12 @@ const streamToBuffer$1 = (stream) => {
834
878
  };
835
879
  class AwsS3Publish {
836
880
  constructor(options) {
881
+ __publicField$5(this, "storageClient");
882
+ __publicField$5(this, "bucketName");
883
+ __publicField$5(this, "legacyPathCasing");
884
+ __publicField$5(this, "logger");
885
+ __publicField$5(this, "bucketRootPath");
886
+ __publicField$5(this, "sse");
837
887
  this.storageClient = options.storageClient;
838
888
  this.bucketName = options.bucketName;
839
889
  this.legacyPathCasing = options.legacyPathCasing;
@@ -1204,9 +1254,19 @@ class AwsS3Publish {
1204
1254
  }
1205
1255
  }
1206
1256
 
1257
+ var __defProp$4 = Object.defineProperty;
1258
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1259
+ var __publicField$4 = (obj, key, value) => {
1260
+ __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
1261
+ return value;
1262
+ };
1207
1263
  const BATCH_CONCURRENCY = 3;
1208
1264
  class AzureBlobStoragePublish {
1209
1265
  constructor(options) {
1266
+ __publicField$4(this, "storageClient");
1267
+ __publicField$4(this, "containerName");
1268
+ __publicField$4(this, "legacyPathCasing");
1269
+ __publicField$4(this, "logger");
1210
1270
  this.storageClient = options.storageClient;
1211
1271
  this.containerName = options.containerName;
1212
1272
  this.legacyPathCasing = options.legacyPathCasing;
@@ -1511,10 +1571,19 @@ class AzureBlobStoragePublish {
1511
1571
  }
1512
1572
  }
1513
1573
 
1574
+ var __defProp$3 = Object.defineProperty;
1575
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1576
+ var __publicField$3 = (obj, key, value) => {
1577
+ __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
1578
+ return value;
1579
+ };
1514
1580
  class MigrateWriteStream extends stream.Writable {
1515
1581
  constructor(logger, removeOriginal, concurrency) {
1516
1582
  super({ objectMode: true });
1517
- this.inFlight = 0;
1583
+ __publicField$3(this, "logger");
1584
+ __publicField$3(this, "removeOriginal");
1585
+ __publicField$3(this, "maxConcurrency");
1586
+ __publicField$3(this, "inFlight", 0);
1518
1587
  this.logger = logger;
1519
1588
  this.removeOriginal = removeOriginal;
1520
1589
  this.maxConcurrency = concurrency;
@@ -1552,8 +1621,19 @@ class MigrateWriteStream extends stream.Writable {
1552
1621
  }
1553
1622
  }
1554
1623
 
1624
+ var __defProp$2 = Object.defineProperty;
1625
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1626
+ var __publicField$2 = (obj, key, value) => {
1627
+ __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
1628
+ return value;
1629
+ };
1555
1630
  class GoogleGCSPublish {
1556
1631
  constructor(options) {
1632
+ __publicField$2(this, "storageClient");
1633
+ __publicField$2(this, "bucketName");
1634
+ __publicField$2(this, "legacyPathCasing");
1635
+ __publicField$2(this, "logger");
1636
+ __publicField$2(this, "bucketRootPath");
1557
1637
  this.storageClient = options.storageClient;
1558
1638
  this.bucketName = options.bucketName;
1559
1639
  this.legacyPathCasing = options.legacyPathCasing;
@@ -1800,8 +1880,18 @@ class GoogleGCSPublish {
1800
1880
  }
1801
1881
  }
1802
1882
 
1883
+ var __defProp$1 = Object.defineProperty;
1884
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1885
+ var __publicField$1 = (obj, key, value) => {
1886
+ __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
1887
+ return value;
1888
+ };
1803
1889
  class LocalPublish {
1804
1890
  constructor(options) {
1891
+ __publicField$1(this, "legacyPathCasing");
1892
+ __publicField$1(this, "logger");
1893
+ __publicField$1(this, "discovery");
1894
+ __publicField$1(this, "staticDocsDir");
1805
1895
  this.logger = options.logger;
1806
1896
  this.discovery = options.discovery;
1807
1897
  this.legacyPathCasing = options.legacyPathCasing;
@@ -2024,6 +2114,12 @@ class LocalPublish {
2024
2114
  }
2025
2115
  }
2026
2116
 
2117
+ var __defProp = Object.defineProperty;
2118
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2119
+ var __publicField = (obj, key, value) => {
2120
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
2121
+ return value;
2122
+ };
2027
2123
  const streamToBuffer = (stream) => {
2028
2124
  return new Promise((resolve, reject) => {
2029
2125
  try {
@@ -2044,6 +2140,9 @@ const bufferToStream = (buffer) => {
2044
2140
  };
2045
2141
  class OpenStackSwiftPublish {
2046
2142
  constructor(options) {
2143
+ __publicField(this, "storageClient");
2144
+ __publicField(this, "containerName");
2145
+ __publicField(this, "logger");
2047
2146
  this.storageClient = options.storageClient;
2048
2147
  this.containerName = options.containerName;
2049
2148
  this.logger = options.logger;