@fuzdev/fuz_app 0.162.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.
Files changed (121) hide show
  1. package/dist/auth/CLAUDE.md +38 -35
  2. package/dist/auth/account_action_specs.d.ts +441 -115
  3. package/dist/auth/account_action_specs.d.ts.map +1 -1
  4. package/dist/auth/account_action_specs.js +47 -46
  5. package/dist/auth/account_route_schema.d.ts +120 -60
  6. package/dist/auth/account_route_schema.d.ts.map +1 -1
  7. package/dist/auth/account_route_schema.js +50 -36
  8. package/dist/auth/account_routes.js +1 -1
  9. package/dist/auth/account_schema.d.ts +54 -27
  10. package/dist/auth/account_schema.d.ts.map +1 -1
  11. package/dist/auth/account_schema.js +16 -18
  12. package/dist/auth/admin_action_specs.d.ts +20 -20
  13. package/dist/auth/admin_action_specs.js +2 -4
  14. package/dist/auth/admin_actions.d.ts +4 -4
  15. package/dist/auth/admin_actions.d.ts.map +1 -1
  16. package/dist/auth/admin_actions.js +3 -3
  17. package/dist/auth/all_cell_actions.d.ts +3 -3
  18. package/dist/auth/all_cell_actions.d.ts.map +1 -1
  19. package/dist/auth/all_cell_actions.js +1 -1
  20. package/dist/auth/api_token.d.ts +4 -4
  21. package/dist/auth/api_token.d.ts.map +1 -1
  22. package/dist/auth/api_token.js +3 -3
  23. package/dist/auth/audit_log_schema.d.ts +28 -48
  24. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  25. package/dist/auth/audit_log_schema.js +34 -30
  26. package/dist/auth/bootstrap_route_schema.d.ts +173 -50
  27. package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
  28. package/dist/auth/bootstrap_route_schema.js +35 -16
  29. package/dist/auth/cell_grant_action_specs.d.ts +1 -1
  30. package/dist/auth/cell_grant_action_specs.js +1 -1
  31. package/dist/auth/cell_grant_actions.d.ts +4 -4
  32. package/dist/auth/cell_grant_actions.d.ts.map +1 -1
  33. package/dist/auth/cell_grant_actions.js +1 -1
  34. package/dist/auth/credential_type_schema.d.ts +16 -29
  35. package/dist/auth/credential_type_schema.d.ts.map +1 -1
  36. package/dist/auth/credential_type_schema.js +14 -18
  37. package/dist/auth/grant_path_schema.d.ts +15 -29
  38. package/dist/auth/grant_path_schema.d.ts.map +1 -1
  39. package/dist/auth/grant_path_schema.js +13 -17
  40. package/dist/auth/migrations.js +1 -1
  41. package/dist/auth/name_schema.d.ts +7 -6
  42. package/dist/auth/name_schema.d.ts.map +1 -1
  43. package/dist/auth/name_schema.js +8 -9
  44. package/dist/auth/password.d.ts +15 -7
  45. package/dist/auth/password.d.ts.map +1 -1
  46. package/dist/auth/password.js +16 -9
  47. package/dist/auth/role_grant_offer_action_specs.js +2 -2
  48. package/dist/auth/role_grant_offer_actions.d.ts +4 -4
  49. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  50. package/dist/auth/role_grant_offer_actions.js +3 -3
  51. package/dist/auth/role_grant_offer_notifications.js +2 -2
  52. package/dist/auth/role_grant_offer_schema.d.ts +2 -2
  53. package/dist/auth/role_grant_offer_schema.js +2 -2
  54. package/dist/auth/role_schema.d.ts +47 -55
  55. package/dist/auth/role_schema.d.ts.map +1 -1
  56. package/dist/auth/role_schema.js +29 -35
  57. package/dist/auth/scope_kind_schema.d.ts +22 -26
  58. package/dist/auth/scope_kind_schema.d.ts.map +1 -1
  59. package/dist/auth/scope_kind_schema.js +19 -19
  60. package/dist/auth/self_service_role_action_specs.js +1 -1
  61. package/dist/auth/self_service_role_actions.d.ts +6 -6
  62. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  63. package/dist/auth/self_service_role_actions.js +7 -6
  64. package/dist/auth/signup_route_schema.d.ts +71 -21
  65. package/dist/auth/signup_route_schema.d.ts.map +1 -1
  66. package/dist/auth/signup_route_schema.js +18 -16
  67. package/dist/auth/standard_rpc_actions.d.ts +1 -1
  68. package/dist/auth/standard_rpc_actions.js +1 -1
  69. package/dist/auth/token_lifetime.d.ts +33 -9
  70. package/dist/auth/token_lifetime.d.ts.map +1 -1
  71. package/dist/auth/token_lifetime.js +8 -7
  72. package/dist/auth/token_scope.d.ts +99 -25
  73. package/dist/auth/token_scope.d.ts.map +1 -1
  74. package/dist/auth/token_scope.js +57 -35
  75. package/dist/primitive_schemas.d.ts +2 -19
  76. package/dist/primitive_schemas.d.ts.map +1 -1
  77. package/dist/primitive_schemas.js +2 -20
  78. package/dist/primitive_schemas_fuz.d.ts +22 -2
  79. package/dist/primitive_schemas_fuz.d.ts.map +1 -1
  80. package/dist/primitive_schemas_fuz.js +23 -4
  81. package/dist/testing/CLAUDE.md +22 -5
  82. package/dist/testing/admin_integration.d.ts +3 -3
  83. package/dist/testing/admin_integration.d.ts.map +1 -1
  84. package/dist/testing/admin_integration.js +1 -1
  85. package/dist/testing/cross_backend/default_spine_surface.d.ts +2 -2
  86. package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
  87. package/dist/testing/cross_backend/default_spine_surface.js +2 -2
  88. package/dist/testing/cross_backend/identity_parity.d.ts.map +1 -1
  89. package/dist/testing/cross_backend/identity_parity.js +39 -6
  90. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +3 -3
  91. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
  92. package/dist/testing/cross_backend/setup.d.ts +1 -1
  93. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  94. package/dist/testing/cross_backend/setup.js +45 -42
  95. package/dist/testing/cross_backend/spine_suites.d.ts +3 -3
  96. package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
  97. package/dist/testing/cross_backend/standard.d.ts +4 -4
  98. package/dist/testing/cross_backend/standard.d.ts.map +1 -1
  99. package/dist/testing/cross_backend/token_lifetime.d.ts.map +1 -1
  100. package/dist/testing/cross_backend/token_lifetime.js +34 -1
  101. package/dist/testing/integration.js +1 -1
  102. package/dist/testing/token_scope_fixtures.d.ts +24 -0
  103. package/dist/testing/token_scope_fixtures.d.ts.map +1 -0
  104. package/dist/testing/token_scope_fixtures.js +49 -0
  105. package/dist/testing/transports/bootstrap.d.ts +1 -1
  106. package/dist/testing/transports/bootstrap.d.ts.map +1 -1
  107. package/dist/testing/transports/bootstrap.js +13 -12
  108. package/dist/ui/BootstrapForm.svelte +4 -2
  109. package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
  110. package/dist/ui/SignupForm.svelte +4 -2
  111. package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
  112. package/package.json +1 -1
  113. package/dist/auth/audit_log_schema_fuz.d.ts +0 -53
  114. package/dist/auth/audit_log_schema_fuz.d.ts.map +0 -1
  115. package/dist/auth/audit_log_schema_fuz.js +0 -50
  116. package/dist/auth/role_schema_fuz.d.ts +0 -30
  117. package/dist/auth/role_schema_fuz.d.ts.map +0 -1
  118. package/dist/auth/role_schema_fuz.js +0 -30
  119. package/dist/auth/scope_kind_schema_fuz.d.ts +0 -31
  120. package/dist/auth/scope_kind_schema_fuz.d.ts.map +0 -1
  121. package/dist/auth/scope_kind_schema_fuz.js +0 -31
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/transports/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAuB9B,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAe3D,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAC/B;AAED,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IACnC,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC;IACtC,iEAAiE;IACjE,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACxC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAU,SAAS,gBAAgB,KAAG,OAAO,CAAC,eAAe,CA8BlF,CAAC"}
1
+ {"version":3,"file":"bootstrap.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/transports/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAwB9B,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AAGtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAe3D,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAC/B;AAED,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IACnC,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC;IACtC,iEAAiE;IACjE,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACxC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAU,SAAS,gBAAgB,KAAG,OAAO,CAAC,eAAe,CA8BlF,CAAC"}
@@ -18,19 +18,20 @@ import '../assert_dev_env.js';
18
18
  *
19
19
  * @module
20
20
  */
21
- import { z } from 'zod';
22
- import { Uuid } from '../../primitive_schemas.js';
21
+ import { parse, string, strip_object } from '@fuzdev/fuz_schema/schema.ts';
22
+ import { Uuid } from '../../primitive_schemas_fuz.js';
23
+ import { format_issues } from '../../schema_issues.js';
23
24
  /**
24
25
  * The `BootstrapOutput` envelope shape the cross-process bootstrap call
25
- * cares about. Looser than the full `BootstrapOutput` Zod schema in
26
- * `auth/bootstrap_account.ts` — that schema is the canonical wire shape
26
+ * cares about. Looser than the full `BootstrapOutput` schema in
27
+ * `auth/bootstrap_route_schema.ts` — that schema is the canonical wire shape
27
28
  * on the server side, and this one is a structural subset the runner
28
29
  * uses to extract the keeper identity. Kept local so cross-process
29
30
  * testing doesn't pull the full auth-domain schema into its dep graph.
30
31
  */
31
- const BootstrapResponse = z.object({
32
- account: z.object({ id: Uuid, username: z.string() }),
33
- actor: z.object({ id: Uuid })
32
+ const BootstrapResponse = strip_object({
33
+ account: strip_object({ id: Uuid, username: string }),
34
+ actor: strip_object({ id: Uuid })
34
35
  });
35
36
  /**
36
37
  * Fire `POST {config.bootstrap_path}` and capture the keeper session.
@@ -57,14 +58,14 @@ export const bootstrap = async (options) => {
57
58
  throw new Error(`bootstrap(${config.name}) failed: status=${response.status} body=${body}`);
58
59
  }
59
60
  const raw = await response.json();
60
- const parsed = BootstrapResponse.safeParse(raw);
61
- if (!parsed.success) {
62
- throw new Error(`bootstrap(${config.name}) returned unexpected body: ${JSON.stringify(raw)} (${parsed.error.message})`);
61
+ const parsed = parse(BootstrapResponse, raw);
62
+ if (!parsed.ok) {
63
+ throw new Error(`bootstrap(${config.name}) returned unexpected body: ${JSON.stringify(raw)} (${format_issues(parsed.issues)})`);
63
64
  }
64
65
  return {
65
66
  transport,
66
- account: parsed.data.account,
67
- actor: parsed.data.actor,
67
+ account: parsed.value.account,
68
+ actor: parsed.value.actor,
68
69
  cookies: transport.cookies()
69
70
  };
70
71
  };
@@ -16,8 +16,10 @@
16
16
  import { resolve } from '$app/paths';
17
17
  import PendingButton from '@fuzdev/fuz_ui/PendingButton.svelte';
18
18
  import { autofocus } from '@fuzdev/fuz_ui/autofocus.svelte.ts';
19
+ import { is } from '@fuzdev/fuz_schema/schema.ts';
19
20
 
20
- import { Username, USERNAME_LENGTH_MAX, USERNAME_LENGTH_MIN } from '../primitive_schemas.js';
21
+ import { USERNAME_LENGTH_MAX, USERNAME_LENGTH_MIN } from '../primitive_schemas.js';
22
+ import { Username } from '../primitive_schemas_fuz.js';
21
23
  import { PASSWORD_LENGTH_MIN } from '../auth/password.js';
22
24
  import { auth_state_context } from './auth_state.svelte.js';
23
25
  import { FormState } from './form_state.svelte.js';
@@ -40,7 +42,7 @@
40
42
  let password = $state.raw('');
41
43
  let password_confirm = $state.raw('');
42
44
 
43
- const username_valid = $derived(Username.safeParse(username).success);
45
+ const username_valid = $derived(is(Username, username));
44
46
  const passwords_match = $derived(password === password_confirm);
45
47
  const can_submit = $derived(
46
48
  token.trim() &&
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapForm.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/BootstrapForm.svelte"],"names":[],"mappings":"AAyBC,KAAK,gBAAgB,GAAI;IACxB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AA0GH,QAAA,MAAM,aAAa,sDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"BootstrapForm.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/BootstrapForm.svelte"],"names":[],"mappings":"AA2BC,KAAK,gBAAgB,GAAI;IACxB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AA4GH,QAAA,MAAM,aAAa,sDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
@@ -15,8 +15,10 @@
15
15
  import { resolve } from '$app/paths';
16
16
  import PendingButton from '@fuzdev/fuz_ui/PendingButton.svelte';
17
17
  import { autofocus } from '@fuzdev/fuz_ui/autofocus.svelte.ts';
18
+ import { is } from '@fuzdev/fuz_schema/schema.ts';
18
19
 
19
- import { Username, USERNAME_LENGTH_MAX, USERNAME_LENGTH_MIN } from '../primitive_schemas.js';
20
+ import { USERNAME_LENGTH_MAX, USERNAME_LENGTH_MIN } from '../primitive_schemas.js';
21
+ import { Username } from '../primitive_schemas_fuz.js';
20
22
  import { PASSWORD_LENGTH_MIN } from '../auth/password.js';
21
23
  import { auth_state_context } from './auth_state.svelte.js';
22
24
  import { FormState } from './form_state.svelte.js';
@@ -39,7 +41,7 @@
39
41
  let password = $state.raw('');
40
42
  let password_confirm = $state.raw('');
41
43
 
42
- const username_valid = $derived(Username.safeParse(username).success);
44
+ const username_valid = $derived(is(Username, username));
43
45
  const passwords_match = $derived(password === password_confirm);
44
46
  const can_submit = $derived(
45
47
  username.trim() && username_valid && password.length >= PASSWORD_LENGTH_MIN && passwords_match
@@ -1 +1 @@
1
- {"version":3,"file":"SignupForm.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/SignupForm.svelte"],"names":[],"mappings":"AAwBC,KAAK,gBAAgB,GAAI;IACxB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAqGH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"SignupForm.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/SignupForm.svelte"],"names":[],"mappings":"AA0BC,KAAK,gBAAgB,GAAI;IACxB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAuGH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_app",
3
- "version": "0.162.0",
3
+ "version": "0.163.0",
4
4
  "description": "fullstack app library",
5
5
  "glyph": "🗝",
6
6
  "logo": "logo.svg",
@@ -1,53 +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 this module exports and the bound of
8
- * `auth/name_schema.ts`, so the two can't drift apart. The constants live
9
- * here, not beside the Zod schema, because `audit_log_schema.ts` builds its
10
- * wire rows from these twins. They give every input
11
- * the same verdict and output, and write the same JSON Schema (`maxLength`
12
- * and `pattern`); a string both too long and off the grammar gets the one
13
- * length issue from this twin, as its `pipe` stops at the first failing step,
14
- * where the Zod one adds the grammar issue after it.
15
- *
16
- * The twins are `@nodocs` while the Zod schemas of the same names stay, as
17
- * the docs build refuses two exports of one name.
18
- *
19
- * @module
20
- */
21
- import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
22
- /**
23
- * Letter start, then letters, digits, `_`, `.`, `/`, `-`. Accepts snake_case,
24
- * dotted, and namespaced consumer conventions; rejects empty strings, leading
25
- * separators, whitespace, and control characters. The audit event type's own
26
- * grammar, wider than the shared name grammar (`auth/name_schema.ts`), whose
27
- * length cap `AuditEventTypeName` takes.
28
- */
29
- export declare const AUDIT_EVENT_TYPE_NAME_REGEX: RegExp;
30
- /** The message of an audit event-type name past `NAME_LENGTH_MAX`. */
31
- export declare const AUDIT_EVENT_TYPE_NAME_LENGTH_MESSAGE = "must be at most 64 characters";
32
- /** The message of an audit event-type name off `AUDIT_EVENT_TYPE_NAME_REGEX`. */
33
- export declare const AUDIT_EVENT_TYPE_NAME_PATTERN_MESSAGE = "must start with a letter; only letters, digits, _ . / - allowed";
34
- /**
35
- * Valid audit event-type name: `AUDIT_EVENT_TYPE_NAME_REGEX`, at most
36
- * `NAME_LENGTH_MAX` UTF-16 code units, the twin of the Zod
37
- * `AuditEventTypeName`. A string it refuses gets the Zod one's message; a
38
- * value that is no string, fuz_schema's.
39
- *
40
- * @nodocs
41
- */
42
- 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>>>;
43
- /** @nodocs */
44
- export type AuditEventTypeName = Infer<typeof AuditEventTypeName>;
45
- /**
46
- * Audit event outcome, the twin of the Zod `AuditOutcome`.
47
- *
48
- * @nodocs
49
- */
50
- export declare const AuditOutcome: import("@fuzdev/fuz_schema/schema.ts").Schema<"success" | "failure", "success" | "failure", "one_of", readonly ["success", "failure"]>;
51
- /** @nodocs */
52
- export type AuditOutcome = Infer<typeof AuditOutcome>;
53
- //# 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;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAgC,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAKxF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,QAA+B,CAAC;AAExE,sEAAsE;AACtE,eAAO,MAAM,oCAAoC,kCAAkD,CAAC;AAEpG,iFAAiF;AACjF,eAAO,MAAM,qCAAqC,oEACgB,CAAC;AAEnE;;;;;;;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,50 +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 this module exports and the bound of
8
- * `auth/name_schema.ts`, so the two can't drift apart. The constants live
9
- * here, not beside the Zod schema, because `audit_log_schema.ts` builds its
10
- * wire rows from these twins. They give every input
11
- * the same verdict and output, and write the same JSON Schema (`maxLength`
12
- * and `pattern`); a string both too long and off the grammar gets the one
13
- * length issue from this twin, as its `pipe` stops at the first failing step,
14
- * where the Zod one adds the grammar issue after it.
15
- *
16
- * The twins are `@nodocs` while the Zod schemas of the same names stay, as
17
- * the docs build refuses two exports of one name.
18
- *
19
- * @module
20
- */
21
- import { message, one_of, pipe, regex } from '@fuzdev/fuz_schema/schema.ts';
22
- import { bounded_string } from '../primitive_schemas_fuz.js';
23
- import { NAME_LENGTH_MAX } from './name_schema.js';
24
- /**
25
- * Letter start, then letters, digits, `_`, `.`, `/`, `-`. Accepts snake_case,
26
- * dotted, and namespaced consumer conventions; rejects empty strings, leading
27
- * separators, whitespace, and control characters. The audit event type's own
28
- * grammar, wider than the shared name grammar (`auth/name_schema.ts`), whose
29
- * length cap `AuditEventTypeName` takes.
30
- */
31
- export const AUDIT_EVENT_TYPE_NAME_REGEX = /^[A-Za-z][A-Za-z0-9_./-]*$/;
32
- /** The message of an audit event-type name past `NAME_LENGTH_MAX`. */
33
- export const AUDIT_EVENT_TYPE_NAME_LENGTH_MESSAGE = `must be at most ${NAME_LENGTH_MAX} characters`;
34
- /** The message of an audit event-type name off `AUDIT_EVENT_TYPE_NAME_REGEX`. */
35
- export const AUDIT_EVENT_TYPE_NAME_PATTERN_MESSAGE = 'must start with a letter; only letters, digits, _ . / - allowed';
36
- /**
37
- * Valid audit event-type name: `AUDIT_EVENT_TYPE_NAME_REGEX`, at most
38
- * `NAME_LENGTH_MAX` UTF-16 code units, the twin of the Zod
39
- * `AuditEventTypeName`. A string it refuses gets the Zod one's message; a
40
- * value that is no string, fuz_schema's.
41
- *
42
- * @nodocs
43
- */
44
- 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));
45
- /**
46
- * Audit event outcome, the twin of the Zod `AuditOutcome`.
47
- *
48
- * @nodocs
49
- */
50
- 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));