gscdump 0.19.2 → 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/query/plan.d.mts +8 -1
- package/dist/query/plan.mjs +5 -1
- package/package.json +2 -2
package/dist/query/plan.d.mts
CHANGED
|
@@ -153,6 +153,13 @@ declare function isDatasetResolvable(dimensions: readonly Dimension[], filterDim
|
|
|
153
153
|
declare class UnresolvableDatasetError extends Error {
|
|
154
154
|
constructor(dimensions: readonly Dimension[], filterDims?: readonly Dimension[]);
|
|
155
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* `BuilderState`-level convenience for {@link isDatasetResolvable}: extracts
|
|
158
|
+
* the state's dimension filters (the same way `buildLogicalPlan` does) and
|
|
159
|
+
* checks them against the grouped dimensions. Lets routing code (e.g. the
|
|
160
|
+
* composite source) detect a cross-dimension query without rebuilding a plan.
|
|
161
|
+
*/
|
|
162
|
+
declare function isStateResolvable(state: BuilderState): boolean;
|
|
156
163
|
declare function buildLogicalPlan(state: BuilderState, capabilities?: PlannerCapabilities): LogicalQueryPlan;
|
|
157
164
|
declare function buildLogicalComparisonPlan(current: BuilderState, previous: BuilderState, capabilities?: PlannerCapabilities, comparisonFilter?: ComparisonFilter): LogicalComparisonPlan;
|
|
158
|
-
export { ComparisonFilter, LogicalComparisonPlan, LogicalDataset, LogicalDimensionFilter, LogicalFilterGroup, LogicalFilterLeaf, LogicalFilterNode, LogicalMetricFilter, LogicalQueryPlan, PlannerCapabilities, type TableName, UnresolvableDatasetError, UnsupportedLogicalCapabilityError, buildLogicalComparisonPlan, buildLogicalPlan, inferDataset, isDatasetResolvable };
|
|
165
|
+
export { ComparisonFilter, LogicalComparisonPlan, LogicalDataset, LogicalDimensionFilter, LogicalFilterGroup, LogicalFilterLeaf, LogicalFilterNode, LogicalMetricFilter, LogicalQueryPlan, PlannerCapabilities, type TableName, UnresolvableDatasetError, UnsupportedLogicalCapabilityError, buildLogicalComparisonPlan, buildLogicalPlan, inferDataset, isDatasetResolvable, isStateResolvable };
|
package/dist/query/plan.mjs
CHANGED
|
@@ -1712,6 +1712,10 @@ var UnresolvableDatasetError = class extends Error {
|
|
|
1712
1712
|
this.name = "UnresolvableDatasetError";
|
|
1713
1713
|
}
|
|
1714
1714
|
};
|
|
1715
|
+
function isStateResolvable(state) {
|
|
1716
|
+
const filterDims = collectInternalFilters(normalizeFilter(state.filter)).filter((f) => !isMetric(f.dimension)).filter((f) => !(f.dimension === "date" && isDateOperator(f.operator))).filter((f) => !(f.operator === "topLevel" || f.operator.startsWith("metric"))).filter((f) => !isQueryParam(f.dimension)).map((f) => f.dimension);
|
|
1717
|
+
return isDatasetResolvable(state.dimensions, filterDims);
|
|
1718
|
+
}
|
|
1715
1719
|
function requireCapability(capabilities, capability, enabled, context) {
|
|
1716
1720
|
if (enabled && !capabilities?.[capability]) throw new UnsupportedLogicalCapabilityError(capability, context);
|
|
1717
1721
|
}
|
|
@@ -1831,4 +1835,4 @@ function buildLogicalComparisonPlan(current, previous, capabilities = {}, compar
|
|
|
1831
1835
|
comparisonFilter
|
|
1832
1836
|
};
|
|
1833
1837
|
}
|
|
1834
|
-
export { UnresolvableDatasetError, UnsupportedLogicalCapabilityError, buildLogicalComparisonPlan, buildLogicalPlan, inferDataset, isDatasetResolvable };
|
|
1838
|
+
export { UnresolvableDatasetError, UnsupportedLogicalCapabilityError, buildLogicalComparisonPlan, buildLogicalPlan, inferDataset, isDatasetResolvable, isStateResolvable };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gscdump",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.3",
|
|
5
5
|
"description": "Google Search Console API wrapper with typed query builder, streaming pagination, and SEO analysis functions",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"defu": "^6.1.7",
|
|
109
109
|
"ofetch": "^1.5.1",
|
|
110
110
|
"ufo": "^1.6.4",
|
|
111
|
-
"@gscdump/contracts": "0.19.
|
|
111
|
+
"@gscdump/contracts": "0.19.3"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@googleapis/indexing": "^6.0.1",
|