{"size": 1664, "ext": "js", "max_stars_repo_path": "index.js", "max_stars_repo_name": "mapbox/cloudfriend", "max_stars_repo_stars_event_min_datetime": "2016-07-30T22:11:42.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T02:14:43.000Z", "max_issues_repo_path": "index.js", "max_issues_repo_name": "mapbox/cloudfriend", "max_issues_repo_issues_event_min_datetime": "2016-09-01T03:41:15.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-28T15:48:41.000Z", "max_forks_repo_path": "index.js", "max_forks_repo_name": "mapbox/cloudfriend", "max_forks_repo_forks_event_min_datetime": "2016-10-11T18:44:49.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-12T15:10:18.000Z"}
{"max_stars_count": 60, "max_issues_count": 77, "max_forks_count": 11, "avg_line_length": 22.1866666667, "max_line_length": 82, "alphanum_fraction": 0.5655048077}
'use strict';

const intrinsic = require('./lib/intrinsic');
const conditions = require('./lib/conditions');
const rules = require('./lib/rules');
const pseudo = require('./lib/pseudo');
const build = require('./lib/build');
const validate = require('./lib/validate');
const merge = require('./lib/merge');
const shortcuts = require('./lib/shortcuts');

/**
 * The cloudfriend module
 *
 * @example
 * var cloudfriend = require('cloudfriend');
 */
const cloudfriend = module.exports = {
  build,
  validate,
  merge,
  shortcuts
};

Object.keys(intrinsic).forEach((key) => {
  cloudfriend[key] = intrinsic[key];
});

Object.keys(conditions).forEach((key) => {
  cloudfriend[key] = conditions[key];
});

Object.keys(rules).forEach((key) => {
  cloudfriend[key] = rules[key];
});

Object.keys(pseudo).forEach((key) => {
  cloudfriend[key] = pseudo[key];
});

cloudfriend.permissions = {
  AWSTemplateFormatVersion: '2010-09-09',
  Resources: {
    User: {
      Type: 'AWS::IAM::User',
      Properties: {
        Policies: [
          {
            PolicyName: 'validate-templates',
            PolicyDocument: {
              Statement: [
                {
                  Action: 'cloudformation:ValidateTemplate',
                  Effect: 'Allow',
                  Resource: '*'
                }
              ]
            }
          }
        ]
      }
    },
    AccessKey: {
      Type: 'AWS::IAM::AccessKey',
      Properties: {
        UserName: cloudfriend.ref('User')
      }
    }
  },
  Outputs: {
    AccessKeyId: { Value: cloudfriend.ref('AccessKey') },
    SecretAccessKey: { Value: cloudfriend.getAtt('AccessKey', 'SecretAccessKey') }
  }
};
