@elcrm/deploy 0.0.3 → 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.
Files changed (2) hide show
  1. package/dist/index.js +2 -25
  2. package/package.json +24 -24
package/dist/index.js CHANGED
@@ -1,25 +1,2 @@
1
- // src/lib/index.ts
2
- var upload;
3
- ((upload) => {
4
- upload.client = async (body) => {
5
- await Bun.write("build.tar", body.upload);
6
- const proc = Bun.spawn(["tar", "-xzvf", "build.tar"]);
7
- await proc.exited;
8
- const proc2 = Bun.spawn([`rm`, "build.tar"]);
9
- await proc2.exited;
10
- const pmId = process.env.pm_id || "0";
11
- const p = Bun.spawn([`pm2`, `restart`, pmId]);
12
- await p.exited;
13
- p.kill();
14
- };
15
- upload.server = async (body) => {
16
- await Bun.write(`${body.name}.js`, body.upload);
17
- const pmId = process.env.pm_id || "0";
18
- const proc = Bun.spawn([`pm2`, `restart`, pmId]);
19
- await proc.exited;
20
- proc.kill();
21
- };
22
- })(upload ||= {});
23
- export {
24
- upload
25
- };
1
+ // @bun
2
+ var s;((e)=>(e.client=async(t)=>{await Bun.write("build.tar",t.upload),await Bun.spawn(["tar","-xzvf","build.tar"]).exited,await Bun.spawn(["rm","build.tar"]).exited;let p=process.env.pm_id||"0",r=Bun.spawn(["pm2","restart",p]);await r.exited,r.kill()},e.server=async(t)=>{await Bun.write(`${t.name}.js`,t.upload);let n=process.env.pm_id||"0",a=Bun.spawn(["pm2","restart",n]);await a.exited,a.kill()}))(s||={});export{s as upload};
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
- "name": "@elcrm/deploy",
3
- "version": "0.0.3",
4
- "description": "plugin for elCRM",
5
- "type": "module",
6
- "author": "MaSkal <dev@elcrm.online>",
7
- "license": "MIT",
8
- "main": "dist/index.js",
9
- "module": "dist/index.js",
10
- "types": "dist/index.d.ts",
11
- "bin": {
12
- "el": "./bin/bin.js",
13
- "elcrm": "./bin/bin.js"
14
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "keywords": [
19
- "elcrm",
20
- "deploy"
21
- ],
22
- "devDependencies": {
23
- "@types/bun": "^1.2.18"
24
- }
25
- }
2
+ "name": "@elcrm/deploy",
3
+ "version": "0.0.4",
4
+ "description": "plugin for elCRM",
5
+ "type": "module",
6
+ "author": "MaSkal <dev@elcrm.online>",
7
+ "license": "MIT",
8
+ "main": "dist/index.js",
9
+ "module": "dist/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "bin": {
12
+ "el": "./bin/bin.js",
13
+ "elcrm": "./bin/bin.js"
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "keywords": [
19
+ "elcrm",
20
+ "deploy"
21
+ ],
22
+ "devDependencies": {
23
+ "@types/bun": "^1.2.18"
24
+ }
25
+ }