@justworkflowit/cdk-constructs 0.0.214 → 0.0.216
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.
|
@@ -3,6 +3,7 @@ export interface JustWorkflowItConstructsProps {
|
|
|
3
3
|
disambiguator: string;
|
|
4
4
|
organizationId: string;
|
|
5
5
|
workflowDefinitions: string[];
|
|
6
|
+
ignoreDefinitionDeployerFailures?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare class JustWorkflowItConstructs extends Construct {
|
|
8
9
|
private static readonly CONSTRUCT_ID_PREFIX;
|
|
@@ -126,7 +126,8 @@ class JustWorkflowItConstructs extends constructs_1.Construct {
|
|
|
126
126
|
ORGANIZATION_ID: props.organizationId,
|
|
127
127
|
API_BASE_URL: 'https://api.justworkflowit.com',
|
|
128
128
|
DEFINITION_BUCKET: bucket.bucketName,
|
|
129
|
-
DEFINITION_KEYS_JSON: JSON.stringify(definitionKeys)
|
|
129
|
+
DEFINITION_KEYS_JSON: JSON.stringify(definitionKeys),
|
|
130
|
+
IGNORE_FAILURES: String(props.ignoreDefinitionDeployerFailures ?? false),
|
|
130
131
|
},
|
|
131
132
|
});
|
|
132
133
|
secret.grantRead(integrationLambda);
|
|
@@ -4,11 +4,23 @@ export declare const handler: (event: CloudFormationCustomResourceEvent) => Prom
|
|
|
4
4
|
Data: {
|
|
5
5
|
Message: string;
|
|
6
6
|
PlaceholderTokenDetected: string;
|
|
7
|
+
FailureIgnored?: undefined;
|
|
8
|
+
Error?: undefined;
|
|
7
9
|
};
|
|
8
10
|
} | {
|
|
9
11
|
PhysicalResourceId: string;
|
|
10
12
|
Data: {
|
|
11
13
|
Message: string;
|
|
14
|
+
FailureIgnored: string;
|
|
15
|
+
Error: string;
|
|
12
16
|
PlaceholderTokenDetected?: undefined;
|
|
13
17
|
};
|
|
18
|
+
} | {
|
|
19
|
+
PhysicalResourceId: string;
|
|
20
|
+
Data: {
|
|
21
|
+
Message: string;
|
|
22
|
+
PlaceholderTokenDetected?: undefined;
|
|
23
|
+
FailureIgnored?: undefined;
|
|
24
|
+
Error?: undefined;
|
|
25
|
+
};
|
|
14
26
|
}>;
|
|
@@ -67765,6 +67765,7 @@ var handler = async (event) => {
|
|
|
67765
67765
|
const organizationId = process.env.ORGANIZATION_ID;
|
|
67766
67766
|
const authSecretName = process.env.AUTH_SECRET_NAME;
|
|
67767
67767
|
const keys = JSON.parse(process.env.DEFINITION_KEYS_JSON || "[]");
|
|
67768
|
+
const ignoreFailures = process.env.IGNORE_FAILURES === "true";
|
|
67768
67769
|
if (!bucket) {
|
|
67769
67770
|
throw new Error("Missing S3 bucket from environment variables");
|
|
67770
67771
|
}
|
|
@@ -67790,7 +67791,23 @@ var handler = async (event) => {
|
|
|
67790
67791
|
if (keys.length === 0) {
|
|
67791
67792
|
console.log("No definitions to deploy");
|
|
67792
67793
|
} else {
|
|
67793
|
-
|
|
67794
|
+
try {
|
|
67795
|
+
await deployWorkflows(organizationId, bucket, keys);
|
|
67796
|
+
} catch (error2) {
|
|
67797
|
+
if (ignoreFailures) {
|
|
67798
|
+
console.warn("\u26A0\uFE0F Workflow deployment failed, but IGNORE_FAILURES is enabled");
|
|
67799
|
+
console.warn("Error details:", error2);
|
|
67800
|
+
return {
|
|
67801
|
+
PhysicalResourceId: "JustWorkflowItIntegrationTrigger",
|
|
67802
|
+
Data: {
|
|
67803
|
+
Message: `${RequestType} completed with ignored failures`,
|
|
67804
|
+
FailureIgnored: "true",
|
|
67805
|
+
Error: error2 instanceof Error ? error2.message : String(error2)
|
|
67806
|
+
}
|
|
67807
|
+
};
|
|
67808
|
+
}
|
|
67809
|
+
throw error2;
|
|
67810
|
+
}
|
|
67794
67811
|
}
|
|
67795
67812
|
} else if (RequestType === "Delete") {
|
|
67796
67813
|
console.log("Delete event received. No cleanup required.");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justworkflowit/cdk-constructs",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.216",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"publishConfig": {
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"@types/jest": "^29.5.12",
|
|
34
34
|
"@types/node": "^20.12.5",
|
|
35
35
|
"cdk-cli": "^1.1.0",
|
|
36
|
+
"esbuild": "^0.25.11",
|
|
36
37
|
"eslint": "^9.29.0",
|
|
37
38
|
"eslint-config-prettier": "^9.1.0",
|
|
38
39
|
"eslint-plugin-jest": "^28.10.0",
|