exisjs 0.9.1 → 0.10.0-alpha.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/README.md +3 -0
- package/bin/exis.js +76 -1
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +2 -1
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +16 -2
- package/dist/config/types.d.ts.map +1 -1
- package/dist/docs/content/README.md +1 -0
- package/dist/docs/content/cli/commands.mdx +23 -1
- package/dist/docs/content/cli/usage.mdx +2 -1
- package/dist/docs/content/config.mdx +50 -4
- package/dist/docs/content/deployment.mdx +163 -0
- package/dist/docs/content/installation.mdx +1 -1
- package/dist/docs/content/introduction.mdx +3 -0
- package/dist/docs/content/validation.mdx +34 -12
- package/dist/docs/reference/config.mdx +3 -1
- package/dist/docs/reference/sanitize.mdx +129 -134
- package/dist/docs/reference/validator.mdx +12 -3
- package/dist/internal.d.ts +16 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +45 -0
- package/dist/internal.js.map +1 -0
- package/dist/{cli → lib}/resolve-aliases.d.ts.map +1 -1
- package/dist/{cli → lib}/resolve-aliases.js.map +1 -1
- package/dist/lib/start-command.d.ts +11 -0
- package/dist/lib/start-command.d.ts.map +1 -0
- package/dist/lib/start-command.js +79 -0
- package/dist/lib/start-command.js.map +1 -0
- package/dist/lib/start-server.js +4 -2
- package/dist/lib/start-server.js.map +1 -1
- package/dist/middleware/backpressure.d.ts +5 -0
- package/dist/middleware/backpressure.d.ts.map +1 -1
- package/dist/middleware/backpressure.js +66 -36
- package/dist/middleware/backpressure.js.map +1 -1
- package/dist/router/route-scanner.d.ts +12 -4
- package/dist/router/route-scanner.d.ts.map +1 -1
- package/dist/router/route-scanner.js +65 -51
- package/dist/router/route-scanner.js.map +1 -1
- package/dist/sanitize/index.d.ts +29 -3
- package/dist/sanitize/index.d.ts.map +1 -1
- package/dist/sanitize/index.js +91 -32
- package/dist/sanitize/index.js.map +1 -1
- package/dist/server/adapters/bun-adapter.d.ts +1 -1
- package/dist/server/adapters/bun-adapter.d.ts.map +1 -1
- package/dist/server/adapters/bun-adapter.js.map +1 -1
- package/dist/server/app.d.ts.map +1 -1
- package/dist/server/app.js +24 -1
- package/dist/server/app.js.map +1 -1
- package/dist/server/bootstrapper.d.ts.map +1 -1
- package/dist/server/bootstrapper.js +4 -2
- package/dist/server/bootstrapper.js.map +1 -1
- package/dist/server/cluster.d.ts.map +1 -1
- package/dist/server/cluster.js +3 -0
- package/dist/server/cluster.js.map +1 -1
- package/dist/server/metrics.d.ts +43 -0
- package/dist/server/metrics.d.ts.map +1 -0
- package/dist/server/metrics.js +254 -0
- package/dist/server/metrics.js.map +1 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +31 -3
- package/dist/utils/logger.js.map +1 -1
- package/dist/validator/builder.d.ts +32 -17
- package/dist/validator/builder.d.ts.map +1 -1
- package/dist/validator/builder.js +84 -25
- package/dist/validator/builder.js.map +1 -1
- package/dist/validator/compile.d.ts +7 -2
- package/dist/validator/compile.d.ts.map +1 -1
- package/dist/validator/compile.js +85 -54
- package/dist/validator/compile.js.map +1 -1
- package/dist/validator/engine.d.ts +58 -7
- package/dist/validator/engine.d.ts.map +1 -1
- package/dist/validator/engine.js +436 -522
- package/dist/validator/engine.js.map +1 -1
- package/dist/validator/error.d.ts.map +1 -1
- package/dist/validator/error.js +7 -0
- package/dist/validator/error.js.map +1 -1
- package/dist/validator/index.d.ts +4 -1
- package/dist/validator/index.d.ts.map +1 -1
- package/dist/validator/index.js +5 -1
- package/dist/validator/index.js.map +1 -1
- package/dist/validator/rules.d.ts +66 -7
- package/dist/validator/rules.d.ts.map +1 -1
- package/dist/validator/rules.js +435 -109
- package/dist/validator/rules.js.map +1 -1
- package/dist/validator/tex-types.d.ts +15 -0
- package/dist/validator/tex-types.d.ts.map +1 -1
- package/dist/validator/tex-types.js +127 -64
- package/dist/validator/tex-types.js.map +1 -1
- package/dist/validator/tex.d.ts +1 -1
- package/dist/validator/tex.d.ts.map +1 -1
- package/dist/validator/text.d.ts +2 -0
- package/dist/validator/text.d.ts.map +1 -1
- package/dist/validator/text.js +31 -13
- package/dist/validator/text.js.map +1 -1
- package/dist/validator/types.d.ts +22 -0
- package/dist/validator/types.d.ts.map +1 -1
- package/package.json +81 -9
- package/dist/cli/commands/build.d.ts +0 -11
- package/dist/cli/commands/build.d.ts.map +0 -1
- package/dist/cli/commands/build.js +0 -344
- package/dist/cli/commands/build.js.map +0 -1
- package/dist/cli/commands/clean.d.ts +0 -5
- package/dist/cli/commands/clean.d.ts.map +0 -1
- package/dist/cli/commands/clean.js +0 -30
- package/dist/cli/commands/clean.js.map +0 -1
- package/dist/cli/commands/dev.d.ts +0 -21
- package/dist/cli/commands/dev.d.ts.map +0 -1
- package/dist/cli/commands/dev.js +0 -842
- package/dist/cli/commands/dev.js.map +0 -1
- package/dist/cli/commands/doctor.d.ts +0 -2
- package/dist/cli/commands/doctor.d.ts.map +0 -1
- package/dist/cli/commands/doctor.js +0 -228
- package/dist/cli/commands/doctor.js.map +0 -1
- package/dist/cli/commands/exports.d.ts +0 -2
- package/dist/cli/commands/exports.d.ts.map +0 -1
- package/dist/cli/commands/exports.js +0 -48
- package/dist/cli/commands/exports.js.map +0 -1
- package/dist/cli/commands/generate.d.ts +0 -33
- package/dist/cli/commands/generate.d.ts.map +0 -1
- package/dist/cli/commands/generate.js +0 -469
- package/dist/cli/commands/generate.js.map +0 -1
- package/dist/cli/commands/init.d.ts +0 -2
- package/dist/cli/commands/init.d.ts.map +0 -1
- package/dist/cli/commands/init.js +0 -37
- package/dist/cli/commands/init.js.map +0 -1
- package/dist/cli/commands/repl.d.ts +0 -6
- package/dist/cli/commands/repl.d.ts.map +0 -1
- package/dist/cli/commands/repl.js +0 -75
- package/dist/cli/commands/repl.js.map +0 -1
- package/dist/cli/commands/run.d.ts +0 -7
- package/dist/cli/commands/run.d.ts.map +0 -1
- package/dist/cli/commands/run.js +0 -101
- package/dist/cli/commands/run.js.map +0 -1
- package/dist/cli/commands/start.d.ts +0 -8
- package/dist/cli/commands/start.d.ts.map +0 -1
- package/dist/cli/commands/start.js +0 -155
- package/dist/cli/commands/start.js.map +0 -1
- package/dist/cli/commands/test.d.ts +0 -8
- package/dist/cli/commands/test.d.ts.map +0 -1
- package/dist/cli/commands/test.js +0 -165
- package/dist/cli/commands/test.js.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -268
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/manifest.d.ts +0 -4
- package/dist/cli/manifest.d.ts.map +0 -1
- package/dist/cli/manifest.js +0 -489
- package/dist/cli/manifest.js.map +0 -1
- package/dist/cli/routes.d.ts +0 -17
- package/dist/cli/routes.d.ts.map +0 -1
- package/dist/cli/routes.js +0 -317
- package/dist/cli/routes.js.map +0 -1
- package/dist/cli/utils.d.ts +0 -24
- package/dist/cli/utils.d.ts.map +0 -1
- package/dist/cli/utils.js +0 -54
- package/dist/cli/utils.js.map +0 -1
- package/dist/lib/inspect-routes.d.ts +0 -2
- package/dist/lib/inspect-routes.d.ts.map +0 -1
- package/dist/lib/inspect-routes.js +0 -150
- package/dist/lib/inspect-routes.js.map +0 -1
- package/dist/lib/start-repl.d.ts +0 -2
- package/dist/lib/start-repl.d.ts.map +0 -1
- package/dist/lib/start-repl.js +0 -120
- package/dist/lib/start-repl.js.map +0 -1
- package/dist/sanitize/sanitize.d.ts +0 -33
- package/dist/sanitize/sanitize.d.ts.map +0 -1
- package/dist/sanitize/sanitize.js +0 -104
- package/dist/sanitize/sanitize.js.map +0 -1
- /package/dist/{cli → lib}/resolve-aliases.d.ts +0 -0
- /package/dist/{cli → lib}/resolve-aliases.js +0 -0
|
@@ -45,15 +45,16 @@ ExisJS provides type-safe primitives that accept modifier options and configurat
|
|
|
45
45
|
|
|
46
46
|
| Primitive | Signature | Description |
|
|
47
47
|
| :--- | :--- | :--- |
|
|
48
|
-
| `tex.string()` | `tex.string(options?)` | Validates strings. Supports `{ min, max, trim, toLowerCase, toUpperCase, collapseWhitespace, escapeHtml, stripHtml, slugify, mask, preventSql, preventTraversal, coerce, default }`. |
|
|
49
|
-
| `tex.number()` | `tex.number(options?)` | Validates numbers. Supports `{ min, max, coerce, default }
|
|
50
|
-
| `tex.boolean()` | `tex.boolean(options?)` | Validates booleans. Supports `{ coerce, default }`. Coerces `"true"`, `"false"`, `"1"`, `"0"`. |
|
|
48
|
+
| `tex.string()` | `tex.string(options?)` | Validates strings. Supports `{ min, max, length, pattern, trim, toLowerCase, toUpperCase, collapseWhitespace, escapeHtml, stripHtml, slugify, mask, preventSql, preventTraversal, coerce, default }`. `pattern` is a `RegExp` checked after trimming and case changes. |
|
|
49
|
+
| `tex.number()` | `tex.number(options?)` | Validates finite numbers. Supports `{ int, min, max, coerce, default }`; `int: true` accepts whole numbers only. |
|
|
50
|
+
| `tex.boolean()` | `tex.boolean(options?)` | Validates booleans. Supports `{ coerce, default }`. Coerces `"true"`, `"false"`, `"1"`, `"0"` (any case, surrounding spaces ignored) and `1` / `0`. |
|
|
51
51
|
| `tex.email()` | `tex.email(options?)` | Validates RFC-compliant email formatting. Supports `{ trim, toLowerCase, mask, default }`. |
|
|
52
|
+
| `tex.url()` | `tex.url(options?)` | Validates absolute URLs. Only `http` and `https` unless `{ protocols: ['https'] }` says otherwise, so `javascript:` links are rejected. Supports `{ trim, min, max, pattern, default }`. |
|
|
52
53
|
| `tex.uuid()` | `tex.uuid(options?)` | Validates UUID strings. Supports `{ version: 1 \| 4, default }`. |
|
|
53
54
|
| `tex.cuid()` | `tex.cuid(options?)` | Validates CUID identifiers. Supports `{ default }`. |
|
|
54
55
|
| `tex.password()` | `tex.password(options?)` | Validates password complexity. Supports `{ min, max, requireNumbers, requireSymbols, requireUppercase, requireLowercase }`. |
|
|
55
56
|
| `tex.creditCard()` | `tex.creditCard(options?)` | Validates credit card numbers using the Luhn algorithm. Supports `{ mask: true }`. |
|
|
56
|
-
| `tex.date()` | `tex.date(options?)` | Validates
|
|
57
|
+
| `tex.date()` | `tex.date(options?)` | Validates a `Date`, a date string or a timestamp, with `{ coerce, minDate, maxDate, default }`. An unparsable value is rejected, and the parsed value is always a `Date` (`coerce` is accepted but no longer needed). |
|
|
57
58
|
| `tex.array()` | `tex.array(schema, options?)` | Validates arrays of items. Accepts primitive schemas, `tex.object(...)`, or shorthand `{ ... }`. Supports `{ min, max, dedupe, coerce, default }`. |
|
|
58
59
|
| `tex.enum()` | `tex.enum(values, options?)` | Validates against an allowed list of string literals. Supports `{ default }`. |
|
|
59
60
|
| `tex.literal()` | `tex.literal(value, options?)` | Validates against an exact primitive value (`string \| number \| boolean`). |
|
|
@@ -62,7 +63,7 @@ ExisJS provides type-safe primitives that accept modifier options and configurat
|
|
|
62
63
|
| `tex.record()` | `tex.record(valueSchema, options?)` | Validates dynamic key-value dictionaries (`Record<string, T>`). |
|
|
63
64
|
| `tex.any()` | `tex.any(options?)` | Pass-through validator without schema constraints. |
|
|
64
65
|
| `tex.file()` | `tex.file(options?)` | Validates multipart file uploads. Supports `{ maxSize, mimeTypes }`. |
|
|
65
|
-
| `tex.object()` | `tex.object(shape, options?)` | Compiles an object schema. Supports `{ strict
|
|
66
|
+
| `tex.object()` | `tex.object(shape, options?)` | Compiles an object schema. Supports `{ strict, optional, nullable, nullish }`: `strict: true` rejects unlisted keys; the others work as for fields when the object is nested. An unknown option throws. |
|
|
66
67
|
| `tex.coerce.*` | `tex.coerce.number() \| boolean() \| date() \| string()` | Explicit coercion namespace for query strings, route parameters, and form inputs. |
|
|
67
68
|
| `tex.pagination()` | `tex.pagination(options?)` | Predefined schema for `page`, `limit`, `sort`, and `order` query parameters. |
|
|
68
69
|
| `tex.env()` | `tex.env(shape, options?)` | Environment variable schema parser with automatic type coercion from string values. |
|
|
@@ -78,7 +79,7 @@ All primitive builders accept modifier options directly in their configuration a
|
|
|
78
79
|
| **Optional** | `{ optional: true }` | `.optional()` | Allows `undefined`. |
|
|
79
80
|
| **Nullable** | `{ nullable: true }` | `.nullable()` | Allows `null`. |
|
|
80
81
|
| **Nullish** | `{ nullish: true }` | `.nullish()` | Allows both `null` and `undefined`. |
|
|
81
|
-
| **Default** | `{ default: value \| () => value }` |
|
|
82
|
+
| **Default** | `{ default: value \| () => value }` | `.default(value)` | Used when the field is missing (or blank, for a form field). A client may omit the field, and after parsing it always has a value. Object and array defaults are copied, so parses never share them. |
|
|
82
83
|
|
|
83
84
|
```typescript filename="example.ts"
|
|
84
85
|
import { tex } from 'exisjs/validator'
|
|
@@ -92,6 +93,8 @@ const Schema = tex.object({
|
|
|
92
93
|
})
|
|
93
94
|
```
|
|
94
95
|
|
|
96
|
+
Every method returns a new schema, so a field schema can be shared between objects: `Name.optional()` in one object does not make `Name` optional anywhere else. `parse()` never modifies the object it is given; it returns a new one.
|
|
97
|
+
|
|
95
98
|
Nested object schemas take the same modifiers as methods: `.optional()`, `.nullable()` and `.nullish()`. A plain object literal is also a nested object:
|
|
96
99
|
|
|
97
100
|
```typescript filename="src/http/leads/schema.ts"
|
|
@@ -314,20 +317,27 @@ export function sanitizeTitle(input: string): string {
|
|
|
314
317
|
| Category | Function | Description |
|
|
315
318
|
| :--- | :--- | :--- |
|
|
316
319
|
| **Security** | `sanitize.escapeHtml(val)` | Escapes HTML entities (`&`, `<`, `>`, `"`, `'`). |
|
|
317
|
-
| **Security** | `sanitize.stripHtml(val)` | Removes
|
|
318
|
-
| **Security** | `sanitize.
|
|
319
|
-
| **Security** | `sanitize.
|
|
320
|
-
| **
|
|
320
|
+
| **Security** | `sanitize.stripHtml(val)` | Removes tags, comments, and `<script>` / `<style>` elements with their content. |
|
|
321
|
+
| **Security** | `sanitize.stripControlChars(val)` | Removes invisible control characters and bidirectional overrides. |
|
|
322
|
+
| **Security** | `sanitize.preventSql(val)` | Rejects common SQL injection probes (the field fails validation). |
|
|
323
|
+
| **Security** | `sanitize.preventTraversal(val)` | Rejects `..` path segments, also percent-encoded, and NUL bytes. |
|
|
324
|
+
| **Masking** | `sanitize.maskEmail(val)` | Masks email local-parts (e.g. `us***@example.com`). |
|
|
321
325
|
| **Masking** | `sanitize.maskString(val)` | Masks characters leaving only boundary characters visible. |
|
|
322
326
|
| **Formatting** | `sanitize.trim(val)` | Trims leading and trailing whitespace. |
|
|
323
327
|
| **Formatting** | `sanitize.toLowerCase(val)` | Converts string to lowercase. |
|
|
324
328
|
| **Formatting** | `sanitize.toUpperCase(val)` | Converts string to uppercase. |
|
|
325
329
|
| **Formatting** | `sanitize.collapseWhitespace(val)` | Replaces consecutive whitespace with a single space. |
|
|
326
330
|
| **Formatting** | `sanitize.slugify(val)` | Converts string into URL-friendly slug format. |
|
|
327
|
-
| **Formatting** | `sanitize.
|
|
331
|
+
| **Formatting** | `sanitize.normalizeEmail(val)` | Trims and lowercases an email address. |
|
|
332
|
+
| **Formatting** | `sanitize.truncate(length)(val)` | Truncates to `length` characters without splitting an emoji. |
|
|
333
|
+
| **Numbers** | `sanitize.round(decimals)(val)`, `sanitize.clamp(min, max)(val)` | Rounds; limits to a range. |
|
|
328
334
|
| **Arrays & Objects** | `sanitize.dedupe(array)` | Removes duplicate elements using a `Set`. |
|
|
329
335
|
| **Arrays & Objects** | `sanitize.compact(array)` | Removes `null`, `undefined`, and empty string values. |
|
|
330
|
-
| **Arrays & Objects** | `sanitize.
|
|
336
|
+
| **Arrays & Objects** | `sanitize.trimElements(array)`, `sanitize.limitLength(n)(array)` | Trims string items; keeps the first `n` items. |
|
|
337
|
+
| **Arrays & Objects** | `sanitize.pick(keys)(obj)`, `sanitize.omit(keys)(obj)` | Keeps or removes keys (`pick` ignores inherited keys). |
|
|
338
|
+
| **Arrays & Objects** | `sanitize.deepTrim(value)` | Trims every string in a nested object or array. |
|
|
339
|
+
|
|
340
|
+
Sanitizers run before the field's type check. One that throws, such as `preventSql`, fails that field with a `400` (code `SANITIZATION_FAILED`) instead of crashing the request.
|
|
331
341
|
|
|
332
342
|
---
|
|
333
343
|
|
|
@@ -353,6 +363,16 @@ export const RegisterSchema = tex.object({
|
|
|
353
363
|
})
|
|
354
364
|
```
|
|
355
365
|
|
|
366
|
+
A field's `.refine()` and `.sanitize()` run wherever the field is: in nested objects, array items and record values too. An object's `.refine(fn, { message, path })` runs once all its fields are valid and reports the error on `path`. `parseAsync()` (used for route validation) also runs `.refineAsync()` rules at every depth.
|
|
367
|
+
|
|
368
|
+
To handle failures without `try` / `catch`, use `safeParse()`:
|
|
369
|
+
|
|
370
|
+
```typescript
|
|
371
|
+
const result = RegisterSchema.safeParse(input)
|
|
372
|
+
if (!result.success) return { errors: result.errors } // [{ path, message, code, ... }]
|
|
373
|
+
const user = result.data
|
|
374
|
+
```
|
|
375
|
+
|
|
356
376
|
---
|
|
357
377
|
|
|
358
378
|
## Discriminated Unions (`tex.discriminatedUnion`)
|
|
@@ -646,6 +666,8 @@ When incoming requests fail validation, ExisJS returns an HTTP `400 Bad Request`
|
|
|
646
666
|
}
|
|
647
667
|
```
|
|
648
668
|
|
|
669
|
+
Every failing value is listed: each bad item of an array, each bad field of a nested object, up to 100 entries. Common `code` values: `MISSING_REQUIRED_FIELD`, `INVALID_TYPE`, `VALUE_TOO_SMALL`, `VALUE_TOO_LARGE`, `INVALID_LENGTH`, `INVALID_FORMAT` (pattern), `INVALID_EMAIL`, `INVALID_URL`, `INVALID_ENUM_VALUE`, `INVALID_DATE`, `DATE_TOO_EARLY`, `DATE_TOO_LATE`, `ARRAY_TOO_SHORT`, `ARRAY_TOO_LONG`, `UNRECOGNIZED_KEYS` (strict mode), `CUSTOM_VALIDATION` (`refine`), `SANITIZATION_FAILED`.
|
|
670
|
+
|
|
649
671
|
In development mode (`NODE_ENV=development`), ExisJS also outputs a tabular summary of the failed validation constraints to the terminal.
|
|
650
672
|
|
|
651
673
|
---
|
|
@@ -172,6 +172,7 @@ The root configuration schema accepted by `exis.config.ts`:
|
|
|
172
172
|
| `host` | `string` | `'0.0.0.0'` | Network interface binding. |
|
|
173
173
|
| `server` | `'auto' \| 'node' \| 'bun' \| 'uws'` | `'auto'` | HTTP server backend. Automatically selects Bun or Node when detected. |
|
|
174
174
|
| `cluster` | `{ workers?: number \| 'auto' \| 'safe' \| 'max' }` | `{ workers: 1 }` | Multi-process worker clustering. `'safe'` uses available CPU cores minus 1; `'max'` uses all available cores. |
|
|
175
|
+
| `queue` | `{ driver?: 'memory', maxConcurrent?, maxQueue?, timeoutMs? }` | not set | Limits concurrent requests per process; extra requests wait, then get `503`. Unknown keys or another driver stop the start. |
|
|
175
176
|
| `trustProxy` | `boolean \| number` | `false` | `true`: trust all proxy headers (`X-Forwarded-For`, `CF-Connecting-IP`, `True-Client-IP`, `X-Real-IP`). `N`: trust only the N closest hops in `X-Forwarded-For`, counting the socket peer; CDN headers are ignored. |
|
|
176
177
|
| `bodyLimit` | `number` | `10485760` (10MB) | Maximum payload size in bytes for JSON and URL-encoded request bodies. |
|
|
177
178
|
| `compression` | `boolean` | `false` | Enables gzip and Brotli response compression. |
|
|
@@ -195,7 +196,7 @@ The root configuration schema accepted by `exis.config.ts`:
|
|
|
195
196
|
| Property | Type | Default | Description |
|
|
196
197
|
| :--- | :--- | :--- | :--- |
|
|
197
198
|
| `telemetry` | `boolean \| TelemetryConfig` | `{ enabled: false, exporter: 'console' }` | OpenTelemetry tracing and span reporting (`'otlp'` or `'console'`). |
|
|
198
|
-
| `metrics` | `boolean \| MetricsConfig` | `{ enabled: false, path: '/metrics' }` | Prometheus-
|
|
199
|
+
| `metrics` | `boolean \| MetricsConfig` | `{ enabled: false, path: '/metrics' }` | Prometheus text-format endpoint: request counts and duration histograms by route pattern, in-flight requests, memory and event-loop lag; aggregated across cluster workers. |
|
|
199
200
|
| `healthcheck` | `boolean \| HealthCheckConfig` | `{ enabled: false, path: '/_health' }` | Liveness and readiness health probe route. |
|
|
200
201
|
| `docs` | `boolean \| SwaggerConfig` | `{ enabled: false, path: '/docs' }` | Interactive OpenAPI / Swagger UI documentation generation. |
|
|
201
202
|
|
|
@@ -299,6 +300,7 @@ export interface DevConfig {
|
|
|
299
300
|
binaryInterval?: number
|
|
300
301
|
extensions?: string[]
|
|
301
302
|
debounceMs?: number
|
|
303
|
+
lazyRoutes?: boolean // default true: load each route file on its first request
|
|
302
304
|
}
|
|
303
305
|
```
|
|
304
306
|
|
|
@@ -1,134 +1,129 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "exisjs/sanitize"
|
|
3
|
-
description: "API Reference for ExisJS data sanitization engine: string cleaners, safeSanitize, and object transformers."
|
|
4
|
-
nextUrl: "/docs/reference/swagger"
|
|
5
|
-
nextTitle: "Swagger Reference"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# `exisjs/sanitize`
|
|
9
|
-
|
|
10
|
-
The `exisjs/sanitize` module provides pure data sanitization functions for cleaning and normalizing input strings, numbers, dates, arrays, and complex objects before business logic execution. It includes security transforms for XSS escaping, HTML stripping, and basic SQL injection and path traversal probe detection.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Module Exports
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
import { sanitize } from 'exisjs/sanitize'
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## 1. Security Sanitizers
|
|
23
|
-
|
|
24
|
-
The SQL and path traversal checks reject common probe strings; they complement, and never replace, parameterized queries and resolved-path checks.
|
|
25
|
-
|
|
26
|
-
| Function | Signature | Description |
|
|
27
|
-
| :--- | :--- | :--- |
|
|
28
|
-
| `sanitize.escapeHtml` | `(val: string) => string` | Escapes `&`, `<`, `>`, `"`, and `'` into HTML
|
|
29
|
-
| `sanitize.stripHtml` | `(val: string) => string` |
|
|
30
|
-
| `sanitize.
|
|
31
|
-
| `sanitize.
|
|
32
|
-
| `sanitize.
|
|
33
|
-
| `sanitize.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
| `sanitize.
|
|
43
|
-
| `sanitize.
|
|
44
|
-
| `sanitize.
|
|
45
|
-
| `sanitize.
|
|
46
|
-
| `sanitize.
|
|
47
|
-
| `sanitize.
|
|
48
|
-
| `sanitize.
|
|
49
|
-
| `sanitize.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
| `sanitize.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
| `sanitize.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const step2 = sanitize.collapseWhitespace(step1)
|
|
131
|
-
const clean = sanitize.trim(step2)
|
|
132
|
-
return clean
|
|
133
|
-
}
|
|
134
|
-
```
|
|
1
|
+
---
|
|
2
|
+
title: "exisjs/sanitize"
|
|
3
|
+
description: "API Reference for ExisJS data sanitization engine: string cleaners, safeSanitize, and object transformers."
|
|
4
|
+
nextUrl: "/docs/reference/swagger"
|
|
5
|
+
nextTitle: "Swagger Reference"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# `exisjs/sanitize`
|
|
9
|
+
|
|
10
|
+
The `exisjs/sanitize` module provides pure data sanitization functions for cleaning and normalizing input strings, numbers, dates, arrays, and complex objects before business logic execution. It includes security transforms for XSS escaping, HTML stripping, and basic SQL injection and path traversal probe detection.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Module Exports
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { sanitize } from 'exisjs/sanitize'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. Security Sanitizers
|
|
23
|
+
|
|
24
|
+
The SQL and path traversal checks reject common probe strings; they complement, and never replace, parameterized queries and resolved-path checks. A sanitizer that throws inside `.sanitize()` becomes a `400` validation error for that field (code `SANITIZATION_FAILED`).
|
|
25
|
+
|
|
26
|
+
| Function | Signature | Description |
|
|
27
|
+
| :--- | :--- | :--- |
|
|
28
|
+
| `sanitize.escapeHtml` | `(val: string) => string` | Escapes `&`, `<`, `>`, `"`, and `'` into HTML entities. Use it for text shown in HTML. |
|
|
29
|
+
| `sanitize.stripHtml` | `(val: string) => string` | Removes tags, comments, and `<script>` / `<style>` elements with their content. A `<` that does not start a tag (`a < b`) is kept. |
|
|
30
|
+
| `sanitize.stripControlChars` | `(val: string) => string` | Removes invisible control characters (keeps tab and line breaks) and the bidirectional overrides used to disguise text. |
|
|
31
|
+
| `sanitize.preventSql` | `(val: string) => string` | Throws on common SQL injection probes (`' or 1=1`, `union select`, ...). |
|
|
32
|
+
| `sanitize.preventTraversal` | `(val: string) => string` | Throws on a `..` path segment (also `\` separators and percent-encoded forms such as `%2e%2e%2f`) and on NUL bytes. `report..final.pdf` is allowed. |
|
|
33
|
+
| `sanitize.maskEmail` | `(val: string) => string` | Obfuscates email addresses (e.g., `al***@example.com`). |
|
|
34
|
+
| `sanitize.maskString` | `(val: string) => string` | Keeps the first and last two characters (`ab****yz`). |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 2. Text & String Sanitizers
|
|
39
|
+
|
|
40
|
+
| Function | Signature | Description |
|
|
41
|
+
| :--- | :--- | :--- |
|
|
42
|
+
| `sanitize.trim` | `(val: string) => string` | Strips leading and trailing whitespace. |
|
|
43
|
+
| `sanitize.toLowerCase` | `(val: string) => string` | Converts all characters to lowercase. |
|
|
44
|
+
| `sanitize.toUpperCase` | `(val: string) => string` | Converts all characters to uppercase. |
|
|
45
|
+
| `sanitize.collapseWhitespace`| `(val: string) => string` | Collapses consecutive whitespace, tabs, and newlines into a single space. |
|
|
46
|
+
| `sanitize.normalizeUnicode` | `(val: string) => string` | Normalizes to Unicode NFC, so visually equal strings compare equal. |
|
|
47
|
+
| `sanitize.normalizeEmail` | `(val: string) => string` | Trims and lowercases an email address. |
|
|
48
|
+
| `sanitize.slugify` | `(val: string) => string` | URL-friendly slug; accented letters keep their base letter (`"Café Crème"` $ o$ `"cafe-creme"`). |
|
|
49
|
+
| `sanitize.truncate(length)` | `(length: number) => (val: string) => string` | Shortens to `length` characters without splitting an emoji in two. |
|
|
50
|
+
| `sanitize.removeNonAlphanumeric` | `(val: string) => string` | Strips all characters except ASCII letters and digits. |
|
|
51
|
+
| `sanitize.normalizeLineEndings` | `(val: string) => string` | Converts `
|
|
52
|
+
` and lone `
|
|
53
|
+
`. |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 3. Numbers
|
|
58
|
+
|
|
59
|
+
| Function | Signature | Description |
|
|
60
|
+
| :--- | :--- | :--- |
|
|
61
|
+
| `sanitize.round(decimals?)` | `(decimals = 0) => (val: number) => number` | Rounds to `decimals` places. |
|
|
62
|
+
| `sanitize.clamp(min, max)` | `(min: number, max: number) => (val: number) => number` | Constrains a number to `[min, max]`. |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 4. Arrays & Objects
|
|
67
|
+
|
|
68
|
+
### Array Transforms
|
|
69
|
+
|
|
70
|
+
| Function | Signature | Description |
|
|
71
|
+
| :--- | :--- | :--- |
|
|
72
|
+
| `sanitize.dedupe` | `<T>(val: T[]) => T[]` | Removes duplicate values preserving first-seen ordering. |
|
|
73
|
+
| `sanitize.compact` | `<T>(val: T[]) => T[]` | Removes `null`, `undefined`, and empty strings (`""`). |
|
|
74
|
+
| `sanitize.trimElements` | `(val: string[]) => string[]` | Trims every string item. |
|
|
75
|
+
| `sanitize.limitLength(n)` | `(length: number) => <T>(val: T[]) => T[]` | Keeps the first `length` items. |
|
|
76
|
+
|
|
77
|
+
### Object Transforms
|
|
78
|
+
|
|
79
|
+
| Function | Signature | Description |
|
|
80
|
+
| :--- | :--- | :--- |
|
|
81
|
+
| `sanitize.pick(keys)` | `<T, K extends keyof T>(keys: K[]) => (val: T) => Pick<T, K>` | Keeps only the listed keys the object itself has (never inherited ones such as `constructor`). |
|
|
82
|
+
| `sanitize.omit(keys)` | `<T, K extends keyof T>(keys: K[]) => (val: T) => Omit<T, K>` | Removes the listed keys. |
|
|
83
|
+
| `sanitize.deepTrim` | `<T>(val: T) => T` | Trims every string in a nested object or array. |
|
|
84
|
+
|
|
85
|
+
Every sanitizer passes values of another type through unchanged (a string sanitizer returns a number as is, an array sanitizer returns a non-array as is), so they are safe on optional and nullable fields.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 5. Integration with TexEngine Validation
|
|
90
|
+
|
|
91
|
+
Sanitizers integrate with `tex` validator chains using the `.sanitize()` modifier. Sanitization occurs **before** rule validation checks:
|
|
92
|
+
|
|
93
|
+
```typescript filename="src/http/articles/schema.ts"
|
|
94
|
+
import { tex } from 'exisjs/validator'
|
|
95
|
+
import { sanitize } from 'exisjs/sanitize'
|
|
96
|
+
|
|
97
|
+
export const CreateArticleSchema = tex.object({
|
|
98
|
+
title: tex
|
|
99
|
+
.string({ min: 5, max: 120 })
|
|
100
|
+
.sanitize(sanitize.trim, sanitize.collapseWhitespace),
|
|
101
|
+
|
|
102
|
+
slug: tex
|
|
103
|
+
.string()
|
|
104
|
+
.sanitize(sanitize.slugify),
|
|
105
|
+
|
|
106
|
+
content: tex
|
|
107
|
+
.string()
|
|
108
|
+
.sanitize(sanitize.stripHtml),
|
|
109
|
+
|
|
110
|
+
tags: tex
|
|
111
|
+
.array(tex.string())
|
|
112
|
+
.sanitize(sanitize.dedupe, sanitize.compact),
|
|
113
|
+
})
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 6. Standalone Usage Example
|
|
119
|
+
|
|
120
|
+
```typescript filename="src/services/import.service.ts"
|
|
121
|
+
import { sanitize } from 'exisjs/sanitize'
|
|
122
|
+
|
|
123
|
+
export function processUserInput(rawContent: string): string {
|
|
124
|
+
const step1 = sanitize.stripHtml(rawContent)
|
|
125
|
+
const step2 = sanitize.collapseWhitespace(step1)
|
|
126
|
+
const clean = sanitize.trim(step2)
|
|
127
|
+
return clean
|
|
128
|
+
}
|
|
129
|
+
```
|
|
@@ -39,6 +39,8 @@ import type {
|
|
|
39
39
|
TexFileOptions,
|
|
40
40
|
TexPasswordOptions,
|
|
41
41
|
TexObjectOptions,
|
|
42
|
+
TexUrlOptions,
|
|
43
|
+
SafeParseResult,
|
|
42
44
|
ValidationErrorDescriptor,
|
|
43
45
|
PaginationMeta,
|
|
44
46
|
PaginatedResult,
|
|
@@ -55,8 +57,9 @@ The `tex` instance exposes factory functions for all standard primitives, comple
|
|
|
55
57
|
|
|
56
58
|
| Method | Return Type | Options Interface | Description |
|
|
57
59
|
| :--- | :--- | :--- | :--- |
|
|
58
|
-
| `tex.string(options?)` | `TexType<string>` | `TexStringOptions` | String validation with trimming, HTML escaping, min/max
|
|
59
|
-
| `tex.number(options?)` | `TexType<number>` | `TexNumberOptions` | Number validation with optional string coercion (`coerce: true`) and min/max limits. |
|
|
60
|
+
| `tex.string(options?)` | `TexType<string>` | `TexStringOptions` | String validation with trimming, HTML escaping, min/max/exact `length`, `pattern` (RegExp), masking, coercion, and injection checks. |
|
|
61
|
+
| `tex.number(options?)` | `TexType<number>` | `TexNumberOptions` | Number validation with optional string coercion (`coerce: true`), whole numbers (`int: true`) and min/max limits. |
|
|
62
|
+
| `tex.url(options?)` | `TexType<string>` | `TexUrlOptions` | Absolute URL; `http` / `https` only unless `protocols` lists others. |
|
|
60
63
|
| `tex.boolean(options?)` | `TexType<boolean>` | `TexBooleanOptions` | Boolean validation with string/numeric coercion (`"true"`, `"1"` -> `true`). |
|
|
61
64
|
| `tex.email(options?)` | `TexType<string>` | `TexStringOptions` | Standard RFC 5322 email format validation. |
|
|
62
65
|
| `tex.uuid(options?)` | `TexType<string>` | `{ version?: 1 \| 4 }` | Validates UUID strings (v1 or v4). |
|
|
@@ -92,6 +95,8 @@ The `tex.coerce` namespace provides explicit coercion primitives for query param
|
|
|
92
95
|
|
|
93
96
|
Validates an object against a structured field schema.
|
|
94
97
|
|
|
98
|
+
Options: `strict` (reject keys not in the schema), and `optional`, `nullable`, `nullish` for an object used as a field (the same as calling `.optional()`, `.nullable()` or `.nullish()`). Any other option throws, so a misspelled option in plain JavaScript is not silently ignored.
|
|
99
|
+
|
|
95
100
|
```typescript
|
|
96
101
|
const UserSchema = tex.object({
|
|
97
102
|
id: tex.string(),
|
|
@@ -160,6 +165,8 @@ All `TexType` instances provide fluent modifier and documentation methods:
|
|
|
160
165
|
| `.transform(fn)` | `<Out>(fn: (val: T) => Out) => TexTransformed<Out>` | Applies a synchronous transformation to validated field data. |
|
|
161
166
|
| `.toOpenApi()` | `() => Record<string, any>` | Converts the type definition into an OpenAPI 3.1 schema object. |
|
|
162
167
|
|
|
168
|
+
Every method returns a new schema and leaves the original unchanged, so one field schema can be reused in several objects.
|
|
169
|
+
|
|
163
170
|
---
|
|
164
171
|
|
|
165
172
|
## `TexEngine` Schema Object Methods
|
|
@@ -176,10 +183,12 @@ All `TexType` instances provide fluent modifier and documentation methods:
|
|
|
176
183
|
| `omit(keys)` | `<K extends keyof T>(keys: K[]) => TexEngine<Omit<T, K>>` | Creates a new schema omitting the specified keys. |
|
|
177
184
|
| `extend(shape)` | `<E>(extension: E) => TexEngine<T & ResolveSchema<E>>` | Merges additional or overridden fields into the existing schema. |
|
|
178
185
|
| `merge(other)` | `<U>(other: TexEngine<U>) => TexEngine<T & U>` | Deeply merges two `TexEngine` schemas into a combined validator. |
|
|
186
|
+
| `refine(fn, opts?)` | `(fn: (data: T) => boolean, opts?: string \| { message?, path? }) => TexEngine<T>` | A check across fields, run once every field is valid; the error is reported on `path`. |
|
|
179
187
|
| `transform(fn)` | `<Out>(fn: (data: T) => Out) => TexTransformedEngine<T, Out>` | Applies post-validation data reshaping to the entire schema output. |
|
|
180
188
|
| `parse(data)` | `(data: unknown) => T` | Synchronously parses and validates data, throwing `ValidatorError` on failure. |
|
|
181
189
|
| `parseAsync(data)` | `(data: unknown) => Promise<T>` | Asynchronously parses and validates data, evaluating async refinements. |
|
|
182
|
-
| `safeParse(data)` | `(data: unknown) => { success: true, data: T } \| { success: false, error: ValidatorError }` | Validates data without throwing
|
|
190
|
+
| `safeParse(data)` | `(data: unknown) => { success: true, data: T } \| { success: false, errors, error: ValidatorError }` | Validates data without throwing; `errors` is the list of `{ path, message, code, ... }`. |
|
|
191
|
+
| `safeParseAsync(data)` | `(data: unknown) => Promise<SafeParseResult<T>>` | `safeParse` that also runs async refinements. |
|
|
183
192
|
| `toOpenApi()` | `() => Record<string, any>` | Translates the schema into an OpenAPI 3.1 JSON schema representation. |
|
|
184
193
|
|
|
185
194
|
---
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { loadConfig } from './config/config';
|
|
2
|
+
export { loadEnv, parseEnv } from './config/env';
|
|
3
|
+
export { App, setActiveAppInstance } from './server/app';
|
|
4
|
+
export { RouteScanner, routeParadigm, mixedParadigmMessage, } from './router/route-scanner';
|
|
5
|
+
export { describeAccess } from './router/authorize';
|
|
6
|
+
export { formatCliError, formatDevError } from './error/overlay';
|
|
7
|
+
export { registerPathAliasLoader, resolvePathAliases, } from './lib/resolve-aliases';
|
|
8
|
+
export { getFormattedTime } from './utils/time';
|
|
9
|
+
export { startBuiltServer, type StartOptions } from './lib/start-command';
|
|
10
|
+
/** The production server entry (`exisjs/start`) */
|
|
11
|
+
export declare const START_SERVER_PATH: string;
|
|
12
|
+
/** The `node:test` reporter used by `exisjs test` */
|
|
13
|
+
export declare const TEST_REPORTER_PATH: string;
|
|
14
|
+
/** The installed runtime version, which the CLI must match */
|
|
15
|
+
export declare const RUNTIME_VERSION: string;
|
|
16
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EACL,YAAY,EACZ,aAAa,EACb,oBAAoB,GACrB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEzE,mDAAmD;AACnD,eAAO,MAAM,iBAAiB,QAAiD,CAAA;AAE/E,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,QAI9B,CAAA;AAED,8DAA8D;AAE9D,eAAO,MAAM,eAAe,EAAE,MAA2C,CAAA"}
|
package/dist/internal.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.RUNTIME_VERSION = exports.TEST_REPORTER_PATH = exports.START_SERVER_PATH = exports.startBuiltServer = exports.getFormattedTime = exports.resolvePathAliases = exports.registerPathAliasLoader = exports.formatDevError = exports.formatCliError = exports.describeAccess = exports.mixedParadigmMessage = exports.routeParadigm = exports.RouteScanner = exports.setActiveAppInstance = exports.App = exports.parseEnv = exports.loadEnv = exports.loadConfig = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Runtime pieces used by `@exisjs/cli` (`exisjs/internal`).
|
|
9
|
+
*
|
|
10
|
+
* Not part of the public API: names and signatures may change in any
|
|
11
|
+
* release. The CLI is versioned together with this package.
|
|
12
|
+
*/
|
|
13
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
14
|
+
var config_1 = require("./config/config");
|
|
15
|
+
Object.defineProperty(exports, "loadConfig", { enumerable: true, get: function () { return config_1.loadConfig; } });
|
|
16
|
+
var env_1 = require("./config/env");
|
|
17
|
+
Object.defineProperty(exports, "loadEnv", { enumerable: true, get: function () { return env_1.loadEnv; } });
|
|
18
|
+
Object.defineProperty(exports, "parseEnv", { enumerable: true, get: function () { return env_1.parseEnv; } });
|
|
19
|
+
var app_1 = require("./server/app");
|
|
20
|
+
Object.defineProperty(exports, "App", { enumerable: true, get: function () { return app_1.App; } });
|
|
21
|
+
Object.defineProperty(exports, "setActiveAppInstance", { enumerable: true, get: function () { return app_1.setActiveAppInstance; } });
|
|
22
|
+
var route_scanner_1 = require("./router/route-scanner");
|
|
23
|
+
Object.defineProperty(exports, "RouteScanner", { enumerable: true, get: function () { return route_scanner_1.RouteScanner; } });
|
|
24
|
+
Object.defineProperty(exports, "routeParadigm", { enumerable: true, get: function () { return route_scanner_1.routeParadigm; } });
|
|
25
|
+
Object.defineProperty(exports, "mixedParadigmMessage", { enumerable: true, get: function () { return route_scanner_1.mixedParadigmMessage; } });
|
|
26
|
+
var authorize_1 = require("./router/authorize");
|
|
27
|
+
Object.defineProperty(exports, "describeAccess", { enumerable: true, get: function () { return authorize_1.describeAccess; } });
|
|
28
|
+
var overlay_1 = require("./error/overlay");
|
|
29
|
+
Object.defineProperty(exports, "formatCliError", { enumerable: true, get: function () { return overlay_1.formatCliError; } });
|
|
30
|
+
Object.defineProperty(exports, "formatDevError", { enumerable: true, get: function () { return overlay_1.formatDevError; } });
|
|
31
|
+
var resolve_aliases_1 = require("./lib/resolve-aliases");
|
|
32
|
+
Object.defineProperty(exports, "registerPathAliasLoader", { enumerable: true, get: function () { return resolve_aliases_1.registerPathAliasLoader; } });
|
|
33
|
+
Object.defineProperty(exports, "resolvePathAliases", { enumerable: true, get: function () { return resolve_aliases_1.resolvePathAliases; } });
|
|
34
|
+
var time_1 = require("./utils/time");
|
|
35
|
+
Object.defineProperty(exports, "getFormattedTime", { enumerable: true, get: function () { return time_1.getFormattedTime; } });
|
|
36
|
+
var start_command_1 = require("./lib/start-command");
|
|
37
|
+
Object.defineProperty(exports, "startBuiltServer", { enumerable: true, get: function () { return start_command_1.startBuiltServer; } });
|
|
38
|
+
/** The production server entry (`exisjs/start`) */
|
|
39
|
+
exports.START_SERVER_PATH = node_path_1.default.join(__dirname, 'lib', 'start-server.js');
|
|
40
|
+
/** The `node:test` reporter used by `exisjs test` */
|
|
41
|
+
exports.TEST_REPORTER_PATH = node_path_1.default.join(__dirname, 'testing', 'reporter.mjs');
|
|
42
|
+
/** The installed runtime version, which the CLI must match */
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
44
|
+
exports.RUNTIME_VERSION = require('../package.json').version;
|
|
45
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,0DAA4B;AAE5B,0CAA4C;AAAnC,oGAAA,UAAU,OAAA;AACnB,oCAAgD;AAAvC,8FAAA,OAAO,OAAA;AAAE,+FAAA,QAAQ,OAAA;AAC1B,oCAAwD;AAA/C,0FAAA,GAAG,OAAA;AAAE,2GAAA,oBAAoB,OAAA;AAClC,wDAI+B;AAH7B,6GAAA,YAAY,OAAA;AACZ,8GAAA,aAAa,OAAA;AACb,qHAAA,oBAAoB,OAAA;AAEtB,gDAAmD;AAA1C,2GAAA,cAAc,OAAA;AACvB,2CAAgE;AAAvD,yGAAA,cAAc,OAAA;AAAE,yGAAA,cAAc,OAAA;AACvC,yDAG8B;AAF5B,0HAAA,uBAAuB,OAAA;AACvB,qHAAA,kBAAkB,OAAA;AAEpB,qCAA+C;AAAtC,wGAAA,gBAAgB,OAAA;AACzB,qDAAyE;AAAhE,iHAAA,gBAAgB,OAAA;AAEzB,mDAAmD;AACtC,QAAA,iBAAiB,GAAG,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAA;AAE/E,qDAAqD;AACxC,QAAA,kBAAkB,GAAG,mBAAI,CAAC,IAAI,CACzC,SAAS,EACT,SAAS,EACT,cAAc,CACf,CAAA;AAED,8DAA8D;AAC9D,iEAAiE;AACpD,QAAA,eAAe,GAAW,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-aliases.d.ts","sourceRoot":"","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"resolve-aliases.d.ts","sourceRoot":"","sources":["../../src/lib/resolve-aliases.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE,CAyDxD;AAMD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CA+BzD;AAiKD;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,CA8CjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-aliases.js","sourceRoot":"","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"resolve-aliases.js","sourceRoot":"","sources":["../../src/lib/resolve-aliases.ts"],"names":[],"mappings":";;;;;AAeA,oCAyDC;AAMD,0DA+BC;AAqKD,gDAiDC;AAnUD,0DAA4B;AAC5B,sDAAwB;AACxB,8DAAgC;AAShC;;;GAGG;AACH,SAAgB,YAAY,CAAC,GAAW;IACtC,MAAM,YAAY,GAAG,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC,CAAA;IACpD,MAAM,aAAa,GAAG,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAE3C,IAAI,QAAa,CAAA;IACjB,IAAI,iBAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,IAAI,CAAC;YACH,oDAAoD;YACpD,MAAM,GAAG,GAAG,iBAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;YAClD,MAAM,SAAS,GAAG,4CAA4C,CAAA;YAC9D,MAAM,QAAQ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;AACvB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface StartOptions {
|
|
2
|
+
entry?: string;
|
|
3
|
+
port?: string;
|
|
4
|
+
host?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Starts the built server in this process, so it receives SIGINT / SIGTERM
|
|
8
|
+
* itself and shuts down gracefully (the same as `node .exis/server/main.js`).
|
|
9
|
+
*/
|
|
10
|
+
export declare function startBuiltServer(options?: StartOptions, load?: (specifier: string) => Promise<unknown>): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=start-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-command.d.ts","sourceRoot":"","sources":["../../src/lib/start-command.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAOD;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,GAAE,YAAiB,EAE1B,IAAI,GAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAgB,GAC3D,OAAO,CAAC,IAAI,CAAC,CAwBf"}
|