update structure

This commit is contained in:
Rinat Arsaev 2020-12-15 03:10:15 +03:00
parent 158cc48633
commit 9caa3896a1
3 changed files with 366 additions and 325 deletions

269
package-lock.json generated
View File

@ -1,49 +1,36 @@
{
"name": "@rbkmoney/angular-templates",
"version": "0.1.1",
"version": "0.1.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz",
"integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==",
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
"integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"requires": {
"@babel/highlight": "^7.8.3"
"@babel/highlight": "^7.10.4"
}
},
"@babel/helper-validator-identifier": {
"version": "7.9.5",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
"integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g=="
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
"integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw=="
},
"@babel/highlight": {
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz",
"integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==",
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
"integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
"requires": {
"@babel/helper-validator-identifier": "^7.9.0",
"@babel/helper-validator-identifier": "^7.10.4",
"chalk": "^2.0.0",
"js-tokens": "^4.0.0"
}
},
"@babel/runtime": {
"version": "7.9.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz",
"integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"@types/color-name": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
},
"@types/lodash": {
"version": "4.14.150",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.150.tgz",
"integrity": "sha512-kMNLM5JBcasgYscD9x/Gvr6lTAv2NVgsKtet/hm93qMyf/D1pt+7jeEZklKJKxMVmXjxbRVQQGfqDSfipYCO6w==",
"version": "4.14.165",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.165.tgz",
"integrity": "sha512-tjSSOTHhI5mCHTy/OOXYIhi2Wt1qcbHmuXD1Ha7q70CgI/I71afO4XtLb/cVexki1oVYchpul/TOuu3Arcdxrg==",
"dev": true
},
"@types/parse-json": {
@ -117,9 +104,9 @@
}
},
"cli-spinners": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.3.0.tgz",
"integrity": "sha512-Xs2Hf2nzrvJMFKimOR7YR0QwZ8fc0u98kdtwN1eNAZzNQgH3vK2pXzff6GJtKh7S5hoJ87ECiAiZFS2fb5Ii2w=="
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz",
"integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ=="
},
"cliui": {
"version": "6.0.0",
@ -185,9 +172,9 @@
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A=="
},
"easy-stack": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/easy-stack/-/easy-stack-1.0.0.tgz",
"integrity": "sha1-EskbMIWjfwuqM26UhurEv5Tj54g="
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/easy-stack/-/easy-stack-1.0.1.tgz",
"integrity": "sha512-wK2sCs4feiiJeFXn3zvY0p41mdU5VUgbgs1rNsc/y5ngFUijdWd+iIN8eoyuZHKB8xN6BL4PdWmzqFmxNg6V2w=="
},
"emoji-regex": {
"version": "8.0.0",
@ -202,12 +189,6 @@
"is-arrayish": "^0.2.1"
}
},
"es6-object-assign": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
"integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=",
"dev": true
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
@ -231,10 +212,16 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
"genry": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/genry/-/genry-0.15.0.tgz",
"integrity": "sha512-XWjWNZzeXTKDtGsVyQSS6hnBlBDY/H7wMi0spj3bQv2yZ8+fVZy9M0TaS3W23NvRdNIZWx2iL6WGbLmqDQcNxA==",
"version": "0.16.0",
"resolved": "https://registry.npmjs.org/genry/-/genry-0.16.0.tgz",
"integrity": "sha512-mgRduClrLDBS0JkaiFZBK2mP0ogFydKWIDMGmGOF2dS6YlbHa47ru6ZyYdx9AgUxFmWB1SFGTyahCRcAIK3gvg==",
"requires": {
"cosmiconfig": "^6.0.0",
"glob": "^7.1.6",
@ -242,7 +229,7 @@
"ora": "^4.0.3",
"pkg-up": "^3.1.0",
"prettier": "^2.0.4",
"prompts": "^2.3.2",
"prompts": "^2.4.0",
"ts-node": "^8.8.2",
"yargs": "^15.3.1"
}
@ -265,15 +252,24 @@
"path-is-absolute": "^1.0.0"
}
},
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"requires": {
"function-bind": "^1.1.1"
}
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"import-fresh": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
"integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz",
"integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==",
"requires": {
"parent-module": "^1.0.0",
"resolve-from": "^4.0.0"
@ -294,9 +290,9 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"interpret": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz",
"integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==",
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
"integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
"dev": true
},
"is-arrayish": {
@ -304,6 +300,15 @@
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
},
"is-core-module": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz",
"integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==",
"dev": true,
"requires": {
"has": "^1.0.3"
}
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
@ -315,16 +320,16 @@
"integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w=="
},
"js-message": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.5.tgz",
"integrity": "sha1-IwDSSxrwjondCVvBpMnJz8uJLRU="
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.7.tgz",
"integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA=="
},
"js-queue": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/js-queue/-/js-queue-2.0.0.tgz",
"integrity": "sha1-NiITz4YPRo8BJfxslqvBdCUx+Ug=",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/js-queue/-/js-queue-2.0.2.tgz",
"integrity": "sha512-pbKLsbCfi7kriM3s1J4DDCo7jQkI58zPLHi0heXPzPlj0hjUsm+FesPUbE0DSbIVIK503A36aUBoCN7eMFedkA==",
"requires": {
"easy-stack": "^1.0.0"
"easy-stack": "^1.0.1"
}
},
"js-tokens": {
@ -332,10 +337,10 @@
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"json-parse-better-errors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
"json-parse-even-better-errors": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="
},
"kleur": {
"version": "3.0.3",
@ -357,9 +362,9 @@
}
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
"version": "4.17.20",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
},
"log-symbols": {
"version": "3.0.0",
@ -399,13 +404,13 @@
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
},
"node-ipc": {
"version": "9.1.1",
"resolved": "https://registry.npmjs.org/node-ipc/-/node-ipc-9.1.1.tgz",
"integrity": "sha512-FAyICv0sIRJxVp3GW5fzgaf9jwwRQxAKDJlmNFUL5hOy+W4X/I5AypyHoq0DXXbo9o/gt79gj++4cMr4jVWE/w==",
"version": "9.1.3",
"resolved": "https://registry.npmjs.org/node-ipc/-/node-ipc-9.1.3.tgz",
"integrity": "sha512-8RS4RZyS/KMKKYG8mrje+cLxwATe9dBCuOiqKFSWND4oOuKytfuKCiR9yinvhoXF/nGdX/WnbywaUee+9U87zA==",
"requires": {
"event-pubsub": "4.3.0",
"js-message": "1.0.5",
"js-queue": "2.0.0"
"js-message": "1.0.7",
"js-queue": "2.0.2"
}
},
"once": {
@ -417,17 +422,17 @@
}
},
"onetime": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
"integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
"integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
"requires": {
"mimic-fn": "^2.1.0"
}
},
"ora": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/ora/-/ora-4.0.3.tgz",
"integrity": "sha512-fnDebVFyz309A73cqCipVL1fBZewq4vwgSHfxh43vVy31mbyoQ8sCH3Oeaog/owYOs/lLlGVPCISQonTneg6Pg==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/ora/-/ora-4.1.1.tgz",
"integrity": "sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A==",
"requires": {
"chalk": "^3.0.0",
"cli-cursor": "^3.1.0",
@ -440,11 +445,10 @@
},
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
@ -476,9 +480,9 @@
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
},
"supports-color": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
"integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"requires": {
"has-flag": "^4.0.0"
}
@ -515,13 +519,13 @@
}
},
"parse-json": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
"integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
"integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
"requires": {
"@babel/code-frame": "^7.0.0",
"error-ex": "^1.3.1",
"json-parse-better-errors": "^1.0.1",
"json-parse-even-better-errors": "^2.3.0",
"lines-and-columns": "^1.1.6"
}
},
@ -555,17 +559,17 @@
}
},
"prettier": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz",
"integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w=="
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
"integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q=="
},
"prompts": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.2.tgz",
"integrity": "sha512-Q06uKs2CkNYVID0VqwfAl9mipo99zkBv/n2JtWY89Yxa3ZabWSrs0e2KTudKVa3peLUvYXMefDqIleLPVUBZMA==",
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz",
"integrity": "sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==",
"requires": {
"kleur": "^3.0.3",
"sisteransi": "^1.0.4"
"sisteransi": "^1.0.5"
}
},
"rechoir": {
@ -577,11 +581,6 @@
"resolve": "^1.1.6"
}
},
"regenerator-runtime": {
"version": "0.13.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
"integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA=="
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@ -593,11 +592,12 @@
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
},
"resolve": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz",
"integrity": "sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==",
"version": "1.19.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz",
"integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==",
"dev": true,
"requires": {
"is-core-module": "^2.1.0",
"path-parse": "^1.0.6"
}
},
@ -621,9 +621,9 @@
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
},
"shelljs": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
"integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==",
"version": "0.8.4",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz",
"integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==",
"dev": true,
"requires": {
"glob": "^7.0.0",
@ -632,14 +632,13 @@
}
},
"shx": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/shx/-/shx-0.3.2.tgz",
"integrity": "sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA==",
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/shx/-/shx-0.3.3.tgz",
"integrity": "sha512-nZJ3HFWVoTSyyB+evEKjJ1STiixGztlqwKLTUNV5KqMWtGey9fTd4KU1gdZ1X9BV6215pswQ/Jew9NsuS/fNDA==",
"dev": true,
"requires": {
"es6-object-assign": "^1.0.3",
"minimist": "^1.2.0",
"shelljs": "^0.8.1"
"minimist": "^1.2.3",
"shelljs": "^0.8.4"
}
},
"signal-exit": {
@ -658,9 +657,9 @@
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"source-map-support": {
"version": "0.5.17",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.17.tgz",
"integrity": "sha512-bwdKOBZ5L0gFRh4KOxNap/J/MpvX9Yxsq9lFDx65s3o7F/NiHy7JRaGIS8MwW6tZPAq9UXE207Il0cfcb5yu/Q==",
"version": "0.5.19",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
"integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
"requires": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
@ -693,21 +692,21 @@
}
},
"ts-node": {
"version": "8.8.2",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.8.2.tgz",
"integrity": "sha512-duVj6BpSpUpD/oM4MfhO98ozgkp3Gt9qIp3jGxwU2DFvl/3IRaEAvbLa8G60uS7C77457e/m5TMowjedeRxI1Q==",
"version": "8.10.2",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz",
"integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==",
"requires": {
"arg": "^4.1.0",
"diff": "^4.0.1",
"make-error": "^1.1.1",
"source-map-support": "^0.5.6",
"source-map-support": "^0.5.17",
"yn": "3.1.1"
}
},
"typescript": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz",
"integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==",
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
"integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
"dev": true
},
"wcwidth": {
@ -734,11 +733,10 @@
},
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
@ -763,22 +761,19 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"y18n": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
"integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ=="
},
"yaml": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.9.2.tgz",
"integrity": "sha512-HPT7cGGI0DuRcsO51qC1j9O16Dh1mZ2bnXwsi0jrSpsLz0WxOLSLXfkABVl6bZO629py3CU+OMJtpNHDLB97kg==",
"requires": {
"@babel/runtime": "^7.9.2"
}
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz",
"integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg=="
},
"yargs": {
"version": "15.3.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz",
"integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==",
"version": "15.4.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"requires": {
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
@ -790,7 +785,7 @@
"string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^18.1.1"
"yargs-parser": "^18.1.2"
},
"dependencies": {
"find-up": {

View File

@ -11,12 +11,12 @@
"registry": "https://npm.pkg.github.com/"
},
"devDependencies": {
"@types/lodash": "^4.14.150",
"shx": "^0.3.2",
"typescript": "^3.8.3"
"@types/lodash": "^4.14.165",
"shx": "^0.3.3",
"typescript": "^4.1.3"
},
"dependencies": {
"genry": "^0.15.0",
"lodash": "^4.17.15"
"genry": "^0.16.0",
"lodash": "^4.17.20"
}
}

View File

@ -1,4 +1,4 @@
import { css, html, StructureTemplate, Template } from "genry";
import { css, html, StructureTemplate, TemplateObject } from "genry";
import { camelCase, kebabCase, upperFirst } from "lodash";
enum ComponentPart {
@ -7,12 +7,15 @@ enum ComponentPart {
theme,
}
enum Part {
service,
enum Type {
module,
pipe,
partOfModule,
}
enum PartType {
component,
index,
service,
pipe,
}
function createComponentTemplate(
@ -42,14 +45,18 @@ function createComponentTemplate(
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: '${selector}',
templateUrl: ${
hasTemplate
? `'${filename}.component.html'`
: `\`${componentTemplateContent}\``
},
${hasStyle ? `styleUrls: ['${filename}.component.scss'],` : ""}
changeDetection: ChangeDetectionStrategy.OnPush
${[
`selector: '${selector}',`,
`templateUrl: ${
hasTemplate
? `'${filename}.component.html'`
: `\`${componentTemplateContent}\``
},`,
hasStyle && `styleUrls: ['${filename}.component.scss'],`,
"changeDetection: ChangeDetectionStrategy.OnPush,",
]
.filter((v) => v)
.join("\n")}
})
export class ${className}Component {}
`,
@ -94,197 +101,236 @@ function createComponentTemplate(
}
export default [
{ name: "Create component", value: Part.component },
{ name: "Create module", value: Part.module },
{ name: "Create service", value: Part.service },
{ name: "Create pipe", value: Part.pipe },
{ name: "Create module", value: Type.module },
{ name: "Create part of module", value: Type.partOfModule },
].map(
({ name, value }) =>
new Template({
name,
description: "Angular",
questions: [
{
type: "text",
name: "name",
message: "Name",
},
{
type: "multiselect",
name: "parts",
message: "Pick parts",
choices: [
{
title: "Module",
value: Part.module,
selected: value === Part.module,
},
{
title: "Component",
value: Part.component,
selected: value === Part.component,
},
{
title: "Service",
value: Part.service,
selected: value === Part.service,
},
{
title: "Pipe",
value: Part.pipe,
selected: value === Part.pipe,
},
{
title: "Index",
value: Part.index,
selected: true,
},
] as any,
},
{
type: (_, { parts }) =>
parts.includes(Part.component) ? "multiselect" : null,
name: "componentParts",
message: "Pick component parts",
choices: [
{
title: "Template",
value: ComponentPart.template,
selected: true,
},
{
title: "Style",
value: ComponentPart.style,
selected: true,
},
{ title: "Theme", value: ComponentPart.theme },
] as any,
},
{
type: "toggle",
name: "hasDirectory",
message: "With directory",
initial: true,
active: "Yes",
inactive: "No",
},
],
template: (
{ name, componentParts, parts, hasDirectory },
{ template: { prefix } }
) => {
const filename = kebabCase(name);
const camelCaseName = camelCase(name);
const className = upperFirst(camelCaseName);
({ name, value }): TemplateObject => ({
name,
description: "Angular",
questions: [
{
type: "text",
name: "name",
message: "Name",
},
{
type: "select",
name: "partType",
message: "Module type",
choices: [
{
title: "Component",
value: PartType.component,
},
{
title: "Service",
value: PartType.service,
},
{
title: "Pipe",
value: PartType.pipe,
},
],
},
{
type: (_, { partType }) =>
partType === PartType.component ? "multiselect" : null,
name: "componentParts",
message: "Pick component parts",
choices: [
{
title: "Template",
value: ComponentPart.template,
selected: true,
},
{
title: "Style",
value: ComponentPart.style,
},
{
title: "Theme",
value: ComponentPart.theme,
},
] as any,
},
],
template: (
{ name, componentParts, partType, hasDirectory },
{ template: { prefix } }
) => {
const filename = kebabCase(name);
const camelCaseName = camelCase(name);
const className = upperFirst(camelCaseName);
const partNameByPartType = {
[PartType.component]: "component",
[PartType.service]: "service",
[PartType.pipe]: "pipe",
};
const partClassName = `${className}${upperFirst(
partNameByPartType[partType]
)}`;
const partFilename = `${filename}.${partNameByPartType[partType]}`;
const partImport = `import {${partClassName}} from './${partFilename}';`;
const partExport = `export * from './${partFilename}';`;
const hasService = parts.includes(Part.service);
const hasModule = parts.includes(Part.module);
const hasPipe = parts.includes(Part.pipe);
const hasComponent = parts.includes(Part.component);
const hasIndex = parts.includes(Part.index);
const children: StructureTemplate[] = [];
const children: StructureTemplate[] = [];
if (hasComponent) {
switch (partType) {
case PartType.component:
children.push(
...createComponentTemplate(prefix, name, componentParts)
);
}
if (hasService) {
children.push({
path: `${filename}.service.ts`,
path: `${partFilename}.spec.ts`,
content: `
import { Injectable } from '@angular/core';
import { Component, DebugElement } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
@Injectable()
export class ${className}Service {
constructor() {}
}
`,
${partImport}
@Component({
selector: 'dsh-host',
template: \`<dsh-${filename}></dsh-${filename}>\`,
})
class HostComponent {}
describe('${partClassName}', () => {
let fixture: ComponentFixture<HostComponent>;
let debugElement: DebugElement;
let component: ${partClassName};
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [],
declarations: [HostComponent, ${partClassName}]
}).compileComponents();
fixture = TestBed.createComponent(HostComponent);
debugElement = fixture.debugElement.query(By.directive(${partClassName}));
component = debugElement.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(service).toBeTruthy();
});
describe('methods', () => {
});
describe('template', () => {
});
});
`,
});
}
if (hasModule) {
break;
case PartType.service:
children.push({
path: `${filename}.module.ts`,
path: `${partFilename}.ts`,
content: `
import { Injectable } from '@angular/core';
@Injectable()
export class ${partClassName} {
constructor() {}
}
`,
});
break;
case PartType.pipe:
children.push({
path: `${partFilename}.ts`,
content: `
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({name: '${camelCaseName}'})
export class ${partClassName} implements PipeTransform {
transform(value: string) {
return value;
}
}
`,
});
children.push({
path: `${partFilename}.spec.ts`,
content: `
import { TestBed } from '@angular/core/testing';
${partImport}
describe('${partClassName}', () => {
let service: ${partClassName};
beforeEach(() => {
TestBed.configureTestingModule({
imports: [],
providers: [
${partClassName}
],
});
service = TestBed.inject(${partClassName});
});
it('should be created', () => {
expect(service).toBeTruthy();
});
describe('methods', () => {
});
});
`,
});
break;
}
if (value === Type.module) {
children.push({
path: `${filename}.module.ts`,
content: `
import { NgModule } from '@angular/core';
${[
hasComponent
? `import {${className}Component} from './${filename}.component'`
: "",
hasPipe
? `import {${className}Pipe} from './${filename}.pipe'`
: "",
hasService
? `import {${className}Service} from './${filename}.service'`
: "",
]
.filter((v) => v)
.join("\n")}
const EXPORTED_DECLARATIONS = [${[
hasComponent ? `${className}Component` : "",
hasPipe ? `${className}Pipe` : "",
]
.filter((v) => v)
.join(",")}];
${partImport}
@NgModule({
imports: [],
declarations: EXPORTED_DECLARATIONS,
exports: EXPORTED_DECLARATIONS,
declarations: [${
partType !== PartType.service
? partClassName
: ""
}],
exports: [${
partType !== PartType.service
? partClassName
: ""
}],
providers: [${
hasService ? `${className}Service` : ""
partType === PartType.service
? partClassName
: ""
}]
})
export class ${className}Module {}
`,
});
}
if (hasPipe) {
children.push({
path: `${filename}.pipe.ts`,
content: `
import { Pipe, PipeTransform } from '@angular/core';
});
children.push({
path: `index.ts`,
content: `
${partExport}
export * from './${filename}.module'
`,
});
}
@Pipe({name: '${camelCaseName}'})
export class ${className}Pipe implements PipeTransform {
transform(value: any) {
return value;
}
}
`,
});
}
if (hasIndex) {
children.push({
path: `index.ts`,
content: [
hasComponent
? `export * from './${filename}.component'`
: "",
hasModule
? `export * from './${filename}.module'`
: "",
hasPipe ? `export * from './${filename}.pipe'` : "",
hasService
? `export * from './${filename}.service'`
: "",
]
.filter((v) => v)
.join("\n"),
});
}
return hasDirectory
? [
{
path: filename,
children,
},
]
: children;
},
})
return hasDirectory
? [
{
path: filename,
children,
},
]
: children;
},
})
);