@continuous-excellence/ze-great-dashboard-aws 0.27.10 → 0.27.12

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/cli.js CHANGED
@@ -57,25 +57,8 @@ import { z as z2 } from "zod";
57
57
 
58
58
  // packages/shared/src/duration.ts
59
59
  import { z } from "zod";
60
- var DURATION_PATTERN = /^(\d+)(ms|s|m|h)$/;
61
- var UNIT_MILLIS = {
62
- ms: 1,
63
- s: 1e3,
64
- m: 6e4,
65
- h: 36e5
66
- };
67
- function parseDuration(value2) {
68
- const match = DURATION_PATTERN.exec(value2);
69
- if (!match) return null;
70
- const [, rawAmount, rawUnit] = match;
71
- if (rawAmount === void 0 || rawUnit === void 0) return null;
72
- const amount = Number(rawAmount);
73
- if (amount <= 0) return null;
74
- return amount * UNIT_MILLIS[rawUnit];
75
- }
76
- var durationSchema = z.string().refine((value2) => parseDuration(value2) !== null, {
77
- message: 'must be a positive duration like "30s", "5m", or "1h"',
78
- params: { constraint: 'Use a positive duration like "30s", "5m", or "1h".' }
60
+ var durationSchema = z.string().regex(/^[1-9][0-9]*(?:ms|s|m|h)$/, {
61
+ message: 'must be a positive duration like "30s", "5m", or "1h"'
79
62
  }).brand();
80
63
 
81
64
  // packages/shared/src/board-config.ts
@@ -95,6 +78,8 @@ var httpValueFactSchema = z2.object({
95
78
  /** Stable address below the panel; labels and ordering may change without repointing it. */
96
79
  id: z2.string().min(1),
97
80
  label: z2.string().min(1),
81
+ /** Public destination; the proxy continues to read only `url`. */
82
+ link: z2.url().optional(),
98
83
  url: z2.url(),
99
84
  json_path: httpValueJsonPathSchema.optional()
100
85
  });
package/dist/index.js CHANGED
@@ -738,25 +738,8 @@ import { z as z2 } from "zod";
738
738
 
739
739
  // packages/shared/src/duration.ts
740
740
  import { z } from "zod";
741
- var DURATION_PATTERN = /^(\d+)(ms|s|m|h)$/;
742
- var UNIT_MILLIS = {
743
- ms: 1,
744
- s: 1e3,
745
- m: 6e4,
746
- h: 36e5
747
- };
748
- function parseDuration(value2) {
749
- const match = DURATION_PATTERN.exec(value2);
750
- if (!match) return null;
751
- const [, rawAmount, rawUnit] = match;
752
- if (rawAmount === void 0 || rawUnit === void 0) return null;
753
- const amount = Number(rawAmount);
754
- if (amount <= 0) return null;
755
- return amount * UNIT_MILLIS[rawUnit];
756
- }
757
- var durationSchema = z.string().refine((value2) => parseDuration(value2) !== null, {
758
- message: 'must be a positive duration like "30s", "5m", or "1h"',
759
- params: { constraint: 'Use a positive duration like "30s", "5m", or "1h".' }
741
+ var durationSchema = z.string().regex(/^[1-9][0-9]*(?:ms|s|m|h)$/, {
742
+ message: 'must be a positive duration like "30s", "5m", or "1h"'
760
743
  }).brand();
761
744
 
762
745
  // packages/shared/src/board-config.ts
@@ -776,6 +759,8 @@ var httpValueFactSchema = z2.object({
776
759
  /** Stable address below the panel; labels and ordering may change without repointing it. */
777
760
  id: z2.string().min(1),
778
761
  label: z2.string().min(1),
762
+ /** Public destination; the proxy continues to read only `url`. */
763
+ link: z2.url().optional(),
779
764
  url: z2.url(),
780
765
  json_path: httpValueJsonPathSchema.optional()
781
766
  });
package/dist/lambda.mjs CHANGED
@@ -68971,25 +68971,8 @@ function date4(params) {
68971
68971
  }
68972
68972
 
68973
68973
  // packages/shared/src/duration.ts
68974
- var DURATION_PATTERN = /^(\d+)(ms|s|m|h)$/;
68975
- var UNIT_MILLIS = {
68976
- ms: 1,
68977
- s: 1e3,
68978
- m: 6e4,
68979
- h: 36e5
68980
- };
68981
- function parseDuration(value) {
68982
- const match2 = DURATION_PATTERN.exec(value);
68983
- if (!match2) return null;
68984
- const [, rawAmount, rawUnit] = match2;
68985
- if (rawAmount === void 0 || rawUnit === void 0) return null;
68986
- const amount = Number(rawAmount);
68987
- if (amount <= 0) return null;
68988
- return amount * UNIT_MILLIS[rawUnit];
68989
- }
68990
- var durationSchema = external_exports.string().refine((value) => parseDuration(value) !== null, {
68991
- message: 'must be a positive duration like "30s", "5m", or "1h"',
68992
- params: { constraint: 'Use a positive duration like "30s", "5m", or "1h".' }
68974
+ var durationSchema = external_exports.string().regex(/^[1-9][0-9]*(?:ms|s|m|h)$/, {
68975
+ message: 'must be a positive duration like "30s", "5m", or "1h"'
68993
68976
  }).brand();
68994
68977
 
68995
68978
  // packages/shared/src/board-config.ts
@@ -69009,6 +68992,8 @@ var httpValueFactSchema = external_exports.object({
69009
68992
  /** Stable address below the panel; labels and ordering may change without repointing it. */
69010
68993
  id: external_exports.string().min(1),
69011
68994
  label: external_exports.string().min(1),
68995
+ /** Public destination; the proxy continues to read only `url`. */
68996
+ link: external_exports.url().optional(),
69012
68997
  url: external_exports.url(),
69013
68998
  json_path: httpValueJsonPathSchema.optional()
69014
68999
  });
@@ -70629,7 +70614,13 @@ async function fetchHttpValueFact(args) {
70629
70614
  const fact = httpValueFact(args.panel, args.factId);
70630
70615
  if (!fact) throw new Error(`http-value fact "${args.factId}" is not configured`);
70631
70616
  return fetchHttpValue({
70632
- panel: { id: args.panel.id, type: "http-value", url: fact.url, json_path: fact.json_path },
70617
+ panel: {
70618
+ id: args.panel.id,
70619
+ type: "http-value",
70620
+ url: fact.url,
70621
+ json_path: fact.json_path,
70622
+ link: fact.link
70623
+ },
70633
70624
  requestHeaders: args.requestHeaders,
70634
70625
  fetcher: args.fetcher
70635
70626
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@continuous-excellence/ze-great-dashboard-aws",
3
- "version": "0.27.10",
3
+ "version": "0.27.12",
4
4
  "type": "module",
5
5
  "description": "AWS server runtime and CloudFormation deployment tooling for Ze Great Dashboard.",
6
6
  "keywords": [