@atlaspack/utils 2.15.3 → 2.15.4-dev-eae8c193d.0
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/LICENSE +201 -0
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -1
- package/package.json +10 -9
- package/src/debug-tools.js +45 -0
- package/src/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/utils",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.4-dev-eae8c193d.0",
|
|
4
4
|
"description": "Blazing fast, zero configuration web application bundler",
|
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
|
6
6
|
"publishConfig": {
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaspack/codeframe": "2.13.
|
|
34
|
-
"@atlaspack/diagnostic": "2.14.
|
|
35
|
-
"@atlaspack/feature-flags": "2.18.
|
|
36
|
-
"@atlaspack/logger": "2.14.
|
|
37
|
-
"@atlaspack/markdown-ansi": "2.14.
|
|
38
|
-
"@atlaspack/rust": "3.3.
|
|
33
|
+
"@atlaspack/codeframe": "2.13.4-dev-eae8c193d.0",
|
|
34
|
+
"@atlaspack/diagnostic": "2.14.2-dev-eae8c193d.0",
|
|
35
|
+
"@atlaspack/feature-flags": "2.18.4-dev-eae8c193d.0",
|
|
36
|
+
"@atlaspack/logger": "2.14.12-dev-eae8c193d.0",
|
|
37
|
+
"@atlaspack/markdown-ansi": "2.14.2-dev-eae8c193d.0",
|
|
38
|
+
"@atlaspack/rust": "3.3.6-dev-eae8c193d.0",
|
|
39
39
|
"@parcel/source-map": "^2.1.1",
|
|
40
40
|
"chalk": "^4.1.0",
|
|
41
41
|
"nullthrows": "^1.1.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@atlaspack/babel-register": "2.14.
|
|
44
|
+
"@atlaspack/babel-register": "2.14.2-dev-eae8c193d.0",
|
|
45
45
|
"@iarna/toml": "^2.2.0",
|
|
46
46
|
"ansi-html-community": "0.0.8",
|
|
47
47
|
"benny": "^3.7.1",
|
|
@@ -67,5 +67,6 @@
|
|
|
67
67
|
"./src/openInBrowser.js": false,
|
|
68
68
|
"@atlaspack/markdown-ansi": false
|
|
69
69
|
},
|
|
70
|
-
"type": "commonjs"
|
|
70
|
+
"type": "commonjs",
|
|
71
|
+
"gitHead": "eae8c193d1b12309f6377859a2da6a352b329f3d"
|
|
71
72
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* These tools are intended for Atlaspack developers, to provide extra utilities
|
|
5
|
+
* to make debugging Atlaspack issues more straightforward.
|
|
6
|
+
*
|
|
7
|
+
* To enable a tool, set the `ATLASPACK_DEBUG_TOOLS` environment variable to a
|
|
8
|
+
* comma-separated list of tool names. For example:
|
|
9
|
+
* `ATLASPACK_DEBUG_TOOLS="asset-file-names-in-output,simple-cli-reporter"`
|
|
10
|
+
*
|
|
11
|
+
* You can enable all tools by setting `ATLASPACK_DEBUG_TOOLS=all`.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
type DebugTools = {|
|
|
15
|
+
'asset-file-names-in-output': boolean,
|
|
16
|
+
'simple-cli-reporter': boolean,
|
|
17
|
+
|};
|
|
18
|
+
|
|
19
|
+
export let debugTools: DebugTools = {
|
|
20
|
+
'asset-file-names-in-output': false,
|
|
21
|
+
'simple-cli-reporter': false,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const envVarValue = process.env.ATLASPACK_DEBUG_TOOLS ?? '';
|
|
25
|
+
|
|
26
|
+
for (let tool of envVarValue.split(',')) {
|
|
27
|
+
tool = tool.trim();
|
|
28
|
+
|
|
29
|
+
if (tool === 'all') {
|
|
30
|
+
for (let key in debugTools) {
|
|
31
|
+
debugTools[key] = true;
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
} else if (debugTools.hasOwnProperty(tool)) {
|
|
35
|
+
debugTools[tool] = true;
|
|
36
|
+
} else if (tool === '') {
|
|
37
|
+
continue;
|
|
38
|
+
} else {
|
|
39
|
+
throw new Error(
|
|
40
|
+
`Invalid debug tool option: ${tool}. Valid options are: ${Object.keys(
|
|
41
|
+
debugTools,
|
|
42
|
+
).join(', ')}`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
package/src/index.js
CHANGED
|
@@ -48,6 +48,7 @@ export {
|
|
|
48
48
|
loadConfig,
|
|
49
49
|
readConfig,
|
|
50
50
|
} from './config';
|
|
51
|
+
export {debugTools} from './debug-tools';
|
|
51
52
|
export {DefaultMap, DefaultWeakMap} from './DefaultMap';
|
|
52
53
|
export {makeDeferredWithPromise} from './Deferred';
|
|
53
54
|
export {getProgressMessage} from './progress-message';
|