暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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;