minimonolith 0.24.0 → 0.24.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/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "minimonolith",
3
3
  "type": "module",
4
- "version": "0.24.0",
4
+ "version": "0.24.1",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
7
7
  "scripts": {
8
8
  "start": "nodemon --inspect=0.0.0.0 ./server.js",
9
- "test": "NODE_OPTIONS=--experimental-vm-modules npx jest --coverage"
9
+ "test": "cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --coverage"
10
10
  },
11
11
  "keywords": [
12
12
  "lambda-api",
@@ -21,6 +21,7 @@
21
21
  "devDependencies": {
22
22
  "@aws-sdk/client-s3": "^3.304.0",
23
23
  "@aws-sdk/s3-request-presigner": "^3.304.0",
24
+ "cross-env": "^7.0.3",
24
25
  "cross-fetch": "^3.1.5",
25
26
  "dotenv": "^16.0.3",
26
27
  "jest": "^29.5.0",
@@ -1,5 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import url from 'url'
3
+ import path from 'path';
3
4
 
4
5
  import PATH_SERVICE from '../../path/index.js';
5
6
  import MODEL_SERVICE from '../../model/index.js';
@@ -12,14 +13,14 @@ import getAPI from '../get/index.js';
12
13
 
13
14
  const META_SERVICE_NAME = 'API', META_METHOD_NAME = 'POST_SERVICE';
14
15
 
15
- export default async (SERVICE_NAME, SRC_FOLDER='', MODULES_FOLDER='node_modules/') => {
16
+ export default async (SERVICE_NAME, SRC_FOLDER='', MODULES_FOLDER='node_modules' + path.sep) => {
16
17
 
17
18
  LOG_SERVICE.post(META_SERVICE_NAME, META_METHOD_NAME, SERVICE_NAME);
18
19
  getAPI().SERVICES[SERVICE_NAME] = {}; getAPI().VALIDATORS[SERVICE_NAME] = {};
19
20
  try {
20
21
 
21
- const projectRootPath = PATH_SERVICE.getProjectRoot(import.meta.url, MODULES_FOLDER)+'/';
22
- const projectRelativeServicePath = './' + SRC_FOLDER + `${SERVICE_NAME}/`;
22
+ const projectRootPath = PATH_SERVICE.getProjectRoot(import.meta.url, MODULES_FOLDER) + path.sep;
23
+ const projectRelativeServicePath = path.join('.', SRC_FOLDER, SERVICE_NAME) + path.sep;
23
24
  const SERVICE_URL = new URL(projectRelativeServicePath, projectRootPath);
24
25
  await MODEL_SERVICE.post(SERVICE_NAME, SERVICE_URL);
25
26
 
@@ -1,8 +1,9 @@
1
1
  import http from 'http';
2
+ import path from 'path';
2
3
 
3
4
  import getNodejsServerHandler from '../getNodejsServerHandler/index.js';
4
5
 
5
- export default async (ENV_FILE='.env', MODULE_FOLDER='node_modules/') => {
6
+ export default async (ENV_FILE='.env', MODULE_FOLDER='node_modules'+path.sep) => {
6
7
  (await import('../../environment/postEnvFile/index.js')).default(ENV_FILE, MODULE_FOLDER);
7
8
 
8
9
  return (lambdaHandler) => {