@deployfoundation/foundation-deploy 0.2.37 → 0.2.38

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.
package/dist/bin/app.js CHANGED
@@ -8,13 +8,13 @@ import {
8
8
  FoundationPages,
9
9
  FoundationPipeline,
10
10
  NewsletterStack
11
- } from "../chunk-9yz4hnte.js";
11
+ } from "../chunk-j52g7bsc.js";
12
12
  import {
13
13
  adminsFor,
14
14
  instanceNames,
15
15
  loadInstanceFile,
16
16
  provisionsIntegration
17
- } from "../chunk-hps5vshg.js";
17
+ } from "../chunk-2ra18dqx.js";
18
18
 
19
19
  // bin/app.ts
20
20
  import { execFileSync } from "node:child_process";
@@ -30,7 +30,7 @@ import {
30
30
  stackExists,
31
31
  stackOutput,
32
32
  toolVersion
33
- } from "../chunk-gmdzzrc4.js";
33
+ } from "../chunk-8e2z4rhf.js";
34
34
  import {
35
35
  BASE_SLACK_EVENTS,
36
36
  CAPABILITY_IDS,
@@ -47,7 +47,7 @@ import {
47
47
  skillsKey,
48
48
  slackCommandPrefix,
49
49
  versionedConfigKey
50
- } from "../chunk-hps5vshg.js";
50
+ } from "../chunk-2ra18dqx.js";
51
51
 
52
52
  // src/deploy/config-sync.ts
53
53
  import { existsSync, mkdirSync, mkdtempSync, readdirSync } from "node:fs";
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env bun
2
2
  import {
3
3
  DEFAULT_RELEASE_BUCKET
4
- } from "../chunk-gmdzzrc4.js";
5
- import"../chunk-hps5vshg.js";
4
+ } from "../chunk-8e2z4rhf.js";
5
+ import"../chunk-2ra18dqx.js";
6
6
 
7
7
  // bin/release-account.ts
8
8
  import * as cdk2 from "aws-cdk-lib";
@@ -864,6 +864,12 @@ function requiredSlackCommandSuffixes(enabled) {
864
864
  return [...suffixes].sort();
865
865
  }
866
866
 
867
+ // ../core/src/proactive.ts
868
+ var PROACTIVE_CHANNEL_MODES = ["triage", "alerts"];
869
+ function encodeProactiveChannels(channels) {
870
+ return channels.map((channel) => channel.mode === "triage" ? channel.id : `${channel.id}:${channel.mode}`).join(",");
871
+ }
872
+
867
873
  // ../core/src/instance.ts
868
874
  var PENDING = "TBD";
869
875
  var CUSTOMIZATION_ARTIFACT_NAME = "Customization";
@@ -915,8 +921,15 @@ var RawCustomization = z2.object({
915
921
  path: z2.string().refine(normalizedRelativePosixPath, "customization.path must be a normalized relative POSIX path"),
916
922
  required: z2.boolean().default(true)
917
923
  }).strict();
924
+ var ProactiveChannelId = z2.string().regex(/^[CG][A-Z0-9]{8,}$/);
925
+ var RawProactiveChannel = z2.union([
926
+ ProactiveChannelId.transform((id) => ({ id, mode: "triage" })),
927
+ z2.object({ id: ProactiveChannelId, mode: z2.enum(PROACTIVE_CHANNEL_MODES).default("triage") }).strict()
928
+ ]);
918
929
  var RawProactive = z2.object({
919
- channels: z2.array(z2.string().regex(/^[CG][A-Z0-9]{8,}$/)).default([]),
930
+ channels: z2.array(RawProactiveChannel).default([]).refine((channels) => new Set(channels.map((c) => c.id)).size === channels.length, {
931
+ message: "a channel may be listed only once"
932
+ }),
920
933
  maxPerHour: z2.number().int().min(1).max(500).default(20)
921
934
  }).strict().default({ channels: [] });
922
935
  var RawRuntime = z2.object({
@@ -1886,4 +1899,4 @@ function ecrRepositoryArn(repositoryUri) {
1886
1899
  return `arn:aws:ecr:${region}:${account}:repository/${name}`;
1887
1900
  }
1888
1901
 
1889
- export { parseSchedule, BASE_SLACK_EVENTS, CAPABILITY_IDS, requiredGithubPermissions, requiredSlackScopes, requiredSlackCommands, CUSTOMIZATION_ARTIFACT_NAME, newsletterManifestFor, FOUNDATION_VERSION_RE, versionedConfigKey, instanceNames, slackCommandPrefix, slackCommandPrefixes, isScheduledJob, isWebhookJob, webhookJobBindings, scheduledJobBindings, jobWebhookKey, capabilityScheduledJobs, crmOutreachConfigured, crmPolicyFingerprint, parseInstanceConfig, loadInstanceFile, configPathFor, capabilityEnabled, requiresAuthenticatedQueue, enabledIntegrations, provisionsIntegration, adminsFor, WEB_SEARCH_TARGET, WEB_SEARCH_CONNECTOR_VERSION, LIVE_ENDPOINT_NAME, RELEASE_VERSION_RE, parseManifest, manifestKey, lambdaKey, skillsKey, buildManifest, manifestSigningPayload, verifyManifest, lambdaBundleContext, BUN_VERSION, LAMBDA_ENTRY_POINTS, skipBundle, RELEASE_BUCKET_ENV, RELEASE_DIR_ENV, releaseCacheDir, releaseSource, lambdaCode, agentImage, agentImageTagRequired, releaseImageRepositoryArn, ecrRepositoryArn };
1902
+ export { parseSchedule, BASE_SLACK_EVENTS, CAPABILITY_IDS, requiredGithubPermissions, requiredSlackScopes, requiredSlackCommands, encodeProactiveChannels, CUSTOMIZATION_ARTIFACT_NAME, newsletterManifestFor, FOUNDATION_VERSION_RE, versionedConfigKey, instanceNames, slackCommandPrefix, slackCommandPrefixes, isScheduledJob, isWebhookJob, webhookJobBindings, scheduledJobBindings, jobWebhookKey, capabilityScheduledJobs, crmOutreachConfigured, crmPolicyFingerprint, parseInstanceConfig, loadInstanceFile, configPathFor, capabilityEnabled, requiresAuthenticatedQueue, enabledIntegrations, provisionsIntegration, adminsFor, WEB_SEARCH_TARGET, WEB_SEARCH_CONNECTOR_VERSION, LIVE_ENDPOINT_NAME, RELEASE_VERSION_RE, parseManifest, manifestKey, lambdaKey, skillsKey, buildManifest, manifestSigningPayload, verifyManifest, lambdaBundleContext, BUN_VERSION, LAMBDA_ENTRY_POINTS, skipBundle, RELEASE_BUCKET_ENV, RELEASE_DIR_ENV, releaseCacheDir, releaseSource, lambdaCode, agentImage, agentImageTagRequired, releaseImageRepositoryArn, ecrRepositoryArn };
@@ -6,7 +6,7 @@ import {
6
6
  manifestKey,
7
7
  releaseCacheDir,
8
8
  verifyManifest
9
- } from "./chunk-hps5vshg.js";
9
+ } from "./chunk-2ra18dqx.js";
10
10
 
11
11
  // src/deploy/release.ts
12
12
  import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2 } from "node:fs";
@@ -9,6 +9,7 @@ import {
9
9
  capabilityScheduledJobs,
10
10
  crmOutreachConfigured,
11
11
  crmPolicyFingerprint,
12
+ encodeProactiveChannels,
12
13
  instanceNames,
13
14
  isScheduledJob,
14
15
  lambdaCode,
@@ -22,7 +23,7 @@ import {
22
23
  scheduledJobBindings,
23
24
  slackCommandPrefixes,
24
25
  webhookJobBindings
25
- } from "./chunk-hps5vshg.js";
26
+ } from "./chunk-2ra18dqx.js";
26
27
 
27
28
  // src/stacks/agent-stack.ts
28
29
  import * as cdk from "aws-cdk-lib";
@@ -1063,7 +1064,7 @@ class FoundationApi extends cdk2.Stack {
1063
1064
  },
1064
1065
  FOUNDATION_INSTANCE: props.instance.name,
1065
1066
  FOUNDATION_COMMAND_PREFIXES: slackCommandPrefixes(props.instance).join(","),
1066
- FOUNDATION_PROACTIVE_CHANNELS: props.instance.proactive.channels.join(","),
1067
+ FOUNDATION_PROACTIVE_CHANNELS: encodeProactiveChannels(props.instance.proactive.channels),
1067
1068
  FOUNDATION_PROACTIVE_MAX_PER_HOUR: String(props.instance.proactive.maxPerHour),
1068
1069
  ...jobsWebhookSecret === undefined ? {} : {
1069
1070
  FOUNDATION_WEBHOOK_JOBS: JSON.stringify(webhookJobs),
package/dist/src/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  FoundationPipeline,
11
11
  NewsletterStack,
12
12
  deployStatements
13
- } from "../chunk-9yz4hnte.js";
13
+ } from "../chunk-j52g7bsc.js";
14
14
  import {
15
15
  BUN_VERSION,
16
16
  LAMBDA_ENTRY_POINTS,
@@ -43,7 +43,7 @@ import {
43
43
  skillsKey,
44
44
  skipBundle,
45
45
  verifyManifest
46
- } from "../chunk-hps5vshg.js";
46
+ } from "../chunk-2ra18dqx.js";
47
47
  export {
48
48
  BUILD_TIMEOUT,
49
49
  BUN_VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deployfoundation/foundation-deploy",
3
- "version": "0.2.37",
3
+ "version": "0.2.38",
4
4
  "description": "Deploys one Foundation instance from a published, signed release: the CDK app and the deploy tool.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -9,6 +9,7 @@ import {
9
9
  capabilityScheduledJobs,
10
10
  crmOutreachConfigured,
11
11
  crmPolicyFingerprint,
12
+ encodeProactiveChannels,
12
13
  isScheduledJob,
13
14
  parseInstanceConfig,
14
15
  scheduledJobBindings,
@@ -479,7 +480,7 @@ export class FoundationApi extends cdk.Stack {
479
480
  }),
480
481
  FOUNDATION_INSTANCE: props.instance.name,
481
482
  FOUNDATION_COMMAND_PREFIXES: slackCommandPrefixes(props.instance).join(","),
482
- FOUNDATION_PROACTIVE_CHANNELS: props.instance.proactive.channels.join(","),
483
+ FOUNDATION_PROACTIVE_CHANNELS: encodeProactiveChannels(props.instance.proactive.channels),
483
484
  FOUNDATION_PROACTIVE_MAX_PER_HOUR: String(props.instance.proactive.maxPerHour),
484
485
  ...(jobsWebhookSecret === undefined
485
486
  ? {}