<commit_before>version: 2
jobs:
  build:
    docker:
      - image: circleci/node:9.11
    environment:
      CIRCLE_ARTIFACTS: "~"
    steps:
      - checkout
      - restore_cache:
          key: npm-sane-reports-{{ checksum "package.json" }}
      - run:
          name: Install dependencies
          command: |
              npm install -g npm
              npm install
      - save_cache:
          key: npm-sane-reports-{{ checksum "package.json" }}
          paths:
            - node_modules
      - run:
          name: Build
          command: npm run production
      - run:
          name: Test
          command: |
              npm run lint
              npm run coverage
      - run:
          name: Create Artifact
          command:  tar -cvf sane-report.tar dist reportsServer.js
      - store_artifacts:
          path: sane-report.tar
          destination: sane-report
      - run:
          name: Deploy
          command: |
              mkdir sane-reports
              cp -avR dist sane-reports
              cp -avR templates sane-reports
              cp package.json sane-reports
              cp LICENSE sane-reports
              cp README.md sane-reports
              cp reportsServer.js sane-reports
              cd sane-reports
              npm set //registry.npmjs.org/:_authToken=${NPM_TOKEN}
              npm publish sane-reports<commit_msg>added sudo<commit_after>version: 2
jobs:
  build:
    docker:
      - image: circleci/node:9.11
    environment:
      CIRCLE_ARTIFACTS: "~"
    steps:
      - checkout
      - restore_cache:
          key: npm-sane-reports-{{ checksum "package.json" }}
      - run:
          name: Install dependencies
          command: |
              sudo npm install -g npm
              sudo npm install
      - save_cache:
          key: npm-sane-reports-{{ checksum "package.json" }}
          paths:
            - node_modules
      - run:
          name: Build
          command: npm run production
      - run:
          name: Test
          command: |
              npm run lint
              npm run coverage
      - run:
          name: Create Artifact
          command:  tar -cvf sane-report.tar dist reportsServer.js
      - store_artifacts:
          path: sane-report.tar
          destination: sane-report
      - run:
          name: Deploy
          command: |
              mkdir sane-reports
              cp -avR dist sane-reports
              cp -avR templates sane-reports
              cp package.json sane-reports
              cp LICENSE sane-reports
              cp README.md sane-reports
              cp reportsServer.js sane-reports
              cd sane-reports
              sudo npm set //registry.npmjs.org/:_authToken=${NPM_TOKEN}
              sudo npm publish sane-reports
{'fraction_non_alphanumeric': 0.07623157137720245, 'fraction_numerical': 0.002876663070837828, 'mean_word_length': 1.2953795379537953, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '726230', 'n_tokens_mistral': 817, 'n_tokens_neox': 727, 'n_words': 204}