refactor: refs#6706 root dir clean, minimist dep removed
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
8e8ee39302
commit
f18191d6e9
|
@ -19,10 +19,11 @@ services:
|
||||||
back:
|
back:
|
||||||
image: registry.verdnatura.es/salix-back:${VERSION:?}
|
image: registry.verdnatura.es/salix-back:${VERSION:?}
|
||||||
build: .
|
build: .
|
||||||
|
dockerfile: back/Dockerfile
|
||||||
environment:
|
environment:
|
||||||
|
- TZ
|
||||||
- NODE_ENV
|
- NODE_ENV
|
||||||
- DEBUG
|
- DEBUG
|
||||||
- TZ
|
|
||||||
ports:
|
ports:
|
||||||
- 3000
|
- 3000
|
||||||
configs:
|
configs:
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
/* eslint-disable no-console */
|
||||||
require('@babel/register')({presets: ['@babel/env']});
|
require('@babel/register')({presets: ['@babel/env']});
|
||||||
require('core-js/stable');
|
require('core-js/stable');
|
||||||
require('regenerator-runtime/runtime');
|
require('regenerator-runtime/runtime');
|
||||||
require('vn-loopback/server/boot/date')();
|
require('vn-loopback/server/boot/date')();
|
||||||
|
const getopts = require('getopts');
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const Myt = require('@verdnatura/myt/myt');
|
const Myt = require('@verdnatura/myt/myt');
|
||||||
|
@ -18,12 +20,16 @@ process.on('warning', warning => {
|
||||||
});
|
});
|
||||||
|
|
||||||
async function test() {
|
async function test() {
|
||||||
if (process.argv[2] === 'show')
|
const opts = getopts(process.argv.slice(2), {
|
||||||
process.env.E2E_SHOW = true;
|
boolean: ['show']
|
||||||
|
});
|
||||||
|
process.env.E2E_SHOW = opts.show;
|
||||||
|
|
||||||
|
console.log('Building and running DB container.');
|
||||||
const myt = new Myt();
|
const myt = new Myt();
|
||||||
await myt.init({workspace: path.join(__dirname, '../..')});
|
await myt.init({workspace: path.join(__dirname, '../..')});
|
||||||
await myt.run(Run);
|
await myt.run(Run);
|
||||||
|
await myt.deinit();
|
||||||
|
|
||||||
const Jasmine = require('jasmine');
|
const Jasmine = require('jasmine');
|
||||||
const jasmine = new Jasmine();
|
const jasmine = new Jasmine();
|
||||||
|
@ -70,12 +76,10 @@ async function test() {
|
||||||
|
|
||||||
jasmine.jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
|
jasmine.jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
|
||||||
await jasmine.execute();
|
await jasmine.execute();
|
||||||
|
|
||||||
await myt.deinit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function backendStatus() {
|
async function backendStatus() {
|
||||||
log('Awaiting backend connection...');
|
log('Awaiting backend connection.');
|
||||||
|
|
||||||
const milliseconds = 1000;
|
const milliseconds = 1000;
|
||||||
const maxAttempts = 10;
|
const maxAttempts = 10;
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
import 'angular';
|
import 'angular';
|
||||||
import 'angular-mocks';
|
import 'angular-mocks';
|
||||||
import core from './front/core/module.js';
|
import core from './core/module.js';
|
||||||
import './front/salix/components/app/app.js';
|
import './salix/components/app/app.js';
|
||||||
import './modules/zone/front/module.js';
|
import '../modules/zone/front/module.js';
|
||||||
import './modules/claim/front/module.js';
|
import '../modules/claim/front/module.js';
|
||||||
import './modules/client/front/module.js';
|
import '../modules/client/front/module.js';
|
||||||
import './modules/invoiceOut/front/module.js';
|
import '../modules/invoiceOut/front/module.js';
|
||||||
import './modules/invoiceIn/front/module.js';
|
import '../modules/invoiceIn/front/module.js';
|
||||||
import './modules/item/front/module.js';
|
import '../modules/item/front/module.js';
|
||||||
import './modules/order/front/module.js';
|
import '../modules/order/front/module.js';
|
||||||
import './modules/route/front/module.js';
|
import '../modules/route/front/module.js';
|
||||||
import './modules/ticket/front/module.js';
|
import '../modules/ticket/front/module.js';
|
||||||
import './modules/travel/front/module.js';
|
import '../modules/travel/front/module.js';
|
||||||
import './modules/worker/front/module.js';
|
import '../modules/worker/front/module.js';
|
||||||
import './modules/shelving/front/module.js';
|
import '../modules/shelving/front/module.js';
|
||||||
import 'vn-loopback/server/boot/date';
|
import 'vn-loopback/server/boot/date';
|
||||||
|
|
||||||
// Set NODE_ENV
|
// Set NODE_ENV
|
|
@ -2,7 +2,6 @@
|
||||||
require('require-yaml');
|
require('require-yaml');
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const PluginError = require('plugin-error');
|
const PluginError = require('plugin-error');
|
||||||
const argv = require('minimist')(process.argv.slice(2));
|
|
||||||
const log = require('fancy-log');
|
const log = require('fancy-log');
|
||||||
const Myt = require('@verdnatura/myt/myt');
|
const Myt = require('@verdnatura/myt/myt');
|
||||||
const Run = require('@verdnatura/myt/myt-run');
|
const Run = require('@verdnatura/myt/myt-run');
|
||||||
|
@ -12,9 +11,6 @@ const Start = require('@verdnatura/myt/myt-start');
|
||||||
|
|
||||||
let isWindows = /^win/.test(process.platform);
|
let isWindows = /^win/.test(process.platform);
|
||||||
|
|
||||||
if (argv.NODE_ENV)
|
|
||||||
process.env.NODE_ENV = argv.NODE_ENV;
|
|
||||||
|
|
||||||
let langs = ['es', 'en'];
|
let langs = ['es', 'en'];
|
||||||
let srcDir = './front';
|
let srcDir = './front';
|
||||||
let modulesDir = './modules';
|
let modulesDir = './modules';
|
||||||
|
|
|
@ -10,7 +10,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
testEnvironment: 'jsdom',
|
testEnvironment: 'jsdom',
|
||||||
setupFilesAfterEnv: [
|
setupFilesAfterEnv: [
|
||||||
'./jest-front.js'
|
'./front/jest-setup.js'
|
||||||
],
|
],
|
||||||
testMatch: [
|
testMatch: [
|
||||||
'**/front/**/*.spec.js',
|
'**/front/**/*.spec.js',
|
||||||
|
@ -37,7 +37,7 @@ module.exports = {
|
||||||
],
|
],
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'\\.(css|scss)$': 'identity-obj-proxy',
|
'\\.(css|scss)$': 'identity-obj-proxy',
|
||||||
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/fileMock.js',
|
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/front/jest-mock.js',
|
||||||
},
|
},
|
||||||
testURL: 'http://localhost',
|
testURL: 'http://localhost',
|
||||||
verbose: false,
|
verbose: false,
|
||||||
|
|
|
@ -90,7 +90,6 @@
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"json-loader": "^0.5.7",
|
"json-loader": "^0.5.7",
|
||||||
"merge-stream": "^1.0.1",
|
"merge-stream": "^1.0.1",
|
||||||
"minimist": "^1.2.5",
|
|
||||||
"node-sass": "^9.0.0",
|
"node-sass": "^9.0.0",
|
||||||
"nodemon": "^2.0.16",
|
"nodemon": "^2.0.16",
|
||||||
"plugin-error": "^1.0.1",
|
"plugin-error": "^1.0.1",
|
||||||
|
|
|
@ -232,9 +232,6 @@ devDependencies:
|
||||||
merge-stream:
|
merge-stream:
|
||||||
specifier: ^1.0.1
|
specifier: ^1.0.1
|
||||||
version: 1.0.1
|
version: 1.0.1
|
||||||
minimist:
|
|
||||||
specifier: ^1.2.5
|
|
||||||
version: 1.2.8
|
|
||||||
node-sass:
|
node-sass:
|
||||||
specifier: ^9.0.0
|
specifier: ^9.0.0
|
||||||
version: 9.0.0
|
version: 9.0.0
|
||||||
|
|
Loading…
Reference in New Issue