@justworkflowit/cdk-constructs 0.0.213 → 0.0.214
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,5 +3,12 @@ export declare const handler: (event: CloudFormationCustomResourceEvent) => Prom
|
|
|
3
3
|
PhysicalResourceId: string;
|
|
4
4
|
Data: {
|
|
5
5
|
Message: string;
|
|
6
|
+
PlaceholderTokenDetected: string;
|
|
7
|
+
};
|
|
8
|
+
} | {
|
|
9
|
+
PhysicalResourceId: string;
|
|
10
|
+
Data: {
|
|
11
|
+
Message: string;
|
|
12
|
+
PlaceholderTokenDetected?: undefined;
|
|
6
13
|
};
|
|
7
14
|
}>;
|
|
@@ -67642,6 +67642,7 @@ var getApiClient = () => {
|
|
|
67642
67642
|
|
|
67643
67643
|
// src/lambda/definitionDeployerLambda.ts
|
|
67644
67644
|
var s3 = new import_client_s3.S3Client();
|
|
67645
|
+
var PLACEHOLDER_TOKEN = "REPLACE_ME_WITH_JUST_WORKFLOW_IT_AUTH_TOKEN";
|
|
67645
67646
|
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
67646
67647
|
var parseNumberEnv = (value, fallback) => {
|
|
67647
67648
|
const parsed = Number(value);
|
|
@@ -67762,6 +67763,7 @@ var handler = async (event) => {
|
|
|
67762
67763
|
const { RequestType } = event;
|
|
67763
67764
|
const bucket = process.env.DEFINITION_BUCKET;
|
|
67764
67765
|
const organizationId = process.env.ORGANIZATION_ID;
|
|
67766
|
+
const authSecretName = process.env.AUTH_SECRET_NAME;
|
|
67765
67767
|
const keys = JSON.parse(process.env.DEFINITION_KEYS_JSON || "[]");
|
|
67766
67768
|
if (!bucket) {
|
|
67767
67769
|
throw new Error("Missing S3 bucket from environment variables");
|
|
@@ -67769,6 +67771,21 @@ var handler = async (event) => {
|
|
|
67769
67771
|
if (!organizationId) {
|
|
67770
67772
|
throw new Error("Missing organization ID from environment variables");
|
|
67771
67773
|
}
|
|
67774
|
+
if (!authSecretName) {
|
|
67775
|
+
throw new Error("Missing auth secret name from environment variables");
|
|
67776
|
+
}
|
|
67777
|
+
const authToken = await getSecretValueByName(authSecretName);
|
|
67778
|
+
if (authToken === PLACEHOLDER_TOKEN) {
|
|
67779
|
+
console.log("\u26A0\uFE0F API token is still the placeholder value. Skipping workflow deployment.");
|
|
67780
|
+
console.log("\u2139\uFE0F To deploy workflows, update the secret with a real JustWorkflowIt API token and trigger a stack update.");
|
|
67781
|
+
return {
|
|
67782
|
+
PhysicalResourceId: "JustWorkflowItIntegrationTrigger",
|
|
67783
|
+
Data: {
|
|
67784
|
+
Message: `Skipped ${RequestType} - placeholder token detected`,
|
|
67785
|
+
PlaceholderTokenDetected: "true"
|
|
67786
|
+
}
|
|
67787
|
+
};
|
|
67788
|
+
}
|
|
67772
67789
|
if (RequestType === "Create" || RequestType === "Update") {
|
|
67773
67790
|
if (keys.length === 0) {
|
|
67774
67791
|
console.log("No definitions to deploy");
|