@firestartr/cli 1.51.1-snapshot-05 → 1.51.1-snapshot

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 (82) hide show
  1. package/build/index.js +3359 -1009
  2. package/build/packages/catalog_common/src/types/envvars.d.ts +0 -1
  3. package/build/packages/cdk8s_renderer/imports/firestartr.dev.d.ts +477 -140
  4. package/build/packages/cdk8s_renderer/src/charts/catalog/tfWorkspaceChart.d.ts +1 -0
  5. package/build/packages/cdk8s_renderer/src/charts/github/RepoSecretsSectionChart.d.ts +12 -0
  6. package/build/packages/cdk8s_renderer/src/charts/github/orgWebhookChart.d.ts +2 -1
  7. package/build/packages/cdk8s_renderer/src/charts/github/repositoryChart.d.ts +2 -8
  8. package/build/packages/cdk8s_renderer/src/claims/base/schemas/argodeploy.schema.d.ts +1 -2
  9. package/build/packages/cdk8s_renderer/src/claims/base/schemas/common-meta.schema.d.ts +18 -1
  10. package/build/packages/cdk8s_renderer/src/claims/base/schemas/component.schema.d.ts +2 -4
  11. package/build/packages/cdk8s_renderer/src/claims/base/schemas/domain.schema.d.ts +1 -1
  12. package/build/packages/cdk8s_renderer/src/claims/base/schemas/group.schema.d.ts +2 -2
  13. package/build/packages/cdk8s_renderer/src/claims/base/schemas/index.d.ts +99 -39
  14. package/build/packages/cdk8s_renderer/src/claims/base/schemas/system.schema.d.ts +1 -5
  15. package/build/packages/cdk8s_renderer/src/claims/base/schemas/tfworkspace.schema.d.ts +2 -4
  16. package/build/packages/cdk8s_renderer/src/claims/external-secrets/external-secrets.schema.d.ts +18 -20
  17. package/build/packages/cdk8s_renderer/src/claims/external-secrets/index.d.ts +18 -20
  18. package/build/packages/cdk8s_renderer/src/claims/github/component.schema.d.ts +24 -0
  19. package/build/packages/cdk8s_renderer/src/claims/github/index.d.ts +27 -0
  20. package/build/packages/cdk8s_renderer/src/claims/github/orgWebhook.d.ts +1 -4
  21. package/build/packages/cdk8s_renderer/src/claims/github/orgwebhook.schema.d.ts +3 -0
  22. package/build/packages/cdk8s_renderer/src/claims/github/repository.d.ts +1 -0
  23. package/build/packages/cdk8s_renderer/src/claims/github/repositoryFeature.d.ts +1 -0
  24. package/build/packages/cdk8s_renderer/src/claims/tfworkspaces/index.d.ts +27 -0
  25. package/build/packages/cdk8s_renderer/src/claims/tfworkspaces/terraform.schema.d.ts +27 -0
  26. package/build/packages/cdk8s_renderer/src/claims/tfworkspaces/tfworkspace.d.ts +6 -0
  27. package/build/packages/cdk8s_renderer/src/defaults/oneWayDefs.d.ts +1 -0
  28. package/build/packages/cdk8s_renderer/src/initializers/metadata.d.ts +11 -0
  29. package/build/packages/cdk8s_renderer/src/loader/claimsDefaulter.d.ts +1 -0
  30. package/build/packages/cdk8s_renderer/src/loader/lazy_loader.d.ts +1 -1
  31. package/build/packages/cdk8s_renderer/src/overriders/featureOverride.d.ts +1 -0
  32. package/build/packages/cdk8s_renderer/src/refsSorter/refsExtractor.d.ts +1 -1
  33. package/build/packages/cli/src/subcommands/index.d.ts +1 -0
  34. package/build/packages/features_preparer/index.d.ts +1 -0
  35. package/build/packages/features_preparer/src/index.d.ts +2 -1
  36. package/build/packages/features_preparer/src/renderer.d.ts +1 -0
  37. package/build/packages/features_renderer/src/render.d.ts +2 -1
  38. package/build/packages/features_renderer/src/schema.d.ts +14 -1
  39. package/build/packages/github/index.d.ts +12 -0
  40. package/build/packages/github/src/encrypt.d.ts +3 -6
  41. package/build/packages/github/src/sticky_comment.d.ts +20 -6
  42. package/build/packages/github/src/workflow.d.ts +58 -0
  43. package/build/packages/importer/index.d.ts +2 -2
  44. package/build/packages/importer/src/decanter/base.d.ts +8 -0
  45. package/build/packages/importer/src/decanter/collections.d.ts +1 -1
  46. package/build/packages/importer/src/decanter/gh/github_group.d.ts +1 -0
  47. package/build/packages/importer/src/decanter/index.d.ts +2 -2
  48. package/build/packages/operator/cdktf.d.ts +1 -1
  49. package/build/packages/operator/fdummies/index.d.ts +8 -0
  50. package/build/packages/operator/src/cdktf/ownership.d.ts +2 -0
  51. package/build/packages/operator/src/cmd/tf_planner.d.ts +1 -1
  52. package/build/packages/operator/src/high_priority_status.d.ts +1 -0
  53. package/build/packages/operator/src/informer.d.ts +8 -0
  54. package/build/packages/operator/src/metrics/CRStates.d.ts +1 -0
  55. package/build/packages/operator/src/ownership.d.ts +4 -0
  56. package/build/packages/operator/src/processItem.d.ts +1 -0
  57. package/build/packages/operator/src/processItem.debug.d.ts +2 -0
  58. package/build/packages/operator/src/processItemDLH.d.ts +2 -0
  59. package/build/packages/operator/src/signals.d.ts +17 -0
  60. package/build/packages/operator/src/status.d.ts +9 -1
  61. package/build/packages/operator/src/syncCtl.d.ts +32 -0
  62. package/build/packages/operator/src/syncer.d.ts +6 -2
  63. package/build/packages/operator/src/syncer.debug.d.ts +2 -0
  64. package/build/packages/operator/src/types.d.ts +8 -0
  65. package/build/packages/operator/src/user-feedback-ops/tf-checkrun.d.ts +1 -1
  66. package/build/packages/operator/src/user-feedback-ops/user-feedback-ops.d.ts +9 -4
  67. package/build/packages/operator/src/utils/operationErrorMessages.d.ts +4 -0
  68. package/build/packages/provisioner/src/entities/base/Entity.d.ts +4 -1
  69. package/build/packages/provisioner/src/entities/firestartrgithubrepositorysecretssection/FirestartrGithubRepositorySecretsSection.d.ts +9 -0
  70. package/build/packages/provisioner/src/entities/firestartrgithubrepositorysecretssection/helpers/RepositorySecret.d.ts +3 -0
  71. package/build/packages/provisioner/src/resources/github_repository_secrets_section/index.d.ts +5 -0
  72. package/build/packages/provisioner/src/resources/index.d.ts +2 -0
  73. package/build/packages/terraform_provisioner/src/project_tf.d.ts +4 -0
  74. package/build/packages/terraform_provisioner/src/project_tf_remote.d.ts +4 -0
  75. package/build/packages/terraform_provisioner/src/resolutor/index.d.ts +1 -0
  76. package/build/packages/terraform_provisioner/src/resolutor/resolver.d.ts +1 -0
  77. package/build/packages/terraform_provisioner/src/writer_additional_files.d.ts +24 -0
  78. package/build/packages/terraform_provisioner/src/writer_provider.d.ts +3 -1
  79. package/build/packages/terraform_provisioner/src/writer_provider_tf_json.d.ts +10 -0
  80. package/build/packages/terraform_provisioner/src/writer_terraform.d.ts +2 -0
  81. package/package.json +1 -1
  82. package/build/packages/provisioner/src/entities/firestartrgithubrepository/helpers/RepositorySecret.d.ts +0 -4
@@ -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;
@@ -28,6 +28,7 @@ export interface IGithubRepositoryClaim extends IComponentClaim {
28
28
  name: string;
29
29
  orphan: boolean;
30
30
  }[];
31
+ topics?: string[];
31
32
  };
32
33
  };
33
34
  }
@@ -27,5 +27,6 @@ interface IGithubRepositoryFeatureFileClaim {
27
27
  path: string;
28
28
  userManaged: boolean;
29
29
  content: string;
30
+ targetBranch: string;
30
31
  }
31
32
  export {};
@@ -1,6 +1,26 @@
1
1
  export declare const TerraformSchemas: {
2
2
  $id: string;
3
3
  definitions: {
4
+ TerraformProviderFiles: {
5
+ $id: string;
6
+ description: string;
7
+ type: string;
8
+ items: {
9
+ type: string;
10
+ properties: {
11
+ source: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ destination: {
16
+ type: string;
17
+ description: string;
18
+ };
19
+ };
20
+ additionalProperties: boolean;
21
+ required: string[];
22
+ };
23
+ };
4
24
  TerraformProvider: {
5
25
  $id: string;
6
26
  type: string;
@@ -24,6 +44,9 @@ export declare const TerraformSchemas: {
24
44
  type: string;
25
45
  enum: string[];
26
46
  };
47
+ files: {
48
+ $ref: string;
49
+ };
27
50
  sync: {
28
51
  type: string;
29
52
  properties: {
@@ -40,7 +63,11 @@ export declare const TerraformSchemas: {
40
63
  schedule_timezone: {
41
64
  type: string;
42
65
  };
66
+ policy: {
67
+ type: string;
68
+ };
43
69
  };
70
+ additionalProperties: boolean;
44
71
  required: string[];
45
72
  oneOf: ({
46
73
  required: string[];
@@ -1,6 +1,26 @@
1
1
  declare const _default: {
2
2
  $id: string;
3
3
  definitions: {
4
+ TerraformProviderFiles: {
5
+ $id: string;
6
+ description: string;
7
+ type: string;
8
+ items: {
9
+ type: string;
10
+ properties: {
11
+ source: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ destination: {
16
+ type: string;
17
+ description: string;
18
+ };
19
+ };
20
+ additionalProperties: boolean;
21
+ required: string[];
22
+ };
23
+ };
4
24
  TerraformProvider: {
5
25
  $id: string;
6
26
  type: string;
@@ -24,6 +44,9 @@ declare const _default: {
24
44
  type: string;
25
45
  enum: string[];
26
46
  };
47
+ files: {
48
+ $ref: string;
49
+ };
27
50
  sync: {
28
51
  type: string;
29
52
  properties: {
@@ -40,7 +63,11 @@ declare const _default: {
40
63
  schedule_timezone: {
41
64
  type: string;
42
65
  };
66
+ policy: {
67
+ type: string;
68
+ };
43
69
  };
70
+ additionalProperties: boolean;
44
71
  required: string[];
45
72
  oneOf: ({
46
73
  required: string[];
@@ -1,5 +1,10 @@
1
1
  import { FirestartrTerraformWorkspaceSpecSource } from '../../../imports/firestartr.dev';
2
2
  import { Workspace } from '../base/workspace';
3
+ export interface TerraformProviderAdditionalFile {
4
+ source: string;
5
+ destination: string;
6
+ }
7
+ export type TerraformProviderAdditionalFiles = TerraformProviderAdditionalFile[];
3
8
  export interface TFWorkspace extends Workspace {
4
9
  kind: 'TFWorkspaceClaim';
5
10
  resourceType: string;
@@ -10,6 +15,7 @@ export interface TFWorkspace extends Workspace {
10
15
  source: FirestartrTerraformWorkspaceSpecSource.INLINE | FirestartrTerraformWorkspaceSpecSource.REMOTE;
11
16
  module: string;
12
17
  values: any;
18
+ files: TerraformProviderAdditionalFiles;
13
19
  context: {
14
20
  providers: {
15
21
  name: string;
@@ -0,0 +1 @@
1
+ export declare function applyOneWayDefs(crSpecs: any): any;
@@ -0,0 +1,11 @@
1
+ import { InitializerPatches } from './base';
2
+ export declare class MetadataInitializer extends InitializerPatches {
3
+ applicableProviders: string[];
4
+ static applicableKinds: string[];
5
+ __validate(): Promise<boolean>;
6
+ __patches(claim: any, _previousCR: any): Promise<{
7
+ validate(cr: any): boolean;
8
+ apply(cr: any): any;
9
+ identify(): string;
10
+ }[]>;
11
+ }
@@ -0,0 +1 @@
1
+ export declare function applyBlockAwareDefaults(claim: any, defaultClaim: any): any;
@@ -2,5 +2,5 @@ import { InitializerPatches } from '../initializers/base';
2
2
  import { GlobalSection } from '../globals/base';
3
3
  import { OverriderPatches } from '../overriders/base';
4
4
  import { Normalizer } from '../normalizers/base';
5
- export declare function loadClaim(claimRef: string, org: string, defaults: any, patchClaim: (claim: any, defaults: any) => any, loadInitializers: (claim: any) => Promise<InitializerPatches[]>, loadGlobals: (claim: any) => Promise<GlobalSection[]>, loadOverrides: (claim: any) => OverriderPatches[], loadNormalizers: (claim: any, path: string) => Promise<Normalizer[]>, cwd?: string, existingRefs?: any): Promise<any>;
5
+ export declare function loadClaim(claimRef: string, org: string, defaults: any, patchClaim: (claim: any, defaults: any) => any, loadInitializers: (claim: any) => Promise<InitializerPatches[]>, loadGlobals: (claim: any) => Promise<GlobalSection[]>, loadOverrides: (claim: any) => OverriderPatches[], loadNormalizers: (claim: any, path: string) => Promise<Normalizer[]>, cwd?: string, existingRefs?: any, postValidations?: Map<string, Function[]>): Promise<any[]>;
6
6
  export declare function resetLazyLoader(): void;
@@ -1,4 +1,5 @@
1
1
  import { OverriderPatches } from './base';
2
+ export declare function MOCK_FEATURES(mock?: Function): void;
2
3
  export declare class FeaturesOverrider extends OverriderPatches {
3
4
  applicableProviders: string[];
4
5
  private featureName;
@@ -2,5 +2,5 @@ import { RenderClaims } from '../renderer/types';
2
2
  export declare function extractRefs(renderClaims: RenderClaims, kind: string): any;
3
3
  export declare function extractAllRefs(claimData: string): any[];
4
4
  export declare function getGroupParentRef(parent: string, references?: any[]): any[];
5
- export declare function getTfWorkspacesRefs(values: any, references?: any[]): any[];
5
+ export declare function getTfWorkspacesRefs(values: any, references?: any[], secretsRefs?: any[]): any[][];
6
6
  export declare function getComponentVarsAndSecretsRefs(parsedClaim: any): string[];
@@ -1,3 +1,4 @@
1
1
  import { Subcommand } from '../types';
2
2
  export declare function validateAndGetSubcommand(name: string): Subcommand;
3
3
  export declare function showSubcommandsHelp(): void;
4
+ export declare function showCliVersion(): void;
@@ -2,6 +2,7 @@ export * from './src';
2
2
  declare const _default: {
3
3
  prepareFeature: typeof import("./src/installer").prepareFeature;
4
4
  renderFeature: typeof import("./src/renderer").renderFeature;
5
+ renderFeatureFromPath: typeof import("./src/renderer").renderFeatureFromPath;
5
6
  getFeatureConfig: typeof import("./src/installer").getFeatureConfig;
6
7
  getFeatureConfigFromRef: typeof import("./src/installer").getFeatureConfigFromRef;
7
8
  };
@@ -1,7 +1,8 @@
1
1
  import { getFeatureConfigFromRef, getFeatureConfig, prepareFeature } from './installer';
2
- import { renderFeature } from './renderer';
2
+ import { renderFeature, renderFeatureFromPath } from './renderer';
3
3
  declare const _default: {
4
4
  renderFeature: typeof renderFeature;
5
+ renderFeatureFromPath: typeof renderFeatureFromPath;
5
6
  getFeatureConfigFromRef: typeof getFeatureConfigFromRef;
6
7
  getFeatureConfig: typeof getFeatureConfig;
7
8
  prepareFeature: typeof prepareFeature;
@@ -1 +1,2 @@
1
1
  export declare function renderFeature(featureName: string, version: string, owner: any, repo: any, featureOwner: any, renderPath?: string, featureArgs?: any): any;
2
+ export declare function renderFeatureFromPath(extractPath: string, renderedPath: string, featureOwner: any, featureArgs?: any): any;
@@ -1,3 +1,4 @@
1
1
  export default function render(featurePath: string, featureRenderPath: string, entity: any, firestartrConfig?: any, featureArgs?: any): any;
2
2
  export declare function buildContext(entity: any, args: any, firestartrConfig: any, featureArgs: any): any;
3
- export declare function renderContent(template: string, ctx: any): string;
3
+ export declare function expandFiles(featurePath: string, configData: any, context: any): void;
4
+ export declare function renderContent(template: string, ctx: any): any;
@@ -29,6 +29,13 @@ declare const _default: {
29
29
  };
30
30
  };
31
31
  };
32
+ filesTemplates: {
33
+ type: string;
34
+ description: string;
35
+ items: {
36
+ type: string;
37
+ };
38
+ };
32
39
  };
33
40
  required: string[];
34
41
  title: string;
@@ -48,7 +55,7 @@ declare const _default: {
48
55
  additionalProperties: boolean;
49
56
  properties: {
50
57
  $lit: {
51
- type: string;
58
+ type: string[];
52
59
  };
53
60
  $ref: {
54
61
  type: string;
@@ -59,6 +66,9 @@ declare const _default: {
59
66
  $arg: {
60
67
  type: string;
61
68
  };
69
+ $template: {
70
+ type: string;
71
+ };
62
72
  $default: {
63
73
  type: string[];
64
74
  };
@@ -77,6 +87,9 @@ declare const _default: {
77
87
  upgradable: {
78
88
  type: string;
79
89
  };
90
+ target_branch: {
91
+ type: string;
92
+ };
80
93
  };
81
94
  required: string[];
82
95
  title: string;
@@ -1,6 +1,9 @@
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';
5
+ import type { RepoSecretsSection } from './src/encrypt';
6
+ import type { WorkflowCompletionResult, WorkflowDispatchInputs, WorkflowRunConclusion, WorkflowRunStatus, WorkflowRunStatusFilter, WorkflowRunSummary } from './src/workflow';
4
7
  declare const _default: {
5
8
  org: {
6
9
  getRepositoryList: typeof import("./src/organization").getRepositoryList;
@@ -75,9 +78,16 @@ declare const _default: {
75
78
  createBranch: typeof import("./src/branches").createBranch;
76
79
  createOrphanBranch: typeof import("./src/branches").createOrphanBranch;
77
80
  };
81
+ workflow: {
82
+ triggerWorkflow: typeof import("./src/workflow").triggerWorkflow;
83
+ getWorkflowRun: typeof import("./src/workflow").getWorkflowRun;
84
+ listWorkflowRuns: typeof import("./src/workflow").listWorkflowRuns;
85
+ waitForWorkflowCompletion: typeof import("./src/workflow").waitForWorkflowCompletion;
86
+ };
78
87
  feedback: {
79
88
  createCheckRun: typeof createCheckRun;
80
89
  CheckRun: typeof import("./src/check_run").GithubCheckRun;
90
+ upsertMultiPartStickyComments: typeof upsertMultiPartStickyComments;
81
91
  };
82
92
  encryption: {
83
93
  encryptRepoSecret: typeof encryptRepoSecret;
@@ -85,3 +95,5 @@ declare const _default: {
85
95
  };
86
96
  };
87
97
  export default _default;
98
+ export { RepoSecretsSection };
99
+ export type { WorkflowCompletionResult, WorkflowDispatchInputs, WorkflowRunConclusion, WorkflowRunStatus, WorkflowRunStatusFilter, WorkflowRunSummary, };
@@ -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
  }>;
@@ -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>;
@@ -0,0 +1,58 @@
1
+ export type WorkflowDispatchInputs = Record<string, string | number | boolean>;
2
+ export type WorkflowRunStatusFilter = 'completed' | 'in_progress' | 'queued';
3
+ export type WorkflowRunStatus = WorkflowRunStatusFilter | string;
4
+ export type WorkflowRunConclusion = 'success' | 'failure' | 'cancelled' | 'timed_out' | 'neutral' | 'action_required' | 'skipped' | 'stale' | 'unknown' | null | string;
5
+ export interface WorkflowRunSummary {
6
+ id: number;
7
+ status: WorkflowRunStatus;
8
+ conclusion: WorkflowRunConclusion;
9
+ html_url: string;
10
+ }
11
+ export interface WorkflowCompletionResult {
12
+ status: WorkflowRunStatus;
13
+ conclusion: WorkflowRunConclusion;
14
+ runId: number;
15
+ htmlUrl: string;
16
+ }
17
+ /**
18
+ * Trigger a workflow_dispatch event
19
+ * @param owner - GitHub organization
20
+ * @param repo - Repository name
21
+ * @param workflowId - Workflow file name (e.g., 'deploy.yaml') or workflow ID
22
+ * @param ref - Git ref to run on (branch, tag, or SHA)
23
+ * @param inputs - Workflow input key-value pairs (strings, numbers, or booleans)
24
+ */
25
+ export declare function triggerWorkflow(owner: string, repo: string, workflowId: string | number, ref: string, inputs?: WorkflowDispatchInputs): Promise<void>;
26
+ /**
27
+ * Get workflow run details
28
+ * @param owner - GitHub organization
29
+ * @param repo - Repository name
30
+ * @param runId - Workflow run ID
31
+ */
32
+ export declare function getWorkflowRun(owner: string, repo: string, runId: number): Promise<WorkflowRunSummary>;
33
+ /**
34
+ * List recent workflow runs
35
+ * @param owner - GitHub organization
36
+ * @param repo - Repository name
37
+ * @param workflowId - Optional workflow file name or ID to filter by
38
+ * @param branch - Optional branch name to filter by
39
+ * @param status - Optional status to filter by
40
+ */
41
+ export declare function listWorkflowRuns(owner: string, repo: string, workflowId?: string | number, branch?: string, status?: WorkflowRunStatusFilter): Promise<WorkflowRunSummary[]>;
42
+ /**
43
+ * Wait for workflow to complete with timeout
44
+ * Polls on the provided interval. Default timeout is 5 minutes (300000ms).
45
+ * @param owner - GitHub organization
46
+ * @param repo - Repository name
47
+ * @param runId - Workflow run ID
48
+ * @param timeoutMs - Maximum time to wait in milliseconds (default: 300000ms / 5 minutes)
49
+ * @param pollIntervalMs - Polling interval in milliseconds (default: 10000ms / 10 seconds)
50
+ */
51
+ export declare function waitForWorkflowCompletion(owner: string, repo: string, runId: number, timeoutMs?: number, pollIntervalMs?: number): Promise<WorkflowCompletionResult>;
52
+ declare const _default: {
53
+ triggerWorkflow: typeof triggerWorkflow;
54
+ getWorkflowRun: typeof getWorkflowRun;
55
+ listWorkflowRuns: typeof listWorkflowRuns;
56
+ waitForWorkflowCompletion: typeof waitForWorkflowCompletion;
57
+ };
58
+ export default _default;
@@ -1,6 +1,6 @@
1
1
  import { importGithubGitopsRepository } from './src/decanter';
2
- import { CollectionFilter } from './src/decanter/collections';
3
- export { CollectionFilter };
2
+ import type { CollectionFilter } from './src/decanter/collections';
3
+ export type { CollectionFilter };
4
4
  declare const _default: {
5
5
  importGithubGitopsRepository: typeof importGithubGitopsRepository;
6
6
  };
@@ -11,14 +11,17 @@ export default class Decanter {
11
11
  secret: any;
12
12
  };
13
13
  };
14
+ _postRenderFunctions: Function[];
14
15
  _github: any;
15
16
  set github(githubInstance: any);
16
17
  get github(): any;
18
+ get postRenderFunctions(): Function[];
17
19
  constructor(data: any);
18
20
  __adaptInitializerTfStateKey(): Promise<UUIDInitializer>;
19
21
  __adaptInitializerClaimRef(): Promise<InitializerClaimRef>;
20
22
  __adaptInitializerImport(): Promise<ImportInitializer>;
21
23
  __patchClaim(patch: any): void;
24
+ __patchCr(cr: any, patches: any): any;
22
25
  __validateEqual(a: any, b: any): boolean;
23
26
  __decantStart(): void;
24
27
  __getMethods(check: any): any[];
@@ -30,6 +33,7 @@ export default class Decanter {
30
33
  secret: any;
31
34
  };
32
35
  };
36
+ postRenderFunctions: Function[];
33
37
  renderClaim: {
34
38
  claim: any;
35
39
  initializers: any[];
@@ -40,6 +44,7 @@ export default class Decanter {
40
44
  }>;
41
45
  validateCR(cr: any): boolean;
42
46
  render(): string;
47
+ postRender(): void;
43
48
  _adapt(): Promise<{
44
49
  deps: {
45
50
  [key: string]: {
@@ -47,6 +52,7 @@ export default class Decanter {
47
52
  secret: any;
48
53
  };
49
54
  };
55
+ postRenderFunctions: Function[];
50
56
  renderClaim: {
51
57
  claim: any;
52
58
  initializers: any[];
@@ -56,6 +62,7 @@ export default class Decanter {
56
62
  };
57
63
  }>;
58
64
  setDep(key: string, cr: any, secret: any): void;
65
+ setPostRenderF(f: Function): void;
59
66
  getDeps(): {
60
67
  [key: string]: {
61
68
  cr: any;
@@ -70,6 +77,7 @@ export default class Decanter {
70
77
  secret: any;
71
78
  };
72
79
  };
80
+ postRenderFunctions: Function[];
73
81
  renderClaim: {
74
82
  claim: any;
75
83
  initializers: any[];
@@ -1,5 +1,5 @@
1
+ export type { CollectionFilter } from './filters';
1
2
  export declare function applyCollectionMixins(derivedCtor: any): void;
2
- export { CollectionFilter } from './filters';
3
3
  export declare class CollectionMixins {
4
4
  IS_FILTER_BY_NAME_SET(filters: any[], kind: string): boolean;
5
5
  IS_SKIP_SET(filters: any[], kind: string): boolean;
@@ -10,6 +10,7 @@ export default class GroupGithubDecanter extends GithubDecanter {
10
10
  __gatherMembers(): Promise<void>;
11
11
  __validateMembers(cr: any): Promise<boolean>;
12
12
  __adaptInitializerBase(_claim: any): Promise<InitializerDefault>;
13
+ __postRenderAnnotateGithubId(): void;
13
14
  __validateKind(cr: any): boolean;
14
15
  KO__validateKind(): void;
15
16
  }
@@ -1,5 +1,5 @@
1
- export { CollectionFilter } from './collections';
2
- import { CollectionFilter } from './collections';
1
+ export type { CollectionFilter } from './collections';
2
+ import type { CollectionFilter } from './collections';
3
3
  import GroupCollectionGithubDecanter from './gh/github_group_collection';
4
4
  import MemberCollectionGithubDecanter from './gh/github_member_collection';
5
5
  import RepoCollectionGithubDecanter from './gh/github_repo_collection';
@@ -4,5 +4,5 @@ export declare function processOperation(item: any, op: OperationType, handler:
4
4
  reason: OperationType;
5
5
  type: string;
6
6
  status: string;
7
- message: any;
7
+ message: string;
8
8
  }, void, unknown>;
@@ -0,0 +1,8 @@
1
+ import { OperationType } from '../src/informer';
2
+ export declare function processFirestartrDummies(item: any, op: string, handler: any): Promise<void> | AsyncGenerator<{
3
+ item: any;
4
+ reason: OperationType;
5
+ type: string;
6
+ status: string;
7
+ message: string;
8
+ }, void, unknown>;
@@ -0,0 +1,2 @@
1
+ import { OperationType } from '../informer';
2
+ export declare function manageOwnershipReferences(item: any, handler: any, op: OperationType): 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;
@@ -0,0 +1 @@
1
+ export declare function setHighPriorityStatus(item: any): void;
@@ -21,6 +21,10 @@ export type WorkItem = {
21
21
  workStatus: WorkStatus;
22
22
  onDelete: Function;
23
23
  process?: Function;
24
+ upsertTime?: number;
25
+ isDeadLetter?: boolean;
26
+ isBlocked?: boolean;
27
+ fUnblock?: Function;
24
28
  };
25
29
  type HandlerFinalizerFn = (kind: string, namespace: string, item: any | string, finalizer: string) => Promise<any>;
26
30
  type HandlerInformPlanFn = (prUrl: string, planText: string) => Promise<void>;
@@ -38,10 +42,14 @@ export type WorkItemHandler = {
38
42
  writeTerraformOutputInTfResult: WriteTerraformOutputInTfResultFn;
39
43
  writeConnectionSecret: WriteConnectionSecretFn;
40
44
  resolveReferences: ResolveReferencesFn;
45
+ resolveOwnOutputs: () => Promise<any | undefined>;
41
46
  deleteSecret: DeleteSecretFn;
42
47
  itemPath: ItemPathFn;
43
48
  error: ErrorFn;
44
49
  success: SuccessFn;
50
+ isBlocked?: boolean;
51
+ needsBlocking?: (item: any) => boolean;
52
+ fUnblock?: Function;
45
53
  };
46
54
  /**
47
55
  * Observe whenever a new item is added, modified or deleted in a given kind
@@ -8,6 +8,7 @@ export default class CRStateMetrics {
8
8
  planningGauge: any;
9
9
  deletedGauge: any;
10
10
  errorGauge: any;
11
+ errorOnSyncGauge: any;
11
12
  onUpdate: boolean;
12
13
  namespace: string;
13
14
  kc: any;
@@ -0,0 +1,4 @@
1
+ import { OwnerReference } from './types';
2
+ export declare function getOwnerReferences(item: any): Promise<OwnerReference[]>;
3
+ export declare function setOwnerReference(itemPath: string, namespace: string, ownerKind: string, ownerName: string, blockOwnerDeletion?: boolean): Promise<void>;
4
+ export declare function writeOwnerReferences(kind: string, namespace: string, item: any, ownerReferences: OwnerReference[]): Promise<any>;
@@ -4,6 +4,7 @@ export declare function getQueueMetrics(): {
4
4
  nItemsFinished: number;
5
5
  nItemsPending: number;
6
6
  nItemsProcessing: number;
7
+ nItemsInDeadLetterHandling: number;
7
8
  nItemsTypes: {
8
9
  nothing: number;
9
10
  retry: number;
@@ -0,0 +1,2 @@
1
+ import { WorkItem } from './informer';
2
+ export declare function loopWorkItemDebug(queue: WorkItem[]): void;
@@ -0,0 +1,2 @@
1
+ import { WorkItem } from './informer';
2
+ export declare function deadLetterHandler(workItem: WorkItem): Promise<void>;
@@ -0,0 +1,17 @@
1
+ export type CallbacksMap = Map<string, () => void>;
2
+ /**
3
+ * Initializes process signal handlers used by the operator.
4
+ *
5
+ * Currently this sets up handling for `SIGTERM`, using the callback
6
+ * associated with the `"SIGTERM"` key from the provided {@link CallbacksMap}
7
+ * to start the shutdown sequence. The returned {@link CallbacksMap} contains
8
+ * handler-specific callbacks (such as `"FINISH_OK"`) that callers can invoke
9
+ * to indicate that it is safe for the process to exit.
10
+ *
11
+ * @param callbacks A map of signal names to shutdown callbacks. The `"SIGTERM"`
12
+ * entry (if present) is invoked when a `SIGTERM` signal is received to
13
+ * perform any necessary cleanup before process termination.
14
+ * @returns A {@link CallbacksMap} with control callbacks that allow the caller
15
+ * to signal when shutdown has completed and the process may safely exit.
16
+ */
17
+ export declare function initSignalsHandler(callbacks: CallbacksMap): CallbacksMap;
@@ -1,2 +1,10 @@
1
- export declare function needsProvisioningOnCreate(cr: any): Promise<boolean>;
1
+ export type NeedsCreationOrUpdate = {
2
+ needs: boolean;
3
+ reason?: string;
4
+ };
5
+ export declare function upsertInitialStatus(pluralKind: string, namespace: string, item: any): Promise<void>;
6
+ export declare function needsProvisioningOnCreateOrUpdate(cr: any): Promise<NeedsCreationOrUpdate>;
7
+ export declare function updateSyncTransition(itemPath: string, reason: string, lastSyncTime: string, nextSyncTime: string, message: string, status: string): Promise<void>;
8
+ export declare function writePrioritizedStatus(kind: string, namespace: string, item: any): Promise<void>;
2
9
  export declare function updateTransition(itemPath: string, reason: string, type: string, statusValue: string, message?: string, updateStatusOnly?: boolean): Promise<void>;
10
+ export declare function getConditionByType(conditionList: Array<any>, type: string): any;