@eudiplo/cli 10.1.0-main.566bc19 → 10.1.0-main.579636e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +50 -50
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -43608,55 +43608,6 @@ var CONFIG_SCHEMAS = [
43608
43608
  }
43609
43609
  ];
43610
43610
 
43611
- // ../../packages/eudiplo-config-format/dist/config-validator.js
43612
- var DISPLAY_COLOR_PATH = /^\/spec\/config\/display\/\d+\/(?:background|text)_color$/;
43613
- var ajv = new import__.Ajv2020({
43614
- allErrors: true,
43615
- strict: false,
43616
- validateFormats: false
43617
- });
43618
- for (const schema of CONFIG_SCHEMAS)
43619
- ajv.addSchema(schema);
43620
- function validateConfigDocument(document) {
43621
- const file = serializeDocument(document);
43622
- const validate = ajv.getSchema(file.$schema);
43623
- if (!validate)
43624
- throw new Error(`No bundled validator for ${file.$schema}`);
43625
- const issues = [];
43626
- if (!validate(file)) {
43627
- for (const issue of validate.errors ?? [])
43628
- issues.push({
43629
- severity: "error",
43630
- code: "CONFIG_SCHEMA_VALIDATION_FAILED",
43631
- path: issue.instancePath || "/",
43632
- message: issue.keyword === "additionalProperties" ? `Unknown property: ${String(issue.params.additionalProperty)}` : issue.keyword === "pattern" && DISPLAY_COLOR_PATH.test(issue.instancePath) ? DISPLAY_COLOR_MESSAGE : issue.message ?? "Invalid configuration",
43633
- resource: { kind: document.kind, id: resourceId(document) }
43634
- });
43635
- }
43636
- const id = document.kind === "Client" ? document.spec.clientId : document.spec.id;
43637
- if (id !== void 0 && id !== resourceId(document))
43638
- issues.push({
43639
- severity: "error",
43640
- code: "RESOURCE_ID_MISMATCH",
43641
- path: document.kind === "Client" ? "/spec/clientId" : "/spec/id",
43642
- message: "Resource identifier does not match metadata.id"
43643
- });
43644
- issues.push(...configRuleIssues(document));
43645
- return issues;
43646
- }
43647
- function configRuleIssues(document) {
43648
- const display = document.spec.config?.display;
43649
- if (document.kind !== "CredentialConfig" || resolveConfigIdentity(serializeDocument(document)).version < 4 || !Array.isArray(display))
43650
- return [];
43651
- return findDuplicateDisplayLocales(display).map((duplicate) => ({
43652
- severity: "error",
43653
- code: "DISPLAY_LOCALE_DUPLICATE",
43654
- path: `/spec/config/display/${duplicate.index}/locale`,
43655
- message: duplicateDisplayLocaleMessage(duplicate),
43656
- resource: { kind: document.kind, id: resourceId(document) }
43657
- }));
43658
- }
43659
-
43660
43611
  // ../../packages/eudiplo-config-format/dist/config-values.js
43661
43612
  var isVariableChar = (char) => char >= "A" && char <= "Z" || char >= "0" && char <= "9" || char === "_";
43662
43613
  var isLower = (char) => char >= "a" && char <= "z";
@@ -43854,6 +43805,55 @@ function configChanges(before, after, sensitivePaths = [], prefix = "") {
43854
43805
  return changes;
43855
43806
  }
43856
43807
 
43808
+ // ../../packages/eudiplo-config-format/dist/config-validator.js
43809
+ var DISPLAY_COLOR_PATH = /^\/spec\/config\/display\/\d+\/(?:background|text)_color$/;
43810
+ var ajv = new import__.Ajv2020({
43811
+ allErrors: true,
43812
+ strict: false,
43813
+ validateFormats: false
43814
+ });
43815
+ for (const schema of CONFIG_SCHEMAS)
43816
+ ajv.addSchema(schema);
43817
+ function validateConfigDocument(document) {
43818
+ const file = serializeDocument(document);
43819
+ const validate = ajv.getSchema(file.$schema);
43820
+ if (!validate)
43821
+ throw new Error(`No bundled validator for ${file.$schema}`);
43822
+ const issues = [];
43823
+ if (!validate(file)) {
43824
+ for (const issue of validate.errors ?? [])
43825
+ issues.push({
43826
+ severity: "error",
43827
+ code: "CONFIG_SCHEMA_VALIDATION_FAILED",
43828
+ path: issue.instancePath || "/",
43829
+ message: issue.keyword === "additionalProperties" ? `Unknown property: ${String(issue.params.additionalProperty)}` : issue.keyword === "pattern" && DISPLAY_COLOR_PATH.test(issue.instancePath) ? DISPLAY_COLOR_MESSAGE : issue.message ?? "Invalid configuration",
43830
+ resource: { kind: document.kind, id: resourceId(document) }
43831
+ });
43832
+ }
43833
+ const id = document.kind === "Client" ? document.spec.clientId : document.spec.id;
43834
+ if (id !== void 0 && id !== resourceId(document))
43835
+ issues.push({
43836
+ severity: "error",
43837
+ code: "RESOURCE_ID_MISMATCH",
43838
+ path: document.kind === "Client" ? "/spec/clientId" : "/spec/id",
43839
+ message: "Resource identifier does not match metadata.id"
43840
+ });
43841
+ issues.push(...configRuleIssues(document));
43842
+ return issues;
43843
+ }
43844
+ function configRuleIssues(document) {
43845
+ const display = document.spec.config?.display;
43846
+ if (document.kind !== "CredentialConfig" || resolveConfigIdentity(serializeDocument(document)).version < 4 || !Array.isArray(display))
43847
+ return [];
43848
+ return findDuplicateDisplayLocales(display).map((duplicate) => ({
43849
+ severity: "error",
43850
+ code: "DISPLAY_LOCALE_DUPLICATE",
43851
+ path: `/spec/config/display/${duplicate.index}/locale`,
43852
+ message: duplicateDisplayLocaleMessage(duplicate),
43853
+ resource: { kind: document.kind, id: resourceId(document) }
43854
+ }));
43855
+ }
43856
+
43857
43857
  // ../../packages/eudiplo-config-format/dist/tenant-folder.js
43858
43858
  var TENANT_FOLDER_IMAGES = "images";
43859
43859
  var IMAGE_CONTENT_TYPES = {
@@ -47201,7 +47201,7 @@ function createDeploymentCommands(context, setExitCode) {
47201
47201
  // package.json
47202
47202
  var package_default = {
47203
47203
  name: "@eudiplo/cli",
47204
- version: "10.1.0-main.566bc19",
47204
+ version: "10.1.0-main.579636e",
47205
47205
  description: "Deployment-aware command line tools for EUDIPLO",
47206
47206
  private: false,
47207
47207
  type: "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eudiplo/cli",
3
- "version": "10.1.0-main.566bc19",
3
+ "version": "10.1.0-main.579636e",
4
4
  "description": "Deployment-aware command line tools for EUDIPLO",
5
5
  "private": false,
6
6
  "type": "module",