@live-change/task-frontend 0.8.24

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.
Files changed (46) hide show
  1. package/.nx/cache/file-map.json +257 -0
  2. package/.nx/cache/project-graph.json +6 -0
  3. package/Dockerfile +55 -0
  4. package/LICENSE +21 -0
  5. package/data/GeoLite2-Country.mmdb +0 -0
  6. package/dev.Dockerfile +35 -0
  7. package/docker/app.initd.sh +73 -0
  8. package/docker/build-and-upload.sh +30 -0
  9. package/docker/build-docker-and-upload.sh +33 -0
  10. package/docker/commit-new-version.sh +17 -0
  11. package/docker/k8s-rsync-helper.sh +4 -0
  12. package/docker/onlyDependencies.js +12 -0
  13. package/docker/parse-args-and-config.sh +19 -0
  14. package/docker/restore-backup-with-service.sh +14 -0
  15. package/docker/restore-backup.sh +22 -0
  16. package/docker/start-service.sh +4 -0
  17. package/docker/upload-backup-and-restore.sh +12 -0
  18. package/front/index.html +65 -0
  19. package/front/locales/en.js +26 -0
  20. package/front/locales/en.json +7 -0
  21. package/front/public/favicon.ico +0 -0
  22. package/front/public/images/empty-photo.svg +38 -0
  23. package/front/public/images/empty-user-photo.svg +33 -0
  24. package/front/public/images/logo.svg +34 -0
  25. package/front/public/images/logo128.png +0 -0
  26. package/front/src/App.vue +61 -0
  27. package/front/src/Index.vue +16 -0
  28. package/front/src/analytics/index.js +15 -0
  29. package/front/src/components/Clock.vue +22 -0
  30. package/front/src/config.js +26 -0
  31. package/front/src/entry-client.js +8 -0
  32. package/front/src/entry-server.js +8 -0
  33. package/front/src/router.js +76 -0
  34. package/front/tsconfig.json +26 -0
  35. package/front/tsconfig.node.json +11 -0
  36. package/front/vite.config.ts +41 -0
  37. package/index.js +2 -0
  38. package/package.json +106 -0
  39. package/server/app.config.js +100 -0
  40. package/server/init.js +10 -0
  41. package/server/page.documentType.js +103 -0
  42. package/server/security.config.js +53 -0
  43. package/server/services.list.js +49 -0
  44. package/server/start.js +11 -0
  45. package/server/testTasks.js +0 -0
  46. package/start-dev-docker.sh +4 -0
@@ -0,0 +1,100 @@
1
+ import App from "@live-change/framework"
2
+ const app = App.app()
3
+
4
+ const contactTypes = ['email']
5
+
6
+ import securityConfig from './security.config.js'
7
+ import documentTypePage from './page.documentType.js'
8
+
9
+ app.config = {
10
+ services: [
11
+ {
12
+ name: 'session',
13
+ createSessionOnUpdate: true
14
+ },
15
+ {
16
+ name: 'user',
17
+ },
18
+ {
19
+ name: 'email',
20
+ },
21
+ {
22
+ name: 'passwordAuthentication',
23
+ contactTypes,
24
+ signInWithoutPassword: true
25
+ },
26
+ {
27
+ name: 'userIdentification',
28
+ },
29
+ {
30
+ name: 'localeSettings',
31
+ },
32
+ {
33
+ name: 'identicon',
34
+ },
35
+ {
36
+ name: 'accessControl',
37
+ createSessionOnUpdate: true,
38
+ contactTypes,
39
+ },
40
+ {
41
+ name: 'security',
42
+ ...securityConfig,
43
+ },
44
+ {
45
+ name: 'notification',
46
+ contactTypes,
47
+ notificationTypes: ['example_TestNotification']
48
+ },
49
+ {
50
+ name: 'upload',
51
+ },
52
+ {
53
+ name: 'image',
54
+ },
55
+ {
56
+ name: 'secretCode',
57
+ },
58
+ {
59
+ name: 'secretLink',
60
+ },
61
+ {
62
+ name: 'messageAuthentication',
63
+ contactTypes,
64
+ signUp: true,
65
+ signIn: true,
66
+ connect: true
67
+ },
68
+ {
69
+ name: 'url',
70
+ },
71
+ {
72
+ name: 'prosemirror',
73
+ documentTypes: {
74
+ page: documentTypePage,
75
+ /*rich: require('./rich.documentType.js'),*/
76
+ },
77
+ testLatency: 2000
78
+ },
79
+ {
80
+ name: 'content',
81
+ },
82
+ {
83
+ name: 'geoIp',
84
+ geoIpCountryPath: "./data/GeoLite2-Country.mmdb",
85
+ //geoIpDefaultCountry: "pl"
86
+ },
87
+ {
88
+ name: 'vote',
89
+ },
90
+ {
91
+ name: 'task',
92
+ },
93
+ {
94
+ name: 'backup',
95
+ port: 8007
96
+ },
97
+ ]
98
+ }
99
+
100
+ export default app.config
package/server/init.js ADDED
@@ -0,0 +1,10 @@
1
+ import { createUser } from "@live-change/user-frontend/server/init-functions.js"
2
+ import App from '@live-change/framework'
3
+ const app = App.app()
4
+
5
+ export default async function(services) {
6
+
7
+ const testUser = await createUser(services,
8
+ 'Test User', 'test@test.com', 'Testy123', 'u1', ['writer'])
9
+
10
+ }
@@ -0,0 +1,103 @@
1
+ export default {
2
+ "marks": {
3
+ "bold": {},
4
+ "italic": {},
5
+ "underline": {},
6
+ "strike": {}
7
+ },
8
+ "nodes": {
9
+ "paragraph": {
10
+ "content": "inline*",
11
+ "group": "block"
12
+ },
13
+ "horizontalRule": {
14
+ "group": "block"
15
+ },
16
+ "heading": {
17
+ "content": "inline*",
18
+ "group": "block",
19
+ "defining": true,
20
+ "attrs": {
21
+ "level": {
22
+ "default": 1
23
+ }
24
+ }
25
+ },
26
+ "blockquote": {
27
+ "content": "block+",
28
+ "group": "block",
29
+ "defining": true
30
+ },
31
+ "codeBlock": {
32
+ "content": "text*",
33
+ "marks": "",
34
+ "group": "block",
35
+ "code": true,
36
+ "defining": true,
37
+ "attrs": {
38
+ "language": {
39
+ "default": null
40
+ }
41
+ }
42
+ },
43
+ "bulletList": {
44
+ "content": "listItem+",
45
+ "group": "block list"
46
+ },
47
+ "orderedList": {
48
+ "content": "listItem+",
49
+ "group": "block list",
50
+ "attrs": {
51
+ "start": {
52
+ "default": 1
53
+ }
54
+ }
55
+ },
56
+ "listItem": {
57
+ "content": "paragraph block*",
58
+ "defining": true
59
+ },
60
+ "image": {
61
+ "content": "",
62
+ "marks": "",
63
+ "group": "block",
64
+ "inline": false,
65
+ "atom": true,
66
+ "selectable": true,
67
+ "draggable": true,
68
+ "attrs": {
69
+ "image": {
70
+ "default": null
71
+ }
72
+ }
73
+ },
74
+ "doc": {
75
+ "content": "block+"
76
+ },
77
+ "text": {
78
+ "group": "inline"
79
+ },
80
+ "hardBreak": {
81
+ "group": "inline",
82
+ "inline": true,
83
+ "selectable": false
84
+ },
85
+ "component": {
86
+ "content": "block*",
87
+ "marks": "",
88
+ "group": "block",
89
+ "inline": false,
90
+ "selectable": true,
91
+ "draggable": true,
92
+ "attrs": {
93
+ "is": {
94
+ "default": "card"
95
+ },
96
+ "attrs": {
97
+ "default": {}
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "topNode": "doc"
103
+ }
@@ -0,0 +1,53 @@
1
+ import lcp from "@live-change/pattern"
2
+
3
+ const clientKeys = (client) => [
4
+ { key: 'user', value: client.user },
5
+ { key: 'session', value: client.session },
6
+ { key: 'ip', value: client.ip }
7
+ ]
8
+
9
+ const failedAuthCodes = lcp.chain([
10
+ { type: "wrong-secret-code", id: "1st-failed-secret-code" },
11
+ { eq: "ip", expire: "10m" },
12
+ { type: "wrong-secret-code", id: "2nd-failed-secret-code" },
13
+ { eq: "ip", expire: "10m" },
14
+ { type: "wrong-secret-code", id: "3rd-failed-secret-code",
15
+ actions: [
16
+ { type: 'ban', keys: ['ip'], ban: { type: 'captcha', actions: ['checkSecretCode'], expire: "30m" } }
17
+ ]
18
+ }
19
+ ]).model
20
+
21
+ const patterns = lcp.mergeModels(
22
+ //failedAuthCodes
23
+ )
24
+
25
+ const counters = [
26
+ {
27
+ id: 'wrong-codes-captcha',
28
+ match: ['wrong-secret-code'],
29
+ keys: ['ip'],
30
+ max: 2,
31
+ duration: '1m',
32
+ actions: [
33
+ { type: 'ban', keys: ['ip'], ban: { type: 'captcha', actions: ['checkSecretCode'], expire: "30m" } }
34
+ ]
35
+ },
36
+ {
37
+ id: 'wrong-codes-ban',
38
+ visible: true,
39
+ match: ['wrong-secret-code'],
40
+ keys: ['ip'],
41
+ max: 5,
42
+ duration: '10m',
43
+ actions: [
44
+ { type: 'ban', keys: ['ip'], ban: { type: 'block', actions: ['checkSecretCode'], expire: "2m" } }
45
+ ]
46
+ }
47
+ ]
48
+
49
+ export default {
50
+ clientKeys,
51
+ patterns,
52
+ counters
53
+ }
@@ -0,0 +1,49 @@
1
+ import session from '@live-change/session-service'
2
+ import user from '@live-change/user-service'
3
+ import email from '@live-change/email-service'
4
+ import passwordAuthentication from '@live-change/password-authentication-service'
5
+ import userIdentification from '@live-change/user-identification-service'
6
+ import identicon from '@live-change/identicon-service'
7
+ import localeSettings from '@live-change/locale-settings-service'
8
+ import accessControl from '@live-change/access-control-service'
9
+ import security from '@live-change/security-service'
10
+ import notification from '@live-change/notification-service'
11
+ import upload from '@live-change/upload-service'
12
+ import image from '@live-change/image-service'
13
+ import secretCode from '@live-change/secret-code-service'
14
+ import secretLink from '@live-change/secret-link-service'
15
+ import messageAuthentication from '@live-change/message-authentication-service'
16
+ import url from '@live-change/url-service'
17
+ import prosemirror from '@live-change/prosemirror-service'
18
+ import content from '@live-change/content-service'
19
+ import geoIp from '@live-change/geoip-service'
20
+ import vote from '@live-change/vote-service'
21
+ import backup from '@live-change/backup-service'
22
+ import task from '@live-change/task-service'
23
+ import init from './init.js'
24
+
25
+ export {
26
+ session,
27
+ user,
28
+ email,
29
+ passwordAuthentication,
30
+ userIdentification,
31
+ identicon,
32
+ localeSettings,
33
+ accessControl,
34
+ security,
35
+ notification,
36
+ upload,
37
+ image,
38
+ secretCode,
39
+ secretLink,
40
+ messageAuthentication,
41
+ url,
42
+ prosemirror,
43
+ content,
44
+ geoIp,
45
+ vote,
46
+ backup,
47
+ task,
48
+ init
49
+ }
@@ -0,0 +1,11 @@
1
+ import appConfig from './app.config.js'
2
+
3
+ import * as services from './services.list.js'
4
+ for(const serviceConfig of appConfig.services) {
5
+ serviceConfig.module = services[serviceConfig.name]
6
+ }
7
+ appConfig.init = services['init']
8
+
9
+ import { starter } from '@live-change/cli'
10
+
11
+ starter(appConfig)
File without changes
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ docker build -f dev.Dockerfile . -t adone-dev
4
+ docker run -it -v $(pwd):/app -p 8001:8001 -p 9001:9001 adone-dev bash