@gscdump/engine 1.5.3 → 2.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.
@@ -1,54 +1,9 @@
1
1
  import { DataSource } from "../storage.mjs";
2
- import { ScheduleState } from "../schedule.mjs";
3
2
  import { Row, TenantCtx } from "@gscdump/contracts";
4
- /** GSC sitemap record we persist. Matches `Schema$WmxSitemap` but as plain JSON. */
5
- interface SitemapRecord {
6
- /** The sitemap URL (feedpath) as returned by GSC. */
7
- path: string;
8
- /** ISO-8601 timestamp of the snapshot run that captured this record. */
9
- capturedAt: string;
10
- /** Last time Google downloaded this sitemap (RFC 3339, from the API). */
11
- lastDownloaded?: string;
12
- /** Last time the sitemap was submitted. */
13
- lastSubmitted?: string;
14
- type?: string;
15
- isPending?: boolean;
16
- isSitemapsIndex?: boolean;
17
- errors?: string;
18
- warnings?: string;
19
- /** Per-content-type counts (web, image, video, news). */
20
- contents?: Array<{
21
- type?: string;
22
- submitted?: string;
23
- indexed?: string;
24
- }>;
25
- /** Raw payload for fields we don't promote to first-class columns. */
26
- raw?: unknown;
27
- /** Number of URLs observed in this feedpath at last snapshot. */
28
- urlCount?: number;
29
- /** Stable hash of the sorted normalized loc list at last snapshot. */
30
- contentHash?: string;
31
- /** Adaptive cadence state owned by `sitemapPolicy`. */
32
- schedule?: ScheduleState;
33
- }
34
- interface SitemapIndex {
35
- version: 1;
36
- /** Map of feedpathHash → latest SitemapRecord. */
37
- records: Record<string, SitemapRecord>;
38
- }
39
- interface SitemapHistoryDoc {
40
- version: 1;
41
- path: string;
42
- capturedAt: string;
43
- record: SitemapRecord;
44
- }
45
- /** Parsed URL entry from a sitemap XML. */
46
3
  interface ParsedUrl {
47
4
  loc: string;
48
- /** ISO-8601 lastmod from the sitemap, if present. */
49
5
  lastmod?: string;
50
6
  }
51
- /** A single URL row in the urls/index.parquet partition. */
52
7
  interface SitemapUrlRecord {
53
8
  feedpath: string;
54
9
  feedpathHash: string;
@@ -57,143 +12,231 @@ interface SitemapUrlRecord {
57
12
  lastmod?: string;
58
13
  firstSeenAt: number;
59
14
  lastSeenAt: number;
60
- /** Set when the URL has been removed. Null/undefined = currently live. */
61
15
  removedAt?: number;
62
16
  }
63
- interface SnapshotUrlsResult {
17
+ interface SitemapGenerationFeedManifest {
18
+ feedpath: string;
19
+ feedpathHash: string;
20
+ baseKey: string;
21
+ eventKey: string | null;
22
+ membershipHash: string;
23
+ payloadHash: string;
24
+ urlCount: number;
25
+ observedAt: number;
26
+ }
27
+ type SitemapLegacyImportEvidence = {
28
+ _tag: 'none';
29
+ } | {
30
+ _tag: 'metadata_only';
31
+ importedAt: number;
32
+ recordCount: number;
33
+ source: 'gsc_sitemaps';
34
+ };
35
+ interface SitemapSiteGenerationManifest {
36
+ version: 1;
37
+ generationId: string;
38
+ observedAt: number;
39
+ publishedAt: number;
40
+ completeness: {
41
+ _tag: 'complete';
42
+ };
43
+ membershipHistoryAvailableFrom: number | null;
44
+ legacyImport: SitemapLegacyImportEvidence;
45
+ previousGenerationId: string | null;
46
+ previousManifestKey: string | null;
47
+ eventKeys: string[];
48
+ feeds: Record<string, SitemapGenerationFeedManifest>;
49
+ }
50
+ interface SitemapStagedFeed {
51
+ version: 1;
52
+ generationId: string;
53
+ observedAt: number;
54
+ feed: SitemapGenerationFeedManifest;
55
+ }
56
+ type StageSitemapGenerationFeedResult = {
57
+ _tag: 'staged';
58
+ generationId: string;
59
+ feedpath: string;
60
+ membershipChanged: boolean;
61
+ payloadChanged: boolean;
64
62
  added: number;
65
63
  removed: number;
66
- kept: number;
67
- contentHash: string;
68
- /** True when current membership did not change. Initial history seeding may write. */
69
- unchanged: boolean;
64
+ updated: number;
65
+ } | {
66
+ _tag: 'invalid_feed';
67
+ reason: 'credentials' | 'empty' | 'invalid_url' | 'unsupported_protocol';
68
+ } | {
69
+ _tag: 'invalid_generation';
70
+ reason: 'empty_id' | 'invalid_observed_at';
71
+ } | {
72
+ _tag: 'conflict';
73
+ reason: 'stale_generation' | 'generation_reused';
74
+ };
75
+ interface CompleteSitemapTraversal {
76
+ _tag: 'complete';
77
+ expectedFeedpaths: readonly string[];
70
78
  }
79
+ type FinalizeSitemapGenerationResult = {
80
+ _tag: 'published';
81
+ generationId: string;
82
+ observedAt: number;
83
+ feedCount: number;
84
+ } | {
85
+ _tag: 'unchanged';
86
+ generationId: string;
87
+ observedAt: number;
88
+ feedCount: number;
89
+ } | {
90
+ _tag: 'incomplete';
91
+ missingFeedpaths: string[];
92
+ invalidFeedpaths: string[];
93
+ } | {
94
+ _tag: 'conflict';
95
+ reason: 'stale_generation' | 'generation_reused' | 'publication_changed';
96
+ } | {
97
+ _tag: 'invalid_generation';
98
+ reason: 'empty_id' | 'invalid_observed_at';
99
+ };
100
+ type SitemapGenerationReadResult = {
101
+ _tag: 'available';
102
+ manifest: SitemapSiteGenerationManifest;
103
+ } | {
104
+ _tag: 'unavailable';
105
+ reason: 'no_generation' | 'generation_not_found';
106
+ };
107
+ interface IterateSitemapGenerationUrlsOptions {
108
+ generationId?: string;
109
+ feedpath?: string;
110
+ }
111
+ type IterateSitemapGenerationUrlsResult = {
112
+ _tag: 'iterator';
113
+ generationId: string;
114
+ observedAt: number;
115
+ items: AsyncIterable<SitemapUrlRecord>;
116
+ completeness: {
117
+ _tag: 'complete';
118
+ };
119
+ membershipHistoryAvailableFrom: number | null;
120
+ } | {
121
+ _tag: 'invalid_request';
122
+ reason: 'invalid_feed';
123
+ } | {
124
+ _tag: 'unavailable';
125
+ reason: 'no_generation' | 'generation_not_found';
126
+ };
127
+ interface ListSitemapGenerationUrlsOptions {
128
+ generationId?: string;
129
+ feedpath?: string;
130
+ cursor?: string;
131
+ limit?: number;
132
+ }
133
+ type ListSitemapGenerationUrlsResult = {
134
+ _tag: 'page';
135
+ generationId: string;
136
+ observedAt: number;
137
+ items: SitemapUrlRecord[];
138
+ nextCursor: string | null;
139
+ completeness: {
140
+ _tag: 'complete';
141
+ };
142
+ membershipHistoryAvailableFrom: number | null;
143
+ } | {
144
+ _tag: 'invalid_request';
145
+ reason: 'invalid_limit' | 'invalid_cursor' | 'invalid_feed';
146
+ } | {
147
+ _tag: 'unavailable';
148
+ reason: 'no_generation' | 'generation_not_found';
149
+ };
150
+ type SitemapMembershipEvidence = {
151
+ _tag: 'present';
152
+ url: string;
153
+ feedpath: string;
154
+ lastmod: string | null;
155
+ firstSeenAt: number;
156
+ lastSeenAt: number;
157
+ } | {
158
+ _tag: 'absent';
159
+ url: string;
160
+ observedAt: number;
161
+ } | {
162
+ _tag: 'unknown';
163
+ url: string;
164
+ reason: 'no_generation' | 'generation_not_found';
165
+ };
166
+ type QuerySitemapGenerationMembershipResult = {
167
+ _tag: 'result';
168
+ generationId: string;
169
+ observedAt: number;
170
+ evidence: SitemapMembershipEvidence[];
171
+ completeness: {
172
+ _tag: 'complete';
173
+ };
174
+ membershipHistoryAvailableFrom: number | null;
175
+ } | {
176
+ _tag: 'unavailable';
177
+ reason: 'no_generation' | 'generation_not_found';
178
+ };
179
+ type RecordSitemapLegacyImportResult = {
180
+ _tag: 'recorded';
181
+ evidence: Extract<SitemapLegacyImportEvidence, {
182
+ _tag: 'metadata_only';
183
+ }>;
184
+ } | {
185
+ _tag: 'existing';
186
+ evidence: Extract<SitemapLegacyImportEvidence, {
187
+ _tag: 'metadata_only';
188
+ }>;
189
+ } | {
190
+ _tag: 'invalid';
191
+ reason: 'invalid_imported_at' | 'invalid_record_count';
192
+ };
71
193
  interface CompleteSitemapGeneration {
72
194
  _tag: 'complete';
73
195
  id: string;
74
- /** Unix epoch milliseconds. */
75
196
  observedAt: number;
76
197
  }
77
- interface ReconcileResult {
78
- /** Feedpaths that were absent from the live set and had their live URLs pruned. */
79
- feedpathsPruned: number;
80
- /** Total URL rows transitioned live → removed across pruned feedpaths. */
81
- urlsRemoved: number;
82
- }
83
- /**
84
- * Bounds on a single `compactUrls` call. `compactUrls` is memory-bounded (one
85
- * feedpath at a time) but was previously unbounded in TIME: a tenant with a
86
- * large accumulated delta backlog could run past a caller's execution budget.
87
- * Both bounds are checked BETWEEN feedpaths and only after at least one has
88
- * been compacted, so a call always makes forward progress.
89
- */
90
- interface CompactUrlsOptions {
91
- /** Stop before starting another feedpath once this many ms have elapsed. */
92
- deadlineMs?: number;
93
- /** Stop after compacting this many feedpaths. */
94
- maxFeedpaths?: number;
95
- }
96
- interface CompactUrlsResult {
97
- /** Feedpaths whose active deltas were folded and retired by this call. */
98
- compactedFeedpaths: number;
99
- /**
100
- * Feedpaths that still hold outstanding deltas. Call `compactUrls` again to
101
- * continue. No cursor is needed because the projection watermark excludes a
102
- * compacted feedpath's grace-retained deltas from the next call.
103
- */
104
- remainingFeedpaths: number;
105
- }
106
- interface DeltaEntry {
107
- feedpath: string;
108
- feedpathHash: string;
109
- urlHash: string;
110
- op: 'added' | 'removed';
111
- loc: string;
112
- lastmod?: string;
113
- at: number;
114
- }
115
198
  interface SitemapMembershipEvent {
116
199
  feedpath: string;
117
200
  feedpathHash: string;
118
201
  urlHash: string;
119
- op: 'added' | 'removed';
202
+ op: 'added' | 'removed' | 'updated';
120
203
  loc: string;
121
204
  lastmod?: string;
205
+ previousLastmod?: string;
122
206
  generationId: string;
123
- /** Unix epoch milliseconds. */
124
207
  observedAt: number;
125
- /** Stable ordering within one generation. */
126
208
  sequence: number;
127
- /** Whether this row also mutates the disposable current-state projection. */
128
209
  projectsState: boolean;
129
210
  }
130
211
  interface DateRange {
131
- /** YYYY-MM-DD inclusive. */
132
212
  from?: string;
133
- /** YYYY-MM-DD inclusive. */
134
213
  to?: string;
135
214
  }
136
- interface LoadUrlsOptions {
137
- includeRemoved?: boolean;
138
- }
139
215
  interface SitemapReadStore {
140
- /** Load the full site index (latest record per feedpath). */
141
- loadIndex: (ctx: TenantCtx) => Promise<SitemapIndex>;
142
- /** Fetch the latest snapshot for a feedpath, or undefined. */
143
- getLatest: (ctx: TenantCtx, path: string) => Promise<SitemapRecord | undefined>;
144
- /** Stream live (and optionally removed) URL rows for a feedpath. */
145
- loadUrls: (ctx: TenantCtx, feedpath: string, opts?: LoadUrlsOptions) => AsyncIterable<SitemapUrlRecord>;
146
- /** Stream all delta entries within `[from, to]` (YYYY-MM-DD inclusive). */
147
- loadDeltas: (ctx: TenantCtx, dateRange?: DateRange) => AsyncIterable<DeltaEntry>;
148
- /** Stream immutable membership events within `[from, to]`. */
149
216
  loadEvents: (ctx: TenantCtx, dateRange?: DateRange) => AsyncIterable<SitemapMembershipEvent>;
217
+ getSitemapGeneration: (ctx: TenantCtx, generationId?: string) => Promise<SitemapGenerationReadResult>;
218
+ iterateSitemapGenerationUrls: (ctx: TenantCtx, opts?: IterateSitemapGenerationUrlsOptions) => Promise<IterateSitemapGenerationUrlsResult>;
219
+ listSitemapGenerationUrls: (ctx: TenantCtx, opts?: ListSitemapGenerationUrlsOptions) => Promise<ListSitemapGenerationUrlsResult>;
220
+ querySitemapGenerationMembership: (ctx: TenantCtx, opts: {
221
+ generationId?: string;
222
+ urls: readonly string[];
223
+ }) => Promise<QuerySitemapGenerationMembershipResult>;
150
224
  }
151
225
  interface SitemapStore extends SitemapReadStore {
152
- /**
153
- * Persist a snapshot run. Updates the index + writes one immutable
154
- * history doc per record under `history/<feedpathHash>__<capturedAtMs>.json`.
155
- */
156
- writeSnapshot: (ctx: TenantCtx, records: readonly SitemapRecord[]) => Promise<void>;
157
- /**
158
- * Diff a complete sitemap generation against current state. The immutable
159
- * membership event lands before its disposable state delta.
160
- */
161
- snapshotUrls: (ctx: TenantCtx, generation: CompleteSitemapGeneration, feedpath: string, urls: readonly ParsedUrl[]) => Promise<SnapshotUrlsResult>;
162
- /**
163
- * Fold accumulated deltas into the prior index, one feedpath at a time:
164
- * rewrites each touched feedpath's `by-feed/<hash>/index.parquet` and deletes
165
- * the consumed delta files. Bounded per feedpath, so it stays within memory
166
- * regardless of total site URL count.
167
- *
168
- * Optionally bounded in TIME too (`opts.deadlineMs` / `opts.maxFeedpaths`).
169
- * A bounded call is safe to stop mid-way: each rewritten feedpath advances
170
- * the projection watermark, so the remainder is simply what the next call
171
- * finds. Callers drive this from `remainingFeedpaths`, not a cursor.
172
- */
173
- compactUrls: (ctx: TenantCtx, opts?: CompactUrlsOptions) => Promise<CompactUrlsResult>;
174
- /**
175
- * Site-wide convergence: mark every still-live URL whose owning feedpath is
176
- * absent from `liveFeedpaths` as removed. `compactUrls`/`snapshotUrls` only
177
- * prune URLs *inside* a feedpath that was re-observed; a whole feed dropped
178
- * from the sitemap list (no `snapshotUrls` call) leaves its URLs frozen-live
179
- * forever. This is the sidecar mirror of the D1 generation sweep: it rewrites
180
- * each dropped feedpath's `by-feed/<hash>/index.parquet` with `removedAt` set,
181
- * advances its projection watermark, and grace-retires outstanding deltas.
182
- * Bounded per feedpath, so memory stays flat regardless of site size. Live
183
- * feedpaths are never touched.
184
- */
185
- reconcile: (ctx: TenantCtx, generation: CompleteSitemapGeneration, opts: {
186
- liveFeedpaths: readonly string[];
187
- }) => Promise<ReconcileResult>;
226
+ stageSitemapGenerationFeed: (ctx: TenantCtx, generation: CompleteSitemapGeneration, feedpath: string, urls: readonly ParsedUrl[]) => Promise<StageSitemapGenerationFeedResult>;
227
+ finalizeSitemapGeneration: (ctx: TenantCtx, generation: CompleteSitemapGeneration, traversal: CompleteSitemapTraversal) => Promise<FinalizeSitemapGenerationResult>;
228
+ abortSitemapGeneration: (ctx: TenantCtx, generation: CompleteSitemapGeneration) => Promise<void>;
229
+ recordSitemapLegacyImport: (ctx: TenantCtx, input: {
230
+ importedAt: number;
231
+ recordCount: number;
232
+ }) => Promise<RecordSitemapLegacyImportResult>;
188
233
  }
189
234
  interface CreateSitemapReadStoreOptions {
190
235
  dataSource: DataSource;
191
- /** Override the feedpath hash (test seam). */
192
- hash?: (path: string) => string;
193
236
  }
194
- type SitemapMutation = <T>(ctx: TenantCtx, fn: () => Promise<T>) => Promise<T>;
237
+ type SitemapMutation = <T>(ctx: TenantCtx, effect: () => Promise<T>) => Promise<T>;
195
238
  interface CreateSitemapStoreOptions extends CreateSitemapReadStoreOptions {
196
239
  withMutation: SitemapMutation;
197
240
  now?: () => number;
198
241
  }
199
- export { CompactUrlsOptions, CompactUrlsResult, CompleteSitemapGeneration, CreateSitemapReadStoreOptions, CreateSitemapStoreOptions, DateRange, DeltaEntry, LoadUrlsOptions, ParsedUrl, ReconcileResult, SitemapHistoryDoc, SitemapIndex, SitemapMembershipEvent, SitemapMutation, SitemapReadStore, SitemapRecord, SitemapStore, SitemapUrlRecord, SnapshotUrlsResult };
242
+ export { CompleteSitemapGeneration, CompleteSitemapTraversal, CreateSitemapReadStoreOptions, CreateSitemapStoreOptions, DateRange, FinalizeSitemapGenerationResult, IterateSitemapGenerationUrlsOptions, IterateSitemapGenerationUrlsResult, ListSitemapGenerationUrlsOptions, ListSitemapGenerationUrlsResult, ParsedUrl, QuerySitemapGenerationMembershipResult, RecordSitemapLegacyImportResult, SitemapGenerationFeedManifest, SitemapGenerationReadResult, SitemapLegacyImportEvidence, SitemapMembershipEvent, SitemapMembershipEvidence, SitemapMutation, SitemapReadStore, SitemapSiteGenerationManifest, SitemapStagedFeed, SitemapStore, SitemapUrlRecord, StageSitemapGenerationFeedResult };
@@ -1,8 +1,3 @@
1
- import { readOptional } from "../adapters/read-optional.mjs";
2
- import { decodeParquetToRows } from "../adapters/hyparquet.mjs";
3
- import { mapEntityIo } from "./io.mjs";
4
- const SITEMAP_URLS_EVENT_PREFIX_RE = /\/urls\/events\/(\d{4}-\d{2}-\d{2})__[0-9a-f]+__\d+__[0-9a-f]+\.parquet$/;
5
- const SITEMAP_URLS_PENDING_GENERATION_RE = /\/urls\/generations\/pending\/([0-9a-f]+)\.json$/;
6
1
  const URLS_INDEX_COLUMNS = [
7
2
  {
8
3
  name: "feedpath",
@@ -45,7 +40,7 @@ const URLS_INDEX_COLUMNS = [
45
40
  nullable: true
46
41
  }
47
42
  ];
48
- const URLS_DELTA_COLUMNS = [
43
+ const URLS_EVENT_COLUMNS = [
49
44
  {
50
45
  name: "feedpath",
51
46
  type: "VARCHAR",
@@ -77,44 +72,7 @@ const URLS_DELTA_COLUMNS = [
77
72
  nullable: true
78
73
  },
79
74
  {
80
- name: "at",
81
- type: "BIGINT",
82
- nullable: false
83
- },
84
- {
85
- name: "generation_id",
86
- type: "VARCHAR",
87
- nullable: true
88
- }
89
- ];
90
- const URLS_EVENT_COLUMNS = [
91
- {
92
- name: "feedpath",
93
- type: "VARCHAR",
94
- nullable: false
95
- },
96
- {
97
- name: "feedpath_hash",
98
- type: "VARCHAR",
99
- nullable: false
100
- },
101
- {
102
- name: "url_hash",
103
- type: "VARCHAR",
104
- nullable: false
105
- },
106
- {
107
- name: "op",
108
- type: "VARCHAR",
109
- nullable: false
110
- },
111
- {
112
- name: "loc",
113
- type: "VARCHAR",
114
- nullable: false
115
- },
116
- {
117
- name: "lastmod",
75
+ name: "previous_lastmod",
118
76
  type: "VARCHAR",
119
77
  nullable: true
120
78
  },
@@ -137,26 +95,6 @@ const URLS_EVENT_COLUMNS = [
137
95
  name: "projects_state",
138
96
  type: "INTEGER",
139
97
  nullable: false
140
- },
141
- {
142
- name: "seed_generation",
143
- type: "INTEGER",
144
- nullable: false
145
- },
146
- {
147
- name: "generation_kind",
148
- type: "VARCHAR",
149
- nullable: false
150
- },
151
- {
152
- name: "content_hash",
153
- type: "VARCHAR",
154
- nullable: true
155
- },
156
- {
157
- name: "input_count",
158
- type: "INTEGER",
159
- nullable: true
160
98
  }
161
99
  ];
162
100
  function rowToUrlRecord(row) {
@@ -171,73 +109,16 @@ function rowToUrlRecord(row) {
171
109
  removedAt: row.removed_at == null ? void 0 : Number(row.removed_at)
172
110
  };
173
111
  }
174
- function urlRecordToRow(r) {
112
+ function urlRecordToRow(record) {
175
113
  return {
176
- feedpath: r.feedpath,
177
- feedpath_hash: r.feedpathHash,
178
- url_hash: r.urlHash,
179
- loc: r.loc,
180
- lastmod: r.lastmod ?? null,
181
- first_seen_at: r.firstSeenAt,
182
- last_seen_at: r.lastSeenAt,
183
- removed_at: r.removedAt ?? null
184
- };
185
- }
186
- function createSitemapUrlState(indexRows) {
187
- const state = {
188
- live: /* @__PURE__ */ new Map(),
189
- removed: /* @__PURE__ */ new Map()
114
+ feedpath: record.feedpath,
115
+ feedpath_hash: record.feedpathHash,
116
+ url_hash: record.urlHash,
117
+ loc: record.loc,
118
+ lastmod: record.lastmod ?? null,
119
+ first_seen_at: record.firstSeenAt,
120
+ last_seen_at: record.lastSeenAt,
121
+ removed_at: record.removedAt ?? null
190
122
  };
191
- for (const row of indexRows) {
192
- const record = rowToUrlRecord(row);
193
- if (record.removedAt == null) state.live.set(record.urlHash, record);
194
- else state.removed.set(record.urlHash, record);
195
- }
196
- return state;
197
- }
198
- function applySitemapDeltaRows(state, rows) {
199
- for (const row of rows) {
200
- const urlHash = String(row.url_hash);
201
- const observedAt = Number(row.at);
202
- const op = String(row.op);
203
- if (op === "added") {
204
- const previous = state.live.get(urlHash) ?? state.removed.get(urlHash);
205
- state.removed.delete(urlHash);
206
- state.live.set(urlHash, {
207
- feedpath: String(row.feedpath),
208
- feedpathHash: String(row.feedpath_hash),
209
- urlHash,
210
- loc: String(row.loc),
211
- lastmod: row.lastmod == null ? void 0 : String(row.lastmod),
212
- firstSeenAt: previous?.firstSeenAt ?? observedAt,
213
- lastSeenAt: observedAt
214
- });
215
- } else if (op === "removed") {
216
- const previous = state.live.get(urlHash);
217
- state.live.delete(urlHash);
218
- if (previous) state.removed.set(urlHash, {
219
- ...previous,
220
- removedAt: observedAt
221
- });
222
- }
223
- }
224
- }
225
- function applySitemapDeltaFiles(state, files) {
226
- for (const file of files) applySitemapDeltaRows(state, file.rows);
227
- }
228
- function sortSitemapDeltaFiles(files) {
229
- return files.sort((a, b) => a.key.localeCompare(b.key));
230
- }
231
- async function readSitemapDeltaFiles(ds, keys) {
232
- return sortSitemapDeltaFiles((await mapEntityIo(keys, async (key) => {
233
- const bytes = await readOptional(ds, key);
234
- return bytes ? {
235
- key,
236
- rows: await decodeParquetToRows(bytes)
237
- } : void 0;
238
- })).filter((file) => file !== void 0));
239
- }
240
- function dateInRange(date, range) {
241
- return (!range?.from || date >= range.from) && (!range?.to || date <= range.to);
242
123
  }
243
- export { SITEMAP_URLS_EVENT_PREFIX_RE, SITEMAP_URLS_PENDING_GENERATION_RE, URLS_DELTA_COLUMNS, URLS_EVENT_COLUMNS, URLS_INDEX_COLUMNS, applySitemapDeltaFiles, applySitemapDeltaRows, createSitemapUrlState, dateInRange, readSitemapDeltaFiles, rowToUrlRecord, sortSitemapDeltaFiles, urlRecordToRow };
124
+ export { URLS_EVENT_COLUMNS, URLS_INDEX_COLUMNS, rowToUrlRecord, urlRecordToRow };