@nx-tools/ci-context
Advanced tools
Comparing version 1.0.0-beta.4 to 1.0.0
@@ -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" | ||
} |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 27 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
13825
2
26
221
31
1
+ Added@actions/github@5.0.0
+ Addedci-info@3.2.0
+ Added@actions/github@5.0.0(transitive)
+ Added@actions/http-client@1.0.11(transitive)
+ Added@octokit/auth-token@2.5.0(transitive)
+ Added@octokit/core@3.6.0(transitive)
+ Added@octokit/endpoint@6.0.12(transitive)
+ Added@octokit/graphql@4.8.0(transitive)
+ Added@octokit/openapi-types@12.11.0(transitive)
+ Added@octokit/plugin-paginate-rest@2.21.3(transitive)
+ Added@octokit/plugin-rest-endpoint-methods@5.16.2(transitive)
+ Added@octokit/request@5.6.3(transitive)
+ Added@octokit/request-error@2.1.0(transitive)
+ Added@octokit/types@6.41.0(transitive)
+ Addedbefore-after-hook@2.2.3(transitive)
+ Addedci-info@3.2.0(transitive)
+ Addeddeprecation@2.3.1(transitive)
+ Addedis-plain-object@5.0.0(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedtunnel@0.0.6(transitive)
+ Addeduniversal-user-agent@6.0.1(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
+ Addedwrappy@1.0.2(transitive)