@firestartr/cli 1.30.0 → 1.32.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/build/{_loadurl.js → _loadurl.mjs} +11 -8
- package/build/index.js +1186 -802
- package/build/provisioner/dist-cdktf/index.js +89 -7
- package/build/provisioner/dist-cdktf/index.js.map +1 -1
- package/build/provisioner/dist-cdktf/src/resources/github_repository/helpers/AdditionalBranchesHelper.d.ts +1 -0
- package/build/provisioner/dist-cdktf/src/resources/github_repository/helpers/AdditionalBranchesHelper.js +62 -0
- package/build/provisioner/dist-cdktf/src/resources/github_repository/index.d.ts +1 -0
- package/build/provisioner/dist-cdktf/src/resources/github_repository/index.js +22 -0
- package/build/provisioner/dist-cdktf/src/resources/resource.d.ts +1 -0
- package/build/provisioner/dist-cdktf/src/resources/resource.js +2 -0
- package/build/provisioner/dist-cdktf/tsconfig.cdktf.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5988,7 +5988,7 @@ module.exports = __toCommonJS(dist_src_exports);
|
|
|
5988
5988
|
var import_universal_user_agent = __nccwpck_require__(5212);
|
|
5989
5989
|
|
|
5990
5990
|
// pkg/dist-src/version.js
|
|
5991
|
-
var VERSION = "9.0.
|
|
5991
|
+
var VERSION = "9.0.6";
|
|
5992
5992
|
|
|
5993
5993
|
// pkg/dist-src/defaults.js
|
|
5994
5994
|
var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
|
|
@@ -6093,9 +6093,9 @@ function addQueryParameters(url, parameters) {
|
|
|
6093
6093
|
}
|
|
6094
6094
|
|
|
6095
6095
|
// pkg/dist-src/util/extract-url-variable-names.js
|
|
6096
|
-
var urlVariableRegex = /\{[^}]+\}/g;
|
|
6096
|
+
var urlVariableRegex = /\{[^{}}]+\}/g;
|
|
6097
6097
|
function removeNonChars(variableName) {
|
|
6098
|
-
return variableName.replace(
|
|
6098
|
+
return variableName.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
|
|
6099
6099
|
}
|
|
6100
6100
|
function extractUrlVariableNames(url) {
|
|
6101
6101
|
const matches = url.match(urlVariableRegex);
|
|
@@ -6281,7 +6281,7 @@ function parse(options) {
|
|
|
6281
6281
|
}
|
|
6282
6282
|
if (url.endsWith("/graphql")) {
|
|
6283
6283
|
if (options.mediaType.previews?.length) {
|
|
6284
|
-
const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
|
|
6284
|
+
const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || [];
|
|
6285
6285
|
headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
|
|
6286
6286
|
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
|
|
6287
6287
|
return `application/vnd.github.${preview}-preview${format}`;
|
|
@@ -9121,7 +9121,7 @@ var RequestError = class extends Error {
|
|
|
9121
9121
|
if (options.request.headers.authorization) {
|
|
9122
9122
|
requestCopy.headers = Object.assign({}, options.request.headers, {
|
|
9123
9123
|
authorization: options.request.headers.authorization.replace(
|
|
9124
|
-
/ .*$/,
|
|
9124
|
+
/(?<! ) .*$/,
|
|
9125
9125
|
" [REDACTED]"
|
|
9126
9126
|
)
|
|
9127
9127
|
});
|
|
@@ -9189,7 +9189,7 @@ var import_endpoint = __nccwpck_require__(8773);
|
|
|
9189
9189
|
var import_universal_user_agent = __nccwpck_require__(5212);
|
|
9190
9190
|
|
|
9191
9191
|
// pkg/dist-src/version.js
|
|
9192
|
-
var VERSION = "8.4.
|
|
9192
|
+
var VERSION = "8.4.1";
|
|
9193
9193
|
|
|
9194
9194
|
// pkg/dist-src/is-plain-object.js
|
|
9195
9195
|
function isPlainObject(value) {
|
|
@@ -9248,7 +9248,7 @@ function fetchWrapper(requestOptions) {
|
|
|
9248
9248
|
headers[keyAndValue[0]] = keyAndValue[1];
|
|
9249
9249
|
}
|
|
9250
9250
|
if ("deprecation" in headers) {
|
|
9251
|
-
const matches = headers.link && headers.link.match(/<([
|
|
9251
|
+
const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/);
|
|
9252
9252
|
const deprecationLink = matches && matches.pop();
|
|
9253
9253
|
log.warn(
|
|
9254
9254
|
`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
|
|
@@ -55451,6 +55451,7 @@ const user_1 = __importDefault(__nccwpck_require__(2851));
|
|
|
55451
55451
|
const pull_request_1 = __importDefault(__nccwpck_require__(4670));
|
|
55452
55452
|
const auth_1 = __importDefault(__nccwpck_require__(7745));
|
|
55453
55453
|
const issues_1 = __importDefault(__nccwpck_require__(5934));
|
|
55454
|
+
const branches_1 = __importDefault(__nccwpck_require__(6954));
|
|
55454
55455
|
const auth_2 = __nccwpck_require__(7745);
|
|
55455
55456
|
exports["default"] = {
|
|
55456
55457
|
org: organization_1.default,
|
|
@@ -55463,6 +55464,7 @@ exports["default"] = {
|
|
|
55463
55464
|
auth: auth_1.default,
|
|
55464
55465
|
pulls: pull_request_1.default,
|
|
55465
55466
|
issues: issues_1.default,
|
|
55467
|
+
branches: branches_1.default,
|
|
55466
55468
|
};
|
|
55467
55469
|
|
|
55468
55470
|
|
|
@@ -55532,6 +55534,86 @@ exports.getOctokitForOrg = getOctokitForOrg;
|
|
|
55532
55534
|
exports["default"] = { getOctokitForOrg };
|
|
55533
55535
|
|
|
55534
55536
|
|
|
55537
|
+
/***/ }),
|
|
55538
|
+
|
|
55539
|
+
/***/ 6954:
|
|
55540
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
55541
|
+
|
|
55542
|
+
"use strict";
|
|
55543
|
+
|
|
55544
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
55545
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
55546
|
+
};
|
|
55547
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
55548
|
+
exports.createOrphanBranch = exports.createBranch = exports.getBranch = exports.listBranches = void 0;
|
|
55549
|
+
const auth_1 = __nccwpck_require__(7745);
|
|
55550
|
+
const debug_1 = __importDefault(__nccwpck_require__(7984));
|
|
55551
|
+
const messageLog = (0, debug_1.default)('firestartr:github:branches');
|
|
55552
|
+
const SHA1_EMPTY_TREE = '4b825dc642cb6eb9a060e54bf8d69288fbee4904';
|
|
55553
|
+
async function listBranches(repo, owner = 'prefapp') {
|
|
55554
|
+
messageLog(`Getting branches for ${owner}/${repo}`);
|
|
55555
|
+
const octokit = await (0, auth_1.getOctokitForOrg)(owner);
|
|
55556
|
+
const response = await octokit.rest.repos.listBranches({
|
|
55557
|
+
owner,
|
|
55558
|
+
repo,
|
|
55559
|
+
per_page: 100,
|
|
55560
|
+
page: 0,
|
|
55561
|
+
});
|
|
55562
|
+
return response.data;
|
|
55563
|
+
}
|
|
55564
|
+
exports.listBranches = listBranches;
|
|
55565
|
+
async function getBranch(repo, branch, owner = 'prefapp') {
|
|
55566
|
+
messageLog(`Getting branch ${branch} for ${owner}/${repo}`);
|
|
55567
|
+
const octokit = await (0, auth_1.getOctokitForOrg)(owner);
|
|
55568
|
+
const response = await octokit.rest.repos.getBranch({
|
|
55569
|
+
owner,
|
|
55570
|
+
repo,
|
|
55571
|
+
branch,
|
|
55572
|
+
});
|
|
55573
|
+
return response.data;
|
|
55574
|
+
}
|
|
55575
|
+
exports.getBranch = getBranch;
|
|
55576
|
+
async function createBranch(repo, branch, sha, owner = 'prefapp') {
|
|
55577
|
+
messageLog(`Creating branch ${branch} for ${owner}/${repo}`);
|
|
55578
|
+
const octokit = await (0, auth_1.getOctokitForOrg)(owner);
|
|
55579
|
+
const response = await octokit.rest.git.createRef({
|
|
55580
|
+
owner,
|
|
55581
|
+
repo,
|
|
55582
|
+
ref: `refs/heads/${branch}`,
|
|
55583
|
+
sha,
|
|
55584
|
+
});
|
|
55585
|
+
return response.data;
|
|
55586
|
+
}
|
|
55587
|
+
exports.createBranch = createBranch;
|
|
55588
|
+
async function createOrphanBranch(repo, branch, owner = 'prefapp') {
|
|
55589
|
+
messageLog(`Creating orphan branch ${branch} for ${owner}/${repo}`);
|
|
55590
|
+
const octokit = await (0, auth_1.getOctokitForOrg)(owner);
|
|
55591
|
+
// Create a commit with an empty tree
|
|
55592
|
+
const { data: commit } = await octokit.request('POST /repos/{owner}/{repo}/git/commits', {
|
|
55593
|
+
owner,
|
|
55594
|
+
repo,
|
|
55595
|
+
message: `Inicializando rama huérfana ${branch}`,
|
|
55596
|
+
tree: SHA1_EMPTY_TREE,
|
|
55597
|
+
parents: [],
|
|
55598
|
+
});
|
|
55599
|
+
// Create a reference to the commit
|
|
55600
|
+
const response = await octokit.request('POST /repos/{owner}/{repo}/git/refs', {
|
|
55601
|
+
owner,
|
|
55602
|
+
repo,
|
|
55603
|
+
ref: `refs/heads/${branch}`,
|
|
55604
|
+
sha: commit.sha,
|
|
55605
|
+
});
|
|
55606
|
+
return response.data;
|
|
55607
|
+
}
|
|
55608
|
+
exports.createOrphanBranch = createOrphanBranch;
|
|
55609
|
+
exports["default"] = {
|
|
55610
|
+
listBranches,
|
|
55611
|
+
getBranch,
|
|
55612
|
+
createBranch,
|
|
55613
|
+
createOrphanBranch,
|
|
55614
|
+
};
|
|
55615
|
+
|
|
55616
|
+
|
|
55535
55617
|
/***/ }),
|
|
55536
55618
|
|
|
55537
55619
|
/***/ 5934:
|