@diagonal-hq/cli 0.33.6 → 0.33.7

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/cli.mjs +8 -5
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -308518,11 +308518,8 @@ function buildRedirects(ast, domains) {
308518
308518
  const { value, nodes } = staticObject(definition, { domains });
308519
308519
  return Object.entries(value).map(([key, redirect]) => {
308520
308520
  const node = nodes[key];
308521
- if (key.length > KEY_MAX_LENGTH2 || !KEY_PATTERN2.test(key)) {
308522
- throw new SourceError(
308523
- `The redirect key "${key}" must start with a lower-case letter and contain only letters and digits, at most ${KEY_MAX_LENGTH2} characters, such as oldMembers`,
308524
- node.key
308525
- );
308521
+ if (!isRedirectKey(key)) {
308522
+ throw new SourceError(redirectKeyMessage(key), node.key);
308526
308523
  }
308527
308524
  if (!isPlainObject2(redirect)) {
308528
308525
  throw new SourceError(`The redirect "${key}" must be an object with "from", "to", and "status"`, node);
@@ -308626,6 +308623,12 @@ function refuseUnknownOptions(value, options, node, owner) {
308626
308623
  }
308627
308624
  }
308628
308625
  }
308626
+ function isRedirectKey(key) {
308627
+ return key.length <= KEY_MAX_LENGTH2 && KEY_PATTERN2.test(key);
308628
+ }
308629
+ function redirectKeyMessage(key) {
308630
+ return `The redirect key "${key}" must start with a lower-case letter and contain only letters and digits, at most ${KEY_MAX_LENGTH2} characters, such as oldMembers`;
308631
+ }
308629
308632
 
308630
308633
  // scripts/lib/runtime-build/migrations.mjs
308631
308634
  init_define_globalThis_DIAGONAL_SDK_RUNTIME();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagonal-hq/cli",
3
- "version": "0.33.6",
3
+ "version": "0.33.7",
4
4
  "description": "The diagonal CLI and the configuration helpers for file-based Diagonal workspaces.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {