wuying-agentbay-sdk 0.10.2 → 0.11.0
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/chunk-E7QC5S76.mjs +3143 -0
- package/dist/chunk-E7QC5S76.mjs.map +1 -0
- package/dist/chunk-ZUB35HKV.cjs +3134 -0
- package/dist/chunk-ZUB35HKV.cjs.map +1 -0
- package/dist/index.cjs +3588 -3921
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2088 -687
- package/dist/index.d.ts +2088 -687
- package/dist/index.mjs +3556 -3889
- package/dist/index.mjs.map +1 -1
- package/dist/key-normalizer-AF7APGQZ.cjs +136 -0
- package/dist/key-normalizer-AF7APGQZ.cjs.map +1 -0
- package/dist/key-normalizer-QDBRLFHF.mjs +145 -0
- package/dist/key-normalizer-QDBRLFHF.mjs.map +1 -0
- package/dist/model-2G37RFQQ.cjs +188 -0
- package/dist/model-2G37RFQQ.cjs.map +1 -0
- package/dist/model-ZFTLKEMC.mjs +197 -0
- package/docs/api/README.md +26 -0
- package/docs/api/browser-use/browser.md +177 -0
- package/docs/api/browser-use/extension.md +284 -0
- package/docs/api/codespace/code.md +77 -0
- package/docs/api/common-features/advanced/agent.md +84 -0
- package/docs/api/common-features/advanced/oss.md +221 -0
- package/docs/api/common-features/basics/agentbay.md +181 -0
- package/docs/api/common-features/basics/command.md +83 -0
- package/docs/api/common-features/basics/context-manager.md +130 -0
- package/docs/api/common-features/basics/context-sync.md +51 -0
- package/docs/api/common-features/basics/context.md +348 -0
- package/docs/api/common-features/basics/filesystem.md +499 -0
- package/docs/api/common-features/basics/logging.md +77 -0
- package/docs/api/common-features/basics/session.md +412 -0
- package/docs/api/computer-use/computer.md +786 -0
- package/docs/api/mobile-use/mobile.md +395 -0
- package/docs/examples/README.md +332 -0
- package/docs/examples/basic-usage.ts +86 -0
- package/docs/examples/browser-use/browser/README.md +356 -0
- package/docs/examples/browser-use/browser/basic-usage.ts +136 -0
- package/docs/examples/browser-use/browser/browser-command-args.ts +117 -0
- package/docs/examples/browser-use/browser/browser-context-cookie-persistence.ts +348 -0
- package/docs/examples/browser-use/browser/browser-fingerprint-basic-usage.ts +121 -0
- package/docs/examples/browser-use/browser/browser-fingerprint-construct.ts +114 -0
- package/docs/examples/browser-use/browser/browser-fingerprint-local-sync.ts +98 -0
- package/docs/examples/browser-use/browser/browser-fingerprint-persistence.ts +242 -0
- package/docs/examples/browser-use/browser/browser-proxies.ts +149 -0
- package/docs/examples/browser-use/browser/browser-type-example.ts +266 -0
- package/docs/examples/browser-use/browser/browser-viewport.ts +129 -0
- package/docs/examples/browser-use/browser/call_for_user_jd.ts +184 -0
- package/docs/examples/browser-use/browser/captcha_tongcheng.ts +151 -0
- package/docs/examples/browser-use/browser/run-2048.ts +209 -0
- package/docs/examples/browser-use/browser/run-sudoku.ts +150 -0
- package/docs/examples/browser-use/browser/screenshot-example.ts +132 -0
- package/docs/examples/browser-use/extension-example/README.md +252 -0
- package/docs/examples/browser-use/extension-example/extension-example.ts +380 -0
- package/docs/examples/codespace/automation/automation-example.ts +322 -0
- package/docs/examples/common-features/advanced/agent-module-example/README.md +40 -0
- package/docs/examples/common-features/advanced/agent-module-example.ts +66 -0
- package/docs/examples/common-features/advanced/archive-upload-mode-example/README.md +212 -0
- package/docs/examples/common-features/advanced/archive-upload-mode-example/archive-upload-mode-example.ts +213 -0
- package/docs/examples/common-features/advanced/vpc-session-example/README.md +47 -0
- package/docs/examples/common-features/advanced/vpc-session-example.ts +106 -0
- package/docs/examples/common-features/basics/archive-upload-mode-example/README.md +236 -0
- package/docs/examples/common-features/basics/archive-upload-mode-example/main.ts +236 -0
- package/docs/examples/common-features/basics/command-example/README.md +47 -0
- package/docs/examples/common-features/basics/command-example/command-example.ts +153 -0
- package/docs/examples/common-features/basics/context-management/README.md +55 -0
- package/docs/examples/common-features/basics/context-management/context-management.ts +140 -0
- package/docs/examples/common-features/basics/data-persistence/README.md +129 -0
- package/docs/examples/common-features/basics/data-persistence/context-sync-demo.md +144 -0
- package/docs/examples/common-features/basics/data-persistence/context-sync-demo.ts +275 -0
- package/docs/examples/common-features/basics/data-persistence/data-persistence.ts +259 -0
- package/docs/examples/common-features/basics/data-persistence/recycle-policy-example.ts +294 -0
- package/docs/examples/common-features/basics/filesystem-example/README.md +57 -0
- package/docs/examples/common-features/basics/filesystem-example/filesystem-example.ts +164 -0
- package/docs/examples/common-features/basics/filesystem-example/filesystem-filetransfer-example.ts +153 -0
- package/docs/examples/common-features/basics/filesystem-example/watch-directory-example.ts +168 -0
- package/docs/examples/common-features/basics/get/README.md +136 -0
- package/docs/examples/common-features/basics/get/main.ts +79 -0
- package/docs/examples/common-features/basics/list_sessions/README.md +54 -0
- package/docs/examples/common-features/basics/list_sessions/main.ts +258 -0
- package/docs/examples/common-features/basics/mcp_tool_direct_call/README.md +142 -0
- package/docs/examples/common-features/basics/mcp_tool_direct_call/main.ts +135 -0
- package/docs/examples/common-features/basics/session-creation/README.md +28 -0
- package/docs/examples/common-features/basics/session-creation/session-creation.ts +295 -0
- package/docs/examples/mobile-use/mobile-get-adb-url/README.md +92 -0
- package/docs/examples/mobile-use/mobile-get-adb-url/index.ts +80 -0
- package/docs/examples/mobile-use/mobile-get-adb-url/package-lock.json +279 -0
- package/docs/examples/mobile-use/mobile-get-adb-url/package.json +18 -0
- package/package.json +18 -11
- package/dist/application-KZWXH46T.mjs +0 -17
- package/dist/application-LMA7KSRH.cjs +0 -8
- package/dist/application-LMA7KSRH.cjs.map +0 -1
- package/dist/chunk-BQNGKBQF.mjs +0 -386
- package/dist/chunk-BQNGKBQF.mjs.map +0 -1
- package/dist/chunk-IOVGAAJL.cjs +0 -558
- package/dist/chunk-IOVGAAJL.cjs.map +0 -1
- package/dist/chunk-UF2TC2R4.mjs +0 -567
- package/dist/chunk-UF2TC2R4.mjs.map +0 -1
- package/dist/chunk-X6MS7Z5L.cjs +0 -377
- package/dist/chunk-X6MS7Z5L.cjs.map +0 -1
- package/dist/window-DH37ZDD5.mjs +0 -17
- package/dist/window-DH37ZDD5.mjs.map +0 -1
- package/dist/window-U7N3H735.cjs +0 -8
- package/dist/window-U7N3H735.cjs.map +0 -1
- /package/dist/{application-KZWXH46T.mjs.map → model-ZFTLKEMC.mjs.map} +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mobile GetAdbUrl Example
|
|
3
|
+
*
|
|
4
|
+
* This example demonstrates how to use the getAdbUrl method to retrieve
|
|
5
|
+
* an ADB (Android Debug Bridge) connection URL for a mobile session.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { AgentBay } from '@aliyun/wuying-agentbay-sdk';
|
|
9
|
+
|
|
10
|
+
async function main() {
|
|
11
|
+
// Get API key from environment variable
|
|
12
|
+
const apiKey = process.env.AGENTBAY_API_KEY;
|
|
13
|
+
if (!apiKey) {
|
|
14
|
+
console.error('Error: AGENTBAY_API_KEY environment variable is not set');
|
|
15
|
+
console.error('Please set it with: export AGENTBAY_API_KEY=your_api_key');
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
console.log('=== Mobile GetAdbUrl Example ===\n');
|
|
20
|
+
|
|
21
|
+
// Initialize AgentBay client
|
|
22
|
+
const client = new AgentBay({ apiKey });
|
|
23
|
+
|
|
24
|
+
// Create a mobile session
|
|
25
|
+
console.log('Creating mobile session...');
|
|
26
|
+
const sessionResult = await client.create({
|
|
27
|
+
imageId: 'mobile_latest' // Must use mobile_latest for ADB functionality
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
if (!sessionResult.session) {
|
|
31
|
+
console.error('Failed to create session');
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const session = sessionResult.session;
|
|
36
|
+
console.log(`✅ Session created successfully`);
|
|
37
|
+
console.log(` Session ID: ${session.sessionId}`);
|
|
38
|
+
console.log(` Image ID: ${session.imageId}\n`);
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
// Get ADB URL with public key
|
|
42
|
+
// Note: In production, you should use your actual ADB public key
|
|
43
|
+
// This is a desensitized example key
|
|
44
|
+
const adbkeyPub = "QAAAAM0muSn7yQCY...your_adb_public_key...EAAQAA=";
|
|
45
|
+
|
|
46
|
+
console.log('Getting ADB connection URL...');
|
|
47
|
+
const result = await session.mobile.getAdbUrl(adbkeyPub);
|
|
48
|
+
|
|
49
|
+
if (result.success) {
|
|
50
|
+
console.log(`✅ ADB URL retrieved successfully`);
|
|
51
|
+
console.log(` URL: ${result.data}`);
|
|
52
|
+
console.log(` Request ID: ${result.requestId}\n`);
|
|
53
|
+
console.log('You can now connect to the mobile device using:');
|
|
54
|
+
console.log(` ${result.data}`);
|
|
55
|
+
} else {
|
|
56
|
+
console.error(`❌ Failed to get ADB URL`);
|
|
57
|
+
console.error(` Error: ${result.errorMessage}`);
|
|
58
|
+
console.error(` Request ID: ${result.requestId}`);
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
console.log('\n=== Example completed successfully ===');
|
|
63
|
+
} finally {
|
|
64
|
+
// Cleanup: Delete session
|
|
65
|
+
console.log('\nCleaning up session...');
|
|
66
|
+
const deleteResult = await session.delete();
|
|
67
|
+
if (deleteResult.success) {
|
|
68
|
+
console.log(`✅ Session deleted successfully (RequestID: ${deleteResult.requestId})`);
|
|
69
|
+
} else {
|
|
70
|
+
console.warn(`Warning: Failed to delete session: ${deleteResult.errorMessage}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Run the example
|
|
76
|
+
main().catch((error) => {
|
|
77
|
+
console.error('Error:', error);
|
|
78
|
+
process.exit(1);
|
|
79
|
+
});
|
|
80
|
+
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mobile-get-adb-url-example",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"": {
|
|
8
|
+
"name": "mobile-get-adb-url-example",
|
|
9
|
+
"version": "1.0.0",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@aliyun/wuying-agentbay-sdk": "file:../../../"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@types/node": "^20.0.0",
|
|
15
|
+
"ts-node": "^10.9.1",
|
|
16
|
+
"typescript": "^5.0.0"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"../../..": {
|
|
20
|
+
"name": "wuying-agentbay-sdk",
|
|
21
|
+
"version": "0.9.4",
|
|
22
|
+
"license": "Apache-2.0",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@alicloud/openapi-core": "^1.0.4",
|
|
25
|
+
"@darabonba/typescript": "^1.0.0",
|
|
26
|
+
"@types/node-fetch": "^2.6.13",
|
|
27
|
+
"axios": "^1.3.4",
|
|
28
|
+
"node-fetch": "^2.7.0",
|
|
29
|
+
"playwright": "^1.55.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/chai": "^5.2.2",
|
|
33
|
+
"@types/jest": "^26.0.24",
|
|
34
|
+
"@types/mocha": "^10.0.10",
|
|
35
|
+
"@types/node": "^18.15.0",
|
|
36
|
+
"@types/sinon": "^10.0.0",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
|
38
|
+
"@typescript-eslint/parser": "^5.54.0",
|
|
39
|
+
"abort-controller": "^3.0.0",
|
|
40
|
+
"axios-mock-adapter": "^2.1.0",
|
|
41
|
+
"chai": "^4.3.7",
|
|
42
|
+
"dotenv": "^16.5.0",
|
|
43
|
+
"eslint": "^8.35.0",
|
|
44
|
+
"jest": "^26.6.3",
|
|
45
|
+
"prettier": "^2.8.4",
|
|
46
|
+
"sinon": "^15.2.0",
|
|
47
|
+
"ts-jest": "^26.5.6",
|
|
48
|
+
"ts-node": "^10.9.2",
|
|
49
|
+
"tsup": "^8.5.0",
|
|
50
|
+
"typescript": "^4.9.5"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=14.0.0"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"node_modules/@aliyun/wuying-agentbay-sdk": {
|
|
57
|
+
"resolved": "../../..",
|
|
58
|
+
"link": true
|
|
59
|
+
},
|
|
60
|
+
"node_modules/@cspotcode/source-map-support": {
|
|
61
|
+
"version": "0.8.1",
|
|
62
|
+
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
|
63
|
+
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
|
|
64
|
+
"dev": true,
|
|
65
|
+
"license": "MIT",
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@jridgewell/trace-mapping": "0.3.9"
|
|
68
|
+
},
|
|
69
|
+
"engines": {
|
|
70
|
+
"node": ">=12"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"node_modules/@jridgewell/resolve-uri": {
|
|
74
|
+
"version": "3.1.2",
|
|
75
|
+
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
|
76
|
+
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
|
|
77
|
+
"dev": true,
|
|
78
|
+
"license": "MIT",
|
|
79
|
+
"engines": {
|
|
80
|
+
"node": ">=6.0.0"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"node_modules/@jridgewell/sourcemap-codec": {
|
|
84
|
+
"version": "1.5.5",
|
|
85
|
+
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
|
|
86
|
+
"integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
|
|
87
|
+
"dev": true,
|
|
88
|
+
"license": "MIT"
|
|
89
|
+
},
|
|
90
|
+
"node_modules/@jridgewell/trace-mapping": {
|
|
91
|
+
"version": "0.3.9",
|
|
92
|
+
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
|
|
93
|
+
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
|
|
94
|
+
"dev": true,
|
|
95
|
+
"license": "MIT",
|
|
96
|
+
"dependencies": {
|
|
97
|
+
"@jridgewell/resolve-uri": "^3.0.3",
|
|
98
|
+
"@jridgewell/sourcemap-codec": "^1.4.10"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"node_modules/@tsconfig/node10": {
|
|
102
|
+
"version": "1.0.11",
|
|
103
|
+
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
|
|
104
|
+
"integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==",
|
|
105
|
+
"dev": true,
|
|
106
|
+
"license": "MIT"
|
|
107
|
+
},
|
|
108
|
+
"node_modules/@tsconfig/node12": {
|
|
109
|
+
"version": "1.0.11",
|
|
110
|
+
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
|
|
111
|
+
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
|
|
112
|
+
"dev": true,
|
|
113
|
+
"license": "MIT"
|
|
114
|
+
},
|
|
115
|
+
"node_modules/@tsconfig/node14": {
|
|
116
|
+
"version": "1.0.3",
|
|
117
|
+
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
|
|
118
|
+
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
|
|
119
|
+
"dev": true,
|
|
120
|
+
"license": "MIT"
|
|
121
|
+
},
|
|
122
|
+
"node_modules/@tsconfig/node16": {
|
|
123
|
+
"version": "1.0.4",
|
|
124
|
+
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
|
|
125
|
+
"integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
|
|
126
|
+
"dev": true,
|
|
127
|
+
"license": "MIT"
|
|
128
|
+
},
|
|
129
|
+
"node_modules/@types/node": {
|
|
130
|
+
"version": "20.19.23",
|
|
131
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.23.tgz",
|
|
132
|
+
"integrity": "sha512-yIdlVVVHXpmqRhtyovZAcSy0MiPcYWGkoO4CGe/+jpP0hmNuihm4XhHbADpK++MsiLHP5MVlv+bcgdF99kSiFQ==",
|
|
133
|
+
"dev": true,
|
|
134
|
+
"license": "MIT",
|
|
135
|
+
"dependencies": {
|
|
136
|
+
"undici-types": "~6.21.0"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"node_modules/acorn": {
|
|
140
|
+
"version": "8.15.0",
|
|
141
|
+
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
|
|
142
|
+
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
|
143
|
+
"dev": true,
|
|
144
|
+
"license": "MIT",
|
|
145
|
+
"bin": {
|
|
146
|
+
"acorn": "bin/acorn"
|
|
147
|
+
},
|
|
148
|
+
"engines": {
|
|
149
|
+
"node": ">=0.4.0"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"node_modules/acorn-walk": {
|
|
153
|
+
"version": "8.3.4",
|
|
154
|
+
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
|
|
155
|
+
"integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
|
|
156
|
+
"dev": true,
|
|
157
|
+
"license": "MIT",
|
|
158
|
+
"dependencies": {
|
|
159
|
+
"acorn": "^8.11.0"
|
|
160
|
+
},
|
|
161
|
+
"engines": {
|
|
162
|
+
"node": ">=0.4.0"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"node_modules/arg": {
|
|
166
|
+
"version": "4.1.3",
|
|
167
|
+
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
|
168
|
+
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
|
169
|
+
"dev": true,
|
|
170
|
+
"license": "MIT"
|
|
171
|
+
},
|
|
172
|
+
"node_modules/create-require": {
|
|
173
|
+
"version": "1.1.1",
|
|
174
|
+
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
|
175
|
+
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
|
176
|
+
"dev": true,
|
|
177
|
+
"license": "MIT"
|
|
178
|
+
},
|
|
179
|
+
"node_modules/diff": {
|
|
180
|
+
"version": "4.0.2",
|
|
181
|
+
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
|
182
|
+
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
|
183
|
+
"dev": true,
|
|
184
|
+
"license": "BSD-3-Clause",
|
|
185
|
+
"engines": {
|
|
186
|
+
"node": ">=0.3.1"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"node_modules/make-error": {
|
|
190
|
+
"version": "1.3.6",
|
|
191
|
+
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
|
192
|
+
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
|
193
|
+
"dev": true,
|
|
194
|
+
"license": "ISC"
|
|
195
|
+
},
|
|
196
|
+
"node_modules/ts-node": {
|
|
197
|
+
"version": "10.9.2",
|
|
198
|
+
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
|
|
199
|
+
"integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
|
|
200
|
+
"dev": true,
|
|
201
|
+
"license": "MIT",
|
|
202
|
+
"dependencies": {
|
|
203
|
+
"@cspotcode/source-map-support": "^0.8.0",
|
|
204
|
+
"@tsconfig/node10": "^1.0.7",
|
|
205
|
+
"@tsconfig/node12": "^1.0.7",
|
|
206
|
+
"@tsconfig/node14": "^1.0.0",
|
|
207
|
+
"@tsconfig/node16": "^1.0.2",
|
|
208
|
+
"acorn": "^8.4.1",
|
|
209
|
+
"acorn-walk": "^8.1.1",
|
|
210
|
+
"arg": "^4.1.0",
|
|
211
|
+
"create-require": "^1.1.0",
|
|
212
|
+
"diff": "^4.0.1",
|
|
213
|
+
"make-error": "^1.1.1",
|
|
214
|
+
"v8-compile-cache-lib": "^3.0.1",
|
|
215
|
+
"yn": "3.1.1"
|
|
216
|
+
},
|
|
217
|
+
"bin": {
|
|
218
|
+
"ts-node": "dist/bin.js",
|
|
219
|
+
"ts-node-cwd": "dist/bin-cwd.js",
|
|
220
|
+
"ts-node-esm": "dist/bin-esm.js",
|
|
221
|
+
"ts-node-script": "dist/bin-script.js",
|
|
222
|
+
"ts-node-transpile-only": "dist/bin-transpile.js",
|
|
223
|
+
"ts-script": "dist/bin-script-deprecated.js"
|
|
224
|
+
},
|
|
225
|
+
"peerDependencies": {
|
|
226
|
+
"@swc/core": ">=1.2.50",
|
|
227
|
+
"@swc/wasm": ">=1.2.50",
|
|
228
|
+
"@types/node": "*",
|
|
229
|
+
"typescript": ">=2.7"
|
|
230
|
+
},
|
|
231
|
+
"peerDependenciesMeta": {
|
|
232
|
+
"@swc/core": {
|
|
233
|
+
"optional": true
|
|
234
|
+
},
|
|
235
|
+
"@swc/wasm": {
|
|
236
|
+
"optional": true
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"node_modules/typescript": {
|
|
241
|
+
"version": "5.9.3",
|
|
242
|
+
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
|
243
|
+
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
|
244
|
+
"dev": true,
|
|
245
|
+
"license": "Apache-2.0",
|
|
246
|
+
"bin": {
|
|
247
|
+
"tsc": "bin/tsc",
|
|
248
|
+
"tsserver": "bin/tsserver"
|
|
249
|
+
},
|
|
250
|
+
"engines": {
|
|
251
|
+
"node": ">=14.17"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"node_modules/undici-types": {
|
|
255
|
+
"version": "6.21.0",
|
|
256
|
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
|
257
|
+
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
|
258
|
+
"dev": true,
|
|
259
|
+
"license": "MIT"
|
|
260
|
+
},
|
|
261
|
+
"node_modules/v8-compile-cache-lib": {
|
|
262
|
+
"version": "3.0.1",
|
|
263
|
+
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
|
264
|
+
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
|
265
|
+
"dev": true,
|
|
266
|
+
"license": "MIT"
|
|
267
|
+
},
|
|
268
|
+
"node_modules/yn": {
|
|
269
|
+
"version": "3.1.1",
|
|
270
|
+
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
|
271
|
+
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
|
272
|
+
"dev": true,
|
|
273
|
+
"license": "MIT",
|
|
274
|
+
"engines": {
|
|
275
|
+
"node": ">=6"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mobile-get-adb-url-example",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Example demonstrating Mobile.getAdbUrl functionality",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "ts-node index.ts"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@aliyun/wuying-agentbay-sdk": "file:../../../"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@types/node": "^20.0.0",
|
|
14
|
+
"ts-node": "^10.9.1",
|
|
15
|
+
"typescript": "^5.0.0"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wuying-agentbay-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "TypeScript SDK for interacting with the Wuying AgentBay cloud runtime environment",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -13,15 +13,17 @@
|
|
|
13
13
|
"./package.json": "./package.json"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "tsup src/index.ts --dts --format cjs,esm",
|
|
16
|
+
"build": "node scripts/run_with_fallback.js tsup tsup@8.5.0 src/index.ts --dts --format cjs,esm",
|
|
17
17
|
"prepublishOnly": "npm run build",
|
|
18
|
-
"test": "jest",
|
|
19
|
-
"test:unit": "jest tests/unit",
|
|
20
|
-
"test:integration": "jest tests/integration",
|
|
21
|
-
"test:coverage": "jest --coverage",
|
|
22
|
-
"lint": "eslint src/**/*.ts",
|
|
23
|
-
"format": "prettier --write \"src/**/*.ts\"",
|
|
24
|
-
"prepare": "npm run build"
|
|
18
|
+
"test": "node scripts/run_with_fallback.js jest jest@26.6.3",
|
|
19
|
+
"test:unit": "node scripts/run_with_fallback.js jest jest@26.6.3 tests/unit",
|
|
20
|
+
"test:integration": "node scripts/run_with_fallback.js jest jest@26.6.3 tests/integration",
|
|
21
|
+
"test:coverage": "node scripts/run_with_fallback.js jest jest@26.6.3 --coverage",
|
|
22
|
+
"lint": "node scripts/run_with_fallback.js eslint eslint@8.35.0 \"src/**/*.ts\"",
|
|
23
|
+
"format": "node scripts/run_with_fallback.js prettier prettier@2.8.4 --write \"src/**/*.ts\"",
|
|
24
|
+
"prepare": "npm run build",
|
|
25
|
+
"docs:generate": "node scripts/generate_api_docs.js",
|
|
26
|
+
"examples:check": "node scripts/run_with_fallback.js tsc typescript@4.9.5 --project examples/tsconfig.json"
|
|
25
27
|
},
|
|
26
28
|
"author": "Wuying AI Team <wuying-ai-team@alibabacloud.com> (https://github.com/aliyun/wuying-agentbay-sdk)",
|
|
27
29
|
"contributors": [
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
"devDependencies": {
|
|
47
49
|
"@types/chai": "^5.2.2",
|
|
48
50
|
"@types/jest": "^26.0.24",
|
|
51
|
+
"@types/js-yaml": "^4.0.9",
|
|
49
52
|
"@types/mocha": "^10.0.10",
|
|
50
53
|
"@types/node": "^18.15.0",
|
|
51
54
|
"@types/sinon": "^10.0.0",
|
|
@@ -57,12 +60,15 @@
|
|
|
57
60
|
"dotenv": "^16.5.0",
|
|
58
61
|
"eslint": "^8.35.0",
|
|
59
62
|
"jest": "^26.6.3",
|
|
63
|
+
"js-yaml": "^4.1.0",
|
|
60
64
|
"prettier": "^2.8.4",
|
|
61
65
|
"sinon": "^15.2.0",
|
|
62
66
|
"ts-jest": "^26.5.6",
|
|
63
67
|
"ts-node": "^10.9.2",
|
|
64
68
|
"tsup": "^8.5.0",
|
|
65
|
-
"
|
|
69
|
+
"typedoc": "^0.25.0",
|
|
70
|
+
"typedoc-plugin-markdown": "^3.16.0",
|
|
71
|
+
"typescript": "4.9.5"
|
|
66
72
|
},
|
|
67
73
|
"dependencies": {
|
|
68
74
|
"@alicloud/openapi-core": "^1.0.4",
|
|
@@ -74,7 +80,8 @@
|
|
|
74
80
|
},
|
|
75
81
|
"sideEffects": false,
|
|
76
82
|
"files": [
|
|
77
|
-
"dist/**/*"
|
|
83
|
+
"dist/**/*",
|
|
84
|
+
"docs/**/*"
|
|
78
85
|
],
|
|
79
86
|
"repository": {
|
|
80
87
|
"type": "git",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { createRequire } from 'module';
|
|
3
|
-
const require = createRequire(import.meta.url);
|
|
4
|
-
(function() {
|
|
5
|
-
if (typeof OpenApi !== 'undefined' && !OpenApi.default) {
|
|
6
|
-
OpenApi.default = OpenApi;
|
|
7
|
-
}
|
|
8
|
-
})();
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
Application
|
|
12
|
-
} from "./chunk-BQNGKBQF.mjs";
|
|
13
|
-
import "./chunk-KNEDRAP6.mjs";
|
|
14
|
-
export {
|
|
15
|
-
Application
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=application-KZWXH46T.mjs.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkX6MS7Z5Lcjs = require('./chunk-X6MS7Z5L.cjs');
|
|
4
|
-
require('./chunk-4IPTHWLM.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.Application = _chunkX6MS7Z5Lcjs.Application;
|
|
8
|
-
//# sourceMappingURL=application-LMA7KSRH.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/wuying-agentbay-sdk/wuying-agentbay-sdk/typescript/dist/application-LMA7KSRH.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,oDAAC","file":"/home/runner/work/wuying-agentbay-sdk/wuying-agentbay-sdk/typescript/dist/application-LMA7KSRH.cjs"}
|