@elisra-devops/docgen-data-provider 1.106.0 → 1.108.0

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.
@@ -1,4 +1,4 @@
1
- name: "🚀 publish"
1
+ name: '🚀 publish'
2
2
 
3
3
  on:
4
4
  push:
@@ -7,10 +7,14 @@ on:
7
7
  paths-ignore:
8
8
  - '.github/**'
9
9
  workflow_dispatch:
10
-
10
+
11
11
  permissions:
12
12
  contents: write
13
13
 
14
+ concurrency:
15
+ group: publish-${{ github.ref }}
16
+ cancel-in-progress: false
17
+
14
18
  jobs:
15
19
  release:
16
20
  name: 🚀 publish
@@ -20,8 +24,10 @@ jobs:
20
24
  - name: 📚 checkout
21
25
  uses: actions/checkout@v4
22
26
  with:
23
- token: ${{ secrets.ELISRADEVOPS_ACCESS_TOKEN }}
24
-
27
+ token: ${{ secrets.ELISRADEVOPS_ACCESS_TOKEN }}
28
+ ref: main
29
+ fetch-depth: 0
30
+
25
31
  - name: 🟢 node
26
32
  uses: actions/setup-node@v4
27
33
  with:
@@ -35,12 +41,26 @@ jobs:
35
41
 
36
42
  - run: npm run build
37
43
 
38
- - name: 'Automated Version Bump'
39
- uses: 'phips28/gh-action-bump-version@master'
40
- with:
41
- commit-message: 'CI: bumps version to {{version}} [skip ci]'
44
+ - name: Check if current version exists on npm
45
+ id: check_npm_version
46
+ run: |
47
+ PACKAGE_NAME=$(node -p "require('./package.json').name")
48
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
49
+ if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" version >/dev/null 2>&1; then
50
+ echo "already_published=true" >> "$GITHUB_OUTPUT"
51
+ echo "${PACKAGE_NAME}@${PACKAGE_VERSION} already exists on npm. Skipping publish and version bump."
52
+ else
53
+ echo "already_published=false" >> "$GITHUB_OUTPUT"
54
+ fi
42
55
 
43
56
  - name: 🚀 publish
57
+ if: steps.check_npm_version.outputs.already_published != 'true'
44
58
  run: npm publish --access public
45
59
  env:
46
60
  NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
61
+
62
+ - name: 'Automated Version Bump'
63
+ if: steps.check_npm_version.outputs.already_published != 'true'
64
+ uses: 'phips28/gh-action-bump-version@master'
65
+ with:
66
+ commit-message: 'CI: bumps version to {{version}} [skip ci]'
package/README.md CHANGED
@@ -63,3 +63,10 @@ The default export is `DgDataProviderAzureDevOps`, which creates module-specific
63
63
  - This library uses `axios` and retries some transient failures (timeouts/429/5xx).
64
64
  - `TicketsDataProvider.GetSharedQueries()` supports doc-type specific query layouts (e.g. `std`, `str`, `svd`, `srs`, `test-reporter`) and falls back to the provided root path when a dedicated folder is missing.
65
65
  - In Node.js, the HTTP client is configured with `rejectUnauthorized: false` in `src/helpers/tfs.ts`, which may be required for some internal setups but is a security tradeoff.
66
+
67
+ ## Release pipeline notes
68
+
69
+ - GitHub Actions publish workflow runs on `main` pushes (and manual dispatch).
70
+ - `npm publish` runs before version bump/tag.
71
+ - If current `package.json` version already exists on npm, publish and bump are skipped.
72
+ - On failed historical runs, prefer triggering a new run from latest `main` instead of rerunning an old workflow execution.
@@ -1,5 +1,10 @@
1
1
  import { Links, Trace, Relations } from '../helpers/helper';
2
2
  import { Query } from '../models/tfs-data';
3
+ type HistoricalQueryListItem = {
4
+ id: string;
5
+ queryName: string;
6
+ path: string;
7
+ };
3
8
  export default class TicketsDataProvider {
4
9
  orgUrl: string;
5
10
  token: string;
@@ -37,6 +42,7 @@ export default class TicketsDataProvider {
37
42
  * @param docType document type
38
43
  * @returns
39
44
  */
45
+ private normalizeSharedQueriesPath;
40
46
  GetSharedQueries(project: string, path: string, docType?: string): Promise<any>;
41
47
  /**
42
48
  * Fetches the fields of a specific work item type.
@@ -162,6 +168,38 @@ export default class TicketsDataProvider {
162
168
  GetQueryResultsByWiqlHref(wiqlHref: string, project: string): Promise<any>;
163
169
  GetQueryResultsByWiqlString(wiql: string, projectName: string): Promise<any>;
164
170
  GetQueryResultById(query: string, project: string): Promise<any>;
171
+ private normalizeHistoricalAsOf;
172
+ private normalizeHistoricalCompareValue;
173
+ private normalizeTestPhaseValue;
174
+ private isTestCaseType;
175
+ private toHistoricalRevision;
176
+ private extractHistoricalWorkItemIds;
177
+ private appendAsOfToWiql;
178
+ private appendApiVersion;
179
+ private shouldRetryHistoricalWithLowerVersion;
180
+ private withHistoricalApiVersionFallback;
181
+ private chunkHistoricalWorkItemIds;
182
+ private normalizeHistoricalQueryPath;
183
+ private normalizeHistoricalQueryRoot;
184
+ private historicalErrorMessage;
185
+ private isHistoricalMissingWorkItemError;
186
+ private fetchHistoricalWorkItemsBatch;
187
+ private executeHistoricalQueryAtAsOf;
188
+ private toHistoricalWorkItemSnapshot;
189
+ private getHistoricalSnapshot;
190
+ private collectHistoricalQueries;
191
+ /**
192
+ * Returns a flat list of shared queries for historical/as-of execution.
193
+ */
194
+ GetHistoricalQueries(project: string, path?: string): Promise<HistoricalQueryListItem[]>;
195
+ /**
196
+ * Runs a shared query as-of a specific date-time and returns a flat work-item table snapshot.
197
+ */
198
+ GetHistoricalQueryResults(queryId: string, project: string, asOfInput: string): Promise<any>;
199
+ /**
200
+ * Compares a shared query between two date-time baselines using the feature's noise-control fields.
201
+ */
202
+ CompareHistoricalQueryResults(queryId: string, project: string, baselineAsOfInput: string, compareToAsOfInput: string): Promise<any>;
165
203
  PopulateWorkItemsByIds(workItemsArray?: any[], projectName?: string): Promise<any[]>;
166
204
  GetModeledQueryResults(results: any, project: string): Promise<Query>;
167
205
  BuildColumns(results: any, queryResult: Query): void;
@@ -301,3 +339,4 @@ export default class TicketsDataProvider {
301
339
  */
302
340
  GetCategorizedRequirementsByType(wiqlHref: string): Promise<any>;
303
341
  }
342
+ export {};