| <!-- ********************* |
| DO NOT EDIT THIS FILE |
| It is a generated build output from Stardoc. |
| Instead you must edit the .bzl file where the rules are declared, |
| or possibly a markdown file next to the .bzl file |
| ********************* --> |
| |
| Public providers, aspects and helpers that are shipped in the built-in build_bazel_rules_nodejs repository. |
| |
| Users should not load files under "/internal" |
| |
| |
| ## ExternalNpmPackageInfo |
| |
| **USAGE** |
| |
| <pre> |
| ExternalNpmPackageInfo(<a href="#ExternalNpmPackageInfo-direct_sources">direct_sources</a>, <a href="#ExternalNpmPackageInfo-path">path</a>, <a href="#ExternalNpmPackageInfo-sources">sources</a>, <a href="#ExternalNpmPackageInfo-workspace">workspace</a>) |
| </pre> |
| |
| Provides information about one or more external npm packages |
| |
| **FIELDS** |
| |
| <h4 id="ExternalNpmPackageInfo-direct_sources">direct_sources</h4> |
| |
| Depset of direct source files in these external npm package(s) |
| <h4 id="ExternalNpmPackageInfo-path">path</h4> |
| |
| The local workspace path that these external npm deps should be linked at. If empty, they will be linked at the root. |
| <h4 id="ExternalNpmPackageInfo-sources">sources</h4> |
| |
| Depset of direct & transitive source files in these external npm package(s) and transitive dependencies |
| <h4 id="ExternalNpmPackageInfo-workspace">workspace</h4> |
| |
| The workspace name that these external npm package(s) are provided from |
| |
| |
| ## JSEcmaScriptModuleInfo |
| |
| **USAGE** |
| |
| <pre> |
| JSEcmaScriptModuleInfo(<a href="#JSEcmaScriptModuleInfo-direct_sources">direct_sources</a>, <a href="#JSEcmaScriptModuleInfo-sources">sources</a>) |
| </pre> |
| |
| JavaScript files (and sourcemaps) that are intended to be consumed by downstream tooling. |
| |
| They should use modern syntax and ESModules. |
| These files should typically be named "foo.mjs" |
| |
| Historical note: this was the typescript.es6_sources output |
| |
| **FIELDS** |
| |
| <h4 id="JSEcmaScriptModuleInfo-direct_sources">direct_sources</h4> |
| |
| Depset of direct JavaScript files and sourcemaps |
| <h4 id="JSEcmaScriptModuleInfo-sources">sources</h4> |
| |
| Depset of direct and transitive JavaScript files and sourcemaps |
| |
| |
| ## JSNamedModuleInfo |
| |
| **USAGE** |
| |
| <pre> |
| JSNamedModuleInfo(<a href="#JSNamedModuleInfo-direct_sources">direct_sources</a>, <a href="#JSNamedModuleInfo-sources">sources</a>) |
| </pre> |
| |
| JavaScript files whose module name is self-contained. |
| |
| For example named AMD/UMD or goog.module format. |
| These outputs should be named "foo.umd.js" |
| (note that renaming it from "foo.js" doesn't affect the module id) |
| |
| Historical note: this was the typescript.es5_sources output. |
| |
| |
| **FIELDS** |
| |
| <h4 id="JSNamedModuleInfo-direct_sources">direct_sources</h4> |
| |
| Depset of direct JavaScript files and sourcemaps |
| <h4 id="JSNamedModuleInfo-sources">sources</h4> |
| |
| Depset of direct and transitive JavaScript files and sourcemaps |
| |
| |
| ## NodeRuntimeDepsInfo |
| |
| **USAGE** |
| |
| <pre> |
| NodeRuntimeDepsInfo(<a href="#NodeRuntimeDepsInfo-deps">deps</a>, <a href="#NodeRuntimeDepsInfo-pkgs">pkgs</a>) |
| </pre> |
| |
| Stores runtime dependencies of a nodejs_binary or nodejs_test |
| |
| These are files that need to be found by the node module resolver at runtime. |
| |
| Historically these files were passed using the Runfiles mechanism. |
| However runfiles has a big performance penalty of creating a symlink forest |
| with FS API calls for every file in node_modules. |
| It also causes there to be separate node_modules trees under each binary. This |
| prevents user-contributed modules passed as deps[] to a particular action from |
| being found by node module resolver, which expects everything in one tree. |
| |
| In node, this resolution is done dynamically by assuming a node_modules |
| tree will exist on disk, so we assume node actions/binary/test executions will |
| do the same. |
| |
| |
| **FIELDS** |
| |
| <h4 id="NodeRuntimeDepsInfo-deps">deps</h4> |
| |
| depset of runtime dependency labels |
| <h4 id="NodeRuntimeDepsInfo-pkgs">pkgs</h4> |
| |
| list of labels of packages that provide ExternalNpmPackageInfo |
| |
| |
| ## js_ecma_script_module_info |
| |
| **USAGE** |
| |
| <pre> |
| js_ecma_script_module_info(<a href="#js_ecma_script_module_info-sources">sources</a>, <a href="#js_ecma_script_module_info-deps">deps</a>) |
| </pre> |
| |
| Constructs a JSEcmaScriptModuleInfo including all transitive sources from JSEcmaScriptModuleInfo providers in a list of deps. |
| |
| Returns a single JSEcmaScriptModuleInfo. |
| |
| **PARAMETERS** |
| |
| |
| <h4 id="js_ecma_script_module_info-sources">sources</h4> |
| |
| |
| |
| |
| <h4 id="js_ecma_script_module_info-deps">deps</h4> |
| |
| |
| Defaults to `[]` |
| |
| |
| ## js_named_module_info |
| |
| **USAGE** |
| |
| <pre> |
| js_named_module_info(<a href="#js_named_module_info-sources">sources</a>, <a href="#js_named_module_info-deps">deps</a>) |
| </pre> |
| |
| Constructs a JSNamedModuleInfo including all transitive sources from JSNamedModuleInfo providers in a list of deps. |
| |
| Returns a single JSNamedModuleInfo. |
| |
| **PARAMETERS** |
| |
| |
| <h4 id="js_named_module_info-sources">sources</h4> |
| |
| |
| |
| |
| <h4 id="js_named_module_info-deps">deps</h4> |
| |
| |
| Defaults to `[]` |
| |
| |
| ## run_node |
| |
| **USAGE** |
| |
| <pre> |
| run_node(<a href="#run_node-ctx">ctx</a>, <a href="#run_node-inputs">inputs</a>, <a href="#run_node-arguments">arguments</a>, <a href="#run_node-executable">executable</a>, <a href="#run_node-chdir">chdir</a>, <a href="#run_node-kwargs">kwargs</a>) |
| </pre> |
| |
| Helper to replace ctx.actions.run |
| |
| This calls node programs with a node_modules directory in place |
| |
| |
| **PARAMETERS** |
| |
| |
| <h4 id="run_node-ctx">ctx</h4> |
| |
| rule context from the calling rule implementation function |
| |
| |
| |
| <h4 id="run_node-inputs">inputs</h4> |
| |
| list or depset of inputs to the action |
| |
| |
| |
| <h4 id="run_node-arguments">arguments</h4> |
| |
| list or ctx.actions.Args object containing arguments to pass to the executable |
| |
| |
| |
| <h4 id="run_node-executable">executable</h4> |
| |
| stringy representation of the executable this action will run, eg eg. "my_executable" rather than ctx.executable.my_executable |
| |
| |
| |
| <h4 id="run_node-chdir">chdir</h4> |
| |
| directory we should change to be the working dir |
| |
| Defaults to `None` |
| |
| <h4 id="run_node-kwargs">kwargs</h4> |
| |
| all other args accepted by ctx.actions.run |
| |
| |
| |
| |
| ## node_modules_aspect |
| |
| **USAGE** |
| |
| <pre> |
| node_modules_aspect(<a href="#node_modules_aspect-name">name</a>) |
| </pre> |
| |
| |
| |
| **ASPECT ATTRIBUTES** |
| |
| <h4>deps</h4> |
| |
| **ATTRIBUTES** |
| |
| <h4 id="node_modules_aspect-name">name</h4> |
| |
| (*<a href="https://bazel.build/docs/build-ref.html#name">Name</a>, {util.mandatoryString(name: "name" |
| doc_string: "A unique name for this target." |
| type: NAME |
| mandatory: true |
| )}*) |
| A unique name for this target. |
| |
| |
| |