@design-edito/cli 0.1.7 → 0.1.9
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/cli/assets/version.txt +1 -1
- package/package.json +10 -10
- package/push/index.js +1 -1
- package/push/index.js.map +3 -3
package/cli/assets/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.9
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design-edito/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Maxime Fabas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -13,28 +13,28 @@
|
|
|
13
13
|
"module": "index.js",
|
|
14
14
|
"bin": {
|
|
15
15
|
"add": "./add/index.js",
|
|
16
|
-
"commit": "./commit/index.js",
|
|
17
16
|
"cli": "./cli/index.js",
|
|
18
|
-
"
|
|
17
|
+
"commit": "./commit/index.js",
|
|
19
18
|
"make-template": "./make-template/index.js",
|
|
19
|
+
"pull": "./pull/index.js",
|
|
20
20
|
"push": "./push/index.js",
|
|
21
21
|
"record": "./record/index.js",
|
|
22
22
|
"reset": "./reset/index.js",
|
|
23
|
-
"
|
|
23
|
+
"status": "./status/index.js",
|
|
24
24
|
"tree": "./tree/index.js",
|
|
25
|
-
"
|
|
25
|
+
"serve": "./serve/index.js"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@design-edito/tools": "^0.3.
|
|
29
|
-
"commander": "^14.0.
|
|
28
|
+
"@design-edito/tools": "^0.3.9",
|
|
29
|
+
"commander": "^14.0.3",
|
|
30
30
|
"prompts": "^2.4.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@types/node": "^25.
|
|
33
|
+
"@types/node": "^25.2.1",
|
|
34
34
|
"@types/prompts": "^2.4.9",
|
|
35
35
|
"@types/semver": "^7.7.1",
|
|
36
|
-
"esbuild": "^0.27.
|
|
37
|
-
"semver": "^7.7.
|
|
36
|
+
"esbuild": "^0.27.3",
|
|
37
|
+
"semver": "^7.7.4",
|
|
38
38
|
"simple-git": "^3.30.0",
|
|
39
39
|
"typescript": "^5.9.3"
|
|
40
40
|
}
|
package/push/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{program as r}from"commander";import{spawner as s}from"@design-edito/tools/node/process/spawner/index.js";import{promptContinue as m}from"@design-edito/tools/node/process/prompt-continue/index.js";r.name("@design-edito/push").description("Shorthand for git push with arguments forwarding").allowUnknownOption(!0).argument("<remote>","name of the remote source").argument("<branch>","name of the branch").argument("[message]","message of the commit").argument("[files]","files to add").argument("[rest...]","rest of the arguments").option("-p, --pull","pull before pushing").action(async(t,e,i,o,u,a)=>{if(a.pull&&!(await s(`Pulling from ${t}/${e}...`,"git",["pull",t,e])).success||o!==void 0&&!(await s("Adding to stage...","git",["add",o])).success||i!==void 0&&!(await s(`Commiting with message "${i}"...`,"git",["commit","-m",i])).success||(await m("Push now?",!0),!(await s(`Pushing to ${t}/${e}`,"git",["push",t,e,...u??[]])).success))throw process.exit(1)});r.parse(process.argv);
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/push/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/push/index.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "AAAA,OAAS,
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import { program } from 'commander'\nimport { spawner } from '@design-edito/tools/node/process/spawner/index.js'\nimport { promptContinue } from '@design-edito/tools/node/process/prompt-continue/index.js'\n\nprogram\n .name('@design-edito/push')\n .description('Shorthand for git push with arguments forwarding')\n .allowUnknownOption(true)\n .argument('<remote>', 'name of the remote source')\n .argument('<branch>', 'name of the branch')\n .argument('[message]', 'message of the commit')\n .argument('[files]', 'files to add')\n .argument('[rest...]', 'rest of the arguments')\n .option('-p, --pull', 'pull before pushing')\n .action(async (\n remote: string,\n branch: string,\n message: string | undefined,\n files: string | undefined,\n rest: string[] | undefined,\n options: { pull?: boolean },\n ) => {\n if (options.pull) {\n const pullRes = await spawner(\n `Pulling from ${remote}/${branch}...`,\n 'git',\n ['pull', remote, branch]\n )\n if (!pullRes.success) throw process.exit(1)\n }\n if (files !== undefined) {\n const addRes = await spawner(\n 'Adding to stage...',\n 'git',\n ['add', files]\n )\n if (!addRes.success) throw process.exit(1)\n }\n if (message !== undefined) {\n const commitRes = await spawner(\n `Commiting with message \"${message}\"...`,\n 'git',\n ['commit', '-m', message]\n )\n if (!commitRes.success) throw process.exit(1)\n }\n await promptContinue('Push now?', true)\n const pushRes = await spawner(\n `Pushing to ${remote}/${branch}`,\n 'git',\n ['push', remote, branch, ...rest ?? []]\n )\n if (!pushRes.success) throw process.exit(1)\n })\n\nprogram.parse(process.argv)\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,WAAAA,MAAe,YACxB,OAAS,WAAAC,MAAe,oDACxB,OAAS,kBAAAC,MAAsB,4DAE/BF,EACG,KAAK,oBAAoB,EACzB,YAAY,kDAAkD,EAC9D,mBAAmB,EAAI,EACvB,SAAS,WAAY,2BAA2B,EAChD,SAAS,WAAY,oBAAoB,EACzC,SAAS,YAAa,uBAAuB,EAC7C,SAAS,UAAW,cAAc,EAClC,SAAS,YAAa,uBAAuB,EAC7C,OAAO,aAAc,qBAAqB,EAC1C,OAAO,MACNG,EACAC,EACAC,EACAC,EACAC,EACAC,IACG,CA+BH,GA9BIA,EAAQ,MAMN,EALY,MAAMP,EACpB,gBAAgBE,CAAM,IAAIC,CAAM,MAChC,MACA,CAAC,OAAQD,EAAQC,CAAM,CACzB,GACa,SAEXE,IAAU,QAMR,EALW,MAAML,EACnB,qBACA,MACA,CAAC,MAAOK,CAAK,CACf,GACY,SAEVD,IAAY,QAMV,EALc,MAAMJ,EACtB,2BAA2BI,CAAO,OAClC,MACA,CAAC,SAAU,KAAMA,CAAO,CAC1B,GACe,UAEjB,MAAMH,EAAe,YAAa,EAAI,EAMlC,EALY,MAAMD,EACpB,cAAcE,CAAM,IAAIC,CAAM,GAC9B,MACA,CAAC,OAAQD,EAAQC,EAAQ,GAAGG,GAAQ,CAAC,CAAC,CACxC,GACa,SAAS,MAAM,QAAQ,KAAK,CAAC,CAC5C,CAAC,EAEHP,EAAQ,MAAM,QAAQ,IAAI",
|
|
6
|
+
"names": ["program", "spawner", "promptContinue", "remote", "branch", "message", "files", "rest", "options"]
|
|
7
7
|
}
|