@civitai/sdk 0.20.0 → 0.20.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/README.md +9 -3
- package/dist/doc-store/fake.js +7 -0
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1046,9 +1046,15 @@ Where it differs from the server on purpose:
|
|
|
1046
1046
|
|
|
1047
1047
|
`fake.calls` records every request and answer. Options also cover smaller `limits`,
|
|
1048
1048
|
`consent` (revoked scopes, or `'unavailable'`), `appStatus`, `disabled` and a custom
|
|
1049
|
-
`moderate`; by default the scanner refuses the words in `FAKE_STORAGE_MODERATION`.
|
|
1050
|
-
|
|
1051
|
-
|
|
1049
|
+
`moderate`; by default the scanner refuses the words in `FAKE_STORAGE_MODERATION`.
|
|
1050
|
+
That default is the server's enforced moderation. The host picks each app's
|
|
1051
|
+
moderation mode for shared data, and enforce is not the default there: expect
|
|
1052
|
+
shadow (scanned after the write) or off, where neither a hit nor a scanner outage
|
|
1053
|
+
refuses a write. So never rely on a refusal to keep content out of shared data:
|
|
1054
|
+
a write the fake refuses may land on the server, and other viewers read it. Pass
|
|
1055
|
+
`moderate: () => null` to test what such an app sees. The fake does not model
|
|
1056
|
+
moderator hides or the review-preview namespace, and at the `Http` seam there is no
|
|
1057
|
+
URL resolution — the client refuses the segments a URL would
|
|
1052
1058
|
rewrite (`''`, `.`, `..`) before sending.
|
|
1053
1059
|
|
|
1054
1060
|
### The legacy key/value stores
|
package/dist/doc-store/fake.js
CHANGED
|
@@ -22,6 +22,13 @@ import { createDocumentStorage } from './index.js';
|
|
|
22
22
|
* versions of its own, so which ones a viewer owns is `FakeStorageViewer.modelVersions`
|
|
23
23
|
* (default none).
|
|
24
24
|
*
|
|
25
|
+
* Moderation is the server's ENFORCE mode, which the contract's moderation cases
|
|
26
|
+
* describe: a hit refuses `content_rejected` and a scanner outage
|
|
27
|
+
* `moderation_unavailable`. The host picks each app's shared-data moderation mode,
|
|
28
|
+
* and enforce is not its default: in `shadow` (the scan runs after the write) or `off`
|
|
29
|
+
* (no scan) neither a hit nor an outage refuses the write. The fake has no mode of its
|
|
30
|
+
* own: `moderate: () => null` is what a shadow or off app sees.
|
|
31
|
+
*
|
|
25
32
|
* NOT MODELLED: moderator hides (a hidden document reads as not found on the server;
|
|
26
33
|
* nothing here hides one), moderator exemption from the scanner, the review-preview
|
|
27
34
|
* namespace, the token middleware's other refusals (revoked instance, context
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** This package's version, reported to the host as `sdkVersion` in `BLOCK_READY`. */
|
|
2
|
-
export declare const VERSION = "0.20.
|
|
2
|
+
export declare const VERSION = "0.20.1";
|
package/package.json
CHANGED