Gathering detailed insights and metrics for broccoli-debug
Gathering detailed insights and metrics for broccoli-debug
Gathering detailed insights and metrics for broccoli-debug
Gathering detailed insights and metrics for broccoli-debug
npm install broccoli-debug
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
9 Stars
65 Commits
4 Forks
7 Watching
18 Branches
6 Contributors
Updated on 07 May 2022
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-31.4%
19,972
Compared to previous day
Last week
-13%
122,094
Compared to previous week
Last month
15.7%
582,028
Compared to previous month
Last year
18.9%
8,276,493
Compared to previous year
Utility for build pipeline authors to allow trivial debugging of the Broccoli pipelines they author.
Heavily inspired by @stefanpenner's
broccoli-stew's debug
's helper,
but improved in a few ways:
.png
's as utf8
text).To allow consumers to debug the internals of various stages in your build pipeline,
you create a new instance of BroccoliDebug
and return it instead.
Something like this:
1var BroccoliDebug = require('broccoli-debug');
2
3let tree = new BroccoliDebug(input, `ember-engines:${this.name}:addon-input`);
Obviously, this would get quite verbose to do many times, so we have created a shortcut to easily create a number of debug trees with a shared prefix:
1let debugTree = BroccoliDebug.buildDebugCallback(`ember-engines:${this.name}`);
2
3let tree1 = debugTree(input1, 'addon-input');
4// tree1.debugLabel => 'ember-engines:<some-name>:addon-input'
5
6let tree2 = debugTree(input2, 'addon-output');
7// tree2.debugLabel => 'ember-engines:<some-name>:addon-output
Folks wanting to inspect the state of the build pipeline at that stage, would do the following:
1BROCCOLI_DEBUG=ember-engines:* ember b
Now you can take a look at the state of that input tree by:
1ls DEBUG/ember-engines/*
1interface BroccoliDebugOptions { 2 /** 3 The label to use for the debug folder. By default, will be placed in `DEBUG/*`. 4 */ 5 label: string 6 7 /** 8 The base directory to place the input node contents when debugging is enabled. 9 10 Chooses the default in this order: 11 12 * `process.env.BROCCOLI_DEBUG_PATH` 13 * `path.join(process.cwd(), 'DEBUG')` 14 */ 15 baseDir: string 16 17 /** 18 Should the tree be "always on" for debugging? This is akin to `debugger`, its very 19 useful while actively working on a build pipeline, but is likely something you would 20 remove before publishing. 21 */ 22 force?: boolean 23} 24 25class BroccoliDebug { 26 /** 27 Builds a callback function for easily generating `BroccoliDebug` instances 28 with a shared prefix. 29 */ 30 static buildDebugCallback(prefix: string): (node: any, labelOrOptions: string | BroccoliDebugOptions) => BroccoliNode 31 constructor(node: BroccoliNode, labelOrOptions: string | BroccoliDebugOptions); 32 debugLabel: string; 33}
git clone git@github.com:broccolijs/broccoli-debug.git
cd broccoli-debug
yarn
yarn test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 6/16 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
61 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More