@gravito/constellation 3.0.0 → 3.0.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
@@ -976,7 +976,7 @@ var GenerateSitemapJob = class extends import_stream.Job {
976
976
  this.generator = new SitemapGenerator(options.generatorOptions);
977
977
  }
978
978
  async handle() {
979
- const { progressTracker, shadowProcessor, onProgress, onComplete, onError } = this.options;
979
+ const { progressTracker, onComplete, onError } = this.options;
980
980
  try {
981
981
  if (progressTracker) {
982
982
  const total = await this.calculateTotal();
@@ -984,8 +984,8 @@ var GenerateSitemapJob = class extends import_stream.Job {
984
984
  this.totalEntries = total;
985
985
  }
986
986
  await this.generateWithProgress();
987
- if (shadowProcessor) {
988
- await shadowProcessor.commit();
987
+ if (this.options.shadowProcessor) {
988
+ await this.options.shadowProcessor.commit();
989
989
  }
990
990
  if (progressTracker) {
991
991
  await progressTracker.complete();
@@ -1026,15 +1026,7 @@ var GenerateSitemapJob = class extends import_stream.Job {
1026
1026
  * 帶進度追蹤的生成
1027
1027
  */
1028
1028
  async generateWithProgress() {
1029
- const { progressTracker, shadowProcessor, onProgress } = this.options;
1030
- const {
1031
- providers,
1032
- maxEntriesPerFile = 5e4,
1033
- storage,
1034
- baseUrl,
1035
- pretty,
1036
- filename
1037
- } = this.options.generatorOptions;
1029
+ const { progressTracker, onProgress } = this.options;
1038
1030
  await this.generator.run();
1039
1031
  this.processedEntries = this.totalEntries;
1040
1032
  if (progressTracker) {
@@ -1273,7 +1265,7 @@ var OrbitSitemap = class _OrbitSitemap {
1273
1265
  if (this.mode === "dynamic") {
1274
1266
  this.installDynamic(core);
1275
1267
  } else {
1276
- console.log("[OrbitSitemap] Static mode configured. Use generate() to build sitemaps.");
1268
+ core.logger.info("[OrbitSitemap] Static mode configured. Use generate() to build sitemaps.");
1277
1269
  }
1278
1270
  }
1279
1271
  installDynamic(core) {
@@ -1539,6 +1531,11 @@ var RouteScanner = class {
1539
1531
  ...options
1540
1532
  };
1541
1533
  }
1534
+ /**
1535
+ * Scan the router and return discovered entries.
1536
+ *
1537
+ * @returns An array of sitemap entries.
1538
+ */
1542
1539
  getEntries() {
1543
1540
  const entries = [];
1544
1541
  const routes = this.extractRoutes(this.router);