@elliemae/pui-cli 8.55.3 → 8.55.5
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,13 +1,35 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Semantic Release plugin to write publish info and set dist tag
|
|
6
|
+
* @see https://semantic-release.gitbook.io/semantic-release/developer-guide/plugin
|
|
7
|
+
*/
|
|
3
8
|
module.exports = {
|
|
4
|
-
success: async (
|
|
5
|
-
|
|
9
|
+
success: async (pluginConfig, context) => {
|
|
10
|
+
const { nextRelease, logger } = context;
|
|
11
|
+
|
|
12
|
+
// Debug: log what we receive
|
|
13
|
+
logger?.log?.('Plugin context keys:', Object.keys(context));
|
|
14
|
+
logger?.log?.('nextRelease:', nextRelease ? 'present' : 'undefined');
|
|
15
|
+
|
|
16
|
+
if (!nextRelease) {
|
|
17
|
+
logger?.log?.('No release information available');
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
6
21
|
const distTag = nextRelease.channel || 'latest';
|
|
7
|
-
const fname = 'publish-info.json';
|
|
8
|
-
|
|
22
|
+
const fname = path.join(process.cwd(), 'publish-info.json');
|
|
23
|
+
|
|
24
|
+
try {
|
|
9
25
|
fs.writeFileSync(fname, JSON.stringify(nextRelease, null, 2));
|
|
26
|
+
logger?.log?.(`Wrote publish info to ${fname}`);
|
|
27
|
+
logger?.log?.(`Distribution tag set to: ${distTag}`);
|
|
28
|
+
} catch (error) {
|
|
29
|
+
logger?.error?.(`Failed to write publish info: ${error.message}`);
|
|
30
|
+
throw error;
|
|
10
31
|
}
|
|
32
|
+
|
|
11
33
|
process.env.DIST_TAG = distTag;
|
|
12
34
|
},
|
|
13
35
|
};
|
|
@@ -1,13 +1,35 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Semantic Release plugin to write publish info and set dist tag
|
|
6
|
+
* @see https://semantic-release.gitbook.io/semantic-release/developer-guide/plugin
|
|
7
|
+
*/
|
|
3
8
|
module.exports = {
|
|
4
|
-
success: async (
|
|
5
|
-
|
|
9
|
+
success: async (pluginConfig, context) => {
|
|
10
|
+
const { nextRelease, logger } = context;
|
|
11
|
+
|
|
12
|
+
// Debug: log what we receive
|
|
13
|
+
logger?.log?.('Plugin context keys:', Object.keys(context));
|
|
14
|
+
logger?.log?.('nextRelease:', nextRelease ? 'present' : 'undefined');
|
|
15
|
+
|
|
16
|
+
if (!nextRelease) {
|
|
17
|
+
logger?.log?.('No release information available');
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
6
21
|
const distTag = nextRelease.channel || 'latest';
|
|
7
|
-
const fname = 'publish-info.json';
|
|
8
|
-
|
|
22
|
+
const fname = path.join(process.cwd(), 'publish-info.json');
|
|
23
|
+
|
|
24
|
+
try {
|
|
9
25
|
fs.writeFileSync(fname, JSON.stringify(nextRelease, null, 2));
|
|
26
|
+
logger?.log?.(`Wrote publish info to ${fname}`);
|
|
27
|
+
logger?.log?.(`Distribution tag set to: ${distTag}`);
|
|
28
|
+
} catch (error) {
|
|
29
|
+
logger?.error?.(`Failed to write publish info: ${error.message}`);
|
|
30
|
+
throw error;
|
|
10
31
|
}
|
|
32
|
+
|
|
11
33
|
process.env.DIST_TAG = distTag;
|
|
12
34
|
},
|
|
13
35
|
};
|