@firestartr/cli 1.50.1-snapshot-40 → 1.50.1-snapshot-41
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/index.js +11 -10
- package/build/packages/github/src/auth.d.ts +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -298282,17 +298282,19 @@ async function getOctokitForOrg(org, paginated = false, genGithubAppToken = gene
|
|
|
298282
298282
|
installationOrgId: await getInstallationID(org),
|
|
298283
298283
|
});
|
|
298284
298284
|
const options = { auth: auth };
|
|
298285
|
-
const test = new dist_src_Octokit({ auth: auth });
|
|
298286
|
-
console.dir(test, { depth: null });
|
|
298287
298285
|
if (paginated) {
|
|
298288
298286
|
options.plugins = [dist_bundle_paginateRest, paginateGraphQL];
|
|
298289
298287
|
}
|
|
298290
|
-
const
|
|
298291
|
-
return
|
|
298288
|
+
const OctokitWithGraphQL = dist_src_Octokit.plugin(paginateGraphQL);
|
|
298289
|
+
return new OctokitWithGraphQL(options);
|
|
298292
298290
|
}
|
|
298293
298291
|
async function getOctokitFromPat(envVar) {
|
|
298294
|
-
const options = {
|
|
298295
|
-
|
|
298292
|
+
const options = {
|
|
298293
|
+
auth: process.env[envVar],
|
|
298294
|
+
plugins: [dist_bundle_paginateRest, paginateGraphQL],
|
|
298295
|
+
};
|
|
298296
|
+
const OctokitWithGraphQL = dist_src_Octokit.plugin(paginateGraphQL);
|
|
298297
|
+
return new OctokitWithGraphQL(options);
|
|
298296
298298
|
}
|
|
298297
298299
|
/* harmony default export */ const src_auth = ({ getOctokitForOrg });
|
|
298298
298300
|
|
|
@@ -298355,9 +298357,8 @@ async function getOrgInfo(org) {
|
|
|
298355
298357
|
async function getOrgTeamsDirectAccess(org) {
|
|
298356
298358
|
github_src_logger.info(`Getting teams for org ${org}`);
|
|
298357
298359
|
const octokit = await getOctokitForOrg(org);
|
|
298358
|
-
const response = await octokit.graphql.paginate(`
|
|
298359
|
-
|
|
298360
|
-
organization(login: \$org) {
|
|
298360
|
+
const response = await octokit.graphql.paginate(`query paginate($cursor: String, $org: String!) {
|
|
298361
|
+
organization(login: $org) {
|
|
298361
298362
|
teams(first: 100, after: $cursor) {
|
|
298362
298363
|
nodes {
|
|
298363
298364
|
id
|
|
@@ -310743,7 +310744,7 @@ function getClaimPathFromCR(claimsBasePath, cr) {
|
|
|
310743
310744
|
FirestartrGithubRepository: 'components',
|
|
310744
310745
|
FirestartrGithubMembership: 'users',
|
|
310745
310746
|
};
|
|
310746
|
-
return external_path_.join(claimsBasePath, mapCrsToClaims[cr.kind], `${cr.metadata.
|
|
310747
|
+
return external_path_.join(claimsBasePath, mapCrsToClaims[cr.kind], `${cr.metadata.annotations[catalog_common.generic.getFirestartrAnnotation('external-name')]}.yaml`.toLowerCase());
|
|
310747
310748
|
}
|
|
310748
310749
|
function getCrPath(crsBasePath, cr) {
|
|
310749
310750
|
return external_path_.join(crsBasePath, `${cr.kind}.${cr.metadata.name}.yaml`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Octokit } from '@octokit/rest';
|
|
2
2
|
import type { Api } from '@octokit/plugin-rest-endpoint-methods/dist-types/types';
|
|
3
3
|
import type { PaginateInterface } from '@octokit/plugin-paginate-rest/dist-types/types';
|
|
4
|
-
import type { paginateGraphQLInterface } from
|
|
4
|
+
import type { paginateGraphQLInterface } from '@octokit/plugin-paginate-graphql/dist-types/index.js';
|
|
5
5
|
export declare const generateGithubAppToken: (config: any) => Promise<string>;
|
|
6
6
|
export declare function getGithubAppToken(org: string, genGithubAppToken?: any): Promise<string>;
|
|
7
7
|
type ExtendedOctokit = Octokit & Api & {
|