@firestartr/cli 1.53.0-snapshot-1 → 1.53.0-snapshot-2

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/build/index.js CHANGED
@@ -355535,32 +355535,9 @@ class GlobalDefault extends DefaultSection {
355535
355535
  }
355536
355536
  }
355537
355537
 
355538
- ;// CONCATENATED MODULE: ../cdk8s_renderer/src/defaults/oneWayDefs.ts
355539
- // this function ensures that there are some specs that have to be defined
355540
- // anew and cannot be fed back from the previous CR
355541
- //
355542
- // The only definition is the one in the claim-level and the resulting rendered CR
355543
- // Thus it performs a nullify of the designed patches
355544
-
355545
-
355546
- const ONE_WAY_DEFINITIONS = ['/spec/vars'];
355547
- function applyOneWayDefs(crSpecs) {
355548
- const crSpecsClone = JSON.parse(JSON.stringify(crSpecs));
355549
- for (const defPath of ONE_WAY_DEFINITIONS) {
355550
- if (hasDeepPath(crSpecs, defPath)) {
355551
- fast_json_patch_default().applyPatch(crSpecsClone, [{ op: 'remove', path: defPath }]);
355552
- }
355553
- }
355554
- return crSpecsClone;
355555
- }
355556
- function hasDeepPath(data, deepPath) {
355557
- return lodash_default().has(data, deepPath.replace(/\//g, '.').replace(/^\./, ''));
355558
- }
355559
-
355560
355538
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/defaults/initializer.ts
355561
355539
 
355562
355540
 
355563
-
355564
355541
  /*
355565
355542
  * This class extends DefaultSection and recieves arbitrary CR data to
355566
355543
  * create a patch object (CustomResourceDefaultsPatch) capable of:
@@ -355631,11 +355608,10 @@ class InitializerDefault extends DefaultSection {
355631
355608
  let patchData = {};
355632
355609
  if (previousCR?.spec) {
355633
355610
  // This code add fields present in this.data but missing in
355634
- // previousCR.spec into the later
355635
- const previousCRCurated = applyOneWayDefs(previousCR);
355636
- const fieldsToAddPatches = fast_json_patch_default().compare(previousCRCurated.spec, this.data)
355611
+ // previousCR.spec into the latter
355612
+ const fieldsToAddPatches = fast_json_patch_default().compare(previousCR.spec, this.data)
355637
355613
  .filter((op) => op.op === 'add');
355638
- patchData = fast_json_patch_default().applyPatch(previousCRCurated.spec, fieldsToAddPatches).newDocument;
355614
+ patchData = fast_json_patch_default().applyPatch(previousCR.spec, fieldsToAddPatches).newDocument;
355639
355615
  }
355640
355616
  else {
355641
355617
  patchData = this.data;
@@ -357701,6 +357677,7 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
357701
357677
  },
357702
357678
  owner: {
357703
357679
  type: 'string',
357680
+ pattern: '^(user|group):[a-zA-Z0-9_-]+$',
357704
357681
  },
357705
357682
  },
357706
357683
  required: ['description', 'owner'],
@@ -358923,7 +358900,7 @@ function applyBlockAwareDefaults(claim, defaultClaim) {
358923
358900
  // we remove the blocks entirely of the claim
358924
358901
  // to achieve an add copy
358925
358902
  for (const defaultBlockPath of defaultBlocksPaths) {
358926
- if (claimsDefaulter_hasDeepPath(claimClone, defaultBlockPath) !== true)
358903
+ if (hasDeepPath(claimClone, defaultBlockPath) !== true)
358927
358904
  continue;
358928
358905
  const originalValue = fast_json_patch_default().getValueByPointer(claimClone, defaultBlockPath);
358929
358906
  if (originalValue) {
@@ -358951,7 +358928,7 @@ function applyBlockAwareDefaults(claim, defaultClaim) {
358951
358928
  });
358952
358929
  return fast_json_patch_default().applyPatch(claimClone, jsonPatchOps).newDocument;
358953
358930
  }
358954
- function claimsDefaulter_hasDeepPath(data, deepPath) {
358931
+ function hasDeepPath(data, deepPath) {
358955
358932
  return lodash_default().has(data, deepPath.replace(/\//g, '.').replace(/^\./, ''));
358956
358933
  }
358957
358934
 
@@ -20,6 +20,7 @@ declare const _default: {
20
20
  };
21
21
  owner: {
22
22
  type: string;
23
+ pattern: string;
23
24
  };
24
25
  };
25
26
  required: string[];
@@ -276,6 +276,7 @@ declare const schemas: {
276
276
  };
277
277
  owner: {
278
278
  type: string;
279
+ pattern: string;
279
280
  };
280
281
  };
281
282
  required: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "1.53.0-snapshot-1",
3
+ "version": "1.53.0-snapshot-2",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",
@@ -1 +0,0 @@
1
- export declare function applyOneWayDefs(crSpecs: any): any;