@dynamic-entity/server 2.5.0 → 3.0.0-rc.1
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/express.d.mts +16 -16
- package/express.d.ts +16 -16
- package/express.js +38 -1072
- package/express.js.map +1 -1
- package/express.mjs +38 -1069
- package/express.mjs.map +1 -1
- package/index.d.mts +55 -140
- package/index.d.ts +55 -140
- package/index.js +50 -813
- package/index.js.map +1 -1
- package/index.mjs +49 -809
- package/index.mjs.map +1 -1
- package/package.json +5 -4
- package/run-import-BUClq6BR.d.mts +187 -0
- package/run-import-BUClq6BR.d.ts +187 -0
- package/write-template-Dqu5b00D.d.mts +0 -355
- package/write-template-Dqu5b00D.d.ts +0 -355
package/express.d.mts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { EntityFormConfig, FormRule, ImportLookups, DateOrder } from '@dynamic-entity/core';
|
|
2
|
-
import { Request, Router
|
|
3
|
-
import {
|
|
4
|
-
import '
|
|
2
|
+
import { Request, Router } from 'express';
|
|
3
|
+
import { sendFailure as sendFailure$1, templateFilename as templateFilename$1 } from 'sheet-to-schema/node';
|
|
4
|
+
import { B as BatchInfo, I as ImportLimits } from './run-import-BUClq6BR.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* express.ts — four routes
|
|
7
|
+
* express.ts — four routes, and no privileges.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Since 3.0 the routes are sheet-to-schema's (`createImportRouter` in `sheet-to-schema/node`),
|
|
10
|
+
* which resolves a schema adapter by the name in the path. This is that router with a config
|
|
11
|
+
* behind each name: it finds the config, checks its lookups were supplied, turns it into
|
|
12
|
+
* `entityFormConfigAdapter` with the entity's rules, and answers a preview with the same
|
|
13
|
+
* suggestion the browser makes. Reading the upload, the limits, the timeouts and the failure
|
|
14
|
+
* envelope are the router's own, and are the code this file had until 3.0.
|
|
12
15
|
*
|
|
13
16
|
* **Not this router's job, said out loud.** Concurrency limiting, authentication and
|
|
14
17
|
* authorization are the consumer's. The router is mounted inside their app, behind their
|
|
@@ -76,20 +79,17 @@ declare function listNamesOf(config: EntityFormConfig): string[];
|
|
|
76
79
|
*
|
|
77
80
|
* The caller passes `config.entity`, not the route segment. They are usually the same string,
|
|
78
81
|
* and when they are not — a consumer mounting a plural route, `{ employees: employeeConfig }` —
|
|
79
|
-
* the config is the one that names the data.
|
|
80
|
-
* carry meaning it was never given, which is a footgun with no upside: the key is a route
|
|
81
|
-
* segment and nothing else.
|
|
82
|
+
* the config is the one that names the data.
|
|
82
83
|
*/
|
|
83
|
-
declare
|
|
84
|
+
declare const templateFilename: typeof templateFilename$1;
|
|
84
85
|
/**
|
|
85
86
|
* Send whatever went wrong as the envelope, unless the response has already started.
|
|
86
87
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* one, which is the worst of the available outcomes.
|
|
88
|
+
* A template that failed part-way is already partly on the wire, and the only honest thing
|
|
89
|
+
* left is to end the connection abruptly. A 200 with a truncated body is a corrupt file that
|
|
90
|
+
* looks like a good one, which is the worst of the available outcomes.
|
|
91
91
|
*/
|
|
92
|
-
declare
|
|
92
|
+
declare const sendFailure: typeof sendFailure$1;
|
|
93
93
|
declare function createImportRouter(options: ImportRouterOptions): Router;
|
|
94
94
|
|
|
95
95
|
export { type ConfigSource, type ImportRouterOptions, type OnImport, createImportRouter, listNamesOf, sendFailure, templateFilename };
|
package/express.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { EntityFormConfig, FormRule, ImportLookups, DateOrder } from '@dynamic-entity/core';
|
|
2
|
-
import { Request, Router
|
|
3
|
-
import {
|
|
4
|
-
import '
|
|
2
|
+
import { Request, Router } from 'express';
|
|
3
|
+
import { sendFailure as sendFailure$1, templateFilename as templateFilename$1 } from 'sheet-to-schema/node';
|
|
4
|
+
import { B as BatchInfo, I as ImportLimits } from './run-import-BUClq6BR.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* express.ts — four routes
|
|
7
|
+
* express.ts — four routes, and no privileges.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Since 3.0 the routes are sheet-to-schema's (`createImportRouter` in `sheet-to-schema/node`),
|
|
10
|
+
* which resolves a schema adapter by the name in the path. This is that router with a config
|
|
11
|
+
* behind each name: it finds the config, checks its lookups were supplied, turns it into
|
|
12
|
+
* `entityFormConfigAdapter` with the entity's rules, and answers a preview with the same
|
|
13
|
+
* suggestion the browser makes. Reading the upload, the limits, the timeouts and the failure
|
|
14
|
+
* envelope are the router's own, and are the code this file had until 3.0.
|
|
12
15
|
*
|
|
13
16
|
* **Not this router's job, said out loud.** Concurrency limiting, authentication and
|
|
14
17
|
* authorization are the consumer's. The router is mounted inside their app, behind their
|
|
@@ -76,20 +79,17 @@ declare function listNamesOf(config: EntityFormConfig): string[];
|
|
|
76
79
|
*
|
|
77
80
|
* The caller passes `config.entity`, not the route segment. They are usually the same string,
|
|
78
81
|
* and when they are not — a consumer mounting a plural route, `{ employees: employeeConfig }` —
|
|
79
|
-
* the config is the one that names the data.
|
|
80
|
-
* carry meaning it was never given, which is a footgun with no upside: the key is a route
|
|
81
|
-
* segment and nothing else.
|
|
82
|
+
* the config is the one that names the data.
|
|
82
83
|
*/
|
|
83
|
-
declare
|
|
84
|
+
declare const templateFilename: typeof templateFilename$1;
|
|
84
85
|
/**
|
|
85
86
|
* Send whatever went wrong as the envelope, unless the response has already started.
|
|
86
87
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* one, which is the worst of the available outcomes.
|
|
88
|
+
* A template that failed part-way is already partly on the wire, and the only honest thing
|
|
89
|
+
* left is to end the connection abruptly. A 200 with a truncated body is a corrupt file that
|
|
90
|
+
* looks like a good one, which is the worst of the available outcomes.
|
|
91
91
|
*/
|
|
92
|
-
declare
|
|
92
|
+
declare const sendFailure: typeof sendFailure$1;
|
|
93
93
|
declare function createImportRouter(options: ImportRouterOptions): Router;
|
|
94
94
|
|
|
95
95
|
export { type ConfigSource, type ImportRouterOptions, type OnImport, createImportRouter, listNamesOf, sendFailure, templateFilename };
|