Nessuna descrizione
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ensureTargeted.js 582B

123456789101112131415161718192021
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.ensureTargeted = void 0;
  4. function ensureTargeted(only, codebase, id) {
  5. const parts = only.split(",");
  6. if (parts.includes("functions")) {
  7. return only;
  8. }
  9. let newTarget = `functions:${codebase}`;
  10. if (parts.includes(newTarget)) {
  11. return only;
  12. }
  13. if (id) {
  14. newTarget = `${newTarget}:${id}`;
  15. if (parts.includes(newTarget)) {
  16. return only;
  17. }
  18. }
  19. return `${only},${newTarget}`;
  20. }
  21. exports.ensureTargeted = ensureTargeted;