@cucumber/ci-environment
Advanced tools
Comparing version 9.0.1 to 9.0.2
@@ -87,3 +87,3 @@ "use strict"; | ||
revision: '${GITHUB_SHA}', | ||
branch: '${GITHUB_REF/refs/heads/(.*)/\\1}', | ||
branch: '${GITHUB_HEAD_REF}', | ||
tag: '${GITHUB_REF/refs/tags/(.*)/\\1}', | ||
@@ -90,0 +90,0 @@ }, |
@@ -5,3 +5,3 @@ /// <reference types="node" /> | ||
export declare type GithubActionsEvent = { | ||
before: string; | ||
after: string; | ||
}; | ||
@@ -8,0 +8,0 @@ export default function detectCiEnvironment(env: Env, fileReader?: SyncFileReader): CiEnvironment | undefined; |
@@ -86,7 +86,8 @@ "use strict"; | ||
throw new Error('GITHUB_EVENT_PATH not set'); | ||
var event_1 = JSON.parse(syncFileReader(env.GITHUB_EVENT_PATH).toString()); | ||
if (!('before' in event_1)) { | ||
throw new Error('No before property in ${env.GITHUB_EVENT_PATH}'); | ||
var json = syncFileReader(env.GITHUB_EVENT_PATH).toString(); | ||
var event_1 = JSON.parse(json); | ||
if (!('after' in event_1)) { | ||
throw new Error("No after property in ".concat(env.GITHUB_EVENT_PATH, ":\n").concat(JSON.stringify(event_1, null, 2))); | ||
} | ||
return event_1.before; | ||
return event_1.after; | ||
} | ||
@@ -93,0 +94,0 @@ return (0, evaluateVariableExpression_js_1.default)((_a = ciEnvironment.git) === null || _a === void 0 ? void 0 : _a.revision, env); |
@@ -52,3 +52,3 @@ "use strict"; | ||
var event = { | ||
before: '2436f28fad432a895bfc595bce16e907144b0dc3', | ||
after: '2436f28fad432a895bfc595bce16e907144b0dc3', | ||
}; | ||
@@ -55,0 +55,0 @@ return Buffer.from(JSON.stringify(event, null, 2), 'utf-8'); |
@@ -84,3 +84,3 @@ // This file is auto-generated using npm run build-ci-environments | ||
revision: '${GITHUB_SHA}', | ||
branch: '${GITHUB_REF/refs/heads/(.*)/\\1}', | ||
branch: '${GITHUB_HEAD_REF}', | ||
tag: '${GITHUB_REF/refs/tags/(.*)/\\1}', | ||
@@ -87,0 +87,0 @@ }, |
@@ -5,3 +5,3 @@ /// <reference types="node" /> | ||
export declare type GithubActionsEvent = { | ||
before: string; | ||
after: string; | ||
}; | ||
@@ -8,0 +8,0 @@ export default function detectCiEnvironment(env: Env, fileReader?: SyncFileReader): CiEnvironment | undefined; |
@@ -44,7 +44,8 @@ import { readFileSync } from 'fs'; | ||
throw new Error('GITHUB_EVENT_PATH not set'); | ||
const event = JSON.parse(syncFileReader(env.GITHUB_EVENT_PATH).toString()); | ||
if (!('before' in event)) { | ||
throw new Error('No before property in ${env.GITHUB_EVENT_PATH}'); | ||
const json = syncFileReader(env.GITHUB_EVENT_PATH).toString(); | ||
const event = JSON.parse(json); | ||
if (!('after' in event)) { | ||
throw new Error(`No after property in ${env.GITHUB_EVENT_PATH}:\n${JSON.stringify(event, null, 2)}`); | ||
} | ||
return event.before; | ||
return event.after; | ||
} | ||
@@ -51,0 +52,0 @@ return evaluateVariableExpression((_a = ciEnvironment.git) === null || _a === void 0 ? void 0 : _a.revision, env); |
@@ -22,3 +22,3 @@ import assert from 'assert'; | ||
const event = { | ||
before: '2436f28fad432a895bfc595bce16e907144b0dc3', | ||
after: '2436f28fad432a895bfc595bce16e907144b0dc3', | ||
}; | ||
@@ -25,0 +25,0 @@ return Buffer.from(JSON.stringify(event, null, 2), 'utf-8'); |
{ | ||
"name": "@cucumber/ci-environment", | ||
"version": "9.0.1", | ||
"version": "9.0.2", | ||
"description": "Detect CI Environment from environment variables", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 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
102439
77
947
8