Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nx-tools/ci-context

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nx-tools/ci-context - npm Package Compare versions

Comparing version 1.0.0-beta.4 to 1.0.0

src/lib/interfaces.d.ts

6

package.json

@@ -7,5 +7,9 @@ {

"license": "MIT",
"version": "1.0.0-beta.4",
"version": "1.0.0",
"dependencies": {
"ci-info": "3.2.0",
"@actions/github": "5.0.0"
},
"main": "./src/index.js",
"typings": "./src/index.d.ts"
}

4

src/index.d.ts

@@ -1,3 +0,3 @@

export { getVendor } from './lib/ci';
export { ContextProxyFactory } from './lib/context.factory';
export { CIContext } from './lib/contexts/context';
export { RepoMetadata, RunnerContext } from './lib/interfaces';
export { RepoProxyFactory } from './lib/repo.factory';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CIContext = exports.ContextProxyFactory = exports.getVendor = void 0;
var ci_1 = require("./lib/ci");
Object.defineProperty(exports, "getVendor", { enumerable: true, get: function () { return ci_1.getVendor; } });
exports.RepoProxyFactory = exports.ContextProxyFactory = void 0;
var context_factory_1 = require("./lib/context.factory");
Object.defineProperty(exports, "ContextProxyFactory", { enumerable: true, get: function () { return context_factory_1.ContextProxyFactory; } });
var context_1 = require("./lib/contexts/context");
Object.defineProperty(exports, "CIContext", { enumerable: true, get: function () { return context_1.CIContext; } });
var repo_factory_1 = require("./lib/repo.factory");
Object.defineProperty(exports, "RepoProxyFactory", { enumerable: true, get: function () { return repo_factory_1.RepoProxyFactory; } });
//# sourceMappingURL=index.js.map

@@ -1,4 +0,3 @@

import { CIContext } from './contexts/context';
export declare class ContextProxyFactory {
static create(): CIContext;
static create(): import("./interfaces").RunnerContext;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContextProxyFactory = void 0;
const ci_1 = require("./ci");
const circle_context_1 = require("./contexts/circle.context");
const github_context_1 = require("./contexts/github.context");
const gitlab_context_1 = require("./contexts/gitlab.context");
const local_context_1 = require("./contexts/local.context");
const vendors_1 = require("./vendors");
const circle = require("./utils/circle");
const github = require("./utils/github");
const gitlab = require("./utils/gitlab");
const local = require("./utils/local");
// eslint-disable-next-line @typescript-eslint/no-var-requires
const ci = require('ci-info');
class ContextProxyFactory {
static create() {
switch (ci_1.getVendor()) {
case vendors_1.Vendor.CIRCLE:
return new circle_context_1.CircleContext();
case vendors_1.Vendor.GITHUB_ACTIONS:
return new github_context_1.GitHubContext();
case vendors_1.Vendor.GITLAB:
return new gitlab_context_1.GitLabContext();
case vendors_1.Vendor.LOCAL_MACHINE:
return new local_context_1.LocalContext();
default:
throw new Error('Unsupported runner provider');
if (!ci.isCI) {
return local.context();
}
if (ci.CIRCLE) {
return circle.context();
}
if (ci.GITHUB_ACTIONS) {
return github.context();
}
if (ci.GITLAB) {
return gitlab.context();
}
throw new Error('Unsupported runner provider');
}

@@ -25,0 +26,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc