@elizaos/plugin-twitter 1.0.0 → 1.0.2
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/README.md +4 -4
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/index.d.ts +2024 -0
- package/dist/index.js +5045 -264
- package/dist/index.js.map +1 -1
- package/dist/{node-IZDTQWG6.js → node-L7ZVN5QV.js} +5 -3
- package/dist/{node-IZDTQWG6.js.map → node-L7ZVN5QV.js.map} +1 -1
- package/package.json +18 -18
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import "./chunk-PZ5AY32C.js";
|
|
2
|
+
|
|
1
3
|
// src/client/platform/node/randomize-ciphers.ts
|
|
2
|
-
import { randomBytes } from "
|
|
3
|
-
import tls from "
|
|
4
|
+
import { randomBytes } from "crypto";
|
|
5
|
+
import tls from "tls";
|
|
4
6
|
var ORIGINAL_CIPHERS = tls.DEFAULT_CIPHERS;
|
|
5
7
|
var TOP_N_SHUFFLE = 8;
|
|
6
8
|
var shuffleArray = (array) => {
|
|
@@ -35,4 +37,4 @@ var platform = new NodePlatform();
|
|
|
35
37
|
export {
|
|
36
38
|
platform
|
|
37
39
|
};
|
|
38
|
-
//# sourceMappingURL=node-
|
|
40
|
+
//# sourceMappingURL=node-L7ZVN5QV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client/platform/node/randomize-ciphers.ts","../src/client/platform/node/index.ts"],"sourcesContent":["import { randomBytes } from 'node:crypto';\nimport tls from 'node:tls';\n\nconst ORIGINAL_CIPHERS = tls.DEFAULT_CIPHERS;\n\n// How many ciphers from the top of the list to shuffle.\n// The remaining ciphers are left in the original order.\nconst TOP_N_SHUFFLE = 8;\n\n// Modified variation of https://stackoverflow.com/a/12646864\nconst shuffleArray = (array: unknown[]) => {\n for (let i = array.length - 1; i > 0; i--) {\n const j = randomBytes(4).readUint32LE() % array.length;\n [array[i], array[j]] = [array[j], array[i]];\n }\n\n return array;\n};\n\n// https://github.com/imputnet/cobalt/pull/574\nexport const randomizeCiphers = () => {\n do {\n const cipherList = ORIGINAL_CIPHERS.split(':');\n const shuffled = shuffleArray(cipherList.slice(0, TOP_N_SHUFFLE));\n const retained = cipherList.slice(TOP_N_SHUFFLE);\n\n tls.DEFAULT_CIPHERS = [...shuffled, ...retained].join(':');\n } while (tls.DEFAULT_CIPHERS === ORIGINAL_CIPHERS);\n};\n","import type { PlatformExtensions } from '../platform-interface';\nimport { randomizeCiphers } from './randomize-ciphers';\n\n/**\n * Asynchronously randomizes the order of ciphers used by the Node.js platform.\n * @returns {Promise<void>} A Promise that resolves once the ciphers have been randomized.\n */\nclass NodePlatform implements PlatformExtensions {\n /**\n * Asynchronously randomizes ciphers.\n *\n * @returns {Promise<void>} A promise that resolves once the ciphers are randomized.\n */\n randomizeCiphers(): Promise<void> {\n randomizeCiphers();\n return Promise.resolve();\n }\n}\n\nexport const platform = new NodePlatform();\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/client/platform/node/randomize-ciphers.ts","../src/client/platform/node/index.ts"],"sourcesContent":["import { randomBytes } from 'node:crypto';\nimport tls from 'node:tls';\n\nconst ORIGINAL_CIPHERS = tls.DEFAULT_CIPHERS;\n\n// How many ciphers from the top of the list to shuffle.\n// The remaining ciphers are left in the original order.\nconst TOP_N_SHUFFLE = 8;\n\n// Modified variation of https://stackoverflow.com/a/12646864\nconst shuffleArray = (array: unknown[]) => {\n for (let i = array.length - 1; i > 0; i--) {\n const j = randomBytes(4).readUint32LE() % array.length;\n [array[i], array[j]] = [array[j], array[i]];\n }\n\n return array;\n};\n\n// https://github.com/imputnet/cobalt/pull/574\nexport const randomizeCiphers = () => {\n do {\n const cipherList = ORIGINAL_CIPHERS.split(':');\n const shuffled = shuffleArray(cipherList.slice(0, TOP_N_SHUFFLE));\n const retained = cipherList.slice(TOP_N_SHUFFLE);\n\n tls.DEFAULT_CIPHERS = [...shuffled, ...retained].join(':');\n } while (tls.DEFAULT_CIPHERS === ORIGINAL_CIPHERS);\n};\n","import type { PlatformExtensions } from '../platform-interface';\nimport { randomizeCiphers } from './randomize-ciphers';\n\n/**\n * Asynchronously randomizes the order of ciphers used by the Node.js platform.\n * @returns {Promise<void>} A Promise that resolves once the ciphers have been randomized.\n */\nclass NodePlatform implements PlatformExtensions {\n /**\n * Asynchronously randomizes ciphers.\n *\n * @returns {Promise<void>} A promise that resolves once the ciphers are randomized.\n */\n randomizeCiphers(): Promise<void> {\n randomizeCiphers();\n return Promise.resolve();\n }\n}\n\nexport const platform = new NodePlatform();\n"],"mappings":";;;AAAA,SAAS,mBAAmB;AAC5B,OAAO,SAAS;AAEhB,IAAM,mBAAmB,IAAI;AAI7B,IAAM,gBAAgB;AAGtB,IAAM,eAAe,CAAC,UAAqB;AACzC,WAAS,IAAI,MAAM,SAAS,GAAG,IAAI,GAAG,KAAK;AACzC,UAAM,IAAI,YAAY,CAAC,EAAE,aAAa,IAAI,MAAM;AAChD,KAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;AAAA,EAC5C;AAEA,SAAO;AACT;AAGO,IAAM,mBAAmB,MAAM;AACpC,KAAG;AACD,UAAM,aAAa,iBAAiB,MAAM,GAAG;AAC7C,UAAM,WAAW,aAAa,WAAW,MAAM,GAAG,aAAa,CAAC;AAChE,UAAM,WAAW,WAAW,MAAM,aAAa;AAE/C,QAAI,kBAAkB,CAAC,GAAG,UAAU,GAAG,QAAQ,EAAE,KAAK,GAAG;AAAA,EAC3D,SAAS,IAAI,oBAAoB;AACnC;;;ACrBA,IAAM,eAAN,MAAiD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM/C,mBAAkC;AAChC,qBAAiB;AACjB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;AAEO,IAAM,WAAW,IAAI,aAAa;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-twitter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -18,26 +18,26 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@elizaos/core": "^1.0.
|
|
22
|
-
"@roamhq/wrtc": "^0.
|
|
23
|
-
"@sinclair/typebox": "^0.
|
|
24
|
-
"glob": "11.0.
|
|
25
|
-
"headers-polyfill": "^
|
|
26
|
-
"json-stable-stringify": "^1.0
|
|
27
|
-
"otpauth": "^9.
|
|
28
|
-
"set-cookie-parser": "^2.
|
|
29
|
-
"tough-cookie": "^
|
|
30
|
-
"twitter-api-v2": "^1.
|
|
21
|
+
"@elizaos/core": "^1.0.2",
|
|
22
|
+
"@roamhq/wrtc": "^0.9.0",
|
|
23
|
+
"@sinclair/typebox": "^0.34.33",
|
|
24
|
+
"glob": "11.0.2",
|
|
25
|
+
"headers-polyfill": "^4.0.3",
|
|
26
|
+
"json-stable-stringify": "^1.3.0",
|
|
27
|
+
"otpauth": "^9.4.0",
|
|
28
|
+
"set-cookie-parser": "^2.7.1",
|
|
29
|
+
"tough-cookie": "^5.1.2",
|
|
30
|
+
"twitter-api-v2": "^1.23.2",
|
|
31
31
|
"typescript": "^5.8.3",
|
|
32
|
-
"undici": "^7.
|
|
33
|
-
"undici-types": "^7.
|
|
34
|
-
"ws": "^8.18.
|
|
32
|
+
"undici": "^7.10.0",
|
|
33
|
+
"undici-types": "^7.10.0",
|
|
34
|
+
"ws": "^8.18.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@vitest/coverage-v8": "
|
|
37
|
+
"@vitest/coverage-v8": "3.1.4",
|
|
38
38
|
"prettier": "3.5.3",
|
|
39
|
-
"tsup": "8.
|
|
40
|
-
"vitest": "1.
|
|
39
|
+
"tsup": "8.5.0",
|
|
40
|
+
"vitest": "3.1.4"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "tsup",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"format:check": "prettier --check ./src"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"whatwg-url": "
|
|
53
|
+
"whatwg-url": "14.2.0"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|