npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

autocontext-oil-gas-connectors

v0.34.0

Published

Optional connector target presets, generic import CLI, HTTP/API adapters, and contract-test harness for autocontext-oil-gas-core.

Readme

autocontext-oil-gas-connectors

Optional connector target presets, Ares-style import presets, and HTTP/API adapter factories for autocontext-oil-gas-core.

This package keeps the core package vendor-neutral while making org integrations easier to wire.

Install

npm install autocontext-oil-gas-connectors autocontext-oil-gas-core

Targets

  • Public/regulatory: EIA, BSEE, Texas RRC, NDIC, Oklahoma OCC, CalGEM, FracFocus.
  • Licensed/vendor: Enverus, Wood Mackenzie, S&P Global Commodity Insights, IHS/S&P North American Upstream API-style integrations.
  • Backoffice exports: Ares-style CSV/JSON production, LOS/JIB, budget, and revenue import presets.

Key APIs

  • CONNECTOR_TARGETS
  • listConnectorTargets
  • inspectAresImportFile
  • inspectAresImportRows
  • loadAresProductionDatasetFromFile
  • loadAresLeaseOperatingStatementFromFile
  • loadAresLeaseOperatingBudgetFromFile
  • loadAresRevenueStatementFromFile
  • runAresMonthlyOperatingReview
  • createConnectorSourcePack
  • createTargetHttpProductionConnector
  • createPaginatedHttpProductionConnector
  • createEnverusProductionConnector
  • createEiaProductionConnector
  • createWoodMacProductionConnector
  • createSpGlobalProductionConnector
  • createIhsNorthAmericanProductionConnector
  • validateConnectorConfig
  • createProductionConnectorFromConfig
  • createConnectorSourcePackFromConfig
  • smokeTestConnectorConfig
  • runConnectorContractTest
  • connectorLiveContractReadiness
  • listConnectorConfigEnvironmentVariables
  • renderConnectorContractTestMarkdown

Ares-style imports

import { inspectAresImportFile, loadAresLeaseOperatingStatementFromFile } from "autocontext-oil-gas-connectors";

const inspection = await inspectAresImportFile("ares-los.csv", "lease_operating_statement", {
  fieldMapping: { wellId: "Asset", month: "Acct Month", amountUsd: "Net Cost" },
});
if (inspection.status === "fail") throw new Error(`Missing columns: ${inspection.missingRequiredFields.join(", ")}`);
const statement = await loadAresLeaseOperatingStatementFromFile("ares-los.csv");

CLI inspection:

oil-gas-impact-connectors inspect-ares-import --kind revenue_statement --input ares-revenue.csv --mapping mapping.json --json
# Generic alias for non-Ares exports using the same mapping file shape:
oil-gas-impact-connectors inspect-import --profile custom --kind revenue_statement --input export.csv --mapping mapping.json --json
# Write a fill-in mapping template from the selected import kind:
oil-gas-impact-connectors inspect-import --profile custom --kind revenue_statement --input export.csv --write-mapping-template mapping.template.json

For one-call monthly review over Ares-style exports:

oil-gas-impact-connectors run-ares-monthly-operating-review \
  --production ares-production.csv \
  --statement ares-los.csv \
  --budget ares-budget.csv \
  --revenue ares-revenue.csv \
  --ownership ownership.json \
  --run-dir runs/ares-monthly
# Generic alias:
oil-gas-impact-connectors run-monthly-operating-review-import --profile custom \
  --production production.csv --statement costs.csv --revenue revenue.csv --run-dir runs/imported-monthly

Or use runAresMonthlyOperatingReview from TypeScript.

These are file import presets only, not direct Ares API/auth connectors. Inspect first, then pass fieldMapping/--mapping when your export headers differ.

Connector contract tests

Use runConnectorContractTest to verify an org/vendor connector config without making live network calls by default. The harness validates credential-safe config, creates a source pack, runs a mockable smoke test, checks canonical fields/source IDs, and verifies configured credential values are redacted from the result.

import { runConnectorContractTest } from "autocontext-oil-gas-connectors";

const result = await runConnectorContractTest(connectorConfig, {
  mode: "mock",
  env: { ENVERUS_API_KEY: process.env.ENVERUS_API_KEY },
  fetchImpl: mockFetch,
  requiredFields: ["wellId", "month", "sourceId"],
  expectedSourceId: "enverus",
});

Live connector checks are opt-in. Gate them with connectorLiveContractReadiness; it requires OIL_GAS_CONNECTOR_LIVE_TESTS=true and all env-backed config variables before live network calls should be attempted.

OIL_GAS_CONNECTOR_LIVE_TESTS=true ENVERUS_API_KEY=... node your-contract-test.mjs

Do not put literal secrets in connector JSON; use auth.env and secret-manager/environment injection.

Principle

Use this package for target metadata, credential-safe adapter wiring, mockable HTTP integration, and connector contract checks. Keep actual credentials, contract-specific endpoints, and licensed data handling inside the deploying organization.