shaw-tools 1.0.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/.replit +28 -0
- package/.replitignore +5 -0
- package/index.cjs +24 -0
- package/index.js +35 -0
- package/package.json +45 -0
- package/packages/ai.js +37 -0
- package/pnpm-workspace.yaml +160 -0
package/.replit
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
modules = ["nodejs-24"]
|
|
2
|
+
|
|
3
|
+
[deployment]
|
|
4
|
+
router = "application"
|
|
5
|
+
deploymentTarget = "autoscale"
|
|
6
|
+
|
|
7
|
+
[deployment.postBuild]
|
|
8
|
+
args = ["pnpm", "store", "prune"]
|
|
9
|
+
env = { "CI" = "true" }
|
|
10
|
+
|
|
11
|
+
[workflows]
|
|
12
|
+
runButton = "Project"
|
|
13
|
+
|
|
14
|
+
[agent]
|
|
15
|
+
stack = "PNPM_WORKSPACE"
|
|
16
|
+
expertMode = true
|
|
17
|
+
|
|
18
|
+
[postMerge]
|
|
19
|
+
path = "scripts/post-merge.sh"
|
|
20
|
+
timeoutMs = 20000
|
|
21
|
+
|
|
22
|
+
[[ports]]
|
|
23
|
+
localPort = 8080
|
|
24
|
+
externalPort = 80
|
|
25
|
+
|
|
26
|
+
[[ports]]
|
|
27
|
+
localPort = 8081
|
|
28
|
+
externalPort = 8081
|
package/.replitignore
ADDED
package/index.cjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const { readdirSync } = require('fs');
|
|
2
|
+
const { join } = require('path');
|
|
3
|
+
|
|
4
|
+
const packagesPath = join(__dirname, 'packages');
|
|
5
|
+
|
|
6
|
+
const shawTools = {};
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
const files = readdirSync(packagesPath).filter(file => file.endsWith('.js'));
|
|
10
|
+
|
|
11
|
+
for (const file of files) {
|
|
12
|
+
const filePath = join(packagesPath, file);
|
|
13
|
+
|
|
14
|
+
const module = require(filePath);
|
|
15
|
+
|
|
16
|
+
Object.assign(shawTools, module);
|
|
17
|
+
}
|
|
18
|
+
} catch (err) {
|
|
19
|
+
if (err.code !== 'ENOENT') {
|
|
20
|
+
console.error('[shaw-tools] Error loading packages:', err);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = shawTools;
|
package/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { readdirSync } from 'fs';
|
|
2
|
+
import { join, dirname } from 'path';
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from 'url';
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = dirname(__filename);
|
|
7
|
+
const packagesPath = join(__dirname, 'packages');
|
|
8
|
+
|
|
9
|
+
const shawTools = {};
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
const files = readdirSync(packagesPath).filter(file => file.endsWith('.js'));
|
|
13
|
+
|
|
14
|
+
for (const file of files) {
|
|
15
|
+
const filePath = join(packagesPath, file);
|
|
16
|
+
const fileUrl = pathToFileURL(filePath).href;
|
|
17
|
+
|
|
18
|
+
const module = await import(fileUrl);
|
|
19
|
+
|
|
20
|
+
Object.assign(shawTools, module);
|
|
21
|
+
}
|
|
22
|
+
} catch (err) {
|
|
23
|
+
if (err.code !== 'ENOENT') {
|
|
24
|
+
console.error('[shaw-tools] Error loading packages:', err);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const {
|
|
29
|
+
AiChat,
|
|
30
|
+
scrape,
|
|
31
|
+
tiktokDl,
|
|
32
|
+
...rest
|
|
33
|
+
} = shawTools;
|
|
34
|
+
|
|
35
|
+
export default shawTools;
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "shaw-tools",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "مجموعة أدوات قوية لبوتات الواتساب - AI, Scraper, Downloader والمزيد",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./index.js",
|
|
10
|
+
"require": "./index.cjs"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "node build.js",
|
|
15
|
+
"test": "node test.js"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"whatsapp-bot",
|
|
19
|
+
"baileys",
|
|
20
|
+
"ai",
|
|
21
|
+
"scraper",
|
|
22
|
+
"downloader",
|
|
23
|
+
"shaw",
|
|
24
|
+
"tools",
|
|
25
|
+
"plugin"
|
|
26
|
+
],
|
|
27
|
+
"author": "Shaw",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"axios": "^1.6.2",
|
|
31
|
+
"cheerio": "^1.0-rc.12"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18.0.0"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/mrshaw/shaw-tools.git"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/mrshaw/shaw-tools/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/mrshaw/shaw-tools#readme"
|
|
45
|
+
}
|
package/packages/ai.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shaw AI Chat - دردش مع الذكاء الاصطناعي
|
|
5
|
+
* @param {Object} options
|
|
6
|
+
* @param {string} options.text - النص المرسل للذكاء الاصطناعي
|
|
7
|
+
* @returns {Promise<string>} رد الذكاء الاصطناعي
|
|
8
|
+
*/
|
|
9
|
+
export async function AiChat({ text }) {
|
|
10
|
+
if (!text) throw new Error("[shaw-tools] النص مطلوب - YOU NEED A TEXT");
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
const url = `https://lamborghiniApi.vercel.app/api/newai?prompt=${encodeURIComponent(text)}`;
|
|
14
|
+
const { data } = await axios.get(url, {
|
|
15
|
+
timeout: 30000
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
if (!data) throw new Error("[shaw-tools] مافي رد من السيرفر");
|
|
19
|
+
|
|
20
|
+
return data.reply || data.message || data.result || "I DON'T HAVE A REPLY";
|
|
21
|
+
|
|
22
|
+
} catch (err) {
|
|
23
|
+
if (err.code === 'ECONNABORTED') {
|
|
24
|
+
throw new Error("[shaw-tools] السيرفر اخذ وقت طويل - TIMEOUT");
|
|
25
|
+
}
|
|
26
|
+
throw new Error(`[shaw-tools] ${err.message}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Shaw AI Chat بدون options - نسخة مختصرة
|
|
32
|
+
* @param {string} text - النص مباشرة
|
|
33
|
+
* @returns {Promise<string>} رد الذكاء الاصطناعي
|
|
34
|
+
*/
|
|
35
|
+
export async function shawAI(text) {
|
|
36
|
+
return await AiChat({ text });
|
|
37
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# ============================================================================
|
|
2
|
+
# SECURITY: Minimum release age for npm packages (supply-chain attack defense)
|
|
3
|
+
# ============================================================================
|
|
4
|
+
#
|
|
5
|
+
# This setting requires that any npm package version must have been published
|
|
6
|
+
# for at least 1 day (1440 minutes) before pnpm will allow installing it.
|
|
7
|
+
# This is a critical defense against supply-chain attacks. In most cases,
|
|
8
|
+
# malicious npm releases are discovered and pulled within hours, so a 1-day
|
|
9
|
+
# delay provides a strong safety buffer.
|
|
10
|
+
#
|
|
11
|
+
# DO NOT DISABLE THIS SETTING. Removing or setting it to 0 is considered
|
|
12
|
+
# extremely dangerous and leaves the entire workspace vulnerable to supply-
|
|
13
|
+
# chain attacks, which have been the #1 vector for npm ecosystem compromises.
|
|
14
|
+
#
|
|
15
|
+
# If you absolutely need to install a package before the 1-day window has
|
|
16
|
+
# passed (e.g. an urgent security bugfix), you can add it to the
|
|
17
|
+
# `minimumReleaseAgeExclude` allowlist below. Only consider doing this for
|
|
18
|
+
# packages released by trusted organizations with an impeccable security
|
|
19
|
+
# posture (e.g. Replit packsges, react from Meta, typescript from Microsoft). Even then,
|
|
20
|
+
# remove the exclusion once the 1-day window has passed.
|
|
21
|
+
#
|
|
22
|
+
# Example:
|
|
23
|
+
# minimumReleaseAgeExclude:
|
|
24
|
+
# - react
|
|
25
|
+
# - typescript
|
|
26
|
+
#
|
|
27
|
+
# ============================================================================
|
|
28
|
+
minimumReleaseAge: 1440
|
|
29
|
+
|
|
30
|
+
minimumReleaseAgeExclude:
|
|
31
|
+
# Exclude @replit scoped packages from the minimum release age check.
|
|
32
|
+
# These are published by Replit and trusted — the supply-chain attack vector
|
|
33
|
+
# this setting guards against does not apply to our own packages.
|
|
34
|
+
- '@replit/*'
|
|
35
|
+
- stripe-replit-sync
|
|
36
|
+
|
|
37
|
+
packages:
|
|
38
|
+
- artifacts/*
|
|
39
|
+
- lib/*
|
|
40
|
+
- lib/integrations/*
|
|
41
|
+
- scripts
|
|
42
|
+
|
|
43
|
+
catalog:
|
|
44
|
+
'@replit/vite-plugin-cartographer': ^0.5.1
|
|
45
|
+
'@replit/vite-plugin-dev-banner': ^0.1.1
|
|
46
|
+
'@replit/vite-plugin-runtime-error-modal': ^0.0.6
|
|
47
|
+
'@tailwindcss/vite': ^4.1.14
|
|
48
|
+
'@tanstack/react-query': ^5.90.21
|
|
49
|
+
'@types/node': ^25.3.3
|
|
50
|
+
'@types/react': ^19.2.0
|
|
51
|
+
'@types/react-dom': ^19.2.0
|
|
52
|
+
'@vitejs/plugin-react': ^5.0.4
|
|
53
|
+
class-variance-authority: ^0.7.1
|
|
54
|
+
clsx: ^2.1.1
|
|
55
|
+
drizzle-orm: ^0.45.2
|
|
56
|
+
framer-motion: ^12.23.24
|
|
57
|
+
lucide-react: ^0.545.0
|
|
58
|
+
# Must be this exact version because expo requires it
|
|
59
|
+
react: 19.1.0
|
|
60
|
+
# Must be this exact version because expo requires it
|
|
61
|
+
react-dom: 19.1.0
|
|
62
|
+
tailwind-merge: ^3.3.1
|
|
63
|
+
tailwindcss: ^4.1.14
|
|
64
|
+
tsx: ^4.21.0
|
|
65
|
+
vite: ^7.3.2
|
|
66
|
+
wouter: ^3.3.5
|
|
67
|
+
zod: ^3.25.76
|
|
68
|
+
|
|
69
|
+
autoInstallPeers: false
|
|
70
|
+
|
|
71
|
+
onlyBuiltDependencies:
|
|
72
|
+
- '@swc/core'
|
|
73
|
+
- esbuild
|
|
74
|
+
- msw
|
|
75
|
+
- unrs-resolver
|
|
76
|
+
|
|
77
|
+
overrides:
|
|
78
|
+
# replit uses linux-x64 only, we can exclude all other platforms
|
|
79
|
+
"esbuild>@esbuild/darwin-arm64": "-"
|
|
80
|
+
"esbuild>@esbuild/darwin-x64": "-"
|
|
81
|
+
"esbuild>@esbuild/freebsd-arm64": "-"
|
|
82
|
+
"esbuild>@esbuild/freebsd-x64": "-"
|
|
83
|
+
"esbuild>@esbuild/linux-arm": "-"
|
|
84
|
+
"esbuild>@esbuild/linux-arm64": "-"
|
|
85
|
+
"esbuild>@esbuild/linux-ia32": "-"
|
|
86
|
+
"esbuild>@esbuild/linux-loong64": "-"
|
|
87
|
+
"esbuild>@esbuild/linux-mips64el": "-"
|
|
88
|
+
"esbuild>@esbuild/linux-ppc64": "-"
|
|
89
|
+
"esbuild>@esbuild/linux-riscv64": "-"
|
|
90
|
+
"esbuild>@esbuild/linux-s390x": "-"
|
|
91
|
+
"esbuild>@esbuild/netbsd-arm64": "-"
|
|
92
|
+
"esbuild>@esbuild/netbsd-x64": "-"
|
|
93
|
+
"esbuild>@esbuild/openbsd-arm64": "-"
|
|
94
|
+
"esbuild>@esbuild/openbsd-x64": "-"
|
|
95
|
+
"esbuild>@esbuild/sunos-x64": "-"
|
|
96
|
+
"esbuild>@esbuild/win32-arm64": "-"
|
|
97
|
+
"esbuild>@esbuild/win32-ia32": "-"
|
|
98
|
+
"esbuild>@esbuild/win32-x64": "-"
|
|
99
|
+
"esbuild>@esbuild/aix-ppc64": '-'
|
|
100
|
+
"esbuild>@esbuild/android-arm": '-'
|
|
101
|
+
"esbuild>@esbuild/android-arm64": '-'
|
|
102
|
+
"esbuild>@esbuild/android-x64": '-'
|
|
103
|
+
"esbuild>@esbuild/openharmony-arm64": '-'
|
|
104
|
+
"lightningcss>lightningcss-android-arm64": "-"
|
|
105
|
+
"lightningcss>lightningcss-darwin-arm64": "-"
|
|
106
|
+
"lightningcss>lightningcss-darwin-x64": "-"
|
|
107
|
+
"lightningcss>lightningcss-freebsd-x64": "-"
|
|
108
|
+
"lightningcss>lightningcss-linux-arm-gnueabihf": "-"
|
|
109
|
+
"lightningcss>lightningcss-linux-arm64-gnu": "-"
|
|
110
|
+
"lightningcss>lightningcss-linux-arm64-musl": "-"
|
|
111
|
+
"lightningcss>lightningcss-linux-x64-musl": "-"
|
|
112
|
+
"lightningcss>lightningcss-win32-arm64-msvc": "-"
|
|
113
|
+
"lightningcss>lightningcss-win32-x64-msvc": "-"
|
|
114
|
+
"@tailwindcss/oxide>@tailwindcss/oxide-android-arm64": "-"
|
|
115
|
+
"@tailwindcss/oxide>@tailwindcss/oxide-darwin-arm64": "-"
|
|
116
|
+
"@tailwindcss/oxide>@tailwindcss/oxide-darwin-x64": "-"
|
|
117
|
+
"@tailwindcss/oxide>@tailwindcss/oxide-freebsd-x64": "-"
|
|
118
|
+
"@tailwindcss/oxide>@tailwindcss/oxide-linux-arm-gnueabihf": "-"
|
|
119
|
+
"@tailwindcss/oxide>@tailwindcss/oxide-linux-arm64-gnu": "-"
|
|
120
|
+
"@tailwindcss/oxide>@tailwindcss/oxide-linux-arm64-musl": "-"
|
|
121
|
+
"@tailwindcss/oxide>@tailwindcss/oxide-win32-arm64-msvc": "-"
|
|
122
|
+
"@tailwindcss/oxide>@tailwindcss/oxide-win32-x64-msvc": "-"
|
|
123
|
+
"@tailwindcss/oxide>@tailwindcss/oxide-linux-x64-musl": "-"
|
|
124
|
+
"rollup>@rollup/rollup-android-arm-eabi": "-"
|
|
125
|
+
"rollup>@rollup/rollup-android-arm64": "-"
|
|
126
|
+
"rollup>@rollup/rollup-darwin-arm64": "-"
|
|
127
|
+
"rollup>@rollup/rollup-darwin-x64": "-"
|
|
128
|
+
"rollup>@rollup/rollup-freebsd-arm64": "-"
|
|
129
|
+
"rollup>@rollup/rollup-freebsd-x64": "-"
|
|
130
|
+
"rollup>@rollup/rollup-linux-arm-gnueabihf": "-"
|
|
131
|
+
"rollup>@rollup/rollup-linux-arm-musleabihf": "-"
|
|
132
|
+
"rollup>@rollup/rollup-linux-arm64-gnu": "-"
|
|
133
|
+
"rollup>@rollup/rollup-linux-arm64-musl": "-"
|
|
134
|
+
"rollup>@rollup/rollup-linux-loong64-gnu": "-"
|
|
135
|
+
"rollup>@rollup/rollup-linux-loong64-musl": "-"
|
|
136
|
+
"rollup>@rollup/rollup-linux-ppc64-gnu": "-"
|
|
137
|
+
"rollup>@rollup/rollup-linux-ppc64-musl": "-"
|
|
138
|
+
"rollup>@rollup/rollup-linux-riscv64-gnu": "-"
|
|
139
|
+
"rollup>@rollup/rollup-linux-riscv64-musl": "-"
|
|
140
|
+
"rollup>@rollup/rollup-linux-s390x-gnu": "-"
|
|
141
|
+
"rollup>@rollup/rollup-linux-x64-musl": "-"
|
|
142
|
+
"rollup>@rollup/rollup-openbsd-x64": "-"
|
|
143
|
+
"rollup>@rollup/rollup-openharmony-arm64": "-"
|
|
144
|
+
"rollup>@rollup/rollup-win32-arm64-msvc": "-"
|
|
145
|
+
"rollup>@rollup/rollup-win32-ia32-msvc": "-"
|
|
146
|
+
"rollup>@rollup/rollup-win32-x64-gnu": "-"
|
|
147
|
+
"rollup>@rollup/rollup-win32-x64-msvc": "-"
|
|
148
|
+
"@expo/ngrok-bin>@expo/ngrok-bin-darwin-arm64": "-"
|
|
149
|
+
"@expo/ngrok-bin>@expo/ngrok-bin-darwin-x64": "-"
|
|
150
|
+
"@expo/ngrok-bin>@expo/ngrok-bin-freebsd-ia32": "-"
|
|
151
|
+
"@expo/ngrok-bin>@expo/ngrok-bin-freebsd-x64": "-"
|
|
152
|
+
"@expo/ngrok-bin>@expo/ngrok-bin-linux-arm64": "-"
|
|
153
|
+
"@expo/ngrok-bin>@expo/ngrok-bin-linux-arm": "-"
|
|
154
|
+
"@expo/ngrok-bin>@expo/ngrok-bin-linux-ia32": "-"
|
|
155
|
+
"@expo/ngrok-bin>@expo/ngrok-bin-sunos-x64": "-"
|
|
156
|
+
"@expo/ngrok-bin>@expo/ngrok-bin-win32-ia32": "-"
|
|
157
|
+
"@expo/ngrok-bin>@expo/ngrok-bin-win32-x64": "-"
|
|
158
|
+
# drizzle-kit uses esbuild internally on an older version that's vulnerable, this overrides it
|
|
159
|
+
"@esbuild-kit/esm-loader": "npm:tsx@^4.21.0"
|
|
160
|
+
esbuild: "0.27.3"
|