@opencrvs/toolkit 2.1.0-rc.a74bce1 → 2.1.0-rc.aae3e77

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 (134) hide show
  1. package/README.md +3 -12
  2. package/build.sh +9 -1
  3. package/create-countryconfig/index.js +412 -59
  4. package/create-countryconfig/node_modules/.bin/degit +21 -0
  5. package/create-countryconfig/package.json +4 -1
  6. package/dist/application-config/index.js +342 -276
  7. package/dist/authentication/index.d.ts +67 -0
  8. package/dist/authentication/index.d.ts.map +1 -0
  9. package/dist/authentication/index.js +750 -0
  10. package/dist/cli.js +1894 -300
  11. package/dist/commons/api/router.d.ts +3977 -3419
  12. package/dist/commons/application-config/index.d.ts +6 -6
  13. package/dist/commons/conditionals/conditionals.d.ts +32 -323
  14. package/dist/commons/conditionals/validate.d.ts +16 -5
  15. package/dist/commons/events/ActionConfig.d.ts +112 -105
  16. package/dist/commons/events/ActionDocument.d.ts +121 -127
  17. package/dist/commons/events/ActionInput.d.ts +4 -10
  18. package/dist/commons/events/ActionStatus.d.ts +14 -0
  19. package/dist/commons/events/ActionType.d.ts +62 -62
  20. package/dist/commons/events/AdvancedSearchConfig.d.ts +531 -507
  21. package/dist/commons/events/AuditLog.d.ts +189 -42
  22. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  23. package/dist/commons/events/Conditional.d.ts +3 -3
  24. package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
  25. package/dist/commons/events/Draft.d.ts +37 -37
  26. package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
  27. package/dist/commons/events/EventConfig.d.ts +8 -5
  28. package/dist/commons/events/EventDocument.d.ts +518 -50
  29. package/dist/commons/events/EventIndex.d.ts +49 -72
  30. package/dist/commons/events/EventMetadata.d.ts +39 -49
  31. package/dist/commons/events/EventStatus.d.ts +19 -0
  32. package/dist/commons/events/FieldConfig.d.ts +425 -389
  33. package/dist/commons/events/FieldType.d.ts +51 -51
  34. package/dist/commons/events/FieldTypeMapping.d.ts +86 -86
  35. package/dist/commons/events/FieldValue.d.ts +14 -14
  36. package/dist/commons/events/Flag.d.ts +57 -15
  37. package/dist/commons/events/PlainDate.d.ts +8 -0
  38. package/dist/commons/events/SummaryConfig.d.ts +249 -0
  39. package/dist/commons/events/TemplateConfig.d.ts +1 -1
  40. package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
  41. package/dist/commons/events/WorkqueueConfig.d.ts +817 -814
  42. package/dist/commons/events/deduplication.d.ts +1 -1
  43. package/dist/commons/events/event.d.ts +14 -2
  44. package/dist/commons/events/field.d.ts +69 -198
  45. package/dist/commons/events/index.d.ts +1 -0
  46. package/dist/commons/events/locationPayloads.d.ts +95 -0
  47. package/dist/commons/events/locations.d.ts +247 -14
  48. package/dist/commons/events/mocks.test.utils.d.ts +48 -4
  49. package/dist/commons/events/scopes.d.ts +4 -4
  50. package/dist/commons/events/state/index.d.ts +17 -17
  51. package/dist/commons/events/state/utils.d.ts +7 -7
  52. package/dist/commons/events/test.utils.d.ts +64 -46
  53. package/dist/commons/events/utils.d.ts +133 -114
  54. package/dist/commons/notification/UserNotifications.d.ts +38 -23
  55. package/dist/commons/notification/dispatch.d.ts +10 -0
  56. package/dist/commons/notification/index.d.ts +1 -0
  57. package/dist/conditionals/index.js +328 -58
  58. package/dist/csv.d.ts +25 -0
  59. package/dist/csv.d.ts.map +1 -0
  60. package/dist/csv.js +120 -0
  61. package/dist/environment/derived-variables.d.ts +119 -131
  62. package/dist/environment/derived-variables.d.ts.map +1 -1
  63. package/dist/environment/derived-variables.js +0 -14
  64. package/dist/environment/index.d.ts +1 -0
  65. package/dist/environment/index.d.ts.map +1 -1
  66. package/dist/environment/index.js +10 -0
  67. package/dist/environment/logger.d.ts +6 -3
  68. package/dist/environment/logger.d.ts.map +1 -1
  69. package/dist/environment/manage-users.js +18 -8
  70. package/dist/environment/paths.d.ts +7 -0
  71. package/dist/environment/paths.d.ts.map +1 -0
  72. package/dist/environment/paths.js +72 -0
  73. package/dist/environment/questions.d.ts +75 -74
  74. package/dist/environment/questions.d.ts.map +1 -1
  75. package/dist/environment/questions.js +20 -14
  76. package/dist/environment/setup-environment.js +55 -56
  77. package/dist/environment/swarm-to-k8s.js +17 -7
  78. package/dist/environment/templates.d.ts +0 -1
  79. package/dist/environment/templates.d.ts.map +1 -1
  80. package/dist/environment/templates.js +5 -9
  81. package/dist/environment/update-workflows.d.ts.map +1 -1
  82. package/dist/environment/update-workflows.js +38 -12
  83. package/dist/environment/upgrade.d.ts +2 -0
  84. package/dist/environment/upgrade.d.ts.map +1 -0
  85. package/dist/environment/upgrade.js +82 -0
  86. package/dist/environment/users.js +28 -20
  87. package/dist/environment/utils.d.ts +1 -13
  88. package/dist/environment/utils.d.ts.map +1 -1
  89. package/dist/environment/utils.js +18 -35
  90. package/dist/events/deduplication.d.ts +1 -1
  91. package/dist/events/index.js +7616 -7113
  92. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +2 -2
  93. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  94. package/dist/migrations/v2.0/checkout-upstream-files.js +2 -2
  95. package/dist/migrations/v2.0/convert-config-files-to-ts.js +17 -7
  96. package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
  97. package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
  98. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts +3 -0
  99. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts.map +1 -0
  100. package/dist/migrations/v2.1/add-recovery-link-notifications.js +511 -0
  101. package/dist/migrations/v2.1/add-translations.d.ts +9 -0
  102. package/dist/migrations/v2.1/add-translations.d.ts.map +1 -0
  103. package/dist/migrations/v2.1/add-translations.js +213 -0
  104. package/dist/migrations/v2.1/enable-telemetry.d.ts +3 -0
  105. package/dist/migrations/v2.1/enable-telemetry.d.ts.map +1 -0
  106. package/dist/migrations/v2.1/enable-telemetry.js +438 -0
  107. package/dist/migrations/v2.1/index.d.ts.map +1 -1
  108. package/dist/migrations/v2.1/index.js +1058 -0
  109. package/dist/notification/index.js +1866 -1466
  110. package/dist/scopes/index.d.ts +464 -169
  111. package/dist/scopes/index.js +329 -58
  112. package/dist/telemetry/index.d.ts +45 -0
  113. package/dist/telemetry/index.d.ts.map +1 -0
  114. package/dist/telemetry/index.js +39 -0
  115. package/dist/templates/charts-values/dependencies/values.yaml +2 -3
  116. package/dist/templates/charts-values/opencrvs-services/values.yaml +4 -7
  117. package/dist/templates/charts-values/opentelemetry/values.yaml +95 -0
  118. package/dist/templates/charts-values/traefik/values.yaml +23 -9
  119. package/dist/templates/inventory/inventory.template.yml +1 -3
  120. package/dist/translations/check.d.ts +21 -0
  121. package/dist/translations/check.d.ts.map +1 -0
  122. package/dist/translations/check.js +132 -0
  123. package/dist/verify/endpoints.d.ts +2 -0
  124. package/dist/verify/endpoints.d.ts.map +1 -0
  125. package/dist/verify/endpoints.js +345 -0
  126. package/opencrvs-toolkit-2.1.0-rc.aae3e77.tgz +0 -0
  127. package/package.json +12 -7
  128. package/tsconfig.build.json +11 -0
  129. package/tsconfig.build.tsbuildinfo +1 -0
  130. package/tsconfig.json +3 -0
  131. package/dist/templates/inventory/production.example.yml +0 -77
  132. package/dist/templates/inventory/qa.example.yml +0 -48
  133. package/opencrvs-toolkit-2.1.0-rc.a74bce1.tgz +0 -0
  134. package/tsconfig.tsbuildinfo +0 -1
@@ -21,12 +21,13 @@ hpa:
21
21
  enabled: false
22
22
 
23
23
  env:
24
- APN_SERVICE_URL: "http://apm-server.opencrvs-deps-{{env}}.svc.cluster.local:8200"
25
24
  MINIO_BUCKET: ocrvs
26
25
  OPENCRVS_ENVIRONMENT: {{opencrvs_environment}}
27
26
 
28
- influxdb:
29
- host: influxdb-0.influxdb.opencrvs-deps-{{env}}.svc.cluster.local
27
+ otel:
28
+ enabled: true
29
+ deployment_environment: {{env}}
30
+ exporter_otlp_endpoint: "opentelemetry-collector.opencrvs-deps-{{env}}.svc.cluster.local:4317"
30
31
 
31
32
  elasticsearch:
32
33
  auth_mode: auto
@@ -36,10 +37,6 @@ minio:
36
37
  auth_mode: use_secret
37
38
  host: minio-0.minio.opencrvs-deps-{{env}}.svc.cluster.local
38
39
 
39
- mongodb:
40
- auth_mode: auto
41
- host: mongodb-0.mongodb.opencrvs-deps-{{env}}.svc.cluster.local
42
-
43
40
  redis:
44
41
  auth_mode: use_secret
45
42
  host: redis-0.redis.opencrvs-deps-{{env}}.svc.cluster.local
@@ -0,0 +1,95 @@
1
+ mode: deployment
2
+
3
+ image:
4
+ repository: otel/opentelemetry-collector-k8s
5
+
6
+ resources:
7
+ requests:
8
+ cpu: 100m
9
+ memory: 128Mi
10
+ limits:
11
+ cpu: 500m
12
+ memory: 512Mi
13
+
14
+ ports:
15
+ jaeger-compact:
16
+ enabled: false
17
+ jaeger-thrift:
18
+ enabled: false
19
+ jaeger-grpc:
20
+ enabled: false
21
+ zipkin:
22
+ enabled: false
23
+
24
+ config:
25
+ receivers:
26
+ otlp:
27
+ protocols:
28
+ grpc:
29
+ endpoint: ${env:MY_POD_IP}:4317
30
+ http:
31
+ endpoint: ${env:MY_POD_IP}:4318
32
+ prometheus: null
33
+ jaeger: null
34
+ zipkin: null
35
+
36
+ exporters:
37
+ otlp/elastic:
38
+ endpoint: apm-server.opencrvs-deps-{{env}}.svc.cluster.local:8200
39
+ tls:
40
+ insecure: true
41
+ processors:
42
+ batch:
43
+ timeout: 15s
44
+ send_batch_size: 1024
45
+
46
+ memory_limiter:
47
+ check_interval: 5s
48
+ limit_percentage: 80
49
+ spike_limit_percentage: 25
50
+
51
+ transform/traces:
52
+ error_mode: ignore
53
+ trace_statements:
54
+ # Start with the raw path.
55
+ - set(span.attributes["http.route"], span.attributes["url.path"]) where resource.attributes["service.name"] == "traefik" and span.attributes["url.path"] != nil
56
+
57
+ # Match getTracePath(): collapse repeated slashes.
58
+ - replace_pattern(span.attributes["http.route"], "/+", "/") where resource.attributes["service.name"] == "traefik" and span.attributes["http.route"] != nil
59
+
60
+ # Match getTracePath(): replace dynamic-looking segments with "#".
61
+ - replace_pattern(span.attributes["http.route"], "/([^/]*\\.[^/]*|[0-9]+|[0-9a-fA-F]{24}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})(/|$)", "/#$$2") where resource.attributes["service.name"] == "traefik" and span.attributes["http.route"] != nil
62
+
63
+ # Concatenate Request method and normalized URL to conform same format as NodeJs.
64
+ - set(span.name, Concat([span.attributes["http.request.method"], span.attributes["http.route"]], " ")) where resource.attributes["service.name"] == "traefik" and span.attributes["http.request.method"] != nil and span.attributes["http.route"] != nil
65
+
66
+ # SDK language to avoid errors in Kibana on APM -> Service Inventory -> Traefik -> Metrics.
67
+ - delete_key(resource.attributes, "telemetry.sdk.language") where resource.attributes["service.name"] == "traefik"
68
+
69
+ # Nginx OTEL module uses older HTTP semantic convention names, so build the span name from http.method and http.route.
70
+ - set(span.name, Concat([span.attributes["http.method"], span.attributes["http.route"]], " ")) where (resource.attributes["service.name"] == "opencrvs_client" or resource.attributes["service.name"] == "opencrvs_login") and span.attributes["http.method"] != nil and span.attributes["http.route"] != nil
71
+
72
+ service:
73
+ telemetry:
74
+ metrics:
75
+ level: none
76
+ readers: null
77
+ pipelines:
78
+ logs: null
79
+ metrics:
80
+ receivers:
81
+ - otlp
82
+ processors:
83
+ - memory_limiter
84
+ - batch
85
+ exporters:
86
+ - otlp/elastic
87
+ traces:
88
+ receivers:
89
+ - otlp
90
+ processors:
91
+ - memory_limiter
92
+ - transform/traces
93
+ - batch
94
+ exporters:
95
+ - otlp/elastic
@@ -9,16 +9,28 @@
9
9
 
10
10
  # Overwriting https://github.com/traefik/traefik-helm-chart/blob/master/traefik/values.yaml
11
11
  namespaceOverride: "traefik"
12
- logs:
13
- general:
14
- # "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "PANIC"
15
- level: "INFO"
16
- # format: "common" # For local environment
17
- format: "json" # For server environment
18
- access:
19
- # -- To enable access logs
12
+ log:
13
+ # "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "PANIC"
14
+ level: "INFO"
15
+ # format: "common" # For local environment
16
+ format: "json" # For server environment
17
+ accessLog:
18
+ # -- To enable access logs
19
+ enabled: true
20
+ format: "json"
21
+
22
+ tracing:
23
+ serviceName: traefik
24
+ resourceAttributes:
25
+ deployment.environment.name: "{{env}}"
26
+ service.namespace: traefik
27
+ otlp:
20
28
  enabled: true
21
- format: "json"
29
+ grpc:
30
+ enabled: true
31
+ endpoint: "opentelemetry-collector.opencrvs-deps-{{env}}.svc.cluster.local:4317"
32
+ insecure: true
33
+
22
34
 
23
35
  ingressRoute:
24
36
  dashboard:
@@ -98,6 +110,8 @@ tlsStore:
98
110
 
99
111
  deployment:
100
112
  hostNetwork: true
113
+ podLabels:
114
+ service_name: traefik
101
115
  {{#if static_ssl}}
102
116
  kind: DaemonSet
103
117
  {{/if}}
@@ -13,10 +13,8 @@ all:
13
13
  # - If you are behind VPN, use private IP address
14
14
  # - If your server is exposed (not recommeded), use public IP address
15
15
  # - If you would like to run kubectl commands from the remote server, leave this field empty
16
- # kube_api_endpoint: ''
17
-
16
+ # kube_api_host: ''
18
17
  # IMPORTANT: If master VM has multiple ethernet interfaces, put private IP address at kube_api_host
19
- # kube_api_host: 10.10.10.10
20
18
  kube_api_host: {{kube_api_host}}
21
19
 
22
20
  # Default ansible provision user, keep as is
@@ -0,0 +1,21 @@
1
+ export type Message = {
2
+ id: string;
3
+ defaultMessage: string;
4
+ description: string;
5
+ };
6
+ export type CheckResult = {
7
+ missing: Message[];
8
+ /** Rows in countryconfig.csv that nothing in the source declares. */
9
+ outdated: string[];
10
+ /** Files declaring a message whose id is assembled at runtime. */
11
+ dynamicIds: string[];
12
+ };
13
+ export declare function check(cwd: string): CheckResult;
14
+ /**
15
+ * Adds a row per missing message, filling in only English — the rest is copy
16
+ * somebody has to write. Returns the ids added.
17
+ *
18
+ * Creates countryconfig.csv if it doesn't exist yet.
19
+ */
20
+ export declare function writeMissing(cwd: string, missing: Message[]): string[];
21
+ //# sourceMappingURL=check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/translations/check.ts"],"names":[],"mappings":"AAwCA,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,qEAAqE;IACrE,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,kEAAkE;IAClE,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB,CAAA;AAgED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAyB9C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAwB3D"}
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ /*
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
6
+ *
7
+ * OpenCRVS is also distributed under the terms of the Civil Registration
8
+ * & Healthcare Disclaimer located at http://opencrvs.org/license.
9
+ *
10
+ * Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
11
+ */
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
14
+ };
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.check = check;
17
+ exports.writeMissing = writeMissing;
18
+ /**
19
+ * Checks that every message a country config declares has a row in
20
+ * `countryconfig.csv`.
21
+ *
22
+ * The mirror of the check core runs over its own packages: core validates
23
+ * `client.csv` and `login.csv` against the client and login sources, and this
24
+ * validates `countryconfig.csv` against the country config's own source.
25
+ * Without it, a form or event label added to a country config renders as a raw
26
+ * id.
27
+ *
28
+ * `client.csv` and `login.csv` are read but never written: core owns them, and
29
+ * `opencrvs upgrade` keeps them in sync.
30
+ */
31
+ const ts_morph_1 = require("ts-morph");
32
+ const path_1 = __importDefault(require("path"));
33
+ const csv_1 = require("../csv");
34
+ const TRANSLATIONS = 'src/translations';
35
+ const OWN_FILE = `${TRANSLATIONS}/countryconfig.csv`;
36
+ const CORE_FILES = [`${TRANSLATIONS}/client.csv`, `${TRANSLATIONS}/login.csv`];
37
+ /**
38
+ * The value of a property when the source says what it is outright. A template
39
+ * literal with something interpolated into it does not count.
40
+ */
41
+ function staticStringOf(node, name) {
42
+ const property = node.getProperty(name);
43
+ if (!property || !ts_morph_1.Node.isPropertyAssignment(property)) {
44
+ return undefined;
45
+ }
46
+ const initializer = property.getInitializer();
47
+ return initializer &&
48
+ (ts_morph_1.Node.isStringLiteral(initializer) ||
49
+ ts_morph_1.Node.isNoSubstitutionTemplateLiteral(initializer))
50
+ ? initializer.getLiteralValue()
51
+ : undefined;
52
+ }
53
+ function messagesDeclaredIn(cwd) {
54
+ const project = new ts_morph_1.Project({ skipAddingFilesFromTsConfig: true });
55
+ project.addSourceFilesAtPaths([
56
+ path_1.default.join(cwd, 'src/**/*.ts'),
57
+ path_1.default.join(cwd, 'src/**/*.tsx'),
58
+ `!${path_1.default.join(cwd, 'src/**/*.test.ts')}`,
59
+ `!${path_1.default.join(cwd, 'src/**/*.test.tsx')}`,
60
+ `!${path_1.default.join(cwd, 'src/**/*.stories.ts')}`,
61
+ `!${path_1.default.join(cwd, 'src/**/*.stories.tsx')}`
62
+ ]);
63
+ const messages = [];
64
+ const dynamicIds = [];
65
+ for (const sourceFile of project.getSourceFiles()) {
66
+ sourceFile.forEachDescendant((node) => {
67
+ var _a, _b;
68
+ if (!ts_morph_1.Node.isObjectLiteralExpression(node)) {
69
+ return;
70
+ }
71
+ if (!(node.getProperty('id') && node.getProperty('defaultMessage'))) {
72
+ return;
73
+ }
74
+ const id = staticStringOf(node, 'id');
75
+ if (id === undefined) {
76
+ dynamicIds.push(path_1.default.relative(cwd, sourceFile.getFilePath()));
77
+ return;
78
+ }
79
+ messages.push({
80
+ id,
81
+ defaultMessage: (_a = staticStringOf(node, 'defaultMessage')) !== null && _a !== void 0 ? _a : '',
82
+ description: (_b = staticStringOf(node, 'description')) !== null && _b !== void 0 ? _b : ''
83
+ });
84
+ });
85
+ }
86
+ return { messages, dynamicIds: [...new Set(dynamicIds)] };
87
+ }
88
+ function check(cwd) {
89
+ var _a;
90
+ const { messages, dynamicIds } = messagesDeclaredIn(cwd);
91
+ const own = (0, csv_1.readCsvFile)(path_1.default.join(cwd, OWN_FILE));
92
+ const covered = new Set([own, ...CORE_FILES.map((file) => (0, csv_1.readCsvFile)(path_1.default.join(cwd, file)))]
93
+ .flatMap((csv) => { var _a; return (_a = csv === null || csv === void 0 ? void 0 : csv.body) !== null && _a !== void 0 ? _a : []; })
94
+ .map(csv_1.idOf));
95
+ // The same message is often declared in more than one place.
96
+ const missing = [
97
+ ...new Map(messages
98
+ .filter(({ id }) => !covered.has(id))
99
+ .map((message) => [message.id, message])).values()
100
+ ].sort((a, b) => (a.id < b.id ? -1 : 1));
101
+ const declared = new Set(messages.map(({ id }) => id));
102
+ const outdated = ((_a = own === null || own === void 0 ? void 0 : own.body) !== null && _a !== void 0 ? _a : [])
103
+ .map(csv_1.idOf)
104
+ .filter((id) => !declared.has(id));
105
+ return { missing, outdated, dynamicIds };
106
+ }
107
+ /**
108
+ * Adds a row per missing message, filling in only English — the rest is copy
109
+ * somebody has to write. Returns the ids added.
110
+ *
111
+ * Creates countryconfig.csv if it doesn't exist yet.
112
+ */
113
+ function writeMissing(cwd, missing) {
114
+ var _a;
115
+ const file = (_a = (0, csv_1.readCsvFile)(path_1.default.join(cwd, OWN_FILE))) !== null && _a !== void 0 ? _a : {
116
+ header: 'id,description,en',
117
+ body: [],
118
+ newline: '\n',
119
+ trailingNewline: true
120
+ };
121
+ const columns = file.header.split(',');
122
+ const rows = missing.map((message) => (0, csv_1.toCsvLine)(columns.map((column) => {
123
+ if (column === 'id')
124
+ return message.id;
125
+ if (column === 'description')
126
+ return message.description;
127
+ return column === 'en' ? message.defaultMessage : '';
128
+ })));
129
+ const added = (0, csv_1.addRows)(file, rows);
130
+ (0, csv_1.writeCsvFile)(path_1.default.join(cwd, OWN_FILE), file);
131
+ return added;
132
+ }
@@ -0,0 +1,2 @@
1
+ export declare function runVerifyEndpoints(target?: string): Promise<void>;
2
+ //# sourceMappingURL=endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/verify/endpoints.ts"],"names":[],"mappings":"AA2QA,wBAAsB,kBAAkB,CACtC,MAAM,GAAE,MAA2B,GAClC,OAAO,CAAC,IAAI,CAAC,CAkIf"}