@elek-io/core 0.1.0 → 0.1.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/dist/index.js CHANGED
@@ -6,8 +6,7 @@ var __export = (target, all) => {
6
6
 
7
7
  // src/index.ts
8
8
  import {
9
- constructorElekIoCoreSchema,
10
- environmentSchema
9
+ constructorElekIoCoreSchema
11
10
  } from "@elek-io/shared";
12
11
  import Fs8 from "fs-extra";
13
12
 
@@ -2136,12 +2135,9 @@ var ProjectService = class extends AbstractCrudService {
2136
2135
  // src/index.ts
2137
2136
  var ElekIoCore = class {
2138
2137
  constructor(props) {
2139
- if (props) {
2140
- constructorElekIoCoreSchema.parse(props);
2141
- }
2142
- const environment = environmentSchema.parse(process.env.NODE_ENV);
2138
+ const parsedProps = constructorElekIoCoreSchema.parse(props);
2143
2139
  const defaults = {
2144
- environment,
2140
+ environment: "production",
2145
2141
  version: "0.0.0",
2146
2142
  file: {
2147
2143
  json: {
@@ -2149,7 +2145,7 @@ var ElekIoCore = class {
2149
2145
  }
2150
2146
  }
2151
2147
  };
2152
- this.options = Object.assign({}, defaults, props);
2148
+ this.options = Object.assign({}, defaults, parsedProps);
2153
2149
  this.jsonFileService = new JsonFileService(this.options);
2154
2150
  this.userService = new UserService(this.jsonFileService);
2155
2151
  this.gitService = new GitService2(this.options, this.userService);
@@ -2192,10 +2188,13 @@ var ElekIoCore = class {
2192
2188
  this.entryService,
2193
2189
  this.valueService
2194
2190
  );
2195
- if (environment !== "production") {
2196
- console.info(`Initializing inside an "${environment}" environment`, {
2197
- options: this.options
2198
- });
2191
+ if (this.options.environment !== "production") {
2192
+ console.info(
2193
+ `Initializing inside an "${this.options.environment}" environment`,
2194
+ {
2195
+ ...this.options
2196
+ }
2197
+ );
2199
2198
  }
2200
2199
  Fs8.mkdirpSync(pathTo.projects);
2201
2200
  Fs8.mkdirpSync(pathTo.tmp);