@topogram/cli
Advanced tools
+1
-1
| { | ||
| "name": "@topogram/cli", | ||
| "version": "0.3.121", | ||
| "version": "0.3.122", | ||
| "description": "Topogram CLI for checking Topogram workspaces and generating app bundles.", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -14,3 +14,3 @@ // @ts-check | ||
| } from "./model-helpers.js"; | ||
| import { validatePortableIdentifier } from "./safe-values.js"; | ||
| import { validatePortableIdentifier, validateProjectedFieldName } from "./safe-values.js"; | ||
@@ -165,3 +165,3 @@ /** | ||
| const [fromItem, toItem] = items; | ||
| validatePortableIdentifier(errors, `Shape ${statement.id} rename target`, toItem.value, toItem.loc); | ||
| validateProjectedFieldName(errors, `Shape ${statement.id} rename target`, toItem.value, toItem.loc); | ||
@@ -168,0 +168,0 @@ if (!baseFieldSet.has(fromItem.value)) { |
@@ -10,2 +10,3 @@ // @ts-check | ||
| export const DOWNLOAD_FILENAME_PATTERN = /^[^/\\\x00-\x1F\x7F]+$/; | ||
| export const PROJECTED_FIELD_NAME_PATTERN = /^[a-z][A-Za-z0-9_]*$/; | ||
@@ -32,2 +33,15 @@ /** | ||
| */ | ||
| export function validateProjectedFieldName(errors, label, value, loc) { | ||
| if (!value || !PROJECTED_FIELD_NAME_PATTERN.test(value)) { | ||
| pushError(errors, `${label} '${value || ""}' must match ${PROJECTED_FIELD_NAME_PATTERN.source}`, loc); | ||
| } | ||
| } | ||
| /** | ||
| * @param {ValidationErrors} errors | ||
| * @param {string} label | ||
| * @param {string | null | undefined} value | ||
| * @param {TopogramLocation | null | undefined} loc | ||
| * @returns {void} | ||
| */ | ||
| export function validateHttpHeaderName(errors, label, value, loc) { | ||
@@ -34,0 +48,0 @@ if (value && !HTTP_HEADER_NAME_PATTERN.test(value)) { |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
4936475
0.01%120622
0.01%