squirrelscan 0.0.79 → 0.0.80

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squirrelscan",
3
- "version": "0.0.79",
3
+ "version": "0.0.80",
4
4
  "description": "Website QA tool built for coding agents. 260+ rules across SEO, performance, security, accessibility & agent experience, from the CLI, cloud, or MCP.",
5
5
  "bin": {
6
6
  "squirrel": "bin/squirrel.js"
@@ -18,11 +18,14 @@
18
18
  },
19
19
  "keywords": ["seo", "audit", "cli", "website", "llm", "accessibility", "performance", "security", "crawler"],
20
20
  "author": "squirrelscan",
21
- "license": "UNLICENSED",
21
+ "license": "MIT",
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
22
25
  "engines": {
23
26
  "node": ">=18"
24
27
  },
25
28
  "os": ["darwin", "linux", "win32"],
26
29
  "cpu": ["x64", "arm64"],
27
- "files": ["bin/", "lib/", "scripts/", "README.md"]
30
+ "files": ["bin/", "lib/", "scripts/postinstall.js", "README.md", "LICENSE", "THIRD_PARTY_NOTICES.md"]
28
31
  }
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Environment variables:
8
8
  * SQUIRREL_VERSION - Pin to specific version (e.g., v0.0.15)
9
- * SQUIRREL_CHANNEL - Release channel: stable or beta (default: stable)
9
+ * SQUIRREL_CHANNEL - Explicitly follow the latest stable or beta release
10
10
  */
11
11
 
12
12
  const https = require("https");
@@ -121,6 +121,34 @@ async function getLatestVersion(channel) {
121
121
  return release.tag_name;
122
122
  }
123
123
 
124
+ function normalizeVersion(version) {
125
+ return version.startsWith("v") ? version : `v${version}`;
126
+ }
127
+
128
+ async function resolveVersion(env = process.env, latestVersion = getLatestVersion) {
129
+ if (env.SQUIRREL_VERSION) {
130
+ return {
131
+ version: normalizeVersion(env.SQUIRREL_VERSION),
132
+ message: `Installing pinned version: ${normalizeVersion(env.SQUIRREL_VERSION)}`,
133
+ };
134
+ }
135
+
136
+ if (env.SQUIRREL_CHANNEL) {
137
+ const version = await latestVersion(env.SQUIRREL_CHANNEL);
138
+ return {
139
+ version,
140
+ message: `Latest version: ${version} (channel: ${env.SQUIRREL_CHANNEL})`,
141
+ };
142
+ }
143
+
144
+ const packageVersion = require("../package.json").version;
145
+ const version = normalizeVersion(packageVersion);
146
+ return {
147
+ version,
148
+ message: `Installing npm package version: ${version}`,
149
+ };
150
+ }
151
+
124
152
  async function main() {
125
153
  const platform = getPlatform();
126
154
  const ext = getBinaryExtension();
@@ -129,16 +157,9 @@ async function main() {
129
157
  const binDir = path.join(__dirname, "..", "bin");
130
158
  const binaryPath = path.join(binDir, `squirrel${ext}`);
131
159
 
132
- // Determine version: pinned, channel-based, or package default
133
- let version;
134
- if (process.env.SQUIRREL_VERSION) {
135
- version = process.env.SQUIRREL_VERSION;
136
- log(`Installing pinned version: ${version}`);
137
- } else {
138
- const channel = process.env.SQUIRREL_CHANNEL || "stable";
139
- version = await getLatestVersion(channel);
140
- log(`Latest version: ${version} (channel: ${channel})`);
141
- }
160
+ const resolved = await resolveVersion();
161
+ const version = resolved.version;
162
+ log(resolved.message);
142
163
 
143
164
  log(`Installing squirrelscan ${version} for ${platform}...`);
144
165
 
@@ -209,26 +230,15 @@ async function main() {
209
230
  }
210
231
 
211
232
  log("Installation complete!");
212
-
213
- // Install skill if npx available
214
- log("Installing audit-website skill...");
215
- const npxCmd = process.platform === "win32" ? "npx.cmd" : "npx";
216
- const skillResult = spawnSync(npxCmd, ["skills", "add", "squirrelscan/skills", "--skill", "audit-website", "-y", "-g"], {
217
- stdio: "pipe",
218
- windowsHide: true,
219
- });
220
-
221
- if (skillResult.status === 0) {
222
- info("Skill installed globally");
223
- } else {
224
- warn("Skill installation skipped (npx not available or failed)");
225
- info("Install manually: npx skills add squirrelscan/skills --skill audit-website -y -g");
226
- }
227
-
228
233
  info("Run 'squirrel --help' to get started");
234
+ info("Install agent integrations explicitly with 'squirrel skills install'");
229
235
  }
230
236
 
231
- main().catch((err) => {
232
- console.error(err);
233
- process.exit(1);
234
- });
237
+ module.exports = { normalizeVersion, resolveVersion };
238
+
239
+ if (require.main === module) {
240
+ main().catch((err) => {
241
+ console.error(err);
242
+ process.exit(1);
243
+ });
244
+ }