mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Add presetup-configurator to the repo
This commit is contained in:
parent
d4d89327fd
commit
8c11349a8b
14 changed files with 829 additions and 0 deletions
305
presetup-configurator/package-lock.json
generated
Normal file
305
presetup-configurator/package-lock.json
generated
Normal file
|
@ -0,0 +1,305 @@
|
||||||
|
{
|
||||||
|
"name": "zeppelin-presetup-configurator",
|
||||||
|
"requires": true,
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"dependencies": {
|
||||||
|
"@snowpack/plugin-typescript": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@snowpack/plugin-typescript/-/plugin-typescript-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-wU+JNaMVkqGsqTaUY7TnEMhGt/3URTgA9dpMCtZX6wn/ceA7Gwlmue/sOLynf0OTNLygHPvjiQECQYkEi3LTtg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"execa": "^5.0.0",
|
||||||
|
"npm-run-path": "^4.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/node": {
|
||||||
|
"version": "14.14.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.21.tgz",
|
||||||
|
"integrity": "sha512-cHYfKsnwllYhjOzuC5q1VpguABBeecUp24yFluHpn/BQaVxB1CuQ1FSRZCzrPxrkIfWISXV2LbeoBthLWg0+0A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/prop-types": {
|
||||||
|
"version": "15.7.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz",
|
||||||
|
"integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/react": {
|
||||||
|
"version": "17.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.0.tgz",
|
||||||
|
"integrity": "sha512-aj/L7RIMsRlWML3YB6KZiXB3fV2t41+5RBGYF8z+tAKU43Px8C3cYUZsDvf1/+Bm4FK21QWBrDutu8ZJ/70qOw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/prop-types": "*",
|
||||||
|
"csstype": "^3.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/react-dom": {
|
||||||
|
"version": "17.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.0.tgz",
|
||||||
|
"integrity": "sha512-lUqY7OlkF/RbNtD5nIq7ot8NquXrdFrjSOR6+w9a9RFQevGi1oZO1dcJbXMeONAPKtZ2UrZOEJ5UOCVsxbLk/g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/react": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"argparse": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||||
|
},
|
||||||
|
"cross-spawn": {
|
||||||
|
"version": "7.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||||
|
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"path-key": "^3.1.0",
|
||||||
|
"shebang-command": "^2.0.0",
|
||||||
|
"which": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"csstype": {
|
||||||
|
"version": "3.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.6.tgz",
|
||||||
|
"integrity": "sha512-+ZAmfyWMT7TiIlzdqJgjMb7S4f1beorDbWbsocyK4RaiqA5RTX3K14bnBWmmA9QEM0gRdsjyyrEmcyga8Zsxmw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"esbuild": {
|
||||||
|
"version": "0.8.32",
|
||||||
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.32.tgz",
|
||||||
|
"integrity": "sha512-5IzQapMW/wFy5oxziHCJzawk26K3xeyrIAQPnPN3c0Q84hqRw6IfGDGfGWOdJNw5tAx77yvwqZ4r1QMpo6emJA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"execa": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"cross-spawn": "^7.0.3",
|
||||||
|
"get-stream": "^6.0.0",
|
||||||
|
"human-signals": "^2.1.0",
|
||||||
|
"is-stream": "^2.0.0",
|
||||||
|
"merge-stream": "^2.0.0",
|
||||||
|
"npm-run-path": "^4.0.1",
|
||||||
|
"onetime": "^5.1.2",
|
||||||
|
"signal-exit": "^3.0.3",
|
||||||
|
"strip-final-newline": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fsevents": {
|
||||||
|
"version": "2.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz",
|
||||||
|
"integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"get-stream": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"human-signals": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"is-docker": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"is-stream": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"is-wsl": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-docker": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isexe": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"js-tokens": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
|
||||||
|
},
|
||||||
|
"js-yaml": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==",
|
||||||
|
"requires": {
|
||||||
|
"argparse": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"loose-envify": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||||
|
"requires": {
|
||||||
|
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"merge-stream": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"mimic-fn": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"npm-run-path": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"path-key": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"object-assign": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
|
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||||
|
},
|
||||||
|
"onetime": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"mimic-fn": "^2.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"open": {
|
||||||
|
"version": "7.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/open/-/open-7.3.1.tgz",
|
||||||
|
"integrity": "sha512-f2wt9DCBKKjlFbjzGb8MOAW8LH8F0mrs1zc7KTjAJ9PZNQbfenzWbNP1VZJvw6ICMG9r14Ah6yfwPn7T7i646A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-docker": "^2.0.0",
|
||||||
|
"is-wsl": "^2.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"path-key": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"react": {
|
||||||
|
"version": "17.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz",
|
||||||
|
"integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==",
|
||||||
|
"requires": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"object-assign": "^4.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"react-dom": {
|
||||||
|
"version": "17.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz",
|
||||||
|
"integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==",
|
||||||
|
"requires": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"object-assign": "^4.1.1",
|
||||||
|
"scheduler": "^0.20.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rollup": {
|
||||||
|
"version": "2.36.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.36.2.tgz",
|
||||||
|
"integrity": "sha512-qjjiuJKb+/8n0EZyQYVW+gFU4bNRBcZaXVzUgSVrGw0HlQBlK2aWyaOMMs1Ufic1jV69b9kW3u3i9B+hISDm3A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fsevents": "~2.1.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"fsevents": {
|
||||||
|
"version": "2.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
|
||||||
|
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scheduler": {
|
||||||
|
"version": "0.20.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.1.tgz",
|
||||||
|
"integrity": "sha512-LKTe+2xNJBNxu/QhHvDR14wUXHRQbVY5ZOYpOGWRzhydZUqrLb2JBvLPY7cAqFmqrWuDED0Mjk7013SZiOz6Bw==",
|
||||||
|
"requires": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"object-assign": "^4.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"shebang-command": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"shebang-regex": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"shebang-regex": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"signal-exit": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"snowpack": {
|
||||||
|
"version": "3.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/snowpack/-/snowpack-3.0.11.tgz",
|
||||||
|
"integrity": "sha512-lBxgkvWTgdg0szE31JUt01wQkA9Lnmm+6lxqeV9rxDfflpx7ASnldVHFvu7Se70QJmPTQB0UJjfKI+xmYGwiiQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"esbuild": "^0.8.7",
|
||||||
|
"fsevents": "^2.2.0",
|
||||||
|
"open": "^7.0.4",
|
||||||
|
"rollup": "^2.34.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-final-newline": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"which": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"isexe": "^2.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
21
presetup-configurator/package.json
Normal file
21
presetup-configurator/package.json
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "zeppelin-presetup-configurator",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"watch": "snowpack dev",
|
||||||
|
"build": "snowpack build",
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@snowpack/plugin-typescript": "^1.2.1",
|
||||||
|
"@types/node": "^14.14.21",
|
||||||
|
"@types/react": "^17.0.0",
|
||||||
|
"@types/react-dom": "^17.0.0",
|
||||||
|
"snowpack": "^3.0.11"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"js-yaml": "^4.0.0",
|
||||||
|
"react": "^17.0.1",
|
||||||
|
"react-dom": "^17.0.1"
|
||||||
|
}
|
||||||
|
}
|
8
presetup-configurator/snowpack.config.js
Normal file
8
presetup-configurator/snowpack.config.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
module.exports = {
|
||||||
|
mount: {
|
||||||
|
"src": "/",
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
'@snowpack/plugin-typescript',
|
||||||
|
],
|
||||||
|
};
|
8
presetup-configurator/src/App.css
Normal file
8
presetup-configurator/src/App.css
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
.App {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.App .wrapper {
|
||||||
|
flex: 0 1 800px;
|
||||||
|
}
|
11
presetup-configurator/src/App.tsx
Normal file
11
presetup-configurator/src/App.tsx
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
import React from "react";
|
||||||
|
import { Configurator } from "./Configurator";
|
||||||
|
import "./App.css";
|
||||||
|
|
||||||
|
export function App() {
|
||||||
|
return <div className="App">
|
||||||
|
<div className="wrapper">
|
||||||
|
<Configurator />
|
||||||
|
</div>
|
||||||
|
</div>;
|
||||||
|
}
|
48
presetup-configurator/src/Configurator.css
Normal file
48
presetup-configurator/src/Configurator.css
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
.Configurator {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.Configurator .options {
|
||||||
|
display: grid;
|
||||||
|
grid-auto-columns: min-content auto;
|
||||||
|
grid-gap: 1px;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid #444;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Configurator .options > h2 {
|
||||||
|
grid-column: 1;
|
||||||
|
|
||||||
|
margin: 0;
|
||||||
|
padding: 8px 24px 8px 8px;
|
||||||
|
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: right;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
box-shadow: 0 0 0 1px #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Configurator .options > .control {
|
||||||
|
grid-column: 2;
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
box-shadow: 0 0 0 1px #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Configurator label {
|
||||||
|
display: block;
|
||||||
|
padding: 0 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Configurator .result {
|
||||||
|
background-color: #eee;
|
||||||
|
padding: 8px;
|
||||||
|
border: 1px solid #444;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
152
presetup-configurator/src/Configurator.tsx
Normal file
152
presetup-configurator/src/Configurator.tsx
Normal file
|
@ -0,0 +1,152 @@
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
import { LevelEntry, Levels } from "./Levels";
|
||||||
|
import { LogChannel, LogChannels } from "./LogChannels";
|
||||||
|
import yaml from "js-yaml";
|
||||||
|
import "./Configurator.css";
|
||||||
|
|
||||||
|
export function Configurator() {
|
||||||
|
const [prefix, setPrefix] = useState('!');
|
||||||
|
const [levels, setLevels] = useState<LevelEntry[]>([]);
|
||||||
|
|
||||||
|
const [withModCommands, setWithModCommands] = useState(false);
|
||||||
|
const [muteRoleId, setMuteRoleId] = useState("");
|
||||||
|
const [caseChannelId, setCaseChannelId] = useState("");
|
||||||
|
const [dmModActionReasons, setDmModActionReasons] = useState(false);
|
||||||
|
|
||||||
|
const [withLogs, setWithLogs] = useState(false);
|
||||||
|
const [logChannels, setLogChannels] = useState<LogChannel[]>([]);
|
||||||
|
|
||||||
|
const [result, setResult] = useState({});
|
||||||
|
useEffect(() => {
|
||||||
|
const resultObj: any = {
|
||||||
|
prefix,
|
||||||
|
levels: levels.reduce((obj, entry) => {
|
||||||
|
obj[entry[0]] = entry[1];
|
||||||
|
return obj;
|
||||||
|
}, {}),
|
||||||
|
plugins: {
|
||||||
|
utility: {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
if (withModCommands) {
|
||||||
|
resultObj.plugins.cases = {
|
||||||
|
config: {
|
||||||
|
case_log_channel: caseChannelId,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
resultObj.plugins.mod_actions = {};
|
||||||
|
|
||||||
|
if (muteRoleId) {
|
||||||
|
resultObj.plugins.mutes = {
|
||||||
|
config: {
|
||||||
|
mute_role: muteRoleId,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (dmModActionReasons) {
|
||||||
|
resultObj.plugins.mutes.config.dm_on_mute = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dmModActionReasons) {
|
||||||
|
resultObj.plugins.mod_actions = {
|
||||||
|
config: {
|
||||||
|
dm_on_warn: true,
|
||||||
|
dm_on_kick: true,
|
||||||
|
dm_on_ban: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (withLogs) {
|
||||||
|
resultObj.plugins.logs = {
|
||||||
|
config: {
|
||||||
|
channels: logChannels.reduce((obj, logChannel) => {
|
||||||
|
if (logChannel.includeExclude === "include") {
|
||||||
|
obj[logChannel.id] = {
|
||||||
|
include: Array.from(logChannel.logTypes.values()),
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
obj[logChannel.id] = {
|
||||||
|
exclude: Array.from(logChannel.logTypes.values()),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
}, {}),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
setResult(resultObj);
|
||||||
|
}, [prefix, levels, withModCommands, muteRoleId, caseChannelId, dmModActionReasons, withLogs, logChannels]);
|
||||||
|
|
||||||
|
const [formattedResult, setFormattedResult] = useState("");
|
||||||
|
useEffect(() => {
|
||||||
|
setFormattedResult(yaml.dump(result));
|
||||||
|
}, [result]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="Configurator">
|
||||||
|
{/* Options */}
|
||||||
|
<div className="options">
|
||||||
|
<h2>Prefix</h2>
|
||||||
|
<div className="control">
|
||||||
|
<label>
|
||||||
|
Bot prefix<br />
|
||||||
|
<input value={prefix} onChange={e => setPrefix(e.target.value)} />
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Levels</h2>
|
||||||
|
<div className="control">
|
||||||
|
<Levels levels={levels} setLevels={setLevels} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Mod commands</h2>
|
||||||
|
<div className="control">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" checked={withModCommands} onChange={e => setWithModCommands(e.target.checked)} />
|
||||||
|
Start with a basic mod command setup
|
||||||
|
</label>
|
||||||
|
|
||||||
|
{withModCommands && (
|
||||||
|
<div>
|
||||||
|
<label>
|
||||||
|
Mute role ID<br />
|
||||||
|
<input value={muteRoleId} onChange={e => setMuteRoleId(e.target.value)} />
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>
|
||||||
|
Case channel ID<br />
|
||||||
|
<input value={caseChannelId} onChange={e => setCaseChannelId(e.target.value)} />
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" checked={dmModActionReasons} onChange={e => setDmModActionReasons(e.target.checked)} />
|
||||||
|
DM reason with mod actions
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Logs</h2>
|
||||||
|
<div className="control">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" checked={withLogs} onChange={e => setWithLogs(e.target.checked)} />
|
||||||
|
Start with a basic logging setup
|
||||||
|
</label>
|
||||||
|
|
||||||
|
{withLogs && (
|
||||||
|
<LogChannels logChannels={logChannels} setLogChannels={setLogChannels} />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Result */}
|
||||||
|
<pre className="result">{formattedResult}</pre>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
46
presetup-configurator/src/Levels.tsx
Normal file
46
presetup-configurator/src/Levels.tsx
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
import React, { useState } from "react";
|
||||||
|
|
||||||
|
const LEVEL_ADMIN = 100;
|
||||||
|
const LEVEL_MODERATOR = 50;
|
||||||
|
|
||||||
|
export type LevelEntry = [string, number]; // id, level
|
||||||
|
|
||||||
|
export function Levels({ levels, setLevels }) {
|
||||||
|
function addLevel() {
|
||||||
|
setLevels(arr => [...arr, ["", LEVEL_MODERATOR]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeLevel(index) {
|
||||||
|
setLevels(arr => [...arr].splice(index, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateLevelId(index, id) {
|
||||||
|
const validId = id.replace(/[^0-9]/g, "");
|
||||||
|
setLevels(arr => {
|
||||||
|
arr[index][0] = validId;
|
||||||
|
return [...arr];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateLevelLevel(index, level) {
|
||||||
|
setLevels(arr => {
|
||||||
|
arr[index][1] = parseInt(level, 10);
|
||||||
|
return [...arr];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{levels.map(([id, level], index) => (
|
||||||
|
<div key={index}>
|
||||||
|
<input value={id} onChange={e => updateLevelId(index, e.target.value)} />
|
||||||
|
<select value={level} onChange={e => updateLevelLevel(index, e.target.value)}>
|
||||||
|
<option value={LEVEL_ADMIN}>Admin</option>
|
||||||
|
<option value={LEVEL_MODERATOR}>Moderator</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
<button onClick={addLevel}>Add</button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
12
presetup-configurator/src/LogChannels.css
Normal file
12
presetup-configurator/src/LogChannels.css
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
.LogChannels .log-channel {
|
||||||
|
margin: 16px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.LogChannels .log-types {
|
||||||
|
height: 200px;
|
||||||
|
overflow-y: scroll;
|
||||||
|
border: 1px solid #aaa;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 4px;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
152
presetup-configurator/src/LogChannels.tsx
Normal file
152
presetup-configurator/src/LogChannels.tsx
Normal file
|
@ -0,0 +1,152 @@
|
||||||
|
import React, { SetStateAction, useState } from "react";
|
||||||
|
import "./LogChannels.css";
|
||||||
|
|
||||||
|
const LOG_TYPES = {
|
||||||
|
"MEMBER_WARN": "Warned",
|
||||||
|
"MEMBER_MUTE": "Muted",
|
||||||
|
"MEMBER_UNMUTE": "Unmuted",
|
||||||
|
"MEMBER_MUTE_EXPIRED": "Mute expired",
|
||||||
|
"MEMBER_KICK": "Kicked",
|
||||||
|
"MEMBER_BAN": "Banned",
|
||||||
|
"MEMBER_UNBAN": "Unbanned",
|
||||||
|
"MEMBER_FORCEBAN": "Forcebanned",
|
||||||
|
"MEMBER_SOFTBAN": "Softbanned",
|
||||||
|
"MEMBER_JOIN": "Member joined",
|
||||||
|
"MEMBER_LEAVE": "Member left",
|
||||||
|
"MEMBER_ROLE_ADD": "Role added to member",
|
||||||
|
"MEMBER_ROLE_REMOVE": "Role removed from member",
|
||||||
|
"MEMBER_NICK_CHANGE": "Nickname changed",
|
||||||
|
"MEMBER_USERNAME_CHANGE": "Username changed",
|
||||||
|
"MEMBER_RESTORE": "Member roles restored",
|
||||||
|
"CHANNEL_CREATE": "Channel created",
|
||||||
|
"CHANNEL_DELETE": "Channel deleted",
|
||||||
|
"ROLE_CREATE": "Role created",
|
||||||
|
"ROLE_DELETE": "Role deleted",
|
||||||
|
"MESSAGE_EDIT": "Message edited",
|
||||||
|
"MESSAGE_DELETE": "Message deleted",
|
||||||
|
"MESSAGE_DELETE_BULK": "Messages deleted in bulk",
|
||||||
|
"MESSAGE_DELETE_BARE": "Message deleted (bare)",
|
||||||
|
"VOICE_CHANNEL_JOIN": "Voice channel join",
|
||||||
|
"VOICE_CHANNEL_LEAVE": "Voice channel leave",
|
||||||
|
"VOICE_CHANNEL_MOVE": "Voice channel move",
|
||||||
|
"COMMAND": "Command used",
|
||||||
|
"MESSAGE_SPAM_DETECTED": "Message spam detected",
|
||||||
|
"CENSOR": "Message censored",
|
||||||
|
"CLEAN": "Messages cleaned",
|
||||||
|
"CASE_CREATE": "Case created",
|
||||||
|
"MASSBAN": "Massbanned",
|
||||||
|
"MASSMUTE": "Massmuted",
|
||||||
|
"MEMBER_TIMED_MUTE": "Temporarily muted",
|
||||||
|
"MEMBER_TIMED_UNMUTE": "Scheduled unmute",
|
||||||
|
"MEMBER_JOIN_WITH_PRIOR_RECORDS": "Member joined with prior records",
|
||||||
|
"OTHER_SPAM_DETECTED": "Non-message spam detected",
|
||||||
|
"MEMBER_ROLE_CHANGES": "Member roles changed",
|
||||||
|
"VOICE_CHANNEL_FORCE_MOVE": "Force-moved to a voice channel",
|
||||||
|
"CASE_UPDATE": "Case updated",
|
||||||
|
"MEMBER_MUTE_REJOIN": "Muted member rejoined",
|
||||||
|
"SCHEDULED_MESSAGE": "Scheduled message to be posted",
|
||||||
|
"POSTED_SCHEDULED_MESSAGE": "Posted scheduled message",
|
||||||
|
"BOT_ALERT": "Bot alert",
|
||||||
|
"AUTOMOD_ACTION": "Automod action",
|
||||||
|
"SCHEDULED_REPEATED_MESSAGE": "Scheduled message to be posted repeatedly",
|
||||||
|
"REPEATED_MESSAGE": "Set a message to be posted repeatedly",
|
||||||
|
"MESSAGE_DELETE_AUTO": "Message deleted (auto)",
|
||||||
|
"SET_ANTIRAID_USER": "Set antiraid (user)",
|
||||||
|
"SET_ANTIRAID_AUTO": "Set antiraid (auto)",
|
||||||
|
"MASS_ASSIGN_ROLES": "Mass-assigned roles",
|
||||||
|
"MASS_UNASSIGN_ROLES": "Mass-unassigned roles",
|
||||||
|
"MEMBER_NOTE": "Added note on member",
|
||||||
|
"CASE_DELETE": "Case deleted",
|
||||||
|
"DM_FAILED": "Failed to DM member",
|
||||||
|
};
|
||||||
|
|
||||||
|
type LOG_TYPE = keyof typeof LOG_TYPES;
|
||||||
|
|
||||||
|
export interface LogChannel {
|
||||||
|
id: string;
|
||||||
|
includeExclude: "include" | "exclude";
|
||||||
|
logTypes: Set<LOG_TYPE>;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
logChannels: LogChannel[];
|
||||||
|
setLogChannels: React.Dispatch<SetStateAction<LogChannel[]>>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function LogChannels({ logChannels, setLogChannels }: Props) {
|
||||||
|
function addLogChannel() {
|
||||||
|
setLogChannels(_logChannels => {
|
||||||
|
return [..._logChannels, {
|
||||||
|
id: "",
|
||||||
|
includeExclude: "include",
|
||||||
|
logTypes: new Set(),
|
||||||
|
}];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteLogChannel(index) {
|
||||||
|
setLogChannels(_logChannels => {
|
||||||
|
const newArr = [..._logChannels];
|
||||||
|
newArr.splice(index, 1);
|
||||||
|
return newArr;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setId(index: number, id: string) {
|
||||||
|
setLogChannels(_logChannels => {
|
||||||
|
_logChannels[index].id = id;
|
||||||
|
return [..._logChannels];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setIncludeExclude(index: number, includeExclude: LogChannel["includeExclude"]) {
|
||||||
|
setLogChannels(_logChannels => {
|
||||||
|
_logChannels[index].includeExclude = includeExclude;
|
||||||
|
return [..._logChannels];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleLogType(index: number, logType: LOG_TYPE, enabled: boolean) {
|
||||||
|
setLogChannels(_logChannels => {
|
||||||
|
if (enabled) {
|
||||||
|
_logChannels[index].logTypes.add(logType);
|
||||||
|
} else {
|
||||||
|
_logChannels[index].logTypes.delete(logType);
|
||||||
|
}
|
||||||
|
|
||||||
|
return [..._logChannels];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="LogChannels">
|
||||||
|
{logChannels.map((logChannel, index) => (
|
||||||
|
<div className="log-channel">
|
||||||
|
<label>
|
||||||
|
ID: <input value={logChannel.id} onChange={e => setId(index, e.target.value)} />
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
Mode:
|
||||||
|
<select value={logChannel.includeExclude}>
|
||||||
|
<option value={"include"}>Include</option>
|
||||||
|
<option value={"exclude"}>Exclude</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
<div className="log-types">
|
||||||
|
{Object.entries(LOG_TYPES).map(([logType, description]) => (
|
||||||
|
<label>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
checked={logChannel.logTypes.has(logType as LOG_TYPE)}
|
||||||
|
onChange={e => toggleLogType(index, logType as LOG_TYPE, e.target.checked)}
|
||||||
|
/>
|
||||||
|
{description}
|
||||||
|
</label>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
<button onClick={addLogChannel}>Add</button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
14
presetup-configurator/src/index.css
Normal file
14
presetup-configurator/src/index.css
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
color: #222;
|
||||||
|
}
|
14
presetup-configurator/src/index.html
Normal file
14
presetup-configurator/src/index.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport"
|
||||||
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="root"></div>
|
||||||
|
<script type="module" src="./index.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
15
presetup-configurator/src/index.tsx
Normal file
15
presetup-configurator/src/index.tsx
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import React from "react";
|
||||||
|
import ReactDOM from "react-dom";
|
||||||
|
import { App } from "./App";
|
||||||
|
import "./index.css";
|
||||||
|
|
||||||
|
ReactDOM.render(
|
||||||
|
<React.StrictMode>
|
||||||
|
<App />
|
||||||
|
</React.StrictMode>,
|
||||||
|
document.getElementById("root")
|
||||||
|
);
|
||||||
|
|
||||||
|
if ((import.meta as any).hot) {
|
||||||
|
(import.meta as any).hot.accept();
|
||||||
|
}
|
23
presetup-configurator/tsconfig.json
Normal file
23
presetup-configurator/tsconfig.json
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"module": "esnext",
|
||||||
|
"target": "es2018",
|
||||||
|
"sourceMap": true,
|
||||||
|
"noImplicitAny": false,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"strict": true,
|
||||||
|
"alwaysStrict": true,
|
||||||
|
"noImplicitThis": true,
|
||||||
|
"strictPropertyInitialization": false,
|
||||||
|
"lib": [
|
||||||
|
"esnext",
|
||||||
|
"dom"
|
||||||
|
],
|
||||||
|
"baseUrl": ".",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"allowJs": true,
|
||||||
|
"jsx": "react"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue