@continuous-excellence/ze-great-dashboard-aws 0.19.0 → 0.21.0

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/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Ze Great Dashboard on AWS
2
2
 
3
3
  `@continuous-excellence/ze-great-dashboard-aws` packages a board for a private AWS Lambda or ECS
4
- deployment. It includes the Lambda runtime, matching browser client, deployment CLI, and
5
- CloudFormation templates.
4
+ deployment. It includes the Lambda runtime, deployment CLI, and CloudFormation templates; browser
5
+ assets are published separately as `@continuous-excellence/ze-great-dashboard-client`.
6
6
 
7
7
  Deployment mode is persisted in `dashboard-bootstrap.json` and generated application parameters
8
8
  as `ComputeMode`. Existing files without that field mean `lambda`. Choose `--mode ecs` during
@@ -95,7 +95,7 @@ Changing `board.yaml` or upgrading the pinned package uses this same path.
95
95
  | The package owns | You own |
96
96
  | --- | --- |
97
97
  | Board validation and Lambda packaging | Board content and source access |
98
- | Compatible immutable browser assets | The protected gateway and authentication |
98
+ | Server runtime and CloudFormation templates | The immutable browser asset host and authentication |
99
99
  | Private application CloudFormation template | AWS account administration |
100
100
  | Restricted bootstrap templates | Secret values and the credential-map ARN |
101
101
  | Read-only preflight and consistency checks | Reviewing and executing AWS changes |
package/dist/cli.js CHANGED
@@ -1,16 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // packages/aws/src/cli.ts
4
- import { execFile as execFile3 } from "node:child_process";
4
+ import { execFile as execFile2 } from "node:child_process";
5
5
  import { readFile as readFile6, writeFile as writeFile4 } from "node:fs/promises";
6
- import { fileURLToPath as fileURLToPath3 } from "node:url";
7
- import { promisify as promisify3 } from "node:util";
6
+ import { promisify as promisify2 } from "node:util";
8
7
  import { parse as parse3 } from "yaml";
9
8
 
10
9
  // packages/aws/src/doctor.ts
11
- import { execFile as execFile2 } from "node:child_process";
10
+ import { execFile } from "node:child_process";
12
11
  import { readFile as readFile5 } from "node:fs/promises";
13
- import { promisify as promisify2 } from "node:util";
12
+ import { promisify } from "node:util";
14
13
  import { parse as parse2 } from "yaml";
15
14
 
16
15
  // packages/aws/src/bootstrap.ts
@@ -353,7 +352,32 @@ var pullRequestHealthSchema = z4.object({
353
352
  status: pipelineStatusSchema.shape.status,
354
353
  summary: z4.string().min(1),
355
354
  workflows: z4.array(pullRequestHealthItemSchema),
356
- pullRequests: z4.array(pullRequestHealthItemSchema)
355
+ pullRequests: z4.array(pullRequestHealthItemSchema),
356
+ /** Missing component reads remain visible even when the evidence we did get is reassuring. */
357
+ incompleteObservations: z4.array(z4.object({ label: z4.string().min(1), message: z4.string().min(1) })).optional(),
358
+ /** The latest component reading, disclosed beside the oldest aggregate evidence. */
359
+ newestObservedAt: z4.iso.datetime().optional()
360
+ });
361
+ var pullRequestCandidateSchema = z4.object({
362
+ number: z4.number().int().positive(),
363
+ branch: z4.string().min(1),
364
+ link: z4.url()
365
+ });
366
+ var pullRequestCandidatesSchema = z4.object({
367
+ type: z4.literal("pull-request-candidates"),
368
+ pullRequests: z4.array(pullRequestCandidateSchema),
369
+ /** GitHub's first page is a deliberate bounded observation, not proof that no later PR exists. */
370
+ truncated: z4.boolean().optional()
371
+ });
372
+ var pullRequestWorkflowObservationSchema = z4.object({
373
+ type: z4.literal("pull-request-workflow"),
374
+ workflow: z4.string().min(1),
375
+ item: pullRequestHealthItemSchema
376
+ });
377
+ var pullRequestBuildObservationSchema = z4.object({
378
+ type: z4.literal("pull-request-build"),
379
+ branch: z4.string().min(1),
380
+ item: pullRequestHealthItemSchema
357
381
  });
358
382
  var httpValueSchema = z4.object({
359
383
  type: z4.literal("http-value"),
@@ -886,11 +910,9 @@ function requiredBootstrapParameters(kind, values) {
886
910
  }
887
911
 
888
912
  // packages/aws/src/index.ts
889
- import { execFile } from "node:child_process";
890
913
  import { cp, mkdir as mkdir2, readFile as readFile4, rm, writeFile as writeFile3 } from "node:fs/promises";
891
914
  import { join as join2, resolve as resolve2 } from "node:path";
892
915
  import { fileURLToPath as fileURLToPath2 } from "node:url";
893
- import { promisify } from "node:util";
894
916
 
895
917
  // node_modules/fflate/esm/index.mjs
896
918
  import { createRequire } from "module";
@@ -2700,7 +2722,6 @@ async function bootstrapGuideReport(input) {
2700
2722
  }
2701
2723
 
2702
2724
  // packages/aws/src/index.ts
2703
- var run = promisify(execFile);
2704
2725
  function requireImageDigest(image) {
2705
2726
  if (!/^[^\s@]+@sha256:[a-f0-9]{64}$/.test(image))
2706
2727
  throw new Error(
@@ -2840,30 +2861,6 @@ async function packageEcs(options) {
2840
2861
  );
2841
2862
  return packagedRelease;
2842
2863
  }
2843
- async function publishClientAssets(options) {
2844
- const assetsDir = resolve2(options.assetsDir);
2845
- await readFile4(join2(assetsDir, "index.html"));
2846
- const assetPath = `${options.assetsBaseUrl.replace(/\/+$/, "")}/dashboard/${options.version}`;
2847
- await run("aws", [
2848
- "s3",
2849
- "sync",
2850
- assetsDir,
2851
- `s3://${options.assetsBucket}/dashboard/${options.version}/`,
2852
- "--exclude",
2853
- "index.html",
2854
- "--cache-control",
2855
- "public, max-age=31536000, immutable"
2856
- ]);
2857
- await run("aws", [
2858
- "s3",
2859
- "cp",
2860
- join2(assetsDir, "index.html"),
2861
- `s3://${options.assetsBucket}/dashboard/${options.version}/index.html`,
2862
- "--cache-control",
2863
- "public, max-age=60"
2864
- ]);
2865
- return assetPath;
2866
- }
2867
2864
  async function cloudFormationTemplate(mode = "lambda") {
2868
2865
  return readFile4(
2869
2866
  fileURLToPath2(
@@ -2874,10 +2871,10 @@ async function cloudFormationTemplate(mode = "lambda") {
2874
2871
  }
2875
2872
 
2876
2873
  // packages/aws/src/doctor.ts
2877
- var run2 = promisify2(execFile2);
2874
+ var run = promisify(execFile);
2878
2875
  var actualDependencies = {
2879
2876
  async execute(command, args2) {
2880
- return (await run2(command, args2)).stdout.trim();
2877
+ return (await run(command, args2)).stdout.trim();
2881
2878
  },
2882
2879
  async fetch(url) {
2883
2880
  return fetch(url);
@@ -3041,7 +3038,7 @@ async function runDoctor(options, dependencies = actualDependencies) {
3041
3038
 
3042
3039
  // packages/aws/src/cli.ts
3043
3040
  var args = process.argv.slice(2);
3044
- var runCommand = promisify3(execFile3);
3041
+ var runCommand = promisify2(execFile2);
3045
3042
  var option = (name, fallback) => {
3046
3043
  const i2 = args.indexOf(name);
3047
3044
  return i2 >= 0 ? args[i2 + 1] : fallback;
@@ -3266,17 +3263,7 @@ function copyableCommand(command) {
3266
3263
  }
3267
3264
  try {
3268
3265
  const packageVersion2 = await installedPackageVersion();
3269
- const bundledAssets = fileURLToPath3(new URL("../client", import.meta.url));
3270
- if (args[0] === "publish-assets") {
3271
- const version = requiredOption("--version", packageVersion2);
3272
- const assetPath = await publishClientAssets({
3273
- assetsDir: option("--assets-dir", bundledAssets) ?? bundledAssets,
3274
- assetsBucket: requiredOption("--assets-bucket"),
3275
- assetsBaseUrl: requiredOption("--assets-base-url"),
3276
- version
3277
- });
3278
- console.log(JSON.stringify({ published: true, version, assetPath }));
3279
- } else if (args[0] === "doctor") {
3266
+ if (args[0] === "doctor") {
3280
3267
  const parametersPath = option("--parameters", "aws-dashboard-parameters.json") ?? "aws-dashboard-parameters.json";
3281
3268
  const region2 = option("--region", process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION ?? "us-east-1") ?? "us-east-1";
3282
3269
  const checks = await runDoctor(
@@ -3627,9 +3614,7 @@ ${shellCommand(awsCommand)}`,
3627
3614
  }
3628
3615
  }
3629
3616
  } else if (args[0] !== "package")
3630
- throw new Error(
3631
- "Usage: ze-great-dashboard-aws package|parameters|bootstrap|publish-assets|doctor [options]"
3632
- );
3617
+ throw new Error("Usage: ze-great-dashboard-aws package|parameters|bootstrap|doctor [options]");
3633
3618
  else {
3634
3619
  const boardConfig = option("--board-config");
3635
3620
  const version = option("--version", process.env.DASHBOARD_VERSION ?? packageVersion2);
package/dist/index.d.ts CHANGED
@@ -36,12 +36,4 @@ export type EcsPackageOptions = Omit<LambdaPackageOptions, 'secretReference'> &
36
36
  export declare function packageLambda(options: LambdaPackageOptions): Promise<PackagedRelease>;
37
37
  /** Packages the published container reference and ECS CloudFormation handoff. */
38
38
  export declare function packageEcs(options: EcsPackageOptions): Promise<PackagedRelease>;
39
- export type PublishClientAssetsOptions = {
40
- assetsDir: string;
41
- assetsBucket: string;
42
- assetsBaseUrl: string;
43
- version: string;
44
- };
45
- /** Publishes the versioned client half of a provider-managed release. */
46
- export declare function publishClientAssets(options: PublishClientAssetsOptions): Promise<string>;
47
39
  export declare function cloudFormationTemplate(mode?: ComputeMode): Promise<string>;
package/dist/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  // packages/aws/src/index.ts
2
- import { execFile } from "node:child_process";
3
2
  import { cp, mkdir as mkdir2, readFile as readFile4, rm, writeFile as writeFile3 } from "node:fs/promises";
4
3
  import { join as join2, resolve as resolve2 } from "node:path";
5
4
  import { fileURLToPath as fileURLToPath2 } from "node:url";
6
- import { promisify } from "node:util";
7
5
 
8
6
  // node_modules/fflate/esm/index.mjs
9
7
  import { createRequire } from "module";
@@ -1035,7 +1033,32 @@ var pullRequestHealthSchema = z4.object({
1035
1033
  status: pipelineStatusSchema.shape.status,
1036
1034
  summary: z4.string().min(1),
1037
1035
  workflows: z4.array(pullRequestHealthItemSchema),
1038
- pullRequests: z4.array(pullRequestHealthItemSchema)
1036
+ pullRequests: z4.array(pullRequestHealthItemSchema),
1037
+ /** Missing component reads remain visible even when the evidence we did get is reassuring. */
1038
+ incompleteObservations: z4.array(z4.object({ label: z4.string().min(1), message: z4.string().min(1) })).optional(),
1039
+ /** The latest component reading, disclosed beside the oldest aggregate evidence. */
1040
+ newestObservedAt: z4.iso.datetime().optional()
1041
+ });
1042
+ var pullRequestCandidateSchema = z4.object({
1043
+ number: z4.number().int().positive(),
1044
+ branch: z4.string().min(1),
1045
+ link: z4.url()
1046
+ });
1047
+ var pullRequestCandidatesSchema = z4.object({
1048
+ type: z4.literal("pull-request-candidates"),
1049
+ pullRequests: z4.array(pullRequestCandidateSchema),
1050
+ /** GitHub's first page is a deliberate bounded observation, not proof that no later PR exists. */
1051
+ truncated: z4.boolean().optional()
1052
+ });
1053
+ var pullRequestWorkflowObservationSchema = z4.object({
1054
+ type: z4.literal("pull-request-workflow"),
1055
+ workflow: z4.string().min(1),
1056
+ item: pullRequestHealthItemSchema
1057
+ });
1058
+ var pullRequestBuildObservationSchema = z4.object({
1059
+ type: z4.literal("pull-request-build"),
1060
+ branch: z4.string().min(1),
1061
+ item: pullRequestHealthItemSchema
1039
1062
  });
1040
1063
  var httpValueSchema = z4.object({
1041
1064
  type: z4.literal("http-value"),
@@ -2688,7 +2711,6 @@ async function bootstrapGuide(input) {
2688
2711
  }
2689
2712
 
2690
2713
  // packages/aws/src/index.ts
2691
- var run = promisify(execFile);
2692
2714
  function requireImageDigest(image) {
2693
2715
  if (!/^[^\s@]+@sha256:[a-f0-9]{64}$/.test(image))
2694
2716
  throw new Error(
@@ -2828,30 +2850,6 @@ async function packageEcs(options) {
2828
2850
  );
2829
2851
  return packagedRelease;
2830
2852
  }
2831
- async function publishClientAssets(options) {
2832
- const assetsDir = resolve2(options.assetsDir);
2833
- await readFile4(join2(assetsDir, "index.html"));
2834
- const assetPath = `${options.assetsBaseUrl.replace(/\/+$/, "")}/dashboard/${options.version}`;
2835
- await run("aws", [
2836
- "s3",
2837
- "sync",
2838
- assetsDir,
2839
- `s3://${options.assetsBucket}/dashboard/${options.version}/`,
2840
- "--exclude",
2841
- "index.html",
2842
- "--cache-control",
2843
- "public, max-age=31536000, immutable"
2844
- ]);
2845
- await run("aws", [
2846
- "s3",
2847
- "cp",
2848
- join2(assetsDir, "index.html"),
2849
- `s3://${options.assetsBucket}/dashboard/${options.version}/index.html`,
2850
- "--cache-control",
2851
- "public, max-age=60"
2852
- ]);
2853
- return assetPath;
2854
- }
2855
2853
  async function cloudFormationTemplate(mode = "lambda") {
2856
2854
  return readFile4(
2857
2855
  fileURLToPath2(
@@ -2884,7 +2882,6 @@ export {
2884
2882
  mergeBootstrapParameters,
2885
2883
  packageEcs,
2886
2884
  packageLambda,
2887
- publishClientAssets,
2888
2885
  requireComputeMode,
2889
2886
  requiredBootstrapParameters,
2890
2887
  resolveComputeMode,