@firestartr/cli 1.51.1-snapshot-06 → 1.51.2

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.
Files changed (25) hide show
  1. package/build/index.js +1224 -500
  2. package/build/packages/cdk8s_renderer/imports/firestartr.dev.d.ts +439 -139
  3. package/build/packages/cdk8s_renderer/src/charts/github/RepoSecretsSectionChart.d.ts +12 -0
  4. package/build/packages/cdk8s_renderer/src/charts/github/orgWebhookChart.d.ts +2 -1
  5. package/build/packages/cdk8s_renderer/src/charts/github/repositoryChart.d.ts +2 -8
  6. package/build/packages/cdk8s_renderer/src/claims/base/schemas/index.d.ts +7 -0
  7. package/build/packages/cdk8s_renderer/src/claims/github/index.d.ts +3 -0
  8. package/build/packages/cdk8s_renderer/src/claims/github/orgWebhook.d.ts +1 -4
  9. package/build/packages/cdk8s_renderer/src/claims/github/orgwebhook.schema.d.ts +3 -0
  10. package/build/packages/cdk8s_renderer/src/claims/tfworkspaces/index.d.ts +4 -0
  11. package/build/packages/cdk8s_renderer/src/claims/tfworkspaces/terraform.schema.d.ts +4 -0
  12. package/build/packages/github/index.d.ts +2 -0
  13. package/build/packages/github/src/encrypt.d.ts +3 -6
  14. package/build/packages/operator/src/informer.d.ts +1 -0
  15. package/build/packages/operator/src/processItem.debug.d.ts +2 -0
  16. package/build/packages/operator/src/status.d.ts +2 -0
  17. package/build/packages/operator/src/syncCtl.d.ts +31 -0
  18. package/build/packages/operator/src/syncer.d.ts +6 -2
  19. package/build/packages/operator/src/syncer.debug.d.ts +2 -0
  20. package/build/packages/provisioner/src/entities/firestartrgithubrepositorysecretssection/FirestartrGithubRepositorySecretsSection.d.ts +9 -0
  21. package/build/packages/provisioner/src/entities/firestartrgithubrepositorysecretssection/helpers/RepositorySecret.d.ts +3 -0
  22. package/build/packages/provisioner/src/resources/github_repository_secrets_section/index.d.ts +5 -0
  23. package/build/packages/provisioner/src/resources/index.d.ts +2 -0
  24. package/package.json +1 -1
  25. package/build/packages/provisioner/src/entities/firestartrgithubrepository/helpers/RepositorySecret.d.ts +0 -4
@@ -545,6 +545,9 @@ declare const schemas: {
545
545
  type: string;
546
546
  description: string;
547
547
  };
548
+ secretRef: {
549
+ $ref: string;
550
+ };
548
551
  events: {
549
552
  type: string;
550
553
  description: string;
@@ -685,7 +688,11 @@ declare const schemas: {
685
688
  schedule_timezone: {
686
689
  type: string;
687
690
  };
691
+ policy: {
692
+ type: string;
693
+ };
688
694
  };
695
+ additionalProperties: boolean;
689
696
  required: string[];
690
697
  oneOf: ({
691
698
  required: string[];
@@ -182,6 +182,9 @@ export declare const GithubSchemas: ({
182
182
  type: string;
183
183
  description: string;
184
184
  };
185
+ secretRef: {
186
+ $ref: string;
187
+ };
185
188
  events: {
186
189
  type: string;
187
190
  description: string;
@@ -8,10 +8,7 @@ export interface IGithubOrgWebhookClaim extends IOrgWebhookClaim {
8
8
  webhook: {
9
9
  url: string;
10
10
  contentType: FirestartrGithubOrgWebhookSpecWebhookContentType;
11
- secretRef: {
12
- name: string;
13
- key: string;
14
- };
11
+ secretRef: string;
15
12
  active?: boolean;
16
13
  events: string[];
17
14
  };
@@ -34,6 +34,9 @@ declare const _default: {
34
34
  type: string;
35
35
  description: string;
36
36
  };
37
+ secretRef: {
38
+ $ref: string;
39
+ };
37
40
  events: {
38
41
  type: string;
39
42
  description: string;
@@ -40,7 +40,11 @@ export declare const TerraformSchemas: {
40
40
  schedule_timezone: {
41
41
  type: string;
42
42
  };
43
+ policy: {
44
+ type: string;
45
+ };
43
46
  };
47
+ additionalProperties: boolean;
44
48
  required: string[];
45
49
  oneOf: ({
46
50
  required: string[];
@@ -40,7 +40,11 @@ declare const _default: {
40
40
  schedule_timezone: {
41
41
  type: string;
42
42
  };
43
+ policy: {
44
+ type: string;
45
+ };
43
46
  };
47
+ additionalProperties: boolean;
44
48
  required: string[];
45
49
  oneOf: ({
46
50
  required: string[];
@@ -1,6 +1,7 @@
1
1
  import { createCheckRun } from './src/check_run';
2
2
  import { getOctokitForOrg, getGithubAppToken, getOctokitFromPat } from './src/auth';
3
3
  import { encryptRepoSecret, getRepoPublicKey } from './src/encrypt';
4
+ import type { RepoSecretsSection } from './src/encrypt';
4
5
  declare const _default: {
5
6
  org: {
6
7
  getRepositoryList: typeof import("./src/organization").getRepositoryList;
@@ -85,3 +86,4 @@ declare const _default: {
85
86
  };
86
87
  };
87
88
  export default _default;
89
+ export { RepoSecretsSection };
@@ -1,12 +1,9 @@
1
- export declare function getRepoPublicKey(owner: string, repo: string): Promise<{
1
+ export type RepoSecretsSection = 'actions' | 'dependabot' | 'codespaces';
2
+ export declare function getRepoPublicKey(owner: string, repo: string, section: RepoSecretsSection): Promise<{
2
3
  key_id: string;
3
4
  key: string;
4
- id?: number;
5
- url?: string;
6
- title?: string;
7
- created_at?: string;
8
5
  }>;
9
- export declare function encryptRepoSecret(owner: string, repo: string, plaintextValue: string): Promise<{
6
+ export declare function encryptRepoSecret(owner: string, repo: string, section: RepoSecretsSection, plaintextValue: string): Promise<{
10
7
  key_id: string;
11
8
  encrypted_value: string;
12
9
  }>;
@@ -21,6 +21,7 @@ export type WorkItem = {
21
21
  workStatus: WorkStatus;
22
22
  onDelete: Function;
23
23
  process?: Function;
24
+ upsertTime?: number;
24
25
  };
25
26
  type HandlerFinalizerFn = (kind: string, namespace: string, item: any | string, finalizer: string) => Promise<any>;
26
27
  type HandlerInformPlanFn = (prUrl: string, planText: string) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ import { WorkItem } from './informer';
2
+ export declare function loopWorkItemDebug(queue: WorkItem[]): void;
@@ -1,2 +1,4 @@
1
1
  export declare function needsProvisioningOnCreate(cr: any): Promise<boolean>;
2
+ export declare function updateSyncTransition(itemPath: string, reason: string, lastSyncTime: string, nextSyncTime: string, message: string, status: string): Promise<void>;
2
3
  export declare function updateTransition(itemPath: string, reason: string, type: string, statusValue: string, message?: string, updateStatusOnly?: boolean): Promise<void>;
4
+ export declare function getConditionByType(conditionList: Array<any>, type: string): any;
@@ -0,0 +1,31 @@
1
+ export type SyncMode = 'Scheduled' | 'Period' | 'NotSyncable';
2
+ export type Condition = {
3
+ type: string;
4
+ status: 'True' | 'False' | 'Unknown';
5
+ reason: string;
6
+ message: string;
7
+ lastSyncTime?: string;
8
+ nextSyncTime?: string;
9
+ };
10
+ export type SyncStatus = {
11
+ itemPath?: string;
12
+ conditions?: Condition[];
13
+ nextTimeoutInMS?: number;
14
+ syncStatusPresent?: boolean;
15
+ intervalLapsed?: boolean;
16
+ syncMode?: SyncMode;
17
+ };
18
+ export type SyncWatcher = {
19
+ itemPath: string;
20
+ lastRevision: any;
21
+ needsRevision: boolean;
22
+ nextSync?: string;
23
+ lastSync?: string;
24
+ syncMode?: SyncMode;
25
+ alreadyFired?: boolean;
26
+ };
27
+ export declare function createWatcherForItem(itemPath: string, itemCR?: any): Promise<SyncWatcher>;
28
+ export declare function destroyWatcherForItem(watcher: SyncWatcher): Promise<void>;
29
+ export declare function getSyncSpecs(itemPath: string, itemCR?: any): Promise<any>;
30
+ export declare function getSyncStatus(itemPath: string, itemCR?: any): Promise<SyncStatus>;
31
+ export declare function setSyncStatus(itemPath: string, reason: string, status: 'True' | 'False' | 'Unknown', message: string): Promise<SyncStatus>;
@@ -1,6 +1,10 @@
1
+ import { SyncWatcher } from './syncCtl';
2
+ export type SyncWatchers = {
3
+ [key: string]: SyncWatcher;
4
+ };
1
5
  export declare function syncer(enqueue: Function): Promise<{
2
6
  addItem(itemPath: string): void;
3
- updateItem(itemPath: string): void;
7
+ updateItem(itemPath: string): Promise<void>;
4
8
  deleteItem(itemPath: string): void;
5
9
  }>;
6
- export declare function loop(enqueueIfNeeded: Function): Promise<void>;
10
+ export declare function loop(enqueueIfNeeded: Function, api: any): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import { SyncWatchers } from './syncer';
2
+ export declare function syncerDebug(syncWatchers: SyncWatchers): Promise<void>;
@@ -0,0 +1,9 @@
1
+ import { Construct } from 'constructs';
2
+ import { Entity } from '../base/Entity';
3
+ export declare class FirestartrGithubRepositorySecretsSection extends Entity {
4
+ constructor(artifact: any, deps: any);
5
+ loadResources(data: {
6
+ scope: Construct;
7
+ }): Promise<void>;
8
+ resolveRepoExternalName(): string;
9
+ }
@@ -0,0 +1,3 @@
1
+ import { Construct } from 'constructs';
2
+ import { FirestartrGithubRepositorySecretsSection } from '../FirestartrGithubRepositorySecretsSection';
3
+ export declare function provisionRepositorySecrets(scope: Construct, fsGithubRepositorySecretsSection: FirestartrGithubRepositorySecretsSection, repo: string): Promise<void>;
@@ -0,0 +1,5 @@
1
+ import { Resource } from '../resource';
2
+ export declare class FirestartrGithubRepositorySecretsSection extends Resource {
3
+ static kind(): string;
4
+ preprocess(): Promise<void>;
5
+ }
@@ -4,6 +4,7 @@ import { FirestartrGithubMembership } from './github_membership';
4
4
  import { FirestartrGithubGroup } from './github_group';
5
5
  import { FirestartrTerraformModule } from './terraform_module';
6
6
  import { FirestartrGithubOrgWebhook } from './github_orgWebhook';
7
+ import { FirestartrGithubRepositorySecretsSection } from './github_repository_secrets_section';
7
8
  declare const _default: {
8
9
  FirestartrGithubRepositoryFeature: typeof FirestartrGithubRepositoryFeature;
9
10
  FirestartrGithubRepository: typeof FirestartrGithubRepository;
@@ -11,5 +12,6 @@ declare const _default: {
11
12
  FirestartrGithubGroup: typeof FirestartrGithubGroup;
12
13
  FirestartrTerraformModule: typeof FirestartrTerraformModule;
13
14
  FirestartrGithubOrgWebhook: typeof FirestartrGithubOrgWebhook;
15
+ FirestartrGithubRepositorySecretsSection: typeof FirestartrGithubRepositorySecretsSection;
14
16
  };
15
17
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "1.51.1-snapshot-06",
3
+ "version": "1.51.2",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",
@@ -1,4 +0,0 @@
1
- import { Repository } from '@cdktf/provider-github/lib/repository';
2
- import { Construct } from 'constructs';
3
- import { FirestartrGithubRepository } from '../FirestartrGithubRepository';
4
- export declare function provisionRepositorySecrets(scope: Construct, repo: Repository, fsGithubRepository: FirestartrGithubRepository): Promise<void>;