@camunda/ccma-shared-types 2.0.0 → 3.0.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.
- package/dist/_tests/permissions/session-permissions.spec.d.ts +1 -0
- package/dist/approvals/policy.d.ts +94 -5
- package/dist/approvals/policy.js +64 -14
- package/dist/approvals/policy.js.map +2 -2
- package/dist/approvals/use-cases.const.d.ts +41 -0
- package/dist/approvals/use-cases.const.js +12 -0
- package/dist/approvals/use-cases.const.js.map +7 -0
- package/dist/dtos/AlertSubscription.dto.d.ts +6 -0
- package/dist/dtos/AlertSubscription.dto.js.map +2 -2
- package/dist/dtos/ApprovalJob.dto.d.ts +258 -4
- package/dist/dtos/ApprovalJob.dto.js +42 -1
- package/dist/dtos/ApprovalJob.dto.js.map +2 -2
- package/dist/dtos/ClusterOwnerMove.dto.d.ts +81 -0
- package/dist/dtos/ClusterOwnerMove.dto.js +1 -0
- package/dist/dtos/ClusterOwnerMove.dto.js.map +7 -0
- package/dist/dtos/FeatureFlags.dto.d.ts +1 -1
- package/dist/dtos/Generations.dto.d.ts +17 -0
- package/dist/dtos/Generations.dto.js +7 -0
- package/dist/dtos/Generations.dto.js.map +2 -2
- package/dist/dtos/Generations.dto.spec.d.ts +1 -0
- package/dist/dtos/ReleaseTrainSanity.dto.d.ts +6 -0
- package/dist/enums/SystemAuditEntity.enum.d.ts +1 -0
- package/dist/enums/SystemAuditEntity.enum.js +1 -0
- package/dist/enums/SystemAuditEntity.enum.js.map +2 -2
- package/dist/index.d.ts +9 -6
- package/dist/index.js +45 -3
- package/dist/index.js.map +2 -2
- package/dist/permissions/combo.d.ts +9 -0
- package/dist/permissions/combo.js +54 -1
- package/dist/permissions/combo.js.map +2 -2
- package/dist/utils/versionCheck.utils.d.ts +9 -0
- package/dist/utils/versionCheck.utils.js +7 -2
- package/dist/utils/versionCheck.utils.js.map +2 -2
- package/package.json +1 -1
|
@@ -43,7 +43,7 @@ const normalizeGenerationVersion = (version) => {
|
|
|
43
43
|
};
|
|
44
44
|
const SNAPSHOT_TAG = /^(?:\d+(?:\.\d+)?-)?SNAPSHOT$/;
|
|
45
45
|
const isValidGenerationImage = (image) => {
|
|
46
|
-
if (!image) {
|
|
46
|
+
if (!image || /\s/.test(image)) {
|
|
47
47
|
return false;
|
|
48
48
|
}
|
|
49
49
|
const lastColon = image.lastIndexOf(":");
|
|
@@ -51,8 +51,12 @@ const isValidGenerationImage = (image) => {
|
|
|
51
51
|
return false;
|
|
52
52
|
}
|
|
53
53
|
const tag = image.slice(lastColon + 1);
|
|
54
|
-
|
|
54
|
+
if (SNAPSHOT_TAG.test(tag)) {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
return semver.valid(tag) === tag;
|
|
55
58
|
};
|
|
59
|
+
const generationImageErrorMessage = (field, image) => `${field} image "${image}" does not obey the tag grammar. Use repository:tag, and a tag such as 8.10.1, 8.10.0-alpha5 or 8.10-SNAPSHOT.`;
|
|
56
60
|
const extractVersion = (possiblyVersionOrDockerPath) => {
|
|
57
61
|
const raw = possiblyVersionOrDockerPath ?? "";
|
|
58
62
|
if (semver.valid(raw)) {
|
|
@@ -225,6 +229,7 @@ const isSecretsFilterModeConfigurable = (zeebeVersion) => {
|
|
|
225
229
|
export {
|
|
226
230
|
VersionCheckOperator,
|
|
227
231
|
checkVersion,
|
|
232
|
+
generationImageErrorMessage,
|
|
228
233
|
isAppIntegrationsVersionSupported,
|
|
229
234
|
isGenerationResumable,
|
|
230
235
|
isSecretsFilterModeConfigurable,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/versionCheck.utils.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport * as semver from 'semver'\nimport {\n APP_INTEGRATIONS_89_STREAM_CONNECTOR_BRIDGE_MIN_VERSION,\n APP_INTEGRATIONS_89_STREAM_MINOR,\n APP_INTEGRATIONS_89_STREAM_ZEEBE_MIN_VERSION,\n APP_INTEGRATIONS_MIN_VERSION,\n RESUME_ALPHA_MIN_VERSION,\n SECRETS_FILTER_MODE_8_6_MIN_VERSION,\n SECRETS_FILTER_MODE_8_7_MIN_VERSION,\n SECRETS_FILTER_MODE_8_8_MIN_VERSION,\n SECRETS_FILTER_MODE_8_9_MIN_VERSION,\n SECRETS_FILTER_MODE_8_10_MIN_VERSION,\n} from '../constants/version-gates.const.js'\n\n/**\n * stripSecfixPostfix removes the `-secfix` postfix of a version.\n *\n * A security patch tags the images of a generation with the postfix\n * (`8.8.19-secfix`). Semver reads the postfix as a prerelease, which sorts\n * under the release it patches. A `>= 8.8.19` gate thus refuses a patched\n * build of 8.8.19 itself. The postfix holds no version information, so it\n * comes off before every comparison.\n *\n * Only the postfix comes off, not the whole prerelease. A patched alpha\n * (`8.10.0-alpha5-secfix`) stays an alpha, which the 8.10 floors and\n * `isGenerationResumable` both depend on.\n *\n * A surface that shows a version reads this helper too, because the postfix is\n * an internal build detail. One helper keeps the version a customer sees and\n * the version a gate compares on the same rule.\n */\nexport const stripSecfixPostfix = (version: string): string => {\n // A search for the marker, and not a regular expression. `-secfix.*$` over\n // the input of an exported function is a polynomial backtracking pattern,\n // which code scanning rejects (CodeQL js/polynomial-redos).\n const postfixStart = version.toLowerCase().indexOf('-secfix')\n return postfixStart === -1 ? version : version.slice(0, postfixStart)\n}\n\n/**\n * The grammar of an image tag, as camunda/camunda-operator#6016 defines it.\n * `SNAPSHOT` keeps its own shape, thus the pattern does not cover it.\n *\n * A tag holds a version, and after the version it can hold one suffix:\n * - An alpha suffix (`-alpha5`, `-alpha1.1`) names a prerelease cohort.\n * - Every other suffix (`-rc1`, `-secfix`, `-hotfix1`) is a build detail of\n * the release. The build has the content of the release, thus the suffix\n * holds no version information.\n */\n// The lookahead needs a hyphen or the end of the tag after the alpha number.\n// Without it, an optional digit group lets the pattern match the `alpha`\n// prefix of a tag such as `alphatest1`. That tag is not an alpha, but the\n// pattern still matches it and drops the text after `alpha`.\n//\n// The digit group itself is not optional. The grammar names a cohort\n// `alphaN`, never bare `alpha`, so a bare `-alpha` suffix must fall to the\n// release, the same as every other suffix that is not a numbered cohort.\nconst ALPHA_PRERELEASE = /^alpha(\\d+(?:\\.\\d+)*)(?=$|-)/i\n\n/**\n * Gives an alpha identifier a dot before its number, thus semver compares the\n * number as a number. Without the dot semver compares `alpha10` and `alpha6`\n * as text, and `alpha10` sorts under `alpha6`.\n *\n * Text after the alpha number comes off, because the operator does not\n * support it. A patched alpha (`8.10.0-alpha5-secfix`) stays alpha5, which the\n * 8.10 floors and `isGenerationResumable` both depend on.\n *\n * A version that has no alpha comes back unchanged. A floor reads this\n * function alone, thus a floor keeps a prerelease that is not an alpha. The\n * sentinel `8.10.0-0` of `LINE_8_10_MIN_VERSION` needs that: it must sort\n * under every 8.10 prerelease, and a strip would make it the 8.10.0 release.\n */\nconst padAlphaIdentifier = (version: string): string => {\n const parsed = semver.parse(version)\n if (!parsed || parsed.prerelease.length === 0) {\n return version\n }\n // The whole prerelease, not its first identifier. semver splits\n // `alpha1.1` at the dot, and the fix number is the part after it.\n const alpha = ALPHA_PRERELEASE.exec(parsed.prerelease.join('.'))\n if (!alpha) {\n return version\n }\n // The digit group is mandatory in `ALPHA_PRERELEASE`, thus `alpha[1]`\n // always holds a value here.\n const release = `${parsed.major}.${parsed.minor}.${parsed.patch}`\n return `${release}-alpha.${alpha[1]}`\n}\n\n/**\n * Makes an image tag comparable with the rules of the operator. Two problems\n * need this, and both cost a support ticket (INC-8048):\n *\n * 1. semver sorts a prerelease UNDER its release, thus `8.8.19-hotfix1` fails\n * a `>= 8.8.19` gate. The operator reads that build as 8.8.19, because the\n * build holds the content of 8.8.19 plus a hotfix. Thus every suffix that\n * is not an alpha comes off.\n * 2. semver compares an alpha identifier as text. `padAlphaIdentifier`\n * corrects that.\n *\n * A `SNAPSHOT` tag comes back unchanged. `checkVersion` expands it, and only\n * when the caller asks for it with `trueForSnapshot`.\n *\n * Use this function for a tag, not for a floor. A floor is a boundary that we\n * write, thus it reads `padAlphaIdentifier` alone.\n */\nexport const normalizeGenerationVersion = (version: string): string => {\n if (version.includes('SNAPSHOT')) {\n return version\n }\n const parsed = semver.parse(version)\n if (!parsed || parsed.prerelease.length === 0) {\n return version\n }\n if (!ALPHA_PRERELEASE.test(parsed.prerelease.join('.'))) {\n return `${parsed.major}.${parsed.minor}.${parsed.patch}`\n }\n return padAlphaIdentifier(version)\n}\n\n/**\n * The SNAPSHOT tags of the grammar. A SNAPSHOT build comes from the head of a\n * branch, thus it has no patch number, and sometimes no minor number.\n */\nconst SNAPSHOT_TAG = /^(?:\\d+(?:\\.\\d+)?-)?SNAPSHOT$/\n\n/**\n * Is this value an image that a generation can use? The value must have the\n * form `repository:tag`, and the tag must obey the grammar of the operator\n * (camunda/camunda-operator#6016).\n *\n * The tag is the text after the LAST colon, not the second colon-delimited\n * segment. A registry host can carry a port\n * (`registry.example.com:5000/zeebe:8.10.0`), and `secfixGenerationArtifacts.ts`\n * already rewrites images of that shape.\n *\n * The grammar permits a suffix after the version, and this function does not\n * limit the text of that suffix. Two reasons:\n * - A security patch tags an alpha `8.10.0-alpha5-secfix`. Such images are in\n * production today, and the retag job makes more of them.\n * - The operator removes a suffix that it does not know, thus an unknown\n * suffix is safe. `normalizeGenerationVersion` does the same.\n *\n * Use this function at creation only. Generations from before the grammar\n * hold tags such as `3.9.0-preview-1`, and a read of those must still work.\n */\nexport const isValidGenerationImage = (image: string | undefined): boolean => {\n if (!image) {\n return false\n }\n const lastColon = image.lastIndexOf(':')\n // A colon at the start leaves an empty repository, thus `lastColon <= 0`\n // rejects both no colon (`-1`) and an empty repository (`0`).\n if (lastColon <= 0) {\n return false\n }\n const tag = image.slice(lastColon + 1)\n return SNAPSHOT_TAG.test(tag) || semver.valid(tag) !== null\n}\n\n/**\n * Takes the version out of a generation version field. The field holds either a\n * bare version (`8.10.0-alpha4`) or a docker path\n * (`camunda/zeebe:8.10.0-alpha4`, or `registry.example.com:5000/zeebe:8.10.0-alpha4`\n * for a registry with a port). A value that is neither comes back unchanged,\n * so the caller can still expand a `SNAPSHOT` tag.\n *\n * The version is the text after the LAST colon, not the second colon-delimited\n * segment \u2014 a registry port is also a colon-delimited segment, and comes\n * before the version, not after it.\n */\nconst extractVersion = (possiblyVersionOrDockerPath?: string): string => {\n const raw = possiblyVersionOrDockerPath ?? ''\n if (semver.valid(raw)) {\n return normalizeGenerationVersion(raw)\n }\n const lastColon = raw.lastIndexOf(':')\n if (lastColon !== -1) {\n return normalizeGenerationVersion(raw.slice(lastColon + 1))\n }\n // bare version string not valid semver (e.g. '8.10-SNAPSHOT') \u2014 use as-is so SNAPSHOT expansion can handle it\n return raw\n}\n\n// eslint-disable-next-line no-shadow\nexport enum VersionCheckOperator {\n LessThan,\n LessThanOrEqual,\n GreaterThan,\n GreaterThanOrEqual,\n SameMajor,\n SameMinor,\n}\n\nexport const checkVersion = (params: {\n possiblyVersionOrDockerPath?: string\n trueForSnapshot: boolean | 'compare'\n operator: VersionCheckOperator\n versionToCompareTo: string\n trueOnInvalidVersion?: boolean\n}) => {\n // quick exit: if the versionToCompareTo is\n // - `SNAPSHOT` there is not a lot we can compare here to, so we return false directly\n // - ends with `-SNAPSHOT` we ignore the `-SNAPSHOT` part for the comparison, guess a good matching semver compliant version and try to move on with the generated one in the code\n if (params.versionToCompareTo === 'SNAPSHOT') {\n return false\n }\n let versionToCompareTo = params.versionToCompareTo\n if (versionToCompareTo.endsWith('-SNAPSHOT')) {\n versionToCompareTo = versionToCompareTo.replace('-SNAPSHOT', '')\n const parts = versionToCompareTo.split('.')\n if (parts.length === 1) {\n versionToCompareTo = `${parts[0]}.0.0`\n } else if (parts.length === 2) {\n versionToCompareTo = `${parts[0]}.${parts[1]}.0`\n } else if (parts.length === 3) {\n versionToCompareTo = `${parts[0]}.${parts[1]}.${parts[2]}`\n }\n }\n versionToCompareTo = padAlphaIdentifier(versionToCompareTo)\n if (!semver.valid(versionToCompareTo)) {\n throw new Error('Invalid version to compare to')\n }\n let version: string = extractVersion(params.possiblyVersionOrDockerPath)\n if (params.trueForSnapshot && version.includes('SNAPSHOT')) {\n if (version === 'SNAPSHOT') {\n // bare SNAPSHOT: `true` short-circuits here; `'compare'` falls through to invalid-version handling\n if (params.trueForSnapshot !== 'compare') {\n return true\n }\n } else {\n version = version.replace('-SNAPSHOT', '')\n if (version.split('.').length === 1) {\n version = `${version}.99.99`\n }\n if (version.split('.').length === 2) {\n version = `${version}.99`\n }\n if (version.split('.').length === 3) {\n version = `${version.split('.')[0]}.${version.split('.')[1]}.99`\n }\n }\n }\n\n let parsedVersionToCompareTo: string = ''\n if (semver.valid(versionToCompareTo ?? '')) {\n parsedVersionToCompareTo = versionToCompareTo ?? ''\n } else {\n const versionSplit = versionToCompareTo?.split(':') ?? []\n if (versionSplit.length > 1) {\n parsedVersionToCompareTo = versionSplit[1]\n }\n }\n if (params.trueForSnapshot && parsedVersionToCompareTo === 'SNAPSHOT') {\n return true\n }\n\n if (!semver.valid(version)) {\n return !!params.trueOnInvalidVersion\n }\n\n switch (params.operator) {\n case VersionCheckOperator.LessThan:\n return semver.lt(version, parsedVersionToCompareTo)\n case VersionCheckOperator.LessThanOrEqual:\n return semver.lte(version, parsedVersionToCompareTo)\n case VersionCheckOperator.GreaterThan:\n return semver.gt(version, parsedVersionToCompareTo)\n case VersionCheckOperator.GreaterThanOrEqual:\n return semver.gte(version, parsedVersionToCompareTo)\n case VersionCheckOperator.SameMajor:\n return semver.major(version) === semver.major(parsedVersionToCompareTo)\n case VersionCheckOperator.SameMinor:\n return (\n semver.major(version) === semver.major(parsedVersionToCompareTo) &&\n semver.minor(version) === semver.minor(parsedVersionToCompareTo)\n )\n default:\n return false\n }\n}\n\n/**\n * Can a suspended cluster on this generation resume? An alpha generation under\n * `RESUME_ALPHA_MIN_VERSION` answers false. Every other generation answers\n * true.\n *\n * The floor applies to alphas only, because they have no upgrade chain.\n * `RESUME_ALPHA_MIN_VERSION` gives the full reason. A release generation under\n * the floor, 8.9 for example, keeps its resume action.\n *\n * An alpha carries a prerelease tag that starts with `alpha`. The test reads\n * that tag, not the presence of a prerelease. A security patch tags a release\n * generation `8.9.0-secfix`, which semver also reads as a prerelease. That\n * generation is a release and keeps its upgrade chain, so it stays resumable.\n *\n * The c4 resume actions and the console-backend wake-up guards share this\n * function. The frontend keeps the action and disables it, the backend refuses\n * the request, and both must agree on the cohort. Two copies of one floor is\n * #9703.\n *\n * The answer is true for a version this function cannot read as an alpha:\n * - A `SNAPSHOT` tag is built from main, so it is never one of the old alphas.\n * - An empty or invalid version tells us nothing. A guess of false locks a\n * customer out of a cluster that is good, so the safe answer is true.\n */\nexport const isGenerationResumable = (zeebeVersion?: string): boolean => {\n const version = extractVersion(zeebeVersion)\n const isAlpha = (semver.prerelease(version) ?? []).some(\n (part) =>\n typeof part === 'string' && part.toLowerCase().startsWith('alpha'),\n )\n if (!semver.valid(version) || !isAlpha) {\n return true\n }\n return checkVersion({\n possiblyVersionOrDockerPath: zeebeVersion,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo: RESUME_ALPHA_MIN_VERSION,\n })\n}\n\n/**\n * Version gate for the App Integrations exporter toggle (#8536). Shared by the\n * c4 settings tile and the console-backend update guard so both stay in\n * lockstep \u2014 the fix landed as patches on the 8.9 stream (zeebe >=8.9.14 AND\n * connectorBridge >=8.9.7), everything from 8.10.0-alpha4 on already carries\n * both fixes. A plain zeebe >=8.9.14 check would wrongly match\n * 8.10.0-alpha1/2/3, which predate the fix.\n */\nexport const isAppIntegrationsVersionSupported = (versions: {\n zeebe?: string\n connectorBridge?: string\n}): boolean => {\n if (!versions.zeebe) {\n return false\n }\n const isIn89Stream = checkVersion({\n possiblyVersionOrDockerPath: versions.zeebe,\n trueForSnapshot: 'compare',\n operator: VersionCheckOperator.SameMinor,\n versionToCompareTo: APP_INTEGRATIONS_89_STREAM_MINOR,\n })\n if (!isIn89Stream) {\n return checkVersion({\n possiblyVersionOrDockerPath: versions.zeebe,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo: APP_INTEGRATIONS_MIN_VERSION,\n })\n }\n return (\n checkVersion({\n possiblyVersionOrDockerPath: versions.zeebe,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo: APP_INTEGRATIONS_89_STREAM_ZEEBE_MIN_VERSION,\n }) &&\n checkVersion({\n possiblyVersionOrDockerPath: versions.connectorBridge,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo:\n APP_INTEGRATIONS_89_STREAM_CONNECTOR_BRIDGE_MIN_VERSION,\n })\n )\n}\n\n/**\n * Version gate for the secrets filter mode setting on Connectors\n * (`CAMUNDA_CONNECTOR_SECRETRESOLVER_SECRETFILTER_MODE`). Each 8.x line got the\n * fix on a different patch, so a single floor across all lines is wrong: it\n * would open the setting on an early patch of a newer line, or close it on a\n * late patch of an older line. This picks the zeebe minor line first, then\n * applies that line's own floor.\n *\n * On the 8.6 to 8.9 lines, each floor is the patch where the shipped default\n * became STRICT. Below its floor a line either has no setting at all, or has it\n * with the DISABLED default, so the toggle stays hidden and never shows a mode\n * the cluster does not use.\n *\n * Above the 8.9 line, one floor covers everything: 8.10.0-alpha6 and all later\n * versions, 8.11 included. That floor has a second reason, which\n * SECRETS_FILTER_MODE_8_10_MIN_VERSION gives: on 8.10.0-alpha5 a mode other\n * than STRICT crashes the Connectors runtime at startup.\n *\n * Shared by the c4 settings tile and the console-backend update guard so\n * both stay in lockstep.\n */\nexport const isSecretsFilterModeConfigurable = (\n zeebeVersion: string | undefined,\n): boolean => {\n if (!zeebeVersion) {\n return false\n }\n const lineFloors = [\n SECRETS_FILTER_MODE_8_6_MIN_VERSION,\n SECRETS_FILTER_MODE_8_7_MIN_VERSION,\n SECRETS_FILTER_MODE_8_8_MIN_VERSION,\n SECRETS_FILTER_MODE_8_9_MIN_VERSION,\n ]\n for (const floor of lineFloors) {\n const isOnThisLine = checkVersion({\n possiblyVersionOrDockerPath: zeebeVersion,\n trueForSnapshot: 'compare',\n operator: VersionCheckOperator.SameMinor,\n versionToCompareTo: floor,\n })\n if (isOnThisLine) {\n return checkVersion({\n possiblyVersionOrDockerPath: zeebeVersion,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo: floor,\n })\n }\n }\n // Not on the 8.6-8.9 lines: either older than 8.6, which never had the\n // setting, or 8.10 and above, which all share the 8.10 floor.\n return checkVersion({\n possiblyVersionOrDockerPath: zeebeVersion,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo: SECRETS_FILTER_MODE_8_10_MIN_VERSION,\n })\n}\n"],
|
|
5
|
-
"mappings": "AAMA,YAAY,YAAY;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAmBA,MAAM,qBAAqB,CAAC,YAA4B;AAI7D,QAAM,eAAe,QAAQ,YAAY,EAAE,QAAQ,SAAS;AAC5D,SAAO,iBAAiB,KAAK,UAAU,QAAQ,MAAM,GAAG,YAAY;AACtE;AAoBA,MAAM,mBAAmB;AAgBzB,MAAM,qBAAqB,CAAC,YAA4B;AACtD,QAAM,SAAS,OAAO,MAAM,OAAO;AACnC,MAAI,CAAC,UAAU,OAAO,WAAW,WAAW,GAAG;AAC7C,WAAO;AAAA,EACT;AAGA,QAAM,QAAQ,iBAAiB,KAAK,OAAO,WAAW,KAAK,GAAG,CAAC;AAC/D,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AAGA,QAAM,UAAU,GAAG,OAAO,KAAK,IAAI,OAAO,KAAK,IAAI,OAAO,KAAK;AAC/D,SAAO,GAAG,OAAO,UAAU,MAAM,CAAC,CAAC;AACrC;AAmBO,MAAM,6BAA6B,CAAC,YAA4B;AACrE,MAAI,QAAQ,SAAS,UAAU,GAAG;AAChC,WAAO;AAAA,EACT;AACA,QAAM,SAAS,OAAO,MAAM,OAAO;AACnC,MAAI,CAAC,UAAU,OAAO,WAAW,WAAW,GAAG;AAC7C,WAAO;AAAA,EACT;AACA,MAAI,CAAC,iBAAiB,KAAK,OAAO,WAAW,KAAK,GAAG,CAAC,GAAG;AACvD,WAAO,GAAG,OAAO,KAAK,IAAI,OAAO,KAAK,IAAI,OAAO,KAAK;AAAA,EACxD;AACA,SAAO,mBAAmB,OAAO;AACnC;AAMA,MAAM,eAAe;AAsBd,MAAM,yBAAyB,CAAC,UAAuC;
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport * as semver from 'semver'\nimport {\n APP_INTEGRATIONS_89_STREAM_CONNECTOR_BRIDGE_MIN_VERSION,\n APP_INTEGRATIONS_89_STREAM_MINOR,\n APP_INTEGRATIONS_89_STREAM_ZEEBE_MIN_VERSION,\n APP_INTEGRATIONS_MIN_VERSION,\n RESUME_ALPHA_MIN_VERSION,\n SECRETS_FILTER_MODE_8_6_MIN_VERSION,\n SECRETS_FILTER_MODE_8_7_MIN_VERSION,\n SECRETS_FILTER_MODE_8_8_MIN_VERSION,\n SECRETS_FILTER_MODE_8_9_MIN_VERSION,\n SECRETS_FILTER_MODE_8_10_MIN_VERSION,\n} from '../constants/version-gates.const.js'\n\n/**\n * stripSecfixPostfix removes the `-secfix` postfix of a version.\n *\n * A security patch tags the images of a generation with the postfix\n * (`8.8.19-secfix`). Semver reads the postfix as a prerelease, which sorts\n * under the release it patches. A `>= 8.8.19` gate thus refuses a patched\n * build of 8.8.19 itself. The postfix holds no version information, so it\n * comes off before every comparison.\n *\n * Only the postfix comes off, not the whole prerelease. A patched alpha\n * (`8.10.0-alpha5-secfix`) stays an alpha, which the 8.10 floors and\n * `isGenerationResumable` both depend on.\n *\n * A surface that shows a version reads this helper too, because the postfix is\n * an internal build detail. One helper keeps the version a customer sees and\n * the version a gate compares on the same rule.\n */\nexport const stripSecfixPostfix = (version: string): string => {\n // A search for the marker, and not a regular expression. `-secfix.*$` over\n // the input of an exported function is a polynomial backtracking pattern,\n // which code scanning rejects (CodeQL js/polynomial-redos).\n const postfixStart = version.toLowerCase().indexOf('-secfix')\n return postfixStart === -1 ? version : version.slice(0, postfixStart)\n}\n\n/**\n * The grammar of an image tag, as camunda/camunda-operator#6016 defines it.\n * `SNAPSHOT` keeps its own shape, thus the pattern does not cover it.\n *\n * A tag holds a version, and after the version it can hold one suffix:\n * - An alpha suffix (`-alpha5`, `-alpha1.1`) names a prerelease cohort.\n * - Every other suffix (`-rc1`, `-secfix`, `-hotfix1`) is a build detail of\n * the release. The build has the content of the release, thus the suffix\n * holds no version information.\n */\n// The lookahead needs a hyphen or the end of the tag after the alpha number.\n// Without it, an optional digit group lets the pattern match the `alpha`\n// prefix of a tag such as `alphatest1`. That tag is not an alpha, but the\n// pattern still matches it and drops the text after `alpha`.\n//\n// The digit group itself is not optional. The grammar names a cohort\n// `alphaN`, never bare `alpha`, so a bare `-alpha` suffix must fall to the\n// release, the same as every other suffix that is not a numbered cohort.\nconst ALPHA_PRERELEASE = /^alpha(\\d+(?:\\.\\d+)*)(?=$|-)/i\n\n/**\n * Gives an alpha identifier a dot before its number, thus semver compares the\n * number as a number. Without the dot semver compares `alpha10` and `alpha6`\n * as text, and `alpha10` sorts under `alpha6`.\n *\n * Text after the alpha number comes off, because the operator does not\n * support it. A patched alpha (`8.10.0-alpha5-secfix`) stays alpha5, which the\n * 8.10 floors and `isGenerationResumable` both depend on.\n *\n * A version that has no alpha comes back unchanged. A floor reads this\n * function alone, thus a floor keeps a prerelease that is not an alpha. The\n * sentinel `8.10.0-0` of `LINE_8_10_MIN_VERSION` needs that: it must sort\n * under every 8.10 prerelease, and a strip would make it the 8.10.0 release.\n */\nconst padAlphaIdentifier = (version: string): string => {\n const parsed = semver.parse(version)\n if (!parsed || parsed.prerelease.length === 0) {\n return version\n }\n // The whole prerelease, not its first identifier. semver splits\n // `alpha1.1` at the dot, and the fix number is the part after it.\n const alpha = ALPHA_PRERELEASE.exec(parsed.prerelease.join('.'))\n if (!alpha) {\n return version\n }\n // The digit group is mandatory in `ALPHA_PRERELEASE`, thus `alpha[1]`\n // always holds a value here.\n const release = `${parsed.major}.${parsed.minor}.${parsed.patch}`\n return `${release}-alpha.${alpha[1]}`\n}\n\n/**\n * Makes an image tag comparable with the rules of the operator. Two problems\n * need this, and both cost a support ticket (INC-8048):\n *\n * 1. semver sorts a prerelease UNDER its release, thus `8.8.19-hotfix1` fails\n * a `>= 8.8.19` gate. The operator reads that build as 8.8.19, because the\n * build holds the content of 8.8.19 plus a hotfix. Thus every suffix that\n * is not an alpha comes off.\n * 2. semver compares an alpha identifier as text. `padAlphaIdentifier`\n * corrects that.\n *\n * A `SNAPSHOT` tag comes back unchanged. `checkVersion` expands it, and only\n * when the caller asks for it with `trueForSnapshot`.\n *\n * Use this function for a tag, not for a floor. A floor is a boundary that we\n * write, thus it reads `padAlphaIdentifier` alone.\n */\nexport const normalizeGenerationVersion = (version: string): string => {\n if (version.includes('SNAPSHOT')) {\n return version\n }\n const parsed = semver.parse(version)\n if (!parsed || parsed.prerelease.length === 0) {\n return version\n }\n if (!ALPHA_PRERELEASE.test(parsed.prerelease.join('.'))) {\n return `${parsed.major}.${parsed.minor}.${parsed.patch}`\n }\n return padAlphaIdentifier(version)\n}\n\n/**\n * The SNAPSHOT tags of the grammar. A SNAPSHOT build comes from the head of a\n * branch, thus it has no patch number, and sometimes no minor number.\n */\nconst SNAPSHOT_TAG = /^(?:\\d+(?:\\.\\d+)?-)?SNAPSHOT$/\n\n/**\n * Is this value an image that a generation can use? The value must have the\n * form `repository:tag`, and the tag must obey the grammar of the operator\n * (camunda/camunda-operator#6016).\n *\n * The tag is the text after the LAST colon, not the second colon-delimited\n * segment. A registry host can carry a port\n * (`registry.example.com:5000/zeebe:8.10.0`), and `secfixGenerationArtifacts.ts`\n * already rewrites images of that shape.\n *\n * The grammar permits a suffix after the version, and this function does not\n * limit the text of that suffix. Two reasons:\n * - A security patch tags an alpha `8.10.0-alpha5-secfix`. Such images are in\n * production today, and the retag job makes more of them.\n * - The operator removes a suffix that it does not know, thus an unknown\n * suffix is safe. `normalizeGenerationVersion` does the same.\n *\n * Use this function at creation only. Generations from before the grammar\n * hold tags such as `3.9.0-preview-1`, and a read of those must still work.\n */\nexport const isValidGenerationImage = (image: string | undefined): boolean => {\n // An image reference holds no space. `semver.valid` removes the space\n // around a version, thus ` camunda/zeebe:8.10.1 ` would pass. The record\n // then keeps the space, and the pull of that image fails.\n if (!image || /\\s/.test(image)) {\n return false\n }\n const lastColon = image.lastIndexOf(':')\n // A colon at the start leaves an empty repository, thus `lastColon <= 0`\n // rejects both no colon (`-1`) and an empty repository (`0`).\n if (lastColon <= 0) {\n return false\n }\n const tag = image.slice(lastColon + 1)\n if (SNAPSHOT_TAG.test(tag)) {\n return true\n }\n // The tag must already have the canonical form. `semver.valid` also reads\n // a loose form and gives back the canonical one, thus a test against\n // `null` accepts `v8.10.1` and `8.10.1+build7`. The grammar has neither,\n // and a docker tag permits no `+`.\n return semver.valid(tag) === tag\n}\n\n/**\n * The message for an image that `isValidGenerationImage` refuses. The route\n * and the controller both refuse an image, thus both read this function. One\n * message keeps the two answers the same.\n *\n * The message names the field. A generation holds eight images, and a message\n * without the field name makes a Camundi read all eight to find the bad one.\n */\nexport const generationImageErrorMessage = (\n field: string,\n image: unknown,\n): string =>\n `${field} image \"${image}\" does not obey the tag grammar. Use repository:tag, and a tag such as 8.10.1, 8.10.0-alpha5 or 8.10-SNAPSHOT.`\n\n/**\n * Takes the version out of a generation version field. The field holds either a\n * bare version (`8.10.0-alpha4`) or a docker path\n * (`camunda/zeebe:8.10.0-alpha4`, or `registry.example.com:5000/zeebe:8.10.0-alpha4`\n * for a registry with a port). A value that is neither comes back unchanged,\n * so the caller can still expand a `SNAPSHOT` tag.\n *\n * The version is the text after the LAST colon, not the second colon-delimited\n * segment \u2014 a registry port is also a colon-delimited segment, and comes\n * before the version, not after it.\n */\nconst extractVersion = (possiblyVersionOrDockerPath?: string): string => {\n const raw = possiblyVersionOrDockerPath ?? ''\n if (semver.valid(raw)) {\n return normalizeGenerationVersion(raw)\n }\n const lastColon = raw.lastIndexOf(':')\n if (lastColon !== -1) {\n return normalizeGenerationVersion(raw.slice(lastColon + 1))\n }\n // bare version string not valid semver (e.g. '8.10-SNAPSHOT') \u2014 use as-is so SNAPSHOT expansion can handle it\n return raw\n}\n\n// eslint-disable-next-line no-shadow\nexport enum VersionCheckOperator {\n LessThan,\n LessThanOrEqual,\n GreaterThan,\n GreaterThanOrEqual,\n SameMajor,\n SameMinor,\n}\n\nexport const checkVersion = (params: {\n possiblyVersionOrDockerPath?: string\n trueForSnapshot: boolean | 'compare'\n operator: VersionCheckOperator\n versionToCompareTo: string\n trueOnInvalidVersion?: boolean\n}) => {\n // quick exit: if the versionToCompareTo is\n // - `SNAPSHOT` there is not a lot we can compare here to, so we return false directly\n // - ends with `-SNAPSHOT` we ignore the `-SNAPSHOT` part for the comparison, guess a good matching semver compliant version and try to move on with the generated one in the code\n if (params.versionToCompareTo === 'SNAPSHOT') {\n return false\n }\n let versionToCompareTo = params.versionToCompareTo\n if (versionToCompareTo.endsWith('-SNAPSHOT')) {\n versionToCompareTo = versionToCompareTo.replace('-SNAPSHOT', '')\n const parts = versionToCompareTo.split('.')\n if (parts.length === 1) {\n versionToCompareTo = `${parts[0]}.0.0`\n } else if (parts.length === 2) {\n versionToCompareTo = `${parts[0]}.${parts[1]}.0`\n } else if (parts.length === 3) {\n versionToCompareTo = `${parts[0]}.${parts[1]}.${parts[2]}`\n }\n }\n versionToCompareTo = padAlphaIdentifier(versionToCompareTo)\n if (!semver.valid(versionToCompareTo)) {\n throw new Error('Invalid version to compare to')\n }\n let version: string = extractVersion(params.possiblyVersionOrDockerPath)\n if (params.trueForSnapshot && version.includes('SNAPSHOT')) {\n if (version === 'SNAPSHOT') {\n // bare SNAPSHOT: `true` short-circuits here; `'compare'` falls through to invalid-version handling\n if (params.trueForSnapshot !== 'compare') {\n return true\n }\n } else {\n version = version.replace('-SNAPSHOT', '')\n if (version.split('.').length === 1) {\n version = `${version}.99.99`\n }\n if (version.split('.').length === 2) {\n version = `${version}.99`\n }\n if (version.split('.').length === 3) {\n version = `${version.split('.')[0]}.${version.split('.')[1]}.99`\n }\n }\n }\n\n let parsedVersionToCompareTo: string = ''\n if (semver.valid(versionToCompareTo ?? '')) {\n parsedVersionToCompareTo = versionToCompareTo ?? ''\n } else {\n const versionSplit = versionToCompareTo?.split(':') ?? []\n if (versionSplit.length > 1) {\n parsedVersionToCompareTo = versionSplit[1]\n }\n }\n if (params.trueForSnapshot && parsedVersionToCompareTo === 'SNAPSHOT') {\n return true\n }\n\n if (!semver.valid(version)) {\n return !!params.trueOnInvalidVersion\n }\n\n switch (params.operator) {\n case VersionCheckOperator.LessThan:\n return semver.lt(version, parsedVersionToCompareTo)\n case VersionCheckOperator.LessThanOrEqual:\n return semver.lte(version, parsedVersionToCompareTo)\n case VersionCheckOperator.GreaterThan:\n return semver.gt(version, parsedVersionToCompareTo)\n case VersionCheckOperator.GreaterThanOrEqual:\n return semver.gte(version, parsedVersionToCompareTo)\n case VersionCheckOperator.SameMajor:\n return semver.major(version) === semver.major(parsedVersionToCompareTo)\n case VersionCheckOperator.SameMinor:\n return (\n semver.major(version) === semver.major(parsedVersionToCompareTo) &&\n semver.minor(version) === semver.minor(parsedVersionToCompareTo)\n )\n default:\n return false\n }\n}\n\n/**\n * Can a suspended cluster on this generation resume? An alpha generation under\n * `RESUME_ALPHA_MIN_VERSION` answers false. Every other generation answers\n * true.\n *\n * The floor applies to alphas only, because they have no upgrade chain.\n * `RESUME_ALPHA_MIN_VERSION` gives the full reason. A release generation under\n * the floor, 8.9 for example, keeps its resume action.\n *\n * An alpha carries a prerelease tag that starts with `alpha`. The test reads\n * that tag, not the presence of a prerelease. A security patch tags a release\n * generation `8.9.0-secfix`, which semver also reads as a prerelease. That\n * generation is a release and keeps its upgrade chain, so it stays resumable.\n *\n * The c4 resume actions and the console-backend wake-up guards share this\n * function. The frontend keeps the action and disables it, the backend refuses\n * the request, and both must agree on the cohort. Two copies of one floor is\n * #9703.\n *\n * The answer is true for a version this function cannot read as an alpha:\n * - A `SNAPSHOT` tag is built from main, so it is never one of the old alphas.\n * - An empty or invalid version tells us nothing. A guess of false locks a\n * customer out of a cluster that is good, so the safe answer is true.\n */\nexport const isGenerationResumable = (zeebeVersion?: string): boolean => {\n const version = extractVersion(zeebeVersion)\n const isAlpha = (semver.prerelease(version) ?? []).some(\n (part) =>\n typeof part === 'string' && part.toLowerCase().startsWith('alpha'),\n )\n if (!semver.valid(version) || !isAlpha) {\n return true\n }\n return checkVersion({\n possiblyVersionOrDockerPath: zeebeVersion,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo: RESUME_ALPHA_MIN_VERSION,\n })\n}\n\n/**\n * Version gate for the App Integrations exporter toggle (#8536). Shared by the\n * c4 settings tile and the console-backend update guard so both stay in\n * lockstep \u2014 the fix landed as patches on the 8.9 stream (zeebe >=8.9.14 AND\n * connectorBridge >=8.9.7), everything from 8.10.0-alpha4 on already carries\n * both fixes. A plain zeebe >=8.9.14 check would wrongly match\n * 8.10.0-alpha1/2/3, which predate the fix.\n */\nexport const isAppIntegrationsVersionSupported = (versions: {\n zeebe?: string\n connectorBridge?: string\n}): boolean => {\n if (!versions.zeebe) {\n return false\n }\n const isIn89Stream = checkVersion({\n possiblyVersionOrDockerPath: versions.zeebe,\n trueForSnapshot: 'compare',\n operator: VersionCheckOperator.SameMinor,\n versionToCompareTo: APP_INTEGRATIONS_89_STREAM_MINOR,\n })\n if (!isIn89Stream) {\n return checkVersion({\n possiblyVersionOrDockerPath: versions.zeebe,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo: APP_INTEGRATIONS_MIN_VERSION,\n })\n }\n return (\n checkVersion({\n possiblyVersionOrDockerPath: versions.zeebe,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo: APP_INTEGRATIONS_89_STREAM_ZEEBE_MIN_VERSION,\n }) &&\n checkVersion({\n possiblyVersionOrDockerPath: versions.connectorBridge,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo:\n APP_INTEGRATIONS_89_STREAM_CONNECTOR_BRIDGE_MIN_VERSION,\n })\n )\n}\n\n/**\n * Version gate for the secrets filter mode setting on Connectors\n * (`CAMUNDA_CONNECTOR_SECRETRESOLVER_SECRETFILTER_MODE`). Each 8.x line got the\n * fix on a different patch, so a single floor across all lines is wrong: it\n * would open the setting on an early patch of a newer line, or close it on a\n * late patch of an older line. This picks the zeebe minor line first, then\n * applies that line's own floor.\n *\n * On the 8.6 to 8.9 lines, each floor is the patch where the shipped default\n * became STRICT. Below its floor a line either has no setting at all, or has it\n * with the DISABLED default, so the toggle stays hidden and never shows a mode\n * the cluster does not use.\n *\n * Above the 8.9 line, one floor covers everything: 8.10.0-alpha6 and all later\n * versions, 8.11 included. That floor has a second reason, which\n * SECRETS_FILTER_MODE_8_10_MIN_VERSION gives: on 8.10.0-alpha5 a mode other\n * than STRICT crashes the Connectors runtime at startup.\n *\n * Shared by the c4 settings tile and the console-backend update guard so\n * both stay in lockstep.\n */\nexport const isSecretsFilterModeConfigurable = (\n zeebeVersion: string | undefined,\n): boolean => {\n if (!zeebeVersion) {\n return false\n }\n const lineFloors = [\n SECRETS_FILTER_MODE_8_6_MIN_VERSION,\n SECRETS_FILTER_MODE_8_7_MIN_VERSION,\n SECRETS_FILTER_MODE_8_8_MIN_VERSION,\n SECRETS_FILTER_MODE_8_9_MIN_VERSION,\n ]\n for (const floor of lineFloors) {\n const isOnThisLine = checkVersion({\n possiblyVersionOrDockerPath: zeebeVersion,\n trueForSnapshot: 'compare',\n operator: VersionCheckOperator.SameMinor,\n versionToCompareTo: floor,\n })\n if (isOnThisLine) {\n return checkVersion({\n possiblyVersionOrDockerPath: zeebeVersion,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo: floor,\n })\n }\n }\n // Not on the 8.6-8.9 lines: either older than 8.6, which never had the\n // setting, or 8.10 and above, which all share the 8.10 floor.\n return checkVersion({\n possiblyVersionOrDockerPath: zeebeVersion,\n trueForSnapshot: true,\n operator: VersionCheckOperator.GreaterThanOrEqual,\n versionToCompareTo: SECRETS_FILTER_MODE_8_10_MIN_VERSION,\n })\n}\n"],
|
|
5
|
+
"mappings": "AAMA,YAAY,YAAY;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAmBA,MAAM,qBAAqB,CAAC,YAA4B;AAI7D,QAAM,eAAe,QAAQ,YAAY,EAAE,QAAQ,SAAS;AAC5D,SAAO,iBAAiB,KAAK,UAAU,QAAQ,MAAM,GAAG,YAAY;AACtE;AAoBA,MAAM,mBAAmB;AAgBzB,MAAM,qBAAqB,CAAC,YAA4B;AACtD,QAAM,SAAS,OAAO,MAAM,OAAO;AACnC,MAAI,CAAC,UAAU,OAAO,WAAW,WAAW,GAAG;AAC7C,WAAO;AAAA,EACT;AAGA,QAAM,QAAQ,iBAAiB,KAAK,OAAO,WAAW,KAAK,GAAG,CAAC;AAC/D,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AAGA,QAAM,UAAU,GAAG,OAAO,KAAK,IAAI,OAAO,KAAK,IAAI,OAAO,KAAK;AAC/D,SAAO,GAAG,OAAO,UAAU,MAAM,CAA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