@continuous-excellence/ze-great-dashboard-aws 0.30.3 → 0.30.4

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.
Files changed (2) hide show
  1. package/dist/lambda.mjs +40 -37
  2. package/package.json +2 -2
package/dist/lambda.mjs CHANGED
@@ -42395,36 +42395,38 @@ var require_Alias = __commonJS({
42395
42395
  if (node2.anchor === this.source)
42396
42396
  found = node2;
42397
42397
  }
42398
+ if (found && ctx) {
42399
+ const { anchors: anchors2, doc: doc2, maxAliasCount } = ctx;
42400
+ let data = anchors2.get(found);
42401
+ if (!data) {
42402
+ toJS.toJS(found, null, ctx);
42403
+ data = anchors2.get(found);
42404
+ }
42405
+ if (data?.res === void 0) {
42406
+ const msg = "This should not happen: Alias anchor was not resolved?";
42407
+ throw new ReferenceError(msg);
42408
+ }
42409
+ if (maxAliasCount >= 0) {
42410
+ data.count += 1;
42411
+ if (data.aliasCount === 0)
42412
+ data.aliasCount = getAliasCount(doc2, found, anchors2);
42413
+ if (data.count * data.aliasCount > maxAliasCount) {
42414
+ const msg = "Excessive alias count indicates a resource exhaustion attack";
42415
+ throw new ReferenceError(msg);
42416
+ }
42417
+ }
42418
+ }
42398
42419
  return found;
42399
42420
  }
42400
42421
  toJSON(_arg, ctx) {
42401
42422
  if (!ctx)
42402
42423
  return { source: this.source };
42403
- const { anchors: anchors2, doc, maxAliasCount } = ctx;
42404
- const source = this.resolve(doc, ctx);
42424
+ const source = this.resolve(ctx.doc, ctx);
42405
42425
  if (!source) {
42406
42426
  const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
42407
42427
  throw new ReferenceError(msg);
42408
42428
  }
42409
- let data = anchors2.get(source);
42410
- if (!data) {
42411
- toJS.toJS(source, null, ctx);
42412
- data = anchors2.get(source);
42413
- }
42414
- if (data?.res === void 0) {
42415
- const msg = "This should not happen: Alias anchor was not resolved?";
42416
- throw new ReferenceError(msg);
42417
- }
42418
- if (maxAliasCount >= 0) {
42419
- data.count += 1;
42420
- if (data.aliasCount === 0)
42421
- data.aliasCount = getAliasCount(doc, source, anchors2);
42422
- if (data.count * data.aliasCount > maxAliasCount) {
42423
- const msg = "Excessive alias count indicates a resource exhaustion attack";
42424
- throw new ReferenceError(msg);
42425
- }
42426
- }
42427
- return data.res;
42429
+ return ctx.anchors.get(source).res;
42428
42430
  }
42429
42431
  toString(ctx, _onComment, _onChompKeep) {
42430
42432
  const src = `*${this.source}`;
@@ -46426,37 +46428,38 @@ var require_resolve_flow_scalar = __commonJS({
46426
46428
  }
46427
46429
  if (badChar)
46428
46430
  onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
46429
- return foldLines(source);
46431
+ return unfoldLines(source);
46430
46432
  }
46431
46433
  function singleQuotedValue(source, onError) {
46432
46434
  if (source[source.length - 1] !== "'" || source.length === 1)
46433
46435
  onError(source.length, "MISSING_CHAR", "Missing closing 'quote");
46434
- return foldLines(source.slice(1, -1)).replace(/''/g, "'");
46436
+ return unfoldLines(source.slice(1, -1)).replace(/''/g, "'");
46435
46437
  }
46436
- function foldLines(source) {
46437
- let first, line;
46438
+ function unfoldLines(source) {
46439
+ const line = /(.*?)\r?\n/sy;
46440
+ let match2 = line.exec(source);
46441
+ if (!match2)
46442
+ return source;
46443
+ let trimEnd, trimBoth;
46438
46444
  try {
46439
- first = new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
46440
- line = new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
46445
+ trimEnd = new RegExp("(?<![ ])[ ]+$");
46446
+ trimBoth = new RegExp("^[ ]+|(?<![ ])[ ]+$", "g");
46441
46447
  } catch {
46442
- first = /(.*?)[ \t]*\r?\n/sy;
46443
- line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
46448
+ trimEnd = /[ \t]+$/;
46449
+ trimBoth = /^[ \t]+|[ \t]+$/g;
46444
46450
  }
46445
- let match2 = first.exec(source);
46446
- if (!match2)
46447
- return source;
46448
- let res = match2[1];
46451
+ let res = match2[1].replace(trimEnd, "");
46449
46452
  let sep2 = " ";
46450
- let pos2 = first.lastIndex;
46451
- line.lastIndex = pos2;
46453
+ let pos2 = line.lastIndex;
46452
46454
  while (match2 = line.exec(source)) {
46453
- if (match2[1] === "") {
46455
+ const lm = match2[1].replace(trimBoth, "");
46456
+ if (lm === "") {
46454
46457
  if (sep2 === "\n")
46455
46458
  res += sep2;
46456
46459
  else
46457
46460
  sep2 = "\n";
46458
46461
  } else {
46459
- res += sep2 + match2[1];
46462
+ res += sep2 + lm;
46460
46463
  sep2 = " ";
46461
46464
  }
46462
46465
  pos2 = line.lastIndex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@continuous-excellence/ze-great-dashboard-aws",
3
- "version": "0.30.3",
3
+ "version": "0.30.4",
4
4
  "type": "module",
5
5
  "description": "AWS server runtime and CloudFormation deployment tooling for Ze Great Dashboard.",
6
6
  "keywords": [
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "fflate": "^0.8.3",
38
- "yaml": "^2.9.0",
38
+ "yaml": "^2.9.1",
39
39
  "zod": "^4.6.2"
40
40
  },
41
41
  "devDependencies": {