test-bdk-cli 1.0.4 → 1.0.6
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/lib/package.js +13 -0
- package/package.json +2 -3
package/dist/lib/package.js
CHANGED
|
@@ -129,6 +129,19 @@ async function validatePkg(appPath) {
|
|
|
129
129
|
errors.push(`settings.fields[${fieldLabel}]: 'type' is required for each field object.`);
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
+
// ── Rule: settings.fields key uniqueness ──
|
|
133
|
+
const seenKeys = new Map();
|
|
134
|
+
settings.fields.forEach((field, index) => {
|
|
135
|
+
if (field && typeof field.key === 'string' && field.key.trim() !== '') {
|
|
136
|
+
const key = field.key.trim();
|
|
137
|
+
if (seenKeys.has(key)) {
|
|
138
|
+
errors.push(`settings.fields: duplicate key "${key}" found at index ${index} (first used at index ${seenKeys.get(key)}). Each field key must be unique.`);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
seenKeys.set(key, index);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
132
145
|
}
|
|
133
146
|
// ── Rule: enablePermission / enableReadPermission / enableWritePermission ──
|
|
134
147
|
// If enablePermission is true → at least one of enableReadPermission or enableWritePermission must be true.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "test-bdk-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "test CLI",
|
|
5
5
|
"author": "@BoldDesk",
|
|
6
6
|
"bin": {
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"npmRegistry": "https://registry.npmjs.org",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "tsc -p tsconfig.json",
|
|
13
|
-
"prepare": "tsc -p tsconfig.json",
|
|
12
|
+
"build": "npx tsc -p tsconfig.json",
|
|
14
13
|
"dev": "ts-node src/index.ts",
|
|
15
14
|
"start": "node dist/index.js",
|
|
16
15
|
"test": "jest"
|