74 Commits

Author SHA1 Message Date
01ed3e9aaf v0.0.1
All checks were successful
continuous-integration/drone/push Build is passing
2020-01-10 13:52:33 +01:00
e7fadd5e08 Add MIT license to all package.jsons 2020-01-10 13:46:10 +01:00
23f2796d68 Use relative paths in packages/*/package.json
When using versions and letting npm install dedupe the packages, npm
audit does not work and it exits with a cryptic error:

  The server said: Invalid package tree, run npm install to rebuild your package-lock.json
2020-01-09 18:26:00 +01:00
1ec9f604de Fix clean install 2020-01-09 15:15:29 +01:00
c27e66a8e2 Add captcha to main site, fix tests of styled-components 2019-11-04 11:07:46 -04:00
262ba2c2af Add captcha requirement for registering 2019-11-03 19:20:44 -04:00
8449416366 Add ability to register account without email
TODO: add captcha
2019-11-01 14:43:47 -04:00
4b170b4e63 Run eslint --fix 2019-11-01 11:18:50 -04:00
9f1e2ca713 Run rondo imports
package.jsons are changed because dependencies are now sorted
tsconfig.jsons are changed because all referenced monorepo packages will
be added as project references
tsconfig.esm.jsons are changed because syncEsmConfig was run
2019-10-01 23:39:05 +07:00
4d7224cd8f Update package.json(s)
Bug for server: supertest is included
2019-10-01 22:29:51 +07:00
0c49e52f21 Add version tag to all package.json files 2019-10-01 09:37:57 +07:00
d4378719c5 Use EntitySchema and interfaces over typeorm decorators 2019-09-18 15:25:27 +07:00
12aa397350 Remove tslint.json 2019-09-16 21:04:55 +07:00
400d1cd213 Run eslint --fix 2019-09-16 21:04:10 +07:00
7631f085ef Fix packages/server 2019-09-16 10:46:17 +07:00
fea568b58a Fix packages/common 2019-09-15 17:50:20 +07:00
fb41c2ce69 Add @rondo.dev/common guard fn
This is to help guard against types that can be undefined since the
recommended eslint rules recommend against using `!` operator on values
like:

    const obj: Obj | undefined = ...
    obj!.value

Now we can use:

    const obj: Obj | undefined = ...
    const obj2: Obj = guard(isDefined, obj)
    obj.value

The guard function will throw an error if obj parameter is undefined.
2019-09-15 11:40:31 +07:00
ac8f1d9ff3 Run rondo syncEsmConfig 2019-09-14 12:01:29 +07:00
195d7226e8 Rename jsonrpc types 2019-09-13 23:49:05 +07:00
25589b870c Refactor common/team 2019-09-11 13:34:41 +07:00
ae2ed21f05 Remove unused routes
TBD: fix comments-server
2019-09-11 12:18:13 +07:00
055d9588bf Use JSONRPC in TeamService (needs more testing) 2019-09-11 00:40:10 +07:00
eebe26f706 Extract redux, http-types, http-client and test-utils 2019-09-10 17:56:25 +07:00
f509004dac Add rpc/TeamService.test.ts 2019-09-07 19:44:29 +07:00
3739f27ebe Add first test for JSONRPC service 2019-09-07 09:38:43 +07:00
5cf54d0be9 Rename old UserService to AuthService, LoginRoutes to AuthRoutes 2019-09-05 10:19:27 +07:00
67e3da3246 Add ability to configure rpc services. Needs further testing 2019-08-31 09:12:10 +07:00
7434c9fb42 Add UserService (RPC version) 2019-08-28 18:26:26 +07:00
cd5ff9b5da Generate @rondo.dev/common entities 2019-08-28 08:08:00 +07:00
dffad844ad Rename scope @rondo to @rondo.dev 2019-08-25 11:33:06 +07:00
79c6d1a608 Refactor scripts, add ability to load external scripts 2019-08-18 09:57:47 +07:00
19565563cc Add Contextual<Service, Context> type
As seen in TeamService2.ts, the Contextual type will add Context as the
last argument to any method of the interface, as long as the method has
0-4 arguments.

Interfaces with more than 4 arguments cannot use this type, but they
could be converted to interfaces which use 1 argument
(object/dictionary) only.

Some long-term thinking: Maybe only methods with a single argument
should be supported, similar to the way gRPC does it.
2019-08-07 22:37:48 +07:00
b617069784 Add packages/services/src/services/TeamService2.ts
A few notes:

1) The context higher-order function will be tedious to define - a lot
   more typing than just an extra function argument.
2) As some methods do not require the context function, forgetting to
   call it might introduce bugs (await fn will not error out), but
   compile checks of the return value type might detect this

Possible solution is to go the GRPC way and allow only a single method
type as a parameter so all server-side method types would look like:

  async fn(param: IParam, context: Context) {}

and all client-side method types would look like:

  async fn(param: IParam) {}

However, This would deviate from the JSON-RPC standard which allows
multiple arguments to be passed in an array.

Alternatively, context could be passed as a first argument and then
filtered out:

  type Arguments<T> = T extends (context: Ctx, ...args: infer A) => infer R
    ? A
    : never

In this case, the type of Ctx would need to be known in advance. Will
have to think about this some more.
2019-08-06 19:26:11 +07:00
15d54639ab Move ILogger to @rondo/common 2019-08-04 13:15:33 +07:00
90d1e1a040 Fix broken StringUtils.test.ts 2019-04-11 13:42:19 +08:00
7711a9596c Remove markdown from client-side
Markdown parser takes too much space in the final compressed bundle
2019-04-11 12:20:39 +08:00
9d282b278d Build ESM client-side modules to enable tree shaking
TypeScript compiler needs to be configured to output ES6 module by
setting --module es6 or the equivalent tsconfig.json compilerOptions
parameter.

Since tsc --build does not accept compiler options flags, we need to
duplicate some of the configuration:

- specify separate output folder for ES6 module files (new
  tsconfig.esm.json file)
- add "module" field for ES6 module (esm) output files to package.json

Hence, a script `scripts/sync-esm-config.js` was added to automate this
process.
2019-04-11 11:40:07 +08:00
65f1703089 Add ability to load user votes on frontend 2019-04-08 13:34:19 +08:00
17d67900c1 Add safe Markdown parsing to CommentService 2019-04-07 13:44:35 +08:00
6418cd64b6 Add @rondo/common Markdown 2019-04-07 13:16:18 +08:00
89af2f0845 Add StringUtils 2019-04-06 13:58:20 +08:00
831001a9c5 Add createFilterProps 2019-04-03 18:02:36 +08:00
264f5aba60 Add T prefix for all type defs 2019-04-02 16:22:38 +08:00
adfa7a069a Add common tslint.json configuration 2019-04-02 14:46:40 +08:00
0a9648c392 Add packages/common/src/types.ts 2019-04-02 14:38:01 +08:00
fbfcb67c41 Throw error when URL param missing 2019-04-01 12:57:52 +08:00
5c22f44930 Use === in without.ts 2019-03-25 13:20:03 +08:00
e50dd99206 Add common/src/without.ts 2019-03-24 10:47:53 +08:00
a628082a73 Add packages/client/src/team 2019-03-20 15:01:15 +05:00
5317187a45 Add packages/common/src/indexBy.ts 2019-03-20 12:37:05 +05:00