@opentermsarchive/engine 0.16.0 → 0.17.1

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 (82) hide show
  1. package/README.md +240 -232
  2. package/package.json +7 -1
  3. package/scripts/dataset/README.md +2 -2
  4. package/scripts/dataset/assets/README.template.js +5 -5
  5. package/scripts/dataset/export/test/fixtures/dataset/README.md +5 -5
  6. package/scripts/import/README.md +1 -1
  7. package/scripts/rewrite/README.md +2 -2
  8. package/scripts/rewrite/rewrite-versions.js +1 -1
  9. package/scripts/utils/renamer/README.md +5 -5
  10. package/scripts/utils/renamer/index.js +2 -2
  11. package/src/archivist/recorder/index.js +2 -2
  12. package/src/archivist/recorder/index.test.js +3 -3
  13. package/src/archivist/recorder/repositories/git/dataMapper.js +1 -1
  14. package/src/archivist/recorder/repositories/git/index.test.js +5 -5
  15. package/src/archivist/recorder/repositories/interface.js +2 -2
  16. package/src/archivist/recorder/repositories/mongo/index.test.js +4 -4
  17. package/src/archivist/services/index.test.js +2 -2
  18. package/src/archivist/services/service.test.js +1 -1
  19. package/src/main.js +1 -1
  20. package/.env.example +0 -3
  21. package/.eslintrc.yaml +0 -116
  22. package/.github/workflows/deploy.yml +0 -50
  23. package/.github/workflows/release.yml +0 -71
  24. package/.github/workflows/test.yml +0 -77
  25. package/CHANGELOG.md +0 -14
  26. package/CODE_OF_CONDUCT.md +0 -128
  27. package/CONTRIBUTING.md +0 -143
  28. package/MIGRATING.md +0 -42
  29. package/README.fr.md +0 -110
  30. package/Vagrantfile +0 -38
  31. package/ansible.cfg +0 -13
  32. package/decision-records/0001-service-name-and-id.md +0 -73
  33. package/decision-records/0002-service-history.md +0 -212
  34. package/decision-records/0003-snapshots-database.md +0 -123
  35. package/ops/README.md +0 -280
  36. package/ops/app.yml +0 -5
  37. package/ops/infra.yml +0 -6
  38. package/ops/inventories/dev.yml +0 -7
  39. package/ops/inventories/production.yml +0 -27
  40. package/ops/roles/infra/defaults/main.yml +0 -2
  41. package/ops/roles/infra/files/.gitconfig +0 -3
  42. package/ops/roles/infra/files/mongod.conf +0 -18
  43. package/ops/roles/infra/files/ota-bot-key.private_key +0 -26
  44. package/ops/roles/infra/tasks/main.yml +0 -78
  45. package/ops/roles/infra/tasks/mongo.yml +0 -40
  46. package/ops/roles/infra/templates/ssh_config.j2 +0 -5
  47. package/ops/roles/ota/defaults/main.yml +0 -14
  48. package/ops/roles/ota/files/.env +0 -21
  49. package/ops/roles/ota/tasks/database.yml +0 -65
  50. package/ops/roles/ota/tasks/main.yml +0 -110
  51. package/ops/site.yml +0 -6
  52. package/pm2.config.cjs +0 -20
  53. package/test/fixtures/service_A.js +0 -22
  54. package/test/fixtures/service_A_terms.md +0 -10
  55. package/test/fixtures/service_A_terms_snapshot.html +0 -14
  56. package/test/fixtures/service_B.js +0 -22
  57. package/test/fixtures/service_with_declaration_history.js +0 -65
  58. package/test/fixtures/service_with_filters_history.js +0 -155
  59. package/test/fixtures/service_with_history.js +0 -188
  60. package/test/fixtures/service_with_multipage_document.js +0 -100
  61. package/test/fixtures/service_without_history.js +0 -31
  62. package/test/fixtures/services.js +0 -19
  63. package/test/fixtures/terms.pdf +0 -0
  64. package/test/fixtures/termsFromPDF.md +0 -25
  65. package/test/fixtures/termsModified.pdf +0 -0
  66. package/test/services/service_A.json +0 -9
  67. package/test/services/service_B.json +0 -9
  68. package/test/services/service_with_declaration_history.filters.js +0 -7
  69. package/test/services/service_with_declaration_history.history.json +0 -17
  70. package/test/services/service_with_declaration_history.json +0 -13
  71. package/test/services/service_with_filters_history.filters.history.js +0 -29
  72. package/test/services/service_with_filters_history.filters.js +0 -7
  73. package/test/services/service_with_filters_history.json +0 -13
  74. package/test/services/service_with_history.filters.history.js +0 -29
  75. package/test/services/service_with_history.filters.js +0 -7
  76. package/test/services/service_with_history.history.json +0 -26
  77. package/test/services/service_with_history.json +0 -17
  78. package/test/services/service_with_multipage_document.filters.js +0 -7
  79. package/test/services/service_with_multipage_document.history.json +0 -37
  80. package/test/services/service_with_multipage_document.json +0 -28
  81. package/test/services/service_without_history.filters.js +0 -7
  82. package/test/services/service_without_history.json +0 -13
@@ -1,26 +0,0 @@
1
- {
2
- "Terms of Service": [
3
- {
4
- "fetch": "https://www.service-with-history.example/tos",
5
- "select": "main",
6
- "filter": [
7
- "removeShareButton"
8
- ],
9
- "validUntil": "2020-09-15T21:30:21.000Z"
10
- },
11
- {
12
- "fetch": "https://www.service-with-history.example/tos",
13
- "select": "body",
14
- "validUntil": "2020-08-15T21:30:21.000Z"
15
- },
16
- {
17
- "fetch": "https://www.service-with-history.example/terms_of_service",
18
- "select": "body",
19
- "filter": [
20
- "removeShareButton",
21
- "removePrintButton"
22
- ],
23
- "validUntil": "2020-09-29T21:30:21.000Z"
24
- }
25
- ]
26
- }
@@ -1,17 +0,0 @@
1
- {
2
- "name": "Service with history",
3
- "documents": {
4
- "Terms of Service": {
5
- "fetch": "https://www.service-with-history.example/terms",
6
- "select": "main",
7
- "filter": [
8
- "removeShareButton",
9
- "removePrintButton"
10
- ]
11
- },
12
- "Privacy Policy": {
13
- "fetch": "https://www.service-with-history.example/privacy",
14
- "select": "body"
15
- }
16
- }
17
- }
@@ -1,7 +0,0 @@
1
- export async function removeShareButton() {
2
- return 'last-removeShareButton';
3
- }
4
-
5
- export async function removePrintButton() {
6
- return 'last-removePrintButton';
7
- }
@@ -1,37 +0,0 @@
1
- {
2
- "Community Guidelines": [
3
- {
4
- "combine": [
5
- {
6
- "fetch": "https://www.service-with-multipage-document.example/community-standards"
7
- },
8
- {
9
- "fetch": "https://www.service-with-multipage-document.example/community-standards/hate-speech/"
10
- },
11
- {
12
- "fetch": "https://www.service-with-multipage-document.example/community-standards/violence-incitement/",
13
- "filter": [
14
- "removeShareButton"
15
- ]
16
- }
17
- ],
18
- "select": "body",
19
- "validUntil": "2020-04-15T21:30:21.000Z"
20
- },
21
- {
22
- "combine": [
23
- {
24
- "fetch": "https://www.service-with-multipage-document.example/community-standards"
25
- },
26
- {
27
- "fetch": "https://www.service-with-multipage-document.example/community-standards/hate-speech/"
28
- },
29
- {
30
- "fetch": "https://www.service-with-multipage-document.example/community-standards/violence-incitement/"
31
- }
32
- ],
33
- "select": "body",
34
- "validUntil": "2020-03-15T21:30:21.000Z"
35
- }
36
- ]
37
- }
@@ -1,28 +0,0 @@
1
- {
2
- "name": "Service with multipage",
3
- "documents": {
4
- "Community Guidelines": {
5
- "combine": [
6
- {
7
- "fetch": "https://www.service-with-multipage-document.example/community-standards",
8
- "select": "#main"
9
- },
10
- {
11
- "fetch": "https://www.service-with-multipage-document.example/community-standards/hate-speech/",
12
- "remove": "#footer",
13
- "executeClientScripts": false
14
- },
15
- {
16
- "fetch": "https://www.service-with-multipage-document.example/community-standards/violence-incitement/",
17
- "filter": [
18
- "removeShareButton",
19
- "removePrintButton"
20
- ]
21
- }
22
- ],
23
- "select": "body",
24
- "remove": "body",
25
- "executeClientScripts": true
26
- }
27
- }
28
- }
@@ -1,7 +0,0 @@
1
- export async function removeShareButton() {
2
- return 'last-removeShareButton';
3
- }
4
-
5
- export async function removePrintButton() {
6
- return 'last-removePrintButton';
7
- }
@@ -1,13 +0,0 @@
1
- {
2
- "name": "Service without history",
3
- "documents": {
4
- "Terms of Service": {
5
- "fetch": "https://www.service-without-history.example/tos",
6
- "select": "body",
7
- "filter": [
8
- "removeShareButton",
9
- "removePrintButton"
10
- ]
11
- }
12
- }
13
- }