@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 +10 -13
- package/dist/index.d.cts +905 -29
- package/dist/index.d.ts +905 -29
- package/dist/index.js +10 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -855,7 +855,7 @@ var GenerateSitemapJob = class extends Job {
|
|
|
855
855
|
this.generator = new SitemapGenerator(options.generatorOptions);
|
|
856
856
|
}
|
|
857
857
|
async handle() {
|
|
858
|
-
const { progressTracker,
|
|
858
|
+
const { progressTracker, onComplete, onError } = this.options;
|
|
859
859
|
try {
|
|
860
860
|
if (progressTracker) {
|
|
861
861
|
const total = await this.calculateTotal();
|
|
@@ -863,8 +863,8 @@ var GenerateSitemapJob = class extends Job {
|
|
|
863
863
|
this.totalEntries = total;
|
|
864
864
|
}
|
|
865
865
|
await this.generateWithProgress();
|
|
866
|
-
if (shadowProcessor) {
|
|
867
|
-
await shadowProcessor.commit();
|
|
866
|
+
if (this.options.shadowProcessor) {
|
|
867
|
+
await this.options.shadowProcessor.commit();
|
|
868
868
|
}
|
|
869
869
|
if (progressTracker) {
|
|
870
870
|
await progressTracker.complete();
|
|
@@ -905,15 +905,7 @@ var GenerateSitemapJob = class extends Job {
|
|
|
905
905
|
* 帶進度追蹤的生成
|
|
906
906
|
*/
|
|
907
907
|
async generateWithProgress() {
|
|
908
|
-
const { progressTracker,
|
|
909
|
-
const {
|
|
910
|
-
providers,
|
|
911
|
-
maxEntriesPerFile = 5e4,
|
|
912
|
-
storage,
|
|
913
|
-
baseUrl,
|
|
914
|
-
pretty,
|
|
915
|
-
filename
|
|
916
|
-
} = this.options.generatorOptions;
|
|
908
|
+
const { progressTracker, onProgress } = this.options;
|
|
917
909
|
await this.generator.run();
|
|
918
910
|
this.processedEntries = this.totalEntries;
|
|
919
911
|
if (progressTracker) {
|
|
@@ -1152,7 +1144,7 @@ var OrbitSitemap = class _OrbitSitemap {
|
|
|
1152
1144
|
if (this.mode === "dynamic") {
|
|
1153
1145
|
this.installDynamic(core);
|
|
1154
1146
|
} else {
|
|
1155
|
-
|
|
1147
|
+
core.logger.info("[OrbitSitemap] Static mode configured. Use generate() to build sitemaps.");
|
|
1156
1148
|
}
|
|
1157
1149
|
}
|
|
1158
1150
|
installDynamic(core) {
|
|
@@ -1418,6 +1410,11 @@ var RouteScanner = class {
|
|
|
1418
1410
|
...options
|
|
1419
1411
|
};
|
|
1420
1412
|
}
|
|
1413
|
+
/**
|
|
1414
|
+
* Scan the router and return discovered entries.
|
|
1415
|
+
*
|
|
1416
|
+
* @returns An array of sitemap entries.
|
|
1417
|
+
*/
|
|
1421
1418
|
getEntries() {
|
|
1422
1419
|
const entries = [];
|
|
1423
1420
|
const routes = this.extractRoutes(this.router);
|
package/package.json
CHANGED