shaw-tools 1.0.0 → 1.0.1

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/index.cjs CHANGED
@@ -6,14 +6,12 @@ const packagesPath = join(__dirname, 'packages');
6
6
  const shawTools = {};
7
7
 
8
8
  try {
9
- const files = readdirSync(packagesPath).filter(file => file.endsWith('.js'));
10
-
9
+ const files = readdirSync(packagesPath).filter(file => file.endsWith('.cjs'));
10
+
11
11
  for (const file of files) {
12
12
  const filePath = join(packagesPath, file);
13
-
14
- const module = require(filePath);
15
-
16
- Object.assign(shawTools, module);
13
+ const mod = require(filePath);
14
+ Object.assign(shawTools, mod);
17
15
  }
18
16
  } catch (err) {
19
17
  if (err.code !== 'ENOENT') {
@@ -21,4 +19,5 @@ try {
21
19
  }
22
20
  }
23
21
 
24
- module.exports = shawTools;
22
+ module.exports = shawTools;
23
+ module.exports.default = shawTools;
package/index.js CHANGED
@@ -1,23 +1,22 @@
1
1
  import { readdirSync } from 'fs';
2
2
  import { join, dirname } from 'path';
3
- import { fileURLToPath, pathToFileURL } from 'url';
3
+ import { fileURLToPath } from 'url';
4
+ import { createRequire } from 'module';
4
5
 
5
6
  const __filename = fileURLToPath(import.meta.url);
6
7
  const __dirname = dirname(__filename);
7
8
  const packagesPath = join(__dirname, 'packages');
9
+ const require = createRequire(import.meta.url);
8
10
 
9
11
  const shawTools = {};
10
12
 
11
13
  try {
12
- const files = readdirSync(packagesPath).filter(file => file.endsWith('.js'));
13
-
14
+ const files = readdirSync(packagesPath).filter(file => file.endsWith('.cjs'));
15
+
14
16
  for (const file of files) {
15
17
  const filePath = join(packagesPath, file);
16
- const fileUrl = pathToFileURL(filePath).href;
17
-
18
- const module = await import(fileUrl);
19
-
20
- Object.assign(shawTools, module);
18
+ const mod = require(filePath);
19
+ Object.assign(shawTools, mod);
21
20
  }
22
21
  } catch (err) {
23
22
  if (err.code !== 'ENOENT') {
@@ -25,11 +24,7 @@ try {
25
24
  }
26
25
  }
27
26
 
28
- export const {
29
- AiChat,
30
- scrape,
31
- tiktokDl,
32
- ...rest
33
- } = shawTools;
27
+ export const AiChat = shawTools.AiChat;
28
+ export const shawAI = shawTools.shawAI;
34
29
 
35
- export default shawTools;
30
+ export default shawTools;
package/package.json CHANGED
@@ -1,17 +1,24 @@
1
1
  {
2
2
  "name": "shaw-tools",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "مجموعة أدوات قوية لبوتات الواتساب - AI, Scraper, Downloader والمزيد",
5
- "main": "./index.js",
5
+ "main": "./index.cjs",
6
+ "module": "./index.js",
6
7
  "type": "module",
7
8
  "exports": {
8
9
  ".": {
9
10
  "import": "./index.js",
10
- "require": "./index.cjs"
11
+ "require": "./index.cjs",
12
+ "default": "./index.cjs"
11
13
  }
12
14
  },
15
+ "files": [
16
+ "index.js",
17
+ "index.cjs",
18
+ "packages/",
19
+ "README.md"
20
+ ],
13
21
  "scripts": {
14
- "build": "node build.js",
15
22
  "test": "node test.js"
16
23
  },
17
24
  "keywords": [
@@ -27,8 +34,7 @@
27
34
  "author": "Shaw",
28
35
  "license": "MIT",
29
36
  "dependencies": {
30
- "axios": "^1.6.2",
31
- "cheerio": "^1.0-rc.12"
37
+ "axios": "^1.6.2"
32
38
  },
33
39
  "devDependencies": {},
34
40
  "engines": {
@@ -42,4 +48,4 @@
42
48
  "url": "https://github.com/mrshaw/shaw-tools/issues"
43
49
  },
44
50
  "homepage": "https://github.com/mrshaw/shaw-tools#readme"
45
- }
51
+ }
@@ -1,4 +1,4 @@
1
- import axios from 'axios';
1
+ const axios = require('axios');
2
2
 
3
3
  /**
4
4
  * Shaw AI Chat - دردش مع الذكاء الاصطناعي
@@ -6,7 +6,7 @@ import axios from 'axios';
6
6
  * @param {string} options.text - النص المرسل للذكاء الاصطناعي
7
7
  * @returns {Promise<string>} رد الذكاء الاصطناعي
8
8
  */
9
- export async function AiChat({ text }) {
9
+ async function AiChat({ text }) {
10
10
  if (!text) throw new Error("[shaw-tools] النص مطلوب - YOU NEED A TEXT");
11
11
 
12
12
  try {
@@ -32,6 +32,8 @@ export async function AiChat({ text }) {
32
32
  * @param {string} text - النص مباشرة
33
33
  * @returns {Promise<string>} رد الذكاء الاصطناعي
34
34
  */
35
- export async function shawAI(text) {
35
+ async function shawAI(text) {
36
36
  return await AiChat({ text });
37
- }
37
+ }
38
+
39
+ module.exports = { AiChat, shawAI };
package/.replit DELETED
@@ -1,28 +0,0 @@
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 DELETED
@@ -1,5 +0,0 @@
1
- # The format of this file is identical to `.dockerignore`.
2
- # It is used to reduce the size of deployed images to make the process of publishing faster.
3
-
4
- # No need to store the pnpm store twice.
5
- .local
@@ -1,160 +0,0 @@
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"