@firestartr/cli 1.53.0-snapshot-3 → 1.53.0-snapshot-5

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.
@@ -91,6 +91,53 @@ declare const _default: {
91
91
  };
92
92
  additionalProperties: boolean;
93
93
  };
94
+ PolicyType: {
95
+ $id: string;
96
+ type: string;
97
+ description: string;
98
+ enum: string[];
99
+ };
100
+ SyncConfig: {
101
+ $id: string;
102
+ type: string;
103
+ description: string;
104
+ properties: {
105
+ enabled: {
106
+ type: string;
107
+ description: string;
108
+ };
109
+ period: {
110
+ type: string;
111
+ pattern: string;
112
+ description: string;
113
+ };
114
+ schedule: {
115
+ type: string;
116
+ description: string;
117
+ };
118
+ schedule_timezone: {
119
+ type: string;
120
+ description: string;
121
+ };
122
+ policy: {
123
+ type: string;
124
+ description: string;
125
+ };
126
+ };
127
+ additionalProperties: boolean;
128
+ required: string[];
129
+ oneOf: ({
130
+ required: string[];
131
+ not?: undefined;
132
+ } | {
133
+ not: {
134
+ anyOf: {
135
+ required: string[];
136
+ }[];
137
+ };
138
+ required?: undefined;
139
+ })[];
140
+ };
94
141
  };
95
142
  };
96
143
  export default _default;
@@ -95,6 +95,53 @@ declare const schemas: {
95
95
  };
96
96
  additionalProperties: boolean;
97
97
  };
98
+ PolicyType: {
99
+ $id: string;
100
+ type: string;
101
+ description: string;
102
+ enum: string[];
103
+ };
104
+ SyncConfig: {
105
+ $id: string;
106
+ type: string;
107
+ description: string;
108
+ properties: {
109
+ enabled: {
110
+ type: string;
111
+ description: string;
112
+ };
113
+ period: {
114
+ type: string;
115
+ pattern: string;
116
+ description: string;
117
+ };
118
+ schedule: {
119
+ type: string;
120
+ description: string;
121
+ };
122
+ schedule_timezone: {
123
+ type: string;
124
+ description: string;
125
+ };
126
+ policy: {
127
+ type: string;
128
+ description: string;
129
+ };
130
+ };
131
+ additionalProperties: boolean;
132
+ required: string[];
133
+ oneOf: ({
134
+ required: string[];
135
+ not?: undefined;
136
+ } | {
137
+ not: {
138
+ anyOf: {
139
+ required: string[];
140
+ }[];
141
+ };
142
+ required?: undefined;
143
+ })[];
144
+ };
98
145
  };
99
146
  } | {
100
147
  $schema: string;
@@ -379,6 +426,9 @@ declare const schemas: {
379
426
  } | {
380
427
  type: string;
381
428
  properties: {
429
+ policy: {
430
+ $ref: string;
431
+ };
382
432
  privacy: {
383
433
  type: string;
384
434
  enum: string[];
@@ -389,6 +439,9 @@ declare const schemas: {
389
439
  org: {
390
440
  type: string;
391
441
  };
442
+ sync: {
443
+ $ref: string;
444
+ };
392
445
  };
393
446
  required: string[];
394
447
  $ref?: undefined;
@@ -411,6 +464,9 @@ declare const schemas: {
411
464
  } | {
412
465
  type: string;
413
466
  properties: {
467
+ policy: {
468
+ $ref: string;
469
+ };
414
470
  role: {
415
471
  type: string;
416
472
  enum: string[];
@@ -418,6 +474,9 @@ declare const schemas: {
418
474
  org: {
419
475
  type: string;
420
476
  };
477
+ sync: {
478
+ $ref: string;
479
+ };
421
480
  };
422
481
  required: string[];
423
482
  $ref?: undefined;
@@ -485,6 +544,9 @@ declare const schemas: {
485
544
  } | {
486
545
  type: string;
487
546
  properties: {
547
+ policy: {
548
+ $ref: string;
549
+ };
488
550
  org: {
489
551
  type: string;
490
552
  description: string;
@@ -493,6 +555,9 @@ declare const schemas: {
493
555
  type: string;
494
556
  enum: string[];
495
557
  };
558
+ sync: {
559
+ $ref: string;
560
+ };
496
561
  features: {
497
562
  type: string;
498
563
  items: {
@@ -527,6 +592,9 @@ declare const schemas: {
527
592
  } | {
528
593
  type: string;
529
594
  properties: {
595
+ policy: {
596
+ $ref: string;
597
+ };
530
598
  orgName: {
531
599
  type: string;
532
600
  description: string;
@@ -560,6 +628,9 @@ declare const schemas: {
560
628
  };
561
629
  required: string[];
562
630
  };
631
+ sync: {
632
+ $ref: string;
633
+ };
563
634
  };
564
635
  required: string[];
565
636
  $ref?: undefined;
@@ -664,8 +735,7 @@ declare const schemas: {
664
735
  type: string;
665
736
  properties: {
666
737
  policy: {
667
- type: string;
668
- enum: string[];
738
+ $ref: string;
669
739
  };
670
740
  name: {
671
741
  type: string;
@@ -675,38 +745,7 @@ declare const schemas: {
675
745
  enum: string[];
676
746
  };
677
747
  sync: {
678
- type: string;
679
- properties: {
680
- enabled: {
681
- type: string;
682
- };
683
- period: {
684
- type: string;
685
- pattern: string;
686
- };
687
- schedule: {
688
- type: string;
689
- };
690
- schedule_timezone: {
691
- type: string;
692
- };
693
- policy: {
694
- type: string;
695
- };
696
- };
697
- additionalProperties: boolean;
698
- required: string[];
699
- oneOf: ({
700
- required: string[];
701
- not?: undefined;
702
- } | {
703
- not: {
704
- anyOf: {
705
- required: string[];
706
- }[];
707
- };
708
- required?: undefined;
709
- })[];
748
+ $ref: string;
710
749
  };
711
750
  valuesSchema: {
712
751
  type: string;
@@ -15,6 +15,9 @@ declare const _default: {
15
15
  } | {
16
16
  type: string;
17
17
  properties: {
18
+ policy: {
19
+ $ref: string;
20
+ };
18
21
  org: {
19
22
  type: string;
20
23
  description: string;
@@ -23,6 +26,9 @@ declare const _default: {
23
26
  type: string;
24
27
  enum: string[];
25
28
  };
29
+ sync: {
30
+ $ref: string;
31
+ };
26
32
  features: {
27
33
  type: string;
28
34
  items: {
@@ -14,6 +14,9 @@ declare const _default: {
14
14
  } | {
15
15
  type: string;
16
16
  properties: {
17
+ policy: {
18
+ $ref: string;
19
+ };
17
20
  privacy: {
18
21
  type: string;
19
22
  enum: string[];
@@ -24,6 +27,9 @@ declare const _default: {
24
27
  org: {
25
28
  type: string;
26
29
  };
30
+ sync: {
31
+ $ref: string;
32
+ };
27
33
  };
28
34
  required: string[];
29
35
  $ref?: undefined;
@@ -14,6 +14,9 @@ export declare const GithubSchemas: ({
14
14
  } | {
15
15
  type: string;
16
16
  properties: {
17
+ policy: {
18
+ $ref: string;
19
+ };
17
20
  privacy: {
18
21
  type: string;
19
22
  enum: string[];
@@ -24,6 +27,9 @@ export declare const GithubSchemas: ({
24
27
  org: {
25
28
  type: string;
26
29
  };
30
+ sync: {
31
+ $ref: string;
32
+ };
27
33
  };
28
34
  required: string[];
29
35
  $ref?: undefined;
@@ -46,6 +52,9 @@ export declare const GithubSchemas: ({
46
52
  } | {
47
53
  type: string;
48
54
  properties: {
55
+ policy: {
56
+ $ref: string;
57
+ };
49
58
  role: {
50
59
  type: string;
51
60
  enum: string[];
@@ -53,6 +62,9 @@ export declare const GithubSchemas: ({
53
62
  org: {
54
63
  type: string;
55
64
  };
65
+ sync: {
66
+ $ref: string;
67
+ };
56
68
  };
57
69
  required: string[];
58
70
  $ref?: undefined;
@@ -120,6 +132,9 @@ export declare const GithubSchemas: ({
120
132
  } | {
121
133
  type: string;
122
134
  properties: {
135
+ policy: {
136
+ $ref: string;
137
+ };
123
138
  org: {
124
139
  type: string;
125
140
  description: string;
@@ -128,6 +143,9 @@ export declare const GithubSchemas: ({
128
143
  type: string;
129
144
  enum: string[];
130
145
  };
146
+ sync: {
147
+ $ref: string;
148
+ };
131
149
  features: {
132
150
  type: string;
133
151
  items: {
@@ -162,6 +180,9 @@ export declare const GithubSchemas: ({
162
180
  } | {
163
181
  type: string;
164
182
  properties: {
183
+ policy: {
184
+ $ref: string;
185
+ };
165
186
  orgName: {
166
187
  type: string;
167
188
  description: string;
@@ -195,6 +216,9 @@ export declare const GithubSchemas: ({
195
216
  };
196
217
  required: string[];
197
218
  };
219
+ sync: {
220
+ $ref: string;
221
+ };
198
222
  };
199
223
  required: string[];
200
224
  $ref?: undefined;
@@ -14,6 +14,9 @@ declare const _default: {
14
14
  } | {
15
15
  type: string;
16
16
  properties: {
17
+ policy: {
18
+ $ref: string;
19
+ };
17
20
  orgName: {
18
21
  type: string;
19
22
  description: string;
@@ -47,6 +50,9 @@ declare const _default: {
47
50
  };
48
51
  required: string[];
49
52
  };
53
+ sync: {
54
+ $ref: string;
55
+ };
50
56
  };
51
57
  required: string[];
52
58
  $ref?: undefined;
@@ -14,6 +14,9 @@ declare const _default: {
14
14
  } | {
15
15
  type: string;
16
16
  properties: {
17
+ policy: {
18
+ $ref: string;
19
+ };
17
20
  role: {
18
21
  type: string;
19
22
  enum: string[];
@@ -21,6 +24,9 @@ declare const _default: {
21
24
  org: {
22
25
  type: string;
23
26
  };
27
+ sync: {
28
+ $ref: string;
29
+ };
24
30
  };
25
31
  required: string[];
26
32
  $ref?: undefined;
@@ -14,8 +14,7 @@ export declare const TerraformSchemas: {
14
14
  type: string;
15
15
  properties: {
16
16
  policy: {
17
- type: string;
18
- enum: string[];
17
+ $ref: string;
19
18
  };
20
19
  name: {
21
20
  type: string;
@@ -25,38 +24,7 @@ export declare const TerraformSchemas: {
25
24
  enum: string[];
26
25
  };
27
26
  sync: {
28
- type: string;
29
- properties: {
30
- enabled: {
31
- type: string;
32
- };
33
- period: {
34
- type: string;
35
- pattern: string;
36
- };
37
- schedule: {
38
- type: string;
39
- };
40
- schedule_timezone: {
41
- type: string;
42
- };
43
- policy: {
44
- type: string;
45
- };
46
- };
47
- additionalProperties: boolean;
48
- required: string[];
49
- oneOf: ({
50
- required: string[];
51
- not?: undefined;
52
- } | {
53
- not: {
54
- anyOf: {
55
- required: string[];
56
- }[];
57
- };
58
- required?: undefined;
59
- })[];
27
+ $ref: string;
60
28
  };
61
29
  valuesSchema: {
62
30
  type: string;
@@ -14,8 +14,7 @@ declare const _default: {
14
14
  type: string;
15
15
  properties: {
16
16
  policy: {
17
- type: string;
18
- enum: string[];
17
+ $ref: string;
19
18
  };
20
19
  name: {
21
20
  type: string;
@@ -25,38 +24,7 @@ declare const _default: {
25
24
  enum: string[];
26
25
  };
27
26
  sync: {
28
- type: string;
29
- properties: {
30
- enabled: {
31
- type: string;
32
- };
33
- period: {
34
- type: string;
35
- pattern: string;
36
- };
37
- schedule: {
38
- type: string;
39
- };
40
- schedule_timezone: {
41
- type: string;
42
- };
43
- policy: {
44
- type: string;
45
- };
46
- };
47
- additionalProperties: boolean;
48
- required: string[];
49
- oneOf: ({
50
- required: string[];
51
- not?: undefined;
52
- } | {
53
- not: {
54
- anyOf: {
55
- required: string[];
56
- }[];
57
- };
58
- required?: undefined;
59
- })[];
27
+ $ref: string;
60
28
  };
61
29
  valuesSchema: {
62
30
  type: string;
@@ -1,4 +1,5 @@
1
1
  import { createCheckRun } from './src/check_run';
2
+ import { upsertMultiPartStickyComments } from './src/sticky_comment';
2
3
  import { getOctokitForOrg, getGithubAppToken, getOctokitFromPat } from './src/auth';
3
4
  import { encryptRepoSecret, getRepoPublicKey } from './src/encrypt';
4
5
  import type { RepoSecretsSection } from './src/encrypt';
@@ -79,6 +80,7 @@ declare const _default: {
79
80
  feedback: {
80
81
  createCheckRun: typeof createCheckRun;
81
82
  CheckRun: typeof import("./src/check_run").GithubCheckRun;
83
+ upsertMultiPartStickyComments: typeof upsertMultiPartStickyComments;
82
84
  };
83
85
  encryption: {
84
86
  encryptRepoSecret: typeof encryptRepoSecret;
@@ -1,13 +1,27 @@
1
1
  import type { Octokit } from '@octokit/rest';
2
- export interface UpsertStickyParams {
2
+ export interface UpsertMultiPartStickyParams {
3
3
  owner: string;
4
4
  repo: string;
5
5
  pullNumber: number;
6
6
  /**
7
- * Kind discriminator: one sticky comment per kind
8
- * e.g., "plan" | "apply" | "destroy" | "logs" | "check-run:<name>"
7
+ * Base kind discriminator for multi-part comments
8
+ * Creates comments with kinds: baseKind[0], baseKind[1], etc.
9
9
  */
10
- kind: string;
11
- body: string;
10
+ baseKind: string;
11
+ /**
12
+ * Array of comment bodies, one per part
13
+ */
14
+ bodies: string[];
12
15
  }
13
- export declare function upsertStickyComment(octokit: Octokit, params: UpsertStickyParams): Promise<void>;
16
+ /**
17
+ * Upsert sticky comments for one or more parts.
18
+ * Always uses indexed kinds (e.g., 'logs[0]', 'logs[1]', etc.) for consistency.
19
+ *
20
+ * Behavior:
21
+ * - Single part (bodies.length === 1): Uses indexed kind like 'logs[0]'
22
+ * - Multiple parts (bodies.length > 1): Uses indexed kinds 'logs[0]', 'logs[1]', etc.
23
+ * - Non-last parts include a note about continuation
24
+ * - Unused parts (from previous runs) are updated with a placeholder message
25
+ * - Never deletes comments
26
+ */
27
+ export declare function upsertMultiPartStickyComments(octokit: Octokit, params: UpsertMultiPartStickyParams): Promise<void>;
@@ -1,2 +1,2 @@
1
- export declare function tfPlanner(claimFilePath: string, claim: any, namespace: string, debug: boolean, jobTtl?: number, cmd?: string): Promise<void>;
1
+ export declare function tfPlanner(claimFilePath: string, claim: any, namespace: string, debug: boolean, jobTtl?: number, cmd?: string, callbackApi?: (ctl: any) => void): Promise<void>;
2
2
  export declare function kubectlCp(sourcePath: string, namespace: string, podName: string, podFilePath?: string): void;
@@ -1,2 +1,9 @@
1
1
  export declare function replaceConfigSecrets(config: any, secrets: any): any;
2
2
  export declare function replaceInlineSecrets(inline: string, secrets: any): string;
3
+ /**
4
+ * Retrieves a policy annotation value from a custom resource
5
+ * @param item - The CR to get the policy from
6
+ * @param annotation - The annotation key to retrieve
7
+ * @returns The policy value, or undefined if not set
8
+ */
9
+ export declare function getPolicy(item: any, annotation: string): string | undefined;
@@ -14,10 +14,13 @@ export declare class Resource {
14
14
  onTFStreaming(): Promise<void>;
15
15
  setLogStream(fnData: Function, fnEnd: Function, reopen?: boolean): void;
16
16
  constructor(mainCR: any, operation: string, deps?: any[]);
17
- run(): Promise<void>;
17
+ run(options?: {
18
+ planOnly?: boolean;
19
+ }): Promise<void>;
18
20
  artifact(): any;
19
21
  synth(): Promise<void>;
20
22
  log(msg: string): void;
23
+ runTerraformPlanOnly(): Promise<void>;
21
24
  runTerraform(): Promise<void>;
22
25
  preprocess(): Promise<void>;
23
26
  postprocess(): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "1.53.0-snapshot-3",
3
+ "version": "1.53.0-snapshot-5",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",