@ondrejbelza/semantic-release-jira 1.0.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.
- package/README.md +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/jira-client/client.d.ts +2 -0
- package/dist/jira-client/client.js +16 -0
- package/dist/jira-client/index.d.ts +2 -0
- package/dist/jira-client/index.js +5 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.js +2 -0
- package/dist/verify_condition.d.ts +7 -0
- package/dist/verify_condition.js +30 -0
- package/package.json +43 -0
package/README.md
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateJiraClient = CreateJiraClient;
|
|
4
|
+
const jira_js_1 = require("jira.js");
|
|
5
|
+
function CreateJiraClient(host, email, apiToken) {
|
|
6
|
+
const c = new jira_js_1.Version3Client({
|
|
7
|
+
host: host,
|
|
8
|
+
authentication: {
|
|
9
|
+
basic: {
|
|
10
|
+
apiToken: apiToken,
|
|
11
|
+
email: email,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
return c;
|
|
16
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateJiraClient = void 0;
|
|
4
|
+
const client_1 = require("./client");
|
|
5
|
+
Object.defineProperty(exports, "CreateJiraClient", { enumerable: true, get: function () { return client_1.CreateJiraClient; } });
|
package/dist/types.d.ts
ADDED
package/dist/types.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VerifyConditionsContext } from "semantic-release";
|
|
2
|
+
import { PluginConfig } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* 1. verifyConditions
|
|
5
|
+
* Called first to check if the environment is valid (e.g., tokens exist)
|
|
6
|
+
*/
|
|
7
|
+
export declare function verifyConditions(pluginConfig: PluginConfig, context: VerifyConditionsContext): Promise<void>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.verifyConditions = verifyConditions;
|
|
7
|
+
const error_1 = __importDefault(require("@semantic-release/error"));
|
|
8
|
+
const jira_client_1 = require("./jira-client");
|
|
9
|
+
/**
|
|
10
|
+
* 1. verifyConditions
|
|
11
|
+
* Called first to check if the environment is valid (e.g., tokens exist)
|
|
12
|
+
*/
|
|
13
|
+
async function verifyConditions(pluginConfig, context) {
|
|
14
|
+
const { logger, env } = context;
|
|
15
|
+
logger.log("Checking conditions for my custom plugin...");
|
|
16
|
+
if ((pluginConfig.jiraHost = "")) {
|
|
17
|
+
throw new error_1.default("jira host configuration variable is missing.");
|
|
18
|
+
}
|
|
19
|
+
if (!env.JIRA_EMAIL) {
|
|
20
|
+
throw new error_1.default("JIRA_EMAIL environment variable is missing.");
|
|
21
|
+
}
|
|
22
|
+
if (!env.JIRA_TOKEN) {
|
|
23
|
+
throw new error_1.default("JIRA_TOKEN environment variable is missing.");
|
|
24
|
+
}
|
|
25
|
+
const c = (0, jira_client_1.CreateJiraClient)(pluginConfig.jiraHost, env.JIRA_EMAIL, env.JIRA_TOKEN);
|
|
26
|
+
const p = await c.projects.getProject({
|
|
27
|
+
projectIdOrKey: pluginConfig.project,
|
|
28
|
+
});
|
|
29
|
+
console.log(p.id);
|
|
30
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ondrejbelza/semantic-release-jira",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "semantic release jira releases plugin",
|
|
5
|
+
"homepage": "https://github.com/mailstepcz/semantic-release-jira#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/mailstepcz/semantic-release-jira/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+ssh://git@github.com/mailstepcz/semantic-release-jira.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "Ondřej Belza <belzaondra@gmail.com>",
|
|
15
|
+
"type": "commonjs",
|
|
16
|
+
"main": "dist/index.js",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public",
|
|
23
|
+
"provenance": true
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsc"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@semantic-release/error": "^4.0.0",
|
|
30
|
+
"jira.js": "^5.2.2",
|
|
31
|
+
"semantic-release": "^25.0.2"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
35
|
+
"@semantic-release/git": "^10.0.1",
|
|
36
|
+
"@semantic-release/github": "^12.0.2",
|
|
37
|
+
"@semantic-release/npm": "^13.1.3",
|
|
38
|
+
"@types/node": "^25.0.3",
|
|
39
|
+
"@types/semantic-release__error": "^3.0.3",
|
|
40
|
+
"@types/signale": "^1.4.7",
|
|
41
|
+
"typescript": "^5.9.3"
|
|
42
|
+
}
|
|
43
|
+
}
|