@camunda/ccma-shared-types 5.0.0 → 7.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/approvals/dns-subdomain.spec.d.ts +1 -0
- package/dist/_tests/approvals/expected-value.spec.d.ts +1 -0
- package/dist/_tests/charts/chart-query.spec.d.ts +1 -0
- package/dist/_tests/constants/customer-hardware-sizing.const.spec.d.ts +1 -0
- package/dist/_tests/dashboards/definition.spec.d.ts +1 -0
- package/dist/_tests/dtos/ClusterPlanWhiteList.spec.d.ts +1 -0
- package/dist/_tests/utils/elasticsearchPlanPath.utils.spec.d.ts +1 -0
- package/dist/_tests/utils/upgradeGateReason.utils.spec.d.ts +1 -0
- package/dist/approvals/dns-subdomain.d.ts +12 -0
- package/dist/approvals/dns-subdomain.js +16 -0
- package/dist/approvals/dns-subdomain.js.map +7 -0
- package/dist/approvals/expected-value.d.ts +33 -0
- package/dist/approvals/expected-value.js +26 -0
- package/dist/approvals/expected-value.js.map +7 -0
- package/dist/approvals/policy.js +1 -1
- package/dist/approvals/policy.js.map +2 -2
- package/dist/approvals/use-cases.const.d.ts +96 -0
- package/dist/approvals/use-cases.const.js +59 -2
- package/dist/approvals/use-cases.const.js.map +2 -2
- package/dist/charts/chart-metrics.d.ts +35 -0
- package/dist/charts/chart-metrics.js +188 -0
- package/dist/charts/chart-metrics.js.map +7 -0
- package/dist/charts/chart-query.d.ts +55 -0
- package/dist/charts/chart-query.js +376 -0
- package/dist/charts/chart-query.js.map +7 -0
- package/dist/charts/chart-spec.d.ts +103 -0
- package/dist/charts/chart-spec.js +79 -0
- package/dist/charts/chart-spec.js.map +7 -0
- package/dist/charts/index.d.ts +3 -0
- package/dist/charts/index.js +59 -0
- package/dist/charts/index.js.map +7 -0
- package/dist/constants/customer-hardware-sizing.const.d.ts +124 -0
- package/dist/constants/customer-hardware-sizing.const.js +266 -0
- package/dist/constants/customer-hardware-sizing.const.js.map +7 -0
- package/dist/constants/version-gates.const.d.ts +12 -0
- package/dist/constants/version-gates.const.js +2 -0
- package/dist/constants/version-gates.const.js.map +2 -2
- package/dist/dashboards/definition.d.ts +86 -0
- package/dist/dashboards/definition.js +137 -0
- package/dist/dashboards/definition.js.map +7 -0
- package/dist/dtos/Annotation.dto.d.ts +1 -1
- package/dist/dtos/Annotation.dto.js +10 -2
- package/dist/dtos/Annotation.dto.js.map +2 -2
- package/dist/dtos/ApprovalJob.dto.d.ts +33 -3
- package/dist/dtos/ApprovalJob.dto.js.map +2 -2
- package/dist/dtos/ClusterPlanTypeChange.dto.d.ts +23 -0
- package/dist/dtos/ClusterPlanTypeChange.dto.js +1 -0
- package/dist/dtos/ClusterPlanTypeChange.dto.js.map +7 -0
- package/dist/dtos/CommonCluster.dto.d.ts +5 -0
- package/dist/dtos/ControlV2.dto.d.ts +17 -0
- package/dist/dtos/Dashboard.dto.d.ts +336 -0
- package/dist/dtos/Dashboard.dto.js +70 -0
- package/dist/dtos/Dashboard.dto.js.map +7 -0
- package/dist/dtos/EarlyAccessFeature.dto.d.ts +1 -0
- package/dist/dtos/FeatureFlags.dto.d.ts +96 -54
- package/dist/dtos/Hdp.dto.d.ts +5 -88
- package/dist/dtos/Organization.dto.d.ts +21 -0
- package/dist/dtos/Organization.dto.js.map +1 -1
- package/dist/dtos/SalesPlan.dto.d.ts +18 -0
- package/dist/dtos/SalesPlan.dto.js +18 -0
- package/dist/dtos/SalesPlan.dto.js.map +2 -2
- package/dist/dtos/UpgradeReadiness.dto.d.ts +32 -0
- package/dist/dtos/UpgradeReadiness.dto.js +1 -0
- package/dist/dtos/UpgradeReadiness.dto.js.map +7 -0
- package/dist/enums/SystemAuditEntity.enum.d.ts +5 -2
- package/dist/enums/SystemAuditEntity.enum.js +3 -0
- package/dist/enums/SystemAuditEntity.enum.js.map +2 -2
- package/dist/index.d.ts +18 -5
- package/dist/index.js +192 -1
- package/dist/index.js.map +2 -2
- package/dist/permissions/accounts.permissions.d.ts +12 -0
- package/dist/permissions/accounts.permissions.js +11 -0
- package/dist/permissions/accounts.permissions.js.map +2 -2
- package/dist/permissions/combo.js +5 -0
- package/dist/permissions/combo.js.map +2 -2
- package/dist/search/compiler.d.ts +20 -0
- package/dist/search/compiler.js +48 -11
- package/dist/search/compiler.js.map +2 -2
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js.map +2 -2
- package/dist/search/organization-search-fields.d.ts +5 -2
- package/dist/search/organization-search-fields.js +9 -1
- package/dist/search/organization-search-fields.js.map +2 -2
- package/dist/search/parser.d.ts +3 -0
- package/dist/search/parser.js +3 -1
- package/dist/search/parser.js.map +2 -2
- package/dist/types/ClusterBulkOperation.type.d.ts +14 -0
- package/dist/types/ClusterPlanFields.type.js +74 -74
- package/dist/types/ClusterPlanFields.type.js.map +2 -2
- package/dist/utils/elasticsearchPlanPath.utils.d.ts +20 -0
- package/dist/utils/elasticsearchPlanPath.utils.js +32 -0
- package/dist/utils/elasticsearchPlanPath.utils.js.map +7 -0
- package/dist/utils/qa-user.utils.d.ts +14 -0
- package/dist/utils/qa-user.utils.js +14 -0
- package/dist/utils/qa-user.utils.js.map +7 -0
- package/dist/utils/qa-user.utils.spec.d.ts +1 -0
- package/dist/utils/upgradeGateReason.utils.d.ts +8 -0
- package/dist/utils/upgradeGateReason.utils.js +23 -0
- package/dist/utils/upgradeGateReason.utils.js.map +7 -0
- package/package.json +1 -1
|
@@ -5,5 +5,8 @@ import type { SearchFieldSpec } from './fields.js';
|
|
|
5
5
|
* on). A bare term (no `field:`) searches {@link ORG_DEFAULT_SEARCH_FIELDS}.
|
|
6
6
|
*/
|
|
7
7
|
export declare const ORGANIZATION_SEARCH_FIELDS: readonly SearchFieldSpec[];
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Fields a bare term searches for orgs (name, id or Salesforce ID substring —
|
|
10
|
+
* matches `q`).
|
|
11
|
+
*/
|
|
12
|
+
export declare const ORG_DEFAULT_SEARCH_FIELDS: readonly ["name", "id", "salesForceId"];
|
|
@@ -16,6 +16,14 @@ const ORGANIZATION_SEARCH_FIELDS = [
|
|
|
16
16
|
capabilities: ["match"],
|
|
17
17
|
example: "id:2f1a"
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
field: "salesForceId",
|
|
21
|
+
label: "Salesforce ID",
|
|
22
|
+
description: "Salesforce project ID of the organization (substring match; supports * and ?).",
|
|
23
|
+
type: "string",
|
|
24
|
+
capabilities: ["match"],
|
|
25
|
+
example: "salesForceId:0068"
|
|
26
|
+
},
|
|
19
27
|
{
|
|
20
28
|
field: "internal",
|
|
21
29
|
label: "Internal",
|
|
@@ -42,7 +50,7 @@ const ORGANIZATION_SEARCH_FIELDS = [
|
|
|
42
50
|
example: "created:>2024-01-01"
|
|
43
51
|
}
|
|
44
52
|
];
|
|
45
|
-
const ORG_DEFAULT_SEARCH_FIELDS = ["name", "id"];
|
|
53
|
+
const ORG_DEFAULT_SEARCH_FIELDS = ["name", "id", "salesForceId"];
|
|
46
54
|
export {
|
|
47
55
|
ORGANIZATION_SEARCH_FIELDS,
|
|
48
56
|
ORG_DEFAULT_SEARCH_FIELDS
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/search/organization-search-fields.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 { SalesPlanType } from '../types/SalesPlanType.type.js'\nimport type { SearchFieldSpec } from './fields.js'\n\n/**\n * Searchable fields for the Organizations list (mirrors\n * `ListOrganizationsV2Params.filter` \u2014 the fields the endpoint already filters\n * on). A bare term (no `field:`) searches {@link ORG_DEFAULT_SEARCH_FIELDS}.\n */\nexport const ORGANIZATION_SEARCH_FIELDS: readonly SearchFieldSpec[] = [\n {\n field: 'name',\n label: 'Name',\n description: 'Organization name (substring match; supports * and ?).',\n type: 'string',\n capabilities: ['match'],\n example: 'name:acme',\n },\n {\n field: 'id',\n label: 'ID',\n description: 'Organization UUID (substring match).',\n type: 'string',\n capabilities: ['match'],\n example: 'id:2f1a',\n },\n {\n field: 'internal',\n label: 'Internal',\n description: 'Whether the organization is Camunda-internal.',\n type: 'boolean',\n capabilities: ['match'],\n example: 'internal:true',\n },\n {\n field: 'salesPlanType',\n label: 'Sales plan',\n description: 'The organization\u2019s sales-plan type.',\n type: 'enum',\n capabilities: ['match'],\n enumValues: Object.values(SalesPlanType),\n example: 'salesPlanType:enterprise',\n },\n {\n field: 'created',\n label: 'Created',\n description: 'Creation date (ISO, e.g. 2024-01-31). Supports ranges.',\n type: 'date',\n capabilities: ['match', 'range'],\n example: 'created:>2024-01-01',\n },\n] as const\n\n
|
|
5
|
-
"mappings": "AAMA,SAAS,qBAAqB;AAQvB,MAAM,6BAAyD;AAAA,EACpE;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,cAAc,CAAC,OAAO;AAAA,IACtB,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,cAAc,CAAC,OAAO;AAAA,IACtB,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,cAAc,CAAC,OAAO;AAAA,IACtB,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,cAAc,CAAC,OAAO;AAAA,IACtB,YAAY,OAAO,OAAO,aAAa;AAAA,IACvC,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,cAAc,CAAC,SAAS,OAAO;AAAA,IAC/B,SAAS;AAAA,EACX;AACF;
|
|
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 { SalesPlanType } from '../types/SalesPlanType.type.js'\nimport type { SearchFieldSpec } from './fields.js'\n\n/**\n * Searchable fields for the Organizations list (mirrors\n * `ListOrganizationsV2Params.filter` \u2014 the fields the endpoint already filters\n * on). A bare term (no `field:`) searches {@link ORG_DEFAULT_SEARCH_FIELDS}.\n */\nexport const ORGANIZATION_SEARCH_FIELDS: readonly SearchFieldSpec[] = [\n {\n field: 'name',\n label: 'Name',\n description: 'Organization name (substring match; supports * and ?).',\n type: 'string',\n capabilities: ['match'],\n example: 'name:acme',\n },\n {\n field: 'id',\n label: 'ID',\n description: 'Organization UUID (substring match).',\n type: 'string',\n capabilities: ['match'],\n example: 'id:2f1a',\n },\n {\n field: 'salesForceId',\n label: 'Salesforce ID',\n description:\n 'Salesforce project ID of the organization (substring match; supports * and ?).',\n type: 'string',\n capabilities: ['match'],\n example: 'salesForceId:0068',\n },\n {\n field: 'internal',\n label: 'Internal',\n description: 'Whether the organization is Camunda-internal.',\n type: 'boolean',\n capabilities: ['match'],\n example: 'internal:true',\n },\n {\n field: 'salesPlanType',\n label: 'Sales plan',\n description: 'The organization\u2019s sales-plan type.',\n type: 'enum',\n capabilities: ['match'],\n enumValues: Object.values(SalesPlanType),\n example: 'salesPlanType:enterprise',\n },\n {\n field: 'created',\n label: 'Created',\n description: 'Creation date (ISO, e.g. 2024-01-31). Supports ranges.',\n type: 'date',\n capabilities: ['match', 'range'],\n example: 'created:>2024-01-01',\n },\n] as const\n\n/**\n * Fields a bare term searches for orgs (name, id or Salesforce ID substring \u2014\n * matches `q`).\n */\nexport const ORG_DEFAULT_SEARCH_FIELDS = ['name', 'id', 'salesForceId'] as const\n"],
|
|
5
|
+
"mappings": "AAMA,SAAS,qBAAqB;AAQvB,MAAM,6BAAyD;AAAA,EACpE;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,cAAc,CAAC,OAAO;AAAA,IACtB,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,cAAc,CAAC,OAAO;AAAA,IACtB,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,IACF,MAAM;AAAA,IACN,cAAc,CAAC,OAAO;AAAA,IACtB,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,cAAc,CAAC,OAAO;AAAA,IACtB,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,cAAc,CAAC,OAAO;AAAA,IACtB,YAAY,OAAO,OAAO,aAAa;AAAA,IACvC,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,cAAc,CAAC,SAAS,OAAO;AAAA,IAC/B,SAAS;AAAA,EACX;AACF;AAMO,MAAM,4BAA4B,CAAC,QAAQ,MAAM,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/search/parser.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { type QueryNode } from './ast.js';
|
|
2
|
+
/** Hard caps so a pathological query can't blow up the parser (spec: safety). */
|
|
3
|
+
/** The longest query that the parser takes. Exported for the chart filter. */
|
|
4
|
+
export declare const LUCENE_QUERY_MAX_LENGTH = 512;
|
|
2
5
|
/**
|
|
3
6
|
* Parse a Lucene-subset query into an AST. Returns `undefined` for an empty or
|
|
4
7
|
* whitespace-only query (a no-op filter). Throws {@link LuceneQueryError} on any
|
package/dist/search/parser.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LuceneQueryError
|
|
3
3
|
} from "./ast.js";
|
|
4
|
-
const
|
|
4
|
+
const LUCENE_QUERY_MAX_LENGTH = 512;
|
|
5
|
+
const MAX_INPUT_LENGTH = LUCENE_QUERY_MAX_LENGTH;
|
|
5
6
|
const MAX_NODES = 80;
|
|
6
7
|
const MAX_DEPTH = 25;
|
|
7
8
|
const WORD_BOUNDARY = /* @__PURE__ */ new Set(["(", ")"]);
|
|
@@ -319,6 +320,7 @@ const parseLuceneQuery = (input) => {
|
|
|
319
320
|
return new Parser(input).parse();
|
|
320
321
|
};
|
|
321
322
|
export {
|
|
323
|
+
LUCENE_QUERY_MAX_LENGTH,
|
|
322
324
|
parseLuceneQuery
|
|
323
325
|
};
|
|
324
326
|
//# sourceMappingURL=parser.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/search/parser.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 {\n LuceneQueryError,\n type QueryNode,\n type SearchTermOperator,\n} from './ast.js'\n\n// ============================================================================\n// Hand-rolled recursive-descent parser for the Lucene subset (see ast.ts).\n//\n// Grammar (operator precedence low \u2192 high):\n// orExpr := andExpr ( OR andExpr )*\n// andExpr := notExpr ( AND? notExpr )* // adjacency = implicit AND\n// notExpr := (NOT | '-') notExpr | primary\n// primary := '(' orExpr ')' | clause\n// clause := WORD ':' value | value // bare value = default-field term\n// value := range | comparison | atom\n// range := ('[' | '{') atom TO atom (']' | '}')\n// atom := '\"' \u2026 '\"' | word\n// ============================================================================\n\n/** Hard caps so a pathological query can't blow up the parser (spec: safety). */\nconst MAX_INPUT_LENGTH = 512\nconst MAX_NODES = 80\nconst MAX_DEPTH = 25\n\n/** Characters that terminate an unquoted word (besides whitespace). */\nconst WORD_BOUNDARY = new Set(['(', ')'])\n\nclass Parser {\n private readonly input: string\n private pos = 0\n private nodes = 0\n\n constructor(input: string) {\n this.input = input\n }\n\n parse(): QueryNode | undefined {\n this.skipWs()\n if (this.atEnd()) {\n return undefined\n }\n const node = this.parseOr(0)\n this.skipWs()\n if (!this.atEnd()) {\n throw new LuceneQueryError(\n `Unexpected \"${this.rest(12)}\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n return node\n }\n\n // --- expression levels ----------------------------------------------------\n\n private parseOr(depth: number): QueryNode {\n this.guardDepth(depth)\n let node = this.parseAnd(depth)\n for (;;) {\n this.skipWs()\n if (!this.matchKeyword('OR') && !this.matchKeyword('||')) {\n break\n }\n this.consumeKeyword()\n const right = this.parseAnd(depth)\n node = this.track({ kind: 'or', left: node, right })\n }\n return node\n }\n\n private parseAnd(depth: number): QueryNode {\n this.guardDepth(depth)\n let node = this.parseNot(depth)\n for (;;) {\n this.skipWs()\n // Stop the implicit-AND run at the end, a closing paren, or an OR.\n if (\n this.atEnd() ||\n this.peek() === ')' ||\n this.matchKeyword('OR') ||\n this.matchKeyword('||')\n ) {\n break\n }\n // An explicit AND is optional \u2014 adjacency already means AND.\n if (this.matchKeyword('AND') || this.matchKeyword('&&')) {\n this.consumeKeyword()\n }\n const right = this.parseNot(depth)\n node = this.track({ kind: 'and', left: node, right })\n }\n return node\n }\n\n private parseNot(depth: number): QueryNode {\n this.guardDepth(depth)\n this.skipWs()\n if (this.matchKeyword('NOT')) {\n this.consumeKeyword()\n return this.track({ kind: 'not', child: this.parseNot(depth + 1) })\n }\n // A leading '-' at a term boundary is negation (mid-value dashes are kept\n // by the word reader, so `region:aws-1` is unaffected).\n if (this.peek() === '-') {\n this.pos += 1\n return this.track({ kind: 'not', child: this.parseNot(depth + 1) })\n }\n return this.parsePrimary(depth)\n }\n\n private parsePrimary(depth: number): QueryNode {\n this.skipWs()\n if (this.peek() === '(') {\n this.pos += 1\n const node = this.parseOr(depth + 1)\n this.skipWs()\n if (this.peek() !== ')') {\n throw new LuceneQueryError(\n `Missing \")\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n this.pos += 1\n return node\n }\n return this.parseClause()\n }\n\n // --- clauses --------------------------------------------------------------\n\n private parseClause(): QueryNode {\n this.skipWs()\n if (this.atEnd() || this.peek() === ')') {\n throw new LuceneQueryError(\n `Expected a search term at position ${this.pos}.`,\n 'syntax',\n )\n }\n\n // A quoted value at clause start is always a bare term.\n if (this.peek() === '\"') {\n return this.track({\n kind: 'term',\n operator: ':',\n value: this.readQuoted(),\n })\n }\n\n const word = this.readFieldWord()\n if (this.peek() === ':') {\n this.pos += 1\n return this.parseFieldValue(word)\n }\n // No colon \u2192 the word is a bare (default-field) term.\n if (word === '') {\n throw new LuceneQueryError(\n `Expected a search term at position ${this.pos}.`,\n 'syntax',\n )\n }\n return this.track({ kind: 'term', operator: ':', value: word })\n }\n\n private parseFieldValue(field: string): QueryNode {\n if (field === '') {\n throw new LuceneQueryError(\n `Missing field name before \":\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n // Be forgiving of a space after the colon (`name: acme`).\n this.skipWs()\n const opener = this.peek()\n if (opener === '[' || opener === '{') {\n return this.parseRange(field, opener)\n }\n const operator = this.readComparisonOperator()\n // \u2026and after a comparison operator (`created: >= 2024-01-01`).\n this.skipWs()\n const value = this.peek() === '\"' ? this.readQuoted() : this.readValueWord()\n if (value === '') {\n throw new LuceneQueryError(\n `Missing value for \"${field}\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n return this.track({ kind: 'term', field, operator, value })\n }\n\n private parseRange(field: string, opener: '[' | '{'): QueryNode {\n this.pos += 1 // consume opener\n const lowerInclusive = opener === '['\n this.skipWs()\n const lower = this.peek() === '\"' ? this.readQuoted() : this.readRangeAtom()\n this.skipWs()\n if (!this.matchKeyword('TO')) {\n throw new LuceneQueryError(\n `Expected \"TO\" in range for \"${field}\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n this.consumeKeyword()\n this.skipWs()\n const upper = this.peek() === '\"' ? this.readQuoted() : this.readRangeAtom()\n this.skipWs()\n const closer = this.peek()\n if (closer !== ']' && closer !== '}') {\n throw new LuceneQueryError(\n `Missing \"]\" or \"}\" to close range for \"${field}\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n this.pos += 1\n if (lower === '' || upper === '') {\n throw new LuceneQueryError(\n `Range for \"${field}\" needs both bounds.`,\n 'syntax',\n )\n }\n return this.track({\n kind: 'range',\n field,\n lower,\n upper,\n lowerInclusive,\n upperInclusive: closer === ']',\n })\n }\n\n // --- token readers --------------------------------------------------------\n\n /** A field name / bareword: stops at whitespace, `:`, or a boundary char. */\n private readFieldWord(): string {\n const start = this.pos\n while (!this.atEnd()) {\n const char = this.peek()\n if (char === ':' || this.isWs(char) || WORD_BOUNDARY.has(char)) {\n break\n }\n this.pos += 1\n }\n return this.input.slice(start, this.pos)\n }\n\n /** A value word: keeps `:` (e.g. times) but stops at whitespace/parens. */\n private readValueWord(): string {\n const start = this.pos\n while (!this.atEnd()) {\n const char = this.peek()\n if (this.isWs(char) || WORD_BOUNDARY.has(char)) {\n break\n }\n this.pos += 1\n }\n return this.input.slice(start, this.pos)\n }\n\n /** A range bound: like a value word but also stops at `]`/`}`. */\n private readRangeAtom(): string {\n const start = this.pos\n while (!this.atEnd()) {\n const char = this.peek()\n if (\n this.isWs(char) ||\n WORD_BOUNDARY.has(char) ||\n char === ']' ||\n char === '}'\n ) {\n break\n }\n this.pos += 1\n }\n return this.input.slice(start, this.pos)\n }\n\n private readQuoted(): string {\n this.pos += 1 // opening quote\n let value = ''\n while (!this.atEnd()) {\n const char = this.peek()\n if (char === '\\\\' && this.pos + 1 < this.input.length) {\n value += this.input[this.pos + 1]\n this.pos += 2\n continue\n }\n if (char === '\"') {\n this.pos += 1\n return value\n }\n value += char\n this.pos += 1\n }\n throw new LuceneQueryError('Unterminated quoted string.', 'syntax')\n }\n\n private readComparisonOperator(): SearchTermOperator {\n const char = this.peek()\n if (char === '>' || char === '<') {\n this.pos += 1\n if (this.peek() === '=') {\n this.pos += 1\n return char === '>' ? '>=' : '<='\n }\n return char\n }\n return ':'\n }\n\n // --- keyword helpers ------------------------------------------------------\n\n /**\n * Does the input at the cursor start with `keyword` as a standalone token?\n * Case-insensitive; the char after must be whitespace, a paren, or the end so\n * `ORganization` is not read as `OR`.\n */\n private matchKeyword(keyword: string): boolean {\n const end = this.pos + keyword.length\n if (end > this.input.length) {\n return false\n }\n const slice = this.input.slice(this.pos, end)\n if (slice.toUpperCase() !== keyword.toUpperCase()) {\n return false\n }\n if (end === this.input.length) {\n return true\n }\n const next = this.input[end]\n return this.isWs(next) || next === '(' || next === ')'\n }\n\n /** Consume the standalone keyword the cursor is on (length via next boundary). */\n private consumeKeyword(): void {\n while (!this.atEnd()) {\n const char = this.peek()\n if (this.isWs(char) || char === '(' || char === ')') {\n break\n }\n this.pos += 1\n }\n }\n\n // --- primitives -----------------------------------------------------------\n\n private track<T extends QueryNode>(node: T): T {\n this.nodes += 1\n if (this.nodes > MAX_NODES) {\n throw new LuceneQueryError('Query is too complex.', 'syntax')\n }\n return node\n }\n\n private guardDepth(depth: number): void {\n if (depth > MAX_DEPTH) {\n throw new LuceneQueryError('Query is nested too deeply.', 'syntax')\n }\n }\n\n private skipWs(): void {\n while (!this.atEnd() && this.isWs(this.peek())) {\n this.pos += 1\n }\n }\n\n private isWs(char: string): boolean {\n return char === ' ' || char === '\\t' || char === '\\n' || char === '\\r'\n }\n\n private peek(): string {\n return this.input[this.pos] ?? ''\n }\n\n private atEnd(): boolean {\n return this.pos >= this.input.length\n }\n\n private rest(max: number): string {\n return this.input.slice(this.pos, this.pos + max)\n }\n}\n\n/**\n * Parse a Lucene-subset query into an AST. Returns `undefined` for an empty or\n * whitespace-only query (a no-op filter). Throws {@link LuceneQueryError} on any\n * syntax problem.\n */\nexport const parseLuceneQuery = (input: string): QueryNode | undefined => {\n if (input.length > MAX_INPUT_LENGTH) {\n throw new LuceneQueryError(\n `Query is too long (max ${MAX_INPUT_LENGTH} characters).`,\n 'syntax',\n )\n }\n return new Parser(input).parse()\n}\n"],
|
|
5
|
-
"mappings": "AAMA;AAAA,EACE;AAAA,OAGK;
|
|
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 {\n LuceneQueryError,\n type QueryNode,\n type SearchTermOperator,\n} from './ast.js'\n\n// ============================================================================\n// Hand-rolled recursive-descent parser for the Lucene subset (see ast.ts).\n//\n// Grammar (operator precedence low \u2192 high):\n// orExpr := andExpr ( OR andExpr )*\n// andExpr := notExpr ( AND? notExpr )* // adjacency = implicit AND\n// notExpr := (NOT | '-') notExpr | primary\n// primary := '(' orExpr ')' | clause\n// clause := WORD ':' value | value // bare value = default-field term\n// value := range | comparison | atom\n// range := ('[' | '{') atom TO atom (']' | '}')\n// atom := '\"' \u2026 '\"' | word\n// ============================================================================\n\n/** Hard caps so a pathological query can't blow up the parser (spec: safety). */\n/** The longest query that the parser takes. Exported for the chart filter. */\nexport const LUCENE_QUERY_MAX_LENGTH = 512\nconst MAX_INPUT_LENGTH = LUCENE_QUERY_MAX_LENGTH\nconst MAX_NODES = 80\nconst MAX_DEPTH = 25\n\n/** Characters that terminate an unquoted word (besides whitespace). */\nconst WORD_BOUNDARY = new Set(['(', ')'])\n\nclass Parser {\n private readonly input: string\n private pos = 0\n private nodes = 0\n\n constructor(input: string) {\n this.input = input\n }\n\n parse(): QueryNode | undefined {\n this.skipWs()\n if (this.atEnd()) {\n return undefined\n }\n const node = this.parseOr(0)\n this.skipWs()\n if (!this.atEnd()) {\n throw new LuceneQueryError(\n `Unexpected \"${this.rest(12)}\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n return node\n }\n\n // --- expression levels ----------------------------------------------------\n\n private parseOr(depth: number): QueryNode {\n this.guardDepth(depth)\n let node = this.parseAnd(depth)\n for (;;) {\n this.skipWs()\n if (!this.matchKeyword('OR') && !this.matchKeyword('||')) {\n break\n }\n this.consumeKeyword()\n const right = this.parseAnd(depth)\n node = this.track({ kind: 'or', left: node, right })\n }\n return node\n }\n\n private parseAnd(depth: number): QueryNode {\n this.guardDepth(depth)\n let node = this.parseNot(depth)\n for (;;) {\n this.skipWs()\n // Stop the implicit-AND run at the end, a closing paren, or an OR.\n if (\n this.atEnd() ||\n this.peek() === ')' ||\n this.matchKeyword('OR') ||\n this.matchKeyword('||')\n ) {\n break\n }\n // An explicit AND is optional \u2014 adjacency already means AND.\n if (this.matchKeyword('AND') || this.matchKeyword('&&')) {\n this.consumeKeyword()\n }\n const right = this.parseNot(depth)\n node = this.track({ kind: 'and', left: node, right })\n }\n return node\n }\n\n private parseNot(depth: number): QueryNode {\n this.guardDepth(depth)\n this.skipWs()\n if (this.matchKeyword('NOT')) {\n this.consumeKeyword()\n return this.track({ kind: 'not', child: this.parseNot(depth + 1) })\n }\n // A leading '-' at a term boundary is negation (mid-value dashes are kept\n // by the word reader, so `region:aws-1` is unaffected).\n if (this.peek() === '-') {\n this.pos += 1\n return this.track({ kind: 'not', child: this.parseNot(depth + 1) })\n }\n return this.parsePrimary(depth)\n }\n\n private parsePrimary(depth: number): QueryNode {\n this.skipWs()\n if (this.peek() === '(') {\n this.pos += 1\n const node = this.parseOr(depth + 1)\n this.skipWs()\n if (this.peek() !== ')') {\n throw new LuceneQueryError(\n `Missing \")\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n this.pos += 1\n return node\n }\n return this.parseClause()\n }\n\n // --- clauses --------------------------------------------------------------\n\n private parseClause(): QueryNode {\n this.skipWs()\n if (this.atEnd() || this.peek() === ')') {\n throw new LuceneQueryError(\n `Expected a search term at position ${this.pos}.`,\n 'syntax',\n )\n }\n\n // A quoted value at clause start is always a bare term.\n if (this.peek() === '\"') {\n return this.track({\n kind: 'term',\n operator: ':',\n value: this.readQuoted(),\n })\n }\n\n const word = this.readFieldWord()\n if (this.peek() === ':') {\n this.pos += 1\n return this.parseFieldValue(word)\n }\n // No colon \u2192 the word is a bare (default-field) term.\n if (word === '') {\n throw new LuceneQueryError(\n `Expected a search term at position ${this.pos}.`,\n 'syntax',\n )\n }\n return this.track({ kind: 'term', operator: ':', value: word })\n }\n\n private parseFieldValue(field: string): QueryNode {\n if (field === '') {\n throw new LuceneQueryError(\n `Missing field name before \":\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n // Be forgiving of a space after the colon (`name: acme`).\n this.skipWs()\n const opener = this.peek()\n if (opener === '[' || opener === '{') {\n return this.parseRange(field, opener)\n }\n const operator = this.readComparisonOperator()\n // \u2026and after a comparison operator (`created: >= 2024-01-01`).\n this.skipWs()\n const value = this.peek() === '\"' ? this.readQuoted() : this.readValueWord()\n if (value === '') {\n throw new LuceneQueryError(\n `Missing value for \"${field}\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n return this.track({ kind: 'term', field, operator, value })\n }\n\n private parseRange(field: string, opener: '[' | '{'): QueryNode {\n this.pos += 1 // consume opener\n const lowerInclusive = opener === '['\n this.skipWs()\n const lower = this.peek() === '\"' ? this.readQuoted() : this.readRangeAtom()\n this.skipWs()\n if (!this.matchKeyword('TO')) {\n throw new LuceneQueryError(\n `Expected \"TO\" in range for \"${field}\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n this.consumeKeyword()\n this.skipWs()\n const upper = this.peek() === '\"' ? this.readQuoted() : this.readRangeAtom()\n this.skipWs()\n const closer = this.peek()\n if (closer !== ']' && closer !== '}') {\n throw new LuceneQueryError(\n `Missing \"]\" or \"}\" to close range for \"${field}\" at position ${this.pos}.`,\n 'syntax',\n )\n }\n this.pos += 1\n if (lower === '' || upper === '') {\n throw new LuceneQueryError(\n `Range for \"${field}\" needs both bounds.`,\n 'syntax',\n )\n }\n return this.track({\n kind: 'range',\n field,\n lower,\n upper,\n lowerInclusive,\n upperInclusive: closer === ']',\n })\n }\n\n // --- token readers --------------------------------------------------------\n\n /** A field name / bareword: stops at whitespace, `:`, or a boundary char. */\n private readFieldWord(): string {\n const start = this.pos\n while (!this.atEnd()) {\n const char = this.peek()\n if (char === ':' || this.isWs(char) || WORD_BOUNDARY.has(char)) {\n break\n }\n this.pos += 1\n }\n return this.input.slice(start, this.pos)\n }\n\n /** A value word: keeps `:` (e.g. times) but stops at whitespace/parens. */\n private readValueWord(): string {\n const start = this.pos\n while (!this.atEnd()) {\n const char = this.peek()\n if (this.isWs(char) || WORD_BOUNDARY.has(char)) {\n break\n }\n this.pos += 1\n }\n return this.input.slice(start, this.pos)\n }\n\n /** A range bound: like a value word but also stops at `]`/`}`. */\n private readRangeAtom(): string {\n const start = this.pos\n while (!this.atEnd()) {\n const char = this.peek()\n if (\n this.isWs(char) ||\n WORD_BOUNDARY.has(char) ||\n char === ']' ||\n char === '}'\n ) {\n break\n }\n this.pos += 1\n }\n return this.input.slice(start, this.pos)\n }\n\n private readQuoted(): string {\n this.pos += 1 // opening quote\n let value = ''\n while (!this.atEnd()) {\n const char = this.peek()\n if (char === '\\\\' && this.pos + 1 < this.input.length) {\n value += this.input[this.pos + 1]\n this.pos += 2\n continue\n }\n if (char === '\"') {\n this.pos += 1\n return value\n }\n value += char\n this.pos += 1\n }\n throw new LuceneQueryError('Unterminated quoted string.', 'syntax')\n }\n\n private readComparisonOperator(): SearchTermOperator {\n const char = this.peek()\n if (char === '>' || char === '<') {\n this.pos += 1\n if (this.peek() === '=') {\n this.pos += 1\n return char === '>' ? '>=' : '<='\n }\n return char\n }\n return ':'\n }\n\n // --- keyword helpers ------------------------------------------------------\n\n /**\n * Does the input at the cursor start with `keyword` as a standalone token?\n * Case-insensitive; the char after must be whitespace, a paren, or the end so\n * `ORganization` is not read as `OR`.\n */\n private matchKeyword(keyword: string): boolean {\n const end = this.pos + keyword.length\n if (end > this.input.length) {\n return false\n }\n const slice = this.input.slice(this.pos, end)\n if (slice.toUpperCase() !== keyword.toUpperCase()) {\n return false\n }\n if (end === this.input.length) {\n return true\n }\n const next = this.input[end]\n return this.isWs(next) || next === '(' || next === ')'\n }\n\n /** Consume the standalone keyword the cursor is on (length via next boundary). */\n private consumeKeyword(): void {\n while (!this.atEnd()) {\n const char = this.peek()\n if (this.isWs(char) || char === '(' || char === ')') {\n break\n }\n this.pos += 1\n }\n }\n\n // --- primitives -----------------------------------------------------------\n\n private track<T extends QueryNode>(node: T): T {\n this.nodes += 1\n if (this.nodes > MAX_NODES) {\n throw new LuceneQueryError('Query is too complex.', 'syntax')\n }\n return node\n }\n\n private guardDepth(depth: number): void {\n if (depth > MAX_DEPTH) {\n throw new LuceneQueryError('Query is nested too deeply.', 'syntax')\n }\n }\n\n private skipWs(): void {\n while (!this.atEnd() && this.isWs(this.peek())) {\n this.pos += 1\n }\n }\n\n private isWs(char: string): boolean {\n return char === ' ' || char === '\\t' || char === '\\n' || char === '\\r'\n }\n\n private peek(): string {\n return this.input[this.pos] ?? ''\n }\n\n private atEnd(): boolean {\n return this.pos >= this.input.length\n }\n\n private rest(max: number): string {\n return this.input.slice(this.pos, this.pos + max)\n }\n}\n\n/**\n * Parse a Lucene-subset query into an AST. Returns `undefined` for an empty or\n * whitespace-only query (a no-op filter). Throws {@link LuceneQueryError} on any\n * syntax problem.\n */\nexport const parseLuceneQuery = (input: string): QueryNode | undefined => {\n if (input.length > MAX_INPUT_LENGTH) {\n throw new LuceneQueryError(\n `Query is too long (max ${MAX_INPUT_LENGTH} characters).`,\n 'syntax',\n )\n }\n return new Parser(input).parse()\n}\n"],
|
|
5
|
+
"mappings": "AAMA;AAAA,EACE;AAAA,OAGK;AAkBA,MAAM,0BAA0B;AACvC,MAAM,mBAAmB;AACzB,MAAM,YAAY;AAClB,MAAM,YAAY;AAGlB,MAAM,gBAAgB,oBAAI,IAAI,CAAC,KAAK,GA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 -66,8 +66,22 @@ export interface ClusterBulkOperationGenerationUpdateParameter {
|
|
|
66
66
|
*
|
|
67
67
|
* Needs the permission `canUpgradeGenerationYolo`, on the creation of the
|
|
68
68
|
* operation and on each acknowledgement and the execution.
|
|
69
|
+
*
|
|
70
|
+
* The flag also ignores the upgrade gate, as `ignoreUpgradeGate` does. A
|
|
71
|
+
* write past the operator for an unfinished upgrade answers the same
|
|
72
|
+
* question as the gate, so a run with this flag must not skip a cluster
|
|
73
|
+
* for that question first.
|
|
69
74
|
*/
|
|
70
75
|
yoloForceUpdate?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Ignores the upgrade gate of PDP-3067 for every cluster of the run: the
|
|
78
|
+
* upgrade readiness of the cluster and the 24-hour grace period. Without
|
|
79
|
+
* it, a blocked cluster gets the result `SKIPPED`.
|
|
80
|
+
*
|
|
81
|
+
* Needs the permission `canUpgradeGeneration`, on the creation of the
|
|
82
|
+
* operation and on each acknowledgement and the execution.
|
|
83
|
+
*/
|
|
84
|
+
ignoreUpgradeGate?: boolean;
|
|
71
85
|
}
|
|
72
86
|
export interface ClusterBulkOperationPlanTypeUpdateParameter {
|
|
73
87
|
toPlanTypeUuid: string;
|
|
@@ -288,92 +288,92 @@ const CLUSTER_PLAN_FIELDS = {
|
|
|
288
288
|
validator: numberMin1Validator,
|
|
289
289
|
description: "the replication for operate"
|
|
290
290
|
},
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
291
|
+
dataRetentionDays: {
|
|
292
|
+
notOnClusterPlan: true,
|
|
293
|
+
type: "number",
|
|
294
|
+
placeholder: "e.g. 7",
|
|
295
|
+
validator: numberMin0OrUndefinedValidator,
|
|
296
|
+
description: "number of days for operate retention"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
elasticsearch: {
|
|
300
|
+
resources: {
|
|
301
|
+
limits: {
|
|
302
|
+
memory: {
|
|
303
|
+
type: "text",
|
|
304
|
+
placeholder: "e.g. 150Mi",
|
|
305
|
+
validator: undefinedOrQuantityValidator,
|
|
306
|
+
description: "Memory limit of an elastic node, e.g. 150Mi, 2Gi"
|
|
306
307
|
},
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
description: "Memory request of an elastic node, e.g. 150Mi, 2Gi"
|
|
313
|
-
},
|
|
314
|
-
cpu: {
|
|
315
|
-
type: "text",
|
|
316
|
-
placeholder: "e.g. 200m",
|
|
317
|
-
validator: undefinedOrQuantityValidator,
|
|
318
|
-
description: "CPU request of a an elastic node, e.g. 150m, 0.5, 1"
|
|
319
|
-
}
|
|
308
|
+
cpu: {
|
|
309
|
+
type: "text",
|
|
310
|
+
placeholder: "e.g. 200m",
|
|
311
|
+
validator: undefinedOrQuantityValidator,
|
|
312
|
+
description: "CPU limit of an elastic node, e.g. 150m, 0.5, 1"
|
|
320
313
|
}
|
|
321
314
|
},
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
type: "
|
|
325
|
-
placeholder: "e.g.
|
|
326
|
-
validator:
|
|
327
|
-
description: "
|
|
315
|
+
requests: {
|
|
316
|
+
memory: {
|
|
317
|
+
type: "text",
|
|
318
|
+
placeholder: "e.g. 150Mi",
|
|
319
|
+
validator: undefinedOrQuantityValidator,
|
|
320
|
+
description: "Memory request of an elastic node, e.g. 150Mi, 2Gi"
|
|
328
321
|
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
322
|
+
cpu: {
|
|
323
|
+
type: "text",
|
|
324
|
+
placeholder: "e.g. 200m",
|
|
325
|
+
validator: undefinedOrQuantityValidator,
|
|
326
|
+
description: "CPU request of a an elastic node, e.g. 150m, 0.5, 1"
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
config: {
|
|
331
|
+
nodesCount: {
|
|
332
|
+
type: "number",
|
|
333
|
+
placeholder: "e.g. 1",
|
|
334
|
+
validator: numberMin1Validator,
|
|
335
|
+
description: "The count of elasticsearch nodes - e.g. how many pods it runs, if its value is more than 1 it is deployed through the elastic-operator"
|
|
336
|
+
},
|
|
337
|
+
storage: {
|
|
338
|
+
storageClassName: {
|
|
339
|
+
type: "text",
|
|
340
|
+
placeholder: "e.g. fast-v2",
|
|
341
|
+
validator: notEmptyStringValidator,
|
|
342
|
+
description: "This needs to be set to a storageclass present in the k8s system. Can not be undefined if one value in storage: is set"
|
|
343
|
+
},
|
|
344
|
+
resources: {
|
|
345
|
+
requests: {
|
|
346
|
+
storage: {
|
|
347
|
+
type: "text",
|
|
348
|
+
placeholder: "e.g. 1GiB",
|
|
349
|
+
validator: quantityValidator,
|
|
350
|
+
description: "The initial storage size of the statefulset"
|
|
352
351
|
}
|
|
353
352
|
},
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
type: "text",
|
|
357
|
-
placeholder: "e.g. 10%",
|
|
358
|
-
validator: thresholdValidator,
|
|
359
|
-
description: "The free space percentage threshold where pvc autoscaling kicks in. (example 10%)"
|
|
360
|
-
},
|
|
361
|
-
increase: {
|
|
353
|
+
limits: {
|
|
354
|
+
storage: {
|
|
362
355
|
type: "text",
|
|
363
356
|
placeholder: "e.g. 1GiB",
|
|
364
|
-
validator:
|
|
365
|
-
description: "The
|
|
357
|
+
validator: undefinedOrQuantityValidator,
|
|
358
|
+
description: "The upper limit the pvc autoscaler can scale up to"
|
|
366
359
|
}
|
|
367
360
|
}
|
|
361
|
+
},
|
|
362
|
+
autoResizing: {
|
|
363
|
+
threshold: {
|
|
364
|
+
type: "text",
|
|
365
|
+
placeholder: "e.g. 10%",
|
|
366
|
+
validator: thresholdValidator,
|
|
367
|
+
description: "The free space percentage threshold where pvc autoscaling kicks in. (example 10%)"
|
|
368
|
+
},
|
|
369
|
+
increase: {
|
|
370
|
+
type: "text",
|
|
371
|
+
placeholder: "e.g. 1GiB",
|
|
372
|
+
validator: quantityValidator,
|
|
373
|
+
description: "The amount of disk space which is added as soon as autoscaling kicks in. (example 2Gi)"
|
|
374
|
+
}
|
|
368
375
|
}
|
|
369
376
|
}
|
|
370
|
-
},
|
|
371
|
-
dataRetentionDays: {
|
|
372
|
-
notOnClusterPlan: true,
|
|
373
|
-
type: "number",
|
|
374
|
-
placeholder: "e.g. 7",
|
|
375
|
-
validator: numberMin0OrUndefinedValidator,
|
|
376
|
-
description: "number of days for operate retention"
|
|
377
377
|
}
|
|
378
378
|
},
|
|
379
379
|
tasklist: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types/ClusterPlanFields.type.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 { parseEnvVars } from '../utils/envVars.js'\n\n/**\n * Field specification for a cluster plan config: one entry per configurable\n * leaf, mirroring the shape of the `plan` object stored on a cluster plan.\n *\n * It drives the per-field create/edit forms in the admin frontends (accounts\n * `Create Cluster Plan`, control `Create cluster plan`) so a plan can be filled\n * in field by field instead of hand-writing JSON \u2014 the descriptions, input\n * types and validators live here rather than in either app.\n */\nexport interface ClusterPlanFieldSpec {\n type: 'text' | 'number' | 'textarea' | 'checkbox'\n description: string\n placeholder?: string\n validator: (value: any) => boolean\n /** Only settable on a cluster (modification), not on a cluster plan. */\n notOnClusterPlan?: boolean\n}\n\n/** A nested group of field specs, keyed like the config object itself. */\nexport interface ClusterPlanFieldTree {\n [key: string]: ClusterPlanFieldSpec | ClusterPlanFieldTree\n}\n\n/** Narrow a node of the tree to a leaf field spec. */\nexport const isClusterPlanFieldSpec = (\n node: ClusterPlanFieldSpec | ClusterPlanFieldTree,\n): node is ClusterPlanFieldSpec => typeof node.type === 'string'\n\n// A k8s quantity: a number, then an optional unit suffix (`Gi`, `Mi`, `m`, \u2026)\n// or exponent (`e-3`). The suffix must start with a letter or a sign so the\n// digits of the number cannot also be matched by the suffix \u2014 an ambiguity that\n// made the previous form backtrack quadratically on input like `.0000000000x`.\nconst quantityRegexp =\n /^[+-]?[0-9.]+([BeEinumkKMGTP]+[-+]?[0-9]*|[-+][0-9]+)?$/u\nconst thresholdRegexp = /^[0-9]{1,3}%$/u\n\nconst numberValidator = (val: any) => {\n const num = Number(val)\n return !Number.isNaN(num)\n}\n\nconst notEmptyStringValidator = (val: string) => {\n return val !== undefined && val.length > 0\n}\n\nconst numberMin1Validator = (val: any) => {\n return numberValidator(val) && Number(val) > 0\n}\n\nconst numberMin0OrUndefinedValidator = (val: any) => {\n return !val || (numberValidator(val) && Number(val) >= 0)\n}\n\nconst thresholdValidator = (val: string) => {\n return thresholdRegexp.test(val)\n}\n\nconst quantityValidator = (val: string) => {\n return quantityRegexp.test(val)\n}\n\nconst envVarsValidator = (val: string | undefined) => {\n if (!val || val.trim() === '') return true\n return parseEnvVars(val).length > 0\n}\n\nconst undefinedOrQuantityValidator = (val: string) => {\n return val === undefined || val === '' || quantityValidator(val)\n}\n\nconst undefinedOrEnvVarsValidator = (val: string | undefined) => {\n return envVarsValidator(val)\n}\nconst undefinedOrBooleanStringValidator = (val: any) => {\n return val === undefined || typeof val === 'boolean'\n}\n\nexport const CLUSTER_PLAN_FIELDS: ClusterPlanFieldTree = {\n gateway: {\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin0OrUndefinedValidator,\n description: 'the replication for gateway',\n },\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of a gateway pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of a gateway pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of a gateway pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a gateway pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n dataRetentionDays: {\n notOnClusterPlan: true,\n type: 'number',\n placeholder: 'e.g. 7',\n validator: numberMin0OrUndefinedValidator,\n description: 'number of days for gateway retention',\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description: 'env vars going into the system, no linebreakes are allowed',\n },\n },\n zeebe: {\n broker: {\n clusterSize: {\n type: 'number',\n description: 'the amount of borkers',\n placeholder: 'e.g. 1',\n validator: numberMin1Validator,\n },\n replicationFactor: {\n type: 'number',\n placeholder: 'e.g. 1',\n description: 'the replication factor configured into the zeebe nodes',\n validator: numberMin1Validator,\n },\n partitionsCount: {\n type: 'number',\n placeholder: 'e.g. 1',\n description: 'the number of partitions configured into the zeebe nodes',\n validator: numberMin1Validator,\n },\n storage: {\n storageClassName: {\n type: 'text',\n placeholder: 'e.g. fast-v2',\n validator: notEmptyStringValidator,\n description:\n 'This needs to be set to a storageclass present in the k8s system. Can not be undefined if one value in storage: is set',\n },\n resources: {\n requests: {\n storage: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: quantityValidator,\n description: 'The initial storage size of the statefulset',\n },\n },\n limits: {\n storage: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: quantityValidator,\n description: 'The upper limit the pvc autoscaler can scale up to',\n },\n },\n },\n autoResizing: {\n threshold: {\n type: 'text',\n placeholder: 'e.g. 10%',\n validator: thresholdValidator,\n description:\n 'The free space percentage threshold where vpc autoscaling will kicks in. (example 10%)',\n },\n increase: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: quantityValidator,\n description:\n 'The amount of disk space which is added as soon as autoscaling kicks in. (example 2Gi)',\n },\n },\n },\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of a zeebe broker, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of a zeebe broker, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of a zeebe broker, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a zeebe broker, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n dataRetentionDays: {\n notOnClusterPlan: true,\n type: 'number',\n placeholder: 'e.g. 7',\n validator: numberMin0OrUndefinedValidator,\n description: 'number of days for zeebe broker retention',\n },\n },\n gateway: {\n replicas: {\n type: 'number',\n placeholder: 'e.g. 0',\n validator: numberValidator,\n description: 'number of gateways',\n },\n standalone: {\n type: 'checkbox',\n placeholder: undefined,\n validator: undefinedOrBooleanStringValidator,\n description: 'if this is a standalone gateway',\n },\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of an gateway pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of an gateway pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of an gateway pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a an gateway pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n },\n },\n operate: {\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of an operate pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of an operate pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of an operate pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a an operate pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin1Validator,\n description: 'the replication for operate',\n },\n elasticsearch: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of an elastic node, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of an elastic node, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of an elastic node, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a an elastic node, e.g. 150m, 0.5, 1',\n },\n },\n },\n config: {\n nodesCount: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin1Validator,\n description:\n 'The count of elasticsearch nodes - e.g. how many pods it runs, if its value is more than 1 it is deployed through the elastic-operator',\n },\n storage: {\n storageClassName: {\n type: 'text',\n placeholder: 'e.g. fast-v2',\n validator: notEmptyStringValidator,\n description:\n 'This needs to be set to a storageclass present in the k8s system. Can not be undefined if one value in storage: is set',\n },\n resources: {\n requests: {\n storage: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: quantityValidator,\n description: 'The initial storage size of the statefulset',\n },\n },\n limits: {\n storage: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: undefinedOrQuantityValidator,\n description:\n 'The upper limit the pvc autoscaler can scale up to',\n },\n },\n },\n autoResizing: {\n threshold: {\n type: 'text',\n placeholder: 'e.g. 10%',\n validator: thresholdValidator,\n description:\n 'The free space percentage threshold where pvc autoscaling kicks in. (example 10%)',\n },\n increase: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: quantityValidator,\n description:\n 'The amount of disk space which is added as soon as autoscaling kicks in. (example 2Gi)',\n },\n },\n },\n },\n },\n dataRetentionDays: {\n notOnClusterPlan: true,\n type: 'number',\n placeholder: 'e.g. 7',\n validator: numberMin0OrUndefinedValidator,\n description: 'number of days for operate retention',\n },\n },\n tasklist: {\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of a tasklist pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of a tasklist pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of a tasklist pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a a tasklist pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin0OrUndefinedValidator,\n description: 'the replication for tasklist',\n },\n dataRetentionDays: {\n notOnClusterPlan: true,\n type: 'number',\n placeholder: 'e.g. 7',\n validator: numberMin0OrUndefinedValidator,\n description: 'number of days for tasklist retention',\n },\n },\n optimize: {\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of a optimize pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of a optimize pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of a optimize pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a a optimize pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin0OrUndefinedValidator,\n description: 'the replication for optimize',\n },\n dataRetentionDays: {\n notOnClusterPlan: true,\n type: 'number',\n placeholder: 'e.g. 7',\n validator: numberMin0OrUndefinedValidator,\n description: 'number of days for optimize retention',\n },\n },\n zeebeAnalytics: {\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description:\n 'Memory limit of a zeebeAnalytics pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of a zeebeAnalytics pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description:\n 'Memory request of a zeebeAnalytics pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description:\n 'CPU request of a a zeebeAnalytics pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin0OrUndefinedValidator,\n description: 'the replication for zeebeAnalytics',\n },\n },\n connectorBridge: {\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description:\n 'Memory limit of a connectorBridge pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description:\n 'CPU limit of a connectorBridge pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description:\n 'Memory request of a connectorBridge pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description:\n 'CPU request of a a connectorBridge pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin0OrUndefinedValidator,\n description: 'the replication for connectorBridge',\n },\n },\n reconciliation: {\n paused: {\n notOnClusterPlan: true,\n type: 'checkbox',\n placeholder: undefined,\n validator: undefinedOrBooleanStringValidator,\n description: 'pause reconciliation of the cluster CRD',\n },\n },\n}\n"],
|
|
5
|
-
"mappings": "AAMA,SAAS,oBAAoB;AA0BtB,MAAM,yBAAyB,CACpC,SACiC,OAAO,KAAK,SAAS;AAMxD,MAAM,iBACJ;AACF,MAAM,kBAAkB;AAExB,MAAM,kBAAkB,CAAC,QAAa;AACpC,QAAM,MAAM,OAAO,GAAG;AACtB,SAAO,CAAC,OAAO,MAAM,GAAG;AAC1B;AAEA,MAAM,0BAA0B,CAAC,QAAgB;AAC/C,SAAO,QAAQ,UAAa,IAAI,SAAS;AAC3C;AAEA,MAAM,sBAAsB,CAAC,QAAa;AACxC,SAAO,gBAAgB,GAAG,KAAK,OAAO,GAAG,IAAI;AAC/C;AAEA,MAAM,iCAAiC,CAAC,QAAa;AACnD,SAAO,CAAC,OAAQ,gBAAgB,GAAG,KAAK,OAAO,GAAG,KAAK;AACzD;AAEA,MAAM,qBAAqB,CAAC,QAAgB;AAC1C,SAAO,gBAAgB,KAAK,GAAG;AACjC;AAEA,MAAM,oBAAoB,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F;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,WAAW;AAAA,QACT,QAAQ;AAAA,UACN,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,aAAa;AAAA,YACb,WAAW;AAAA,YACX,aAAa;AAAA,UACf;AAAA,UACA,KAAK;AAAA,YACH,MAAM;AAAA,YACN,aAAa;AAAA,YACb,WAAW;AAAA,YACX,aAAa;AAAA,UACf;AAAA,QACF;AAAA,QACA,UAAU;AAAA,UACR,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,aAAa;AAAA,YACb,WAAW;AAAA,YACX,aAAa;AAAA,UACf;AAAA,UACA,KAAK;AAAA,YACH,MAAM;AAAA,YACN,aAAa;AAAA,YACb,WAAW;AAAA,YACX,aAAa;AAAA,UACf;AAAA,QACF;AAAA,MACF;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,aAAa;AAAA,QACb,WAAW;AAAA,QACX,aACE;AAAA,MACJ;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,WAAW;AAAA,MACX,aAAa;AAAA,IACf;AAAA,IACA,
|
|
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 { parseEnvVars } from '../utils/envVars.js'\n\n/**\n * Field specification for a cluster plan config: one entry per configurable\n * leaf, mirroring the shape of the `plan` object stored on a cluster plan.\n *\n * It drives the per-field create/edit forms in the admin frontends (accounts\n * `Create Cluster Plan`, control `Create cluster plan`) so a plan can be filled\n * in field by field instead of hand-writing JSON \u2014 the descriptions, input\n * types and validators live here rather than in either app.\n */\nexport interface ClusterPlanFieldSpec {\n type: 'text' | 'number' | 'textarea' | 'checkbox'\n description: string\n placeholder?: string\n validator: (value: any) => boolean\n /** Only settable on a cluster (modification), not on a cluster plan. */\n notOnClusterPlan?: boolean\n}\n\n/** A nested group of field specs, keyed like the config object itself. */\nexport interface ClusterPlanFieldTree {\n [key: string]: ClusterPlanFieldSpec | ClusterPlanFieldTree\n}\n\n/** Narrow a node of the tree to a leaf field spec. */\nexport const isClusterPlanFieldSpec = (\n node: ClusterPlanFieldSpec | ClusterPlanFieldTree,\n): node is ClusterPlanFieldSpec => typeof node.type === 'string'\n\n// A k8s quantity: a number, then an optional unit suffix (`Gi`, `Mi`, `m`, \u2026)\n// or exponent (`e-3`). The suffix must start with a letter or a sign so the\n// digits of the number cannot also be matched by the suffix \u2014 an ambiguity that\n// made the previous form backtrack quadratically on input like `.0000000000x`.\nconst quantityRegexp =\n /^[+-]?[0-9.]+([BeEinumkKMGTP]+[-+]?[0-9]*|[-+][0-9]+)?$/u\nconst thresholdRegexp = /^[0-9]{1,3}%$/u\n\nconst numberValidator = (val: any) => {\n const num = Number(val)\n return !Number.isNaN(num)\n}\n\nconst notEmptyStringValidator = (val: string) => {\n return val !== undefined && val.length > 0\n}\n\nconst numberMin1Validator = (val: any) => {\n return numberValidator(val) && Number(val) > 0\n}\n\nconst numberMin0OrUndefinedValidator = (val: any) => {\n return !val || (numberValidator(val) && Number(val) >= 0)\n}\n\nconst thresholdValidator = (val: string) => {\n return thresholdRegexp.test(val)\n}\n\nconst quantityValidator = (val: string) => {\n return quantityRegexp.test(val)\n}\n\nconst envVarsValidator = (val: string | undefined) => {\n if (!val || val.trim() === '') return true\n return parseEnvVars(val).length > 0\n}\n\nconst undefinedOrQuantityValidator = (val: string) => {\n return val === undefined || val === '' || quantityValidator(val)\n}\n\nconst undefinedOrEnvVarsValidator = (val: string | undefined) => {\n return envVarsValidator(val)\n}\nconst undefinedOrBooleanStringValidator = (val: any) => {\n return val === undefined || typeof val === 'boolean'\n}\n\nexport const CLUSTER_PLAN_FIELDS: ClusterPlanFieldTree = {\n gateway: {\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin0OrUndefinedValidator,\n description: 'the replication for gateway',\n },\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of a gateway pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of a gateway pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of a gateway pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a gateway pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n dataRetentionDays: {\n notOnClusterPlan: true,\n type: 'number',\n placeholder: 'e.g. 7',\n validator: numberMin0OrUndefinedValidator,\n description: 'number of days for gateway retention',\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description: 'env vars going into the system, no linebreakes are allowed',\n },\n },\n zeebe: {\n broker: {\n clusterSize: {\n type: 'number',\n description: 'the amount of borkers',\n placeholder: 'e.g. 1',\n validator: numberMin1Validator,\n },\n replicationFactor: {\n type: 'number',\n placeholder: 'e.g. 1',\n description: 'the replication factor configured into the zeebe nodes',\n validator: numberMin1Validator,\n },\n partitionsCount: {\n type: 'number',\n placeholder: 'e.g. 1',\n description: 'the number of partitions configured into the zeebe nodes',\n validator: numberMin1Validator,\n },\n storage: {\n storageClassName: {\n type: 'text',\n placeholder: 'e.g. fast-v2',\n validator: notEmptyStringValidator,\n description:\n 'This needs to be set to a storageclass present in the k8s system. Can not be undefined if one value in storage: is set',\n },\n resources: {\n requests: {\n storage: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: quantityValidator,\n description: 'The initial storage size of the statefulset',\n },\n },\n limits: {\n storage: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: quantityValidator,\n description: 'The upper limit the pvc autoscaler can scale up to',\n },\n },\n },\n autoResizing: {\n threshold: {\n type: 'text',\n placeholder: 'e.g. 10%',\n validator: thresholdValidator,\n description:\n 'The free space percentage threshold where vpc autoscaling will kicks in. (example 10%)',\n },\n increase: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: quantityValidator,\n description:\n 'The amount of disk space which is added as soon as autoscaling kicks in. (example 2Gi)',\n },\n },\n },\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of a zeebe broker, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of a zeebe broker, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of a zeebe broker, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a zeebe broker, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n dataRetentionDays: {\n notOnClusterPlan: true,\n type: 'number',\n placeholder: 'e.g. 7',\n validator: numberMin0OrUndefinedValidator,\n description: 'number of days for zeebe broker retention',\n },\n },\n gateway: {\n replicas: {\n type: 'number',\n placeholder: 'e.g. 0',\n validator: numberValidator,\n description: 'number of gateways',\n },\n standalone: {\n type: 'checkbox',\n placeholder: undefined,\n validator: undefinedOrBooleanStringValidator,\n description: 'if this is a standalone gateway',\n },\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of an gateway pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of an gateway pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of an gateway pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a an gateway pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n },\n },\n operate: {\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of an operate pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of an operate pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of an operate pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a an operate pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin1Validator,\n description: 'the replication for operate',\n },\n dataRetentionDays: {\n notOnClusterPlan: true,\n type: 'number',\n placeholder: 'e.g. 7',\n validator: numberMin0OrUndefinedValidator,\n description: 'number of days for operate retention',\n },\n },\n elasticsearch: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of an elastic node, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of an elastic node, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of an elastic node, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a an elastic node, e.g. 150m, 0.5, 1',\n },\n },\n },\n config: {\n nodesCount: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin1Validator,\n description:\n 'The count of elasticsearch nodes - e.g. how many pods it runs, if its value is more than 1 it is deployed through the elastic-operator',\n },\n storage: {\n storageClassName: {\n type: 'text',\n placeholder: 'e.g. fast-v2',\n validator: notEmptyStringValidator,\n description:\n 'This needs to be set to a storageclass present in the k8s system. Can not be undefined if one value in storage: is set',\n },\n resources: {\n requests: {\n storage: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: quantityValidator,\n description: 'The initial storage size of the statefulset',\n },\n },\n limits: {\n storage: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: undefinedOrQuantityValidator,\n description: 'The upper limit the pvc autoscaler can scale up to',\n },\n },\n },\n autoResizing: {\n threshold: {\n type: 'text',\n placeholder: 'e.g. 10%',\n validator: thresholdValidator,\n description:\n 'The free space percentage threshold where pvc autoscaling kicks in. (example 10%)',\n },\n increase: {\n type: 'text',\n placeholder: 'e.g. 1GiB',\n validator: quantityValidator,\n description:\n 'The amount of disk space which is added as soon as autoscaling kicks in. (example 2Gi)',\n },\n },\n },\n },\n },\n tasklist: {\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of a tasklist pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of a tasklist pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of a tasklist pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a a tasklist pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin0OrUndefinedValidator,\n description: 'the replication for tasklist',\n },\n dataRetentionDays: {\n notOnClusterPlan: true,\n type: 'number',\n placeholder: 'e.g. 7',\n validator: numberMin0OrUndefinedValidator,\n description: 'number of days for tasklist retention',\n },\n },\n optimize: {\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory limit of a optimize pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of a optimize pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description: 'Memory request of a optimize pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU request of a a optimize pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin0OrUndefinedValidator,\n description: 'the replication for optimize',\n },\n dataRetentionDays: {\n notOnClusterPlan: true,\n type: 'number',\n placeholder: 'e.g. 7',\n validator: numberMin0OrUndefinedValidator,\n description: 'number of days for optimize retention',\n },\n },\n zeebeAnalytics: {\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description:\n 'Memory limit of a zeebeAnalytics pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description: 'CPU limit of a zeebeAnalytics pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description:\n 'Memory request of a zeebeAnalytics pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description:\n 'CPU request of a a zeebeAnalytics pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin0OrUndefinedValidator,\n description: 'the replication for zeebeAnalytics',\n },\n },\n connectorBridge: {\n backend: {\n resources: {\n limits: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description:\n 'Memory limit of a connectorBridge pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description:\n 'CPU limit of a connectorBridge pod, e.g. 150m, 0.5, 1',\n },\n },\n requests: {\n memory: {\n type: 'text',\n placeholder: 'e.g. 150Mi',\n validator: undefinedOrQuantityValidator,\n description:\n 'Memory request of a connectorBridge pod, e.g. 150Mi, 2Gi',\n },\n cpu: {\n type: 'text',\n placeholder: 'e.g. 200m',\n validator: undefinedOrQuantityValidator,\n description:\n 'CPU request of a a connectorBridge pod, e.g. 150m, 0.5, 1',\n },\n },\n },\n envVars: {\n type: 'textarea',\n placeholder: 'e.g. TEST=123',\n validator: undefinedOrEnvVarsValidator,\n description:\n 'env vars going into the system, no linebreakes are allowed',\n },\n },\n replicas: {\n type: 'number',\n placeholder: 'e.g. 1',\n validator: numberMin0OrUndefinedValidator,\n description: 'the replication for connectorBridge',\n },\n },\n reconciliation: {\n paused: {\n notOnClusterPlan: true,\n type: 'checkbox',\n placeholder: undefined,\n validator: undefinedOrBooleanStringValidator,\n description: 'pause reconciliation of the cluster CRD',\n },\n },\n}\n"],
|
|
5
|
+
"mappings": "AAMA,SAAS,oBAAoB;AA0BtB,MAAM,yBAAyB,CACpC,SACiC,OAAO,KAAK,SAAS;AAMxD,MAAM,iBACJ;AACF,MAAM,kBAAkB;AAExB,MAAM,kBAAkB,CAAC,QAAa;AACpC,QAAM,MAAM,OAAO,GAAG;AACtB,SAAO,CAAC,OAAO,MAAM,GAAG;AAC1B;AAEA,MAAM,0BAA0B,CAAC,QAAgB;AAC/C,SAAO,QAAQ,UAAa,IAAI,SAAS;AAC3C;AAEA,MAAM,sBAAsB,CAAC,QAAa;AACxC,SAAO,gBAAgB,GAAG,KAAK,OAAO,GAAG,IAAI;AAC/C;AAEA,MAAM,iCAAiC,CAAC,QAAa;AACnD,SAAO,CAAC,OAAQ,gBAAgB,GAAG,KAAK,OAAO,GAAG,KAAK;AACzD;AAEA,MAAM,qBAAqB,CAAC,QAAgB;AAC1C,SAAO,gBAAgB,KAAK,GAAG;AACjC;AAEA,MAAM,oBAAoB,CAAC,QAAgB;AACz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A,MACF;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,aAAa;AAAA,QACb,WAAW;AAAA,QACX,aACE;AAAA,MACJ;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,WAAW;AAAA,MACX,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,QAAQ;AAAA,MACN,kBAAkB;AAAA,MAClB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,WAAW;AAAA,MACX,aAAa;AAAA,IACf;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* canonicalPlanKey maps a dotted plan key to the path that Console reads. A
|
|
3
|
+
* legacy `operate.elasticsearch.*` key becomes `elasticsearch.*`. Other keys
|
|
4
|
+
* come back unchanged.
|
|
5
|
+
*/
|
|
6
|
+
export declare const canonicalPlanKey: (key: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* canonicalPlan returns a cluster plan config with `operate.elasticsearch`
|
|
9
|
+
* merged under the top-level `elasticsearch`. If a field is set in both places,
|
|
10
|
+
* the top-level value wins: two records merge field by field, and any other
|
|
11
|
+
* top-level value, `null` included, replaces the legacy value. The input does
|
|
12
|
+
* not change. A plan without the
|
|
13
|
+
* legacy block comes back as the same object, and a value that is not a record
|
|
14
|
+
* comes back unchanged.
|
|
15
|
+
*
|
|
16
|
+
* The result is typed as a plain record, not as the input type: the input type
|
|
17
|
+
* still declares `operate.elasticsearch`, which the result does not have.
|
|
18
|
+
*/
|
|
19
|
+
export declare function canonicalPlan(plan: Record<string, unknown>): Record<string, unknown>;
|
|
20
|
+
export declare function canonicalPlan(plan: unknown): unknown;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const LEGACY_ELASTICSEARCH_PREFIX = "operate.elasticsearch.";
|
|
2
|
+
const canonicalPlanKey = (key) => key.startsWith(LEGACY_ELASTICSEARCH_PREFIX) ? key.slice("operate.".length) : key;
|
|
3
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
|
+
const mergeTopLevelWins = (legacy, top) => {
|
|
5
|
+
if (top === void 0) {
|
|
6
|
+
return legacy;
|
|
7
|
+
}
|
|
8
|
+
if (!isRecord(legacy) || !isRecord(top)) {
|
|
9
|
+
return top;
|
|
10
|
+
}
|
|
11
|
+
const merged = { ...legacy };
|
|
12
|
+
for (const [key, value] of Object.entries(top)) {
|
|
13
|
+
merged[key] = mergeTopLevelWins(legacy[key], value);
|
|
14
|
+
}
|
|
15
|
+
return merged;
|
|
16
|
+
};
|
|
17
|
+
function canonicalPlan(plan) {
|
|
18
|
+
if (!isRecord(plan) || !isRecord(plan.operate) || plan.operate.elasticsearch === void 0) {
|
|
19
|
+
return plan;
|
|
20
|
+
}
|
|
21
|
+
const { elasticsearch: legacy, ...operate } = plan.operate;
|
|
22
|
+
return {
|
|
23
|
+
...plan,
|
|
24
|
+
operate,
|
|
25
|
+
elasticsearch: mergeTopLevelWins(legacy, plan.elasticsearch)
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
canonicalPlan,
|
|
30
|
+
canonicalPlanKey
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=elasticsearchPlanPath.utils.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/elasticsearchPlanPath.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\n// Modification configs and exported plan JSON from before 2026-10 keep the\n// Elasticsearch config under `operate.elasticsearch`. The console-backend\n// migration 1790923213607 moved it in the stored plans. The ZeebeCluster\n// resource reads it from the top-level `spec.elasticsearch` only\n// (camunda-operator#5124), so the top-level `elasticsearch` is the canonical\n// plan path.\nconst LEGACY_ELASTICSEARCH_PREFIX = 'operate.elasticsearch.'\n\n/**\n * canonicalPlanKey maps a dotted plan key to the path that Console reads. A\n * legacy `operate.elasticsearch.*` key becomes `elasticsearch.*`. Other keys\n * come back unchanged.\n */\nexport const canonicalPlanKey = (key: string): string =>\n key.startsWith(LEGACY_ELASTICSEARCH_PREFIX)\n ? key.slice('operate.'.length)\n : key\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n\n// ObjectMergeUtils.merge does not fit here: it keeps a legacy object when the\n// top-level value is `null` or a scalar, and a legacy array when it is `null`.\nconst mergeTopLevelWins = (legacy: unknown, top: unknown): unknown => {\n if (top === undefined) {\n return legacy\n }\n if (!isRecord(legacy) || !isRecord(top)) {\n return top\n }\n const merged: Record<string, unknown> = { ...legacy }\n for (const [key, value] of Object.entries(top)) {\n merged[key] = mergeTopLevelWins(legacy[key], value)\n }\n return merged\n}\n\n/**\n * canonicalPlan returns a cluster plan config with `operate.elasticsearch`\n * merged under the top-level `elasticsearch`. If a field is set in both places,\n * the top-level value wins: two records merge field by field, and any other\n * top-level value, `null` included, replaces the legacy value. The input does\n * not change. A plan without the\n * legacy block comes back as the same object, and a value that is not a record\n * comes back unchanged.\n *\n * The result is typed as a plain record, not as the input type: the input type\n * still declares `operate.elasticsearch`, which the result does not have.\n */\nexport function canonicalPlan(\n plan: Record<string, unknown>,\n): Record<string, unknown>\nexport function canonicalPlan(plan: unknown): unknown\nexport function canonicalPlan(plan: unknown): unknown {\n if (\n !isRecord(plan) ||\n !isRecord(plan.operate) ||\n plan.operate.elasticsearch === undefined\n ) {\n return plan\n }\n const { elasticsearch: legacy, ...operate } = plan.operate\n return {\n ...plan,\n operate,\n elasticsearch: mergeTopLevelWins(legacy, plan.elasticsearch),\n }\n}\n"],
|
|
5
|
+
"mappings": "AAYA,MAAM,8BAA8B;AAO7B,MAAM,mBAAmB,CAAC,QAC/B,IAAI,WAAW,2BAA2B,IACtC,IAAI,MAAM,WAAW,MAAM,IAC3B;AAEN,MAAM,WAAW,CAAC,UAChB,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAIrE,MAAM,oBAAoB,CAAC,QAAiB,QAA0B;AACpE,MAAI,QAAQ,QAAW;AACrB,WAAO;AAAA,EACT;AACA,MAAI,CAAC,SAAS,MAAM,KAAK,CAAC,SAAS,GAAG,GAAG;AACvC,WAAO;AAAA,EACT;AACA,QAAM,SAAkC,EAAE,GAAG,OAAO;AACpD,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,GAAG,GAAG;AAC9C,WAAO,GAAG,IAAI,kBAAkB,OAAO,GAAG,GAAG,KAAK;AAAA,EACpD;AACA,SAAO;AACT;AAkBO,SAAS,cAAc,MAAwB;AACpD,MACE,CAAC,SAAS,IAAI,KACd,CAAC,SAAS,KAAK,OAAO,KACtB,KAAK,QAAQ,kBAAkB,QAC/B;AACA,WAAO;AAAA,EACT;AACA,QAAM,EAAE,eAAe,QAAQ,GAAG,QAAQ,IAAI,KAAK;AACnD,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA,eAAe,kBAAkB,QAAQ,KAAK,aAAa;AAAA,EAC7D;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|