crypter's People
Forkers
khh4vddcrypter's Issues
Declare all Sequelize models for single webpack output file
In order Sequelize models to works in single bundle file built with webpack it has to be manually defined every single model.
sequelize.addModels([ModelA, ModelB, ...])
With the extension of the application it will be grow more and more. Need to find solution for this.
Angular throws a http errors in browser console even if they are caught in application
When authorization is failed API respond 404 status code and for this case an applications catches an error
https://github.com/someApprentice/Crypter/blob/master/src/app/auth/auth.service.ts#L36
https://github.com/someApprentice/Crypter/blob/master/src/app/auth/auth.service.ts#L61-L63
But somehow Angular throws the error anyway
POST http://localhost:4000/api/login 404 (Not Found)
_ @ polyfills.1ef83d22ada557f4a131.js:1
n.scheduleTask @ polyfills.1ef83d22ada557f4a131.js:1
onScheduleTask @ polyfills.1ef83d22ada557f4a131.js:1
n.scheduleTask @ polyfills.1ef83d22ada557f4a131.js:1
t.scheduleTask @ polyfills.1ef83d22ada557f4a131.js:1
t.scheduleMacroTask @ polyfills.1ef83d22ada557f4a131.js:1
p @ polyfills.1ef83d22ada557f4a131.js:1
(anonymous) @ polyfills.1ef83d22ada557f4a131.js:1
H.a.(anonymous function) @ polyfills.1ef83d22ada557f4a131.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
t._trySubscribe @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
J @ main.1ce17900a4d53c7a028c.js:1
e._innerSub @ main.1ce17900a4d53c7a028c.js:1
e._tryNext @ main.1ce17900a4d53c7a028c.js:1
e._next @ main.1ce17900a4d53c7a028c.js:1
e.next @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
t._trySubscribe @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.call @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.call @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.call @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.call @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.call @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.login @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
handleEvent @ main.1ce17900a4d53c7a028c.js:1
handleEvent @ main.1ce17900a4d53c7a028c.js:1
ea @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
e.object.o @ main.1ce17900a4d53c7a028c.js:1
e.__tryOrUnsub @ main.1ce17900a4d53c7a028c.js:1
e.next @ main.1ce17900a4d53c7a028c.js:1
e._next @ main.1ce17900a4d53c7a028c.js:1
e.next @ main.1ce17900a4d53c7a028c.js:1
e.next @ main.1ce17900a4d53c7a028c.js:1
e.emit @ main.1ce17900a4d53c7a028c.js:1
e.onSubmit @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
handleEvent @ main.1ce17900a4d53c7a028c.js:1
handleEvent @ main.1ce17900a4d53c7a028c.js:1
ea @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
n.invokeTask @ polyfills.1ef83d22ada557f4a131.js:1
onInvokeTask @ main.1ce17900a4d53c7a028c.js:1
n.invokeTask @ polyfills.1ef83d22ada557f4a131.js:1
t.runTask @ polyfills.1ef83d22ada557f4a131.js:1
t.invokeTask @ polyfills.1ef83d22ada557f4a131.js:1
k @ polyfills.1ef83d22ada557f4a131.js:1
g @ polyfills.1ef83d22ada557f4a131.js:1
Importing the zone.js/dist/zone-error
in environment files doesn't actually affects anything.
This behavior isn't occurs in the test environment via Karma/Jasmine.
Rename WelcomeComponent to something more convenient
The WelcomeComponent doesn't actually do any welcomes it's just form that redirects an user to the login/registration routes depending on email's registration, so the component's name must be appropriate.
Resign jwt token if expired
For now JWT token is inexpirable. It need to be done expirable along with Cookies and resign both of them if they expired.
Imports of Sequelize models removes during compilation
All Sequelize models defined in an external file removes from the main file during compilation. This behavior happened during a tests which is performed with ts-jest.
Need to find a way to configure this library that all dependencies was imported.
https://github.com/someApprentice/Crypter/blob/master/api/services/Database.ts#L18
https://github.com/someApprentice/Crypter/blob/master/api/api.ts#L3
https://github.com/someApprentice/Crypter/blob/master/api/api.ts#L27
Jest test keeps running despite the absence of asynchronous processes
Despite the fact that the option --detectOpenHandles
does not show any asynchronous process, the test process cannot stop.
--force-exit
is still a solution, but the console still gives an error
Have you considered using `--detectOpenHandles` to detect async operations that
kept running after all tests finished?
Wait until fix of validate's fields option in sequelize-typescript library
Some model's validation has to be only on certain fields and sequelize-typescript library has a bug for this option.
After that issue sequelize/sequelize-typescript#554 will be fixed correct the code
https://github.com/someApprentice/Crypter/blob/master/api/services/Authorizer.ts#L62
https://github.com/someApprentice/Crypter/blob/master/api/api.ts#L92
Wait for Express 5 for build-in async/await handler
For now any async
controller function is implemented through dirt fix.
const asyncHandler = fn => (req, res, next) => {
return Promise
.resolve(fn(req, res, next))
.catch(next);
};
This is has to be done by Express build-in handler.
Find a convenient way to run test not from a root route
The testing of Angular's components starts from a root route and due of that test for the component, which suppose to be in the certain route, need first to call navigate(...)
function to this route or mock ActivatedRoute
.
https://github.com/someApprentice/Crypter/blob/master/src/app/auth/registration/registration.component.spec.ts#L49
https://github.com/someApprentice/Crypter/blob/master/src/app/auth/login/login.component.spec.ts#L48
Jest test keep running async operations wich keeping it from exit
Literally to say Jest keeps opened the express server and to work around this issue need ran tests with --force-exit
option.
Need to find a way to shutdown the server after all test is done.
//Jest has detected the following 1 open handle potentially keeping Jest from exiting:
// > 60 | server.listen(PORT, () => {
// | ^
// 61 | console.log(`Node server listening on http://localhost:${PORT}`);
// 62 | });
// at Function.listen (node_modules/express/lib/application.js:618:24)
// at Object.<anonymous> (server.ts:60:8)
Find shorter way to set Title of exact route if its possible
The title change is implemented through small sequence of observables. Maybe there is most shorter way to do this.
https://github.com/someApprentice/Crypter/blob/master/src/app/app.component.ts#L29-L41
Wait until Angular will fix responseType option for HttpClient methods
To set responseType
option need to override it type as json
Otherwise would throw an error
Types of property 'responseType' are incompatible.
Type 'string' is not assignable to type '"json"'.
This is Angular issue and need to be fixed after it fix.
Implement localStorage expiration
If Cookies will expire the server will respond log off version of page. That may cause problems with frontend application since it relies on localStorage.
The localStorage items has to have expiration time.
Wait until Angular will provide a way of passing data property with router.navigate(...) method
To set route data
property while navigation need to do some trick
let route = this.router.config.find(r => r.path === redirect);
route.data['smthn'] = smthn;
This is should be done by standard Angular functionality.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.