@rocket.chat/houston 0.27.0-next.1 → 0.27.0-next.3
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/dist/commands/createBranch.js +2 -0
- package/dist/outputCI.js +59 -0
- package/package.json +2 -2
- package/src/commands/createBranch.ts +3 -0
- package/src/outputCI.ts +12 -0
|
@@ -12,6 +12,7 @@ var _simplegit = require("simple-git");
|
|
|
12
12
|
var _promises = /*#__PURE__*/ _interop_require_default(require("fs/promises"));
|
|
13
13
|
var _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
14
14
|
var _semver = /*#__PURE__*/ _interop_require_default(require("semver"));
|
|
15
|
+
var _outputCI = require("../outputCI");
|
|
15
16
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
16
17
|
try {
|
|
17
18
|
var info = gen[key](arg);
|
|
@@ -182,6 +183,7 @@ function _createBranch() {
|
|
|
182
183
|
];
|
|
183
184
|
case 4:
|
|
184
185
|
_state.sent();
|
|
186
|
+
(0, _outputCI.outputCI)("newBranch", newBranch);
|
|
185
187
|
return [
|
|
186
188
|
2
|
|
187
189
|
];
|
package/dist/outputCI.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "outputCI", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return outputCI;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _core = /*#__PURE__*/ _interop_require_wildcard(require("@actions/core"));
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
13
|
+
if (typeof WeakMap !== "function") return null;
|
|
14
|
+
var cacheBabelInterop = new WeakMap();
|
|
15
|
+
var cacheNodeInterop = new WeakMap();
|
|
16
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
17
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
18
|
+
})(nodeInterop);
|
|
19
|
+
}
|
|
20
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
21
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
22
|
+
return obj;
|
|
23
|
+
}
|
|
24
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
25
|
+
return {
|
|
26
|
+
default: obj
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
30
|
+
if (cache && cache.has(obj)) {
|
|
31
|
+
return cache.get(obj);
|
|
32
|
+
}
|
|
33
|
+
var newObj = {};
|
|
34
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
35
|
+
for(var key in obj){
|
|
36
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
37
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
38
|
+
if (desc && (desc.get || desc.set)) {
|
|
39
|
+
Object.defineProperty(newObj, key, desc);
|
|
40
|
+
} else {
|
|
41
|
+
newObj[key] = obj[key];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
newObj.default = obj;
|
|
46
|
+
if (cache) {
|
|
47
|
+
cache.set(obj, newObj);
|
|
48
|
+
}
|
|
49
|
+
return newObj;
|
|
50
|
+
}
|
|
51
|
+
function _outputCI(name, value) {
|
|
52
|
+
_core.setOutput(name, value);
|
|
53
|
+
}
|
|
54
|
+
var outputCI = function() {
|
|
55
|
+
if (!process.env.CI) {
|
|
56
|
+
return function() {};
|
|
57
|
+
}
|
|
58
|
+
return _outputCI;
|
|
59
|
+
}();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocket.chat/houston",
|
|
3
|
-
"version": "0.27.0-next.
|
|
3
|
+
"version": "0.27.0-next.3",
|
|
4
4
|
"description": "Rocket.Chat Command Line Tools",
|
|
5
5
|
"main": "dist/bin.js",
|
|
6
6
|
"repository": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"private": false,
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"bin": {
|
|
19
|
-
"houston": "./dist/
|
|
19
|
+
"houston": "./dist/bin.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@actions/core": "^1.10.0",
|
|
@@ -2,6 +2,7 @@ import { simpleGit } from 'simple-git';
|
|
|
2
2
|
import fs from 'fs/promises';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import semver from 'semver';
|
|
5
|
+
import { outputCI } from '../outputCI';
|
|
5
6
|
|
|
6
7
|
const git = simpleGit();
|
|
7
8
|
|
|
@@ -22,4 +23,6 @@ export async function createBranch({ base, type }: { base: string; type: 'patch'
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
await git.checkoutLocalBranch(newBranch);
|
|
26
|
+
|
|
27
|
+
outputCI('newBranch', newBranch);
|
|
25
28
|
}
|
package/src/outputCI.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as core from '@actions/core';
|
|
2
|
+
|
|
3
|
+
function _outputCI(name: string, value: string) {
|
|
4
|
+
core.setOutput(name, value);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const outputCI = ((): (name: string, value: string) => void => {
|
|
8
|
+
if (!process.env.CI) {
|
|
9
|
+
return () => { };
|
|
10
|
+
}
|
|
11
|
+
return _outputCI;
|
|
12
|
+
})();
|