Skip to content

Commit

Permalink
fix: detect build job started via @sap/cds-dk/bin/cds.js (#178)
Browse files Browse the repository at this point in the history
closes #177
  • Loading branch information
sjvans authored Jun 3, 2024
1 parent 219896d commit c043632
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## Version 0.2.2 - 2024-06-03

### Fixed

- Detect build job started via `@sap/cds-dk/bin/cds.js`

## Version 0.2.1 - 2024-05-23

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = function () {
// REVISIT: better
// no need to fire up plugin during build (avoid credentials validation)
const i = process.argv.indexOf('build')
if (i > 1 && process.argv[i - 1].endsWith('cds')) return
if (i > 1 && process.argv[i - 1].match(/cds(\.js)?$/)) return

// set logger and propagate log level
diag.setLogger(cds.log('telemetry'), process.env.OTEL_LOG_LEVEL || getDiagLogLevel())
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cap-js/telemetry",
"version": "0.2.1",
"version": "0.2.2",
"description": "CDS plugin providing observability features, incl. automatic OpenTelemetry instrumentation.",
"repository": "cap-js/telemetry",
"author": "SAP SE (https://www.sap.com)",
Expand All @@ -26,7 +26,7 @@
"@opentelemetry/semantic-conventions": "^1.10.1"
},
"peerDependencies": {
"@sap/cds": ">=7 || ^8.0.0-beta"
"@sap/cds": ">=7"
},
"devDependencies": {
"@cap-js/sqlite": "^1.4.0",
Expand Down

0 comments on commit c043632

Please sign in to comment.