expo-repro-cleanup 0.0.1 → 0.0.4
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/LICENSE +21 -0
- package/README.md +20 -0
- package/cli.ts +44 -1
- package/package.json +6 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Kudo Chien
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# expo-repro-cleanup
|
|
2
|
+
|
|
3
|
+
🧹 Cleanup tool for Expo reproduction examples - removes potentially unsafe files and configurations before running untrusted code.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bunx expo-repro-cleanup
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Example Workflow
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# 1. Clone a reproduction repo
|
|
15
|
+
git clone https://github.com/someone/expo-issue-repro.git
|
|
16
|
+
cd expo-issue-repro
|
|
17
|
+
|
|
18
|
+
# 2. Run cleanup (interactive)
|
|
19
|
+
bunx expo-repro-cleanup
|
|
20
|
+
```
|
package/cli.ts
CHANGED
|
@@ -1,10 +1,53 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
3
|
import pc from 'picocolors';
|
|
4
|
+
import { parseArgs } from 'util';
|
|
5
|
+
|
|
6
|
+
import packageJson from './package.json' with { type: 'json' };
|
|
4
7
|
import { runCleanupAsync } from './src/index.js';
|
|
5
8
|
|
|
9
|
+
function showHelp() {
|
|
10
|
+
console.log(`${pc.bold('expo-repro-cleanup')} v${packageJson.version}
|
|
11
|
+
|
|
12
|
+
${packageJson.description}
|
|
13
|
+
|
|
14
|
+
Usage: expo-repro-cleanup [options] [project-root]
|
|
15
|
+
|
|
16
|
+
Options:
|
|
17
|
+
-h, --help Show this help message
|
|
18
|
+
--version Show version number
|
|
19
|
+
|
|
20
|
+
Arguments:
|
|
21
|
+
project-root Path to the project (default: current directory)`);
|
|
22
|
+
}
|
|
23
|
+
|
|
6
24
|
async function main() {
|
|
7
|
-
const
|
|
25
|
+
const { values, positionals } = parseArgs({
|
|
26
|
+
args: Bun.argv,
|
|
27
|
+
options: {
|
|
28
|
+
help: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
short: 'h',
|
|
31
|
+
},
|
|
32
|
+
version: {
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
strict: false,
|
|
37
|
+
allowPositionals: true,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
if (values.version) {
|
|
41
|
+
console.log(packageJson.version);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (values.help) {
|
|
46
|
+
showHelp();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const projectRoot = positionals[2] || process.cwd();
|
|
8
51
|
|
|
9
52
|
try {
|
|
10
53
|
await runCleanupAsync(projectRoot);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-repro-cleanup",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Cleanup issue reproducible example for Expo projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"dev": "tsc --watch",
|
|
16
16
|
"lint": "eslint src",
|
|
17
|
-
"test": "vitest run -c ./vite.config.ts"
|
|
17
|
+
"test": "vitest run -c ./vite.config.ts",
|
|
18
|
+
"typecheck": "tsc"
|
|
18
19
|
},
|
|
19
20
|
"keywords": [
|
|
20
21
|
"expo",
|
|
@@ -27,6 +28,9 @@
|
|
|
27
28
|
"bugs": {
|
|
28
29
|
"url": "https://github.com/Kudo/expo-repro-cleanup/issues"
|
|
29
30
|
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"url": "https://github.com/Kudo/expo-repro-cleanup"
|
|
33
|
+
},
|
|
30
34
|
"homepage": "https://github.com/Kudo/expo-repro-cleanup#readme",
|
|
31
35
|
"devDependencies": {
|
|
32
36
|
"@types/bun": "^1.2.20",
|