@foro-sh/foro 0.2.0 → 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.
@@ -78,6 +78,27 @@ export declare const rawManifestCases: readonly [{
78
78
  readonly ok: false;
79
79
  readonly reason: "invalid_build_path";
80
80
  };
81
+ }, {
82
+ readonly name: "bad-build-path-shell-metachar";
83
+ readonly yaml: "name: my-server\nentrypoint: server.py\nbuild_path: \". && whoami\"\n";
84
+ readonly expect: {
85
+ readonly ok: false;
86
+ readonly reason: "invalid_build_path";
87
+ };
88
+ }, {
89
+ readonly name: "bad-build-path-space";
90
+ readonly yaml: "name: my-server\nentrypoint: server.py\nbuild_path: \"my services\"\n";
91
+ readonly expect: {
92
+ readonly ok: false;
93
+ readonly reason: "invalid_build_path";
94
+ };
95
+ }, {
96
+ readonly name: "bad-build-path-newline";
97
+ readonly yaml: "name: my-server\nentrypoint: server.py\nbuild_path: \"app\\nUSER root\"\n";
98
+ readonly expect: {
99
+ readonly ok: false;
100
+ readonly reason: "invalid_build_path";
101
+ };
81
102
  }, {
82
103
  readonly name: "bad-python-version";
83
104
  readonly yaml: "name: my-server\nentrypoint: server.py\npython_version: \"3.9\"\n";
@@ -141,5 +162,32 @@ export declare const rawManifestCases: readonly [{
141
162
  readonly ok: false;
142
163
  readonly reason: "invalid_shape";
143
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
+ };
144
192
  }];
145
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqKnB,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"}
@@ -93,6 +93,30 @@ export const rawManifestCases = [
93
93
  "reason": "invalid_build_path"
94
94
  }
95
95
  },
96
+ {
97
+ "name": "bad-build-path-shell-metachar",
98
+ "yaml": "name: my-server\nentrypoint: server.py\nbuild_path: \". && whoami\"\n",
99
+ "expect": {
100
+ "ok": false,
101
+ "reason": "invalid_build_path"
102
+ }
103
+ },
104
+ {
105
+ "name": "bad-build-path-space",
106
+ "yaml": "name: my-server\nentrypoint: server.py\nbuild_path: \"my services\"\n",
107
+ "expect": {
108
+ "ok": false,
109
+ "reason": "invalid_build_path"
110
+ }
111
+ },
112
+ {
113
+ "name": "bad-build-path-newline",
114
+ "yaml": "name: my-server\nentrypoint: server.py\nbuild_path: \"app\\nUSER root\"\n",
115
+ "expect": {
116
+ "ok": false,
117
+ "reason": "invalid_build_path"
118
+ }
119
+ },
96
120
  {
97
121
  "name": "bad-python-version",
98
122
  "yaml": "name: my-server\nentrypoint: server.py\npython_version: \"3.9\"\n",
@@ -164,5 +188,36 @@ export const rawManifestCases = [
164
188
  "ok": false,
165
189
  "reason": "invalid_shape"
166
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
+ }
167
222
  }
168
223
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foro-sh/foro",
3
- "version": "0.2.0",
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"
@@ -47,6 +48,7 @@
47
48
  "node": ">=18"
48
49
  },
49
50
  "devDependencies": {
51
+ "@types/node": "^20.11.0",
50
52
  "typescript": "^5.6.3"
51
53
  }
52
54
  }