director-registry.js 983 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. "use strict";
  5. const {Arg, Option, RetVal, generateActorSpec} = require("devtools/shared/protocol");
  6. const directorRegistrySpec = generateActorSpec({
  7. typeName: "director-registry",
  8. methods: {
  9. finalize: {
  10. oneway: true
  11. },
  12. install: {
  13. request: {
  14. scriptId: Arg(0, "string"),
  15. scriptCode: Option(1, "string"),
  16. scriptOptions: Option(1, "nullable:json")
  17. },
  18. response: {
  19. success: RetVal("boolean")
  20. }
  21. },
  22. uninstall: {
  23. request: {
  24. scritpId: Arg(0, "string")
  25. },
  26. response: {
  27. success: RetVal("boolean")
  28. }
  29. },
  30. list: {
  31. response: {
  32. directorScripts: RetVal("array:string")
  33. }
  34. },
  35. },
  36. });
  37. exports.directorRegistrySpec = directorRegistrySpec;