Skip to main content
Glama
js_providers.bzl2.07 kB
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under both the MIT license found in the # LICENSE-MIT file in the root directory of this source tree and the Apache # License, Version 2.0 found in the LICENSE-APACHE file in the root directory # of this source tree. def _artifacts(value: Artifact): return value TransitiveOutputsTSet = transitive_set(args_projections = {"artifacts": _artifacts}) JsLibraryInfo = provider( fields = { "output": provider_field(typing.Any, default = None), # "artifact" "transitive_outputs": provider_field(typing.Any, default = None), # ["TransitiveOutputsTSet", None] }, ) JsBundleInfo = provider( # @unsorted-dict-items fields = { "bundle_name": provider_field(typing.Any, default = None), # str # Directory containing the built JavaScript. "built_js": provider_field(typing.Any, default = None), # "artifact", # Source map belonging to the built JavaScript. "source_map": provider_field(typing.Any, default = None), # "artifact", # Directory containing the resources (or assets) used by the bundled JavaScript source code. "res": provider_field(typing.Any, default = None), # ["artifact", None] # Directory containing various metadata that can be used by dependent rules but are not # meant to be shipped with the application. "misc": provider_field(typing.Any, default = None), # "artifact" # Dependencies graph file associated with the built JavaScript. "dependencies_file": provider_field(typing.Any, default = None), # "artifact" }, ) def get_transitive_outputs( actions: AnalysisActions, value: Artifact | None = None, deps: list[JsLibraryInfo] = []) -> TransitiveOutputsTSet: kwargs = {} if value: kwargs["value"] = value if deps: kwargs["children"] = filter(None, [js_library_info.transitive_outputs for js_library_info in deps]) return actions.tset(TransitiveOutputsTSet, **kwargs)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server