stackpatch 1.2.0 → 1.2.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 +15 -10
- package/dist/stackpatch.js +1909 -0
- package/package.json +16 -10
- package/bin/stackpatch +0 -49
- package/bin/stackpatch.ts +0 -2443
package/package.json
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stackpatch",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Composable frontend features for modern React & Next.js apps - Add authentication, UI components, and more with zero configuration",
|
|
5
|
-
"main": "
|
|
6
|
-
"type": "module",
|
|
5
|
+
"main": "dist/stackpatch.js",
|
|
7
6
|
"bin": {
|
|
8
|
-
"stackpatch": "
|
|
9
|
-
"create-stackpatch": "
|
|
7
|
+
"stackpatch": "dist/stackpatch.js",
|
|
8
|
+
"create-stackpatch": "dist/stackpatch.js"
|
|
10
9
|
},
|
|
11
10
|
"files": [
|
|
12
|
-
"
|
|
11
|
+
"dist",
|
|
13
12
|
"boilerplate",
|
|
14
13
|
"README.md"
|
|
15
14
|
],
|
|
16
15
|
"scripts": {
|
|
16
|
+
"install-deps": "pnpm install @rollup/plugin-node-resolve @rollup/plugin-commonjs @rollup/plugin-typescript @rollup/plugin-json rollup typescript -D",
|
|
17
|
+
"build": "rollup -c",
|
|
17
18
|
"test": "vitest run",
|
|
18
19
|
"test:watch": "vitest",
|
|
19
20
|
"test:coverage": "vitest run --coverage",
|
|
20
21
|
"test:cli": "node scripts/test-cli-execution.js",
|
|
21
|
-
"prepublishOnly": "node scripts/prepare-publish.js && npm run test:cli",
|
|
22
|
+
"prepublishOnly": "npm run build && node scripts/prepare-publish.js && npm run test:cli",
|
|
22
23
|
"dev": "bun run bin/stackpatch.ts",
|
|
23
24
|
"create": "bun run bin/stackpatch.ts"
|
|
24
25
|
},
|
|
@@ -54,14 +55,19 @@
|
|
|
54
55
|
},
|
|
55
56
|
"packageManager": "pnpm@10.28.0",
|
|
56
57
|
"dependencies": {
|
|
57
|
-
"chalk": "^
|
|
58
|
+
"chalk": "^4.1.2",
|
|
58
59
|
"fs-extra": "^11.3.3",
|
|
59
60
|
"inquirer": "^13.1.0",
|
|
60
|
-
"jimp": "^0.22.10"
|
|
61
|
-
"tsx": "^4.19.2"
|
|
61
|
+
"jimp": "^0.22.10"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
+
"@rollup/plugin-commonjs": "^28.0.9",
|
|
65
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
66
|
+
"@rollup/plugin-node-resolve": "^15.3.1",
|
|
67
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
64
68
|
"@types/node": "^20.0.0",
|
|
69
|
+
"rollup": "^4.55.1",
|
|
70
|
+
"typescript": "^5.9.3",
|
|
65
71
|
"vitest": "^2.1.0"
|
|
66
72
|
}
|
|
67
73
|
}
|
package/bin/stackpatch
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const { spawnSync } = require('child_process');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const fs = require('fs');
|
|
5
|
-
|
|
6
|
-
// Get the directory of this script (CommonJS)
|
|
7
|
-
// In CommonJS, __filename is available, but if not, use require.main
|
|
8
|
-
const scriptPath = typeof __filename !== 'undefined' ? __filename : (require.main && require.main.filename) || process.argv[1];
|
|
9
|
-
const __dirname = path.dirname(scriptPath);
|
|
10
|
-
|
|
11
|
-
// Path to the TypeScript file
|
|
12
|
-
const tsFile = path.join(__dirname, 'stackpatch.ts');
|
|
13
|
-
const args = process.argv.slice(2);
|
|
14
|
-
|
|
15
|
-
// Try to find tsx in node_modules
|
|
16
|
-
const tsxPaths = [
|
|
17
|
-
path.join(__dirname, '../node_modules/.bin/tsx'),
|
|
18
|
-
path.join(__dirname, '../../node_modules/.bin/tsx'),
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
let tsxCommand = null;
|
|
22
|
-
for (const tsxPath of tsxPaths) {
|
|
23
|
-
try {
|
|
24
|
-
if (fs.existsSync(tsxPath)) {
|
|
25
|
-
tsxCommand = tsxPath;
|
|
26
|
-
break;
|
|
27
|
-
}
|
|
28
|
-
} catch (e) {
|
|
29
|
-
// Continue
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Execute with tsx or npx
|
|
34
|
-
if (tsxCommand) {
|
|
35
|
-
const result = spawnSync(tsxCommand, [tsFile, ...args], {
|
|
36
|
-
stdio: 'inherit',
|
|
37
|
-
shell: true,
|
|
38
|
-
env: process.env,
|
|
39
|
-
});
|
|
40
|
-
process.exit(result.status || 0);
|
|
41
|
-
} else {
|
|
42
|
-
// Use npx as fallback
|
|
43
|
-
const result = spawnSync('npx', ['-y', 'tsx', tsFile, ...args], {
|
|
44
|
-
stdio: 'inherit',
|
|
45
|
-
shell: true,
|
|
46
|
-
env: process.env,
|
|
47
|
-
});
|
|
48
|
-
process.exit(result.status || 0);
|
|
49
|
-
}
|