@firestartr/cli 1.49.0-snapshot-3 → 1.49.0-snapshot-4

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
@@ -289019,22 +289019,15 @@ function initLogger() {
289019
289019
  const logLevel = process.env.LOG_LEVEL && isValidLogLevel(process.env.LOG_LEVEL)
289020
289020
  ? process.env.LOG_LEVEL
289021
289021
  : 'info';
289022
- const useJson = String(process.env.CI).toLowerCase() !== 'true';
289023
- const humanFormat = winston.format.printf(({ level, message }) => {
289024
- const msg = typeof message === 'string' ? message : JSON.stringify(message);
289025
- if (level === 'error')
289026
- return `::error::${msg}`;
289027
- if (level === 'warn')
289028
- return `::warning::${msg}`;
289029
- return `[${level}]: ${msg}`;
289030
- });
289031
289022
  logger = winston_default().createLogger({
289032
289023
  level: logLevel,
289033
289024
  exitOnError: false,
289034
- format: useJson
289035
- ? winston.format.combine(winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }), winston.format.json())
289036
- : winston.format.combine(winston.format.colorize(), humanFormat),
289037
- transports: [new winston.transports.Console({ level: logLevel })],
289025
+ format: winston.format.combine(winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }), winston.format.json()),
289026
+ transports: [
289027
+ new winston.transports.Console({
289028
+ level: logLevel,
289029
+ }),
289030
+ ],
289038
289031
  });
289039
289032
  initiated = true;
289040
289033
  }
@@ -302599,30 +302592,6 @@ function validateCrSizes(crs) {
302599
302592
  }
302600
302593
  }
302601
302594
 
302602
- ;// CONCATENATED MODULE: ../cdk8s_renderer/src/validations/permissions.ts
302603
-
302604
- function validatePermissionsUniqueness(crs) {
302605
- for (const crkey in crs) {
302606
- const cr = crs[crkey];
302607
- if (cr.kind === 'FirestartrGithubRepository') {
302608
- const permissions = cr.spec.permissions;
302609
- cdk8s_renderer_src_logger.debug(`Validating Permissions Uniqueness of ${crkey}`);
302610
- if (permissions) {
302611
- const seen = new Set();
302612
- for (const perm of permissions) {
302613
- const identifier = perm.collaborator
302614
- ? perm.collaborator
302615
- : `ref:${perm.ref.kind}:${perm.ref.name}`;
302616
- if (seen.has(identifier)) {
302617
- throw new Error(`Duplicate permission reference found in FirestartrGithubRepository ${crkey}: ${identifier}\nFull CR: ${JSON.stringify(cr, null, 2)}`);
302618
- }
302619
- seen.add(identifier);
302620
- }
302621
- }
302622
- }
302623
- }
302624
- }
302625
-
302626
302595
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/refsSorter/refsSorter.ts
302627
302596
 
302628
302597
  /**
@@ -307977,8 +307946,6 @@ async function renderClaim(catalogScope, firestartrScope, claim, patches, previo
307977
307946
 
307978
307947
 
307979
307948
 
307980
-
307981
-
307982
307949
  /*
307983
307950
  * Function called when rendering but not importing
307984
307951
  *
@@ -307993,15 +307960,8 @@ async function renderClaim(catalogScope, firestartrScope, claim, patches, previo
307993
307960
  async function renderer_render(catalogScope, firestartrScope, claimList) {
307994
307961
  const data = await loadClaimsList(claimList);
307995
307962
  const result = await renderClaims(catalogScope, firestartrScope, data);
307996
- try {
307997
- validateTfStateKeyUniqueness(result);
307998
- validateCrSizes(result);
307999
- validatePermissionsUniqueness(result);
308000
- }
308001
- catch (e) {
308002
- cdk8s_renderer_src_logger.error(e.message);
308003
- throw new Error(e.message);
308004
- }
307963
+ validateTfStateKeyUniqueness(result);
307964
+ validateCrSizes(result);
308005
307965
  return result;
308006
307966
  }
308007
307967
 
@@ -313791,6 +313751,16 @@ async function output(path, secrets) {
313791
313751
  return await tfExec(path, ['output', '-json'], secrets, []);
313792
313752
  }
313793
313753
  async function tfExec(path, args, secrets, extraArgs = ['-input=false'], stream) {
313754
+ // Format to TF_VAR variables -> https://developer.hashicorp.com/terraform/cli/config/environment-variables#tf_var_name
313755
+ // for (const secret of secrets) {
313756
+ // process.env[`${secret.key}`] = secret.value;
313757
+ // }
313758
+ //
313759
+ // log.info(
313760
+ // `Spawning terraform process ['terraform ${args.concat(extraArgs).join(' ')}'] in path '${path}'`,
313761
+ // );
313762
+ //
313763
+ // process.env['TF_PLUGIN_CACHE_DIR'] = '/home/terraform-plugins-cache';
313794
313764
  return new Promise((ok, ko) => {
313795
313765
  const tfProcess = (0,external_child_process_.spawn)('terraform', args.concat(extraArgs), {
313796
313766
  cwd: path,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "1.49.0-snapshot-3",
3
+ "version": "1.49.0-snapshot-4",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",
@@ -1,2 +0,0 @@
1
- import { RenderedCrMap } from '../renderer/types';
2
- export declare function validatePermissionsUniqueness(crs: RenderedCrMap): void;