@subbly/plugin-lint 0.0.4 → 0.0.5
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/rules.mjs +9 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@subbly/plugin-lint",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The Subbly marketplace release gate, offline. Lints marketplace.json, plugin manifests, mcp.json, skills, agents and automations.",
|
package/src/rules.mjs
CHANGED
|
@@ -51,6 +51,8 @@ export const DEFAULT_ENV_KEYS = [
|
|
|
51
51
|
'NEXT_PUBLIC_TERMS_CONDITIONS_URL',
|
|
52
52
|
]
|
|
53
53
|
|
|
54
|
+
const RESERVED_SLUG = 'custom'
|
|
55
|
+
|
|
54
56
|
const MISPLACED = ['agents', 'automations', 'scripts', 'instructions.md']
|
|
55
57
|
|
|
56
58
|
// The builder-maintained symlink to the installed version, the only stable
|
|
@@ -224,8 +226,13 @@ function lintMarketplaceManifest(root, report) {
|
|
|
224
226
|
|
|
225
227
|
let slug = null
|
|
226
228
|
if (check.string('marketplace/entry-slug', `${base}.slug`, entry.slug, { min: 1, max: 64, required: true })) {
|
|
227
|
-
if (
|
|
228
|
-
|
|
229
|
+
if (entry.slug === RESERVED_SLUG) {
|
|
230
|
+
report.error('marketplace/entry-slug', file, `${base}.slug: "${RESERVED_SLUG}" is reserved for user-created connectors and credentials`, at(`${base}.slug`))
|
|
231
|
+
} else if (SLUG_PATTERN.test(entry.slug)) {
|
|
232
|
+
slug = entry.slug
|
|
233
|
+
} else {
|
|
234
|
+
report.error('marketplace/entry-slug', file, `${base}.slug: ${SLUG_MESSAGE}`, at(`${base}.slug`))
|
|
235
|
+
}
|
|
229
236
|
}
|
|
230
237
|
|
|
231
238
|
if (slug) {
|