@owox/backend 0.38.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/src/common/helpers/read-bounded-body.helper.d.ts +1 -0
  2. package/dist/src/common/helpers/read-bounded-body.helper.js +28 -0
  3. package/dist/src/common/scheduler/system-tasks/system-trigger-type.d.ts +3 -1
  4. package/dist/src/common/scheduler/system-tasks/system-trigger-type.js +2 -0
  5. package/dist/src/config/data-source-options.config.d.ts +4 -3
  6. package/dist/src/config/data-source-options.config.js +10 -3
  7. package/dist/src/config/plugin-collections-body-parser.config.js +3 -0
  8. package/dist/src/data-marts/credentials/credential.types.d.ts +26 -2
  9. package/dist/src/data-marts/credentials/credential.types.js +18 -6
  10. package/dist/src/data-marts/credentials/dto/credential-api.dto.d.ts +5 -1
  11. package/dist/src/data-marts/credentials/dto/credential-api.dto.js +21 -0
  12. package/dist/src/data-marts/credentials/dto/credential.dto.d.ts +2 -1
  13. package/dist/src/data-marts/credentials/entities/credential.entity.d.ts +2 -1
  14. package/dist/src/data-marts/credentials/entities/credential.entity.js +5 -0
  15. package/dist/src/data-marts/credentials/facades/credential-consumer-binding.facade.impl.js +6 -1
  16. package/dist/src/data-marts/credentials/mappers/credential.mapper.js +2 -0
  17. package/dist/src/data-marts/credentials/services/builtin-credential-definitions.js +8 -0
  18. package/dist/src/data-marts/credentials/services/credential-external-definition-registry.service.d.ts +4 -0
  19. package/dist/src/data-marts/credentials/services/credential-external-definition-registry.service.js +36 -17
  20. package/dist/src/data-marts/credentials/services/credential-fetch.service.d.ts +8 -0
  21. package/dist/src/data-marts/credentials/services/credential-fetch.service.js +115 -46
  22. package/dist/src/data-marts/credentials/services/credential-validation-probe.service.d.ts +3 -1
  23. package/dist/src/data-marts/credentials/services/credential-validation-probe.service.js +10 -2
  24. package/dist/src/data-marts/credentials/services/credential.service.d.ts +4 -0
  25. package/dist/src/data-marts/credentials/services/credential.service.js +36 -0
  26. package/dist/src/data-marts/credentials/services/google-service-account-key.d.ts +6 -0
  27. package/dist/src/data-marts/credentials/services/google-service-account-key.js +46 -0
  28. package/dist/src/data-marts/credentials/services/google-service-account-token.service.d.ts +25 -0
  29. package/dist/src/data-marts/credentials/services/google-service-account-token.service.js +177 -0
  30. package/dist/src/data-marts/credentials/use-cases/create-credential.service.d.ts +1 -0
  31. package/dist/src/data-marts/credentials/use-cases/create-credential.service.js +10 -2
  32. package/dist/src/data-marts/credentials/use-cases/update-credential.service.d.ts +1 -0
  33. package/dist/src/data-marts/credentials/use-cases/update-credential.service.js +28 -4
  34. package/dist/src/data-marts/credentials/use-cases/validate-credential.service.js +2 -5
  35. package/dist/src/data-marts/data-marts.module.js +4 -0
  36. package/dist/src/data-marts/data-storage-types/snowflake/adapters/snowflake-api.adapter.js +1 -0
  37. package/dist/src/data-marts/dto/presentation/run-data-mart-request-api.dto.js +4 -2
  38. package/dist/src/data-marts/services/connector/backfill-segment.d.ts +22 -0
  39. package/dist/src/data-marts/services/connector/backfill-segment.js +91 -0
  40. package/dist/src/data-marts/services/connector/connector-execution.service.d.ts +1 -0
  41. package/dist/src/data-marts/services/connector/connector-execution.service.js +3 -0
  42. package/dist/src/data-marts/services/connector/connector-executor.service.d.ts +4 -1
  43. package/dist/src/data-marts/services/connector/connector-executor.service.js +107 -23
  44. package/dist/src/data-marts/services/connector/connector-run.service.d.ts +3 -0
  45. package/dist/src/data-marts/services/connector/connector-run.service.js +98 -4
  46. package/dist/src/data-marts/services/data-mart-run.service.d.ts +1 -0
  47. package/dist/src/data-marts/services/data-mart-run.service.js +9 -0
  48. package/dist/src/data-marts/system-triggers/processors/repair-backfill-chains-processor.d.ts +14 -0
  49. package/dist/src/data-marts/system-triggers/processors/repair-backfill-chains-processor.js +45 -0
  50. package/dist/src/data-marts/use-cases/cancel-data-mart-run.service.d.ts +4 -0
  51. package/dist/src/data-marts/use-cases/cancel-data-mart-run.service.js +46 -1
  52. package/dist/src/data-marts/utils/manual-backfill-range.d.ts +52 -0
  53. package/dist/src/data-marts/utils/manual-backfill-range.js +110 -8
  54. package/dist/src/ee/mcp/instructions/mcp-system-instructions.d.ts +1 -1
  55. package/dist/src/ee/mcp/instructions/mcp-system-instructions.js +1 -0
  56. package/dist/src/idp/decorators/auth-context.decorator.js +1 -0
  57. package/dist/src/idp/guards/idp.guard.d.ts +3 -0
  58. package/dist/src/idp/guards/idp.guard.js +38 -8
  59. package/dist/src/idp/oauth/controllers/oauth-authorization.controller.js +8 -6
  60. package/dist/src/idp/oauth/mcp-client-integration.d.ts +1 -0
  61. package/dist/src/idp/oauth/mcp-client-integration.js +15 -0
  62. package/dist/src/idp/ports/plugin-runtime-authorizer.port.d.ts +6 -0
  63. package/dist/src/idp/types/auth.types.d.ts +1 -0
  64. package/dist/src/migrations/1790900000000-add-plugin-version-backend.d.ts +6 -0
  65. package/dist/src/migrations/1790900000000-add-plugin-version-backend.js +21 -0
  66. package/dist/src/migrations/1790900000001-create-plugin-action-execution.d.ts +6 -0
  67. package/dist/src/migrations/1790900000001-create-plugin-action-execution.js +77 -0
  68. package/dist/src/migrations/1791000000000-add-credential-public-metadata.d.ts +6 -0
  69. package/dist/src/migrations/1791000000000-add-credential-public-metadata.js +23 -0
  70. package/dist/src/plugin-host/collections/dto/domain/plugin-collection.types.d.ts +1 -0
  71. package/dist/src/plugin-host/collections/errors/plugin-collection.errors.d.ts +6 -0
  72. package/dist/src/plugin-host/collections/errors/plugin-collection.errors.js +19 -1
  73. package/dist/src/plugin-host/collections/services/plugin-collection-declaration.service.js +3 -3
  74. package/dist/src/plugin-host/collections/use-cases/put-plugin-collection-document.service.js +7 -0
  75. package/dist/src/plugin-host/constants/plugin-action-limits.d.ts +34 -0
  76. package/dist/src/plugin-host/constants/plugin-action-limits.js +51 -0
  77. package/dist/src/plugin-host/controllers/plugin-action-runtime.controller.d.ts +20 -0
  78. package/dist/src/plugin-host/controllers/plugin-action-runtime.controller.js +123 -0
  79. package/dist/src/plugin-host/controllers/plugin-credential-runtime.controller.js +11 -19
  80. package/dist/src/plugin-host/controllers/plugin-history.controller.d.ts +10 -0
  81. package/dist/src/plugin-host/controllers/plugin-history.controller.js +57 -0
  82. package/dist/src/plugin-host/controllers/plugin-release-check.controller.d.ts +10 -0
  83. package/dist/src/plugin-host/controllers/plugin-release-check.controller.js +58 -0
  84. package/dist/src/plugin-host/dto/domain/check-plugin-release.command.d.ts +22 -0
  85. package/dist/src/plugin-host/dto/domain/check-plugin-release.command.js +17 -0
  86. package/dist/src/plugin-host/dto/domain/list-plugin-history.command.d.ts +10 -0
  87. package/dist/src/plugin-host/dto/domain/list-plugin-history.command.js +18 -0
  88. package/dist/src/plugin-host/dto/domain/plugin-action-execution.command.d.ts +23 -0
  89. package/dist/src/plugin-host/dto/domain/plugin-action-execution.command.js +44 -0
  90. package/dist/src/plugin-host/dto/domain/plugin-action-execution.dto.d.ts +36 -0
  91. package/dist/src/plugin-host/dto/domain/plugin-action-execution.dto.js +3 -0
  92. package/dist/src/plugin-host/dto/domain/plugin-history.dto.d.ts +29 -0
  93. package/dist/src/plugin-host/dto/domain/plugin-history.dto.js +3 -0
  94. package/dist/src/plugin-host/dto/domain/plugin-view.dto.d.ts +1 -0
  95. package/dist/src/plugin-host/dto/presentation/plugin-action-api.dto.d.ts +44 -0
  96. package/dist/src/plugin-host/dto/presentation/plugin-action-api.dto.js +208 -0
  97. package/dist/src/plugin-host/dto/presentation/plugin-gallery-api.dto.d.ts +2 -0
  98. package/dist/src/plugin-host/dto/presentation/plugin-gallery-api.dto.js +7 -0
  99. package/dist/src/plugin-host/dto/presentation/plugin-history-api.dto.d.ts +29 -0
  100. package/dist/src/plugin-host/dto/presentation/plugin-history-api.dto.js +148 -0
  101. package/dist/src/plugin-host/dto/presentation/publication-api.dto.d.ts +17 -0
  102. package/dist/src/plugin-host/dto/presentation/publication-api.dto.js +95 -1
  103. package/dist/src/plugin-host/entities/plugin-action-execution.entity.d.ts +24 -0
  104. package/dist/src/plugin-host/entities/plugin-action-execution.entity.js +136 -0
  105. package/dist/src/plugin-host/entities/plugin-version.entity.d.ts +2 -1
  106. package/dist/src/plugin-host/entities/plugin-version.entity.js +5 -0
  107. package/dist/src/plugin-host/enums/plugin-action-execution-status.enum.d.ts +9 -0
  108. package/dist/src/plugin-host/enums/plugin-action-execution-status.enum.js +22 -0
  109. package/dist/src/plugin-host/enums/release-rejection-code.enum.d.ts +3 -0
  110. package/dist/src/plugin-host/enums/release-rejection-code.enum.js +6 -0
  111. package/dist/src/plugin-host/errors/plugin-action.errors.d.ts +45 -0
  112. package/dist/src/plugin-host/errors/plugin-action.errors.js +70 -0
  113. package/dist/src/plugin-host/errors/plugin-host.errors.d.ts +6 -0
  114. package/dist/src/plugin-host/errors/plugin-host.errors.js +10 -1
  115. package/dist/src/plugin-host/filters/plugin-host-exception.filter.js +2 -2
  116. package/dist/src/plugin-host/mappers/plugin-action-execution.mapper.d.ts +3 -0
  117. package/dist/src/plugin-host/mappers/plugin-action-execution.mapper.js +22 -0
  118. package/dist/src/plugin-host/mappers/plugin-presentation.mapper.d.ts +16 -1
  119. package/dist/src/plugin-host/mappers/plugin-presentation.mapper.js +80 -1
  120. package/dist/src/plugin-host/plugin-host.module.js +32 -0
  121. package/dist/src/plugin-host/services/action-input-validator.service.d.ts +23 -0
  122. package/dist/src/plugin-host/services/action-input-validator.service.js +277 -0
  123. package/dist/src/plugin-host/services/external-credential-definition-sync.service.d.ts +3 -0
  124. package/dist/src/plugin-host/services/external-credential-definition-sync.service.js +47 -15
  125. package/dist/src/plugin-host/services/plugin-action-dispatcher.service.d.ts +13 -0
  126. package/dist/src/plugin-host/services/plugin-action-dispatcher.service.js +140 -0
  127. package/dist/src/plugin-host/services/plugin-action-execution.service.d.ts +69 -0
  128. package/dist/src/plugin-host/services/plugin-action-execution.service.js +239 -0
  129. package/dist/src/plugin-host/services/plugin-action-starter.service.d.ts +22 -0
  130. package/dist/src/plugin-host/services/plugin-action-starter.service.js +81 -0
  131. package/dist/src/plugin-host/services/plugin-audit.service.d.ts +13 -0
  132. package/dist/src/plugin-host/services/plugin-audit.service.js +78 -0
  133. package/dist/src/plugin-host/services/plugin-publication.service.d.ts +2 -0
  134. package/dist/src/plugin-host/services/plugin-publication.service.js +18 -10
  135. package/dist/src/plugin-host/services/plugin-runtime-authorizer.service.d.ts +5 -2
  136. package/dist/src/plugin-host/services/plugin-runtime-authorizer.service.js +31 -3
  137. package/dist/src/plugin-host/services/plugin-version.service.d.ts +2 -1
  138. package/dist/src/plugin-host/services/release-candidate-rules.service.d.ts +51 -0
  139. package/dist/src/plugin-host/services/release-candidate-rules.service.js +198 -0
  140. package/dist/src/plugin-host/services/remote-url-validator.service.d.ts +7 -0
  141. package/dist/src/plugin-host/services/remote-url-validator.service.js +4 -0
  142. package/dist/src/plugin-host/system-triggers/plugin-action-execution-sweep.processor.d.ts +14 -0
  143. package/dist/src/plugin-host/system-triggers/plugin-action-execution-sweep.processor.js +50 -0
  144. package/dist/src/plugin-host/use-cases/cancel-plugin-action-execution.service.d.ts +8 -0
  145. package/dist/src/plugin-host/use-cases/cancel-plugin-action-execution.service.js +39 -0
  146. package/dist/src/plugin-host/use-cases/check-plugin-release.service.d.ts +22 -0
  147. package/dist/src/plugin-host/use-cases/check-plugin-release.service.js +152 -0
  148. package/dist/src/plugin-host/use-cases/get-current-plugin-action-execution.service.d.ts +14 -0
  149. package/dist/src/plugin-host/use-cases/get-current-plugin-action-execution.service.js +85 -0
  150. package/dist/src/plugin-host/use-cases/get-plugin-action-execution.service.d.ts +9 -0
  151. package/dist/src/plugin-host/use-cases/get-plugin-action-execution.service.js +67 -0
  152. package/dist/src/plugin-host/use-cases/get-plugin-installation-entry.service.js +2 -7
  153. package/dist/src/plugin-host/use-cases/install-plugin.service.js +4 -0
  154. package/dist/src/plugin-host/use-cases/list-plugin-history.service.d.ts +25 -0
  155. package/dist/src/plugin-host/use-cases/list-plugin-history.service.js +147 -0
  156. package/dist/src/plugin-host/use-cases/plugin-publisher-access.d.ts +5 -0
  157. package/dist/src/plugin-host/use-cases/plugin-publisher-access.js +28 -0
  158. package/dist/src/plugin-host/use-cases/start-plugin-action-execution.service.d.ts +12 -0
  159. package/dist/src/plugin-host/use-cases/start-plugin-action-execution.service.js +64 -0
  160. package/dist/src/plugin-host/use-cases/sync-plugin-releases.service.d.ts +3 -5
  161. package/dist/src/plugin-host/use-cases/sync-plugin-releases.service.js +15 -59
  162. package/dist/src/plugin-host/use-cases/uninstall-plugin.service.js +3 -1
  163. package/dist/src/plugin-host/use-cases/update-plugin.service.d.ts +0 -1
  164. package/dist/src/plugin-host/use-cases/update-plugin.service.js +3 -25
  165. package/dist/src/plugin-host/utils/action-input-schema.util.d.ts +14 -0
  166. package/dist/src/plugin-host/utils/action-input-schema.util.js +133 -0
  167. package/dist/src/plugin-host/utils/credential-handles.util.d.ts +3 -0
  168. package/dist/src/plugin-host/utils/credential-handles.util.js +13 -0
  169. package/dist/src/plugin-host/utils/execution-token.util.d.ts +5 -0
  170. package/dist/src/plugin-host/utils/execution-token.util.js +13 -0
  171. package/dist/src/plugin-host/utils/json-shape.util.d.ts +1 -0
  172. package/dist/src/plugin-host/utils/json-shape.util.js +21 -0
  173. package/dist/src/plugin-host/utils/plugin-action-outcome.util.d.ts +10 -0
  174. package/dist/src/plugin-host/utils/plugin-action-outcome.util.js +67 -0
  175. package/dist/src/plugin-host/utils/plugin-manifest.util.d.ts +121 -0
  176. package/dist/src/plugin-host/utils/plugin-manifest.util.js +111 -1
  177. package/dist/src/plugin-host/utils/request-abort-signal.util.d.ts +5 -0
  178. package/dist/src/plugin-host/utils/request-abort-signal.util.js +19 -0
  179. package/package.json +10 -8
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CheckPluginReleaseService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const plugin_host_config_1 = require("../config/plugin-host.config");
15
+ const github_access_mode_enum_1 = require("../enums/github-access-mode.enum");
16
+ const release_rejection_code_enum_1 = require("../enums/release-rejection-code.enum");
17
+ const plugin_host_errors_1 = require("../errors/plugin-host.errors");
18
+ const github_api_service_1 = require("../services/github-api.service");
19
+ const plugin_publication_service_1 = require("../services/plugin-publication.service");
20
+ const plugin_version_service_1 = require("../services/plugin-version.service");
21
+ const plugin_service_1 = require("../services/plugin.service");
22
+ const publication_authorization_service_1 = require("../services/publication-authorization.service");
23
+ const release_candidate_rules_service_1 = require("../services/release-candidate-rules.service");
24
+ const github_repo_locator_util_1 = require("../utils/github-repo-locator.util");
25
+ const semver_util_1 = require("../utils/semver.util");
26
+ const plugin_publisher_access_1 = require("./plugin-publisher-access");
27
+ let CheckPluginReleaseService = class CheckPluginReleaseService {
28
+ pluginService;
29
+ authorization;
30
+ publications;
31
+ versionService;
32
+ githubApi;
33
+ candidateRules;
34
+ config;
35
+ lastCheckAt = new Map();
36
+ constructor(pluginService, authorization, publications, versionService, githubApi, candidateRules, config) {
37
+ this.pluginService = pluginService;
38
+ this.authorization = authorization;
39
+ this.publications = publications;
40
+ this.versionService = versionService;
41
+ this.githubApi = githubApi;
42
+ this.candidateRules = candidateRules;
43
+ this.config = config;
44
+ }
45
+ async run(command) {
46
+ const namedSemver = command.version === undefined ? null : eligibleSemver(command.version);
47
+ const locator = (0, github_repo_locator_util_1.parseGithubRepoLocator)(command.repoLocator);
48
+ const plugin = await this.pluginService.findByRepoName(locator.owner, locator.name);
49
+ const isPublisher = this.authorization.isDeploymentPublisher(command.context);
50
+ const notFound = () => new common_1.NotFoundException(`Plugin ${locator.owner}/${locator.name} was not found on this deployment`);
51
+ if (!plugin ||
52
+ !(isPublisher || (await (0, plugin_publisher_access_1.managesPublicationOf)(this.publications, plugin.id, command.context)))) {
53
+ throw notFound();
54
+ }
55
+ this.claimSlot(`${plugin.id}:${command.context.userId || command.context.apiKeyId}`);
56
+ const ref = { owner: plugin.repoOwner, name: plugin.repoName };
57
+ if ((await this.githubApi.getRepo(ref)).githubRepoId !== plugin.githubRepoId) {
58
+ throw notFound();
59
+ }
60
+ const current = plugin.currentVersionId
61
+ ? await this.versionService.findById(plugin.currentVersionId)
62
+ : null;
63
+ const semver = namedSemver ?? (current ? nextVersionOf(current.semver) : null);
64
+ const identity = {
65
+ pluginId: plugin.id,
66
+ repository: `${ref.owner}/${ref.name}`,
67
+ candidateVersion: semver,
68
+ };
69
+ const commitSha = await this.githubApi.resolveCommitSha(ref, command.ref);
70
+ if (!commitSha) {
71
+ return {
72
+ ...identity,
73
+ commitSha: null,
74
+ baselineVersion: null,
75
+ collectionsEvaluated: false,
76
+ issues: [
77
+ {
78
+ code: release_rejection_code_enum_1.ReleaseRejectionCode.COMMIT_UNRESOLVABLE,
79
+ detail: `Ref ${command.ref} does not resolve to a commit`,
80
+ },
81
+ ],
82
+ };
83
+ }
84
+ const versionIssue = semver ? await this.versionConflict(plugin.id, semver, current) : null;
85
+ const report = await this.candidateRules.collectAll({
86
+ pluginId: plugin.id,
87
+ ref,
88
+ commitSha,
89
+ semver,
90
+ });
91
+ return {
92
+ ...identity,
93
+ commitSha,
94
+ baselineVersion: report.baselineSemver,
95
+ collectionsEvaluated: report.collectionsEvaluated,
96
+ issues: [...(versionIssue ? [versionIssue] : []), ...report.issues],
97
+ };
98
+ }
99
+ async versionConflict(pluginId, semver, current) {
100
+ const recorded = await this.versionService.findBySemver(pluginId, semver);
101
+ if (recorded) {
102
+ return {
103
+ code: release_rejection_code_enum_1.ReleaseRejectionCode.VERSION_CONFLICT,
104
+ detail: `Version ${semver} is already recorded from commit ${recorded.commitSha}`,
105
+ };
106
+ }
107
+ if (current && (0, semver_util_1.compareSemver)(semver, current.semver) < 0) {
108
+ return {
109
+ code: release_rejection_code_enum_1.ReleaseRejectionCode.VERSION_CONFLICT,
110
+ detail: `Version ${semver} is lower than the current version ${current.semver}; release sync stops at the current version, so it would never become current`,
111
+ };
112
+ }
113
+ return null;
114
+ }
115
+ claimSlot(key) {
116
+ const mode = this.config.isAppModeConfigured
117
+ ? github_access_mode_enum_1.GithubAccessMode.APP
118
+ : this.config.githubToken
119
+ ? github_access_mode_enum_1.GithubAccessMode.SERVER_TOKEN
120
+ : github_access_mode_enum_1.GithubAccessMode.ANONYMOUS;
121
+ const intervalMs = this.config.getSyncMinIntervalMs(mode);
122
+ const now = Date.now();
123
+ const last = this.lastCheckAt.get(key);
124
+ if (last !== undefined && now - last < intervalMs) {
125
+ throw new plugin_host_errors_1.PluginCheckRateLimitedError(Math.ceil((last + intervalMs - now) / 1000));
126
+ }
127
+ this.lastCheckAt.set(key, now);
128
+ }
129
+ };
130
+ exports.CheckPluginReleaseService = CheckPluginReleaseService;
131
+ exports.CheckPluginReleaseService = CheckPluginReleaseService = __decorate([
132
+ (0, common_1.Injectable)(),
133
+ __metadata("design:paramtypes", [plugin_service_1.PluginService,
134
+ publication_authorization_service_1.PublicationAuthorizationService,
135
+ plugin_publication_service_1.PluginPublicationService,
136
+ plugin_version_service_1.PluginVersionService,
137
+ github_api_service_1.GithubApiService,
138
+ release_candidate_rules_service_1.ReleaseCandidateRulesService,
139
+ plugin_host_config_1.PluginHostConfigService])
140
+ ], CheckPluginReleaseService);
141
+ function nextVersionOf(current) {
142
+ const [major, minor, patch] = current.split('.').map(Number);
143
+ return major === 0 ? `0.${minor}.${patch + 1}` : `${major}.${minor + 1}.0`;
144
+ }
145
+ function eligibleSemver(version) {
146
+ const parsed = (0, semver_util_1.parseReleaseTag)(version);
147
+ if (!parsed.ok) {
148
+ throw new common_1.BadRequestException(`Version ${version} is not eligible: use X.Y.Z, optionally prefixed with v, without prerelease or build metadata`);
149
+ }
150
+ return (0, semver_util_1.formatSemver)(parsed.parts);
151
+ }
152
+ //# sourceMappingURL=check-plugin-release.service.js.map
@@ -0,0 +1,14 @@
1
+ import { type CredentialConsumerBindingFacade } from '../../data-marts/credentials/facades/credential-consumer-binding.facade';
2
+ import { GetCurrentPluginActionExecutionCommand } from '../dto/domain/plugin-action-execution.command';
3
+ import type { PluginActionWorkerContext } from '../dto/domain/plugin-action-execution.dto';
4
+ import { PluginActionExecutionService } from '../services/plugin-action-execution.service';
5
+ import { PluginVersionService } from '../services/plugin-version.service';
6
+ import { PluginService } from '../services/plugin.service';
7
+ export declare class GetCurrentPluginActionExecutionService {
8
+ private readonly executions;
9
+ private readonly plugins;
10
+ private readonly versions;
11
+ private readonly credentialBindings;
12
+ constructor(executions: PluginActionExecutionService, plugins: PluginService, versions: PluginVersionService, credentialBindings: CredentialConsumerBindingFacade);
13
+ run(command: GetCurrentPluginActionExecutionCommand): Promise<PluginActionWorkerContext>;
14
+ }
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.GetCurrentPluginActionExecutionService = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const credential_consumer_binding_facade_1 = require("../../data-marts/credentials/facades/credential-consumer-binding.facade");
18
+ const credential_types_1 = require("../../data-marts/credentials/credential.types");
19
+ const plugin_action_errors_1 = require("../errors/plugin-action.errors");
20
+ const plugin_action_execution_service_1 = require("../services/plugin-action-execution.service");
21
+ const plugin_version_service_1 = require("../services/plugin-version.service");
22
+ const plugin_service_1 = require("../services/plugin.service");
23
+ const credential_handles_util_1 = require("../utils/credential-handles.util");
24
+ let GetCurrentPluginActionExecutionService = class GetCurrentPluginActionExecutionService {
25
+ executions;
26
+ plugins;
27
+ versions;
28
+ credentialBindings;
29
+ constructor(executions, plugins, versions, credentialBindings) {
30
+ this.executions = executions;
31
+ this.plugins = plugins;
32
+ this.versions = versions;
33
+ this.credentialBindings = credentialBindings;
34
+ }
35
+ async run(command) {
36
+ const { context } = command;
37
+ if (!context.executionId) {
38
+ throw new plugin_action_errors_1.ExecutionTokenRequiredError();
39
+ }
40
+ const execution = await this.executions.findWithInput(context.executionId);
41
+ if (!execution?.deadlineAt || execution.installationId !== context.installationId) {
42
+ throw new plugin_action_errors_1.ExecutionNotFoundError();
43
+ }
44
+ const plugin = await this.plugins.findById(execution.pluginId);
45
+ const current = plugin?.currentVersionId
46
+ ? await this.versions.findById(plugin.currentVersionId)
47
+ : null;
48
+ const started = current?.id === execution.pluginVersionId
49
+ ? current
50
+ : await this.versions.findById(execution.pluginVersionId);
51
+ if (!plugin || !current || !started) {
52
+ throw new plugin_action_errors_1.ExecutionNotFoundError();
53
+ }
54
+ const ready = await this.credentialBindings.assertConsumerReady({
55
+ projectId: context.projectId,
56
+ userId: context.userId,
57
+ roles: context.roles ?? [],
58
+ consumerType: 'plugin-installation',
59
+ consumerId: execution.installationId,
60
+ requirements: (current.credentialRequirements ?? []).filter(requirement => (0, credential_types_1.normalizeCredentialRequirement)(requirement).definitionId !== null),
61
+ });
62
+ return {
63
+ executionId: execution.id,
64
+ action: execution.action,
65
+ input: execution.input,
66
+ trigger: execution.trigger,
67
+ deadlineAt: execution.deadlineAt,
68
+ plugin: { id: plugin.id, repositoryId: plugin.githubRepoId },
69
+ pluginVersion: started.semver,
70
+ installationId: execution.installationId,
71
+ projectId: execution.projectId,
72
+ userId: execution.userId,
73
+ credentialHandles: (0, credential_handles_util_1.toCredentialHandles)(ready),
74
+ };
75
+ }
76
+ };
77
+ exports.GetCurrentPluginActionExecutionService = GetCurrentPluginActionExecutionService;
78
+ exports.GetCurrentPluginActionExecutionService = GetCurrentPluginActionExecutionService = __decorate([
79
+ (0, common_1.Injectable)(),
80
+ __param(3, (0, common_1.Inject)(credential_consumer_binding_facade_1.CREDENTIAL_CONSUMER_BINDING_FACADE)),
81
+ __metadata("design:paramtypes", [plugin_action_execution_service_1.PluginActionExecutionService,
82
+ plugin_service_1.PluginService,
83
+ plugin_version_service_1.PluginVersionService, Object])
84
+ ], GetCurrentPluginActionExecutionService);
85
+ //# sourceMappingURL=get-current-plugin-action-execution.service.js.map
@@ -0,0 +1,9 @@
1
+ import { GetPluginActionExecutionCommand } from '../dto/domain/plugin-action-execution.command';
2
+ import type { PluginActionExecutionView } from '../dto/domain/plugin-action-execution.dto';
3
+ import { PluginActionExecutionService } from '../services/plugin-action-execution.service';
4
+ export declare class GetPluginActionExecutionService {
5
+ private readonly executions;
6
+ constructor(executions: PluginActionExecutionService);
7
+ run(command: GetPluginActionExecutionCommand): Promise<PluginActionExecutionView>;
8
+ private find;
9
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.GetPluginActionExecutionService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const plugin_action_limits_1 = require("../constants/plugin-action-limits");
15
+ const plugin_action_execution_status_enum_1 = require("../enums/plugin-action-execution-status.enum");
16
+ const plugin_action_errors_1 = require("../errors/plugin-action.errors");
17
+ const plugin_action_execution_mapper_1 = require("../mappers/plugin-action-execution.mapper");
18
+ const plugin_action_execution_service_1 = require("../services/plugin-action-execution.service");
19
+ let GetPluginActionExecutionService = class GetPluginActionExecutionService {
20
+ executions;
21
+ constructor(executions) {
22
+ this.executions = executions;
23
+ }
24
+ async run(command) {
25
+ const waitUntil = Date.now() + command.waitSeconds * 1000;
26
+ const execution = await this.find(command);
27
+ let status = execution.status;
28
+ let polled = false;
29
+ while (status !== null && !(0, plugin_action_execution_status_enum_1.isFinalPluginActionStatus)(status)) {
30
+ const remaining = waitUntil - Date.now();
31
+ if (remaining <= 0 || command.signal.aborted)
32
+ break;
33
+ await pause(Math.min(plugin_action_limits_1.PLUGIN_ACTION_LIMITS.waitPollMs, remaining), command.signal);
34
+ if (command.signal.aborted)
35
+ break;
36
+ status = await this.executions.findStatus(command.id);
37
+ polled = true;
38
+ }
39
+ return (0, plugin_action_execution_mapper_1.toPluginActionExecutionView)(polled ? await this.find(command) : execution);
40
+ }
41
+ async find(command) {
42
+ const execution = await this.executions.findById(command.id);
43
+ if (!execution || execution.installationId !== command.context.installationId) {
44
+ throw new plugin_action_errors_1.ExecutionNotFoundError();
45
+ }
46
+ return execution;
47
+ }
48
+ };
49
+ exports.GetPluginActionExecutionService = GetPluginActionExecutionService;
50
+ exports.GetPluginActionExecutionService = GetPluginActionExecutionService = __decorate([
51
+ (0, common_1.Injectable)(),
52
+ __metadata("design:paramtypes", [plugin_action_execution_service_1.PluginActionExecutionService])
53
+ ], GetPluginActionExecutionService);
54
+ function pause(ms, signal) {
55
+ return new Promise(resolve => {
56
+ const elapsed = new AbortController();
57
+ const timer = setTimeout(() => {
58
+ elapsed.abort();
59
+ resolve();
60
+ }, ms);
61
+ signal.addEventListener('abort', () => {
62
+ clearTimeout(timer);
63
+ resolve();
64
+ }, { once: true, signal: elapsed.signal });
65
+ });
66
+ }
67
+ //# sourceMappingURL=get-plugin-action-execution.service.js.map
@@ -18,6 +18,7 @@ const plugin_host_errors_1 = require("../errors/plugin-host.errors");
18
18
  const plugin_installation_service_1 = require("../services/plugin-installation.service");
19
19
  const plugin_version_service_1 = require("../services/plugin-version.service");
20
20
  const plugin_service_1 = require("../services/plugin.service");
21
+ const credential_handles_util_1 = require("../utils/credential-handles.util");
21
22
  const credential_consumer_binding_facade_1 = require("../../data-marts/credentials/facades/credential-consumer-binding.facade");
22
23
  let GetPluginInstallationEntryService = class GetPluginInstallationEntryService {
23
24
  installations;
@@ -62,13 +63,7 @@ let GetPluginInstallationEntryService = class GetPluginInstallationEntryService
62
63
  displayName: version.displayName,
63
64
  pluginId: plugin.id,
64
65
  versionId: version.id,
65
- credentialHandles: readyRequirements.map(requirement => requirement.definitionId === null
66
- ? {
67
- name: requirement.key,
68
- kind: 'ai',
69
- models: requirement.models,
70
- }
71
- : { name: requirement.key, kind: 'exact' }),
66
+ credentialHandles: (0, credential_handles_util_1.toCredentialHandles)(readyRequirements),
72
67
  };
73
68
  }
74
69
  };
@@ -69,13 +69,16 @@ let InstallPluginService = class InstallPluginService {
69
69
  }
70
70
  const existing = await this.installations.findOne(plugin.id, command.context.projectId, command.context.userId);
71
71
  let firstInstall = false;
72
+ let wasUninstalled = false;
72
73
  let installation;
73
74
  if (existing) {
75
+ wasUninstalled = existing.uninstalledAt !== null;
74
76
  installation = await this.restore(existing);
75
77
  }
76
78
  else {
77
79
  const claimed = await this.installations.installOrFind(plugin.id, command.context.projectId, command.context.userId);
78
80
  firstInstall = claimed.wonRace;
81
+ wasUninstalled = claimed.installation.uninstalledAt !== null;
79
82
  installation = claimed.wonRace
80
83
  ? claimed.installation
81
84
  : await this.restore(claimed.installation);
@@ -99,6 +102,7 @@ let InstallPluginService = class InstallPluginService {
99
102
  authorityScope: plugin_publication_scope_enum_1.PluginPublicationScope.MEMBER,
100
103
  projectId: command.context.projectId,
101
104
  userId: command.context.userId,
105
+ ...(firstInstall ? {} : { beforeState: { uninstalled: wasUninstalled } }),
102
106
  afterState: { versionId: plugin.currentVersionId },
103
107
  });
104
108
  return {
@@ -0,0 +1,25 @@
1
+ import { IdpProjectionsFacade } from '../../idp/facades/idp-projections.facade';
2
+ import { ListPluginHistoryCommand } from '../dto/domain/list-plugin-history.command';
3
+ import { PluginHistoryPageDto } from '../dto/domain/plugin-history.dto';
4
+ import { PluginPresentationMapper } from '../mappers/plugin-presentation.mapper';
5
+ import { PluginAuditService } from '../services/plugin-audit.service';
6
+ import { PluginInstallationService } from '../services/plugin-installation.service';
7
+ import { PluginPublicationService } from '../services/plugin-publication.service';
8
+ import { PluginVersionService } from '../services/plugin-version.service';
9
+ import { PluginService } from '../services/plugin.service';
10
+ export declare class ListPluginHistoryService {
11
+ private readonly audit;
12
+ private readonly publications;
13
+ private readonly installations;
14
+ private readonly pluginService;
15
+ private readonly versionService;
16
+ private readonly mapper;
17
+ private readonly idpProjections;
18
+ constructor(audit: PluginAuditService, publications: PluginPublicationService, installations: PluginInstallationService, pluginService: PluginService, versionService: PluginVersionService, mapper: PluginPresentationMapper, idpProjections: IdpProjectionsFacade);
19
+ run(command: ListPluginHistoryCommand): Promise<PluginHistoryPageDto>;
20
+ private toItems;
21
+ private actorOf;
22
+ private isNameable;
23
+ private isNoOp;
24
+ private versionIdAfter;
25
+ }
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ListPluginHistoryService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const idp_projections_facade_1 = require("../../idp/facades/idp-projections.facade");
15
+ const plugin_audit_action_enum_1 = require("../enums/plugin-audit-action.enum");
16
+ const plugin_publication_scope_enum_1 = require("../enums/plugin-publication-scope.enum");
17
+ const plugin_presentation_mapper_1 = require("../mappers/plugin-presentation.mapper");
18
+ const plugin_audit_service_1 = require("../services/plugin-audit.service");
19
+ const plugin_installation_service_1 = require("../services/plugin-installation.service");
20
+ const plugin_publication_service_1 = require("../services/plugin-publication.service");
21
+ const plugin_version_service_1 = require("../services/plugin-version.service");
22
+ const plugin_service_1 = require("../services/plugin.service");
23
+ const unique = (ids) => [...new Set(ids)];
24
+ const isPublication = (row) => row.action === plugin_audit_action_enum_1.PluginAuditAction.PUBLISH || row.action === plugin_audit_action_enum_1.PluginAuditAction.UNPUBLISH;
25
+ let ListPluginHistoryService = class ListPluginHistoryService {
26
+ audit;
27
+ publications;
28
+ installations;
29
+ pluginService;
30
+ versionService;
31
+ mapper;
32
+ idpProjections;
33
+ constructor(audit, publications, installations, pluginService, versionService, mapper, idpProjections) {
34
+ this.audit = audit;
35
+ this.publications = publications;
36
+ this.installations = installations;
37
+ this.pluginService = pluginService;
38
+ this.versionService = versionService;
39
+ this.mapper = mapper;
40
+ this.idpProjections = idpProjections;
41
+ }
42
+ async run(command) {
43
+ const { projectId, userId } = command.context;
44
+ if (command.cursor && !(await this.audit.exists(command.cursor))) {
45
+ throw new common_1.BadRequestException('cursor does not point to a plugin history entry');
46
+ }
47
+ const [listed, installed] = await Promise.all([
48
+ this.publications.findEverVisibleTo(projectId, userId),
49
+ this.installations.findByMember(projectId, userId),
50
+ ]);
51
+ const rows = await this.audit.findHistory({
52
+ projectId,
53
+ userId,
54
+ installations: command.type !== 'publications',
55
+ publications: command.type !== 'installations',
56
+ changes: command.type === 'all',
57
+ deploymentPluginIds: unique(listed
58
+ .filter(publication => publication.scope === plugin_publication_scope_enum_1.PluginPublicationScope.DEPLOYMENT)
59
+ .map(publication => publication.pluginId)),
60
+ relevantPluginIds: unique([...listed, ...installed].map(row => row.pluginId)),
61
+ afterId: command.cursor,
62
+ take: command.limit + 1,
63
+ });
64
+ const page = rows.slice(0, command.limit);
65
+ const items = await this.toItems(page, projectId, userId);
66
+ return {
67
+ items,
68
+ nextCursor: rows.length > command.limit ? page[page.length - 1].id : null,
69
+ };
70
+ }
71
+ async toItems(page, projectId, userId) {
72
+ const plugins = await this.pluginService.findByIds(unique(page.map(row => row.pluginId)));
73
+ const pluginById = new Map(plugins.map(plugin => [plugin.id, plugin]));
74
+ const versions = await this.versionService.findByIds(unique([
75
+ ...plugins.map(plugin => plugin.currentVersionId),
76
+ ...page.map(row => this.versionIdAfter(row)),
77
+ ].filter((id) => typeof id === 'string')));
78
+ const versionById = new Map(versions.map(version => [version.id, version]));
79
+ const namedIds = unique(page.filter(row => this.isNameable(row, projectId, userId)).map(row => row.userId));
80
+ const names = await this.idpProjections.getUserProjectionList(namedIds);
81
+ return page.flatMap(row => {
82
+ const plugin = pluginById.get(row.pluginId);
83
+ if (!plugin || this.isNoOp(row)) {
84
+ return [];
85
+ }
86
+ const versionId = this.versionIdAfter(row);
87
+ return [
88
+ {
89
+ id: row.id,
90
+ occurredAt: row.createdAt,
91
+ action: row.action,
92
+ scope: isPublication(row) ? row.authorityScope : null,
93
+ plugin: this.mapper.toHistoryPlugin(plugin, plugin.currentVersionId ? (versionById.get(plugin.currentVersionId) ?? null) : null),
94
+ actor: this.actorOf(row, projectId, userId, names),
95
+ version: row.action === plugin_audit_action_enum_1.PluginAuditAction.UPDATE && versionId
96
+ ? (versionById.get(versionId)?.semver ?? null)
97
+ : null,
98
+ },
99
+ ];
100
+ });
101
+ }
102
+ actorOf(row, projectId, userId, names) {
103
+ if (row.action === plugin_audit_action_enum_1.PluginAuditAction.SUSPEND ||
104
+ row.action === plugin_audit_action_enum_1.PluginAuditAction.RESUME ||
105
+ (isPublication(row) && row.authorityScope === plugin_publication_scope_enum_1.PluginPublicationScope.DEPLOYMENT)) {
106
+ return { kind: 'deployment' };
107
+ }
108
+ if (row.userId === userId) {
109
+ return { kind: 'you' };
110
+ }
111
+ if (!this.isNameable(row, projectId, userId)) {
112
+ return null;
113
+ }
114
+ const projection = names.getByUserId(row.userId);
115
+ const name = projection?.fullName || projection?.email;
116
+ return name ? { kind: 'member', name } : null;
117
+ }
118
+ isNameable(row, projectId, userId) {
119
+ return (row.userId !== null &&
120
+ row.userId !== userId &&
121
+ row.projectId === projectId &&
122
+ row.authorityScope !== plugin_publication_scope_enum_1.PluginPublicationScope.DEPLOYMENT &&
123
+ row.action !== plugin_audit_action_enum_1.PluginAuditAction.SUSPEND &&
124
+ row.action !== plugin_audit_action_enum_1.PluginAuditAction.RESUME);
125
+ }
126
+ isNoOp(row) {
127
+ const uninstalled = row.beforeState?.uninstalled;
128
+ return ((row.action === plugin_audit_action_enum_1.PluginAuditAction.RESTORE && uninstalled === false) ||
129
+ (row.action === plugin_audit_action_enum_1.PluginAuditAction.UNINSTALL && uninstalled === true));
130
+ }
131
+ versionIdAfter(row) {
132
+ const id = row.afterState?.currentVersionId;
133
+ return typeof id === 'string' ? id : null;
134
+ }
135
+ };
136
+ exports.ListPluginHistoryService = ListPluginHistoryService;
137
+ exports.ListPluginHistoryService = ListPluginHistoryService = __decorate([
138
+ (0, common_1.Injectable)(),
139
+ __metadata("design:paramtypes", [plugin_audit_service_1.PluginAuditService,
140
+ plugin_publication_service_1.PluginPublicationService,
141
+ plugin_installation_service_1.PluginInstallationService,
142
+ plugin_service_1.PluginService,
143
+ plugin_version_service_1.PluginVersionService,
144
+ plugin_presentation_mapper_1.PluginPresentationMapper,
145
+ idp_projections_facade_1.IdpProjectionsFacade])
146
+ ], ListPluginHistoryService);
147
+ //# sourceMappingURL=list-plugin-history.service.js.map
@@ -0,0 +1,5 @@
1
+ import { AuthorizationContext } from '../../idp/types/auth.types';
2
+ import { Plugin } from '../entities/plugin.entity';
3
+ import { PluginPublicationService } from '../services/plugin-publication.service';
4
+ export declare function managesPublicationOf(publications: PluginPublicationService, pluginId: string, context: AuthorizationContext): Promise<boolean>;
5
+ export declare function visibleRepository(plugin: Plugin, repository: string, isPublisher: boolean): string;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.managesPublicationOf = managesPublicationOf;
4
+ exports.visibleRepository = visibleRepository;
5
+ const plugin_publication_scope_enum_1 = require("../enums/plugin-publication-scope.enum");
6
+ async function managesPublicationOf(publications, pluginId, context) {
7
+ const scopes = [];
8
+ if (context.roles?.includes('admin')) {
9
+ scopes.push(plugin_publication_scope_enum_1.PluginPublicationScope.PROJECT);
10
+ }
11
+ if (context.userId) {
12
+ scopes.push(plugin_publication_scope_enum_1.PluginPublicationScope.MEMBER);
13
+ }
14
+ for (const scope of scopes) {
15
+ const rows = await publications.listManageable(scope, {
16
+ projectId: context.projectId,
17
+ userId: scope === plugin_publication_scope_enum_1.PluginPublicationScope.MEMBER ? (context.userId ?? undefined) : undefined,
18
+ });
19
+ if (rows.some(row => row.pluginId === pluginId)) {
20
+ return true;
21
+ }
22
+ }
23
+ return false;
24
+ }
25
+ function visibleRepository(plugin, repository, isPublisher) {
26
+ return plugin.isPrivateRepo && !isPublisher ? `${plugin.repoOwner}/***` : repository;
27
+ }
28
+ //# sourceMappingURL=plugin-publisher-access.js.map
@@ -0,0 +1,12 @@
1
+ import { StartPluginActionExecutionCommand } from '../dto/domain/plugin-action-execution.command';
2
+ import type { StartedPluginActionExecution } from '../dto/domain/plugin-action-execution.dto';
3
+ import { PluginActionStarterService } from '../services/plugin-action-starter.service';
4
+ import { PluginVersionService } from '../services/plugin-version.service';
5
+ import { PluginService } from '../services/plugin.service';
6
+ export declare class StartPluginActionExecutionService {
7
+ private readonly plugins;
8
+ private readonly versions;
9
+ private readonly starter;
10
+ constructor(plugins: PluginService, versions: PluginVersionService, starter: PluginActionStarterService);
11
+ run(command: StartPluginActionExecutionCommand): Promise<StartedPluginActionExecution>;
12
+ }