contensis-cli 1.6.1-beta.23 → 1.6.1-beta.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contensis-cli",
3
- "version": "1.6.1-beta.23",
3
+ "version": "1.6.1-beta.25",
4
4
  "description": "A fully featured Contensis command line interface with a shell UI provides simple and intuitive ways to manage or profile your content in any NodeJS terminal.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -212,6 +212,13 @@ Example call:
212
212
  },
213
213
  projectId: () => cli.env.currentProject || '',
214
214
  source: {
215
+ // Provenance resolution order per field:
216
+ // 1. explicit cli flag (camelCase key from commander opts)
217
+ // 2. CONTENSIS_* env var - a safe channel for CI actions to supply
218
+ // values without embedding them in the command string (where mapped)
219
+ // 3. generic CI variables the runner exports
220
+ // The mapper skips empty/undefined candidates and uses the first
221
+ // non-empty value, so unset optional vars never mask a fallback.
215
222
  provider: {
216
223
  $path: ['provider'],
217
224
  $return: (provider: string, { GITHUB_ACTIONS, GITLAB_CI }) => {
@@ -221,7 +228,12 @@ Example call:
221
228
  },
222
229
  },
223
230
  repositoryUrl: {
224
- $path: ['repositoryUrl', 'CI_PROJECT_URL', 'GITHUB_REPOSITORY'],
231
+ $path: [
232
+ 'repositoryUrl',
233
+ 'CONTENSIS_REPOSITORY_URL',
234
+ 'CI_PROJECT_URL',
235
+ 'GITHUB_REPOSITORY',
236
+ ],
225
237
  $formatting: (url: string, { GITHUB_ACTIONS }) => {
226
238
  if (GITHUB_ACTIONS && !url.startsWith(`https://`))
227
239
  url = `https://github.com/${url}`;
@@ -232,16 +244,35 @@ Example call:
232
244
  },
233
245
  branch: ['branch', 'CI_COMMIT_REF_NAME', 'GITHUB_REF_NAME'],
234
246
  commit: {
235
- id: ['commitId', 'CI_COMMIT_SHORT_SHA', 'GITHUB_SHA'],
247
+ id: [
248
+ 'commitId',
249
+ 'CONTENSIS_COMMIT_ID',
250
+ 'CI_COMMIT_SHORT_SHA',
251
+ 'GITHUB_SHA',
252
+ ],
236
253
  message: {
237
- $path: ['commitMessage', 'CI_COMMIT_MESSAGE'], // ${{ github.event.head_commit.message }}
254
+ $path: [
255
+ 'commitMessage',
256
+ 'CONTENSIS_COMMIT_MESSAGE',
257
+ 'CI_COMMIT_MESSAGE',
258
+ ], // ${{ github.event.head_commit.message }}
238
259
  $formatting: (msg?: string) =>
239
260
  msg?.replace(/\\n/g, ' ').replace(/\\n/g, ' ').trim(),
240
261
  },
241
- dateTime: ['commitDatetime', 'CI_COMMIT_TIMESTAMP'], // ${{ github.event.head_commit.timestamp }}
242
- authorEmail: ['authorEmail', 'GITLAB_USER_EMAIL', 'GITHUB_ACTOR'], // ${{ github.event.head_commit.author.email }}
262
+ dateTime: [
263
+ 'commitDatetime',
264
+ 'CONTENSIS_COMMIT_DATETIME',
265
+ 'CI_COMMIT_TIMESTAMP',
266
+ ], // ${{ github.event.head_commit.timestamp }}
267
+ authorEmail: [
268
+ 'authorEmail',
269
+ 'CONTENSIS_AUTHOR_EMAIL',
270
+ 'GITLAB_USER_EMAIL',
271
+ 'GITHUB_ACTOR',
272
+ ], // ${{ github.event.head_commit.author.email }}
243
273
  committerEmail: [
244
274
  'committerEmail',
275
+ 'CONTENSIS_COMMITTER_EMAIL',
245
276
  'GITLAB_USER_EMAIL',
246
277
  'GITHUB_TRIGGERING_ACTOR',
247
278
  ], // ${{ github.event.head_commit.committer.email }}
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "1.6.1-beta.23";
1
+ export const LIB_VERSION = "1.6.1-beta.25";