oc 0.49.18 → 0.49.21

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.
@@ -5,13 +5,12 @@ name: Node.js CI
5
5
 
6
6
  on:
7
7
  push:
8
- branches: [ master ]
8
+ branches: [master]
9
9
  pull_request:
10
- branches: [ master ]
10
+ branches: [master]
11
11
 
12
12
  jobs:
13
13
  build:
14
-
15
14
  runs-on: ubuntu-latest
16
15
 
17
16
  strategy:
@@ -20,11 +19,11 @@ jobs:
20
19
  # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21
20
 
22
21
  steps:
23
- - uses: actions/checkout@v2
24
- - name: Use Node.js ${{ matrix.node-version }}
25
- uses: actions/setup-node@v2
26
- with:
27
- node-version: ${{ matrix.node-version }}
28
- cache: 'npm'
29
- - run: npm install
30
- - run: npm test
22
+ - uses: actions/checkout@v2
23
+ - name: Use Node.js ${{ matrix.node-version }}
24
+ uses: actions/setup-node@v2
25
+ with:
26
+ node-version: ${{ matrix.node-version }}
27
+ cache: 'npm'
28
+ - run: npm install
29
+ - run: npm test
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 14
1
+ 16
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## Change Log
2
2
 
3
+ ### v0.49.21
4
+
5
+ - [#1303](https://github.com/opencomponents/oc/pull/1303) add ability to retreieve environment variables from an env file
6
+ - [#1312](https://github.com/opencomponents/oc/pull/1312) Upgrade project default Node.js version to 16
7
+ - [#1317](https://github.com/opencomponents/oc/pull/1317) Bump loader-utils from 1.4.0 to 1.4.2
8
+
9
+ ### v0.49.19
10
+
11
+ - [#1315](https://github.com/opencomponents/oc/pull/1315) include the entire console api in the production stub
12
+
3
13
  ### v0.49.16
4
14
 
5
15
  - [#1313](https://github.com/opencomponents/oc/pull/1313) remove some any types
@@ -1 +1 @@
1
- {"name":"oc-client","description":"The OpenComponents client-side javascript client","version":"0.49.18","repository":"https://github.com/opencomponents/oc/tree/master/components/oc-client","author":"Matteo Figus <matteofigus@gmail.com>","oc":{"container":false,"renderInfo":false,"minify":false,"parameters":{},"files":{"template":{"type":"oc-template-es6","hashKey":"4bdbbf7249b210dee9a729e8a611eac3dc5eae82","src":"template.js","version":"1.0.7"},"static":["src"],"dataProvider":{"type":"node.js","hashKey":"96eb8b28d43ce2093e13753e54d3f2f938dd0f7d","src":"server.js"}},"version":"0.49.18","packaged":true,"date":1666283904000},"devDependencies":{"oc-template-es6-compiler":"^1.0.1"}}
1
+ {"name":"oc-client","description":"The OpenComponents client-side javascript client","version":"0.49.21","repository":"https://github.com/opencomponents/oc/tree/master/components/oc-client","author":"Matteo Figus <matteofigus@gmail.com>","oc":{"container":false,"renderInfo":false,"minify":false,"parameters":{},"files":{"template":{"type":"oc-template-es6","hashKey":"4bdbbf7249b210dee9a729e8a611eac3dc5eae82","src":"template.js","version":"1.0.7"},"static":["src"],"dataProvider":{"type":"node.js","hashKey":"96eb8b28d43ce2093e13753e54d3f2f938dd0f7d","src":"server.js"}},"version":"0.49.21","packaged":true,"date":1670568133835},"devDependencies":{"oc-template-es6-compiler":"^1.0.1"}}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oc-client",
3
3
  "description": "The OpenComponents client-side javascript client",
4
- "version": "0.49.18",
4
+ "version": "0.49.21",
5
5
  "repository": "https://github.com/opencomponents/oc/tree/master/components/oc-client",
6
6
  "author": "Matteo Figus <matteofigus@gmail.com>",
7
7
  "oc": {
@@ -11,6 +11,7 @@ export default function repository(conf: Config): {
11
11
  content: string;
12
12
  filePath: string;
13
13
  }>;
14
+ getEnv(componentName: string, componentVersion: string): Promise<Record<string, string>>;
14
15
  getStaticClientPath: () => string;
15
16
  getStaticClientMapPath: () => string;
16
17
  getStaticFilePath: (componentName: string, componentVersion: string, filePath: string) => string;
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const fs_extra_1 = __importDefault(require("fs-extra"));
30
30
  const oc_get_unix_utc_timestamp_1 = __importDefault(require("oc-get-unix-utc-timestamp"));
31
31
  const path_1 = __importDefault(require("path"));
32
+ const dotenv_1 = __importDefault(require("dotenv"));
32
33
  const components_cache_1 = __importDefault(require("./components-cache"));
33
34
  const components_details_1 = __importDefault(require("./components-details"));
34
35
  const register_templates_1 = __importDefault(require("./register-templates"));
@@ -101,6 +102,11 @@ function repository(conf) {
101
102
  content: fs_extra_1.default.readFileSync(filePath).toString(),
102
103
  filePath
103
104
  };
105
+ },
106
+ getEnv(componentName) {
107
+ const pkg = fs_extra_1.default.readJsonSync(path_1.default.join(conf.path, `${componentName}/package.json`));
108
+ const filePath = path_1.default.join(conf.path, componentName, pkg.oc.files.env);
109
+ return dotenv_1.default.parse(fs_extra_1.default.readFileSync(filePath).toString());
104
110
  }
105
111
  };
106
112
  const repository = {
@@ -180,6 +186,14 @@ function repository(conf) {
180
186
  const content = await cdn.getFile(filePath);
181
187
  return { content, filePath };
182
188
  },
189
+ async getEnv(componentName, componentVersion) {
190
+ if (conf.local) {
191
+ return local.getEnv(componentName);
192
+ }
193
+ const filePath = getFilePath(componentName, componentVersion, '.env');
194
+ const file = await cdn.getFile(filePath);
195
+ return dotenv_1.default.parse(file);
196
+ },
183
197
  getStaticClientPath: () => `${options['path']}${getFilePath('oc-client', packageInfo.version, 'src/oc-client.min.js')}`,
184
198
  getStaticClientMapPath: () => `${options['path']}${getFilePath('oc-client', packageInfo.version, 'src/oc-client.min.map')}`,
185
199
  getStaticFilePath: (componentName, componentVersion, filePath) => `${repository.getComponentPath(componentName, componentVersion)}${conf.local ? settings_1.default.registry.localStaticRedirectorPath : ''}${filePath}`,
@@ -46,12 +46,24 @@ const resources_1 = __importDefault(require("../../../resources"));
46
46
  const urlBuilder = __importStar(require("../../domain/url-builder"));
47
47
  const validator = __importStar(require("../../domain/validators"));
48
48
  const universalify_1 = require("universalify");
49
+ const noopConsole = Object.fromEntries(Object.keys(console).map(key => [key, lodash_1.default.noop]));
49
50
  function getComponent(conf, repository) {
50
51
  const client = (0, oc_client_1.default)({ templates: conf.templates });
51
52
  const cache = new nice_cache_1.default({
52
53
  verbose: !!conf.verbosity,
53
54
  refreshInterval: conf.refreshInterval
54
55
  });
56
+ const getEnv = async (component) => {
57
+ const cacheKey = `${component.name}/${component.version}/.env`;
58
+ const cached = cache.get('file-contents', cacheKey);
59
+ if (cached)
60
+ return cached;
61
+ const env = component.oc.files.env
62
+ ? await repository.getEnv(component.name, component.version)
63
+ : {};
64
+ cache.set('file-contents', cacheKey, env);
65
+ return env;
66
+ };
55
67
  const renderer = function (options, cb) {
56
68
  const nestedRenderer = (0, nested_renderer_1.default)(renderer, options.conf);
57
69
  const retrievingInfo = (0, get_component_retrieving_info_1.default)(options);
@@ -294,114 +306,126 @@ function getComponent(conf, repository) {
294
306
  returnComponent(null, {});
295
307
  }
296
308
  else {
297
- const cacheKey = `${component.name}/${component.version}/server.js`;
298
- const cached = cache.get('file-contents', cacheKey);
299
- const domain = domain_1.default.create();
300
- const setEmptyResponse = oc_empty_response_handler_1.default.contextDecorator(returnComponent);
301
- const contextObj = {
302
- acceptLanguage: accept_language_parser_1.default.parse(acceptLanguage),
303
- baseUrl: conf.baseUrl,
304
- env: conf.env,
305
- params,
306
- plugins: conf.plugins,
307
- renderComponent: (0, universalify_1.fromPromise)(nestedRenderer.renderComponent),
308
- renderComponents: (0, universalify_1.fromPromise)(nestedRenderer.renderComponents),
309
- requestHeaders: options.headers,
310
- requestIp: options.ip,
311
- setEmptyResponse,
312
- staticPath: repository
313
- .getStaticFilePath(component.name, component.version, '')
314
- .replace('https:', ''),
315
- setHeader: (header, value) => {
316
- if (!(typeof header === 'string' && typeof value === 'string')) {
317
- throw resources_1.default.errors.registry
318
- .COMPONENT_SET_HEADER_PARAMETERS_NOT_VALID;
319
- }
320
- if (header && value) {
321
- responseHeaders = responseHeaders || {};
322
- responseHeaders[header.toLowerCase()] = value;
323
- }
324
- },
325
- templates: repository.getTemplatesInfo()
326
- };
327
- const setCallbackTimeout = () => {
328
- const executionTimeout = conf.executionTimeout;
329
- if (executionTimeout) {
330
- setTimeout(() => {
331
- const message = `timeout (${executionTimeout * 1000}ms)`;
332
- returnComponent({ message }, undefined);
333
- domain.exit();
334
- }, executionTimeout * 1000);
335
- }
336
- };
337
- if (!!cached && !conf.hotReloading) {
338
- domain.on('error', returnComponent);
339
- try {
340
- domain.run(() => {
341
- cached(contextObj, returnComponent);
342
- setCallbackTimeout();
309
+ (0, universalify_1.fromPromise)(getEnv)(component, (err, env) => {
310
+ if (err) {
311
+ componentCallbackDone = true;
312
+ return callback({
313
+ status: 502,
314
+ response: {
315
+ code: 'ENV_RESOLVING_ERROR',
316
+ error: resources_1.default.errors.registry.RESOLVING_ERROR
317
+ }
343
318
  });
344
319
  }
345
- catch (e) {
346
- return returnComponent(e, undefined);
347
- }
348
- }
349
- else {
350
- (0, universalify_1.fromPromise)(repository.getDataProvider)(component.name, component.version, (err, dataProvider) => {
351
- if (err) {
352
- componentCallbackDone = true;
353
- return callback({
354
- status: 502,
355
- response: {
356
- code: 'DATA_RESOLVING_ERROR',
357
- error: resources_1.default.errors.registry.RESOLVING_ERROR
358
- }
320
+ const cacheKey = `${component.name}/${component.version}/server.js`;
321
+ const cached = cache.get('file-contents', cacheKey);
322
+ const domain = domain_1.default.create();
323
+ const setEmptyResponse = oc_empty_response_handler_1.default.contextDecorator(returnComponent);
324
+ const contextObj = {
325
+ acceptLanguage: accept_language_parser_1.default.parse(acceptLanguage),
326
+ baseUrl: conf.baseUrl,
327
+ env: { ...conf.env, ...env },
328
+ params,
329
+ plugins: conf.plugins,
330
+ renderComponent: (0, universalify_1.fromPromise)(nestedRenderer.renderComponent),
331
+ renderComponents: (0, universalify_1.fromPromise)(nestedRenderer.renderComponents),
332
+ requestHeaders: options.headers,
333
+ requestIp: options.ip,
334
+ setEmptyResponse,
335
+ staticPath: repository
336
+ .getStaticFilePath(component.name, component.version, '')
337
+ .replace('https:', ''),
338
+ setHeader: (header, value) => {
339
+ if (!(typeof header === 'string' && typeof value === 'string')) {
340
+ throw resources_1.default.errors.registry
341
+ .COMPONENT_SET_HEADER_PARAMETERS_NOT_VALID;
342
+ }
343
+ if (header && value) {
344
+ responseHeaders = responseHeaders || {};
345
+ responseHeaders[header.toLowerCase()] = value;
346
+ }
347
+ },
348
+ templates: repository.getTemplatesInfo()
349
+ };
350
+ const setCallbackTimeout = () => {
351
+ const executionTimeout = conf.executionTimeout;
352
+ if (executionTimeout) {
353
+ setTimeout(() => {
354
+ const message = `timeout (${executionTimeout * 1000}ms)`;
355
+ returnComponent({ message }, undefined);
356
+ domain.exit();
357
+ }, executionTimeout * 1000);
358
+ }
359
+ };
360
+ if (!!cached && !conf.hotReloading) {
361
+ domain.on('error', returnComponent);
362
+ try {
363
+ domain.run(() => {
364
+ cached(contextObj, returnComponent);
365
+ setCallbackTimeout();
359
366
  });
360
367
  }
361
- const context = {
362
- require: (0, require_wrapper_1.default)(conf.dependencies),
363
- module: {
364
- exports: {}
365
- },
366
- console: conf.local ? console : { log: lodash_1.default.noop },
367
- setTimeout,
368
- Buffer
369
- };
370
- const handleError = (err) => {
371
- if (err.code === 'DEPENDENCY_MISSING_FROM_REGISTRY') {
368
+ catch (e) {
369
+ return returnComponent(e, undefined);
370
+ }
371
+ }
372
+ else {
373
+ (0, universalify_1.fromPromise)(repository.getDataProvider)(component.name, component.version, (err, dataProvider) => {
374
+ if (err) {
372
375
  componentCallbackDone = true;
373
376
  return callback({
374
- status: 501,
377
+ status: 502,
375
378
  response: {
376
- code: err.code,
377
- error: resources_1.default.errors.registry.DEPENDENCY_NOT_FOUND(err.missing.join(', ')),
378
- missingDependencies: err.missing
379
+ code: 'DATA_RESOLVING_ERROR',
380
+ error: resources_1.default.errors.registry.RESOLVING_ERROR
379
381
  }
380
382
  });
381
383
  }
382
- returnComponent(err, undefined);
383
- };
384
- const options = conf.local
385
- ? {
386
- displayErrors: true,
387
- filename: dataProvider.filePath
384
+ const context = {
385
+ require: (0, require_wrapper_1.default)(conf.dependencies),
386
+ module: {
387
+ exports: {}
388
+ },
389
+ console: conf.local ? console : noopConsole,
390
+ setTimeout,
391
+ Buffer
392
+ };
393
+ const handleError = (err) => {
394
+ if (err.code === 'DEPENDENCY_MISSING_FROM_REGISTRY') {
395
+ componentCallbackDone = true;
396
+ return callback({
397
+ status: 501,
398
+ response: {
399
+ code: err.code,
400
+ error: resources_1.default.errors.registry.DEPENDENCY_NOT_FOUND(err.missing.join(', ')),
401
+ missingDependencies: err.missing
402
+ }
403
+ });
404
+ }
405
+ returnComponent(err, undefined);
406
+ };
407
+ const options = conf.local
408
+ ? {
409
+ displayErrors: true,
410
+ filename: dataProvider.filePath
411
+ }
412
+ : {};
413
+ try {
414
+ vm_1.default.runInNewContext(dataProvider.content, context, options);
415
+ const processData = context.module.exports['data'];
416
+ cache.set('file-contents', cacheKey, processData);
417
+ domain.on('error', handleError);
418
+ domain.run(() => {
419
+ processData(contextObj, returnComponent);
420
+ setCallbackTimeout();
421
+ });
388
422
  }
389
- : {};
390
- try {
391
- vm_1.default.runInNewContext(dataProvider.content, context, options);
392
- const processData = context.module.exports['data'];
393
- cache.set('file-contents', cacheKey, processData);
394
- domain.on('error', handleError);
395
- domain.run(() => {
396
- processData(contextObj, returnComponent);
397
- setCallbackTimeout();
398
- });
399
- }
400
- catch (err) {
401
- handleError(err);
402
- }
403
- });
404
- }
423
+ catch (err) {
424
+ handleError(err);
425
+ }
426
+ });
427
+ }
428
+ });
405
429
  }
406
430
  });
407
431
  };
package/dist/types.d.ts CHANGED
@@ -72,6 +72,7 @@ interface OcConfiguration {
72
72
  type: string;
73
73
  version: string;
74
74
  };
75
+ env?: string;
75
76
  };
76
77
  packaged: boolean;
77
78
  parameters: Record<string, OcParameter>;
package/logintervals.md CHANGED
@@ -1 +1 @@
1
- [{"to":"v0.49.18","from":"v0.49.17"},{"to":"v0.49.17","from":"v0.49.16"},{"to":"v0.49.16","from":"v0.49.15"},{"to":"v0.49.15","from":"v0.49.14"},{"to":"v0.49.14","from":"v0.49.12"},{"to":"v0.49.12","from":"v0.49.11"},{"to":"v0.49.11","from":"v0.49.9"},{"to":"v0.49.9","from":"v0.49.8"},{"to":"v0.49.8","from":"v0.49.7"},{"to":"v0.49.7","from":"v0.49.6"},{"to":"v0.49.6","from":"v0.49.5"},{"to":"v0.49.5","from":"v0.49.4"},{"to":"v0.49.4","from":"v0.49.3"},{"to":"v0.49.3","from":"v0.49.2"},{"to":"v0.49.2","from":"v0.49.1"},{"to":"v0.49.1","from":"v0.49.0"},{"to":"v0.49.0","from":"v0.48.23"},{"to":"v0.48.23","from":"v0.48.22"},{"to":"v0.48.22","from":"v0.48.21"},{"to":"v0.48.21","from":"v0.48.19"},{"to":"v0.48.19","from":"v0.48.18"},{"to":"v0.48.18","from":"v0.48.17"},{"to":"v0.48.17","from":"v0.48.16"},{"to":"v0.48.16","from":"v0.48.15"},{"to":"v0.48.15","from":"v0.48.14"},{"to":"v0.48.14","from":"v0.48.13"},{"to":"v0.48.13","from":"v0.48.12"},{"to":"v0.48.12","from":"v0.48.11"},{"to":"v0.48.11","from":"v0.48.10"},{"to":"v0.48.10","from":"v0.48.9"},{"to":"v0.48.9","from":"v0.48.7"},{"to":"v0.48.7","from":"v0.48.6"},{"to":"v0.48.6","from":"v0.48.5"},{"to":"v0.48.5","from":"v0.48.4"},{"to":"v0.48.4","from":"v0.48.3"},{"to":"v0.48.3","from":"v0.48.2"},{"to":"v0.48.2","from":"v0.48.1"},{"to":"v0.48.1","from":"v0.48.0"},{"to":"v0.48.0","from":"v0.47.1"},{"to":"v0.47.1","from":"v0.47.0"},{"to":"v0.47.0","from":"v0.46.0"},{"to":"v0.46.0","from":"v0.45.4"},{"to":"v0.45.4","from":"v0.45.3"},{"to":"v0.45.3","from":"v0.45.2"},{"to":"v0.45.2","from":"v0.45.1"},{"to":"v0.45.1","from":"v0.45.0"},{"to":"v0.45.0","from":"v0.44.13"},{"to":"v0.44.13","from":"v0.44.12"},{"to":"v0.44.12","from":"v0.44.11"},{"to":"v0.44.11","from":"v0.44.10"},{"to":"v0.44.10","from":"v0.44.9"},{"to":"v0.44.9","from":"v0.44.8"},{"to":"v0.44.8","from":"v0.44.7"},{"to":"v0.44.7","from":"v0.44.6"},{"to":"v0.44.6","from":"v0.44.5"},{"to":"v0.44.5","from":"v0.44.4"},{"to":"v0.44.4","from":"v0.44.3"},{"to":"v0.44.3","from":"v0.44.2"},{"to":"v0.44.2","from":"v0.44.1"},{"to":"v0.44.1","from":"v0.44.0"},{"to":"v0.44.0","from":"v0.43.2"},{"to":"v0.43.2","from":"v0.43.1"},{"to":"v0.43.1","from":"v0.43.0"},{"to":"v0.43.0","from":"v0.42.26"},{"to":"v0.42.26","from":"v0.42.25"},{"to":"v0.42.25","from":"v0.42.24"},{"to":"v0.42.24","from":"v0.42.23"},{"to":"v0.42.23","from":"v0.42.22"},{"to":"v0.42.22","from":"v0.42.21"},{"to":"v0.42.21","from":"v0.42.20"},{"to":"v0.42.20","from":"v0.42.19"},{"to":"v0.42.19","from":"v0.42.18"},{"to":"v0.42.18","from":"v0.42.17"},{"to":"v0.42.17","from":"v0.42.16"},{"to":"v0.42.16","from":"v0.42.15"},{"to":"v0.42.15","from":"v0.42.14"},{"to":"v0.42.14","from":"v0.42.13"},{"to":"v0.42.13","from":"v0.42.12"},{"to":"v0.42.12","from":"v0.42.10"},{"to":"v0.42.10","from":"v0.42.9"},{"to":"v0.42.9","from":"v0.42.8"},{"to":"v0.42.8","from":"v0.42.7"},{"to":"v0.42.7","from":"v0.42.6"},{"to":"v0.42.6","from":"v0.42.5"},{"to":"v0.42.5","from":"v0.42.4"},{"to":"v0.42.4","from":"v0.42.3"},{"to":"v0.42.3","from":"v0.42.2"},{"to":"v0.42.2","from":"v0.42.1"},{"to":"v0.42.1","from":"v0.42.0"},{"to":"v0.42.0","from":"v0.41.16"},{"to":"v0.41.16","from":"v0.41.15"},{"to":"v0.41.15","from":"v0.41.14"},{"to":"v0.41.14","from":"v0.41.13"},{"to":"v0.41.13","from":"v0.41.12"},{"to":"v0.41.12","from":"v0.41.11"},{"to":"v0.41.11","from":"v0.41.10"},{"to":"v0.41.10","from":"v0.41.9"},{"to":"v0.41.9","from":"v0.41.8"},{"to":"v0.41.8","from":"v0.41.7"},{"to":"v0.41.7","from":"v0.41.6"},{"to":"v0.41.6","from":"v0.41.5"},{"to":"v0.41.5","from":"v0.41.4"},{"to":"v0.41.4","from":"v0.41.3"},{"to":"v0.41.3","from":"v0.41.2"},{"to":"v0.41.2","from":"v0.41.1"},{"to":"v0.41.1","from":"v0.41.0"},{"to":"v0.41.0","from":"v0.40.10"},{"to":"v0.40.10","from":"v0.40.9"},{"to":"v0.40.9","from":"v0.40.8"},{"to":"v0.40.8","from":"v0.40.7"},{"to":"v0.40.7","from":"v0.40.6"},{"to":"v0.40.6","from":"v0.40.5"},{"to":"v0.40.5","from":"v0.40.4"},{"to":"v0.40.4","from":"v0.40.3"},{"to":"v0.40.3","from":"v0.40.2"},{"to":"v0.40.2","from":"v0.40.1"},{"to":"v0.40.1","from":"v0.40.0"},{"to":"v0.40.0","from":"v0.39.8"},{"to":"v0.39.8","from":"v0.39.7"},{"to":"v0.39.7","from":"v0.39.6"},{"to":"v0.39.6","from":"v0.39.5"},{"to":"v0.39.5","from":"v0.39.4"},{"to":"v0.39.4","from":"v0.39.3"},{"to":"v0.39.3","from":"v0.39.2"},{"to":"v0.39.2","from":"v0.39.1"},{"to":"v0.39.1","from":"v0.39.0"},{"to":"v0.39.0","from":"v0.38.8"},{"to":"v0.38.8","from":"v0.38.7"},{"to":"v0.38.7","from":"v0.38.6"},{"to":"v0.38.6","from":"v0.38.5"},{"to":"v0.38.5","from":"v0.38.4"},{"to":"v0.38.4","from":"v0.38.3"},{"to":"v0.38.3","from":"v0.38.2"},{"to":"v0.38.2","from":"v0.38.1"},{"to":"v0.38.1","from":"v0.38.0"},{"to":"v0.38.0","from":"v0.37.11"},{"to":"v0.37.11","from":"v0.37.10"},{"to":"v0.37.10","from":"v0.37.9"},{"to":"v0.37.9","from":"v0.37.8"},{"to":"v0.37.8","from":"v0.37.7"},{"to":"v0.37.7","from":"v0.37.6"},{"to":"v0.37.6","from":"v0.37.5"},{"to":"v0.37.5","from":"v0.37.4"},{"to":"v0.37.4","from":"v0.37.3"},{"to":"v0.37.3","from":"v0.37.2"},{"to":"v0.37.2","from":"v0.37.1"},{"to":"v0.37.1","from":"v0.37.0"},{"to":"v0.37.0","from":"v0.36.28"},{"to":"v0.36.28","from":"v0.36.27"},{"to":"v0.36.27","from":"v0.36.26"},{"to":"v0.36.26","from":"v0.36.25"},{"to":"v0.36.25","from":"v0.36.24"},{"to":"v0.36.24","from":"v0.36.23"},{"to":"v0.36.23","from":"v0.36.22"},{"to":"v0.36.22","from":"v0.36.21"},{"to":"v0.36.21","from":"v0.36.20"},{"to":"v0.36.20","from":"v0.36.19"},{"to":"v0.36.19","from":"v0.36.18"},{"to":"v0.36.18","from":"v0.36.17"},{"to":"v0.36.17","from":"v0.36.16"},{"to":"v0.36.16","from":"v0.36.15"},{"to":"v0.36.15","from":"v0.36.14"},{"to":"v0.36.14","from":"v0.36.13"},{"to":"v0.36.13","from":"v0.36.12"},{"to":"v0.36.12","from":"v0.36.11"},{"to":"v0.36.11","from":"v0.36.10"},{"to":"v0.36.10","from":"v0.36.9"},{"to":"v0.36.9","from":"v0.36.8"},{"to":"v0.36.8","from":"v0.36.7"},{"to":"v0.36.7","from":"v0.36.6"},{"to":"v0.36.6","from":"v0.36.5"},{"to":"v0.36.5","from":"v0.36.4"},{"to":"v0.36.4","from":"v0.36.3"},{"to":"v0.36.3","from":"v0.36.2"},{"to":"v0.36.2","from":"v0.36.1"},{"to":"v0.36.1","from":"v0.36.0"},{"to":"v0.36.0","from":"v0.35.6"},{"to":"v0.35.6","from":"v0.35.5"},{"to":"v0.35.5","from":"v0.35.4"},{"to":"v0.35.4","from":"v0.35.3"},{"to":"v0.35.3","from":"v0.35.2"},{"to":"v0.35.2","from":"v0.35.1"},{"to":"v0.35.1","from":"v0.35.0"},{"to":"v0.35.0","from":"v0.34.8"},{"to":"v0.34.8","from":"v0.34.7"},{"to":"v0.34.7","from":"v0.34.6"},{"to":"v0.34.6","from":"v0.34.5"},{"to":"v0.34.5","from":"v0.34.4"},{"to":"v0.34.4","from":"v0.34.3"},{"to":"v0.34.3","from":"v0.34.2"},{"to":"v0.34.2","from":"v0.34.1"},{"to":"v0.34.1","from":"v0.34.0"},{"to":"v0.34.0","from":"v0.33.31"},{"to":"v0.33.31","from":"v0.33.30"},{"to":"v0.33.30","from":"v0.33.29"},{"to":"v0.33.29","from":"v0.33.28"},{"to":"v0.33.28","from":"v0.33.27"},{"to":"v0.33.27","from":"v0.33.26"},{"to":"v0.33.26","from":"v0.33.25"},{"to":"v0.33.25","from":"v0.33.24"},{"to":"v0.33.24","from":"v0.33.23"},{"to":"v0.33.23","from":"v0.33.22"},{"to":"v0.33.22","from":"v0.33.21"},{"to":"v0.33.21","from":"v0.33.20"},{"to":"v0.33.20","from":"v0.33.19"},{"to":"v0.33.19","from":"v0.33.18"},{"to":"v0.33.18","from":"v0.33.17"},{"to":"v0.33.17","from":"v0.33.16"},{"to":"v0.33.16","from":"v0.33.15"},{"to":"v0.33.15","from":"v0.33.14"},{"to":"v0.33.14","from":"v0.33.13"},{"to":"v0.33.13","from":"v0.33.12"},{"to":"v0.33.12","from":"v0.33.11"},{"to":"v0.33.11","from":"v0.33.10"},{"to":"v0.33.10","from":"v0.33.9"},{"to":"v0.33.9","from":"v0.33.8"},{"to":"v0.33.8","from":"v0.33.7"},{"to":"v0.33.7","from":"v0.33.6"},{"to":"v0.33.6","from":"v0.33.5"},{"to":"v0.33.5","from":"v0.33.4"},{"to":"v0.33.4","from":"v0.33.3"},{"to":"v0.33.3","from":"v0.33.2"},{"to":"v0.33.2","from":"v0.33.1"},{"to":"v0.33.1","from":"v0.33.0"},{"to":"v0.33.0","from":"v0.32.6"},{"to":"v0.32.6","from":"v0.32.5"},{"to":"v0.32.5","from":"v0.32.4"},{"to":"v0.32.4","from":"v0.32.3"},{"to":"v0.32.3","from":"v0.32.2"},{"to":"v0.32.2","from":"v0.32.1"},{"to":"v0.32.1","from":"v0.32.0"},{"to":"v0.32.0","from":"v0.31.2"},{"to":"v0.31.2","from":"v0.31.1"},{"to":"v0.31.1","from":"v0.31.0"},{"to":"v0.31.0","from":"v0.30.9"},{"to":"v0.30.9","from":"v0.30.8"},{"to":"v0.30.8","from":"v0.30.7"},{"to":"v0.30.7","from":"v0.30.6"},{"to":"v0.30.6","from":"v0.30.5"},{"to":"v0.30.5","from":"v0.30.4"},{"to":"v0.30.4","from":"v0.30.3"},{"to":"v0.30.3","from":"v0.30.2"},{"to":"v0.30.2","from":"v0.30.1"},{"to":"v0.30.1","from":"v0.30.0"},{"to":"v0.30.0","from":"v0.29.4"},{"to":"v0.29.4","from":"v0.29.3"},{"to":"v0.29.3","from":"v0.29.2"},{"to":"v0.29.2","from":"v0.29.1"},{"to":"v0.29.1","from":"v0.29.0"},{"to":"v0.29.0","from":"v0.28.9"},{"to":"v0.28.9","from":"v0.28.8"},{"to":"v0.28.8","from":"v0.28.7"},{"to":"v0.28.7","from":"v0.28.6"},{"to":"v0.28.6","from":"v0.28.5"},{"to":"v0.28.5","from":"v0.28.4"},{"to":"v0.28.4","from":"v0.28.3"},{"to":"v0.28.3","from":"v0.28.2"},{"to":"v0.28.2","from":"v0.28.1"},{"to":"v0.28.1","from":"v0.28.0"},{"to":"v0.28.0","from":"v0.27.9"},{"to":"v0.27.9","from":"v0.27.8"},{"to":"v0.27.8","from":"v0.27.7"},{"to":"v0.27.7","from":"v0.27.6"},{"to":"v0.27.6","from":"v0.27.5"},{"to":"v0.27.5","from":"v0.27.4"},{"to":"v0.27.4","from":"v0.27.3"},{"to":"v0.27.3","from":"v0.27.2"},{"to":"v0.27.2","from":"v0.27.1"},{"to":"v0.27.1","from":"v0.27.0"},{"to":"v0.27.0","from":"v0.26.2"},{"to":"v0.26.2","from":"v0.26.1"},{"to":"v0.26.1","from":"v0.26.0"},{"to":"v0.26.0","from":"v0.25.0"},{"to":"v0.25.0","from":"v0.24.1"},{"to":"v0.24.1","from":"v0.24.0"},{"to":"v0.24.0","from":"v0.23.7"},{"to":"v0.23.7","from":"v0.23.6"},{"to":"v0.23.6","from":"v0.23.5"},{"to":"v0.23.5","from":"v0.23.4"},{"to":"v0.23.4","from":"v0.23.3"},{"to":"v0.23.3","from":"v0.23.2"},{"to":"v0.23.2","from":"v0.23.1"},{"to":"v0.23.1","from":"v0.23.0"},{"to":"v0.23.0","from":"v0.22.3"},{"to":"v0.22.3","from":"v0.22.2"},{"to":"v0.22.2","from":"v0.22.1"},{"to":"v0.22.1","from":"v0.22.0"},{"to":"v0.22.0","from":"v0.21.0"},{"to":"v0.21.0","from":"v0.20.5"},{"to":"v0.20.5","from":"v0.20.4"},{"to":"v0.20.4","from":"v0.20.3"},{"to":"v0.20.3","from":"v0.20.2"},{"to":"v0.20.2","from":"v0.20.1"},{"to":"v0.20.1","from":"v0.20.0"},{"to":"v0.20.0","from":"v0.19.5"},{"to":"v0.19.5","from":"v0.19.4"},{"to":"v0.19.4","from":"v0.19.3"},{"to":"v0.19.3","from":"v0.19.2"},{"to":"v0.19.2","from":"v0.19.1"},{"to":"v0.19.1","from":"v0.19.0"},{"to":"v0.19.0","from":"6181a540729a7179d7a9d41489dfc241335cf1b5"}]
1
+ [{"to":"v0.49.21","from":"v0.49.20"},{"to":"v0.49.20","from":"v0.49.19"},{"to":"v0.49.19","from":"v0.49.18"},{"to":"v0.49.18","from":"v0.49.17"},{"to":"v0.49.17","from":"v0.49.16"},{"to":"v0.49.16","from":"v0.49.15"},{"to":"v0.49.15","from":"v0.49.14"},{"to":"v0.49.14","from":"v0.49.12"},{"to":"v0.49.12","from":"v0.49.11"},{"to":"v0.49.11","from":"v0.49.9"},{"to":"v0.49.9","from":"v0.49.8"},{"to":"v0.49.8","from":"v0.49.7"},{"to":"v0.49.7","from":"v0.49.6"},{"to":"v0.49.6","from":"v0.49.5"},{"to":"v0.49.5","from":"v0.49.4"},{"to":"v0.49.4","from":"v0.49.3"},{"to":"v0.49.3","from":"v0.49.2"},{"to":"v0.49.2","from":"v0.49.1"},{"to":"v0.49.1","from":"v0.49.0"},{"to":"v0.49.0","from":"v0.48.23"},{"to":"v0.48.23","from":"v0.48.22"},{"to":"v0.48.22","from":"v0.48.21"},{"to":"v0.48.21","from":"v0.48.19"},{"to":"v0.48.19","from":"v0.48.18"},{"to":"v0.48.18","from":"v0.48.17"},{"to":"v0.48.17","from":"v0.48.16"},{"to":"v0.48.16","from":"v0.48.15"},{"to":"v0.48.15","from":"v0.48.14"},{"to":"v0.48.14","from":"v0.48.13"},{"to":"v0.48.13","from":"v0.48.12"},{"to":"v0.48.12","from":"v0.48.11"},{"to":"v0.48.11","from":"v0.48.10"},{"to":"v0.48.10","from":"v0.48.9"},{"to":"v0.48.9","from":"v0.48.7"},{"to":"v0.48.7","from":"v0.48.6"},{"to":"v0.48.6","from":"v0.48.5"},{"to":"v0.48.5","from":"v0.48.4"},{"to":"v0.48.4","from":"v0.48.3"},{"to":"v0.48.3","from":"v0.48.2"},{"to":"v0.48.2","from":"v0.48.1"},{"to":"v0.48.1","from":"v0.48.0"},{"to":"v0.48.0","from":"v0.47.1"},{"to":"v0.47.1","from":"v0.47.0"},{"to":"v0.47.0","from":"v0.46.0"},{"to":"v0.46.0","from":"v0.45.4"},{"to":"v0.45.4","from":"v0.45.3"},{"to":"v0.45.3","from":"v0.45.2"},{"to":"v0.45.2","from":"v0.45.1"},{"to":"v0.45.1","from":"v0.45.0"},{"to":"v0.45.0","from":"v0.44.13"},{"to":"v0.44.13","from":"v0.44.12"},{"to":"v0.44.12","from":"v0.44.11"},{"to":"v0.44.11","from":"v0.44.10"},{"to":"v0.44.10","from":"v0.44.9"},{"to":"v0.44.9","from":"v0.44.8"},{"to":"v0.44.8","from":"v0.44.7"},{"to":"v0.44.7","from":"v0.44.6"},{"to":"v0.44.6","from":"v0.44.5"},{"to":"v0.44.5","from":"v0.44.4"},{"to":"v0.44.4","from":"v0.44.3"},{"to":"v0.44.3","from":"v0.44.2"},{"to":"v0.44.2","from":"v0.44.1"},{"to":"v0.44.1","from":"v0.44.0"},{"to":"v0.44.0","from":"v0.43.2"},{"to":"v0.43.2","from":"v0.43.1"},{"to":"v0.43.1","from":"v0.43.0"},{"to":"v0.43.0","from":"v0.42.26"},{"to":"v0.42.26","from":"v0.42.25"},{"to":"v0.42.25","from":"v0.42.24"},{"to":"v0.42.24","from":"v0.42.23"},{"to":"v0.42.23","from":"v0.42.22"},{"to":"v0.42.22","from":"v0.42.21"},{"to":"v0.42.21","from":"v0.42.20"},{"to":"v0.42.20","from":"v0.42.19"},{"to":"v0.42.19","from":"v0.42.18"},{"to":"v0.42.18","from":"v0.42.17"},{"to":"v0.42.17","from":"v0.42.16"},{"to":"v0.42.16","from":"v0.42.15"},{"to":"v0.42.15","from":"v0.42.14"},{"to":"v0.42.14","from":"v0.42.13"},{"to":"v0.42.13","from":"v0.42.12"},{"to":"v0.42.12","from":"v0.42.10"},{"to":"v0.42.10","from":"v0.42.9"},{"to":"v0.42.9","from":"v0.42.8"},{"to":"v0.42.8","from":"v0.42.7"},{"to":"v0.42.7","from":"v0.42.6"},{"to":"v0.42.6","from":"v0.42.5"},{"to":"v0.42.5","from":"v0.42.4"},{"to":"v0.42.4","from":"v0.42.3"},{"to":"v0.42.3","from":"v0.42.2"},{"to":"v0.42.2","from":"v0.42.1"},{"to":"v0.42.1","from":"v0.42.0"},{"to":"v0.42.0","from":"v0.41.16"},{"to":"v0.41.16","from":"v0.41.15"},{"to":"v0.41.15","from":"v0.41.14"},{"to":"v0.41.14","from":"v0.41.13"},{"to":"v0.41.13","from":"v0.41.12"},{"to":"v0.41.12","from":"v0.41.11"},{"to":"v0.41.11","from":"v0.41.10"},{"to":"v0.41.10","from":"v0.41.9"},{"to":"v0.41.9","from":"v0.41.8"},{"to":"v0.41.8","from":"v0.41.7"},{"to":"v0.41.7","from":"v0.41.6"},{"to":"v0.41.6","from":"v0.41.5"},{"to":"v0.41.5","from":"v0.41.4"},{"to":"v0.41.4","from":"v0.41.3"},{"to":"v0.41.3","from":"v0.41.2"},{"to":"v0.41.2","from":"v0.41.1"},{"to":"v0.41.1","from":"v0.41.0"},{"to":"v0.41.0","from":"v0.40.10"},{"to":"v0.40.10","from":"v0.40.9"},{"to":"v0.40.9","from":"v0.40.8"},{"to":"v0.40.8","from":"v0.40.7"},{"to":"v0.40.7","from":"v0.40.6"},{"to":"v0.40.6","from":"v0.40.5"},{"to":"v0.40.5","from":"v0.40.4"},{"to":"v0.40.4","from":"v0.40.3"},{"to":"v0.40.3","from":"v0.40.2"},{"to":"v0.40.2","from":"v0.40.1"},{"to":"v0.40.1","from":"v0.40.0"},{"to":"v0.40.0","from":"v0.39.8"},{"to":"v0.39.8","from":"v0.39.7"},{"to":"v0.39.7","from":"v0.39.6"},{"to":"v0.39.6","from":"v0.39.5"},{"to":"v0.39.5","from":"v0.39.4"},{"to":"v0.39.4","from":"v0.39.3"},{"to":"v0.39.3","from":"v0.39.2"},{"to":"v0.39.2","from":"v0.39.1"},{"to":"v0.39.1","from":"v0.39.0"},{"to":"v0.39.0","from":"v0.38.8"},{"to":"v0.38.8","from":"v0.38.7"},{"to":"v0.38.7","from":"v0.38.6"},{"to":"v0.38.6","from":"v0.38.5"},{"to":"v0.38.5","from":"v0.38.4"},{"to":"v0.38.4","from":"v0.38.3"},{"to":"v0.38.3","from":"v0.38.2"},{"to":"v0.38.2","from":"v0.38.1"},{"to":"v0.38.1","from":"v0.38.0"},{"to":"v0.38.0","from":"v0.37.11"},{"to":"v0.37.11","from":"v0.37.10"},{"to":"v0.37.10","from":"v0.37.9"},{"to":"v0.37.9","from":"v0.37.8"},{"to":"v0.37.8","from":"v0.37.7"},{"to":"v0.37.7","from":"v0.37.6"},{"to":"v0.37.6","from":"v0.37.5"},{"to":"v0.37.5","from":"v0.37.4"},{"to":"v0.37.4","from":"v0.37.3"},{"to":"v0.37.3","from":"v0.37.2"},{"to":"v0.37.2","from":"v0.37.1"},{"to":"v0.37.1","from":"v0.37.0"},{"to":"v0.37.0","from":"v0.36.28"},{"to":"v0.36.28","from":"v0.36.27"},{"to":"v0.36.27","from":"v0.36.26"},{"to":"v0.36.26","from":"v0.36.25"},{"to":"v0.36.25","from":"v0.36.24"},{"to":"v0.36.24","from":"v0.36.23"},{"to":"v0.36.23","from":"v0.36.22"},{"to":"v0.36.22","from":"v0.36.21"},{"to":"v0.36.21","from":"v0.36.20"},{"to":"v0.36.20","from":"v0.36.19"},{"to":"v0.36.19","from":"v0.36.18"},{"to":"v0.36.18","from":"v0.36.17"},{"to":"v0.36.17","from":"v0.36.16"},{"to":"v0.36.16","from":"v0.36.15"},{"to":"v0.36.15","from":"v0.36.14"},{"to":"v0.36.14","from":"v0.36.13"},{"to":"v0.36.13","from":"v0.36.12"},{"to":"v0.36.12","from":"v0.36.11"},{"to":"v0.36.11","from":"v0.36.10"},{"to":"v0.36.10","from":"v0.36.9"},{"to":"v0.36.9","from":"v0.36.8"},{"to":"v0.36.8","from":"v0.36.7"},{"to":"v0.36.7","from":"v0.36.6"},{"to":"v0.36.6","from":"v0.36.5"},{"to":"v0.36.5","from":"v0.36.4"},{"to":"v0.36.4","from":"v0.36.3"},{"to":"v0.36.3","from":"v0.36.2"},{"to":"v0.36.2","from":"v0.36.1"},{"to":"v0.36.1","from":"v0.36.0"},{"to":"v0.36.0","from":"v0.35.6"},{"to":"v0.35.6","from":"v0.35.5"},{"to":"v0.35.5","from":"v0.35.4"},{"to":"v0.35.4","from":"v0.35.3"},{"to":"v0.35.3","from":"v0.35.2"},{"to":"v0.35.2","from":"v0.35.1"},{"to":"v0.35.1","from":"v0.35.0"},{"to":"v0.35.0","from":"v0.34.8"},{"to":"v0.34.8","from":"v0.34.7"},{"to":"v0.34.7","from":"v0.34.6"},{"to":"v0.34.6","from":"v0.34.5"},{"to":"v0.34.5","from":"v0.34.4"},{"to":"v0.34.4","from":"v0.34.3"},{"to":"v0.34.3","from":"v0.34.2"},{"to":"v0.34.2","from":"v0.34.1"},{"to":"v0.34.1","from":"v0.34.0"},{"to":"v0.34.0","from":"v0.33.31"},{"to":"v0.33.31","from":"v0.33.30"},{"to":"v0.33.30","from":"v0.33.29"},{"to":"v0.33.29","from":"v0.33.28"},{"to":"v0.33.28","from":"v0.33.27"},{"to":"v0.33.27","from":"v0.33.26"},{"to":"v0.33.26","from":"v0.33.25"},{"to":"v0.33.25","from":"v0.33.24"},{"to":"v0.33.24","from":"v0.33.23"},{"to":"v0.33.23","from":"v0.33.22"},{"to":"v0.33.22","from":"v0.33.21"},{"to":"v0.33.21","from":"v0.33.20"},{"to":"v0.33.20","from":"v0.33.19"},{"to":"v0.33.19","from":"v0.33.18"},{"to":"v0.33.18","from":"v0.33.17"},{"to":"v0.33.17","from":"v0.33.16"},{"to":"v0.33.16","from":"v0.33.15"},{"to":"v0.33.15","from":"v0.33.14"},{"to":"v0.33.14","from":"v0.33.13"},{"to":"v0.33.13","from":"v0.33.12"},{"to":"v0.33.12","from":"v0.33.11"},{"to":"v0.33.11","from":"v0.33.10"},{"to":"v0.33.10","from":"v0.33.9"},{"to":"v0.33.9","from":"v0.33.8"},{"to":"v0.33.8","from":"v0.33.7"},{"to":"v0.33.7","from":"v0.33.6"},{"to":"v0.33.6","from":"v0.33.5"},{"to":"v0.33.5","from":"v0.33.4"},{"to":"v0.33.4","from":"v0.33.3"},{"to":"v0.33.3","from":"v0.33.2"},{"to":"v0.33.2","from":"v0.33.1"},{"to":"v0.33.1","from":"v0.33.0"},{"to":"v0.33.0","from":"v0.32.6"},{"to":"v0.32.6","from":"v0.32.5"},{"to":"v0.32.5","from":"v0.32.4"},{"to":"v0.32.4","from":"v0.32.3"},{"to":"v0.32.3","from":"v0.32.2"},{"to":"v0.32.2","from":"v0.32.1"},{"to":"v0.32.1","from":"v0.32.0"},{"to":"v0.32.0","from":"v0.31.2"},{"to":"v0.31.2","from":"v0.31.1"},{"to":"v0.31.1","from":"v0.31.0"},{"to":"v0.31.0","from":"v0.30.9"},{"to":"v0.30.9","from":"v0.30.8"},{"to":"v0.30.8","from":"v0.30.7"},{"to":"v0.30.7","from":"v0.30.6"},{"to":"v0.30.6","from":"v0.30.5"},{"to":"v0.30.5","from":"v0.30.4"},{"to":"v0.30.4","from":"v0.30.3"},{"to":"v0.30.3","from":"v0.30.2"},{"to":"v0.30.2","from":"v0.30.1"},{"to":"v0.30.1","from":"v0.30.0"},{"to":"v0.30.0","from":"v0.29.4"},{"to":"v0.29.4","from":"v0.29.3"},{"to":"v0.29.3","from":"v0.29.2"},{"to":"v0.29.2","from":"v0.29.1"},{"to":"v0.29.1","from":"v0.29.0"},{"to":"v0.29.0","from":"v0.28.9"},{"to":"v0.28.9","from":"v0.28.8"},{"to":"v0.28.8","from":"v0.28.7"},{"to":"v0.28.7","from":"v0.28.6"},{"to":"v0.28.6","from":"v0.28.5"},{"to":"v0.28.5","from":"v0.28.4"},{"to":"v0.28.4","from":"v0.28.3"},{"to":"v0.28.3","from":"v0.28.2"},{"to":"v0.28.2","from":"v0.28.1"},{"to":"v0.28.1","from":"v0.28.0"},{"to":"v0.28.0","from":"v0.27.9"},{"to":"v0.27.9","from":"v0.27.8"},{"to":"v0.27.8","from":"v0.27.7"},{"to":"v0.27.7","from":"v0.27.6"},{"to":"v0.27.6","from":"v0.27.5"},{"to":"v0.27.5","from":"v0.27.4"},{"to":"v0.27.4","from":"v0.27.3"},{"to":"v0.27.3","from":"v0.27.2"},{"to":"v0.27.2","from":"v0.27.1"},{"to":"v0.27.1","from":"v0.27.0"},{"to":"v0.27.0","from":"v0.26.2"},{"to":"v0.26.2","from":"v0.26.1"},{"to":"v0.26.1","from":"v0.26.0"},{"to":"v0.26.0","from":"v0.25.0"},{"to":"v0.25.0","from":"v0.24.1"},{"to":"v0.24.1","from":"v0.24.0"},{"to":"v0.24.0","from":"v0.23.7"},{"to":"v0.23.7","from":"v0.23.6"},{"to":"v0.23.6","from":"v0.23.5"},{"to":"v0.23.5","from":"v0.23.4"},{"to":"v0.23.4","from":"v0.23.3"},{"to":"v0.23.3","from":"v0.23.2"},{"to":"v0.23.2","from":"v0.23.1"},{"to":"v0.23.1","from":"v0.23.0"},{"to":"v0.23.0","from":"v0.22.3"},{"to":"v0.22.3","from":"v0.22.2"},{"to":"v0.22.2","from":"v0.22.1"},{"to":"v0.22.1","from":"v0.22.0"},{"to":"v0.22.0","from":"v0.21.0"},{"to":"v0.21.0","from":"v0.20.5"},{"to":"v0.20.5","from":"v0.20.4"},{"to":"v0.20.4","from":"v0.20.3"},{"to":"v0.20.3","from":"v0.20.2"},{"to":"v0.20.2","from":"v0.20.1"},{"to":"v0.20.1","from":"v0.20.0"},{"to":"v0.20.0","from":"v0.19.5"},{"to":"v0.19.5","from":"v0.19.4"},{"to":"v0.19.4","from":"v0.19.3"},{"to":"v0.19.3","from":"v0.19.2"},{"to":"v0.19.2","from":"v0.19.1"},{"to":"v0.19.1","from":"v0.19.0"},{"to":"v0.19.0","from":"6181a540729a7179d7a9d41489dfc241335cf1b5"}]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc",
3
- "version": "0.49.18",
3
+ "version": "0.49.21",
4
4
  "description": "A framework for developing and distributing html components",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -92,6 +92,7 @@
92
92
  "colors": "1.4.0",
93
93
  "cross-spawn": "7.0.3",
94
94
  "dependency-graph": "0.11.0",
95
+ "dotenv": "16.0.1",
95
96
  "errorhandler": "1.5.1",
96
97
  "express": "4.18.2",
97
98
  "form-data": "4.0.0",
@@ -1 +1 @@
1
- {"name":"oc-client","description":"The OpenComponents client-side javascript client","version":"0.49.18","repository":"https://github.com/opencomponents/oc/tree/master/components/oc-client","author":"Matteo Figus <matteofigus@gmail.com>","oc":{"container":false,"renderInfo":false,"minify":false,"parameters":{},"files":{"template":{"type":"oc-template-es6","hashKey":"4bdbbf7249b210dee9a729e8a611eac3dc5eae82","src":"template.js","version":"1.0.7"},"static":["src"],"dataProvider":{"type":"node.js","hashKey":"96eb8b28d43ce2093e13753e54d3f2f938dd0f7d","src":"server.js"}},"version":"0.49.18","packaged":true,"date":1666283904000},"devDependencies":{"oc-template-es6-compiler":"^1.0.1"}}
1
+ {"name":"oc-client","description":"The OpenComponents client-side javascript client","version":"0.49.21","repository":"https://github.com/opencomponents/oc/tree/master/components/oc-client","author":"Matteo Figus <matteofigus@gmail.com>","oc":{"container":false,"renderInfo":false,"minify":false,"parameters":{},"files":{"template":{"type":"oc-template-es6","hashKey":"4bdbbf7249b210dee9a729e8a611eac3dc5eae82","src":"template.js","version":"1.0.7"},"static":["src"],"dataProvider":{"type":"node.js","hashKey":"96eb8b28d43ce2093e13753e54d3f2f938dd0f7d","src":"server.js"}},"version":"0.49.21","packaged":true,"date":1670568133835},"devDependencies":{"oc-template-es6-compiler":"^1.0.1"}}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oc-client",
3
3
  "description": "The OpenComponents client-side javascript client",
4
- "version": "0.49.18",
4
+ "version": "0.49.21",
5
5
  "repository": "https://github.com/opencomponents/oc/tree/master/components/oc-client",
6
6
  "author": "Matteo Figus <matteofigus@gmail.com>",
7
7
  "oc": {
@@ -1,6 +1,7 @@
1
1
  import fs from 'fs-extra';
2
2
  import getUnixUtcTimestamp from 'oc-get-unix-utc-timestamp';
3
3
  import path from 'path';
4
+ import dotenv from 'dotenv';
4
5
 
5
6
  import ComponentsCache from './components-cache';
6
7
  import getComponentsDetails from './components-details';
@@ -114,6 +115,14 @@ export default function repository(conf: Config) {
114
115
  content: fs.readFileSync(filePath).toString(),
115
116
  filePath
116
117
  };
118
+ },
119
+ getEnv(componentName: string): Record<string, string> {
120
+ const pkg: Component = fs.readJsonSync(
121
+ path.join(conf.path, `${componentName}/package.json`)
122
+ );
123
+ const filePath = path.join(conf.path, componentName, pkg.oc.files.env!);
124
+
125
+ return dotenv.parse(fs.readFileSync(filePath).toString());
117
126
  }
118
127
  };
119
128
 
@@ -249,6 +258,19 @@ export default function repository(conf: Config) {
249
258
 
250
259
  return { content, filePath };
251
260
  },
261
+ async getEnv(
262
+ componentName: string,
263
+ componentVersion: string
264
+ ): Promise<Record<string, string>> {
265
+ if (conf.local) {
266
+ return local.getEnv(componentName);
267
+ }
268
+
269
+ const filePath = getFilePath(componentName, componentVersion, '.env');
270
+ const file = await cdn.getFile(filePath);
271
+
272
+ return dotenv.parse(file);
273
+ },
252
274
  getStaticClientPath: (): string =>
253
275
  `${options!['path']}${getFilePath(
254
276
  'oc-client',
@@ -19,7 +19,7 @@ import strings from '../../../resources';
19
19
  import * as urlBuilder from '../../domain/url-builder';
20
20
  import * as validator from '../../domain/validators';
21
21
  import type { Repository } from '../../domain/repository';
22
- import { Config } from '../../../types';
22
+ import { Component, Config } from '../../../types';
23
23
  import { IncomingHttpHeaders } from 'http';
24
24
  import { fromPromise } from 'universalify';
25
25
 
@@ -54,6 +54,10 @@ export interface GetComponentResult {
54
54
  };
55
55
  }
56
56
 
57
+ const noopConsole = Object.fromEntries(
58
+ Object.keys(console).map(key => [key, _.noop])
59
+ );
60
+
57
61
  export default function getComponent(conf: Config, repository: Repository) {
58
62
  const client = Client({ templates: conf.templates });
59
63
  const cache = new Cache({
@@ -61,6 +65,22 @@ export default function getComponent(conf: Config, repository: Repository) {
61
65
  refreshInterval: conf.refreshInterval
62
66
  });
63
67
 
68
+ const getEnv = async (
69
+ component: Component
70
+ ): Promise<Record<string, string>> => {
71
+ const cacheKey = `${component.name}/${component.version}/.env`;
72
+ const cached = cache.get('file-contents', cacheKey);
73
+
74
+ if (cached) return cached;
75
+
76
+ const env = component.oc.files.env
77
+ ? await repository.getEnv(component.name, component.version)
78
+ : {};
79
+ cache.set('file-contents', cacheKey, env);
80
+
81
+ return env;
82
+ };
83
+
64
84
  const renderer = function (
65
85
  options: RendererOptions,
66
86
  cb: (result: GetComponentResult) => void
@@ -411,136 +431,149 @@ export default function getComponent(conf: Config, repository: Repository) {
411
431
  if (!component.oc.files.dataProvider) {
412
432
  returnComponent(null, {});
413
433
  } else {
414
- const cacheKey = `${component.name}/${component.version}/server.js`;
415
- const cached = cache.get('file-contents', cacheKey);
416
- const domain = Domain.create();
417
- const setEmptyResponse =
418
- emptyResponseHandler.contextDecorator(returnComponent);
419
- const contextObj = {
420
- acceptLanguage: acceptLanguageParser.parse(acceptLanguage!),
421
- baseUrl: conf.baseUrl,
422
- env: conf.env,
423
- params,
424
- plugins: conf.plugins,
425
- renderComponent: fromPromise(nestedRenderer.renderComponent),
426
- renderComponents: fromPromise(nestedRenderer.renderComponents),
427
- requestHeaders: options.headers,
428
- requestIp: options.ip,
429
- setEmptyResponse,
430
- staticPath: repository
431
- .getStaticFilePath(component.name, component.version, '')
432
- .replace('https:', ''),
433
- setHeader: (header?: string, value?: string) => {
434
- if (!(typeof header === 'string' && typeof value === 'string')) {
435
- throw strings.errors.registry
436
- .COMPONENT_SET_HEADER_PARAMETERS_NOT_VALID;
437
- }
438
-
439
- if (header && value) {
440
- responseHeaders = responseHeaders || {};
441
- responseHeaders[header.toLowerCase()] = value;
442
- }
443
- },
444
- templates: repository.getTemplatesInfo()
445
- };
446
-
447
- const setCallbackTimeout = () => {
448
- const executionTimeout = conf.executionTimeout;
449
- if (executionTimeout) {
450
- setTimeout(() => {
451
- const message = `timeout (${executionTimeout * 1000}ms)`;
452
- returnComponent({ message }, undefined);
453
- domain.exit();
454
- }, executionTimeout * 1000);
434
+ fromPromise(getEnv)(component, (err, env) => {
435
+ if (err) {
436
+ componentCallbackDone = true;
437
+
438
+ return callback({
439
+ status: 502,
440
+ response: {
441
+ code: 'ENV_RESOLVING_ERROR',
442
+ error: strings.errors.registry.RESOLVING_ERROR
443
+ }
444
+ });
455
445
  }
456
- };
457
446
 
458
- if (!!cached && !conf.hotReloading) {
459
- domain.on('error', returnComponent);
447
+ const cacheKey = `${component.name}/${component.version}/server.js`;
448
+ const cached = cache.get('file-contents', cacheKey);
449
+ const domain = Domain.create();
450
+ const setEmptyResponse =
451
+ emptyResponseHandler.contextDecorator(returnComponent);
452
+ const contextObj = {
453
+ acceptLanguage: acceptLanguageParser.parse(acceptLanguage!),
454
+ baseUrl: conf.baseUrl,
455
+ env: { ...conf.env, ...env },
456
+ params,
457
+ plugins: conf.plugins,
458
+ renderComponent: fromPromise(nestedRenderer.renderComponent),
459
+ renderComponents: fromPromise(nestedRenderer.renderComponents),
460
+ requestHeaders: options.headers,
461
+ requestIp: options.ip,
462
+ setEmptyResponse,
463
+ staticPath: repository
464
+ .getStaticFilePath(component.name, component.version, '')
465
+ .replace('https:', ''),
466
+ setHeader: (header?: string, value?: string) => {
467
+ if (
468
+ !(typeof header === 'string' && typeof value === 'string')
469
+ ) {
470
+ throw strings.errors.registry
471
+ .COMPONENT_SET_HEADER_PARAMETERS_NOT_VALID;
472
+ }
460
473
 
461
- try {
462
- domain.run(() => {
463
- cached(contextObj, returnComponent);
464
- setCallbackTimeout();
465
- });
466
- } catch (e) {
467
- return returnComponent(e, undefined);
468
- }
469
- } else {
470
- fromPromise(repository.getDataProvider)(
471
- component.name,
472
- component.version,
473
- (err, dataProvider) => {
474
- if (err) {
475
- componentCallbackDone = true;
476
-
477
- return callback({
478
- status: 502,
479
- response: {
480
- code: 'DATA_RESOLVING_ERROR',
481
- error: strings.errors.registry.RESOLVING_ERROR
482
- }
483
- });
474
+ if (header && value) {
475
+ responseHeaders = responseHeaders || {};
476
+ responseHeaders[header.toLowerCase()] = value;
484
477
  }
478
+ },
479
+ templates: repository.getTemplatesInfo()
480
+ };
485
481
 
486
- const context = {
487
- require: RequireWrapper(conf.dependencies),
488
- module: {
489
- exports: {} as Record<
490
- string,
491
- (...args: unknown[]) => unknown
492
- >
493
- },
494
- console: conf.local ? console : { log: _.noop },
495
- setTimeout,
496
- Buffer
497
- };
498
-
499
- const handleError = (err: {
500
- code: string;
501
- missing: string[];
502
- }) => {
503
- if (err.code === 'DEPENDENCY_MISSING_FROM_REGISTRY') {
482
+ const setCallbackTimeout = () => {
483
+ const executionTimeout = conf.executionTimeout;
484
+ if (executionTimeout) {
485
+ setTimeout(() => {
486
+ const message = `timeout (${executionTimeout * 1000}ms)`;
487
+ returnComponent({ message }, undefined);
488
+ domain.exit();
489
+ }, executionTimeout * 1000);
490
+ }
491
+ };
492
+
493
+ if (!!cached && !conf.hotReloading) {
494
+ domain.on('error', returnComponent);
495
+
496
+ try {
497
+ domain.run(() => {
498
+ cached(contextObj, returnComponent);
499
+ setCallbackTimeout();
500
+ });
501
+ } catch (e) {
502
+ return returnComponent(e, undefined);
503
+ }
504
+ } else {
505
+ fromPromise(repository.getDataProvider)(
506
+ component.name,
507
+ component.version,
508
+ (err, dataProvider) => {
509
+ if (err) {
504
510
  componentCallbackDone = true;
505
511
 
506
512
  return callback({
507
- status: 501,
513
+ status: 502,
508
514
  response: {
509
- code: err.code,
510
- error: strings.errors.registry.DEPENDENCY_NOT_FOUND(
511
- err.missing.join(', ')
512
- ),
513
- missingDependencies: err.missing
515
+ code: 'DATA_RESOLVING_ERROR',
516
+ error: strings.errors.registry.RESOLVING_ERROR
514
517
  }
515
518
  });
516
519
  }
517
520
 
518
- returnComponent(err, undefined);
519
- };
520
-
521
- const options = conf.local
522
- ? {
523
- displayErrors: true,
524
- filename: dataProvider.filePath
521
+ const context = {
522
+ require: RequireWrapper(conf.dependencies),
523
+ module: {
524
+ exports: {} as Record<string, (...args: any[]) => any>
525
+ },
526
+ console: conf.local ? console : noopConsole,
527
+ setTimeout,
528
+ Buffer
529
+ };
530
+
531
+ const handleError = (err: {
532
+ code: string;
533
+ missing: string[];
534
+ }) => {
535
+ if (err.code === 'DEPENDENCY_MISSING_FROM_REGISTRY') {
536
+ componentCallbackDone = true;
537
+
538
+ return callback({
539
+ status: 501,
540
+ response: {
541
+ code: err.code,
542
+ error: strings.errors.registry.DEPENDENCY_NOT_FOUND(
543
+ err.missing.join(', ')
544
+ ),
545
+ missingDependencies: err.missing
546
+ }
547
+ });
525
548
  }
526
- : {};
527
549
 
528
- try {
529
- vm.runInNewContext(dataProvider.content, context, options);
530
- const processData = context.module.exports['data'];
531
- cache.set('file-contents', cacheKey, processData);
550
+ returnComponent(err, undefined);
551
+ };
532
552
 
533
- domain.on('error', handleError);
534
- domain.run(() => {
535
- processData(contextObj, returnComponent);
536
- setCallbackTimeout();
537
- });
538
- } catch (err) {
539
- handleError(err as any);
553
+ const options = conf.local
554
+ ? {
555
+ displayErrors: true,
556
+ filename: dataProvider.filePath
557
+ }
558
+ : {};
559
+
560
+ try {
561
+ vm.runInNewContext(dataProvider.content, context, options);
562
+ const processData = context.module.exports['data'];
563
+ cache.set('file-contents', cacheKey, processData);
564
+
565
+ domain.on('error', handleError);
566
+ domain.run(() => {
567
+ processData(contextObj, returnComponent);
568
+ setCallbackTimeout();
569
+ });
570
+ } catch (err) {
571
+ handleError(err as any);
572
+ }
540
573
  }
541
- }
542
- );
543
- }
574
+ );
575
+ }
576
+ });
544
577
  }
545
578
  }
546
579
  );
package/src/types.ts CHANGED
@@ -79,6 +79,7 @@ interface OcConfiguration {
79
79
  type: string;
80
80
  version: string;
81
81
  };
82
+ env?: string;
82
83
  };
83
84
  packaged: boolean;
84
85
  parameters: Record<string, OcParameter>;