<commit_before>import * as joinPaths from 'url-join';
import fetch from 'node-fetch';
import ShopifyError from './shopify_error';
import { resolve } from 'path';
import uri = require("jsuri");

//Get package.json from 2-levels up as this file will be in dist/infrastructure.
const version = require(resolve(__dirname, "../../package.json")).version;

export class BaseService {
    constructor(private shopDomain: string, private accessToken: string, private resource: string) {
        //Ensure resource starts with admin/
        if (! /^[\/]?admin\//ig.test(resource)) {
            this.resource = "admin/" + resource;
        }
    }

    public static buildDefaultHeaders() {
        const headers = {
            "Accept": "application/json",
            "User-Agent": `Shopify Prime ${version} (https://github.com/nozzlegear/shopify-prime)`
        }

        return headers;<commit_msg>Bugfix: don't attempt to read package.json.<commit_after>import * as joinPaths from 'url-join';
import fetch from 'node-fetch';
import ShopifyError from './shopify_error';
import { resolve } from 'path';
import uri = require("jsuri");

export class BaseService {
    constructor(private shopDomain: string, private accessToken: string, private resource: string) {
        //Ensure resource starts with admin/
        if (! /^[\/]?admin\//ig.test(resource)) {
            this.resource = "admin/" + resource;
        }
    }

    public static buildDefaultHeaders() {
        const headers = {
            "Accept": "application/json",
            "User-Agent": `Shopify Prime (https://github.com/nozzlegear/shopify-prime)`
        }

        return headers;
{'fraction_non_alphanumeric': 0.13317191283292978, 'fraction_numerical': 0.0006053268765133172, 'mean_word_length': 2.871194379391101, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4415417', 'n_tokens_mistral': 457, 'n_tokens_neox': 450, 'n_words': 131}