@agentconnect.md/setup 1.57.0-rc.19 → 1.57.0-rc.22
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.
- package/dist/index.js +21 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60807,19 +60807,26 @@ function toRuntime(row) {
|
|
|
60807
60807
|
updatedAt: row.updatedAt
|
|
60808
60808
|
};
|
|
60809
60809
|
}
|
|
60810
|
-
/**
|
|
60811
|
-
*
|
|
60812
|
-
*
|
|
60813
|
-
*
|
|
60814
|
-
|
|
60815
|
-
|
|
60816
|
-
|
|
60817
|
-
|
|
60818
|
-
|
|
60819
|
-
|
|
60820
|
-
|
|
60821
|
-
|
|
60822
|
-
|
|
60810
|
+
/**
|
|
60811
|
+
* Does any of one host's state still bind this deployment to its instance (§24.1)?
|
|
60812
|
+
* Keyed by provider here rather than in the code-host provider registry: the count
|
|
60813
|
+
* is a statement about Prisma models, which are persistence's knowledge.
|
|
60814
|
+
*/
|
|
60815
|
+
const CODE_HOST_STATE_EXISTS = {
|
|
60816
|
+
github: async () => false,
|
|
60817
|
+
gitlab: async (tx) => {
|
|
60818
|
+
const [connections, bindings, accounts, hooks, claims] = await Promise.all([
|
|
60819
|
+
tx.gitlabConnection.count({ where: { NOT: { state: "disconnected" } } }),
|
|
60820
|
+
tx.gitlabProjectBinding.count(),
|
|
60821
|
+
tx.gitlabAgentAccount.count(),
|
|
60822
|
+
tx.hookDef.count({ where: { kind: "gitlab" } }),
|
|
60823
|
+
tx.codeHostRepositoryClaim.count({ where: { provider: "gitlab" } })
|
|
60824
|
+
]);
|
|
60825
|
+
return connections + bindings + accounts + hooks + claims > 0;
|
|
60826
|
+
}
|
|
60827
|
+
};
|
|
60828
|
+
function codeHostStateExists(tx, provider) {
|
|
60829
|
+
return CODE_HOST_STATE_EXISTS[provider](tx);
|
|
60823
60830
|
}
|
|
60824
60831
|
var PgDeploymentConfigRepository = class {
|
|
60825
60832
|
prisma;
|
|
@@ -60862,7 +60869,7 @@ var PgDeploymentConfigRepository = class {
|
|
|
60862
60869
|
const previousValues = current ? parseDeploymentConfigValues(current.schemaVersion, current.values) : null;
|
|
60863
60870
|
const previousBaseUrl = previousValues ? effectiveGitlabBaseUrl(previousValues) : this.envGitlabBaseUrl;
|
|
60864
60871
|
const nextBaseUrl = effectiveGitlabBaseUrl(input.values);
|
|
60865
|
-
if (previousBaseUrl !== nextBaseUrl && await
|
|
60872
|
+
if (previousBaseUrl !== nextBaseUrl && await codeHostStateExists(tx, "gitlab")) throw new DeploymentConfigGitlabBaseUrlLockedError(previousBaseUrl, nextBaseUrl);
|
|
60866
60873
|
const missingRefresh = (previousValues ? deploymentSecretsRequiringRefresh(previousValues, input.values) : []).filter((key) => !input.secrets[key]);
|
|
60867
60874
|
if (missingRefresh.length > 0) throw new DeploymentConfigSecretRefreshRequiredError(missingRefresh);
|
|
60868
60875
|
const currentSecrets = await tx.deploymentSecret.findMany({
|