@docupace/pipeline 1.0.39-newrelease.15 → 1.0.39-newrelease.17

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": "@docupace/pipeline",
3
- "version": "1.0.39-newrelease.15",
3
+ "version": "1.0.39-newrelease.17",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -52,6 +52,17 @@ export async function uploadToCanny(releaseNote, labelIDs) {
52
52
  entryType = 'fixed';
53
53
  }
54
54
 
55
+ const body = JSON.stringify({
56
+ apiKey: CANNY_API_KEY,
57
+ title: title,
58
+ details: content,
59
+ type: entryType,
60
+ published: false, // Keep as draft initially
61
+ labelIDs,
62
+ });
63
+
64
+ console.log("POSTING: ", body)
65
+
55
66
  // Create a new changelog entry in Canny
56
67
  const createResponse = await fetch(
57
68
  'https://canny.io/api/v1/entries/create',
@@ -60,14 +71,7 @@ export async function uploadToCanny(releaseNote, labelIDs) {
60
71
  headers: {
61
72
  'Content-Type': 'application/json',
62
73
  },
63
- body: JSON.stringify({
64
- apiKey: CANNY_API_KEY,
65
- title: title,
66
- details: content,
67
- type: entryType,
68
- published: false, // Keep as draft initially
69
- labelIDs,
70
- }),
74
+ body,
71
75
  },
72
76
  );
73
77
 
@@ -5,6 +5,9 @@ dotenv.config({ path: ['.env.pipeline.local', 'config/.env.pipeline.local'] });
5
5
  import { Command } from 'commander';
6
6
  import { $ } from 'zx';
7
7
  import { validateChangesets } from './validate.js';
8
+ import { fileURLToPath } from 'url';
9
+ import { dirname, join } from 'path';
10
+ import { readFileSync } from 'fs';
8
11
 
9
12
  import { isMonoRepo, setGitInfo } from '../next/util.js';
10
13
  import {
@@ -18,6 +21,18 @@ const program = new Command();
18
21
 
19
22
  const args = process.argv;
20
23
 
24
+ // Add version logging function
25
+ async function logPackageVersion() {
26
+ try {
27
+ const __dirname = dirname(fileURLToPath(import.meta.url));
28
+ const packageJsonPath = join(__dirname, '../../package.json');
29
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
30
+ console.log(`📦 CLI Package version: ${packageJson.version}`);
31
+ } catch (error) {
32
+ console.log('📦 CLI Package version: Not available');
33
+ }
34
+ }
35
+
21
36
  async function commitTagCommand(releases) {
22
37
  console.log('📌 Checking for updates to commit...');
23
38
 
@@ -108,6 +123,7 @@ program
108
123
  .command('validate')
109
124
  .description('Validate changesets for the provided PR')
110
125
  .action(async () => {
126
+ await logPackageVersion();
111
127
  if (!process.env.BITBUCKET_PR_ID) {
112
128
  return;
113
129
  }
@@ -127,6 +143,7 @@ program
127
143
  .command('version')
128
144
  .description('Run Changeset versioning')
129
145
  .action(async () => {
146
+ await logPackageVersion();
130
147
  await versionCommand();
131
148
  });
132
149
 
@@ -135,6 +152,7 @@ program
135
152
  .command('commit-tag')
136
153
  .description('Commit and tag the new version')
137
154
  .action(async () => {
155
+ await logPackageVersion();
138
156
  await commitTagCommand();
139
157
  });
140
158
 
@@ -143,6 +161,7 @@ program
143
161
  .command('version-commit-tag')
144
162
  .description('Run versioning and commit-and-tag in sequence')
145
163
  .action(async () => {
164
+ await logPackageVersion();
146
165
  console.log('📦 Running all steps...');
147
166
  const releases = await versionCommand();
148
167
  await updateJiraWithVersion(releases);
@@ -155,6 +174,7 @@ program
155
174
  .command('close-version')
156
175
  .description('Closes a version')
157
176
  .action(async () => {
177
+ await logPackageVersion();
158
178
  console.log('📦 Running all steps...');
159
179
  const releases = await versionCommand(true);
160
180
  await commitTagCommand(releases);
@@ -196,8 +216,10 @@ program
196
216
  'Creates a changeset based on the current branch and Jira ticket information',
197
217
  )
198
218
  .action(async (jiraIssueKey) => {
219
+ await logPackageVersion();
199
220
  await createChangeset(jiraIssueKey);
200
221
  });
201
222
 
202
223
  // Parse arguments
203
224
  program.parse(args);
225
+