@fraym/projections 0.11.0 → 0.12.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.
- package/README.md +7 -2
- package/dist/cmd/projections.js +13 -8
- package/dist/config/config.d.ts +9 -3
- package/dist/config/config.js +25 -6
- package/dist/delivery/client.d.ts +2 -2
- package/dist/delivery/client.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/dist/management/client.d.ts +3 -5
- package/dist/management/client.js +7 -23
- package/dist/management/getAll.d.ts +2 -2
- package/dist/management/getAll.js +11 -9
- package/dist/management/remove.d.ts +2 -2
- package/dist/management/remove.js +12 -10
- package/dist/management/upsert.d.ts +2 -0
- package/dist/management/upsert.js +19 -0
- package/package.json +1 -1
- package/dist/management/create.d.ts +0 -2
- package/dist/management/create.js +0 -17
- package/dist/management/update.d.ts +0 -2
- package/dist/management/update.js +0 -17
package/README.md
CHANGED
|
@@ -20,7 +20,10 @@ You need to add the `Tenant-Id` header in order to use the graphQL Endpoint and
|
|
|
20
20
|
Use the `projections` cli command to automatically apply your projection schemas to the projections service.
|
|
21
21
|
|
|
22
22
|
Your type schemas have to match the glob you specify in the `PROJECTIONS_SCHEMA_GLOB` env variable (default: `./src/**/*.graphql`).
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
Delivery API: You can specify the address (and port) of the projections service instance you use in the `PROJECTIONS_SERVER_ADDRESS` env variable (default: `127.0.0.1:9000`).
|
|
25
|
+
|
|
26
|
+
Management API: You can specify the address (and port) of the projections service instance you use in the `PROJECTIONS_MANAGEMENT_SERVER_ADDRESS` env variable (default: `http://127.0.0.1`). You will also need to set the `PROJECTIONS_MANAGEMENT_API_TOKEN` variable. The value of that token has to match the token configured in the projections service.
|
|
24
27
|
|
|
25
28
|
You might have a seperate permissions directory or file. As soon as your permissions schema enum is not part of the projections glob you can specify a `PERMISSIONS_SCHEMA_GLOB` env variable. It is empty by default but as soon as you provide it it will add the files in that glob to your projections schema, too.
|
|
26
29
|
|
|
@@ -34,6 +37,8 @@ Use a `.env` file or env variables to configure cte clients and the command:
|
|
|
34
37
|
|
|
35
38
|
```env
|
|
36
39
|
PROJECTIONS_SERVER_ADDRESS=127.0.0.1:9000
|
|
40
|
+
PROJECTIONS_MANAGEMENT_SERVER_ADDRESS=http://127.0.0.1
|
|
41
|
+
PROJECTIONS_MANAGEMENT_API_TOKEN=
|
|
37
42
|
PROJECTIONS_SCHEMA_GLOB=./src/projections/*.graphql
|
|
38
43
|
PERMISSIONS_SCHEMA_GLOB=
|
|
39
44
|
PROJECTIONS_NAMESPACE=
|
|
@@ -275,7 +280,7 @@ const dataList = await client.getDataList(
|
|
|
275
280
|
);
|
|
276
281
|
```
|
|
277
282
|
|
|
278
|
-
### Gracefully close the
|
|
283
|
+
### Gracefully close the delivery client
|
|
279
284
|
|
|
280
285
|
You won't lose any data if you don't. Use it for your peace of mind.
|
|
281
286
|
|
package/dist/cmd/projections.js
CHANGED
|
@@ -17,13 +17,15 @@ const run = async () => {
|
|
|
17
17
|
.config({
|
|
18
18
|
schemaGlob: "./src/**/*.graphql",
|
|
19
19
|
permissionsSchemaGlob: "",
|
|
20
|
-
serverAddress: "127.0.0.1
|
|
20
|
+
serverAddress: "http://127.0.0.1",
|
|
21
|
+
apiToken: "",
|
|
21
22
|
namespace: "",
|
|
22
23
|
})
|
|
23
24
|
.pkgConf("projections").argv;
|
|
24
25
|
let schemaGlob = argv.schemaGlob;
|
|
25
26
|
let permissionsSchemaGlob = argv.permissionsSchemaGlob;
|
|
26
27
|
let serverAddress = argv.serverAddress;
|
|
28
|
+
let apiToken = argv.apiToken;
|
|
27
29
|
let namespace = argv.namespace;
|
|
28
30
|
if (process.env.PROJECTIONS_SCHEMA_GLOB) {
|
|
29
31
|
schemaGlob = process.env.PROJECTIONS_SCHEMA_GLOB;
|
|
@@ -31,8 +33,11 @@ const run = async () => {
|
|
|
31
33
|
if (process.env.PERMISSIONS_SCHEMA_GLOB) {
|
|
32
34
|
permissionsSchemaGlob = process.env.PERMISSIONS_SCHEMA_GLOB;
|
|
33
35
|
}
|
|
34
|
-
if (process.env.
|
|
35
|
-
serverAddress = process.env.
|
|
36
|
+
if (process.env.PROJECTIONS_MANAGEMENT_SERVER_ADDRESS) {
|
|
37
|
+
serverAddress = process.env.PROJECTIONS_MANAGEMENT_SERVER_ADDRESS;
|
|
38
|
+
}
|
|
39
|
+
if (process.env.PROJECTIONS_MANAGEMENT_API_TOKEN) {
|
|
40
|
+
apiToken = process.env.PROJECTIONS_MANAGEMENT_API_TOKEN;
|
|
36
41
|
}
|
|
37
42
|
if (process.env.PROJECTIONS_NAMESPACE) {
|
|
38
43
|
namespace = process.env.PROJECTIONS_NAMESPACE;
|
|
@@ -48,7 +53,7 @@ const run = async () => {
|
|
|
48
53
|
loaders: [new graphql_file_loader_1.GraphQLFileLoader()],
|
|
49
54
|
});
|
|
50
55
|
const definitions = getTypeDefinition(schema, namespace);
|
|
51
|
-
await migrateSchemas(definitions, serverAddress, namespace);
|
|
56
|
+
await migrateSchemas(definitions, serverAddress, apiToken, namespace);
|
|
52
57
|
};
|
|
53
58
|
run();
|
|
54
59
|
const getTypeDefinition = (schema, namespace) => {
|
|
@@ -243,8 +248,8 @@ const addNestedTypesToSchema = (definitions, nestedTypeName, nestedTypes) => {
|
|
|
243
248
|
nestedTypes: nestedTypes,
|
|
244
249
|
};
|
|
245
250
|
};
|
|
246
|
-
const migrateSchemas = async (definitions, serverAddress, namespace) => {
|
|
247
|
-
const managementClient = await (0, client_1.newManagementClient)({ serverAddress });
|
|
251
|
+
const migrateSchemas = async (definitions, serverAddress, apiToken, namespace) => {
|
|
252
|
+
const managementClient = await (0, client_1.newManagementClient)({ serverAddress, apiToken });
|
|
248
253
|
let existingProjections = (await managementClient.getAll()).filter(projectionName => !projectionName.startsWith("Crud") &&
|
|
249
254
|
!projectionName.startsWith("Fraym") &&
|
|
250
255
|
projectionName.startsWith(namespace));
|
|
@@ -297,12 +302,12 @@ const migrateSchemas = async (definitions, serverAddress, namespace) => {
|
|
|
297
302
|
});
|
|
298
303
|
if (projectionsToCreate.length > 0) {
|
|
299
304
|
console.log(`Creating ${projectionsToCreate.length} projections: ${projectionsToCreate}...`);
|
|
300
|
-
await managementClient.
|
|
305
|
+
await managementClient.upsert(createSchema);
|
|
301
306
|
console.log(`Created ${projectionsToCreate.length} projections`);
|
|
302
307
|
}
|
|
303
308
|
if (projectionsToUpdate.length > 0) {
|
|
304
309
|
console.log(`Updating ${projectionsToUpdate.length} projections: ${projectionsToUpdate}...`);
|
|
305
|
-
await managementClient.
|
|
310
|
+
await managementClient.upsert(updateSchema);
|
|
306
311
|
console.log(`Updated ${projectionsToUpdate.length} projections`);
|
|
307
312
|
}
|
|
308
313
|
if (projectionsToRemove.length > 0) {
|
package/dist/config/config.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface DeliveryClientConfig {
|
|
2
2
|
serverAddress: string;
|
|
3
3
|
keepaliveInterval?: number;
|
|
4
4
|
keepaliveTimeout?: number;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
7
|
-
|
|
6
|
+
export interface ManagementClientConfig {
|
|
7
|
+
serverAddress: string;
|
|
8
|
+
apiToken: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const getEnvDeliveryConfig: () => DeliveryClientConfig;
|
|
11
|
+
export declare const getEnvManagementConfig: () => ManagementClientConfig;
|
|
12
|
+
export declare const useDeliveryConfigDefaults: (config?: DeliveryClientConfig) => Required<DeliveryClientConfig>;
|
|
13
|
+
export declare const useManagementConfigDefaults: (config?: ManagementClientConfig) => Required<ManagementClientConfig>;
|
package/dist/config/config.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.useManagementConfigDefaults = exports.useDeliveryConfigDefaults = exports.getEnvManagementConfig = exports.getEnvDeliveryConfig = void 0;
|
|
4
4
|
const dotenv_1 = require("dotenv");
|
|
5
|
-
const
|
|
5
|
+
const getEnvDeliveryConfig = () => {
|
|
6
6
|
var _a;
|
|
7
7
|
(0, dotenv_1.config)();
|
|
8
8
|
const serverAddress = (_a = process.env.PROJECTIONS_SERVER_ADDRESS) !== null && _a !== void 0 ? _a : "";
|
|
@@ -22,11 +22,20 @@ const getEnvConfig = () => {
|
|
|
22
22
|
keepaliveTimeout,
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
exports.
|
|
26
|
-
const
|
|
25
|
+
exports.getEnvDeliveryConfig = getEnvDeliveryConfig;
|
|
26
|
+
const getEnvManagementConfig = () => {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
(0, dotenv_1.config)();
|
|
29
|
+
return {
|
|
30
|
+
serverAddress: (_a = process.env.PROJECTIONS_MANAGEMENT_SERVER_ADDRESS) !== null && _a !== void 0 ? _a : "",
|
|
31
|
+
apiToken: (_b = process.env.PROJECTIONS_MANAGEMENT_API_TOKEN) !== null && _b !== void 0 ? _b : "",
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
exports.getEnvManagementConfig = getEnvManagementConfig;
|
|
35
|
+
const useDeliveryConfigDefaults = (config) => {
|
|
27
36
|
var _a, _b;
|
|
28
37
|
if (!config) {
|
|
29
|
-
config = (0, exports.
|
|
38
|
+
config = (0, exports.getEnvDeliveryConfig)();
|
|
30
39
|
}
|
|
31
40
|
return {
|
|
32
41
|
serverAddress: config.serverAddress,
|
|
@@ -34,4 +43,14 @@ const useConfigDefaults = (config) => {
|
|
|
34
43
|
keepaliveInterval: (_b = config.keepaliveInterval) !== null && _b !== void 0 ? _b : 40 * 1000,
|
|
35
44
|
};
|
|
36
45
|
};
|
|
37
|
-
exports.
|
|
46
|
+
exports.useDeliveryConfigDefaults = useDeliveryConfigDefaults;
|
|
47
|
+
const useManagementConfigDefaults = (config) => {
|
|
48
|
+
if (!config) {
|
|
49
|
+
config = (0, exports.getEnvManagementConfig)();
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
serverAddress: config.serverAddress,
|
|
53
|
+
apiToken: config.apiToken,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
exports.useManagementConfigDefaults = useManagementConfigDefaults;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeliveryClientConfig } from "../config/config";
|
|
2
2
|
import { Filter } from "./filter";
|
|
3
3
|
import { GetProjectionDataList } from "./getDataList";
|
|
4
4
|
import { Order } from "./order";
|
|
@@ -12,4 +12,4 @@ export interface DeliveryClient {
|
|
|
12
12
|
deleteDataByFilter: (projection: string, authData: AuthData, filter?: Filter) => Promise<number>;
|
|
13
13
|
close: () => Promise<void>;
|
|
14
14
|
}
|
|
15
|
-
export declare const newDeliveryClient: (config?:
|
|
15
|
+
export declare const newDeliveryClient: (config?: DeliveryClientConfig) => Promise<DeliveryClient>;
|
package/dist/delivery/client.js
CHANGED
|
@@ -9,7 +9,7 @@ const getDataList_1 = require("./getDataList");
|
|
|
9
9
|
const upsert_1 = require("./upsert");
|
|
10
10
|
const delete_1 = require("./delete");
|
|
11
11
|
const newDeliveryClient = async (config) => {
|
|
12
|
-
config = (0, config_1.
|
|
12
|
+
config = (0, config_1.useDeliveryConfigDefaults)(config);
|
|
13
13
|
const serviceClient = new projections_proto_1.DeliveryServiceClient(config.serverAddress, grpc_js_1.credentials.createInsecure(), {
|
|
14
14
|
"grpc.keepalive_time_ms": config.keepaliveInterval,
|
|
15
15
|
"grpc.keepalive_timeout_ms": config.keepaliveTimeout,
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,9 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.isUpsertValidationResponse = exports.isUpsertSuccessResponse =
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(exports, "getEnvConfig", { enumerable: true, get: function () { return config_1.getEnvConfig; } });
|
|
17
|
+
exports.isUpsertValidationResponse = exports.isUpsertSuccessResponse = void 0;
|
|
18
|
+
__exportStar(require("./config/config"), exports);
|
|
20
19
|
__exportStar(require("./management/client"), exports);
|
|
21
20
|
__exportStar(require("./delivery/client"), exports);
|
|
22
21
|
var upsert_1 = require("./delivery/upsert");
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ManagementClientConfig } from "../config/config";
|
|
2
2
|
export interface ManagementClient {
|
|
3
|
-
|
|
4
|
-
update: (schema: string) => Promise<void>;
|
|
3
|
+
upsert: (schema: string) => Promise<void>;
|
|
5
4
|
remove: (projectionNames: string[]) => Promise<void>;
|
|
6
5
|
getAll: () => Promise<string[]>;
|
|
7
|
-
close: () => Promise<void>;
|
|
8
6
|
}
|
|
9
|
-
export declare const newManagementClient: (config?:
|
|
7
|
+
export declare const newManagementClient: (config?: ManagementClientConfig) => Promise<ManagementClient>;
|
|
@@ -1,41 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.newManagementClient = void 0;
|
|
4
|
-
const projections_proto_1 = require("@fraym/projections-proto");
|
|
5
|
-
const grpc_js_1 = require("@grpc/grpc-js");
|
|
6
4
|
const config_1 = require("../config/config");
|
|
7
|
-
const create_1 = require("./create");
|
|
8
5
|
const getAll_1 = require("./getAll");
|
|
9
6
|
const remove_1 = require("./remove");
|
|
10
|
-
const
|
|
7
|
+
const upsert_1 = require("./upsert");
|
|
11
8
|
const newManagementClient = async (config) => {
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
"grpc.keepalive_timeout_ms": config.keepaliveTimeout,
|
|
16
|
-
"grpc.keepalive_permit_without_calls": 1,
|
|
17
|
-
});
|
|
18
|
-
const create = async (schema) => {
|
|
19
|
-
await (0, create_1.createProjections)(schema, serviceClient);
|
|
20
|
-
};
|
|
21
|
-
const update = async (schema) => {
|
|
22
|
-
await (0, update_1.updateProjections)(schema, serviceClient);
|
|
9
|
+
const currentConfig = (0, config_1.useManagementConfigDefaults)(config);
|
|
10
|
+
const upsert = async (schema) => {
|
|
11
|
+
await (0, upsert_1.upsertProjections)(schema, currentConfig);
|
|
23
12
|
};
|
|
24
13
|
const remove = async (projectionNames) => {
|
|
25
|
-
await (0, remove_1.removeProjections)(projectionNames,
|
|
14
|
+
await (0, remove_1.removeProjections)(projectionNames, currentConfig);
|
|
26
15
|
};
|
|
27
16
|
const getAll = async () => {
|
|
28
|
-
return await (0, getAll_1.getAllProjections)(
|
|
29
|
-
};
|
|
30
|
-
const close = async () => {
|
|
31
|
-
serviceClient.close();
|
|
17
|
+
return await (0, getAll_1.getAllProjections)(currentConfig);
|
|
32
18
|
};
|
|
33
19
|
return {
|
|
34
|
-
|
|
35
|
-
update,
|
|
20
|
+
upsert,
|
|
36
21
|
remove,
|
|
37
22
|
getAll,
|
|
38
|
-
close,
|
|
39
23
|
};
|
|
40
24
|
};
|
|
41
25
|
exports.newManagementClient = newManagementClient;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getAllProjections: (
|
|
1
|
+
import { ManagementClientConfig } from "config/config";
|
|
2
|
+
export declare const getAllProjections: (config: ManagementClientConfig) => Promise<string[]>;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAllProjections = void 0;
|
|
4
|
-
const getAllProjections = async (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
resolve(response.projectionNames);
|
|
12
|
-
});
|
|
4
|
+
const getAllProjections = async (config) => {
|
|
5
|
+
const response = await fetch(`${config.serverAddress}/management/projections`, {
|
|
6
|
+
method: "GET",
|
|
7
|
+
headers: {
|
|
8
|
+
Authorization: `Bearer ${config.apiToken}`,
|
|
9
|
+
},
|
|
13
10
|
});
|
|
11
|
+
if (!response.ok) {
|
|
12
|
+
throw new Error(await response.text());
|
|
13
|
+
}
|
|
14
|
+
const data = await response.json();
|
|
15
|
+
return data.projectionNames;
|
|
14
16
|
};
|
|
15
17
|
exports.getAllProjections = getAllProjections;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const removeProjections: (projectionNames: string[],
|
|
1
|
+
import { ManagementClientConfig } from "config/config";
|
|
2
|
+
export declare const removeProjections: (projectionNames: string[], config: ManagementClientConfig) => Promise<void>;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.removeProjections = void 0;
|
|
4
|
-
const removeProjections = async (projectionNames,
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const removeProjections = async (projectionNames, config) => {
|
|
5
|
+
const response = await fetch(`${config.serverAddress}/management/projections`, {
|
|
6
|
+
method: "DELETE",
|
|
7
|
+
headers: {
|
|
8
|
+
Authorization: `Bearer ${config.apiToken}`,
|
|
9
|
+
"Content-Type": "application/json",
|
|
10
|
+
},
|
|
11
|
+
body: JSON.stringify({
|
|
7
12
|
projectionNames,
|
|
8
|
-
},
|
|
9
|
-
if (error) {
|
|
10
|
-
reject(error.message);
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
resolve();
|
|
14
|
-
});
|
|
13
|
+
}),
|
|
15
14
|
});
|
|
15
|
+
if (!response.ok) {
|
|
16
|
+
throw new Error(await response.text());
|
|
17
|
+
}
|
|
16
18
|
};
|
|
17
19
|
exports.removeProjections = removeProjections;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.upsertProjections = void 0;
|
|
4
|
+
const upsertProjections = async (schema, config) => {
|
|
5
|
+
const response = await fetch(`${config.serverAddress}/management/projections`, {
|
|
6
|
+
method: "POST",
|
|
7
|
+
headers: {
|
|
8
|
+
Authorization: `Bearer ${config.apiToken}`,
|
|
9
|
+
"Content-Type": "application/json",
|
|
10
|
+
},
|
|
11
|
+
body: JSON.stringify({
|
|
12
|
+
schema,
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
if (!response.ok) {
|
|
16
|
+
throw new Error(await response.text());
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
exports.upsertProjections = upsertProjections;
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createProjections = void 0;
|
|
4
|
-
const createProjections = async (schema, serviceClient) => {
|
|
5
|
-
return new Promise((resolve, reject) => {
|
|
6
|
-
serviceClient.createProjections({
|
|
7
|
-
schema,
|
|
8
|
-
}, error => {
|
|
9
|
-
if (error) {
|
|
10
|
-
reject(error.message);
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
resolve();
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
exports.createProjections = createProjections;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateProjections = void 0;
|
|
4
|
-
const updateProjections = async (schema, serviceClient) => {
|
|
5
|
-
return new Promise((resolve, reject) => {
|
|
6
|
-
serviceClient.updateProjections({
|
|
7
|
-
schema,
|
|
8
|
-
}, error => {
|
|
9
|
-
if (error) {
|
|
10
|
-
reject(error.message);
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
resolve();
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
exports.updateProjections = updateProjections;
|