@gscdump/analysis 0.19.1 → 0.19.3
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.mjs +2 -0
- package/dist/source/index.d.mts +1 -1
- package/dist/source/index.mjs +2 -0
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { buildExtrasQueries, buildTotalsSql, mergeExtras, pgResolverAdapter, res
|
|
|
9
9
|
import { ENGINE_QUERY_CAPABILITIES, createAttachedTableSource, createEngineQuerySource, queryComparisonRows, queryRows, rewriteForTableSource, runAnalyzerWithEngine, typedQuery } from "@gscdump/engine/source";
|
|
10
10
|
import { computeInputHash, createReportRegistry, defineReport } from "@gscdump/engine/report";
|
|
11
11
|
import { canProxyToGsc } from "@gscdump/engine-gsc-api";
|
|
12
|
+
import { isStateResolvable } from "gscdump/query/plan";
|
|
12
13
|
function clamp01(value) {
|
|
13
14
|
if (value < 0) return 0;
|
|
14
15
|
if (value > 1) return 1;
|
|
@@ -6767,6 +6768,7 @@ function nextDay(day) {
|
|
|
6767
6768
|
}
|
|
6768
6769
|
function shouldRouteToLive(state, site) {
|
|
6769
6770
|
if (!canProxyToGsc(state)) return false;
|
|
6771
|
+
if (!isStateResolvable(state)) return true;
|
|
6770
6772
|
const { startDate, endDate } = extractDateRange(state.filter);
|
|
6771
6773
|
if (!startDate || !endDate) return false;
|
|
6772
6774
|
if (!site.oldestDateSynced || !site.newestDateSynced) return true;
|
package/dist/source/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BuilderState } from "gscdump/query";
|
|
2
|
-
import { AnalysisQuerySource, QueryRow } from "@gscdump/engine/source";
|
|
3
2
|
import { PlannerCapabilities } from "gscdump/query/plan";
|
|
3
|
+
import { AnalysisQuerySource, QueryRow } from "@gscdump/engine/source";
|
|
4
4
|
interface SyncedRange {
|
|
5
5
|
oldestDateSynced: string | null;
|
|
6
6
|
newestDateSynced: string | null;
|
package/dist/source/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { canProxyToGsc } from "@gscdump/engine-gsc-api";
|
|
2
2
|
import { extractDateRange } from "gscdump/query";
|
|
3
|
+
import { isStateResolvable } from "gscdump/query/plan";
|
|
3
4
|
function hasGapInCoveredSpans(start, end, coveredSpans) {
|
|
4
5
|
let cursor = start;
|
|
5
6
|
for (const span of coveredSpans) {
|
|
@@ -17,6 +18,7 @@ function nextDay(day) {
|
|
|
17
18
|
}
|
|
18
19
|
function shouldRouteToLive(state, site) {
|
|
19
20
|
if (!canProxyToGsc(state)) return false;
|
|
21
|
+
if (!isStateResolvable(state)) return true;
|
|
20
22
|
const { startDate, endDate } = extractDateRange(state.filter);
|
|
21
23
|
if (!startDate || !endDate) return false;
|
|
22
24
|
if (!site.oldestDateSynced || !site.newestDateSynced) return true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/analysis",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.3",
|
|
5
5
|
"description": "GSC analyzers — striking-distance, opportunity, movers, decay, brand, clustering, concentration, seasonality. Pure row-based + DuckDB-native.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"drizzle-orm": "^0.45.2",
|
|
78
|
-
"@gscdump/engine
|
|
79
|
-
"gscdump": "0.19.
|
|
80
|
-
"
|
|
78
|
+
"@gscdump/engine": "0.19.3",
|
|
79
|
+
"@gscdump/engine-gsc-api": "0.19.3",
|
|
80
|
+
"gscdump": "0.19.3"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"vitest": "^4.1.6"
|