@foro-sh/foro 0.9.2 → 0.9.3

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.
@@ -162,5 +162,32 @@ export declare const rawManifestCases: readonly [{
162
162
  readonly ok: false;
163
163
  readonly reason: "invalid_shape";
164
164
  };
165
+ }, {
166
+ readonly name: "bad-entrypoint-leading-dash";
167
+ readonly yaml: "name: my-server\nentrypoint: --isolated\n";
168
+ readonly expect: {
169
+ readonly ok: false;
170
+ readonly reason: "invalid_entrypoint";
171
+ };
172
+ }, {
173
+ readonly name: "bad-entrypoint-leading-dash-nested";
174
+ readonly yaml: "name: my-server\nentrypoint: src/-rf.py\n";
175
+ readonly expect: {
176
+ readonly ok: false;
177
+ readonly reason: "invalid_entrypoint";
178
+ };
179
+ }, {
180
+ readonly name: "bad-build-path-leading-dash";
181
+ readonly yaml: "name: my-server\nentrypoint: server.py\nbuild_path: -rf\n";
182
+ readonly expect: {
183
+ readonly ok: false;
184
+ readonly reason: "invalid_build_path";
185
+ };
186
+ }, {
187
+ readonly name: "hyphen-inside-a-path-segment-is-fine";
188
+ readonly yaml: "name: my-server\nentrypoint: my-tools/mcp-server.py\n";
189
+ readonly expect: {
190
+ readonly ok: true;
191
+ };
165
192
  }];
166
193
  //# sourceMappingURL=_generated-manifest-cases.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_generated-manifest-cases.d.ts","sourceRoot":"","sources":["../src/_generated-manifest-cases.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6LnB,CAAA"}
1
+ {"version":3,"file":"_generated-manifest-cases.d.ts","sourceRoot":"","sources":["../src/_generated-manifest-cases.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4NnB,CAAA"}
@@ -188,5 +188,36 @@ export const rawManifestCases = [
188
188
  "ok": false,
189
189
  "reason": "invalid_shape"
190
190
  }
191
+ },
192
+ {
193
+ "name": "bad-entrypoint-leading-dash",
194
+ "yaml": "name: my-server\nentrypoint: --isolated\n",
195
+ "expect": {
196
+ "ok": false,
197
+ "reason": "invalid_entrypoint"
198
+ }
199
+ },
200
+ {
201
+ "name": "bad-entrypoint-leading-dash-nested",
202
+ "yaml": "name: my-server\nentrypoint: src/-rf.py\n",
203
+ "expect": {
204
+ "ok": false,
205
+ "reason": "invalid_entrypoint"
206
+ }
207
+ },
208
+ {
209
+ "name": "bad-build-path-leading-dash",
210
+ "yaml": "name: my-server\nentrypoint: server.py\nbuild_path: -rf\n",
211
+ "expect": {
212
+ "ok": false,
213
+ "reason": "invalid_build_path"
214
+ }
215
+ },
216
+ {
217
+ "name": "hyphen-inside-a-path-segment-is-fine",
218
+ "yaml": "name: my-server\nentrypoint: my-tools/mcp-server.py\n",
219
+ "expect": {
220
+ "ok": true
221
+ }
191
222
  }
192
223
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foro-sh/foro",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "TypeScript SDK for Foro",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,12 +18,13 @@
18
18
  }
19
19
  },
20
20
  "files": [
21
- "dist"
21
+ "dist",
22
+ "!dist/**/*.test.*"
22
23
  ],
23
24
  "scripts": {
24
25
  "build": "node scripts/generate-manifest-cases.mjs && tsc -p tsconfig.json",
25
26
  "prepublishOnly": "npm run build",
26
- "test": "node --test dist/**/*.test.js"
27
+ "test": "node --test dist/*.test.js"
27
28
  },
28
29
  "publishConfig": {
29
30
  "access": "public"
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=manifest-cases.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"manifest-cases.test.d.ts","sourceRoot":"","sources":["../src/manifest-cases.test.ts"],"names":[],"mappings":""}
@@ -1,23 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import { test } from 'node:test';
3
- import { manifestCases } from './manifest-cases.js';
4
- // Sanity checks on the shared table itself - the generator
5
- // (scripts/generate-manifest-cases.mjs) already enforces these invariants at
6
- // build time, but that only runs when someone builds this package locally.
7
- // A real `.test.ts` here means CI catches a malformed table on every push,
8
- // not just when a maintainer happens to run `npm run build`.
9
- test('manifestCases is non-empty', () => {
10
- assert.ok(manifestCases.length > 0);
11
- });
12
- test('every case name is unique', () => {
13
- const names = manifestCases.map((c) => c.name);
14
- assert.equal(new Set(names).size, names.length);
15
- });
16
- test('every case has non-empty yaml and a well-formed expect', () => {
17
- for (const testCase of manifestCases) {
18
- assert.ok(testCase.yaml.length > 0, `${testCase.name}: empty yaml`);
19
- if (testCase.expect.ok)
20
- continue;
21
- assert.ok(typeof testCase.expect.reason === 'string' && testCase.expect.reason.length > 0, `${testCase.name}: missing rejection reason`);
22
- }
23
- });