@live-change/survey-frontend 0.8.126

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 (42) hide show
  1. package/Dockerfile +71 -0
  2. package/LICENSE +21 -0
  3. package/data/.placeholder +0 -0
  4. package/dev.Dockerfile +35 -0
  5. package/docker/app.initd.sh +73 -0
  6. package/docker/build-and-upload.sh +30 -0
  7. package/docker/build-docker-and-upload.sh +39 -0
  8. package/docker/commit-new-version.sh +17 -0
  9. package/docker/k8s-rsync-helper.sh +4 -0
  10. package/docker/onlyDependencies.js +12 -0
  11. package/docker/parse-args-and-config.sh +20 -0
  12. package/docker/restore-backup-with-service.sh +14 -0
  13. package/docker/restore-backup.sh +22 -0
  14. package/docker/start-service.sh +4 -0
  15. package/docker/upload-backup-and-restore.sh +12 -0
  16. package/front/index.html +78 -0
  17. package/front/locales/en.js +29 -0
  18. package/front/locales/en.json +7 -0
  19. package/front/public/favicon.ico +0 -0
  20. package/front/public/images/empty-photo.svg +38 -0
  21. package/front/public/images/empty-user-photo.svg +33 -0
  22. package/front/public/images/logo.svg +34 -0
  23. package/front/public/images/logo128.png +0 -0
  24. package/front/src/App.vue +61 -0
  25. package/front/src/Index.vue +16 -0
  26. package/front/src/analytics/index.js +15 -0
  27. package/front/src/config.js +28 -0
  28. package/front/src/entry-client.js +8 -0
  29. package/front/src/entry-server.js +8 -0
  30. package/front/src/router.js +76 -0
  31. package/front/tsconfig.json +26 -0
  32. package/front/tsconfig.node.json +11 -0
  33. package/front/vite.config.ts +53 -0
  34. package/index.js +2 -0
  35. package/package.json +107 -0
  36. package/server/app.config.js +115 -0
  37. package/server/init.js +10 -0
  38. package/server/page.documentType.js +103 -0
  39. package/server/security.config.js +53 -0
  40. package/server/services.list.js +57 -0
  41. package/server/start.js +11 -0
  42. package/start-dev-docker.sh +4 -0
@@ -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,57 @@
1
+ import timer from '@live-change/timer-service'
2
+ import session from '@live-change/session-service'
3
+ import user from '@live-change/user-service'
4
+ import email from '@live-change/email-service'
5
+ import passwordAuthentication from '@live-change/password-authentication-service'
6
+ import userIdentification from '@live-change/user-identification-service'
7
+ import identicon from '@live-change/identicon-service'
8
+ import localeSettings from '@live-change/locale-settings-service'
9
+ import accessControl from '@live-change/access-control-service'
10
+ import security from '@live-change/security-service'
11
+ import notification from '@live-change/notification-service'
12
+ import upload from '@live-change/upload-service'
13
+ import image from '@live-change/image-service'
14
+ import secretCode from '@live-change/secret-code-service'
15
+ import secretLink from '@live-change/secret-link-service'
16
+ import messageAuthentication from '@live-change/message-authentication-service'
17
+ import googleAuthentication from '@live-change/google-authentication-service'
18
+ import linkedinAuthentication from '@live-change/linkedin-authentication-service'
19
+ import url from '@live-change/url-service'
20
+ import prosemirror from '@live-change/prosemirror-service'
21
+ import content from '@live-change/content-service'
22
+ import geoIp from '@live-change/geoip-service'
23
+ import vote from '@live-change/vote-service'
24
+ import backup from '@live-change/backup-service'
25
+ import task from '@live-change/task-service'
26
+ import survey from '@live-change/survey-service'
27
+ import init from './init.js'
28
+
29
+ export {
30
+ timer,
31
+ session,
32
+ user,
33
+ email,
34
+ passwordAuthentication,
35
+ userIdentification,
36
+ identicon,
37
+ localeSettings,
38
+ accessControl,
39
+ security,
40
+ notification,
41
+ upload,
42
+ image,
43
+ secretCode,
44
+ secretLink,
45
+ messageAuthentication,
46
+ googleAuthentication,
47
+ linkedinAuthentication,
48
+ url,
49
+ prosemirror,
50
+ content,
51
+ geoIp,
52
+ vote,
53
+ backup,
54
+ task,
55
+ survey,
56
+ init
57
+ }
@@ -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)
@@ -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