pooshit 0.1.3 โ 0.1.5
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 +69 -0
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/detect.d.ts.map +1 -1
- package/dist/detect.js +31 -6
- package/dist/detect.js.map +1 -1
- package/package.json +18 -7
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# pooshit
|
|
2
|
+
|
|
3
|
+
**Deploy from your terminal in ~60 seconds.** One command, public URL, no signup.
|
|
4
|
+
|
|
5
|
+
๐ **[pooshit.dev](https://pooshit.dev)** ยท ๐ **[Docs](https://pooshit.dev/docs)** ยท ๐ **[Quickstart](https://pooshit.dev/docs/quickstart)**
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx pooshit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd my-app
|
|
15
|
+
npx pooshit
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
You get a live URL on `*.pooshit.dev`. Free tier: 50 MB, 24 hours, no account needed.
|
|
19
|
+
|
|
20
|
+
## What you can deploy
|
|
21
|
+
|
|
22
|
+
| Project | Command |
|
|
23
|
+
|---------|---------|
|
|
24
|
+
| Static site (`index.html`) | `cd site && npx pooshit` |
|
|
25
|
+
| Node app (`npm start`) | `cd app && npx pooshit` |
|
|
26
|
+
| Vite / React build | `npm run build && cd dist && npx pooshit` |
|
|
27
|
+
| Dockerfile | `cd project && npx pooshit` |
|
|
28
|
+
|
|
29
|
+
Full stack detection rules: [pooshit.dev/docs/project-types](https://pooshit.dev/docs/project-types)
|
|
30
|
+
|
|
31
|
+
## Commands
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx pooshit # deploy (default)
|
|
35
|
+
npx pooshit status # show live URL + expiry
|
|
36
|
+
npx pooshit open # open in browser
|
|
37
|
+
npx pooshit init # create .pooshit/project.json
|
|
38
|
+
npx pooshit destroy # tear down deploy
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
All commands: [pooshit.dev/docs](https://pooshit.dev/docs)
|
|
42
|
+
|
|
43
|
+
## CI/CD
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
- run: npx pooshit --json
|
|
47
|
+
env:
|
|
48
|
+
POOSHIT_DEPLOY_TOKEN: ${{ secrets.POOSHIT_DEPLOY_TOKEN }}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Guide: [pooshit.dev/docs/ci](https://pooshit.dev/docs/ci)
|
|
52
|
+
|
|
53
|
+
## Pricing
|
|
54
|
+
|
|
55
|
+
- **Free** โ 50 MB, 24h TTL, random `*.pooshit.dev` subdomain
|
|
56
|
+
- **Pro ($9.99/mo)** โ 500 MB, permanent hosting, custom subdomain *(coming soon)*
|
|
57
|
+
|
|
58
|
+
Details: [pooshit.dev/docs/limits](https://pooshit.dev/docs/limits)
|
|
59
|
+
|
|
60
|
+
## Links
|
|
61
|
+
|
|
62
|
+
- Website: [pooshit.dev](https://pooshit.dev)
|
|
63
|
+
- GitHub: [github.com/rafaelcg/pooshit](https://github.com/rafaelcg/pooshit)
|
|
64
|
+
- Terms: [pooshit.dev/terms](https://pooshit.dev/terms)
|
|
65
|
+
- Privacy: [pooshit.dev/privacy](https://pooshit.dev/privacy)
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT
|
package/dist/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function getCliConfig() {
|
|
2
2
|
return {
|
|
3
|
-
apiUrl: (process.env.POOSHIT_API_URL ?? "https://api
|
|
3
|
+
apiUrl: (process.env.POOSHIT_API_URL ?? "https://api.pooshit.dev").replace(/\/$/, ""),
|
|
4
4
|
};
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,YAAY;IAC1B,OAAO;QACL,MAAM,EAAE,CACN,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,YAAY;IAC1B,OAAO;QACL,MAAM,EAAE,CACN,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,yBAAyB,CACzD,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;KACrB,CAAC;AACJ,CAAC"}
|
package/dist/detect.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../src/detect.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../src/detect.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAWD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAwDvD"}
|
package/dist/detect.js
CHANGED
|
@@ -1,39 +1,64 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
+
const NODE_ENTRY_FILES = [
|
|
4
|
+
"server.js",
|
|
5
|
+
"server.ts",
|
|
6
|
+
"index.js",
|
|
7
|
+
"index.ts",
|
|
8
|
+
"src/index.ts",
|
|
9
|
+
"src/index.js",
|
|
10
|
+
];
|
|
3
11
|
export function detectProject(cwd) {
|
|
4
12
|
const warnings = [];
|
|
5
13
|
let name = cwd.split("/").pop() ?? "project";
|
|
6
14
|
const packageJsonPath = join(cwd, "package.json");
|
|
7
15
|
const indexHtmlPath = join(cwd, "index.html");
|
|
8
16
|
const dockerfilePath = join(cwd, "Dockerfile");
|
|
17
|
+
const hasIndexHtml = existsSync(indexHtmlPath);
|
|
18
|
+
const hasNodeEntry = hasNodeEntryFile(cwd);
|
|
9
19
|
if (existsSync(packageJsonPath)) {
|
|
10
20
|
try {
|
|
11
21
|
const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
12
22
|
if (pkg.name) {
|
|
13
23
|
name = pkg.name.replace(/^@.*\//, "");
|
|
14
24
|
}
|
|
15
|
-
|
|
16
|
-
|
|
25
|
+
const hasStart = Boolean(pkg.scripts?.start);
|
|
26
|
+
const hasBuild = Boolean(pkg.scripts?.build);
|
|
27
|
+
// index.html + no runnable Node app โ static (serve the HTML folder)
|
|
28
|
+
if (hasIndexHtml && !hasStart && !hasBuild && !hasNodeEntry) {
|
|
29
|
+
return { stack: "static", name, warnings };
|
|
17
30
|
}
|
|
18
|
-
|
|
31
|
+
if (hasStart || hasBuild || hasNodeEntry) {
|
|
32
|
+
if (!hasStart && !hasBuild) {
|
|
33
|
+
warnings.push("No start or build script in package.json โ deploy may fail");
|
|
34
|
+
}
|
|
35
|
+
checkNodePortUsage(cwd, warnings);
|
|
36
|
+
return { stack: "node", name, warnings };
|
|
37
|
+
}
|
|
38
|
+
warnings.push("No start or build script in package.json โ deploy may fail");
|
|
19
39
|
return { stack: "node", name, warnings };
|
|
20
40
|
}
|
|
21
41
|
catch {
|
|
42
|
+
if (hasIndexHtml) {
|
|
43
|
+
return { stack: "static", name, warnings };
|
|
44
|
+
}
|
|
22
45
|
return { stack: "node", name, warnings };
|
|
23
46
|
}
|
|
24
47
|
}
|
|
25
48
|
if (existsSync(dockerfilePath)) {
|
|
26
49
|
return { stack: "docker", name, warnings };
|
|
27
50
|
}
|
|
28
|
-
if (
|
|
51
|
+
if (hasIndexHtml) {
|
|
29
52
|
return { stack: "static", name, warnings };
|
|
30
53
|
}
|
|
31
54
|
warnings.push("Could not detect project type โ trying generic deploy");
|
|
32
55
|
return { stack: "generic", name, warnings };
|
|
33
56
|
}
|
|
57
|
+
function hasNodeEntryFile(cwd) {
|
|
58
|
+
return NODE_ENTRY_FILES.some((file) => existsSync(join(cwd, file)));
|
|
59
|
+
}
|
|
34
60
|
function checkNodePortUsage(cwd, warnings) {
|
|
35
|
-
const
|
|
36
|
-
for (const file of entryFiles) {
|
|
61
|
+
for (const file of NODE_ENTRY_FILES) {
|
|
37
62
|
const path = join(cwd, file);
|
|
38
63
|
if (!existsSync(path)) {
|
|
39
64
|
continue;
|
package/dist/detect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect.js","sourceRoot":"","sources":["../src/detect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUjC,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,IAAI,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,SAAS,CAAC;IAE7C,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAClD,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAC9C,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;
|
|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AE,QAAQ,EAAE,CAAC;AAC9C,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAW;IACnC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,kBAAkB,CAAC,GAAW,EAAE,QAAkB;IACzD,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE,CAAC;QACpC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACtB,SAAS;QACX,CAAC;QACD,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC5C,IAAI,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACrE,QAAQ,CAAC,IAAI,CACX,uCAAuC,IAAI,oCAAoC,CAChF,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAC1C,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,gDAAgD,CAAC,CAAC;QACzE,CAAC;QACD,MAAM;IACR,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pooshit",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "Deploy from your terminal in ~60 seconds. One command, public URL on *.pooshit.dev.",
|
|
5
|
+
"homepage": "https://pooshit.dev",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/rafaelcg/pooshit.git",
|
|
9
|
+
"directory": "packages/cli"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/rafaelcg/pooshit/issues"
|
|
8
13
|
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"bin": "./dist/index.js",
|
|
9
16
|
"files": [
|
|
10
|
-
"dist"
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
11
19
|
],
|
|
12
20
|
"scripts": {
|
|
13
21
|
"build": "tsc",
|
|
@@ -19,7 +27,10 @@
|
|
|
19
27
|
"hosting",
|
|
20
28
|
"deploy",
|
|
21
29
|
"cli",
|
|
22
|
-
"
|
|
30
|
+
"terminal",
|
|
31
|
+
"pooshit",
|
|
32
|
+
"static-site",
|
|
33
|
+
"zero-config"
|
|
23
34
|
],
|
|
24
35
|
"license": "MIT",
|
|
25
36
|
"dependencies": {
|