@onivoro/onix 20.5.60 → 20.5.62

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onivoro/onix",
3
- "version": "20.5.60",
3
+ "version": "20.5.62",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
@@ -3,9 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const load_env_file_function_1 = require("../../functions/load-env-file.function");
5
5
  const executor_factory_function_1 = require("../../functions/executor-factory.function");
6
- const child_process_1 = require("child_process");
7
- const os_1 = require("os");
8
6
  const interpolate_environment_expression_function_1 = require("../../functions/interpolate-environment-expression.function");
7
+ const child_process_1 = require("child_process");
9
8
  exports.default = (0, executor_factory_function_1.executorFactory)((options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
10
9
  const { envFile, host, db, password, port, user, type, httpPort } = options || {};
11
10
  if (envFile) {
@@ -13,18 +12,19 @@ exports.default = (0, executor_factory_function_1.executorFactory)((options, con
13
12
  }
14
13
  const http = (0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(httpPort);
15
14
  const literalHost = (0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(host);
16
- const resolvedHost = ['localhost', '127.0.0.1'].includes(literalHost) ? 'host.docker.internal' : literalHost;
17
- (0, child_process_1.execSync)(`docker` + ' ' + [
18
- 'run',
19
- `-p ${http}:${http}`,
20
- `--env="DV_HOST=${(0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(resolvedHost)}"`,
21
- `--env="DV_DB=${(0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(db)}"`,
22
- `--env="DV_PASSWORD=${(0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(password)}"`,
23
- `--env="DV_PORT=${(0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(port)}"`,
24
- `--env="DV_USER=${(0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(user)}"`,
25
- `--env="DV_TYPE=${(0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(type)}"`,
26
- `--env="PORT=${http}"`,
27
- `icedlee337/datavore:${((0, os_1.arch)() === 'arm64') ? 'arm64v8' : 'amd64'}`
28
- ].join(' '));
15
+ const env = {
16
+ DV_HOST: (0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(literalHost),
17
+ DV_DB: (0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(db),
18
+ DV_PASSWORD: (0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(password),
19
+ DV_PORT: (0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(port),
20
+ DV_USER: (0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(user),
21
+ DV_TYPE: (0, interpolate_environment_expression_function_1.interpolateEnvironmentExpression)(type),
22
+ PORT: http,
23
+ };
24
+ Object.entries(env)
25
+ .forEach(([key, value]) => {
26
+ process.env[key] = value;
27
+ });
28
+ (0, child_process_1.spawn)('npx', ['--yes', '@onivoro/app-server-datavore'], { env });
29
29
  }));
30
30
  //# sourceMappingURL=executor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/typeorm-db-client/executor.ts"],"names":[],"mappings":";;;AAEA,mFAAqE;AACrE,yFAA4E;AAC5E,iDAAyC;AACzC,2BAA0B;AAC1B,6HAA+G;AAE/G,kBAAe,IAAA,2CAAe,EAAC,CAC7B,OAAuB,EACvB,OAAwB,EACxB,EAAE;IACF,MAAM,EACJ,OAAO,EACP,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,EACT,GAAG,OAAO,IAAI,EAAE,CAAC;IAElB,IAAI,OAAO,EAAE,CAAC;QACZ,IAAA,oCAAW,EAAC,OAAO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