@digigov/cli-lab 1.0.1 → 1.2.1
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/.rush/temp/package-deps_build.json +12 -6
- package/.rush/temp/package-deps_lint.json +15 -0
- package/.rush/temp/shrinkwrap-deps.json +11 -11
- package/CHANGELOG.json +53 -0
- package/CHANGELOG.md +33 -1
- package/lib/extra/index.mjs +49 -20
- package/misc/html-types.js +121 -0
- package/misc/react-core-components.js +1424 -0
- package/package.json +3 -2
- package/scripts/add-package-to-subtree-branch.mjs +76 -0
- package/scripts/generate-react-core.mjs +174 -0
- package/scripts/merge-subtree.mjs +22 -0
- package/scripts/publish.mjs +18 -4
- package/scripts/verify-and-update-local-package-versions.mjs +29 -0
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
|
-
"tooling/cli-lab/CHANGELOG.json": "
|
|
4
|
-
"tooling/cli-lab/CHANGELOG.md": "
|
|
3
|
+
"tooling/cli-lab/CHANGELOG.json": "fbc2a113830401f441ee0ef6f7ca77a3886e1f86",
|
|
4
|
+
"tooling/cli-lab/CHANGELOG.md": "c2ed6da147b81170caec43f3fb42c8eceff8de15",
|
|
5
5
|
"tooling/cli-lab/index.mjs": "5b3c59f4204c70d8ed30f8b4a89182d63d286479",
|
|
6
|
-
"tooling/cli-lab/lib/extra/index.mjs": "
|
|
7
|
-
"tooling/cli-lab/
|
|
6
|
+
"tooling/cli-lab/lib/extra/index.mjs": "6cb935d0dc54f7d30e0e092ed88d355a6ee769df",
|
|
7
|
+
"tooling/cli-lab/misc/html-types.js": "48ab486858bc80a2794a225581d77a3e1f51b7eb",
|
|
8
|
+
"tooling/cli-lab/misc/react-core-components.js": "9eabab6ba69a27815f6ba60733d96af67184534a",
|
|
9
|
+
"tooling/cli-lab/package.json": "e090afe825a9228c56c992e1b32e098c957a2c2c",
|
|
10
|
+
"tooling/cli-lab/scripts/add-package-to-subtree-branch.mjs": "8cf54af4a24419c2a54927d68425cfcaf1683744",
|
|
8
11
|
"tooling/cli-lab/scripts/consistent-package-versions.mjs": "1cf8e8d40b80e4aa33f4bd18db4905226e52a157",
|
|
9
|
-
"tooling/cli-lab/scripts/
|
|
10
|
-
"tooling/cli-lab
|
|
12
|
+
"tooling/cli-lab/scripts/generate-react-core.mjs": "2adbc79ade070e39a10df67d20f51df292ba6f03",
|
|
13
|
+
"tooling/cli-lab/scripts/merge-subtree.mjs": "5d44135e05581f46214602aac4aed4c3b8941f92",
|
|
14
|
+
"tooling/cli-lab/scripts/publish.mjs": "809fbdbde52d5fe51d0eae4460273c9e7c4cdbdc",
|
|
15
|
+
"tooling/cli-lab/scripts/verify-and-update-local-package-versions.mjs": "841e513239f36298b1872080f4a6ed106af74f20",
|
|
16
|
+
"tooling/cli-lab/.rush/temp/shrinkwrap-deps.json": "e3c4c724dc8beee522909d8ff5f4314fe042a84a"
|
|
11
17
|
},
|
|
12
18
|
"arguments": ""
|
|
13
19
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": {
|
|
3
|
+
"tooling/cli-lab/CHANGELOG.json": "7197c873736feee0da3144745bc4133158a70d54",
|
|
4
|
+
"tooling/cli-lab/CHANGELOG.md": "865b50f7db6966d45870bd22eec929dacd3fbe83",
|
|
5
|
+
"tooling/cli-lab/index.mjs": "5b3c59f4204c70d8ed30f8b4a89182d63d286479",
|
|
6
|
+
"tooling/cli-lab/lib/extra/index.mjs": "6b7624a63f7ce561c41fcfdd70115ada6d361c59",
|
|
7
|
+
"tooling/cli-lab/package.json": "685b8cc9d5f35661d6c295ed8c8eb5729d01f9d5",
|
|
8
|
+
"tooling/cli-lab/scripts/add-package-to-subtree-branch.mjs": "8cf54af4a24419c2a54927d68425cfcaf1683744",
|
|
9
|
+
"tooling/cli-lab/scripts/consistent-package-versions.mjs": "1cf8e8d40b80e4aa33f4bd18db4905226e52a157",
|
|
10
|
+
"tooling/cli-lab/scripts/merge-subtree.mjs": "5d44135e05581f46214602aac4aed4c3b8941f92",
|
|
11
|
+
"tooling/cli-lab/scripts/publish.mjs": "809fbdbde52d5fe51d0eae4460273c9e7c4cdbdc",
|
|
12
|
+
"tooling/cli-lab/.rush/temp/shrinkwrap-deps.json": "b65dcf6ea19aed1cf1b35568e7eff7830b6b9f56"
|
|
13
|
+
},
|
|
14
|
+
"arguments": ""
|
|
15
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@types/node-fetch@2.5.12": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
|
|
3
3
|
"@types/node@15.14.9": "sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==",
|
|
4
|
-
"@types/node@16.
|
|
4
|
+
"@types/node@16.11.21": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==",
|
|
5
5
|
"ansi-escapes@4.3.2": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
|
|
6
6
|
"ansi-regex@5.0.1": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
|
7
7
|
"ansi-styles@4.3.0": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"chalk@4.1.2": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
15
15
|
"chardet@0.7.0": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
|
|
16
16
|
"cli-cursor@3.1.0": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
|
|
17
|
-
"cli-spinners@2.6.
|
|
17
|
+
"cli-spinners@2.6.1": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==",
|
|
18
18
|
"cli-width@3.0.0": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==",
|
|
19
19
|
"clone@1.0.4": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
|
|
20
20
|
"color-convert@2.0.1": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"fs-extra@10.0.0": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
|
|
32
32
|
"fs.realpath@1.0.0": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
|
33
33
|
"glob@7.1.6": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
|
|
34
|
-
"graceful-fs@4.2.
|
|
34
|
+
"graceful-fs@4.2.9": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
|
|
35
35
|
"has-flag@4.0.0": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
|
36
36
|
"iconv-lite@0.4.24": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
|
37
37
|
"ieee754@1.2.1": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"jsonfile@6.1.0": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
|
46
46
|
"lodash@4.17.21": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
|
47
47
|
"log-symbols@4.1.0": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
|
|
48
|
-
"mime-db@1.
|
|
49
|
-
"mime-types@2.1.
|
|
48
|
+
"mime-db@1.51.0": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==",
|
|
49
|
+
"mime-types@2.1.34": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
|
|
50
50
|
"mimic-fn@2.1.0": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
|
|
51
51
|
"minimatch@3.0.4": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
|
52
52
|
"minimist@1.2.5": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
|
53
53
|
"mute-stream@0.0.8": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
|
54
|
-
"node-fetch@2.6.
|
|
54
|
+
"node-fetch@2.6.7": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
|
55
55
|
"once@1.4.0": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
|
56
56
|
"onetime@5.1.2": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
|
|
57
57
|
"ora@5.4.1": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",
|
|
@@ -60,18 +60,18 @@
|
|
|
60
60
|
"readable-stream@3.6.0": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
|
61
61
|
"restore-cursor@3.1.0": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
|
|
62
62
|
"run-async@2.4.1": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
|
|
63
|
-
"rxjs@7.
|
|
63
|
+
"rxjs@7.5.2": "sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w==",
|
|
64
64
|
"safe-buffer@5.2.1": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
|
65
65
|
"safer-buffer@2.1.2": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
|
66
|
-
"signal-exit@3.0.
|
|
67
|
-
"string-width@4.2.
|
|
66
|
+
"signal-exit@3.0.6": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==",
|
|
67
|
+
"string-width@4.2.3": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
|
68
68
|
"string_decoder@1.3.0": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
|
69
|
-
"strip-ansi@6.0.
|
|
69
|
+
"strip-ansi@6.0.1": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
|
70
70
|
"supports-color@7.2.0": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
|
71
71
|
"through@2.3.8": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
|
|
72
72
|
"tmp@0.0.33": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
|
|
73
73
|
"tr46@0.0.3": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=",
|
|
74
|
-
"tslib@2.1
|
|
74
|
+
"tslib@2.3.1": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
|
|
75
75
|
"type-fest@0.21.3": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
|
|
76
76
|
"universalify@2.0.0": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
|
77
77
|
"util-deprecate@1.0.2": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
|
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/cli-lab",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "1.2.1",
|
|
6
|
+
"tag": "@digigov/cli-lab_v1.2.1",
|
|
7
|
+
"date": "Wed, 02 Feb 2022 15:44:29 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "fix package.json inconsistencies by running cli-lab verify-and-update-local-package-versions"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"version": "1.2.0",
|
|
18
|
+
"tag": "@digigov/cli-lab_v1.2.0",
|
|
19
|
+
"date": "Fri, 05 Nov 2021 12:24:20 GMT",
|
|
20
|
+
"comments": {
|
|
21
|
+
"minor": [
|
|
22
|
+
{
|
|
23
|
+
"comment": "generate react core components"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"version": "1.1.1",
|
|
30
|
+
"tag": "@digigov/cli-lab_v1.1.1",
|
|
31
|
+
"date": "Fri, 01 Oct 2021 07:42:05 GMT",
|
|
32
|
+
"comments": {
|
|
33
|
+
"patch": [
|
|
34
|
+
{
|
|
35
|
+
"comment": "Fix the publish procedure"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"version": "1.1.0",
|
|
42
|
+
"tag": "@digigov/cli-lab_v1.1.0",
|
|
43
|
+
"date": "Thu, 30 Sep 2021 13:29:00 GMT",
|
|
44
|
+
"comments": {
|
|
45
|
+
"patch": [
|
|
46
|
+
{
|
|
47
|
+
"comment": "Add target-branch option in rush lab publish script"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"minor": [
|
|
51
|
+
{
|
|
52
|
+
"comment": "Add github partial publishing"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
4
57
|
{
|
|
5
58
|
"version": "1.0.1",
|
|
6
59
|
"tag": "@digigov/cli-lab_v1.0.1",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
# Change Log - @digigov/cli-lab
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 02 Feb 2022 15:44:29 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 1.2.1
|
|
6
|
+
Wed, 02 Feb 2022 15:44:29 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- fix package.json inconsistencies by running cli-lab verify-and-update-local-package-versions
|
|
11
|
+
|
|
12
|
+
## 1.2.0
|
|
13
|
+
Fri, 05 Nov 2021 12:24:20 GMT
|
|
14
|
+
|
|
15
|
+
### Minor changes
|
|
16
|
+
|
|
17
|
+
- generate react core components
|
|
18
|
+
|
|
19
|
+
## 1.1.1
|
|
20
|
+
Fri, 01 Oct 2021 07:42:05 GMT
|
|
21
|
+
|
|
22
|
+
### Patches
|
|
23
|
+
|
|
24
|
+
- Fix the publish procedure
|
|
25
|
+
|
|
26
|
+
## 1.1.0
|
|
27
|
+
Thu, 30 Sep 2021 13:29:00 GMT
|
|
28
|
+
|
|
29
|
+
### Minor changes
|
|
30
|
+
|
|
31
|
+
- Add github partial publishing
|
|
32
|
+
|
|
33
|
+
### Patches
|
|
34
|
+
|
|
35
|
+
- Add target-branch option in rush lab publish script
|
|
4
36
|
|
|
5
37
|
## 1.0.1
|
|
6
38
|
Mon, 27 Sep 2021 11:18:38 GMT
|
package/lib/extra/index.mjs
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import {$} from 'zx';
|
|
1
|
+
import { $ } from 'zx';
|
|
2
2
|
import inquirer from 'inquirer';
|
|
3
3
|
import glob from 'glob';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import {spawnSync} from 'child_process';
|
|
6
|
-
|
|
6
|
+
import fs from 'fs-extra';
|
|
7
7
|
function createCli(commandName) {
|
|
8
8
|
return new Proxy({}, {
|
|
9
|
-
get: (_, command)=>{
|
|
10
|
-
return async function(args, options){
|
|
11
|
-
if(args){
|
|
9
|
+
get: (_, command) => {
|
|
10
|
+
return async function (args, options) {
|
|
11
|
+
if (args) {
|
|
12
12
|
args = args.split(' ');
|
|
13
|
-
}else {
|
|
13
|
+
} else {
|
|
14
14
|
args = []
|
|
15
15
|
}
|
|
16
|
-
const result = spawnSync(commandName, [command, ...args], { shell: true, stdio: options?.json? 'pipe' : 'inherit' });
|
|
17
|
-
if(options?.json) {
|
|
16
|
+
const result = spawnSync(commandName, [command, ...args], { shell: true, stdio: options?.json || options?.stdout ? 'pipe' : 'inherit' });
|
|
17
|
+
if (options?.json) {
|
|
18
18
|
return JSON.parse(result.stdout);
|
|
19
19
|
}
|
|
20
|
+
if (options?.stdout) {
|
|
21
|
+
return result.stdout.toString();
|
|
22
|
+
}
|
|
20
23
|
}
|
|
21
|
-
|
|
24
|
+
|
|
22
25
|
}
|
|
23
26
|
})
|
|
24
27
|
}
|
|
@@ -26,12 +29,30 @@ console.clear();
|
|
|
26
29
|
global.find = async (patterns, options) => {
|
|
27
30
|
return glob.sync(patterns, options);
|
|
28
31
|
};
|
|
29
|
-
global.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
global.mkdir = async (dir) => {
|
|
33
|
+
fs.mkdirSync(dir)
|
|
34
|
+
}
|
|
35
|
+
global.rm = async (fileOrDir) => {
|
|
36
|
+
console.log('removing ' + fileOrDir)
|
|
37
|
+
return fs.rmdir(fileOrDir, {
|
|
38
|
+
recursive: true
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
global.confirm = async (question) => (await inquirer.prompt({ type: 'confirm', message: question, name: 'var' })).var;
|
|
42
|
+
global.question = async (question, value) => (await inquirer.prompt({
|
|
43
|
+
type: 'input', message: question, name: 'var', default: value
|
|
44
|
+
})).var;
|
|
45
|
+
global.password = async (question) => (await inquirer.prompt({ type: 'password', message: question, name: 'var' })).var;
|
|
32
46
|
|
|
33
|
-
global.select = async (question, choices) => (
|
|
34
|
-
|
|
47
|
+
global.select = async (question, choices, values) => (
|
|
48
|
+
await inquirer.prompt({
|
|
49
|
+
type: 'list', message: question, name: 'var', choices,
|
|
50
|
+
default: values
|
|
51
|
+
})).var;
|
|
52
|
+
global.checkbox = async (question, choices, values) => (await inquirer.prompt({
|
|
53
|
+
type: 'checkbox', message: question, name: 'var', choices,
|
|
54
|
+
default: values
|
|
55
|
+
})).var;
|
|
35
56
|
|
|
36
57
|
global.cli = new Proxy({}, {
|
|
37
58
|
get: (_, commandName) => {
|
|
@@ -42,11 +63,13 @@ global.pwd = async () => (await $`pwd`).stdout;
|
|
|
42
63
|
global.path = path;
|
|
43
64
|
global.cd = (p) => {process.chdir(p);};
|
|
44
65
|
global.readJSON = async (file) => {return fs.readJSONSync(file);};
|
|
66
|
+
global.readFile = async (file) => {return fs.readFileSync(file).toString();};
|
|
67
|
+
global.writeFile = async (file, content) => {return fs.outputFileSync(file, content);};
|
|
45
68
|
global.findUp = function findFileInParentDirectories(fileName, rootDir) {
|
|
46
69
|
let currentDir = rootDir || process.cwd();
|
|
47
|
-
while(currentDir) {
|
|
70
|
+
while (currentDir) {
|
|
48
71
|
const file = path.join(currentDir, fileName);
|
|
49
|
-
if(fs.existsSync(file)) {
|
|
72
|
+
if (fs.existsSync(file)) {
|
|
50
73
|
return file;
|
|
51
74
|
}
|
|
52
75
|
currentDir = path.dirname(currentDir);
|
|
@@ -56,15 +79,21 @@ global.findUp = function findFileInParentDirectories(fileName, rootDir) {
|
|
|
56
79
|
global.dirname = path.dirname;
|
|
57
80
|
global.requireEnv = async (key, required) => {
|
|
58
81
|
let val = process.env[key];
|
|
59
|
-
if(!val) {
|
|
82
|
+
if (!val) {
|
|
60
83
|
const val = await question(`Set env var ${key}?`);
|
|
61
|
-
if(required && !val) {
|
|
84
|
+
if (required && !val) {
|
|
62
85
|
throw new Error(`Required env var ${key} not set`);
|
|
63
86
|
}
|
|
64
|
-
if(val) {
|
|
87
|
+
if (val) {
|
|
65
88
|
process.env[key] = val;
|
|
66
89
|
}
|
|
67
90
|
}
|
|
68
91
|
};
|
|
69
92
|
|
|
70
|
-
global.spawn = spawnSync
|
|
93
|
+
global.spawn = spawnSync
|
|
94
|
+
|
|
95
|
+
process.on('SIGINT', function () {
|
|
96
|
+
console.log("Caught interrupt signal");
|
|
97
|
+
process.exit();
|
|
98
|
+
|
|
99
|
+
});
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
const htmlTypes = {
|
|
2
|
+
a: 'HTMLAnchorElement',
|
|
3
|
+
abbr: 'HTMLElement',
|
|
4
|
+
address: 'HTMLElement',
|
|
5
|
+
area: 'HTMLAreaElement',
|
|
6
|
+
article: 'HTMLElement',
|
|
7
|
+
aside: 'HTMLElement',
|
|
8
|
+
audio: 'HTMLAudioElement',
|
|
9
|
+
b: 'HTMLElement',
|
|
10
|
+
base: 'HTMLBaseElement',
|
|
11
|
+
bdi: 'HTMLElement',
|
|
12
|
+
bdo: 'HTMLElement',
|
|
13
|
+
big: 'HTMLElement',
|
|
14
|
+
blockquote: 'HTMLElement',
|
|
15
|
+
body: 'HTMLBodyElement',
|
|
16
|
+
br: 'HTMLBRElement',
|
|
17
|
+
button: 'HTMLButtonElement',
|
|
18
|
+
canvas: 'HTMLCanvasElement',
|
|
19
|
+
caption: 'HTMLElement',
|
|
20
|
+
cite: 'HTMLElement',
|
|
21
|
+
code: 'HTMLElement',
|
|
22
|
+
col: 'HTMLTableColElement',
|
|
23
|
+
colgroup: 'HTMLTableColElement',
|
|
24
|
+
data: 'HTMLDataElement',
|
|
25
|
+
datalist: 'HTMLDataListElement',
|
|
26
|
+
dd: 'HTMLElement',
|
|
27
|
+
del: 'HTMLElement',
|
|
28
|
+
details: 'HTMLElement',
|
|
29
|
+
dfn: 'HTMLElement',
|
|
30
|
+
dialog: 'HTMLDialogElement',
|
|
31
|
+
div: 'HTMLDivElement',
|
|
32
|
+
dl: 'HTMLDListElement',
|
|
33
|
+
dt: 'HTMLElement',
|
|
34
|
+
em: 'HTMLElement',
|
|
35
|
+
embed: 'HTMLEmbedElement',
|
|
36
|
+
fieldset: 'HTMLFieldSetElement',
|
|
37
|
+
figcaption: 'HTMLElement',
|
|
38
|
+
figure: 'HTMLElement',
|
|
39
|
+
footer: 'HTMLElement',
|
|
40
|
+
form: 'HTMLFormElement',
|
|
41
|
+
h1: 'HTMLHeadingElement',
|
|
42
|
+
h2: 'HTMLHeadingElement',
|
|
43
|
+
h3: 'HTMLHeadingElement',
|
|
44
|
+
h4: 'HTMLHeadingElement',
|
|
45
|
+
h5: 'HTMLHeadingElement',
|
|
46
|
+
h6: 'HTMLHeadingElement',
|
|
47
|
+
head: 'HTMLHeadElement',
|
|
48
|
+
header: 'HTMLElement',
|
|
49
|
+
hgroup: 'HTMLElement',
|
|
50
|
+
hr: 'HTMLHRElement',
|
|
51
|
+
html: 'HTMLHtmlElement',
|
|
52
|
+
i: 'HTMLElement',
|
|
53
|
+
iframe: 'HTMLIFrameElement',
|
|
54
|
+
img: 'HTMLImageElement',
|
|
55
|
+
input: 'HTMLInputElement',
|
|
56
|
+
ins: 'HTMLModElement',
|
|
57
|
+
kbd: 'HTMLElement',
|
|
58
|
+
keygen: 'HTMLElement',
|
|
59
|
+
label: 'HTMLLabelElement',
|
|
60
|
+
legend: 'HTMLLegendElement',
|
|
61
|
+
li: 'HTMLLIElement',
|
|
62
|
+
link: 'HTMLLinkElement',
|
|
63
|
+
main: 'HTMLElement',
|
|
64
|
+
map: 'HTMLMapElement',
|
|
65
|
+
mark: 'HTMLElement',
|
|
66
|
+
menu: 'HTMLElement',
|
|
67
|
+
menuitem: 'HTMLElement',
|
|
68
|
+
meta: 'HTMLMetaElement',
|
|
69
|
+
meter: 'HTMLElement',
|
|
70
|
+
nav: 'HTMLElement',
|
|
71
|
+
noindex: 'HTMLElement',
|
|
72
|
+
noscript: 'HTMLElement',
|
|
73
|
+
object: 'HTMLObjectElement',
|
|
74
|
+
ol: 'HTMLOListElement',
|
|
75
|
+
optgroup: 'HTMLOptGroupElement',
|
|
76
|
+
option: 'HTMLOptionElement',
|
|
77
|
+
output: 'HTMLElement',
|
|
78
|
+
p: 'HTMLParagraphElement',
|
|
79
|
+
param: 'HTMLParamElement',
|
|
80
|
+
picture: 'HTMLElement',
|
|
81
|
+
pre: 'HTMLPreElement',
|
|
82
|
+
progress: 'HTMLProgressElement',
|
|
83
|
+
q: 'HTMLQuoteElement',
|
|
84
|
+
rp: 'HTMLElement',
|
|
85
|
+
rt: 'HTMLElement',
|
|
86
|
+
ruby: 'HTMLElement',
|
|
87
|
+
s: 'HTMLElement',
|
|
88
|
+
samp: 'HTMLElement',
|
|
89
|
+
slot: 'HTMLSlotElement',
|
|
90
|
+
script: 'HTMLScriptElement',
|
|
91
|
+
section: 'HTMLElement',
|
|
92
|
+
select: 'HTMLSelectElement',
|
|
93
|
+
small: 'HTMLElement',
|
|
94
|
+
source: 'HTMLSourceElement',
|
|
95
|
+
span: 'HTMLSpanElement',
|
|
96
|
+
strong: 'HTMLElement',
|
|
97
|
+
style: 'HTMLStyleElement',
|
|
98
|
+
sub: 'HTMLElement',
|
|
99
|
+
summary: 'HTMLElement',
|
|
100
|
+
sup: 'HTMLElement',
|
|
101
|
+
table: 'HTMLTableElement',
|
|
102
|
+
template: 'HTMLTemplateElement',
|
|
103
|
+
tbody: 'HTMLTableSectionElement',
|
|
104
|
+
td: 'HTMLTableDataCellElement',
|
|
105
|
+
textarea: 'HTMLTextAreaElement',
|
|
106
|
+
tfoot: 'HTMLTableSectionElement',
|
|
107
|
+
th: 'HTMLTableHeaderCellElement',
|
|
108
|
+
thead: 'HTMLTableSectionElement',
|
|
109
|
+
time: 'HTMLElement',
|
|
110
|
+
title: 'HTMLTitleElement',
|
|
111
|
+
tr: 'HTMLTableRowElement',
|
|
112
|
+
track: 'HTMLTrackElement',
|
|
113
|
+
u: 'HTMLElement',
|
|
114
|
+
ul: 'HTMLUListElement',
|
|
115
|
+
"var": 'HTMLElement',
|
|
116
|
+
video: 'HTMLVideoElement',
|
|
117
|
+
wbr: 'HTMLElement',
|
|
118
|
+
webview: 'HTMLWebViewElement',
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
module.exports = htmlTypes
|