@fjall/deploy-core 0.95.0 → 0.99.1

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 (79) hide show
  1. package/dist/.minified +1 -1
  2. package/dist/src/aws/organisations/policies.d.ts +25 -3
  3. package/dist/src/aws/organisations/policies.js +1 -1
  4. package/dist/src/aws/organisations/serviceAccess.js +1 -1
  5. package/dist/src/aws/utils/arnParser.d.ts +24 -0
  6. package/dist/src/aws/utils/arnParser.js +1 -0
  7. package/dist/src/aws/utils/awsErrorHandler.d.ts +19 -0
  8. package/dist/src/aws/utils/awsErrorHandler.js +1 -0
  9. package/dist/src/aws/utils/cloudformationEvents.js +1 -1
  10. package/dist/src/aws/utils/index.d.ts +1 -0
  11. package/dist/src/aws/utils/index.js +1 -1
  12. package/dist/src/index.d.ts +4 -4
  13. package/dist/src/index.js +1 -1
  14. package/dist/src/orchestration/applicationDeploy.js +1 -1
  15. package/dist/src/orchestration/applicationDeployHelpers.d.ts +21 -12
  16. package/dist/src/orchestration/applicationDeployHelpers.js +3 -3
  17. package/dist/src/orchestration/cascadeDestroyHelpers.js +1 -1
  18. package/dist/src/orchestration/codeOnlyDeploy.d.ts +19 -0
  19. package/dist/src/orchestration/codeOnlyDeploy.js +1 -0
  20. package/dist/src/orchestration/detectionPipeline.js +1 -1
  21. package/dist/src/orchestration/dockerBuildHelper.d.ts +19 -2
  22. package/dist/src/orchestration/dockerBuildHelper.js +1 -1
  23. package/dist/src/orchestration/dockerInterface.d.ts +63 -5
  24. package/dist/src/orchestration/index.d.ts +1 -1
  25. package/dist/src/orchestration/openNextBuild.js +3 -3
  26. package/dist/src/orchestration/serviceFactory.d.ts +6 -0
  27. package/dist/src/orchestration/serviceFactory.js +1 -1
  28. package/dist/src/orchestration/stackCleanup.js +1 -1
  29. package/dist/src/orchestration/stepLifecycle.d.ts +29 -0
  30. package/dist/src/orchestration/stepLifecycle.js +1 -0
  31. package/dist/src/services/application/ApplicationStackService.d.ts +9 -1
  32. package/dist/src/services/application/ApplicationStackService.js +1 -1
  33. package/dist/src/services/application/applicationStackHelpers.js +2 -2
  34. package/dist/src/services/index.d.ts +2 -2
  35. package/dist/src/services/index.js +1 -1
  36. package/dist/src/services/infrastructure/CdkArgumentBuilder.d.ts +10 -0
  37. package/dist/src/services/infrastructure/CdkArgumentBuilder.js +1 -1
  38. package/dist/src/services/infrastructure/CdkCommandRunner.d.ts +1 -0
  39. package/dist/src/services/infrastructure/CdkCommandRunner.js +2 -2
  40. package/dist/src/services/infrastructure/CdkOutputAnalyser.js +1 -1
  41. package/dist/src/services/infrastructure/CdkProcessManager.js +1 -1
  42. package/dist/src/services/infrastructure/CdkService.d.ts +1 -1
  43. package/dist/src/services/infrastructure/CdkService.js +2 -2
  44. package/dist/src/services/infrastructure/CdkServiceTypes.d.ts +8 -1
  45. package/dist/src/services/infrastructure/CloudFormationService.js +1 -1
  46. package/dist/src/services/infrastructure/EcrImageInspectorService.d.ts +32 -0
  47. package/dist/src/services/infrastructure/EcrImageInspectorService.js +1 -0
  48. package/dist/src/services/infrastructure/EcsService.d.ts +96 -0
  49. package/dist/src/services/infrastructure/EcsService.js +1 -0
  50. package/dist/src/services/infrastructure/EcsServiceResolver.d.ts +58 -0
  51. package/dist/src/services/infrastructure/EcsServiceResolver.js +1 -0
  52. package/dist/src/services/infrastructure/cdkServiceHelpers.d.ts +1 -3
  53. package/dist/src/services/infrastructure/cdkServiceHelpers.js +1 -1
  54. package/dist/src/services/infrastructure/index.d.ts +3 -0
  55. package/dist/src/services/infrastructure/index.js +1 -1
  56. package/dist/src/services/supporting/CdkContextBuilder.d.ts +1 -1
  57. package/dist/src/services/supporting/CdkContextBuilder.js +1 -1
  58. package/dist/src/steps/stepRegistry.js +1 -1
  59. package/dist/src/types/FjallState.js +1 -1
  60. package/dist/src/types/application/ApplicationServiceTypes.js +1 -1
  61. package/dist/src/types/callbacks.d.ts +43 -6
  62. package/dist/src/types/deployment/DeploymentTypes.d.ts +0 -1
  63. package/dist/src/types/errors/ServiceError.js +1 -1
  64. package/dist/src/types/events.d.ts +53 -0
  65. package/dist/src/types/index.d.ts +1 -1
  66. package/dist/src/types/params.d.ts +15 -0
  67. package/dist/src/types/stepDefinitions.d.ts +7 -4
  68. package/dist/src/types/stepDefinitions.js +1 -1
  69. package/package.json +22 -23
  70. package/dist/src/__test-utils__/awsMockHelpers.d.ts +0 -20
  71. package/dist/src/__test-utils__/awsMockHelpers.js +0 -1
  72. package/dist/src/__test-utils__/index.d.ts +0 -1
  73. package/dist/src/__test-utils__/index.js +0 -1
  74. package/dist/src/aws/utils/__tests__/cloudformationTestHelpers.d.ts +0 -6
  75. package/dist/src/aws/utils/__tests__/cloudformationTestHelpers.js +0 -1
  76. package/dist/src/orchestration/__tests__/cascadeTestHelpers.d.ts +0 -12
  77. package/dist/src/orchestration/__tests__/cascadeTestHelpers.js +0 -1
  78. package/dist/src/services/infrastructure/__tests__/cloudFormationTestHelpers.d.ts +0 -9
  79. package/dist/src/services/infrastructure/__tests__/cloudFormationTestHelpers.js +0 -1
@@ -1,20 +0,0 @@
1
- import { vi } from "vitest";
2
- /**
3
- * Create an AWS error with the correct name property for SDK v3 error matching.
4
- * AWS SDK v3 checks error.name for typed error handling (e.g. "AccountAlreadyRegisteredException").
5
- * Object.defineProperty is required because Error.name is non-writable by default.
6
- */
7
- export declare function createAwsError(name: string, message: string): Error;
8
- /**
9
- * Create a mock AWS SDK v3 client with a spied `send` method.
10
- * The returned object is typed as the specified client type for test convenience.
11
- *
12
- * Usage:
13
- * ```ts
14
- * const mockClient = createMockAwsClient<OrganizationsClient>();
15
- * vi.mocked(mockClient.send).mockResolvedValue({ ... });
16
- * ```
17
- */
18
- export declare function createMockAwsClient<T>(): T & {
19
- send: ReturnType<typeof vi.fn>;
20
- };
@@ -1 +0,0 @@
1
- import{vi as n}from"vitest";function c(e,t){const r=new Error(t);return Object.defineProperty(r,"name",{value:e,writable:!0}),r}function i(){return{send:n.fn()}}export{c as createAwsError,i as createMockAwsClient};
@@ -1 +0,0 @@
1
- export { createAwsError, createMockAwsClient } from "./awsMockHelpers.js";
@@ -1 +0,0 @@
1
- import{createAwsError as o,createMockAwsClient as t}from"./awsMockHelpers.js";export{o as createAwsError,t as createMockAwsClient};
@@ -1,6 +0,0 @@
1
- import { vi } from "vitest";
2
- import type { EventLogWriter } from "../cloudformationEventTypes.js";
3
- export declare function createMockEventLogger(): EventLogWriter;
4
- export declare function createMockAwsClient(sendFn: ReturnType<typeof vi.fn>): {
5
- getClient: import("vitest").Mock<(...args: any[]) => any>;
6
- };
@@ -1 +0,0 @@
1
- import{vi as e}from"vitest";function r(){return{writeEvent:e.fn(),writeDeploymentEnd:e.fn(),writeFailureSummary:e.fn(),writeFailureAnalysis:e.fn(),writeCdkOutput:e.fn(),getLogPath:e.fn(),getLogSummary:e.fn()}}function i(t){return{getClient:e.fn().mockReturnValue({send:t})}}export{i as createMockAwsClient,r as createMockEventLogger};
@@ -1,12 +0,0 @@
1
- import type { DeployCallbacks } from "../../types/callbacks.js";
2
- import type { OrganisationOperation } from "../../types/operations.js";
3
- import type { DeployServices } from "../serviceFactory.js";
4
- export declare const TEST_REGION = "eu-west-1";
5
- export declare const TEST_ACCOUNT: {
6
- id: string;
7
- name: string;
8
- environment: string;
9
- };
10
- export declare function createOrgOperation(): OrganisationOperation;
11
- export declare function createBaseMockCallbacks(): DeployCallbacks;
12
- export declare function createMockServices(overrides?: Partial<DeployServices>): DeployServices;
@@ -1 +0,0 @@
1
- import{vi as e}from"vitest";import{success as t}from"@fjall/generator";const o="eu-west-1",a={id:"222222222222",name:"platform",environment:"platform"};function r(){return{kind:"organisation",type:"organisation",target:"organisation",path:"/tmp/test/fjall/organisation"}}function u(){return{onLog:e.fn(),onError:e.fn(),onOutput:e.fn(),onStepStart:e.fn(),onStepComplete:e.fn(),onCascadeStart:e.fn(),onCascadePhaseStart:e.fn(),onCascadeAccountStart:e.fn(),onCascadeAccountPhaseChange:e.fn(),onCascadeAccountResourceProgress:e.fn(),onCascadeAccountComplete:e.fn(),onCascadeComplete:e.fn(),onResourceProgress:e.fn(),onCdkOutput:e.fn()}}function f(n){return{awsProvider:{getRegion:e.fn().mockReturnValue(o),getAccountId:e.fn().mockReturnValue("111111111111"),exportToEnv:e.fn(),getClient:e.fn(),getCredentials:e.fn().mockReturnValue({accessKeyId:"AKIA_TEST",secretAccessKey:"secret_test",sessionToken:"token_test"}),assumeRole:e.fn().mockResolvedValue({accessKeyId:"AKIA_ASSUMED",secretAccessKey:"secret_assumed",sessionToken:"token_assumed"}),...n?.awsProvider},cdkService:{runCdkSynth:e.fn().mockResolvedValue(t(void 0)),runCdkBootstrap:e.fn().mockResolvedValue(t(void 0)),runCdkDeploy:e.fn().mockResolvedValue(t(void 0)),runCdkDestroy:e.fn().mockResolvedValue(t(void 0)),...n?.cdkService},cfnService:{getStackOutputs:e.fn().mockResolvedValue(t([])),stackExists:e.fn().mockResolvedValue(!0),...n?.cfnService},stackService:{...n?.stackService},hashService:{...n?.hashService},frameworkRegistry:{resolve:e.fn().mockReturnValue(null),...n?.frameworkRegistry},dispose:e.fn()}}export{a as TEST_ACCOUNT,o as TEST_REGION,u as createBaseMockCallbacks,f as createMockServices,r as createOrgOperation};
@@ -1,9 +0,0 @@
1
- import type { AwsProvider } from "../../../aws/AwsProvider.js";
2
- import { CloudFormationService } from "../CloudFormationService.js";
3
- export declare function createCfnService(): {
4
- service: CloudFormationService;
5
- mockSend: import("vitest").Mock<(...args: any[]) => any>;
6
- mockAws: AwsProvider;
7
- };
8
- export declare function createValidationError(message: string): Error;
9
- export declare function createStackNotFoundError(): Error;
@@ -1 +0,0 @@
1
- import{vi as e}from"vitest";import{createAwsError as o}from"../../../__test-utils__/awsMockHelpers.js";import{CloudFormationService as n}from"../CloudFormationService.js";function u(){const r=e.fn(),t={getClient:e.fn().mockReturnValue({send:r})};return{service:new n(t),mockSend:r,mockAws:t}}function c(r){return o("ValidationError",r)}function f(){return c("Stack with id my-stack does not exist")}export{u as createCfnService,f as createStackNotFoundError,c as createValidationError};