@firestartr/cli 2.11.0-snapshot-mco-02 → 2.11.0-snapshot-ghpages-01
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 +103 -110
- package/build/packages/cdk8s_renderer/imports/firestartr.dev.d.ts +18 -1
- package/build/packages/cdk8s_renderer/src/claims/base/schemas/index.d.ts +51 -23
- package/build/packages/cdk8s_renderer/src/claims/github/component.schema.d.ts +1 -23
- package/build/packages/cdk8s_renderer/src/claims/github/index.d.ts +51 -23
- package/build/packages/cdk8s_renderer/src/claims/github/pages.d.ts +11 -0
- package/build/packages/cdk8s_renderer/src/claims/github/pages.schema.d.ts +52 -0
- package/build/packages/cdk8s_renderer/src/claims/github/repository.d.ts +2 -9
- package/build/packages/gh_provisioner/src/entities/ghrepo/index.d.ts +1 -6
- package/build/packages/importer/src/decanter/config.d.ts +0 -4
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -163207,20 +163207,7 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
|
|
163207
163207
|
type: 'boolean',
|
|
163208
163208
|
},
|
|
163209
163209
|
pages: {
|
|
163210
|
-
|
|
163211
|
-
properties: {
|
|
163212
|
-
cname: { type: 'string' },
|
|
163213
|
-
buildType: { type: 'string', enum: ['workflow', 'legacy'] },
|
|
163214
|
-
source: {
|
|
163215
|
-
type: 'object',
|
|
163216
|
-
properties: {
|
|
163217
|
-
branch: { type: 'string' },
|
|
163218
|
-
path: { type: 'string' },
|
|
163219
|
-
},
|
|
163220
|
-
additionalProperties: false,
|
|
163221
|
-
},
|
|
163222
|
-
},
|
|
163223
|
-
additionalProperties: false,
|
|
163210
|
+
$ref: 'firestartr.dev://github/GithubPages',
|
|
163224
163211
|
},
|
|
163225
163212
|
additionalRules: {
|
|
163226
163213
|
type: 'array',
|
|
@@ -163657,6 +163644,42 @@ const organizationSettingsProperties = {
|
|
|
163657
163644
|
},
|
|
163658
163645
|
});
|
|
163659
163646
|
|
|
163647
|
+
;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/github/pages.schema.ts
|
|
163648
|
+
|
|
163649
|
+
/* harmony default export */ const pages_schema = ({
|
|
163650
|
+
$schema: SCHEMA,
|
|
163651
|
+
$id: 'GithubPages',
|
|
163652
|
+
definitions: {
|
|
163653
|
+
GithubPages: {
|
|
163654
|
+
$id: 'firestartr.dev://github/GithubPages',
|
|
163655
|
+
type: 'object',
|
|
163656
|
+
description: 'GitHub Pages configuration shared across component and repository claims',
|
|
163657
|
+
properties: {
|
|
163658
|
+
cname: { type: 'string' },
|
|
163659
|
+
public: { type: 'boolean' },
|
|
163660
|
+
https_enforced: { type: 'boolean' },
|
|
163661
|
+
buildType: { type: 'string', enum: ['workflow', 'legacy'] },
|
|
163662
|
+
source: {
|
|
163663
|
+
type: 'object',
|
|
163664
|
+
properties: {
|
|
163665
|
+
branch: { type: 'string' },
|
|
163666
|
+
path: { type: 'string', enum: ['/', '/docs'] },
|
|
163667
|
+
},
|
|
163668
|
+
additionalProperties: false,
|
|
163669
|
+
},
|
|
163670
|
+
},
|
|
163671
|
+
additionalProperties: false,
|
|
163672
|
+
if: {
|
|
163673
|
+
required: ['https_enforced'],
|
|
163674
|
+
properties: { https_enforced: { const: true } },
|
|
163675
|
+
},
|
|
163676
|
+
then: {
|
|
163677
|
+
required: ['cname'],
|
|
163678
|
+
},
|
|
163679
|
+
},
|
|
163680
|
+
},
|
|
163681
|
+
});
|
|
163682
|
+
|
|
163660
163683
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/github/index.ts
|
|
163661
163684
|
|
|
163662
163685
|
|
|
@@ -163666,6 +163689,7 @@ const organizationSettingsProperties = {
|
|
|
163666
163689
|
|
|
163667
163690
|
|
|
163668
163691
|
|
|
163692
|
+
|
|
163669
163693
|
const GithubSchemas = [
|
|
163670
163694
|
github_group_schema,
|
|
163671
163695
|
github_user_schema,
|
|
@@ -163675,6 +163699,7 @@ const GithubSchemas = [
|
|
|
163675
163699
|
github_orgsettings_schema,
|
|
163676
163700
|
component_secrets_vars_schema,
|
|
163677
163701
|
component_labels_schema,
|
|
163702
|
+
pages_schema,
|
|
163678
163703
|
];
|
|
163679
163704
|
|
|
163680
163705
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/tfworkspaces/terraform.schema.ts
|
|
@@ -168640,6 +168665,8 @@ function toJson_FirestartrGithubRepositorySpecPages(obj) {
|
|
|
168640
168665
|
}
|
|
168641
168666
|
const result = {
|
|
168642
168667
|
'cname': obj.cname,
|
|
168668
|
+
'public': obj.public,
|
|
168669
|
+
'https_enforced': obj.httpsEnforced,
|
|
168643
168670
|
'source': toJson_FirestartrGithubRepositorySpecPagesSource(obj.source),
|
|
168644
168671
|
'buildType': obj.buildType,
|
|
168645
168672
|
};
|
|
@@ -168966,6 +168993,17 @@ function toJson_FirestartrGithubRepositorySpecContextProviderRef(obj) {
|
|
|
168966
168993
|
// filter undefined values
|
|
168967
168994
|
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
168968
168995
|
}
|
|
168996
|
+
/* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
168997
|
+
/**
|
|
168998
|
+
* @schema FirestartrGithubRepositorySpecPagesSourcePath
|
|
168999
|
+
*/
|
|
169000
|
+
var FirestartrGithubRepositorySpecPagesSourcePath;
|
|
169001
|
+
(function (FirestartrGithubRepositorySpecPagesSourcePath) {
|
|
169002
|
+
/** / */
|
|
169003
|
+
FirestartrGithubRepositorySpecPagesSourcePath["VALUE_FORWARD_SLASH"] = "/";
|
|
169004
|
+
/** /docs */
|
|
169005
|
+
FirestartrGithubRepositorySpecPagesSourcePath["VALUE_FORWARD_SLASH_DOCS"] = "/docs";
|
|
169006
|
+
})(FirestartrGithubRepositorySpecPagesSourcePath || (FirestartrGithubRepositorySpecPagesSourcePath = {}));
|
|
168969
169007
|
/**
|
|
168970
169008
|
* Converts an object of type 'FirestartrGithubRepositorySpecVarsVariableItemSchemaRef' to JSON representation.
|
|
168971
169009
|
*/
|
|
@@ -170756,6 +170794,17 @@ class RepoSecretsSectionChart extends BaseGithubChart {
|
|
|
170756
170794
|
|
|
170757
170795
|
|
|
170758
170796
|
|
|
170797
|
+
function normalizePages(pages) {
|
|
170798
|
+
if (!pages)
|
|
170799
|
+
return undefined;
|
|
170800
|
+
return {
|
|
170801
|
+
cname: pages.cname,
|
|
170802
|
+
public: pages.public,
|
|
170803
|
+
httpsEnforced: pages.https_enforced,
|
|
170804
|
+
source: pages.source,
|
|
170805
|
+
buildType: pages.buildType,
|
|
170806
|
+
};
|
|
170807
|
+
}
|
|
170759
170808
|
class GithubRepositoryChart extends BaseGithubChart {
|
|
170760
170809
|
template() {
|
|
170761
170810
|
const claim = this.get('claim');
|
|
@@ -170804,7 +170853,7 @@ class GithubRepositoryChart extends BaseGithubChart {
|
|
|
170804
170853
|
actions,
|
|
170805
170854
|
permissions: this.createPermissions(claim),
|
|
170806
170855
|
vars: this.createVars(claim),
|
|
170807
|
-
pages: claim.providers.github.pages,
|
|
170856
|
+
pages: normalizePages(claim.providers.github.pages),
|
|
170808
170857
|
branchProtections: [],
|
|
170809
170858
|
writeConnectionSecretToRef: {
|
|
170810
170859
|
name: `firestartrgithubrepository-${claim.name}-outputs`.toLowerCase(),
|
|
@@ -172959,19 +173008,6 @@ function getConfigPath() {
|
|
|
172959
173008
|
}
|
|
172960
173009
|
return configPath;
|
|
172961
173010
|
}
|
|
172962
|
-
/**
|
|
172963
|
-
* claimsDefaults path
|
|
172964
|
-
*/
|
|
172965
|
-
let claimsDefaultsPath = '';
|
|
172966
|
-
function setClaimsDefaultsPath(path) {
|
|
172967
|
-
claimsDefaultsPath = path;
|
|
172968
|
-
}
|
|
172969
|
-
function getClaimsDefaultsPath() {
|
|
172970
|
-
if (!claimsDefaultsPath) {
|
|
172971
|
-
throw new Error('Claims defaults path not set');
|
|
172972
|
-
}
|
|
172973
|
-
return claimsDefaultsPath;
|
|
172974
|
-
}
|
|
172975
173011
|
/* harmony default export */ const config = ({
|
|
172976
173012
|
setClaimsPath,
|
|
172977
173013
|
getClaimsPath,
|
|
@@ -172979,8 +173015,6 @@ function getClaimsDefaultsPath() {
|
|
|
172979
173015
|
getResourcesPath,
|
|
172980
173016
|
setConfigPath,
|
|
172981
173017
|
getConfigPath,
|
|
172982
|
-
setClaimsDefaultsPath,
|
|
172983
|
-
getClaimsDefaultsPath,
|
|
172984
173018
|
});
|
|
172985
173019
|
|
|
172986
173020
|
;// CONCATENATED MODULE: ../importer/src/logger.ts
|
|
@@ -173582,9 +173616,6 @@ function transformRepoName(repoName) {
|
|
|
173582
173616
|
|
|
173583
173617
|
|
|
173584
173618
|
|
|
173585
|
-
|
|
173586
|
-
|
|
173587
|
-
|
|
173588
173619
|
const TYPE_MAP = {
|
|
173589
173620
|
User: 'user',
|
|
173590
173621
|
Team: 'group',
|
|
@@ -173653,33 +173684,27 @@ class RepoGithubDecanter extends GithubDecanter {
|
|
|
173653
173684
|
}
|
|
173654
173685
|
__decantPages() {
|
|
173655
173686
|
if (this.data.pages) {
|
|
173656
|
-
|
|
173657
|
-
|
|
173658
|
-
|
|
173659
|
-
|
|
173660
|
-
|
|
173661
|
-
|
|
173662
|
-
|
|
173663
|
-
|
|
173664
|
-
|
|
173665
|
-
|
|
173666
|
-
}
|
|
173667
|
-
|
|
173668
|
-
}
|
|
173669
|
-
|
|
173670
|
-
|
|
173671
|
-
op: 'add',
|
|
173672
|
-
path: '/providers/github/pages',
|
|
173673
|
-
value: {
|
|
173674
|
-
buildType: 'legacy',
|
|
173675
|
-
...(typeof this.data.pages.cname === 'string' &&
|
|
173676
|
-
this.data.pages.cname.length > 0
|
|
173677
|
-
? { cname: this.data.pages.cname }
|
|
173678
|
-
: {}),
|
|
173679
|
-
source: this.data.pages.source,
|
|
173680
|
-
},
|
|
173681
|
-
});
|
|
173687
|
+
const pagesData = this.data.pages;
|
|
173688
|
+
const pagesConfig = {
|
|
173689
|
+
buildType: pagesData.build_type,
|
|
173690
|
+
...(typeof pagesData.cname === 'string' && pagesData.cname.length > 0
|
|
173691
|
+
? { cname: pagesData.cname }
|
|
173692
|
+
: {}),
|
|
173693
|
+
...(typeof pagesData.public === 'boolean'
|
|
173694
|
+
? { public: pagesData.public }
|
|
173695
|
+
: {}),
|
|
173696
|
+
...(typeof pagesData.https_enforced === 'boolean'
|
|
173697
|
+
? { https_enforced: pagesData.https_enforced }
|
|
173698
|
+
: {}),
|
|
173699
|
+
};
|
|
173700
|
+
if (pagesData.build_type === 'legacy') {
|
|
173701
|
+
pagesConfig.source = pagesData.source;
|
|
173682
173702
|
}
|
|
173703
|
+
this.__patchClaim({
|
|
173704
|
+
op: 'add',
|
|
173705
|
+
path: '/providers/github/pages',
|
|
173706
|
+
value: pagesConfig,
|
|
173707
|
+
});
|
|
173683
173708
|
}
|
|
173684
173709
|
}
|
|
173685
173710
|
__decantOIDC() {
|
|
@@ -173732,51 +173757,15 @@ class RepoGithubDecanter extends GithubDecanter {
|
|
|
173732
173757
|
return (this.data.teamsAndMembers.directMembers.some((member) => member.name?.toLowerCase() === normalizedUserName) ||
|
|
173733
173758
|
this.data.teamsAndMembers.outsideMembers.some((member) => member.name?.toLowerCase() === normalizedUserName));
|
|
173734
173759
|
};
|
|
173735
|
-
// Resolve the default owner from claims_defaults.yaml if available.
|
|
173736
|
-
// ComponentClaim.owner is of form "group:<name>" or "user:<name>".
|
|
173737
|
-
// For teams we map to "@<org>/<name>", for users to "@<name>".
|
|
173738
|
-
let defaultOwnerTeamHandle = null;
|
|
173739
|
-
let defaultOwnerUserHandle = null;
|
|
173740
|
-
try {
|
|
173741
|
-
const raw = external_fs_.readFileSync(`${getClaimsDefaultsPath()}/claims_defaults.yaml`, 'utf-8');
|
|
173742
|
-
const defaults = catalog_common/* default.io.fromYaml */.Z.io.fromYaml(raw);
|
|
173743
|
-
const ownerRef = defaults?.ComponentClaim?.owner;
|
|
173744
|
-
if (typeof ownerRef === 'string' && ownerRef.includes(':')) {
|
|
173745
|
-
const [kind, name] = ownerRef.split(':');
|
|
173746
|
-
if (kind === 'group' && name) {
|
|
173747
|
-
defaultOwnerTeamHandle = `@${this.org.toLowerCase()}/${name.toLowerCase()}`;
|
|
173748
|
-
}
|
|
173749
|
-
else if (kind === 'user' && name) {
|
|
173750
|
-
defaultOwnerUserHandle = `@${name.toLowerCase()}`;
|
|
173751
|
-
}
|
|
173752
|
-
}
|
|
173753
|
-
}
|
|
173754
|
-
catch {
|
|
173755
|
-
// path not set, file missing, or parse error → no default owner, keep strict behaviour
|
|
173756
|
-
}
|
|
173757
|
-
const isDefaultOwner = (owner) => {
|
|
173758
|
-
const normalized = owner.name.toLowerCase();
|
|
173759
|
-
if (owner.isTeam)
|
|
173760
|
-
return normalized === defaultOwnerTeamHandle;
|
|
173761
|
-
return normalized === defaultOwnerUserHandle;
|
|
173762
|
-
};
|
|
173763
173760
|
// let's validate that every element in the
|
|
173764
173761
|
// CODEOWNERS file is either a team or a user in the repository,
|
|
173765
173762
|
// otherwise we will have dangling references in the claim which will cause issues down the line
|
|
173766
173763
|
for (const owner of owners) {
|
|
173767
173764
|
if (owner.isTeam && !isInTeams(owner.name)) {
|
|
173768
|
-
if (isDefaultOwner(owner)) {
|
|
173769
|
-
importer_src_logger.warn(`[${this.org}/${this.data.repoDetails.name}] CODEOWNERS file references default owner team ${owner.name} which is not yet in the repository's teams — will be granted on provisioning; continuing.`);
|
|
173770
|
-
continue;
|
|
173771
|
-
}
|
|
173772
173765
|
importer_src_logger.error(`[${this.org}/${this.data.repoDetails.name}] CODEOWNERS file references team ${owner.name} which is not present in the repository's teams.`);
|
|
173773
173766
|
throw new Error(`[${this.org}/${this.data.repoDetails.name}] CODEOWNERS file references team ${owner.name} which is not present in the repository's teams.`);
|
|
173774
173767
|
}
|
|
173775
173768
|
else if (!owner.isTeam && !isInUsers(owner.name)) {
|
|
173776
|
-
if (isDefaultOwner(owner)) {
|
|
173777
|
-
importer_src_logger.warn(`[${this.org}/${this.data.repoDetails.name}] CODEOWNERS file references default owner user ${owner.name} not yet collaborator — will be granted on provisioning; continuing.`);
|
|
173778
|
-
continue;
|
|
173779
|
-
}
|
|
173780
173769
|
importer_src_logger.error(`[${this.org}/${this.data.repoDetails.name}] CODEOWNERS file references user ${owner.name} which is not present in the repository's collaborators.`);
|
|
173781
173770
|
throw new Error(`[${this.org}/${this.data.repoDetails.name}] CODEOWNERS file references user ${owner.name} which is not present in the repository's collaborators.`);
|
|
173782
173771
|
}
|
|
@@ -174463,7 +174452,6 @@ async function reimporter_isDirectory(path) {
|
|
|
174463
174452
|
|
|
174464
174453
|
|
|
174465
174454
|
|
|
174466
|
-
|
|
174467
174455
|
// const MAP_COLLECTION_KIND_CR_KIND: any = {
|
|
174468
174456
|
// gh-members: 'FirestartrGithubMembership',
|
|
174469
174457
|
// gh-group: 'FirestartrGithubGroup',
|
|
@@ -174474,7 +174462,6 @@ async function runImporter(force, skipPlan, claimsPath, crsPath, configPath, cla
|
|
|
174474
174462
|
let generatedFilters = [];
|
|
174475
174463
|
//gh-repo,REGEXP=.*vite.*
|
|
174476
174464
|
cdk8s_renderer.setPath('claimsDefaults', claimsDefaultsPath);
|
|
174477
|
-
setClaimsDefaultsPath(claimsDefaultsPath);
|
|
174478
174465
|
generatedFilters = buildFilters(filters, force, crsPath, generatedFilters);
|
|
174479
174466
|
if (needsReimport) {
|
|
174480
174467
|
await reimportGithubGitopsRepository(org, crsPath, configPath, generatedFilters);
|
|
@@ -365126,8 +365113,8 @@ const MODULES = {
|
|
|
365126
365113
|
},
|
|
365127
365114
|
FirestartrGithubRepository: {
|
|
365128
365115
|
module: 'git::https://github.com/prefapp/tfm.git//modules/github-repo',
|
|
365129
|
-
// github-repo
|
|
365130
|
-
ref: '
|
|
365116
|
+
// github-repo feat/1385: add public and https_enforced to pages
|
|
365117
|
+
ref: '441b93d8a0d78f6088db096a852305f63a227eaa',
|
|
365131
365118
|
},
|
|
365132
365119
|
FirestartrGithubRepositoryFeature: {
|
|
365133
365120
|
module: 'git::https://github.com/prefapp/tfm.git//modules/github-files-set',
|
|
@@ -366024,14 +366011,14 @@ class EntityGHRepo extends base_Entity {
|
|
|
366024
366011
|
},
|
|
366025
366012
|
});
|
|
366026
366013
|
}
|
|
366027
|
-
|
|
366028
|
-
* Validation logic for GitHub Pages branch settings:
|
|
366029
|
-
* - On create: If pages branch is set, it must equal the default branch.
|
|
366030
|
-
* - On update: If pages branch is set and is not the default, it must exist in remote.
|
|
366031
|
-
*/
|
|
366032
|
-
async validatePagesBranch(tfOp, repoAlreadyExists) {
|
|
366014
|
+
async validatePages(tfOp, repoAlreadyExists) {
|
|
366033
366015
|
const pages = this.cr.spec.pages;
|
|
366034
|
-
if (!pages
|
|
366016
|
+
if (!pages)
|
|
366017
|
+
return;
|
|
366018
|
+
if (pages.https_enforced && !pages.cname) {
|
|
366019
|
+
throw new Error(`[gh-provisioner] ${this.k8sId} https_enforced requires cname to be set in pages configuration`);
|
|
366020
|
+
}
|
|
366021
|
+
if (!pages.source || !pages.source.branch)
|
|
366035
366022
|
return;
|
|
366036
366023
|
const branch = pages.source.branch;
|
|
366037
366024
|
const defaultBranch = this.cr.spec.repo.defaultBranch;
|
|
@@ -366055,7 +366042,6 @@ class EntityGHRepo extends base_Entity {
|
|
|
366055
366042
|
if (err && err.status === 404) {
|
|
366056
366043
|
throw new Error(`Pages branch '${branch}' does not exist in the repository '${org}/${repo}'.`);
|
|
366057
366044
|
}
|
|
366058
|
-
// Other errors propagate
|
|
366059
366045
|
throw err;
|
|
366060
366046
|
}
|
|
366061
366047
|
}
|
|
@@ -366068,7 +366054,7 @@ class EntityGHRepo extends base_Entity {
|
|
|
366068
366054
|
return await github["default"].repo.repoExists(this.cr.spec.org, this.cr.name);
|
|
366069
366055
|
}));
|
|
366070
366056
|
if (tfOp !== 'destroy' && tfOp !== 'plan-destroy') {
|
|
366071
|
-
await this.
|
|
366057
|
+
await this.validatePages(tfOp, repoAlreadyExists);
|
|
366072
366058
|
}
|
|
366073
366059
|
await this.provisionRepository();
|
|
366074
366060
|
this.provisionPages();
|
|
@@ -366215,6 +366201,9 @@ class EntityGHRepo extends base_Entity {
|
|
|
366215
366201
|
if (this.cr.spec.pages) {
|
|
366216
366202
|
const source = this.cr.spec.pages.source ?? {};
|
|
366217
366203
|
const buildType = this.cr.spec.pages.buildType ?? 'legacy';
|
|
366204
|
+
const cname = this.cr.spec.pages.cname;
|
|
366205
|
+
const public_ = this.cr.spec.pages.public;
|
|
366206
|
+
const httpsEnforced = this.cr.spec.pages.https_enforced;
|
|
366218
366207
|
this.patchData({
|
|
366219
366208
|
path: '/config/pages',
|
|
366220
366209
|
op: PatchOperations.add,
|
|
@@ -366228,7 +366217,11 @@ class EntityGHRepo extends base_Entity {
|
|
|
366228
366217
|
},
|
|
366229
366218
|
}
|
|
366230
366219
|
: {}),
|
|
366231
|
-
cname:
|
|
366220
|
+
...(cname !== undefined ? { cname } : {}),
|
|
366221
|
+
...(public_ !== undefined ? { public: public_ } : {}),
|
|
366222
|
+
...(httpsEnforced !== undefined
|
|
366223
|
+
? { https_enforced: httpsEnforced }
|
|
366224
|
+
: {}),
|
|
366232
366225
|
},
|
|
366233
366226
|
});
|
|
366234
366227
|
}
|
|
@@ -713359,7 +713352,7 @@ const crsStatusSubcommand = {
|
|
|
713359
713352
|
};
|
|
713360
713353
|
|
|
713361
713354
|
;// CONCATENATED MODULE: ./package.json
|
|
713362
|
-
const package_namespaceObject = JSON.parse('{"i8":"2.11.0-snapshot-
|
|
713355
|
+
const package_namespaceObject = JSON.parse('{"i8":"2.11.0-snapshot-ghpages-01"}');
|
|
713363
713356
|
;// CONCATENATED MODULE: ../../package.json
|
|
713364
713357
|
const package_namespaceObject_1 = {"i8":"2.10.0"};
|
|
713365
713358
|
// EXTERNAL MODULE: ../../node_modules/semver/index.js
|
|
@@ -1709,6 +1709,14 @@ export interface FirestartrGithubRepositorySpecPages {
|
|
|
1709
1709
|
* @schema FirestartrGithubRepositorySpecPages#cname
|
|
1710
1710
|
*/
|
|
1711
1711
|
readonly cname?: string;
|
|
1712
|
+
/**
|
|
1713
|
+
* @schema FirestartrGithubRepositorySpecPages#public
|
|
1714
|
+
*/
|
|
1715
|
+
readonly public?: boolean;
|
|
1716
|
+
/**
|
|
1717
|
+
* @schema FirestartrGithubRepositorySpecPages#https_enforced
|
|
1718
|
+
*/
|
|
1719
|
+
readonly httpsEnforced?: boolean;
|
|
1712
1720
|
/**
|
|
1713
1721
|
* @schema FirestartrGithubRepositorySpecPages#source
|
|
1714
1722
|
*/
|
|
@@ -1952,7 +1960,7 @@ export interface FirestartrGithubRepositorySpecPagesSource {
|
|
|
1952
1960
|
/**
|
|
1953
1961
|
* @schema FirestartrGithubRepositorySpecPagesSource#path
|
|
1954
1962
|
*/
|
|
1955
|
-
readonly path?:
|
|
1963
|
+
readonly path?: FirestartrGithubRepositorySpecPagesSourcePath;
|
|
1956
1964
|
}
|
|
1957
1965
|
/**
|
|
1958
1966
|
* Converts an object of type 'FirestartrGithubRepositorySpecPagesSource' to JSON representation.
|
|
@@ -2119,6 +2127,15 @@ export interface FirestartrGithubRepositorySpecContextProviderRef {
|
|
|
2119
2127
|
* Converts an object of type 'FirestartrGithubRepositorySpecContextProviderRef' to JSON representation.
|
|
2120
2128
|
*/
|
|
2121
2129
|
export declare function toJson_FirestartrGithubRepositorySpecContextProviderRef(obj: FirestartrGithubRepositorySpecContextProviderRef | undefined): Record<string, any> | undefined;
|
|
2130
|
+
/**
|
|
2131
|
+
* @schema FirestartrGithubRepositorySpecPagesSourcePath
|
|
2132
|
+
*/
|
|
2133
|
+
export declare enum FirestartrGithubRepositorySpecPagesSourcePath {
|
|
2134
|
+
/** / */
|
|
2135
|
+
VALUE_FORWARD_SLASH = "/",
|
|
2136
|
+
/** /docs */
|
|
2137
|
+
VALUE_FORWARD_SLASH_DOCS = "/docs"
|
|
2138
|
+
}
|
|
2122
2139
|
/**
|
|
2123
2140
|
* @schema FirestartrGithubRepositorySpecVarsVariableItemSchemaRef
|
|
2124
2141
|
*/
|
|
@@ -733,29 +733,7 @@ declare const schemas: {
|
|
|
733
733
|
type: string;
|
|
734
734
|
};
|
|
735
735
|
pages: {
|
|
736
|
-
|
|
737
|
-
properties: {
|
|
738
|
-
cname: {
|
|
739
|
-
type: string;
|
|
740
|
-
};
|
|
741
|
-
buildType: {
|
|
742
|
-
type: string;
|
|
743
|
-
enum: string[];
|
|
744
|
-
};
|
|
745
|
-
source: {
|
|
746
|
-
type: string;
|
|
747
|
-
properties: {
|
|
748
|
-
branch: {
|
|
749
|
-
type: string;
|
|
750
|
-
};
|
|
751
|
-
path: {
|
|
752
|
-
type: string;
|
|
753
|
-
};
|
|
754
|
-
};
|
|
755
|
-
additionalProperties: boolean;
|
|
756
|
-
};
|
|
757
|
-
};
|
|
758
|
-
additionalProperties: boolean;
|
|
736
|
+
$ref: string;
|
|
759
737
|
};
|
|
760
738
|
additionalRules: {
|
|
761
739
|
type: string;
|
|
@@ -1139,6 +1117,56 @@ declare const schemas: {
|
|
|
1139
1117
|
additionalProperties: boolean;
|
|
1140
1118
|
};
|
|
1141
1119
|
};
|
|
1120
|
+
} | {
|
|
1121
|
+
$schema: string;
|
|
1122
|
+
$id: string;
|
|
1123
|
+
definitions: {
|
|
1124
|
+
GithubPages: {
|
|
1125
|
+
$id: string;
|
|
1126
|
+
type: string;
|
|
1127
|
+
description: string;
|
|
1128
|
+
properties: {
|
|
1129
|
+
cname: {
|
|
1130
|
+
type: string;
|
|
1131
|
+
};
|
|
1132
|
+
public: {
|
|
1133
|
+
type: string;
|
|
1134
|
+
};
|
|
1135
|
+
https_enforced: {
|
|
1136
|
+
type: string;
|
|
1137
|
+
};
|
|
1138
|
+
buildType: {
|
|
1139
|
+
type: string;
|
|
1140
|
+
enum: string[];
|
|
1141
|
+
};
|
|
1142
|
+
source: {
|
|
1143
|
+
type: string;
|
|
1144
|
+
properties: {
|
|
1145
|
+
branch: {
|
|
1146
|
+
type: string;
|
|
1147
|
+
};
|
|
1148
|
+
path: {
|
|
1149
|
+
type: string;
|
|
1150
|
+
enum: string[];
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1153
|
+
additionalProperties: boolean;
|
|
1154
|
+
};
|
|
1155
|
+
};
|
|
1156
|
+
additionalProperties: boolean;
|
|
1157
|
+
if: {
|
|
1158
|
+
required: string[];
|
|
1159
|
+
properties: {
|
|
1160
|
+
https_enforced: {
|
|
1161
|
+
const: boolean;
|
|
1162
|
+
};
|
|
1163
|
+
};
|
|
1164
|
+
};
|
|
1165
|
+
then: {
|
|
1166
|
+
required: string[];
|
|
1167
|
+
};
|
|
1168
|
+
};
|
|
1169
|
+
};
|
|
1142
1170
|
})[] | {
|
|
1143
1171
|
$id: string;
|
|
1144
1172
|
definitions: {
|
|
@@ -137,29 +137,7 @@ declare const _default: {
|
|
|
137
137
|
type: string;
|
|
138
138
|
};
|
|
139
139
|
pages: {
|
|
140
|
-
|
|
141
|
-
properties: {
|
|
142
|
-
cname: {
|
|
143
|
-
type: string;
|
|
144
|
-
};
|
|
145
|
-
buildType: {
|
|
146
|
-
type: string;
|
|
147
|
-
enum: string[];
|
|
148
|
-
};
|
|
149
|
-
source: {
|
|
150
|
-
type: string;
|
|
151
|
-
properties: {
|
|
152
|
-
branch: {
|
|
153
|
-
type: string;
|
|
154
|
-
};
|
|
155
|
-
path: {
|
|
156
|
-
type: string;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
additionalProperties: boolean;
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
additionalProperties: boolean;
|
|
140
|
+
$ref: string;
|
|
163
141
|
};
|
|
164
142
|
additionalRules: {
|
|
165
143
|
type: string;
|
|
@@ -264,29 +264,7 @@ export declare const GithubSchemas: ({
|
|
|
264
264
|
type: string;
|
|
265
265
|
};
|
|
266
266
|
pages: {
|
|
267
|
-
|
|
268
|
-
properties: {
|
|
269
|
-
cname: {
|
|
270
|
-
type: string;
|
|
271
|
-
};
|
|
272
|
-
buildType: {
|
|
273
|
-
type: string;
|
|
274
|
-
enum: string[];
|
|
275
|
-
};
|
|
276
|
-
source: {
|
|
277
|
-
type: string;
|
|
278
|
-
properties: {
|
|
279
|
-
branch: {
|
|
280
|
-
type: string;
|
|
281
|
-
};
|
|
282
|
-
path: {
|
|
283
|
-
type: string;
|
|
284
|
-
};
|
|
285
|
-
};
|
|
286
|
-
additionalProperties: boolean;
|
|
287
|
-
};
|
|
288
|
-
};
|
|
289
|
-
additionalProperties: boolean;
|
|
267
|
+
$ref: string;
|
|
290
268
|
};
|
|
291
269
|
additionalRules: {
|
|
292
270
|
type: string;
|
|
@@ -670,4 +648,54 @@ export declare const GithubSchemas: ({
|
|
|
670
648
|
additionalProperties: boolean;
|
|
671
649
|
};
|
|
672
650
|
};
|
|
651
|
+
} | {
|
|
652
|
+
$schema: string;
|
|
653
|
+
$id: string;
|
|
654
|
+
definitions: {
|
|
655
|
+
GithubPages: {
|
|
656
|
+
$id: string;
|
|
657
|
+
type: string;
|
|
658
|
+
description: string;
|
|
659
|
+
properties: {
|
|
660
|
+
cname: {
|
|
661
|
+
type: string;
|
|
662
|
+
};
|
|
663
|
+
public: {
|
|
664
|
+
type: string;
|
|
665
|
+
};
|
|
666
|
+
https_enforced: {
|
|
667
|
+
type: string;
|
|
668
|
+
};
|
|
669
|
+
buildType: {
|
|
670
|
+
type: string;
|
|
671
|
+
enum: string[];
|
|
672
|
+
};
|
|
673
|
+
source: {
|
|
674
|
+
type: string;
|
|
675
|
+
properties: {
|
|
676
|
+
branch: {
|
|
677
|
+
type: string;
|
|
678
|
+
};
|
|
679
|
+
path: {
|
|
680
|
+
type: string;
|
|
681
|
+
enum: string[];
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
additionalProperties: boolean;
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
additionalProperties: boolean;
|
|
688
|
+
if: {
|
|
689
|
+
required: string[];
|
|
690
|
+
properties: {
|
|
691
|
+
https_enforced: {
|
|
692
|
+
const: boolean;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
then: {
|
|
697
|
+
required: string[];
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
};
|
|
673
701
|
})[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FirestartrGithubRepositorySpecPagesBuildType, FirestartrGithubRepositorySpecPagesSourcePath } from '../../../imports/firestartr.dev';
|
|
2
|
+
export interface IRepositoryPage {
|
|
3
|
+
cname?: string;
|
|
4
|
+
public?: boolean;
|
|
5
|
+
https_enforced?: boolean;
|
|
6
|
+
source?: {
|
|
7
|
+
branch: string;
|
|
8
|
+
path: FirestartrGithubRepositorySpecPagesSourcePath;
|
|
9
|
+
};
|
|
10
|
+
buildType?: FirestartrGithubRepositorySpecPagesBuildType;
|
|
11
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
$schema: string;
|
|
3
|
+
$id: string;
|
|
4
|
+
definitions: {
|
|
5
|
+
GithubPages: {
|
|
6
|
+
$id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
description: string;
|
|
9
|
+
properties: {
|
|
10
|
+
cname: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
public: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
https_enforced: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
buildType: {
|
|
20
|
+
type: string;
|
|
21
|
+
enum: string[];
|
|
22
|
+
};
|
|
23
|
+
source: {
|
|
24
|
+
type: string;
|
|
25
|
+
properties: {
|
|
26
|
+
branch: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
path: {
|
|
30
|
+
type: string;
|
|
31
|
+
enum: string[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
additionalProperties: boolean;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
additionalProperties: boolean;
|
|
38
|
+
if: {
|
|
39
|
+
required: string[];
|
|
40
|
+
properties: {
|
|
41
|
+
https_enforced: {
|
|
42
|
+
const: boolean;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
then: {
|
|
47
|
+
required: string[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BranchStrategy } from 'catalog_common';
|
|
2
|
-
import {
|
|
2
|
+
import { FirestartrGithubRepositorySpecRepoVisibility } from '../../../imports/firestartr.dev';
|
|
3
3
|
import { IClaimInstalledFeature } from '../base';
|
|
4
4
|
import { IComponentClaim } from '../base/component';
|
|
5
|
+
import { IRepositoryPage } from './pages';
|
|
5
6
|
export interface IGithubRepositoryClaim extends IComponentClaim {
|
|
6
7
|
providers: {
|
|
7
8
|
github: {
|
|
@@ -49,14 +50,6 @@ interface IComponentClaimActions {
|
|
|
49
50
|
includeClaimKeys: string[];
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
|
-
interface IRepositoryPage {
|
|
53
|
-
cname?: string;
|
|
54
|
-
source?: {
|
|
55
|
-
branch: string;
|
|
56
|
-
path: string;
|
|
57
|
-
};
|
|
58
|
-
buildType?: FirestartrGithubRepositorySpecPagesBuildType;
|
|
59
|
-
}
|
|
60
53
|
interface IComponentClaimLabel {
|
|
61
54
|
name: string;
|
|
62
55
|
color: string;
|
|
@@ -2,12 +2,7 @@ import { Entity } from '../base';
|
|
|
2
2
|
export declare class EntityGHRepo extends Entity {
|
|
3
3
|
private escapeTerraformBranchName;
|
|
4
4
|
constructor(artifact: any);
|
|
5
|
-
|
|
6
|
-
* Validation logic for GitHub Pages branch settings:
|
|
7
|
-
* - On create: If pages branch is set, it must equal the default branch.
|
|
8
|
-
* - On update: If pages branch is set and is not the default, it must exist in remote.
|
|
9
|
-
*/
|
|
10
|
-
private validatePagesBranch;
|
|
5
|
+
private validatePages;
|
|
11
6
|
loadResources(tfOp: string): Promise<void>;
|
|
12
7
|
postProvision(tfOp: string): Promise<void>;
|
|
13
8
|
loadAddressesToImport(): Promise<void>;
|
|
@@ -4,8 +4,6 @@ export declare function setResourcesPath(path: string): void;
|
|
|
4
4
|
export declare function getResourcesPath(): string;
|
|
5
5
|
export declare function setConfigPath(path: string): void;
|
|
6
6
|
export declare function getConfigPath(): string;
|
|
7
|
-
export declare function setClaimsDefaultsPath(path: string): void;
|
|
8
|
-
export declare function getClaimsDefaultsPath(): string;
|
|
9
7
|
declare const _default: {
|
|
10
8
|
setClaimsPath: typeof setClaimsPath;
|
|
11
9
|
getClaimsPath: typeof getClaimsPath;
|
|
@@ -13,7 +11,5 @@ declare const _default: {
|
|
|
13
11
|
getResourcesPath: typeof getResourcesPath;
|
|
14
12
|
setConfigPath: typeof setConfigPath;
|
|
15
13
|
getConfigPath: typeof getConfigPath;
|
|
16
|
-
setClaimsDefaultsPath: typeof setClaimsDefaultsPath;
|
|
17
|
-
getClaimsDefaultsPath: typeof getClaimsDefaultsPath;
|
|
18
14
|
};
|
|
19
15
|
export default _default;
|