@transitive-sdk/utils-caps 0.2.0 → 0.2.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/esbuild.js +7 -2
- package/package.json +1 -1
package/esbuild.js
CHANGED
|
@@ -2,13 +2,18 @@ const esbuild = require('esbuild');
|
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const { execSync } = require('child_process');
|
|
4
4
|
|
|
5
|
-
const { getPackageVersionNamespace } = require('@transitive-sdk/utils');
|
|
5
|
+
const { getLogger, getPackageVersionNamespace } = require('@transitive-sdk/utils');
|
|
6
6
|
|
|
7
7
|
if (!process.env.npm_package_version || !process.env.npm_package_name) {
|
|
8
8
|
console.error('This build script must be run from npm.');
|
|
9
9
|
process.exit(1);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
const capability =
|
|
13
|
+
`${process.env.npm_package_name}@${process.env.npm_package_version}`;
|
|
14
|
+
const log = getLogger(capability);
|
|
15
|
+
log.setLevel('info');
|
|
16
|
+
|
|
12
17
|
const entryPoints = fs.readdirSync('./web', {withFileTypes: true})
|
|
13
18
|
.filter(item => !item.isDirectory())
|
|
14
19
|
.filter(item => !item.isSymbolicLink())
|
|
@@ -43,7 +48,7 @@ const config = {
|
|
|
43
48
|
name: 'rebuild-notify',
|
|
44
49
|
setup(build) {
|
|
45
50
|
build.onEnd(result => {
|
|
46
|
-
|
|
51
|
+
log.info(build.initialOptions.format,
|
|
47
52
|
`build ended with ${result.errors.length} errors`);
|
|
48
53
|
|
|
49
54
|
const dir = `/tmp/caps/${process.env.npm_package_name}`;
|