fix(core):

This commit is contained in:
Philipp Kunz 2019-05-06 14:00:21 +02:00
parent a5d1927dcb
commit ae375e30e3
6 changed files with 143 additions and 2 deletions

109
package-lock.json generated
View File

@ -1343,12 +1343,23 @@
},
"@pushrocks/smartlog": {
"version": "2.0.19",
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog/-/smartlog-2.0.19.tgz",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog/-/smartlog-2.0.19.tgz",
"integrity": "sha512-I2mDx7WcUlADYWxu5nNP3NSJv95YrCZoG/rarbEqovK7pJQ9a0aINmIcCHkQeL1VSWvxgvhXwHyV/yNEJ4zh3Q==",
"requires": {
"@pushrocks/smartlog-interfaces": "^2.0.5"
}
},
"@pushrocks/smartlog-destination-local": {
"version": "7.0.5",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-destination-local/-/smartlog-destination-local-7.0.5.tgz",
"integrity": "sha512-++SVz8hkCtqmMdK74YaooHUyrijxEmUy2XehAi2aoV8AZKo7wi/oke84vEG3Zc+4t6tnfujnnGhJTp6J2scMbA==",
"requires": {
"@pushrocks/consolecolor": "^2.0.1",
"@pushrocks/smartlog-interfaces": "^2.0.2",
"@pushrocks/smartpromise": "^2.0.5",
"ora": "^3.0.0"
}
},
"@pushrocks/smartlog-interfaces": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog-interfaces/-/smartlog-interfaces-2.0.5.tgz",
@ -1847,6 +1858,19 @@
}
}
},
"cli-cursor": {
"version": "2.1.0",
"resolved": "https://verdaccio.lossless.one/cli-cursor/-/cli-cursor-2.1.0.tgz",
"integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
"requires": {
"restore-cursor": "^2.0.0"
}
},
"cli-spinners": {
"version": "2.1.0",
"resolved": "https://verdaccio.lossless.one/cli-spinners/-/cli-spinners-2.1.0.tgz",
"integrity": "sha512-8B00fJOEh1HPrx4fo5eW16XmE1PcL1tGpGrxy63CXGP9nHdPBN63X75hA1zhvQuhVztJWLqV58Roj2qlNM7cAA=="
},
"cliui": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
@ -2032,6 +2056,21 @@
"type-detect": "^4.0.0"
}
},
"defaults": {
"version": "1.0.3",
"resolved": "https://verdaccio.lossless.one/defaults/-/defaults-1.0.3.tgz",
"integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
"requires": {
"clone": "^1.0.2"
},
"dependencies": {
"clone": {
"version": "1.0.4",
"resolved": "https://verdaccio.lossless.one/clone/-/clone-1.0.4.tgz",
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4="
}
}
},
"define-property": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
@ -2671,6 +2710,14 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
"log-symbols": {
"version": "2.2.0",
"resolved": "https://verdaccio.lossless.one/log-symbols/-/log-symbols-2.2.0.tgz",
"integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
"requires": {
"chalk": "^2.0.1"
}
},
"loose-envify": {
"version": "1.4.0",
"resolved": "https://verdaccio.lossless.one/loose-envify/-/loose-envify-1.4.0.tgz",
@ -2938,6 +2985,49 @@
"wrappy": "1"
}
},
"onetime": {
"version": "2.0.1",
"resolved": "https://verdaccio.lossless.one/onetime/-/onetime-2.0.1.tgz",
"integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
"requires": {
"mimic-fn": "^1.0.0"
},
"dependencies": {
"mimic-fn": {
"version": "1.2.0",
"resolved": "https://verdaccio.lossless.one/mimic-fn/-/mimic-fn-1.2.0.tgz",
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
}
}
},
"ora": {
"version": "3.4.0",
"resolved": "https://verdaccio.lossless.one/ora/-/ora-3.4.0.tgz",
"integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==",
"requires": {
"chalk": "^2.4.2",
"cli-cursor": "^2.1.0",
"cli-spinners": "^2.0.0",
"log-symbols": "^2.2.0",
"strip-ansi": "^5.2.0",
"wcwidth": "^1.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://verdaccio.lossless.one/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://verdaccio.lossless.one/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
}
}
},
"os-locale": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
@ -3186,6 +3276,15 @@
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
"integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
},
"restore-cursor": {
"version": "2.0.0",
"resolved": "https://verdaccio.lossless.one/restore-cursor/-/restore-cursor-2.0.0.tgz",
"integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
"requires": {
"onetime": "^2.0.0",
"signal-exit": "^3.0.2"
}
},
"ret": {
"version": "0.1.15",
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
@ -3869,6 +3968,14 @@
"vinyl": "^2.0.1"
}
},
"wcwidth": {
"version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/wcwidth/-/wcwidth-1.0.1.tgz",
"integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
"requires": {
"defaults": "^1.0.3"
}
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",

View File

@ -33,6 +33,8 @@
"@babel/runtime": "^7.4.4",
"@pushrocks/early": "^3.0.3",
"@pushrocks/smartcli": "^3.0.7",
"@pushrocks/smartlog": "^2.0.19",
"@pushrocks/smartlog-destination-local": "^7.0.5",
"rollup": "^1.10.1",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^9.3.4",

View File

@ -2,7 +2,8 @@ import { expect, tap } from '@pushrocks/tapbundle';
import * as tsbundle from '../ts/index';
tap.test('first test', async () => {
console.log(tsbundle.standardExport);
tsbundle;
console.log('hi');
});
tap.start();

View File

@ -1,4 +1,8 @@
import * as early from '@pushrocks/early';
early.start('tsbundle');
import * as plugins from './tsbundle.plugins';
import { logger } from './tsbundle.logger';
early.stop();
const rollupOptions: plugins.rollup.RollupOptions = {
input: `ts_web/index.ts`,
@ -72,9 +76,11 @@ const rollupOptions: plugins.rollup.RollupOptions = {
async function build() {
// create a bundle
logger.log('info', `starting bundling now!`);
const bundle = await plugins.rollup.rollup(rollupOptions);
bundle.generate(rollupOptions.output);
bundle.write(rollupOptions.output);
logger.log('ok', `Successfully bundled files!`);
}
build();

15
ts/tsbundle.logger.ts Normal file
View File

@ -0,0 +1,15 @@
import * as plugins from './tsbundle.plugins';
export const logger = new plugins.smartlog.Smartlog({
logContext: {
company: 'Some Company',
companyunit: 'Some CompanyUnit',
containerName: 'Some Containername',
environment: "local",
runtime: 'node',
zone: 'gitzone'
},
minimumLogLevel: 'silly'
});
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());

View File

@ -1,3 +1,13 @@
// pushrocks scope
import * as smartlog from '@pushrocks/smartlog';
import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local';
export {
smartlog,
smartlogDestinationLocal
}
// third party scope
import * as rollup from 'rollup';
import rollupBabel from 'rollup-plugin-babel';
import rollupCommonjs from 'rollup-plugin-commonjs';