@alicloud/autowonder 0.3.37 → 0.3.39

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,11 +1,12 @@
1
1
  {
2
2
  "name": "@alicloud/autowonder",
3
- "version": "0.3.37",
3
+ "version": "0.3.39",
4
4
  "description": "AutoWonder local runtime — execute AI agent dispatch packages on your machine",
5
5
  "bin": {
6
6
  "autowonder": "bin/cli.js"
7
7
  },
8
8
  "files": [
9
+ "npm-shrinkwrap.json",
9
10
  "bin/",
10
11
  "lib/",
11
12
  "scripts/",
@@ -35,8 +36,16 @@
35
36
  "engines": {
36
37
  "node": ">=16"
37
38
  },
39
+ "optionalDependencies": {
40
+ "@playwright/mcp": "0.0.83",
41
+ "@modelcontextprotocol/sdk": "1.32.2",
42
+ "playwright": "1.64.0-alpha-1790635538000"
43
+ },
38
44
  "scripts": {
45
+ "prepack": "node scripts/verify-browser-package.js",
39
46
  "build": "./scripts/build-and-publish.sh --build",
40
- "test": "node --test test/*.test.js"
47
+ "test": "node --test test/*.test.js",
48
+ "test:browser": "node --test test/browser/*.test.mjs",
49
+ "test:browser:package": "node test/browser-packed-runner.js"
41
50
  }
42
51
  }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ const fs = require("node:fs");
4
+ const path = require("node:path");
5
+
6
+ function verifyBrowserPackage(root) {
7
+ for (const file of ["bin/browser.js", "lib/browser/cli.js", "lib/browser/browser.js", "lib/browser/gateway.js", "lib/browser/ui.js", "lib/browser/package.json", "lib/browser/README.md", "npm-shrinkwrap.json"]) {
8
+ if (!fs.existsSync(path.join(root, file))) throw new Error(`Missing browser package file: ${file}`);
9
+ }
10
+ const pkg = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8"));
11
+ const lock = JSON.parse(fs.readFileSync(path.join(root, "npm-shrinkwrap.json"), "utf8"));
12
+ if (lock.version !== pkg.version) throw new Error("Update npm-shrinkwrap.json for this release version");
13
+ for (const name of ["@playwright/mcp", "@modelcontextprotocol/sdk", "playwright"]) {
14
+ const version = pkg.optionalDependencies?.[name];
15
+ if (!version || version !== lock.packages?.[""]?.optionalDependencies?.[name] || version !== lock.packages?.[`node_modules/${name}`]?.version) {
16
+ throw new Error(`Browser dependency is not pinned consistently: ${name}`);
17
+ }
18
+ }
19
+ console.error("Browser package source and dependency lock verified.");
20
+ }
21
+
22
+ if (require.main === module) verifyBrowserPackage(path.join(__dirname, ".."));
23
+ module.exports = { verifyBrowserPackage };