@molecule/api-mock-server 1.0.0
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/LICENSE +115 -0
- package/README.md +853 -0
- package/dist/browser-guard.d.ts +2 -0
- package/dist/browser-guard.d.ts.map +1 -0
- package/dist/browser-guard.js +19 -0
- package/dist/browser-guard.js.map +1 -0
- package/dist/cli.d.ts +11 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +152 -0
- package/dist/cli.js.map +1 -0
- package/dist/fixtures/app-fixtures.d.ts +54 -0
- package/dist/fixtures/app-fixtures.d.ts.map +1 -0
- package/dist/fixtures/app-fixtures.js +601 -0
- package/dist/fixtures/app-fixtures.js.map +1 -0
- package/dist/fixtures/index.d.ts +9 -0
- package/dist/fixtures/index.d.ts.map +1 -0
- package/dist/fixtures/index.js +9 -0
- package/dist/fixtures/index.js.map +1 -0
- package/dist/fixtures/seed.d.ts +74 -0
- package/dist/fixtures/seed.d.ts.map +1 -0
- package/dist/fixtures/seed.js +112 -0
- package/dist/fixtures/seed.js.map +1 -0
- package/dist/fixtures/semantic-generator.d.ts +20 -0
- package/dist/fixtures/semantic-generator.d.ts.map +1 -0
- package/dist/fixtures/semantic-generator.js +539 -0
- package/dist/fixtures/semantic-generator.js.map +1 -0
- package/dist/fixtures/zod-walker.d.ts +34 -0
- package/dist/fixtures/zod-walker.d.ts.map +1 -0
- package/dist/fixtures/zod-walker.js +183 -0
- package/dist/fixtures/zod-walker.js.map +1 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +78 -0
- package/dist/index.js.map +1 -0
- package/dist/scanner/index.d.ts +6 -0
- package/dist/scanner/index.d.ts.map +1 -0
- package/dist/scanner/index.js +6 -0
- package/dist/scanner/index.js.map +1 -0
- package/dist/scanner/scanner.d.ts +21 -0
- package/dist/scanner/scanner.d.ts.map +1 -0
- package/dist/scanner/scanner.js +463 -0
- package/dist/scanner/scanner.js.map +1 -0
- package/dist/server/index.d.ts +7 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +7 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/middleware.d.ts +51 -0
- package/dist/server/middleware.d.ts.map +1 -0
- package/dist/server/middleware.js +124 -0
- package/dist/server/middleware.js.map +1 -0
- package/dist/server/server.d.ts +29 -0
- package/dist/server/server.d.ts.map +1 -0
- package/dist/server/server.js +314 -0
- package/dist/server/server.js.map +1 -0
- package/dist/states/index.d.ts +6 -0
- package/dist/states/index.d.ts.map +1 -0
- package/dist/states/index.js +6 -0
- package/dist/states/index.js.map +1 -0
- package/dist/states/states.d.ts +57 -0
- package/dist/states/states.d.ts.map +1 -0
- package/dist/states/states.js +89 -0
- package/dist/states/states.js.map +1 -0
- package/dist/types.d.ts +214 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fixture loading from JSON files in a directory.
|
|
3
|
+
* Each JSON file becomes a resource or endpoint group.
|
|
4
|
+
* No hardcoded app-specific data — all data lives in template fixture directories.
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
7
|
+
import { basename, join } from 'node:path';
|
|
8
|
+
import { createSeededRandom, randomInt, recentDate, seededUUID, seedFromPath } from './seed.js';
|
|
9
|
+
import { applySemanticRules } from './semantic-generator.js';
|
|
10
|
+
/* ------------------------------------------------------------------ */
|
|
11
|
+
/* Single-object response synthesis */
|
|
12
|
+
/* ------------------------------------------------------------------ */
|
|
13
|
+
/** Field names that should resolve to an array of records (top-N lists, recent activity, etc.). */
|
|
14
|
+
const ARRAY_FIELD_RE = /^(points|items|data|results|rows|recent|top|history|entries|list|series|breakdown|timeline|activity|feed|chart|buckets|labels|datasets|trend|trends|posts|orders|transactions|events|notifications|messages|members|users|categories|tags|reviews|sessions|logs)/i;
|
|
15
|
+
/** Field names that are a time/value series for a chart (one point per day). */
|
|
16
|
+
const CHART_SERIES_RE = /^(points|series|trend|trends|history|timeline|chart|chartData|graph|daily|weekly|monthly|overTime|byDay)/i;
|
|
17
|
+
/**
|
|
18
|
+
* Build a small array of generic records. Each record carries a grab-bag of
|
|
19
|
+
* the most common field names so whatever a list/chart component reads, it
|
|
20
|
+
* finds a plausible value rather than `undefined`.
|
|
21
|
+
* @param field
|
|
22
|
+
* @param rng
|
|
23
|
+
*/
|
|
24
|
+
function generateRecordArray(field, rng) {
|
|
25
|
+
const isChart = CHART_SERIES_RE.test(field);
|
|
26
|
+
const count = isChart ? 7 : 5;
|
|
27
|
+
const out = [];
|
|
28
|
+
for (let i = 0; i < count; i++) {
|
|
29
|
+
if (isChart) {
|
|
30
|
+
const v = randomInt(rng, 20, 4000);
|
|
31
|
+
const d = new Date(Date.UTC(2026, 3, 16 - (count - 1 - i)));
|
|
32
|
+
out.push({
|
|
33
|
+
date: d.toISOString().slice(0, 10),
|
|
34
|
+
label: d.toISOString().slice(5, 10),
|
|
35
|
+
value: v,
|
|
36
|
+
views: v,
|
|
37
|
+
count: v,
|
|
38
|
+
amount: v,
|
|
39
|
+
total: v,
|
|
40
|
+
revenue: v,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const n = randomInt(rng, 10, 9000);
|
|
45
|
+
out.push({
|
|
46
|
+
id: seededUUID(rng),
|
|
47
|
+
title: `Sample ${field} ${i + 1}`,
|
|
48
|
+
name: `Sample ${field} ${i + 1}`,
|
|
49
|
+
label: `Item ${i + 1}`,
|
|
50
|
+
status: 'published',
|
|
51
|
+
date: recentDate(rng),
|
|
52
|
+
createdAt: recentDate(rng),
|
|
53
|
+
views: n,
|
|
54
|
+
count: n,
|
|
55
|
+
value: n,
|
|
56
|
+
amount: n,
|
|
57
|
+
total: n,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return out;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Synthesize a realistic value for a single response field, by name.
|
|
65
|
+
* Array-ish names yield a small array of generic records (chart points or
|
|
66
|
+
* list rows); everything else goes through the semantic rules with
|
|
67
|
+
* type-flavoured fallbacks.
|
|
68
|
+
* @param field
|
|
69
|
+
* @param rng
|
|
70
|
+
* @param index
|
|
71
|
+
*/
|
|
72
|
+
function generateFieldValue(field, rng, index) {
|
|
73
|
+
if (ARRAY_FIELD_RE.test(field))
|
|
74
|
+
return generateRecordArray(field, rng);
|
|
75
|
+
const semantic = applySemanticRules(field, rng, index);
|
|
76
|
+
if (semantic !== undefined)
|
|
77
|
+
return semantic;
|
|
78
|
+
if (/(_id$|^id$)/i.test(field))
|
|
79
|
+
return seededUUID(rng);
|
|
80
|
+
if (/(at$|date$|_date|timestamp)/i.test(field))
|
|
81
|
+
return recentDate(rng);
|
|
82
|
+
if (/^(is|has|can|show|enable|enabled|allow|allowed)[A-Z]?|active$|visible$|verified$|public$/i.test(field)) {
|
|
83
|
+
return rng() > 0.5;
|
|
84
|
+
}
|
|
85
|
+
if (/(url$|link$|image$|avatar$|icon$|photo$)/i.test(field)) {
|
|
86
|
+
return `https://picsum.photos/seed/${index}/400/400`;
|
|
87
|
+
}
|
|
88
|
+
if (/(name|title|label|slug|description|bio|message|summary|text|subject|note|headline)$/i.test(field)) {
|
|
89
|
+
return `Sample ${field}`;
|
|
90
|
+
}
|
|
91
|
+
if (/(theme|mode|status|state|type|tier|plan|role|level|visibility)$/i.test(field)) {
|
|
92
|
+
return 'active';
|
|
93
|
+
}
|
|
94
|
+
// Nested-object fields (preferences, settings, metadata, …) — `{}` is the
|
|
95
|
+
// safe shape; callers read sub-keys with optional chaining + defaults.
|
|
96
|
+
if (/(preferences|settings|config|metadata|^meta$|options|oauthdata|profile|address|location)$/i.test(field)) {
|
|
97
|
+
return {};
|
|
98
|
+
}
|
|
99
|
+
// Dashboard/analytics fields are overwhelmingly numeric — default to a count.
|
|
100
|
+
return randomInt(rng, 1, 1200);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Build a single-object success response from a list of field names
|
|
104
|
+
* discovered by the handler scanner (`res.json({ a, b, c })`).
|
|
105
|
+
* @param fields
|
|
106
|
+
* @param appType
|
|
107
|
+
* @param path
|
|
108
|
+
*/
|
|
109
|
+
function synthesizeSingleObject(fields, appType, path) {
|
|
110
|
+
const rng = createSeededRandom(seedFromPath(appType, path));
|
|
111
|
+
const obj = {};
|
|
112
|
+
fields.forEach((f, i) => {
|
|
113
|
+
obj[f] = generateFieldValue(f, rng, i);
|
|
114
|
+
});
|
|
115
|
+
return obj;
|
|
116
|
+
}
|
|
117
|
+
/* ================================================================== */
|
|
118
|
+
/* Directory-based fixture loading */
|
|
119
|
+
/* ================================================================== */
|
|
120
|
+
/**
|
|
121
|
+
* Load an AppDataPool from a directory of JSON fixture files.
|
|
122
|
+
*
|
|
123
|
+
* File naming conventions:
|
|
124
|
+
* - Array files (e.g. `products.json` containing `[...]`) become CRUD resources
|
|
125
|
+
* - Object files (e.g. `reports.json` containing `{key: ...}`) become sub-endpoint groups
|
|
126
|
+
* where each key maps to a GET endpoint
|
|
127
|
+
*
|
|
128
|
+
* Special filenames are treated as report/sub-endpoint groups (object shape expected):
|
|
129
|
+
* `reports.json`, `storefront.json`, `admin.json`
|
|
130
|
+
*
|
|
131
|
+
* All other files are treated as array resources by default.
|
|
132
|
+
*
|
|
133
|
+
* @param fixturesDir - Absolute path to the fixtures directory
|
|
134
|
+
* @param appType - App type label (for the returned pool metadata)
|
|
135
|
+
* @returns An AppDataPool, or undefined if the directory doesn't exist or is empty
|
|
136
|
+
*/
|
|
137
|
+
export function loadFixturesFromDirectory(fixturesDir, appType) {
|
|
138
|
+
if (!existsSync(fixturesDir))
|
|
139
|
+
return undefined;
|
|
140
|
+
const files = readdirSync(fixturesDir).filter((f) => f.endsWith('.json'));
|
|
141
|
+
if (files.length === 0)
|
|
142
|
+
return undefined;
|
|
143
|
+
const resources = {};
|
|
144
|
+
const reports = {};
|
|
145
|
+
// Filenames that are always treated as sub-endpoint groups (object with key → data)
|
|
146
|
+
const subEndpointFiles = new Set(['reports', 'storefront', 'admin']);
|
|
147
|
+
// Sub-endpoint files where arrays become CRUD resources (not just GET endpoints)
|
|
148
|
+
const crudSubEndpointFiles = new Set(['admin']);
|
|
149
|
+
for (const file of files) {
|
|
150
|
+
const name = basename(file, '.json');
|
|
151
|
+
const raw = readFileSync(join(fixturesDir, file), 'utf-8');
|
|
152
|
+
let data;
|
|
153
|
+
try {
|
|
154
|
+
data = JSON.parse(raw);
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
// A bare SyntaxError ("Unexpected token } at position 47") doesn't say
|
|
158
|
+
// WHICH of the fixture files is malformed — name it.
|
|
159
|
+
throw new Error(`Invalid JSON in fixture file ${join(fixturesDir, file)}: ${error.message}`, { cause: error });
|
|
160
|
+
}
|
|
161
|
+
if (Array.isArray(data)) {
|
|
162
|
+
// Array → CRUD resource
|
|
163
|
+
resources[name] = data;
|
|
164
|
+
}
|
|
165
|
+
else if (typeof data === 'object' && data !== null) {
|
|
166
|
+
if (subEndpointFiles.has(name)) {
|
|
167
|
+
// Known sub-endpoint group: each key becomes a report/custom endpoint or CRUD resource
|
|
168
|
+
for (const [key, value] of Object.entries(data)) {
|
|
169
|
+
const fullKey = `${name === 'reports' ? '' : name + '/'}${key}`.replace(/^\//, '');
|
|
170
|
+
if (Array.isArray(value) && crudSubEndpointFiles.has(name)) {
|
|
171
|
+
// Array values in CRUD sub-endpoint files → CRUD resources at /api/{name}/{key}
|
|
172
|
+
resources[fullKey] = value;
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
// Everything else → report-style GET endpoints (including arrays in reports/storefront)
|
|
176
|
+
reports[fullKey] = value;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
// Unknown object file — wrap as single-record resource array
|
|
182
|
+
resources[name] = [data];
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return {
|
|
187
|
+
appType,
|
|
188
|
+
resources,
|
|
189
|
+
reports: Object.keys(reports).length > 0 ? reports : undefined,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
/* ================================================================== */
|
|
193
|
+
/* Pool cache (keyed by fixturesDir path) */
|
|
194
|
+
/* ================================================================== */
|
|
195
|
+
const poolCache = new Map();
|
|
196
|
+
/**
|
|
197
|
+
* Cheap change-detection fingerprint for a fixtures directory: the sorted
|
|
198
|
+
* `*.json` file names with their mtime + size. Used to invalidate the pool
|
|
199
|
+
* cache — an unconditional path-keyed cache silently served STALE rows when a
|
|
200
|
+
* caller edited a fixture file and re-created the server in the same process.
|
|
201
|
+
* @param fixturesDir - Absolute path to the fixtures directory
|
|
202
|
+
*/
|
|
203
|
+
function fixturesFingerprint(fixturesDir) {
|
|
204
|
+
if (!existsSync(fixturesDir))
|
|
205
|
+
return '';
|
|
206
|
+
try {
|
|
207
|
+
return readdirSync(fixturesDir)
|
|
208
|
+
.filter((f) => f.endsWith('.json'))
|
|
209
|
+
.sort()
|
|
210
|
+
.map((f) => {
|
|
211
|
+
const stats = statSync(join(fixturesDir, f));
|
|
212
|
+
return `${f}:${stats.mtimeMs}:${stats.size}`;
|
|
213
|
+
})
|
|
214
|
+
.join('|');
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
// Listing/stat raced with a concurrent file change — return a
|
|
218
|
+
// never-matching fingerprint so the loader re-reads the directory (and
|
|
219
|
+
// surfaces any real filesystem error itself).
|
|
220
|
+
return `unstable:${Date.now()}:${error.message}`;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Get an AppDataPool for a fixtures directory, with fingerprint-validated
|
|
225
|
+
* caching: editing/adding/removing a `*.json` fixture file (mtime or size
|
|
226
|
+
* change) invalidates the cached pool, so a mock server re-created in the
|
|
227
|
+
* same process serves the fresh data instead of the first load.
|
|
228
|
+
* @param fixturesDir - Absolute path to the fixtures directory
|
|
229
|
+
* @param appType - App type label
|
|
230
|
+
* @returns The loaded pool, or undefined if directory missing/empty
|
|
231
|
+
*/
|
|
232
|
+
export function getAppDataPool(fixturesDir, appType) {
|
|
233
|
+
const key = `${appType}${fixturesDir}`;
|
|
234
|
+
const fingerprint = fixturesFingerprint(fixturesDir);
|
|
235
|
+
const cached = poolCache.get(key);
|
|
236
|
+
if (cached && cached.fingerprint === fingerprint)
|
|
237
|
+
return cached.pool;
|
|
238
|
+
const pool = loadFixturesFromDirectory(fixturesDir, appType);
|
|
239
|
+
if (pool)
|
|
240
|
+
poolCache.set(key, { fingerprint, pool });
|
|
241
|
+
else
|
|
242
|
+
poolCache.delete(key);
|
|
243
|
+
return pool;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Build a complete fixture set for an app type by combining
|
|
247
|
+
* data pool records with endpoint definitions.
|
|
248
|
+
* @param appType - The app type
|
|
249
|
+
* @param endpoints - The discovered endpoints from scanning
|
|
250
|
+
* @param fixturesDir - Path to the fixtures directory
|
|
251
|
+
* @returns A complete fixture set, or undefined if no data available
|
|
252
|
+
*/
|
|
253
|
+
export function buildFixtureSet(appType, endpoints, fixturesDir) {
|
|
254
|
+
if (!fixturesDir)
|
|
255
|
+
return undefined;
|
|
256
|
+
const pool = getAppDataPool(fixturesDir, appType);
|
|
257
|
+
if (!pool)
|
|
258
|
+
return undefined;
|
|
259
|
+
const fixtureMap = new Map();
|
|
260
|
+
for (const endpoint of endpoints) {
|
|
261
|
+
const key = `${endpoint.method} ${endpoint.path}`;
|
|
262
|
+
const fixture = buildEndpointFixture(endpoint, pool);
|
|
263
|
+
fixtureMap.set(key, fixture);
|
|
264
|
+
}
|
|
265
|
+
return { appType, endpoints: fixtureMap };
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Build fixture data for a single endpoint based on the data pool.
|
|
269
|
+
* @param endpoint
|
|
270
|
+
* @param pool
|
|
271
|
+
*/
|
|
272
|
+
function buildEndpointFixture(endpoint, pool) {
|
|
273
|
+
const { method, path, responseHints } = endpoint;
|
|
274
|
+
const resourceName = responseHints.resourceName;
|
|
275
|
+
// Check for report endpoints first
|
|
276
|
+
if (pool.reports) {
|
|
277
|
+
// Match report paths like /reports/spending-by-category -> 'spending-by-category'
|
|
278
|
+
const reportMatch = path.match(/\/reports\/(.+)$/);
|
|
279
|
+
if (reportMatch) {
|
|
280
|
+
const reportKey = reportMatch[1];
|
|
281
|
+
if (pool.reports[reportKey]) {
|
|
282
|
+
return {
|
|
283
|
+
endpoint,
|
|
284
|
+
successResponse: pool.reports[reportKey],
|
|
285
|
+
emptyResponse: [],
|
|
286
|
+
errorResponse: { error: 'Internal server error' },
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
// Check storefront endpoints
|
|
291
|
+
const storefrontMatch = path.match(/\/storefront\/(.+)$/);
|
|
292
|
+
if (storefrontMatch) {
|
|
293
|
+
const key = storefrontMatch[1];
|
|
294
|
+
const fullKey = `storefront/${key}`;
|
|
295
|
+
if (pool.reports[fullKey]) {
|
|
296
|
+
return {
|
|
297
|
+
endpoint,
|
|
298
|
+
successResponse: pool.reports[fullKey],
|
|
299
|
+
emptyResponse: key === 'categories' ? [] : { data: [] },
|
|
300
|
+
errorResponse: { error: 'Internal server error' },
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
// Cart endpoint (special shape)
|
|
306
|
+
if (path.endsWith('/cart') && method === 'GET' && pool.reports?.['storefront/cart-summary']) {
|
|
307
|
+
return {
|
|
308
|
+
endpoint,
|
|
309
|
+
successResponse: pool.reports['storefront/cart-summary'],
|
|
310
|
+
emptyResponse: { items: [], subtotal: 0 },
|
|
311
|
+
errorResponse: { error: 'Internal server error' },
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
// Single-object endpoints — `res.json({ a, b, c })` with no fixture file
|
|
315
|
+
// (e.g. /analytics/summary, /profile/me). Synthesize a semantic object
|
|
316
|
+
// from the field names the scanner extracted, so dashboard KPI cards and
|
|
317
|
+
// detail panels render real values instead of zeros/empty states.
|
|
318
|
+
if (method === 'GET' &&
|
|
319
|
+
responseHints.isSingleObject &&
|
|
320
|
+
responseHints.responseFields &&
|
|
321
|
+
responseHints.responseFields.length > 0) {
|
|
322
|
+
return {
|
|
323
|
+
endpoint,
|
|
324
|
+
successResponse: synthesizeSingleObject(responseHints.responseFields, pool.appType, path),
|
|
325
|
+
emptyResponse: {},
|
|
326
|
+
errorResponse: { error: 'Internal server error' },
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
const records = pool.resources[resourceName] ?? pool.resources[resourceName + 's'] ?? [];
|
|
330
|
+
if (method === 'GET') {
|
|
331
|
+
if (path.includes(':id') || path.includes(':itemId') || path.includes(':productId')) {
|
|
332
|
+
// Single resource GET
|
|
333
|
+
const item = records[0] ?? {};
|
|
334
|
+
return {
|
|
335
|
+
endpoint,
|
|
336
|
+
successResponse: item,
|
|
337
|
+
emptyResponse: null,
|
|
338
|
+
errorResponse: { error: 'Internal server error' },
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
// List GET
|
|
342
|
+
if (responseHints.isPaginated) {
|
|
343
|
+
return {
|
|
344
|
+
endpoint,
|
|
345
|
+
successResponse: { data: records, total: records.length, page: 1, limit: 20 },
|
|
346
|
+
emptyResponse: { data: [], total: 0, page: 1, limit: 20 },
|
|
347
|
+
errorResponse: { error: 'Internal server error' },
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
return {
|
|
351
|
+
endpoint,
|
|
352
|
+
successResponse: records,
|
|
353
|
+
emptyResponse: [],
|
|
354
|
+
errorResponse: { error: 'Internal server error' },
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
if (method === 'POST') {
|
|
358
|
+
const created = records[0] ?? { id: 'new-id' };
|
|
359
|
+
return {
|
|
360
|
+
endpoint,
|
|
361
|
+
successResponse: created,
|
|
362
|
+
emptyResponse: created,
|
|
363
|
+
errorResponse: { error: 'Internal server error' },
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
if (method === 'PUT' || method === 'PATCH') {
|
|
367
|
+
const updated = records[0] ?? { id: 'updated-id' };
|
|
368
|
+
return {
|
|
369
|
+
endpoint,
|
|
370
|
+
successResponse: updated,
|
|
371
|
+
emptyResponse: updated,
|
|
372
|
+
errorResponse: { error: 'Internal server error' },
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
// DELETE
|
|
376
|
+
return {
|
|
377
|
+
endpoint,
|
|
378
|
+
successResponse: null,
|
|
379
|
+
emptyResponse: null,
|
|
380
|
+
errorResponse: { error: 'Internal server error' },
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Generate fixtures from a directory of JSON files without scanning handlers.
|
|
385
|
+
* Builds standard CRUD endpoints for each resource file and custom endpoints
|
|
386
|
+
* for each sub-endpoint group.
|
|
387
|
+
*
|
|
388
|
+
* @param fixturesDir - Absolute path to the fixtures directory
|
|
389
|
+
* @param appType - App type label (default: derived from directory name)
|
|
390
|
+
* @returns A fixture set with standard CRUD endpoints, or undefined if no data
|
|
391
|
+
*/
|
|
392
|
+
export function generateFixtures(fixturesDir, appType) {
|
|
393
|
+
const resolvedAppType = appType ?? basename(fixturesDir);
|
|
394
|
+
const pool = getAppDataPool(fixturesDir, resolvedAppType);
|
|
395
|
+
if (!pool)
|
|
396
|
+
return undefined;
|
|
397
|
+
const fixtureMap = new Map();
|
|
398
|
+
// Generate standard CRUD endpoints for each resource
|
|
399
|
+
for (const [resourceName, records] of Object.entries(pool.resources)) {
|
|
400
|
+
const basePath = `/api/${resourceName}`;
|
|
401
|
+
// Cart is special: UI expects { items, subtotal, shipping?, tax?, total? }
|
|
402
|
+
// not a flat list. Synthesize the envelope from line-item records so the
|
|
403
|
+
// existing fixture file (a flat array of cart-line records) drives both
|
|
404
|
+
// the cart and checkout pages without duplication.
|
|
405
|
+
if (resourceName === 'cart') {
|
|
406
|
+
const subtotal = records.reduce((sum, r) => {
|
|
407
|
+
const item = r;
|
|
408
|
+
const qty = typeof item.quantity === 'number' ? item.quantity : 1;
|
|
409
|
+
const product = item.product;
|
|
410
|
+
const price = product && typeof product.price === 'number' ? product.price : 0;
|
|
411
|
+
return sum + qty * price;
|
|
412
|
+
}, 0);
|
|
413
|
+
const shipping = subtotal > 0 ? 500 : 0;
|
|
414
|
+
const tax = Math.round(subtotal * 0.08);
|
|
415
|
+
const total = subtotal + shipping + tax;
|
|
416
|
+
const cartEnvelope = { items: records, subtotal, shipping, tax, total };
|
|
417
|
+
const cartEndpoint = {
|
|
418
|
+
method: 'GET',
|
|
419
|
+
path: basePath,
|
|
420
|
+
requiresAuth: true,
|
|
421
|
+
responseHints: {
|
|
422
|
+
isList: false,
|
|
423
|
+
isPaginated: false,
|
|
424
|
+
hasNestedResources: false,
|
|
425
|
+
resourceName,
|
|
426
|
+
},
|
|
427
|
+
};
|
|
428
|
+
fixtureMap.set(`GET ${basePath}`, {
|
|
429
|
+
endpoint: cartEndpoint,
|
|
430
|
+
successResponse: cartEnvelope,
|
|
431
|
+
emptyResponse: { items: [], subtotal: 0, shipping: 0, tax: 0, total: 0 },
|
|
432
|
+
errorResponse: { error: 'Internal server error' },
|
|
433
|
+
});
|
|
434
|
+
// Also expose mutation endpoints (POST add, DELETE clear, POST promo)
|
|
435
|
+
// so the cart page's add/remove/promo flows return reasonable shapes.
|
|
436
|
+
fixtureMap.set(`POST ${basePath}`, {
|
|
437
|
+
endpoint: {
|
|
438
|
+
method: 'POST',
|
|
439
|
+
path: basePath,
|
|
440
|
+
requiresAuth: true,
|
|
441
|
+
responseHints: {
|
|
442
|
+
isList: false,
|
|
443
|
+
isPaginated: false,
|
|
444
|
+
hasNestedResources: false,
|
|
445
|
+
resourceName,
|
|
446
|
+
},
|
|
447
|
+
},
|
|
448
|
+
successResponse: cartEnvelope,
|
|
449
|
+
emptyResponse: cartEnvelope,
|
|
450
|
+
errorResponse: { error: 'Internal server error' },
|
|
451
|
+
});
|
|
452
|
+
fixtureMap.set(`POST ${basePath}/promo`, {
|
|
453
|
+
endpoint: {
|
|
454
|
+
method: 'POST',
|
|
455
|
+
path: `${basePath}/promo`,
|
|
456
|
+
requiresAuth: true,
|
|
457
|
+
responseHints: {
|
|
458
|
+
isList: false,
|
|
459
|
+
isPaginated: false,
|
|
460
|
+
hasNestedResources: false,
|
|
461
|
+
resourceName,
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
successResponse: {
|
|
465
|
+
...cartEnvelope,
|
|
466
|
+
promoApplied: true,
|
|
467
|
+
discount: Math.round(subtotal * 0.1),
|
|
468
|
+
},
|
|
469
|
+
emptyResponse: cartEnvelope,
|
|
470
|
+
errorResponse: { error: 'Invalid promo code' },
|
|
471
|
+
});
|
|
472
|
+
fixtureMap.set(`DELETE ${basePath}/:id`, {
|
|
473
|
+
endpoint: {
|
|
474
|
+
method: 'DELETE',
|
|
475
|
+
path: `${basePath}/:id`,
|
|
476
|
+
requiresAuth: true,
|
|
477
|
+
responseHints: {
|
|
478
|
+
isList: false,
|
|
479
|
+
isPaginated: false,
|
|
480
|
+
hasNestedResources: false,
|
|
481
|
+
resourceName,
|
|
482
|
+
},
|
|
483
|
+
},
|
|
484
|
+
successResponse: { items: [], subtotal: 0, shipping: 0, tax: 0, total: 0 },
|
|
485
|
+
emptyResponse: { items: [], subtotal: 0, shipping: 0, tax: 0, total: 0 },
|
|
486
|
+
errorResponse: { error: 'Internal server error' },
|
|
487
|
+
});
|
|
488
|
+
continue;
|
|
489
|
+
}
|
|
490
|
+
// GET list — bare array by default. createMockServer reconciles this
|
|
491
|
+
// against the handler scanner: endpoints whose handler returns a
|
|
492
|
+
// `{ data: [...] }` envelope get re-wrapped (see reconcileListShapes).
|
|
493
|
+
const listEndpoint = {
|
|
494
|
+
method: 'GET',
|
|
495
|
+
path: basePath,
|
|
496
|
+
requiresAuth: true,
|
|
497
|
+
responseHints: { isList: true, isPaginated: false, hasNestedResources: false, resourceName },
|
|
498
|
+
};
|
|
499
|
+
fixtureMap.set(`GET ${basePath}`, {
|
|
500
|
+
endpoint: listEndpoint,
|
|
501
|
+
successResponse: records,
|
|
502
|
+
emptyResponse: [],
|
|
503
|
+
errorResponse: { error: 'Internal server error' },
|
|
504
|
+
});
|
|
505
|
+
// GET single
|
|
506
|
+
const singleEndpoint = {
|
|
507
|
+
method: 'GET',
|
|
508
|
+
path: `${basePath}/:id`,
|
|
509
|
+
requiresAuth: true,
|
|
510
|
+
responseHints: { isList: false, isPaginated: false, hasNestedResources: false, resourceName },
|
|
511
|
+
};
|
|
512
|
+
fixtureMap.set(`GET ${basePath}/:id`, {
|
|
513
|
+
endpoint: singleEndpoint,
|
|
514
|
+
successResponse: records[0] ?? {},
|
|
515
|
+
emptyResponse: null,
|
|
516
|
+
errorResponse: { error: 'Internal server error' },
|
|
517
|
+
});
|
|
518
|
+
// POST
|
|
519
|
+
const createEndpoint = {
|
|
520
|
+
method: 'POST',
|
|
521
|
+
path: basePath,
|
|
522
|
+
requiresAuth: true,
|
|
523
|
+
responseHints: { isList: false, isPaginated: false, hasNestedResources: false, resourceName },
|
|
524
|
+
};
|
|
525
|
+
fixtureMap.set(`POST ${basePath}`, {
|
|
526
|
+
endpoint: createEndpoint,
|
|
527
|
+
successResponse: records[0] ?? {},
|
|
528
|
+
emptyResponse: records[0] ?? {},
|
|
529
|
+
errorResponse: { error: 'Internal server error' },
|
|
530
|
+
});
|
|
531
|
+
// PUT
|
|
532
|
+
const updateEndpoint = {
|
|
533
|
+
method: 'PUT',
|
|
534
|
+
path: `${basePath}/:id`,
|
|
535
|
+
requiresAuth: true,
|
|
536
|
+
responseHints: { isList: false, isPaginated: false, hasNestedResources: false, resourceName },
|
|
537
|
+
};
|
|
538
|
+
fixtureMap.set(`PUT ${basePath}/:id`, {
|
|
539
|
+
endpoint: updateEndpoint,
|
|
540
|
+
successResponse: records[0] ?? {},
|
|
541
|
+
emptyResponse: records[0] ?? {},
|
|
542
|
+
errorResponse: { error: 'Internal server error' },
|
|
543
|
+
});
|
|
544
|
+
// PATCH — partial update, same fixture shape as PUT. Fleet template
|
|
545
|
+
// handlers use router.patch for profile/settings updates; without this
|
|
546
|
+
// endpoint a PATCH fell through to the unmatched catch-all and returned
|
|
547
|
+
// `{}`, so the page's update flow silently "succeeded" with no data.
|
|
548
|
+
const patchEndpoint = {
|
|
549
|
+
method: 'PATCH',
|
|
550
|
+
path: `${basePath}/:id`,
|
|
551
|
+
requiresAuth: true,
|
|
552
|
+
responseHints: { isList: false, isPaginated: false, hasNestedResources: false, resourceName },
|
|
553
|
+
};
|
|
554
|
+
fixtureMap.set(`PATCH ${basePath}/:id`, {
|
|
555
|
+
endpoint: patchEndpoint,
|
|
556
|
+
successResponse: records[0] ?? {},
|
|
557
|
+
emptyResponse: records[0] ?? {},
|
|
558
|
+
errorResponse: { error: 'Internal server error' },
|
|
559
|
+
});
|
|
560
|
+
// DELETE
|
|
561
|
+
const deleteEndpoint = {
|
|
562
|
+
method: 'DELETE',
|
|
563
|
+
path: `${basePath}/:id`,
|
|
564
|
+
requiresAuth: true,
|
|
565
|
+
responseHints: { isList: false, isPaginated: false, hasNestedResources: false, resourceName },
|
|
566
|
+
};
|
|
567
|
+
fixtureMap.set(`DELETE ${basePath}/:id`, {
|
|
568
|
+
endpoint: deleteEndpoint,
|
|
569
|
+
successResponse: null,
|
|
570
|
+
emptyResponse: null,
|
|
571
|
+
errorResponse: { error: 'Internal server error' },
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
// Add report/custom endpoints
|
|
575
|
+
if (pool.reports) {
|
|
576
|
+
for (const [reportKey, reportData] of Object.entries(pool.reports)) {
|
|
577
|
+
// If key contains '/' it's a custom path (e.g. 'admin/dashboard' -> /api/admin/dashboard)
|
|
578
|
+
// Otherwise it's a report (e.g. 'spending-by-category' -> /api/reports/spending-by-category)
|
|
579
|
+
const reportPath = reportKey.includes('/') ? `/api/${reportKey}` : `/api/reports/${reportKey}`;
|
|
580
|
+
const reportEndpoint = {
|
|
581
|
+
method: 'GET',
|
|
582
|
+
path: reportPath,
|
|
583
|
+
requiresAuth: true,
|
|
584
|
+
responseHints: {
|
|
585
|
+
isList: false,
|
|
586
|
+
isPaginated: false,
|
|
587
|
+
hasNestedResources: false,
|
|
588
|
+
resourceName: 'reports',
|
|
589
|
+
},
|
|
590
|
+
};
|
|
591
|
+
fixtureMap.set(`GET ${reportPath}`, {
|
|
592
|
+
endpoint: reportEndpoint,
|
|
593
|
+
successResponse: reportData,
|
|
594
|
+
emptyResponse: Array.isArray(reportData) ? [] : {},
|
|
595
|
+
errorResponse: { error: 'Internal server error' },
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
return { appType: resolvedAppType, endpoints: fixtureMap };
|
|
600
|
+
}
|
|
601
|
+
//# sourceMappingURL=app-fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-fixtures.js","sourceRoot":"","sources":["../../src/fixtures/app-fixtures.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACzE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAS1C,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AAExE,mGAAmG;AACnG,MAAM,cAAc,GAClB,mQAAmQ,CAAA;AAErQ,gFAAgF;AAChF,MAAM,eAAe,GACnB,2GAA2G,CAAA;AAE7G;;;;;;GAMG;AACH,SAAS,mBAAmB,CAA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AE,IAAI;gBAClB,aAAa,EAAE;oBACb,MAAM,EAAE,KAAK;oBACb,WAAW,EAAE,KAAK;oBAClB,kBAAkB,EAAE,KAAK;oBACzB,YAAY,EAAE,SAAS;iBACxB;aACF,CAAA;YACD,UAAU,CAAC,GAAG,CAAC,OAAO,UAAU,EAAE,EAAE;gBAClC,QAAQ,EAAE,cAAc;gBACxB,eAAe,EAAE,UAAU;gBAC3B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;gBAClD,aAAa,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE;aAClD,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,CAAA;AAC5D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fixture generation modules for deterministic, realistic test data.
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
export * from './app-fixtures.js';
|
|
6
|
+
export * from './seed.js';
|
|
7
|
+
export * from './semantic-generator.js';
|
|
8
|
+
export * from './zod-walker.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fixtures/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fixture generation modules for deterministic, realistic test data.
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
export * from './app-fixtures.js';
|
|
6
|
+
export * from './seed.js';
|
|
7
|
+
export * from './semantic-generator.js';
|
|
8
|
+
export * from './zod-walker.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fixtures/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA"}
|