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:
|
||||
image: registry.verdnatura.es/salix-back:${VERSION:?}
|
||||
build: .
|
||||
dockerfile: back/Dockerfile
|
||||
environment:
|
||||
- TZ
|
||||
- NODE_ENV
|
||||
- DEBUG
|
||||
- TZ
|
||||
ports:
|
||||
- 3000
|
||||
configs:
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
/* eslint-disable no-console */
|
||||
require('@babel/register')({presets: ['@babel/env']});
|
||||
require('core-js/stable');
|
||||
require('regenerator-runtime/runtime');
|
||||
require('vn-loopback/server/boot/date')();
|
||||
const getopts = require('getopts');
|
||||
|
||||
const path = require('path');
|
||||
const Myt = require('@verdnatura/myt/myt');
|
||||
|
@ -18,12 +20,16 @@ process.on('warning', warning => {
|
|||
});
|
||||
|
||||
async function test() {
|
||||
if (process.argv[2] === 'show')
|
||||
process.env.E2E_SHOW = true;
|
||||
const opts = getopts(process.argv.slice(2), {
|
||||
boolean: ['show']
|
||||
});
|
||||
process.env.E2E_SHOW = opts.show;
|
||||
|
||||
console.log('Building and running DB container.');
|
||||
const myt = new Myt();
|
||||
await myt.init({workspace: path.join(__dirname, '../..')});
|
||||
await myt.run(Run);
|
||||
await myt.deinit();
|
||||
|
||||
const Jasmine = require('jasmine');
|
||||
const jasmine = new Jasmine();
|
||||
|
@ -70,12 +76,10 @@ async function test() {
|
|||
|
||||
jasmine.jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
|
||||
await jasmine.execute();
|
||||
|
||||
await myt.deinit();
|
||||
}
|
||||
|
||||
async function backendStatus() {
|
||||
log('Awaiting backend connection...');
|
||||
log('Awaiting backend connection.');
|
||||
|
||||
const milliseconds = 1000;
|
||||
const maxAttempts = 10;
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import 'angular';
|
||||
import 'angular-mocks';
|
||||
import core from './front/core/module.js';
|
||||
import './front/salix/components/app/app.js';
|
||||
import './modules/zone/front/module.js';
|
||||
import './modules/claim/front/module.js';
|
||||
import './modules/client/front/module.js';
|
||||
import './modules/invoiceOut/front/module.js';
|
||||
import './modules/invoiceIn/front/module.js';
|
||||
import './modules/item/front/module.js';
|
||||
import './modules/order/front/module.js';
|
||||
import './modules/route/front/module.js';
|
||||
import './modules/ticket/front/module.js';
|
||||
import './modules/travel/front/module.js';
|
||||
import './modules/worker/front/module.js';
|
||||
import './modules/shelving/front/module.js';
|
||||
import core from './core/module.js';
|
||||
import './salix/components/app/app.js';
|
||||
import '../modules/zone/front/module.js';
|
||||
import '../modules/claim/front/module.js';
|
||||
import '../modules/client/front/module.js';
|
||||
import '../modules/invoiceOut/front/module.js';
|
||||
import '../modules/invoiceIn/front/module.js';
|
||||
import '../modules/item/front/module.js';
|
||||
import '../modules/order/front/module.js';
|
||||
import '../modules/route/front/module.js';
|
||||
import '../modules/ticket/front/module.js';
|
||||
import '../modules/travel/front/module.js';
|
||||
import '../modules/worker/front/module.js';
|
||||
import '../modules/shelving/front/module.js';
|
||||
import 'vn-loopback/server/boot/date';
|
||||
|
||||
// Set NODE_ENV
|
|
@ -2,7 +2,6 @@
|
|||
require('require-yaml');
|
||||
const gulp = require('gulp');
|
||||
const PluginError = require('plugin-error');
|
||||
const argv = require('minimist')(process.argv.slice(2));
|
||||
const log = require('fancy-log');
|
||||
const Myt = require('@verdnatura/myt/myt');
|
||||
const Run = require('@verdnatura/myt/myt-run');
|
||||
|
@ -12,9 +11,6 @@ const Start = require('@verdnatura/myt/myt-start');
|
|||
|
||||
let isWindows = /^win/.test(process.platform);
|
||||
|
||||
if (argv.NODE_ENV)
|
||||
process.env.NODE_ENV = argv.NODE_ENV;
|
||||
|
||||
let langs = ['es', 'en'];
|
||||
let srcDir = './front';
|
||||
let modulesDir = './modules';
|
||||
|
|
|
@ -10,7 +10,7 @@ module.exports = {
|
|||
},
|
||||
testEnvironment: 'jsdom',
|
||||
setupFilesAfterEnv: [
|
||||
'./jest-front.js'
|
||||
'./front/jest-setup.js'
|
||||
],
|
||||
testMatch: [
|
||||
'**/front/**/*.spec.js',
|
||||
|
@ -37,7 +37,7 @@ module.exports = {
|
|||
],
|
||||
moduleNameMapper: {
|
||||
'\\.(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',
|
||||
verbose: false,
|
||||
|
|
|
@ -90,7 +90,6 @@
|
|||
"js-yaml": "^4.1.0",
|
||||
"json-loader": "^0.5.7",
|
||||
"merge-stream": "^1.0.1",
|
||||
"minimist": "^1.2.5",
|
||||
"node-sass": "^9.0.0",
|
||||
"nodemon": "^2.0.16",
|
||||
"plugin-error": "^1.0.1",
|
||||
|
|
|
@ -232,9 +232,6 @@ devDependencies:
|
|||
merge-stream:
|
||||
specifier: ^1.0.1
|
||||
version: 1.0.1
|
||||
minimist:
|
||||
specifier: ^1.2.5
|
||||
version: 1.2.8
|
||||
node-sass:
|
||||
specifier: ^9.0.0
|
||||
version: 9.0.0
|
||||
|
|
Loading…
Reference in New Issue