bldr/web/bundler/bundler.proto
Rama master · réplica de lectura del repositorio original.
syntax = "proto3";
package bldr.web.bundler;
// WebEntrypoint is an entrypoint passed to a web bundler.
message WebEntrypoint {
// InputPath is the input file path.
string input_path = 1;
// OutputPath is the output file path, if any.
string output_path = 2;
}
// WebBundlerOutput contains a single web bundler output.
//
// EsbuildVarType_WEB_BUNDLER_OUTPUT
// ViteVarType_WEB_BUNDLER_OUTPUT
message WebBundlerOutput {
// EntrypointHref is the url path to the script entrypoint.
//
// e.x: /p/plugin-id/script.js
string entrypoint_href = 1;
// CssHref is the url path to the css bundle (if applicable).
//
// May be empty.
// e.x: /p/plugin-id/script.css
string css_href = 2;
}
// WebPkgRefConfig configures a web pkg reference.
message WebPkgRefConfig {
// Id is the identifier of the web pkg.
// example: @aptre/flex-layout
string id = 1;
// Exclude indicates we should reference this web pkg but exclude it from this bundle.
// This is useful if another plugin already provides this web pkg.
bool exclude = 2;
// Imports is the list of imports to include in the web pkg bundle.
// NOTE: this will be merged with any imports the code accesses.
// NOTE: this is therefore optional.
repeated string imports = 3;
// Entrypoints defines the subpath entry points to build for this web package.
//
// For project-local packages (resolved via tsconfig paths, not node_modules):
// - If set, each entry declares a subpath export (e.g. ".", "./object").
// "." maps to the package root index file.
// - If empty, defaults to a single "." entrypoint (package root index).
//
// For node_modules packages:
// - If set, overrides the auto-detected exports from package.json.
// - If empty, entry points are read from the package.json "exports" field.
// Falls back to "main" or "." if no exports field is present.
repeated WebPkgEntrypoint entrypoints = 4;
}
// WebPkgEntrypoint configures a single entry point for a web package build.
message WebPkgEntrypoint {
// Path is the subpath export specifier relative to the package root.
//
// Examples:
// "." - the package root (index.ts / index.js)
// "./object" - a subpath directory or file (object/index.ts or object.ts)
// "./hooks" - another subpath
//
// Follows Node.js subpath exports conventions.
string path = 1;
}