@firestartr/cli 2.7.0-snapshot-9 → 2.7.0-snapshot-11

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 CHANGED
@@ -280394,7 +280394,6 @@ class BackstageInitializer extends InitializerPatches {
280394
280394
  return true;
280395
280395
  },
280396
280396
  apply(cr) {
280397
- // set annotation
280398
280397
  cr.metadata.annotations = cr.metadata.annotations ?? {};
280399
280398
  cr.metadata.annotations['backstage.io/kubernetes-id'] = claim.name;
280400
280399
  return cr;
@@ -280413,10 +280412,16 @@ class BackstageInitializer extends InitializerPatches {
280413
280412
  return true;
280414
280413
  },
280415
280414
  apply(cr) {
280416
- // set label
280417
- cr.metadata.labels = cr.metadata.labels ?? {};
280418
- cr.metadata.labels['backstage.io/kubernetes-label-selector'] =
280419
- `backstage.io/kubernetes-id=${claim.name}`;
280415
+ const org = claim.providers?.github?.org;
280416
+ const repoName = claim.providers?.github?.name;
280417
+ if (!org || !repoName)
280418
+ return cr;
280419
+ cr.metadata.annotations = cr.metadata.annotations ?? {};
280420
+ if (cr.metadata.annotations['github.com/project-slug'] !== undefined) {
280421
+ return cr;
280422
+ }
280423
+ cr.metadata.annotations['github.com/project-slug'] =
280424
+ `${org}/${repoName}`;
280420
280425
  return cr;
280421
280426
  },
280422
280427
  identify() {
@@ -280431,6 +280436,8 @@ class BackstageInitializer extends InitializerPatches {
280431
280436
  ];
280432
280437
  }
280433
280438
  }
280439
+ BackstageInitializer.applicableKinds = ['ComponentClaim'];
280440
+
280434
280441
 
280435
280442
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/initializers/syncer.ts
280436
280443
 
@@ -282037,6 +282044,9 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
282037
282044
  hasWiki: {
282038
282045
  type: 'boolean',
282039
282046
  },
282047
+ hasDiscussions: {
282048
+ type: 'boolean',
282049
+ },
282040
282050
  pages: {
282041
282051
  type: 'object',
282042
282052
  properties: {
@@ -286621,6 +286631,7 @@ function toJson_FirestartrGithubRepositorySpecRepo(obj) {
286621
286631
  'allowUpdateBranch': obj.allowUpdateBranch,
286622
286632
  'hasIssues': obj.hasIssues,
286623
286633
  'hasWiki': obj.hasWiki,
286634
+ 'hasDiscussions': obj.hasDiscussions,
286624
286635
  'topics': obj.topics?.map(y => y),
286625
286636
  'labels': obj.labels?.map(y => toJson_FirestartrGithubRepositorySpecRepoLabels(y)),
286626
286637
  'visibility': obj.visibility,
@@ -286844,6 +286855,17 @@ function toJson_FirestartrGithubRepositorySpecPagesSource(obj) {
286844
286855
  // filter undefined values
286845
286856
  return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
286846
286857
  }
286858
+ /* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
286859
+ /**
286860
+ * @schema FirestartrGithubRepositorySpecPagesBuildType
286861
+ */
286862
+ var FirestartrGithubRepositorySpecPagesBuildType;
286863
+ (function (FirestartrGithubRepositorySpecPagesBuildType) {
286864
+ /** workflow */
286865
+ FirestartrGithubRepositorySpecPagesBuildType["WORKFLOW"] = "workflow";
286866
+ /** legacy */
286867
+ FirestartrGithubRepositorySpecPagesBuildType["LEGACY"] = "legacy";
286868
+ })(FirestartrGithubRepositorySpecPagesBuildType || (FirestartrGithubRepositorySpecPagesBuildType = {}));
286847
286869
  /**
286848
286870
  * Converts an object of type 'FirestartrGithubRepositorySpecPermissionsRef' to JSON representation.
286849
286871
  */
@@ -288761,6 +288783,7 @@ class GithubRepositoryChart extends BaseGithubChart {
288761
288783
  allowUpdateBranch: claim.providers.github.allowUpdateBranch,
288762
288784
  hasIssues: claim.providers.github.hasIssues,
288763
288785
  hasWiki: claim.providers.github.hasWiki,
288786
+ hasDiscussions: claim.providers.github.hasDiscussions,
288764
288787
  visibility: claim.providers.github.visibility,
288765
288788
  defaultBranch: claim.providers.github?.branchStrategy?.defaultBranch,
288766
288789
  codeowners: createCodeOwnersData(claim),
@@ -289787,7 +289810,6 @@ async function renderClaim(catalogScope, firestartrScope, claim, patches, previo
289787
289810
  const postPatches = patches.filter((patch) => patch.isPostPatch);
289788
289811
  const provider = config_getConfiguredProvider();
289789
289812
  const loadGithub = (provider === AllowedProviders.all ||
289790
- provider === AllowedProviders.catalog ||
289791
289813
  provider === AllowedProviders.github) &&
289792
289814
  'github' in claim.providers;
289793
289815
  const loadCatalog = provider === AllowedProviders.all || provider === AllowedProviders.catalog;
@@ -299818,8 +299840,8 @@ const MODULES = {
299818
299840
  },
299819
299841
  FirestartrGithubRepository: {
299820
299842
  module: 'git::https://github.com/prefapp/tfm.git//modules/github-repo',
299821
- // github-repo-v0.6.0
299822
- ref: '7eaa88e8a55c85bc8b7270a7d72055d8a53d6df1',
299843
+ // github-repo-v0.7.0
299844
+ ref: '6bdbcd9b813837bec9d1c576952bd88744508883',
299823
299845
  },
299824
299846
  FirestartrGithubRepositoryFeature: {
299825
299847
  module: 'git::https://github.com/prefapp/tfm.git//modules/github-files-set',
@@ -300860,7 +300882,7 @@ class EntityGHRepo extends base_Entity {
300860
300882
  provisionPages() {
300861
300883
  if (this.cr.spec.pages) {
300862
300884
  const source = this.cr.spec.pages.source ?? {};
300863
- const buildType = this.cr.spec.pages.buildType || 'legacy';
300885
+ const buildType = this.cr.spec.pages.buildType ?? 'legacy';
300864
300886
  this.patchData({
300865
300887
  path: '/config/pages',
300866
300888
  op: PatchOperations.add,
@@ -303579,7 +303601,7 @@ const crs_analyzerSubcommand = {
303579
303601
  };
303580
303602
 
303581
303603
  ;// CONCATENATED MODULE: ./package.json
303582
- const package_namespaceObject = JSON.parse('{"i8":"2.7.0-snapshot-9"}');
303604
+ const package_namespaceObject = JSON.parse('{"i8":"2.7.0-snapshot-11"}');
303583
303605
  ;// CONCATENATED MODULE: ../../package.json
303584
303606
  const package_namespaceObject_1 = {"i8":"2.6.4"};
303585
303607
  ;// CONCATENATED MODULE: ./src/subcommands/index.ts
@@ -1391,6 +1391,10 @@ export interface FirestartrGithubRepositorySpecRepo {
1391
1391
  * @schema FirestartrGithubRepositorySpecRepo#hasWiki
1392
1392
  */
1393
1393
  readonly hasWiki?: boolean;
1394
+ /**
1395
+ * @schema FirestartrGithubRepositorySpecRepo#hasDiscussions
1396
+ */
1397
+ readonly hasDiscussions?: boolean;
1394
1398
  /**
1395
1399
  * @schema FirestartrGithubRepositorySpecRepo#topics
1396
1400
  */
@@ -1450,7 +1454,7 @@ export interface FirestartrGithubRepositorySpecPages {
1450
1454
  /**
1451
1455
  * @schema FirestartrGithubRepositorySpecPages#buildType
1452
1456
  */
1453
- readonly buildType?: string;
1457
+ readonly buildType?: FirestartrGithubRepositorySpecPagesBuildType;
1454
1458
  }
1455
1459
  /**
1456
1460
  * Converts an object of type 'FirestartrGithubRepositorySpecPages' to JSON representation.
@@ -1684,6 +1688,15 @@ export interface FirestartrGithubRepositorySpecPagesSource {
1684
1688
  * Converts an object of type 'FirestartrGithubRepositorySpecPagesSource' to JSON representation.
1685
1689
  */
1686
1690
  export declare function toJson_FirestartrGithubRepositorySpecPagesSource(obj: FirestartrGithubRepositorySpecPagesSource | undefined): Record<string, any> | undefined;
1691
+ /**
1692
+ * @schema FirestartrGithubRepositorySpecPagesBuildType
1693
+ */
1694
+ export declare enum FirestartrGithubRepositorySpecPagesBuildType {
1695
+ /** workflow */
1696
+ WORKFLOW = "workflow",
1697
+ /** legacy */
1698
+ LEGACY = "legacy"
1699
+ }
1687
1700
  /**
1688
1701
  * @schema FirestartrGithubRepositorySpecPermissionsRef
1689
1702
  */
@@ -729,6 +729,9 @@ declare const schemas: {
729
729
  hasWiki: {
730
730
  type: string;
731
731
  };
732
+ hasDiscussions: {
733
+ type: string;
734
+ };
732
735
  pages: {
733
736
  type: string;
734
737
  properties: {
@@ -133,6 +133,9 @@ declare const _default: {
133
133
  hasWiki: {
134
134
  type: string;
135
135
  };
136
+ hasDiscussions: {
137
+ type: string;
138
+ };
136
139
  pages: {
137
140
  type: string;
138
141
  properties: {
@@ -260,6 +260,9 @@ export declare const GithubSchemas: ({
260
260
  hasWiki: {
261
261
  type: string;
262
262
  };
263
+ hasDiscussions: {
264
+ type: string;
265
+ };
263
266
  pages: {
264
267
  type: string;
265
268
  properties: {
@@ -1,5 +1,5 @@
1
1
  import { BranchStrategy } from 'catalog_common';
2
- import { FirestartrGithubRepositorySpecRepoVisibility } from '../../../imports/firestartr.dev';
2
+ import { FirestartrGithubRepositorySpecPagesBuildType, FirestartrGithubRepositorySpecRepoVisibility } from '../../../imports/firestartr.dev';
3
3
  import { IClaimInstalledFeature } from '../base';
4
4
  import { IComponentClaim } from '../base/component';
5
5
  export interface IGithubRepositoryClaim extends IComponentClaim {
@@ -22,6 +22,7 @@ export interface IGithubRepositoryClaim extends IComponentClaim {
22
22
  allowUpdateBranch: boolean;
23
23
  hasIssues: boolean;
24
24
  hasWiki: boolean;
25
+ hasDiscussions: boolean;
25
26
  features: IClaimInstalledFeature[];
26
27
  pages: IRepositoryPage;
27
28
  branchStrategy: IComponentClaimBranchStrategy;
@@ -49,12 +50,12 @@ interface IComponentClaimActions {
49
50
  };
50
51
  }
51
52
  interface IRepositoryPage {
52
- cname: string;
53
- source: {
53
+ cname?: string;
54
+ source?: {
54
55
  branch: string;
55
56
  path: string;
56
57
  };
57
- buildType?: string;
58
+ buildType?: FirestartrGithubRepositorySpecPagesBuildType;
58
59
  }
59
60
  interface IComponentClaimLabel {
60
61
  name: string;
@@ -1,6 +1,7 @@
1
1
  import { InitializerPatches } from './base';
2
2
  export declare class BackstageInitializer extends InitializerPatches {
3
3
  applicableProviders: string[];
4
+ static applicableKinds: string[];
4
5
  __validate(): Promise<boolean>;
5
6
  __patches(claim: any, _: any): Promise<{
6
7
  validate(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "2.7.0-snapshot-9",
3
+ "version": "2.7.0-snapshot-11",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",