@fuzdev/fuz_app 0.161.0 → 0.163.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/dist/auth/CLAUDE.md +47 -36
- package/dist/auth/account_action_specs.d.ts +614 -150
- package/dist/auth/account_action_specs.d.ts.map +1 -1
- package/dist/auth/account_action_specs.js +56 -52
- package/dist/auth/account_route_schema.d.ts +401 -94
- package/dist/auth/account_route_schema.d.ts.map +1 -1
- package/dist/auth/account_route_schema.js +54 -39
- package/dist/auth/account_routes.js +1 -1
- package/dist/auth/account_schema.d.ts +531 -118
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +76 -58
- package/dist/auth/admin_action_specs.d.ts +1753 -240
- package/dist/auth/admin_action_specs.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.js +28 -26
- package/dist/auth/admin_actions.d.ts +4 -4
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +3 -3
- package/dist/auth/all_cell_actions.d.ts +3 -3
- package/dist/auth/all_cell_actions.d.ts.map +1 -1
- package/dist/auth/all_cell_actions.js +1 -1
- package/dist/auth/api_token.d.ts +4 -4
- package/dist/auth/api_token.d.ts.map +1 -1
- package/dist/auth/api_token.js +3 -3
- package/dist/auth/audit_emitter.d.ts +8 -3
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +32 -9
- package/dist/auth/audit_log_queries.d.ts.map +1 -1
- package/dist/auth/audit_log_queries.js +4 -3
- package/dist/auth/audit_log_schema.d.ts +798 -291
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +192 -201
- package/dist/auth/bootstrap_route_schema.d.ts +173 -50
- package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
- package/dist/auth/bootstrap_route_schema.js +35 -16
- package/dist/auth/cell_grant_action_specs.d.ts +1 -1
- package/dist/auth/cell_grant_action_specs.js +1 -1
- package/dist/auth/cell_grant_actions.d.ts +4 -4
- package/dist/auth/cell_grant_actions.d.ts.map +1 -1
- package/dist/auth/cell_grant_actions.js +1 -1
- package/dist/auth/credential_type_schema.d.ts +16 -29
- package/dist/auth/credential_type_schema.d.ts.map +1 -1
- package/dist/auth/credential_type_schema.js +14 -18
- package/dist/auth/grant_path_schema.d.ts +15 -29
- package/dist/auth/grant_path_schema.d.ts.map +1 -1
- package/dist/auth/grant_path_schema.js +13 -17
- package/dist/auth/invite_schema.d.ts +98 -26
- package/dist/auth/invite_schema.d.ts.map +1 -1
- package/dist/auth/invite_schema.js +21 -14
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +28 -1
- package/dist/auth/name_schema.d.ts +7 -6
- package/dist/auth/name_schema.d.ts.map +1 -1
- package/dist/auth/name_schema.js +8 -9
- package/dist/auth/password.d.ts +15 -7
- package/dist/auth/password.d.ts.map +1 -1
- package/dist/auth/password.js +16 -9
- package/dist/auth/role_grant_offer_action_specs.d.ts +72 -72
- package/dist/auth/role_grant_offer_action_specs.js +2 -2
- package/dist/auth/role_grant_offer_actions.d.ts +4 -4
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +3 -3
- package/dist/auth/role_grant_offer_notifications.d.ts +60 -60
- package/dist/auth/role_grant_offer_notifications.js +2 -2
- package/dist/auth/role_grant_offer_schema.d.ts +8 -8
- package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_schema.js +10 -10
- package/dist/auth/role_schema.d.ts +47 -55
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +29 -35
- package/dist/auth/scope_kind_schema.d.ts +22 -26
- package/dist/auth/scope_kind_schema.d.ts.map +1 -1
- package/dist/auth/scope_kind_schema.js +19 -19
- package/dist/auth/self_service_role_action_specs.js +1 -1
- package/dist/auth/self_service_role_actions.d.ts +6 -6
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +7 -6
- package/dist/auth/signup_route_schema.d.ts +71 -21
- package/dist/auth/signup_route_schema.d.ts.map +1 -1
- package/dist/auth/signup_route_schema.js +18 -16
- package/dist/auth/standard_rpc_actions.d.ts +1 -1
- package/dist/auth/standard_rpc_actions.js +1 -1
- package/dist/auth/token_lifetime.d.ts +33 -9
- package/dist/auth/token_lifetime.d.ts.map +1 -1
- package/dist/auth/token_lifetime.js +8 -7
- package/dist/auth/token_scope.d.ts +99 -25
- package/dist/auth/token_scope.d.ts.map +1 -1
- package/dist/auth/token_scope.js +57 -35
- package/dist/dev/setup.d.ts +14 -7
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +11 -6
- package/dist/primitive_schemas.d.ts +2 -22
- package/dist/primitive_schemas.d.ts.map +1 -1
- package/dist/primitive_schemas.js +2 -24
- package/dist/primitive_schemas_fuz.d.ts +56 -2
- package/dist/primitive_schemas_fuz.d.ts.map +1 -1
- package/dist/primitive_schemas_fuz.js +54 -4
- package/dist/testing/CLAUDE.md +29 -8
- package/dist/testing/admin_integration.d.ts +3 -3
- package/dist/testing/admin_integration.d.ts.map +1 -1
- package/dist/testing/admin_integration.js +1 -1
- package/dist/testing/app_server.d.ts +3 -1
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +6 -2
- package/dist/testing/audit_drift_guard.d.ts.map +1 -1
- package/dist/testing/audit_drift_guard.js +12 -13
- package/dist/testing/cross_backend/default_spine_surface.d.ts +2 -2
- package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_spine_surface.js +2 -2
- package/dist/testing/cross_backend/identity_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/identity_parity.js +43 -8
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +3 -3
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
- package/dist/testing/cross_backend/session_cap.js +4 -3
- package/dist/testing/cross_backend/setup.d.ts +1 -1
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +45 -42
- package/dist/testing/cross_backend/spine_suites.d.ts +3 -3
- package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
- package/dist/testing/cross_backend/standard.d.ts +4 -4
- package/dist/testing/cross_backend/standard.d.ts.map +1 -1
- package/dist/testing/cross_backend/token_lifetime.d.ts.map +1 -1
- package/dist/testing/cross_backend/token_lifetime.js +34 -1
- package/dist/testing/db_entities.d.ts +3 -1
- package/dist/testing/db_entities.d.ts.map +1 -1
- package/dist/testing/db_entities.js +4 -2
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +4 -3
- package/dist/testing/token_scope_fixtures.d.ts +24 -0
- package/dist/testing/token_scope_fixtures.d.ts.map +1 -0
- package/dist/testing/token_scope_fixtures.js +49 -0
- package/dist/testing/transports/bootstrap.d.ts +1 -1
- package/dist/testing/transports/bootstrap.d.ts.map +1 -1
- package/dist/testing/transports/bootstrap.js +13 -12
- package/dist/ui/BootstrapForm.svelte +4 -2
- package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
- package/dist/ui/SignupForm.svelte +4 -2
- package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
- package/dist/zod.d.ts +2 -1
- package/dist/zod.d.ts.map +1 -1
- package/dist/zod.js +6 -2
- package/package.json +1 -1
- package/dist/auth/audit_log_schema_fuz.d.ts +0 -39
- package/dist/auth/audit_log_schema_fuz.d.ts.map +0 -1
- package/dist/auth/audit_log_schema_fuz.js +0 -37
- package/dist/auth/role_schema_fuz.d.ts +0 -30
- package/dist/auth/role_schema_fuz.d.ts.map +0 -1
- package/dist/auth/role_schema_fuz.js +0 -30
- package/dist/auth/scope_kind_schema_fuz.d.ts +0 -31
- package/dist/auth/scope_kind_schema_fuz.d.ts.map +0 -1
- package/dist/auth/scope_kind_schema_fuz.js +0 -31
package/dist/zod.js
CHANGED
|
@@ -136,13 +136,17 @@ export const zod_get_schema_keys = (schema) => {
|
|
|
136
136
|
};
|
|
137
137
|
/**
|
|
138
138
|
* Get the field schema for a key in an object schema, returning `undefined` if
|
|
139
|
-
* the schema is not an object or the key is
|
|
139
|
+
* the schema is not an object or the key is not one of its own fields (a name
|
|
140
|
+
* the shape only inherits, such as `constructor` or `toString`, included).
|
|
140
141
|
*
|
|
141
142
|
* @param schema - Zod schema (typically a `ZodObject` with possible wrappers)
|
|
142
143
|
* @param key - the property name
|
|
143
144
|
* @returns the field's schema, or `undefined`
|
|
144
145
|
*/
|
|
145
|
-
export const zod_maybe_get_field_schema = (schema, key) =>
|
|
146
|
+
export const zod_maybe_get_field_schema = (schema, key) => {
|
|
147
|
+
const shape = zod_unwrap_to_object(schema)?.shape;
|
|
148
|
+
return shape && Object.hasOwn(shape, key) ? shape[key] : undefined;
|
|
149
|
+
};
|
|
146
150
|
/**
|
|
147
151
|
* Get the field schema for a key in an object schema.
|
|
148
152
|
*
|
package/package.json
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `@fuzdev/fuz_schema` twins of the Zod `AuditEventTypeName` and
|
|
3
|
-
* `AuditOutcome` (`auth/audit_log_schema.ts`), under the same names, for
|
|
4
|
-
* schemas written in fuz_schema.
|
|
5
|
-
*
|
|
6
|
-
* `AuditEventTypeName` is built from the constants the Zod one is, the
|
|
7
|
-
* grammar and the two messages of `audit_log_schema.ts` and the bound of
|
|
8
|
-
* `auth/name_schema.ts`, so the two can't drift apart. They give every input
|
|
9
|
-
* the same verdict and output, and write the same JSON Schema (`maxLength`
|
|
10
|
-
* and `pattern`); a string both too long and off the grammar gets the one
|
|
11
|
-
* length issue from this twin, as its `pipe` stops at the first failing step,
|
|
12
|
-
* where the Zod one adds the grammar issue after it.
|
|
13
|
-
*
|
|
14
|
-
* The exports are `@nodocs` while the Zod schemas of the same names stay, as
|
|
15
|
-
* the docs build refuses two exports of one name.
|
|
16
|
-
*
|
|
17
|
-
* @module
|
|
18
|
-
*/
|
|
19
|
-
import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
20
|
-
/**
|
|
21
|
-
* Valid audit event-type name: `AUDIT_EVENT_TYPE_NAME_REGEX`, at most
|
|
22
|
-
* `NAME_LENGTH_MAX` UTF-16 code units, the twin of the Zod
|
|
23
|
-
* `AuditEventTypeName`. A string it refuses gets the Zod one's message; a
|
|
24
|
-
* value that is no string, fuz_schema's.
|
|
25
|
-
*
|
|
26
|
-
* @nodocs
|
|
27
|
-
*/
|
|
28
|
-
export declare const AuditEventTypeName: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
|
|
29
|
-
/** @nodocs */
|
|
30
|
-
export type AuditEventTypeName = Infer<typeof AuditEventTypeName>;
|
|
31
|
-
/**
|
|
32
|
-
* Audit event outcome, the twin of the Zod `AuditOutcome`.
|
|
33
|
-
*
|
|
34
|
-
* @nodocs
|
|
35
|
-
*/
|
|
36
|
-
export declare const AuditOutcome: import("@fuzdev/fuz_schema/schema.ts").Schema<"success" | "failure", "success" | "failure", "one_of", readonly ["success", "failure"]>;
|
|
37
|
-
/** @nodocs */
|
|
38
|
-
export type AuditOutcome = Infer<typeof AuditOutcome>;
|
|
39
|
-
//# sourceMappingURL=audit_log_schema_fuz.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audit_log_schema_fuz.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/audit_log_schema_fuz.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAgC,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAUxF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,0MAG9B,CAAC;AACF,cAAc;AACd,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,YAAY,wIAAiC,CAAC;AAC3D,cAAc;AACd,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `@fuzdev/fuz_schema` twins of the Zod `AuditEventTypeName` and
|
|
3
|
-
* `AuditOutcome` (`auth/audit_log_schema.ts`), under the same names, for
|
|
4
|
-
* schemas written in fuz_schema.
|
|
5
|
-
*
|
|
6
|
-
* `AuditEventTypeName` is built from the constants the Zod one is, the
|
|
7
|
-
* grammar and the two messages of `audit_log_schema.ts` and the bound of
|
|
8
|
-
* `auth/name_schema.ts`, so the two can't drift apart. They give every input
|
|
9
|
-
* the same verdict and output, and write the same JSON Schema (`maxLength`
|
|
10
|
-
* and `pattern`); a string both too long and off the grammar gets the one
|
|
11
|
-
* length issue from this twin, as its `pipe` stops at the first failing step,
|
|
12
|
-
* where the Zod one adds the grammar issue after it.
|
|
13
|
-
*
|
|
14
|
-
* The exports are `@nodocs` while the Zod schemas of the same names stay, as
|
|
15
|
-
* the docs build refuses two exports of one name.
|
|
16
|
-
*
|
|
17
|
-
* @module
|
|
18
|
-
*/
|
|
19
|
-
import { message, one_of, pipe, regex } from '@fuzdev/fuz_schema/schema.ts';
|
|
20
|
-
import { bounded_string } from '../primitive_schemas_fuz.js';
|
|
21
|
-
import { NAME_LENGTH_MAX } from './name_schema.js';
|
|
22
|
-
import { AUDIT_EVENT_TYPE_NAME_LENGTH_MESSAGE, AUDIT_EVENT_TYPE_NAME_PATTERN_MESSAGE, AUDIT_EVENT_TYPE_NAME_REGEX } from './audit_log_schema.js';
|
|
23
|
-
/**
|
|
24
|
-
* Valid audit event-type name: `AUDIT_EVENT_TYPE_NAME_REGEX`, at most
|
|
25
|
-
* `NAME_LENGTH_MAX` UTF-16 code units, the twin of the Zod
|
|
26
|
-
* `AuditEventTypeName`. A string it refuses gets the Zod one's message; a
|
|
27
|
-
* value that is no string, fuz_schema's.
|
|
28
|
-
*
|
|
29
|
-
* @nodocs
|
|
30
|
-
*/
|
|
31
|
-
export const AuditEventTypeName = pipe(bounded_string({ max: NAME_LENGTH_MAX, max_message: AUDIT_EVENT_TYPE_NAME_LENGTH_MESSAGE }), message(regex(AUDIT_EVENT_TYPE_NAME_REGEX), AUDIT_EVENT_TYPE_NAME_PATTERN_MESSAGE));
|
|
32
|
-
/**
|
|
33
|
-
* Audit event outcome, the twin of the Zod `AuditOutcome`.
|
|
34
|
-
*
|
|
35
|
-
* @nodocs
|
|
36
|
-
*/
|
|
37
|
-
export const AuditOutcome = one_of(['success', 'failure']);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `@fuzdev/fuz_schema` twin of the Zod `RoleName` (`auth/role_schema.ts`),
|
|
3
|
-
* under the same name, for schemas written in fuz_schema.
|
|
4
|
-
*
|
|
5
|
-
* Both are built from the same constants, the bound and the grammar of
|
|
6
|
-
* `auth/name_schema.ts` and the two messages `role_schema.ts` exports, so
|
|
7
|
-
* they can't drift apart. They give every input
|
|
8
|
-
* the same verdict and output, and write the same JSON Schema
|
|
9
|
-
* (`maxLength` and `pattern`); a string both too long and outside the grammar
|
|
10
|
-
* gets the one length issue from this twin, as its `pipe` stops at the first
|
|
11
|
-
* failing step, where the Zod one adds the grammar issue after it.
|
|
12
|
-
*
|
|
13
|
-
* The export is `@nodocs` while the Zod `RoleName` stays, as the docs build
|
|
14
|
-
* refuses two exports of one name.
|
|
15
|
-
*
|
|
16
|
-
* @module
|
|
17
|
-
*/
|
|
18
|
-
import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
19
|
-
/**
|
|
20
|
-
* Valid role name: lowercase letters and underscores, no leading, trailing or
|
|
21
|
-
* consecutive underscores, at most `NAME_LENGTH_MAX` UTF-16 code units, the twin of
|
|
22
|
-
* the Zod `RoleName`. A string it refuses gets the Zod one's message; a
|
|
23
|
-
* value that is no string, fuz_schema's.
|
|
24
|
-
*
|
|
25
|
-
* @nodocs
|
|
26
|
-
*/
|
|
27
|
-
export declare const RoleName: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
|
|
28
|
-
/** @nodocs */
|
|
29
|
-
export type RoleName = Infer<typeof RoleName>;
|
|
30
|
-
//# sourceMappingURL=role_schema_fuz.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"role_schema_fuz.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/role_schema_fuz.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAwB,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAMhF;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,0MAGpB,CAAC;AACF,cAAc;AACd,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `@fuzdev/fuz_schema` twin of the Zod `RoleName` (`auth/role_schema.ts`),
|
|
3
|
-
* under the same name, for schemas written in fuz_schema.
|
|
4
|
-
*
|
|
5
|
-
* Both are built from the same constants, the bound and the grammar of
|
|
6
|
-
* `auth/name_schema.ts` and the two messages `role_schema.ts` exports, so
|
|
7
|
-
* they can't drift apart. They give every input
|
|
8
|
-
* the same verdict and output, and write the same JSON Schema
|
|
9
|
-
* (`maxLength` and `pattern`); a string both too long and outside the grammar
|
|
10
|
-
* gets the one length issue from this twin, as its `pipe` stops at the first
|
|
11
|
-
* failing step, where the Zod one adds the grammar issue after it.
|
|
12
|
-
*
|
|
13
|
-
* The export is `@nodocs` while the Zod `RoleName` stays, as the docs build
|
|
14
|
-
* refuses two exports of one name.
|
|
15
|
-
*
|
|
16
|
-
* @module
|
|
17
|
-
*/
|
|
18
|
-
import { message, pipe, regex } from '@fuzdev/fuz_schema/schema.ts';
|
|
19
|
-
import { bounded_string } from '../primitive_schemas_fuz.js';
|
|
20
|
-
import { NAME_LENGTH_MAX, NAME_REGEX } from './name_schema.js';
|
|
21
|
-
import { ROLE_NAME_LENGTH_MESSAGE, ROLE_NAME_PATTERN_MESSAGE } from './role_schema.js';
|
|
22
|
-
/**
|
|
23
|
-
* Valid role name: lowercase letters and underscores, no leading, trailing or
|
|
24
|
-
* consecutive underscores, at most `NAME_LENGTH_MAX` UTF-16 code units, the twin of
|
|
25
|
-
* the Zod `RoleName`. A string it refuses gets the Zod one's message; a
|
|
26
|
-
* value that is no string, fuz_schema's.
|
|
27
|
-
*
|
|
28
|
-
* @nodocs
|
|
29
|
-
*/
|
|
30
|
-
export const RoleName = pipe(bounded_string({ max: NAME_LENGTH_MAX, max_message: ROLE_NAME_LENGTH_MESSAGE }), message(regex(NAME_REGEX), ROLE_NAME_PATTERN_MESSAGE));
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `@fuzdev/fuz_schema` twin of the Zod `ScopeKindName`
|
|
3
|
-
* (`auth/scope_kind_schema.ts`), under the same name, for schemas written in
|
|
4
|
-
* fuz_schema.
|
|
5
|
-
*
|
|
6
|
-
* Both are built from the same constants, the bound and the grammar of
|
|
7
|
-
* `auth/name_schema.ts` and the two messages `scope_kind_schema.ts` exports,
|
|
8
|
-
* so they can't drift apart. They give every
|
|
9
|
-
* input the same verdict and output, and write the same JSON Schema
|
|
10
|
-
* (`maxLength` and `pattern`); a string both too long and outside the grammar
|
|
11
|
-
* gets the one length issue from this twin, as its `pipe` stops at the first
|
|
12
|
-
* failing step, where the Zod one adds the grammar issue after it.
|
|
13
|
-
*
|
|
14
|
-
* The export is `@nodocs` while the Zod `ScopeKindName` stays, as the docs
|
|
15
|
-
* build refuses two exports of one name.
|
|
16
|
-
*
|
|
17
|
-
* @module
|
|
18
|
-
*/
|
|
19
|
-
import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
20
|
-
/**
|
|
21
|
-
* Valid scope-kind name: runs of lowercase letters joined by single
|
|
22
|
-
* underscores, at most `NAME_LENGTH_MAX` UTF-16 code units, the twin of
|
|
23
|
-
* the Zod `ScopeKindName`. A string it refuses gets the Zod one's message; a
|
|
24
|
-
* value that is no string, fuz_schema's.
|
|
25
|
-
*
|
|
26
|
-
* @nodocs
|
|
27
|
-
*/
|
|
28
|
-
export declare const ScopeKindName: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
|
|
29
|
-
/** @nodocs */
|
|
30
|
-
export type ScopeKindName = Infer<typeof ScopeKindName>;
|
|
31
|
-
//# sourceMappingURL=scope_kind_schema_fuz.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scope_kind_schema_fuz.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/scope_kind_schema_fuz.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAwB,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAShF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,0MAGzB,CAAC;AACF,cAAc;AACd,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `@fuzdev/fuz_schema` twin of the Zod `ScopeKindName`
|
|
3
|
-
* (`auth/scope_kind_schema.ts`), under the same name, for schemas written in
|
|
4
|
-
* fuz_schema.
|
|
5
|
-
*
|
|
6
|
-
* Both are built from the same constants, the bound and the grammar of
|
|
7
|
-
* `auth/name_schema.ts` and the two messages `scope_kind_schema.ts` exports,
|
|
8
|
-
* so they can't drift apart. They give every
|
|
9
|
-
* input the same verdict and output, and write the same JSON Schema
|
|
10
|
-
* (`maxLength` and `pattern`); a string both too long and outside the grammar
|
|
11
|
-
* gets the one length issue from this twin, as its `pipe` stops at the first
|
|
12
|
-
* failing step, where the Zod one adds the grammar issue after it.
|
|
13
|
-
*
|
|
14
|
-
* The export is `@nodocs` while the Zod `ScopeKindName` stays, as the docs
|
|
15
|
-
* build refuses two exports of one name.
|
|
16
|
-
*
|
|
17
|
-
* @module
|
|
18
|
-
*/
|
|
19
|
-
import { message, pipe, regex } from '@fuzdev/fuz_schema/schema.ts';
|
|
20
|
-
import { bounded_string } from '../primitive_schemas_fuz.js';
|
|
21
|
-
import { NAME_LENGTH_MAX, NAME_REGEX } from './name_schema.js';
|
|
22
|
-
import { SCOPE_KIND_NAME_LENGTH_MESSAGE, SCOPE_KIND_NAME_PATTERN_MESSAGE } from './scope_kind_schema.js';
|
|
23
|
-
/**
|
|
24
|
-
* Valid scope-kind name: runs of lowercase letters joined by single
|
|
25
|
-
* underscores, at most `NAME_LENGTH_MAX` UTF-16 code units, the twin of
|
|
26
|
-
* the Zod `ScopeKindName`. A string it refuses gets the Zod one's message; a
|
|
27
|
-
* value that is no string, fuz_schema's.
|
|
28
|
-
*
|
|
29
|
-
* @nodocs
|
|
30
|
-
*/
|
|
31
|
-
export const ScopeKindName = pipe(bounded_string({ max: NAME_LENGTH_MAX, max_message: SCOPE_KIND_NAME_LENGTH_MESSAGE }), message(regex(NAME_REGEX), SCOPE_KIND_NAME_PATTERN_MESSAGE));
|