@gscdump/cli 0.11.2 → 0.11.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Harlan Wilton
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,7 +1,16 @@
1
- import { t as __exportAll } from "./rolldown-runtime.mjs";
2
1
  import fs from "node:fs/promises";
3
2
  import path from "node:path";
4
3
  import os from "node:os";
4
+ var __defProp = Object.defineProperty;
5
+ var __exportAll = (all, no_symbols) => {
6
+ let target = {};
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
11
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
12
+ return target;
13
+ };
5
14
  var config_exports = /* @__PURE__ */ __exportAll({
6
15
  defaultDataDir: () => defaultDataDir,
7
16
  getConfigDir: () => getConfigDir,
@@ -42,4 +51,4 @@ async function saveConfig(config) {
42
51
  function getConfigPath() {
43
52
  return path.join(configDir, "config.json");
44
53
  }
45
- export { loadConfig as a, setConfigDir as c, getConfigPath as i, defaultDataDir as n, resolveDataDir as o, getConfigDir as r, saveConfig as s, config_exports as t };
54
+ export { loadConfig as a, setConfigDir as c, getConfigPath as i, __exportAll as l, defaultDataDir as n, resolveDataDir as o, getConfigDir as r, saveConfig as s, config_exports as t };
package/dist/index.mjs CHANGED
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as __exportAll } from "./_chunks/rolldown-runtime.mjs";
3
- import { a as loadConfig, c as setConfigDir, i as getConfigPath, n as defaultDataDir, o as resolveDataDir, r as getConfigDir, s as saveConfig } from "./_chunks/config.mjs";
4
- import { t as ofetch } from "./_chunks/libs/ofetch.mjs";
2
+ import { a as loadConfig, c as setConfigDir, i as getConfigPath, l as __exportAll, n as defaultDataDir, o as resolveDataDir, r as getConfigDir, s as saveConfig } from "./_chunks/config.mjs";
5
3
  import process from "node:process";
6
4
  import { defineCommand, runMain } from "citty";
7
5
  import { defaultAnalyzerRegistry } from "@gscdump/analysis/registry";
@@ -15,8 +13,9 @@ import { cancel, confirm, isCancel, multiselect, select, text } from "@clack/pro
15
13
  import { addSite, batchInspectUrls, batchRequestIndexing, createAuth, daysAgo, deleteSite, discoverSitemap, fetchSitemap, fetchSitemapUrls, fetchSitesWithSitemaps, formatErrorForCli, getDateRange, getIndexingMetadata, getVerificationToken, getVerifiedSite, googleSearchConsole, listVerifiedSites, progressBar, requestIndexing, runSequentialBatch, siteUrlToVerificationSite, unverifySite, verificationMethodsFor, verifySite } from "gscdump";
16
14
  import { createServer } from "node:http";
17
15
  import { JWT, OAuth2Client } from "google-auth-library";
18
- import { Buffer } from "node:buffer";
16
+ import { ofetch } from "ofetch";
19
17
  import fs$1 from "node:fs";
18
+ import { Buffer } from "node:buffer";
20
19
  import { createConsola } from "consola";
21
20
  import { createNodeHarness } from "@gscdump/engine/node";
22
21
  import { TABLE_DIMS, transformGscRow } from "@gscdump/engine/ingest";
@@ -74,7 +73,7 @@ function loadEnvFromCwd() {
74
73
  }
75
74
  return applied;
76
75
  }
77
- const VERSION = "0.11.2";
76
+ const VERSION = "0.11.3";
78
77
  const baseLogger = createConsola({
79
78
  stdout: process.stderr,
80
79
  stderr: process.stderr
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/cli",
3
3
  "type": "module",
4
- "version": "0.11.2",
4
+ "version": "0.11.3",
5
5
  "description": "CLI for Google Search Console - dump, query, and run MCP server",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -40,12 +40,13 @@
40
40
  "citty": "^0.2.2",
41
41
  "consola": "^3.4.2",
42
42
  "google-auth-library": "^10.6.2",
43
+ "ofetch": "^1.5.1",
43
44
  "open": "^11.0.0",
44
- "@gscdump/engine": "0.11.2",
45
- "@gscdump/analysis": "0.11.2",
46
- "@gscdump/engine-gsc-api": "0.11.2",
47
- "@gscdump/mcp": "0.11.2",
48
- "gscdump": "0.11.2"
45
+ "@gscdump/engine-gsc-api": "0.11.3",
46
+ "@gscdump/analysis": "0.11.3",
47
+ "@gscdump/engine": "0.11.3",
48
+ "@gscdump/mcp": "0.11.3",
49
+ "gscdump": "0.11.3"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@duckdb/node-api": "1.5.1-r.2",
@@ -1,155 +0,0 @@
1
- # Licenses of Bundled Dependencies
2
-
3
- The published artifact additionally contains code with the following licenses:
4
- MIT
5
-
6
- # Bundled Dependencies
7
-
8
- ## destr, ofetch, ufo
9
-
10
- License: MIT
11
- Repositories: https://github.com/unjs/destr, https://github.com/unjs/ofetch, https://github.com/unjs/ufo
12
-
13
- > MIT License
14
- >
15
- > Copyright (c) Pooya Parsa <pooya@pi0.io>
16
- >
17
- > Permission is hereby granted, free of charge, to any person obtaining a copy
18
- > of this software and associated documentation files (the "Software"), to deal
19
- > in the Software without restriction, including without limitation the rights
20
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
- > copies of the Software, and to permit persons to whom the Software is
22
- > furnished to do so, subject to the following conditions:
23
- >
24
- > The above copyright notice and this permission notice shall be included in all
25
- > copies or substantial portions of the Software.
26
- >
27
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
- > SOFTWARE.
34
-
35
- ---------------------------------------
36
-
37
- ## node-fetch-native
38
-
39
- License: MIT
40
- Repository: https://github.com/unjs/node-fetch-native
41
-
42
- > MIT License
43
- >
44
- > Copyright (c) Pooya Parsa <pooya@pi0.io>
45
- >
46
- > Permission is hereby granted, free of charge, to any person obtaining a copy
47
- > of this software and associated documentation files (the "Software"), to deal
48
- > in the Software without restriction, including without limitation the rights
49
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
50
- > copies of the Software, and to permit persons to whom the Software is
51
- > furnished to do so, subject to the following conditions:
52
- >
53
- > The above copyright notice and this permission notice shall be included in all
54
- > copies or substantial portions of the Software.
55
- >
56
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
57
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
58
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
59
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
60
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
61
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
62
- > SOFTWARE.
63
- >
64
- > ---
65
- >
66
- > https://github.com/node-fetch/node-fetch
67
- >
68
- > The MIT License (MIT)
69
- >
70
- > Copyright (c) 2016 - 2020 Node Fetch Team
71
- >
72
- > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
73
- >
74
- > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
75
- >
76
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
77
- >
78
- > ---
79
- >
80
- > https://github.com/mysticatea/abort-controller
81
- >
82
- > MIT License
83
- >
84
- > Copyright (c) 2017 Toru Nagashima
85
- >
86
- > Permission is hereby granted, free of charge, to any person obtaining a copy
87
- > of this software and associated documentation files (the "Software"), to deal
88
- > in the Software without restriction, including without limitation the rights
89
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
90
- > copies of the Software, and to permit persons to whom the Software is
91
- > furnished to do so, subject to the following conditions:
92
- >
93
- > The above copyright notice and this permission notice shall be included in all
94
- > copies or substantial portions of the Software.
95
- >
96
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
97
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
98
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
99
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
100
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
101
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
102
- > SOFTWARE.
103
- >
104
- > ---
105
- >
106
- > https://github.com/TooTallNate/proxy-agents
107
- >
108
- > (The MIT License)
109
- >
110
- > Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
111
- >
112
- > Permission is hereby granted, free of charge, to any person obtaining
113
- > a copy of this software and associated documentation files (the
114
- > 'Software'), to deal in the Software without restriction, including
115
- > without limitation the rights to use, copy, modify, merge, publish,
116
- > distribute, sublicense, and/or sell copies of the Software, and to
117
- > permit persons to whom the Software is furnished to do so, subject to
118
- > the following conditions:
119
- >
120
- > The above copyright notice and this permission notice shall be
121
- > included in all copies or substantial portions of the Software.
122
- >
123
- > THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
124
- > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
125
- > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
126
- > IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
127
- > CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
128
- > TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
129
- > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
130
- >
131
- > ---
132
- >
133
- > https://github.com/nodejs/undici
134
- >
135
- > MIT License
136
- >
137
- > Copyright (c) Matteo Collina and Undici contributors
138
- >
139
- > Permission is hereby granted, free of charge, to any person obtaining a copy
140
- > of this software and associated documentation files (the "Software"), to deal
141
- > in the Software without restriction, including without limitation the rights
142
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
143
- > copies of the Software, and to permit persons to whom the Software is
144
- > furnished to do so, subject to the following conditions:
145
- >
146
- > The above copyright notice and this permission notice shall be included in all
147
- > copies or substantial portions of the Software.
148
- >
149
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
150
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
151
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
152
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
153
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
154
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
155
- > SOFTWARE.
@@ -1,42 +0,0 @@
1
- const suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
2
- const suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
3
- const JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
4
- function jsonParseTransform(key, value) {
5
- if (key === "__proto__" || key === "constructor" && value && typeof value === "object" && "prototype" in value) {
6
- warnKeyDropped(key);
7
- return;
8
- }
9
- return value;
10
- }
11
- function warnKeyDropped(key) {
12
- console.warn(`[destr] Dropping "${key}" key to prevent prototype pollution.`);
13
- }
14
- function destr(value, options = {}) {
15
- if (typeof value !== "string") return value;
16
- if (value[0] === "\"" && value[value.length - 1] === "\"" && value.indexOf("\\") === -1) return value.slice(1, -1);
17
- const _value = value.trim();
18
- if (_value.length <= 9) switch (_value.toLowerCase()) {
19
- case "true": return true;
20
- case "false": return false;
21
- case "undefined": return;
22
- case "null": return null;
23
- case "nan": return NaN;
24
- case "infinity": return Number.POSITIVE_INFINITY;
25
- case "-infinity": return Number.NEGATIVE_INFINITY;
26
- }
27
- if (!JsonSigRx.test(value)) {
28
- if (options.strict) throw new SyntaxError("[destr] Invalid JSON");
29
- return value;
30
- }
31
- try {
32
- if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {
33
- if (options.strict) throw new Error("[destr] Possible prototype pollution");
34
- return JSON.parse(value, jsonParseTransform);
35
- }
36
- return JSON.parse(value);
37
- } catch (error) {
38
- if (options.strict) throw error;
39
- return value;
40
- }
41
- }
42
- export { destr as t };