@stonyx/orm 0.3.2-alpha.64 → 0.3.2-alpha.66
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 +12 -5
- package/dist/orm-request.d.ts +8 -1
- package/dist/orm-request.js +8 -1
- package/package.json +1 -1
- package/src/orm-request.ts +8 -1
package/README.md
CHANGED
|
@@ -318,8 +318,12 @@ Access classes define models and provide custom filtering/authorization logic.
|
|
|
318
318
|
> after the previous was fixed, by five different people. That section is now a
|
|
319
319
|
> record of what not to do, not a matching recipe: the sample below reads `model`
|
|
320
320
|
> from [the access context](#the-access-context-second-argument) and never looks
|
|
321
|
-
> at the mount at all, so
|
|
322
|
-
> rather than merely handled.
|
|
321
|
+
> at the mount at all, so variants 1, 2, 4 and 5 are **unconstructible** against
|
|
322
|
+
> it rather than merely handled. **Variant 3 survives.** It is the general shape
|
|
323
|
+
> "a hand-written matcher normalises differently from the router", and the
|
|
324
|
+
> migrated sample still runs one string comparison — the `/archived` sub-path
|
|
325
|
+
> deny — which folds case but does not decode, so `GET /owners/%61rchived` steps
|
|
326
|
+
> past it ([#228](https://github.com/abofs/stonyx-orm/issues/228)).
|
|
323
327
|
>
|
|
324
328
|
> That is still a stopgap. **The real fix is
|
|
325
329
|
> [#202](https://github.com/abofs/stonyx-orm/issues/202)** — `access()` should
|
|
@@ -712,9 +716,12 @@ configured `ORM_REST_ROUTE` prefix (variant 4 — there is nothing left to deriv
|
|
|
712
716
|
so `/apiowners` is unconstructible), and it is unaffected by an absolute-form
|
|
713
717
|
target (variant 5). It was still a transport artifact standing in for a
|
|
714
718
|
structural fact, and it is **no longer what the sample does**: the sample reads
|
|
715
|
-
`model`, so
|
|
716
|
-
handled.
|
|
717
|
-
|
|
719
|
+
`model`, so variants 1, 2, 4 and 5 are unconstructible against it rather than
|
|
720
|
+
handled. **Variant 3 survives**, in the one string comparison the migration
|
|
721
|
+
leaves behind: the `/archived` sub-path deny folds case but does not decode
|
|
722
|
+
([#228](https://github.com/abofs/stonyx-orm/issues/228)). The table below is
|
|
723
|
+
retained as the measured evidence behind the five variants, not because any of
|
|
724
|
+
these values should be matched on:
|
|
718
725
|
|
|
719
726
|
| request | `request.url` | `request.originalUrl` | `request.baseUrl` | `request.path` |
|
|
720
727
|
|---|---|---|---|---|
|
package/dist/orm-request.d.ts
CHANGED
|
@@ -163,9 +163,16 @@
|
|
|
163
163
|
* not mount-relative, unaffected by absolute-form, already carrying the
|
|
164
164
|
* configured `ORM_REST_ROUTE` prefix), but it was a transport artifact
|
|
165
165
|
* standing in for a structural fact and the sample no longer does it.
|
|
166
|
-
* `context.model` IS the structural fact, so
|
|
166
|
+
* `context.model` IS the structural fact, so variants 1, 2, 4 and 5 are
|
|
167
167
|
* unconstructible against a migrated predicate rather than handled.
|
|
168
168
|
*
|
|
169
|
+
* VARIANT 3 SURVIVES, and is deliberately not in that list. It is the general
|
|
170
|
+
* shape "a hand-written matcher normalises differently from the router", and a
|
|
171
|
+
* migrated predicate still runs one string comparison for any SUB-PATH rule --
|
|
172
|
+
* in the shipped sample, the `/archived` deny. That comparison folds case but
|
|
173
|
+
* does not decode, so `GET /owners/%61rchived` steps past it. See the
|
|
174
|
+
* normalisation paragraph below and abofs/stonyx-orm#228.
|
|
175
|
+
*
|
|
169
176
|
* ONE READ OF ARGUMENT ONE SURVIVES, AND IT MUST: `request.path`. It is
|
|
170
177
|
* mount-relative and query-free, and it is for rules that distinguish SUB-PATHS
|
|
171
178
|
* beneath the mount. The context names which model and which verb, NOT which
|
package/dist/orm-request.js
CHANGED
|
@@ -163,9 +163,16 @@
|
|
|
163
163
|
* not mount-relative, unaffected by absolute-form, already carrying the
|
|
164
164
|
* configured `ORM_REST_ROUTE` prefix), but it was a transport artifact
|
|
165
165
|
* standing in for a structural fact and the sample no longer does it.
|
|
166
|
-
* `context.model` IS the structural fact, so
|
|
166
|
+
* `context.model` IS the structural fact, so variants 1, 2, 4 and 5 are
|
|
167
167
|
* unconstructible against a migrated predicate rather than handled.
|
|
168
168
|
*
|
|
169
|
+
* VARIANT 3 SURVIVES, and is deliberately not in that list. It is the general
|
|
170
|
+
* shape "a hand-written matcher normalises differently from the router", and a
|
|
171
|
+
* migrated predicate still runs one string comparison for any SUB-PATH rule --
|
|
172
|
+
* in the shipped sample, the `/archived` deny. That comparison folds case but
|
|
173
|
+
* does not decode, so `GET /owners/%61rchived` steps past it. See the
|
|
174
|
+
* normalisation paragraph below and abofs/stonyx-orm#228.
|
|
175
|
+
*
|
|
169
176
|
* ONE READ OF ARGUMENT ONE SURVIVES, AND IT MUST: `request.path`. It is
|
|
170
177
|
* mount-relative and query-free, and it is for rules that distinguish SUB-PATHS
|
|
171
178
|
* beneath the mount. The context names which model and which verb, NOT which
|
package/package.json
CHANGED
package/src/orm-request.ts
CHANGED
|
@@ -163,9 +163,16 @@
|
|
|
163
163
|
* not mount-relative, unaffected by absolute-form, already carrying the
|
|
164
164
|
* configured `ORM_REST_ROUTE` prefix), but it was a transport artifact
|
|
165
165
|
* standing in for a structural fact and the sample no longer does it.
|
|
166
|
-
* `context.model` IS the structural fact, so
|
|
166
|
+
* `context.model` IS the structural fact, so variants 1, 2, 4 and 5 are
|
|
167
167
|
* unconstructible against a migrated predicate rather than handled.
|
|
168
168
|
*
|
|
169
|
+
* VARIANT 3 SURVIVES, and is deliberately not in that list. It is the general
|
|
170
|
+
* shape "a hand-written matcher normalises differently from the router", and a
|
|
171
|
+
* migrated predicate still runs one string comparison for any SUB-PATH rule --
|
|
172
|
+
* in the shipped sample, the `/archived` deny. That comparison folds case but
|
|
173
|
+
* does not decode, so `GET /owners/%61rchived` steps past it. See the
|
|
174
|
+
* normalisation paragraph below and abofs/stonyx-orm#228.
|
|
175
|
+
*
|
|
169
176
|
* ONE READ OF ARGUMENT ONE SURVIVES, AND IT MUST: `request.path`. It is
|
|
170
177
|
* mount-relative and query-free, and it is for rules that distinguish SUB-PATHS
|
|
171
178
|
* beneath the mount. The context names which model and which verb, NOT which
|