// Copyright 2016 The Closure Rules Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package closure;

option java_package = "io.bazel.rules.closure.webfiles";

// Information produced by each webfiles() target.
message Webfiles {

  // Canonical build target for this rule,
  // e.g. @io_bazel_rules_closure//closure/library
  string label = 1;

  // List of srcs associated with webfiles() target.
  repeated WebfilesSource src = 2;
}

// Information about a single entry in the src list.
message WebfilesSource {

  // Blaze execroot path. This can be used by ctx.action to read the file from
  // disk. But please note that this file is probably only valid for the
  // specific target that generated it.
  string path = 1;

  // Long path of file relative to TEST_SRCDIR. This is used by WebfilesServer
  // to read the file.
  string longpath = 2;

  // Absolute path of file on web server.
  string webpath = 3;
}
