<commit_before>const fs = require('fs');
const path = require('path');
const koa = require('koa');
const ejs = require('koa-ejs');
const cors = require('koa-cors');
const jsonp = require('koa-jsonp');
const route = require('koa-route');
const logger = require('koa-logger');
const bodyParser = require('koa-body-parser');
const koaQs = require('koa-qs');

const app = koa();
const port = process.env.PORT || 9877;

koaQs(app);
app.use(bodyParser());
app.use(jsonp());
app.use(cors({
  credentials: true,
  headers: [
    'Accept', 'Accept-Encoding', 'Accept-Language',
    'Content-Type', 'Origin', 'User-Agent',
    'X-Requested-With'
  ],
  methods: ['GET', 'POST', 'OPTIONS']
}));

ejs(app, { root: __dirname, layout: false, viewExt: 'html.ejs' });

app.use(route.get('/coupons/:id', json));
app.use(route.post('/events', ok));
app.use(route.get('/fraud_data_collector', json));
app.use(route.get('/gift_cards/:id', json));
app.use(route.get('/plans/:plan_id', json));
app.use(route.get('/plans/:plan_id/coupons/:id', json));
app.use(route.get('/tax', json));

app.use(route.get('/token', json));
app.use(route.post('/token', json));

app.use(route.get('/paypal/start', postMessage));<commit_msg>Fixes JSONP reporting errors in specs<commit_after>const fs = require('fs');
const path = require('path');
const koa = require('koa');
const ejs = require('koa-ejs');
const cors = require('koa-cors');
const jsonp = require('koa-jsonp');
const route = require('koa-route');
const logger = require('koa-logger');
const bodyParser = require('koa-body-parser');
const koaQs = require('koa-qs');

const app = koa();
const port = process.env.PORT || 9877;

koaQs(app);
app.use(bodyParser());
app.use(jsonp());
app.use(cors({
  credentials: true,
  headers: [
    'Accept', 'Accept-Encoding', 'Accept-Language',
    'Content-Type', 'Origin', 'User-Agent',
    'X-Requested-With'
  ],
  methods: ['GET', 'POST', 'OPTIONS']
}));

ejs(app, { root: __dirname, layout: false, viewExt: 'html.ejs' });

app.use(route.get('/coupons/:id', json));
app.use(route.get('/events', ok));
app.use(route.post('/events', ok));
app.use(route.get('/fraud_data_collector', json));
app.use(route.get('/gift_cards/:id', json));
app.use(route.get('/plans/:plan_id', json));
app.use(route.get('/plans/:plan_id/coupons/:id', json));
app.use(route.get('/tax', json));
app.use(route.get('/token', json));
app.use(route.post('/token', json));

app.use(route.get('/paypal/start', postMessage));
{'fraction_non_alphanumeric': 0.23493485342019543, 'fraction_numerical': 0.003257328990228013, 'mean_word_length': 5.56951871657754, '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': '1265199', 'n_tokens_mistral': 909, 'n_tokens_neox': 915, 'n_words': 170}